15
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 1 Flat File Data Load for Hierarchy Applies to: SAP BI NetWeaver 2004s. For more information visit the Enterprise Data Warehousing . Summary This article discusses how to maintain a user defined hierarchy for a user defined InfoObject and how to upload the data from flat file in BI 7.0? This article gives the reader a step by step process for the development of hierarchy. But unfortunately, the BI 7.0 doesn’t support the flat file upload directly, so it is required to follow the 3.x InfoSource and the Transfer Structure for the same. Author: Sunil Abraham Company: Cognizant Technology Services Created on: October 30 th 2011 Author Bio Sunil Abraham is currently working with Cognizant as BI Senior Consultant. He has more than 7 years of experience in BW/BI and 3 years of experience in Microsoft SQL and Oracle PL/SQL.

Flat File Data Load for Hierarchy - SAP

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Flat File Data Load for Hierarchy - SAP

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 1

Flat File Data Load for Hierarchy

Applies to:

SAP BI NetWeaver 2004s. For more information visit the Enterprise Data Warehousing.

Summary

This article discusses how to maintain a user defined hierarchy for a user defined InfoObject and how to upload the data from flat file in BI 7.0? This article gives the reader a step by step process for the development of hierarchy. But unfortunately, the BI 7.0 doesn’t support the flat file upload directly, so it is required to follow the 3.x InfoSource and the Transfer Structure for the same.

Author: Sunil Abraham

Company: Cognizant Technology Services

Created on: October 30th 2011

Author Bio

Sunil Abraham is currently working with Cognizant as BI Senior Consultant. He has more than 7 years of experience in BW/BI and 3 years of experience in Microsoft SQL and Oracle PL/SQL.

Page 2: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 2

Table of Contents

Introduction ......................................................................................................................................................... 3

Prerequisites ................................................................................................................................................... 3

Definition ............................................................................................................................................................. 4

Structure of a Hierarchy .................................................................................................................................. 4

Hierarchy Properties ....................................................................................................................................... 4

Procedure for Hierarchy Upload ......................................................................................................................... 5

Define a Source System ................................................................................................................................. 5

Defining the InfoSource................................................................................................................................... 5

Assign the Source system to the InfoSource .................................................................................................. 5

Transfer Structure Maintenance ..................................................................................................................... 5

Transfer Structure Maintenance for Hierarchy ................................................................................................ 6

Hierarchy Structure Maintenance ................................................................................................................... 7

Data Load Process ............................................................................................................................................. 8

Create the InfoPackage .................................................................................................................................. 8 ASCII File (CR Separator)............................................................................................................................................ 8

CSV File ....................................................................................................................................................................... 9

CSV Flat File Structure for Hierarchy .............................................................................................................. 9

Check the status of the data in Data Monitor screen .................................................................................... 11

Hierarchy Maintenance ................................................................................................................................. 11

Hierarchy Data Display ................................................................................................................................. 12

Hierarchy Data Structure in Table ................................................................................................................. 12

Summary........................................................................................................................................................... 13

Related Content ................................................................................................................................................ 14

Disclaimer and Liability Notice .......................................................................................................................... 15

Page 3: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 3

Introduction

This article discusses how to maintain a user defined hierarchy for a user defined InfoObject and how to upload the data from flat file in BI 7.0? This article gives the reader a step by step process for the development of hierarchy. But unfortunately, the BI 7.0 doesn’t support the flat file upload directly, so it is required to follow the 3.x InfoSource, DataSource and the Transfer Structure for the same.

Prerequisites

In order to make an InfoObject as hierarchy enabled there are few settings have to be done at the InfoObject maintenance level, go to the tap “Hierarchy” tick the indicator “with hierarchies” for the InfoObject. The Hierarchy has the following properties and based on the business requirement the properties can be defined.

Hierarchies version depended

Hierarchy not time depended

Entire hierarchy is time depended

Time Depended Hierarchy structure

Intervals permitted in Hierarchy

Reverse +/- signs for nodes

Page 4: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 4

Definition

A hierarchy is a method of displaying a characteristic structured and grouped according to individual evaluation criteria.

Structure of a Hierarchy

i. Nodes - A hierarchy is created from nodes. The uppermost node is the root. ii. Roots - A hierarchy can have several roots. They do not have superior nodes. iii. Leaves - The leaves of a hierarchy consist of characteristic values for the basic characteristic and

therefore can also have entries in the fact table. A leaf cannot have any sub nodes. iv. Basic Characteristic - Hierarchies can be created only for those characteristics that do not reference

other characteristics.

Hierarchy Properties

A BW hierarchy has the following properties

Hierarchies created for basic characteristic

Hierarchies are stored in special master data tables. They behave in a similar way to master data, and can therefore be used and modified in InfoCube.

You can define several hierarchies for a single characteristic

A hierarchy can have a maximum of 98 levels

Page 5: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 5

Procedure for Hierarchy Upload

Below is the detailed discussion on how hierarchy is created and maintained in from a Flat file:

Define a Source System

It is required to define a Source System for Flat File interface; if it has been defined in the system then the same can be used as Source.

Defining the InfoSource

If the Application Component is already created then the same can be used for the InfoSource:

Choose the specific Application Component -> Create InfoSource -> Direct Update -> Choose the specific InfoObject from the proposed list, and specify the Name and Description

Assign the Source system to the InfoSource

Select the InfoSource -> right click and assign the Source system -> select flat file interface as source system.

Transfer Structure Maintenance

After the Source system assignment the system will automatically take to the “Transfer Structure Maintenance”. The system automatically generates DataSources for the InfoObject and there can be three types based on the object.

Attributes

Texts

Hierarchies

Page 6: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 6

Transfer Structure Maintenance for Hierarchy

Choose the DataSource for hierarchy upload. Select the “Transfer Method” as IDOC. The system automatically generates a proposal for the DataSource and the Transfer Structure

Page 7: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 7

Hierarchy Structure Maintenance

The Node name for Text node remains restricted to 32 characters in the hierarchy (0HIER_NODE characteristic). The system automatically generates a table with the following hierarchy format for sorted hierarchies without removed leaf values and node InfoObject

Depending on which settings you have defined in the InfoObject maintenance, the system transfers the settings for the intervals and for time-dependency from the InfoObject maintenance.

The valid from and valid to field is filled if you select Total Hierarchy Time-dependent in the InfoObject maintenance. The time-dependent indicator is activated if you select the Hierarchy Nodes Time-dependent option in the InfoObject maintenance.

Page 8: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 8

Data Load Process

The data load process of hierarchy is almost the same as any data load and it is done by the InfoPackage and find below the detailed settings at InfoPackage.

Create the InfoPackage

There can be two types of files for InfoPacakge:

ASCII File (CR Separator)

Page 9: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 9

CSV File

CSV Flat File Structure for Hierarchy

It is important to maintain the hierarchy structure for the flat file in a CSV format and the order of the nide should be followed.

NODEID INFOOBJECT NODENAME LINK PARENTID CHILDID NEXTID LANGU TXTSH

1 0HIER_NODE EA 2 D BPC

2 ZBPC_TEST EU 1 3

3 ZBPC_TEST AS 1 4

4 0HIER_NODE US 1 5 A Dubai

5 ZBPC_TEST NA 4 6

6 ZBPC_TEST LA 4 7

7 ZBPC_TEST NJ 6

Page 10: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 10

Preview Parameters in InfoPacakge

File Upload Preview

Page 11: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 11

Check the status of the data in Data Monitor screen

Hierarchy Maintenance

Check the Hierarchies in the Hierarchy Maintenance screen.

Page 12: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 12

Hierarchy Data Display

The Hierarchy node details can be views by double clicking the particular Hierarchy and details will be displayed as below:

Hierarchy Data Structure in Table

Hierarchy data is maintained at the /BIC/HZBPC_GRP (Hierarchy: InfoObject BPC Groups)

Page 13: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 13

Summary

The Hierarchy upload from flat file is very much helpful for any customers; otherwise lot of time is spend to create the hierarchy in different systems manually. For example our client was maintaining this BPC related hierarchy manually in Development system, Quality System for testing and during cutover in Production system. If the data is large then it takes lot of time of the consultant to maintain the same.

Page 14: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 14

Related Content

For more information visit the Enterprise Data Warehousing

Page 15: Flat File Data Load for Hierarchy - SAP

Flat File Data Load for Hierarchy

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 15

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.