Hierarchy Data Loading

download Hierarchy Data Loading

of 15

Transcript of Hierarchy Data Loading

  • 7/29/2019 Hierarchy Data Loading

    1/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 theEnterprise Data Warehousing.

    Summary

    This article discusses how to maintain a user defined hierarchy for a user defined InfoObject and how toupload the data from flat file in BI 7.0? This article gives the reader a step by step process for thedevelopment of hierarchy. But unfortunately, the BI 7.0 doesnt support the flat file upload directly, so it isrequired 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 ofexperience in BW/BI and 3 years of experience in Microsoft SQL and Oracle PL/SQL.

    http://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edw
  • 7/29/2019 Hierarchy Data Loading

    2/15

    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 ......................................................................................................................................................... 3Prerequisites ................................................................................................................................................... 3

    Definition ............................................................................................................................................................. 4Structure of a Hierarchy .................................................................................................................................. 4Hierarchy Properties ....................................................................................................................................... 4

    Procedure for Hierarchy Upload ......................................................................................................................... 5Define a Source System ................................................................................................................................. 5Defining the InfoSource................................................................................................................................... 5Assign the Source system to the InfoSource .................................................................................................. 5Transfer Structure Maintenance ..................................................................................................................... 5Transfer Structure Maintenance for Hierarchy ................................................................................................ 6Hierarchy Structure Maintenance ................................................................................................................... 7

    Data Load Process ............................................................................................................................................. 8Create the InfoPackage .................................................................................................................................. 8

    ASCII File (CR Separator)............................................................................................................................................ 8

    CSV File ....................................................................................................................................................................... 9CSV Flat File Structure for Hierarchy .............................................................................................................. 9Check the status of the data in Data Monitor screen .................................................................................... 11 Hierarchy Maintenance ................................................................................................................................. 11Hierarchy Data Display ................................................................................................................................. 12Hierarchy Data Structure in Table ................................................................................................................. 12

    Summary........................................................................................................................................................... 13Related Content ................................................................................................................................................ 14Disclaimer and Liability Notice .......................................................................................................................... 15

  • 7/29/2019 Hierarchy Data Loading

    3/15

    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 toupload the data from flat file in BI 7.0? This article gives the reader a step by step process for thedevelopment of hierarchy. But unfortunately, the BI 7.0 doesnt support the flat file upload directly, so it isrequired 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 InfoObjectmaintenance level, go to the tap Hierarchy tick the indicator with hierarchies for the InfoObject. TheHierarchy 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

  • 7/29/2019 Hierarchy Data Loading

    4/15

    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 individualevaluation 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

  • 7/29/2019 Hierarchy Data Loading

    5/15

    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 thesame 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 specificInfoObject 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 sourcesystem.

    Transfer Structure Maintenance

    After the Source system assignment the system will automatically take to the Transfer StructureMaintenance. The system automatically generates DataSources for the InfoObject and there can be threetypes based on the object.

    Attributes Texts

    Hierarchies

  • 7/29/2019 Hierarchy Data Loading

    6/15

    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 systemautomatically generates a proposal for the DataSource and the Transfer Structure

  • 7/29/2019 Hierarchy Data Loading

    7/15

    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_NODEcharacteristic). The system automatically generates a table with the following hierarchy format for sortedhierarchies without removed leaf values and node InfoObject

    Depending on which settings you have defined in the InfoObject maintenance, the system transfers thesettings 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-dependentoption in the InfoObject maintenance.

  • 7/29/2019 Hierarchy Data Loading

    8/15

    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 InfoPackageand find below the detailed settings at InfoPackage.

    Create the InfoPackage

    There can be two types of files for InfoPacakge:

    ASCII File (CR Separator)

  • 7/29/2019 Hierarchy Data Loading

    9/15

    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 nideshould 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

  • 7/29/2019 Hierarchy Data Loading

    10/15

    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

  • 7/29/2019 Hierarchy Data Loading

    11/15

    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.

  • 7/29/2019 Hierarchy Data Loading

    12/15

    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 bedisplayed as below:

    Hierarchy Data Structure in Table

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

  • 7/29/2019 Hierarchy Data Loading

    13/15

    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 tocreate the hierarchy in different systems manually. For example our client was maintaining this BPC relatedhierarchy manually in Development system, Quality System for testing and during cutover in Productionsystem. If the data is large then it takes lot of time of the consultant to maintain the same.

  • 7/29/2019 Hierarchy Data Loading

    14/15

    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 theEnterprise Data Warehousing

    http://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edw
  • 7/29/2019 Hierarchy Data Loading

    15/15

    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

    Disclaimer and Liability Notice

    This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is notsupported 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 orcode sample, including any liability resulting from incompatibility between the content within this document and the materials andservices offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of thisdocument.