Loading Hierarchies from Flat File using the new DataSource and Transformation Technology
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.
· 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.
Steps:
Step 1: Create Flat File Source System
Create a Flat File Source System ‘ZFILE’
Step 2: DataSource Creation
Create a 7.X DataSource ‘ZPLANT_HIER’ and select the Data Type Datasource as ‘Hierarchies’
Give Short, Medium, Long descriptions in the General Info tab. The screenshot is given below:
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.
Next, click on create header.
Fill in the Hierarchy Name and Description as shown below:
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.
In Segments/Fields, we can see the different segments. Hierarchy Header is the primary segment. The screenshot of ‘Hierarchy Header’ is given below:
The screenshot of ‘Hierarchy Description’ segment is given below:
The screenshot of ‘Hierarchy Structure’ is given below:
The screenshot of ‘Descriptions for Text’ is given below:
Now, Preview the data. The screenshot is given below:
Step 3: Create Transformation
Select the Object Type as ‘InfoObject’ and subtype as ‘Hierarchies’
Mention the target as ‘ZPLANT’ as shown in the below screenshot:
The transformation screenshot for ‘Hierarchy Header’ is given below:
The transformation screenshot for ‘Hierarchy Description’ is given below:
The transformation screenshot for ‘Hierarchy Structure’ is given below:
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:
Step 4: Create a Data Transfer Process (DTP)
Select the Subtype of Object as ‘Hierarchies’. The Screenshot is given below:
Make sure ’Activate Hierarchy’ checkbox is selected.
Step 5: Create InfoPackage
Give InfoPackage Description as shown below and click on save.
Just recheck the settings in Extraction. The screenshot is given below:
Select the Plant Hierarchy in the Hierarchy Selection tab. The screenshot is given below:
Results
Execute the InfoPackage by clicking on ‘Start’ button.
Data is loaded successfully to PSA.
The PSA maintenance screen for ‘Hierarchy Structure’ segment is given below.
Now,execute the DTP.
Now, click on ‘Maintain Hierarchies’ to see the hierarchy that is loaded.
The following screen appears:
Click on ‘Plant Hierarchy’. The screenshot is given below:
The hierarchy is loaded successfully and stored in BI system.
Related Content
Thanks Ravi & Kameswari, its really valuable information and showcased the highlighted feature of SAP BW 7.3
thanks guys for this useful information, clearly documented. well done.
cheers,
John
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
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.
Hi Ravi and Kameswari,
Your article is very useful congrats for the publication and all the best
Thanks
Kiran
Hi Kameswari & Ravi,
Its good presentation along with screens, easy to understand. its great efforts from you both. Thanks for sharing.
Thanks
RK
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
Hi Ravi & Kameswari,
It is good artical.....
Thanks,
venkat
Hello Techies,
Thanks alot for this article.
Thanks,
Imran
Helpful document , keep it up.
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
Hi Akella,
Thanks for the document. I have tried the same but facing an issue while loading.
kindly let me know how to resolve this issue. http://scn.sap.com/thread/3625033
Good one and thanks for sharing 🙂
Hi Akella,
please explain how you assigned 0(parentid) to world 1 to asia , 9 to germany etc .
please am new to bw
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.
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.
Regards,
Lisa