Skip to Content

Applies to:

SAP BW 7.3

Summary

This paper gives a clear picture about how to load hierarchies from a flat file using the transformation and DTP in BW 7.3. Through this document we have tried to explain the steps involved in this process.

Author(s):    Ravi Madasu and Kameswari Akella

Company:    Deloitte Consulting

Created on: 18 March 2012

Author Bio

Ravi Madasu is a Senior Consultant in Deloitte with overall 10 years of experience in SAP BW/BI.

Kameswari Akella currently works at Deloitte Consulting on SAP BI/BW.

Introduction

With SAP Netweaver BW 7.3, we are given a flexibility to load the hierarchies from flat file by creating transformations, InfoPackages and DTP’s. This paper explains the step by step procedure to load the plant hierarchy data, which is available in a Flat File, to ‘ZPLANT’ infoobject.

Prerequisites

·      In the InfoObject Maintenance transaction, you have set the flag for the hierarchy basic characteristic “with Hierarchies” and have defined the hierarchy’s properties.

/wp-content/uploads/2012/03/i1_81933.png

·      You have assigned an InfoArea to the characteristic in the InfoObject maintenance. The hierarchy becomes an InfoProvider.

Scenario

We want to load the plant hierarchy data to ZPLANT infoobject. The flat file, which has the plant hierarchy data, is given below.

/wp-content/uploads/2012/03/i2_81934.png

Steps:

Step 1: Create Flat File Source System

Create a Flat File Source System ‘ZFILE’

/wp-content/uploads/2012/03/i3_81959.png

Step 2: DataSource Creation

Create a 7.X DataSource ‘ZPLANT_HIER’ and select the Data Type Datasource as ‘Hierarchies’

/wp-content/uploads/2012/03/i4_81960.png

Give Short, Medium, Long descriptions in the General Info tab. The screenshot is given below:

/wp-content/uploads/2012/03/i5_81961.png

In Extraction tab, give the path of the file and data separator as ‘,’ as this is a CSV file. Also, give target infoobject as ‘ZPLANT’ as we are loading hierarchies for Plant infoobject.

/wp-content/uploads/2012/03/i6_81962.png

Next, click on create header.

/wp-content/uploads/2012/03/i7_81963.png

Fill in the Hierarchy Name and Description as shown below:

/wp-content/uploads/2012/03/i8_81964.png

Now, save the hierarchy.

In the File Structure tab, we can see the structure of the file to be created. The CSV file, whose screenshot is given above, has been created using this structure.

/wp-content/uploads/2012/03/i9_81969.png

In Segments/Fields, we can see the different segments. Hierarchy Header is the primary segment. The screenshot of ‘Hierarchy Header’ is given below:

/wp-content/uploads/2012/03/i10_81970.png

The screenshot of ‘Hierarchy Description’ segment is given below:

/wp-content/uploads/2012/03/i11_81974.png

The screenshot of ‘Hierarchy Structure’ is given below:

/wp-content/uploads/2012/03/i12_81975.png

The screenshot of ‘Descriptions for Text’ is given below:

/wp-content/uploads/2012/03/i13_81976.png

Now, Preview the data. The screenshot is given below:

/wp-content/uploads/2012/03/i14_81977.png

Step 3: Create Transformation

Select the Object Type as ‘InfoObject’ and subtype as ‘Hierarchies’

/wp-content/uploads/2012/03/i15_81978.png

Mention the target as ‘ZPLANT’ as shown in the below screenshot:

/wp-content/uploads/2012/03/i16_81979.png

The transformation screenshot for ‘Hierarchy Header’ is given below:

/wp-content/uploads/2012/03/i17_81983.png

The transformation screenshot for ‘Hierarchy Description’ is given below:

/wp-content/uploads/2012/03/i18_81984.png

The transformation screenshot for ‘Hierarchy Structure’ is given below:

/wp-content/uploads/2012/03/i19_81985.png

Here, make sure that you map ‘NODENAME’ field to ‘ZPLANT’ infoobject .If you are maintaining data for any other external characteristics in the flat file ,then make sure that you map ‘NODENAME’ to them as well.

The transformation screenshot for ‘Descriptions for Text Nodes’ is given below:

/wp-content/uploads/2012/03/i20_82785.png

Step 4: Create a Data Transfer Process (DTP)

Select the Subtype of Object as ‘Hierarchies’. The Screenshot is given below:

/wp-content/uploads/2012/03/i21_82786.png

Make sure ’Activate Hierarchy’ checkbox is selected.

/wp-content/uploads/2012/03/i22_82853.png

Step 5: Create InfoPackage

Give InfoPackage Description as shown below and click on save.

/wp-content/uploads/2012/03/i23_82854.png

Just recheck the settings in Extraction. The screenshot is given below:

/wp-content/uploads/2012/03/i24_82855.png

Select the Plant Hierarchy in the Hierarchy Selection tab. The screenshot is given below:

/wp-content/uploads/2012/03/i25_82857.png

Results

Execute the InfoPackage by clicking on ‘Start’ button.

/wp-content/uploads/2012/03/i27_82858.png

Data is loaded successfully to PSA.

The PSA maintenance screen for ‘Hierarchy Structure’ segment is given below.

/wp-content/uploads/2012/03/i28_82859.png

/wp-content/uploads/2012/03/i29_82860.png

Now,execute the DTP.

/wp-content/uploads/2012/03/i30_82861.png

Now, click on ‘Maintain Hierarchies’ to see the hierarchy that is loaded.

/wp-content/uploads/2012/03/i31_82862.png

The following screen appears:

/wp-content/uploads/2012/03/i32_82863.png

Click on ‘Plant Hierarchy’. The screenshot is given below:

/wp-content/uploads/2012/03/i33_82864.png

The hierarchy is loaded successfully and stored in BI system.

Related Content

SAP Help Portal

SAP Community Network

SAP Support Portal

To report this post you need to login first.

16 Comments

You must be Logged on to comment or reply to a post.

  1. Thomaskutty Mathew

    Hi Ravi and Kameswari,

    I was following this documentation to load product hierarchy for material and I am getting a dump. data loaded to PSA properly and from PSA to the info object, getting a short dump and it says “

    Could not generate the data object; the type  does not exist”  

    any idea about this?   offcourse your documentation is really good, that is the reason, i was follwoing it

    Thanks

    Tom

    (0) 
    1. Somanath BSG

      Hi Mathew,

      I know this was a long back post, but i had a similar dump what you got on that time can you please clear my doubt  how to solve it , “when creating the hierarchy of  an object account i am getting a dump bellow was screen shots of st22 t-code.

      (0) 
  2. Raman Korrapati

    Hi Kameswari & Ravi,

    Its good presentation along with screens, easy to understand. its great efforts from you both. Thanks for sharing.

    Thanks

    RK

    (0) 
    1. Somanath BSG

      Hi Ramanjaneyulu Korrapati,


      when creating the hierarchy of  an object account i am getting a dump as bellow screen shots of st22 t-code, can you please help me how to solve this


      (0) 
  3. Tejas Tamhane

    Indeed a helpful document. 🙂

    This gives a brief idea on hierarchies. Could you let me know a basic steps to create an infoobject that uses the hierarchy created so that I could create a BEx query on top of it?

    Regards,

    Tejas

    (0) 
  4. Antony Jerald J

    Hello,

    Thanks for sharing with us…Really useful…

    Can you help me to load hierarchies without using flat file upload?  In our requirement, we have to automate the upload process by loading from the source system directly for 7.3 BW.  Please help me if you found any document regarding the same…

    Regards,

    Antony Jerald.

    (0) 
  5. Laveda Toney

    Nice explanation on the steps to load a standard hierarchy.  I am currently trying to load a flat file hierarchy with the property “Hierarchy is Sorted” checked.  The structure is fine, loads to PSA successfully but the job just hangs when executing the DTP no error messages, no short dump, nothing.  Any suggestions?  I have a parentid, childid and nextid in the input file./wp-content/uploads/2015/08/hier_764936.jpg

    Regards,

    Lisa

    (0) 

Leave a Reply