Hierarchy Upload from Flat files
1 Introduction Definition: A hierarchy is a method of displaying a characteristic structured and grouped according to individual evaluation criteria. Structure: a) Nodes A hierarchy is created from nodes. The uppermost node is the root. b) Roots A hierarchy can have several roots. They do not have superior nodes. c) Hierarchy Levels All nodes on the same level of the hierarchy (nodes that are the same distance away from the root) form a hierarchy level. The roots of a hierarchy form level 1. The level of a node denotes the distance from the node to the root. d) 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. e) Basic Characteristic Hierarchies can be created only for those characteristics that do not reference other characteristics. Properties : A BW hierarchy has the following properties: • Hierarchies are created for basic characteristics • 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 all Info Cubes. • You can define several hierarchies for a single characteristic. • A hierarchy can have a maximum of 98 levels. 2 Uploading Hierarchy From Flat File In the following example , Hierarchy is based on info object ‘Sales Representative’. In addition characteristics ‘Region’ and ‘Country’ are included in the hierarchy. Basic characteristic in this hierarchy is ‘Sales Representative’ and External characteristics are ‘Region’ and ‘Country’.
2.1 Create Info-objects a) Create 3 info objects ‘Sales Region’ (ZSREGION), ‘Sales Country’ (ZSCONTRY)and ‘Sales Representative’ (ZSREP). b) For ‘Sales Representative’ characteristic Tick the check box With Hierarchies and select Hierarchy not time-dependent radio button.
c) Include the external characteristics ‘Sales Region’ and ‘Sales Country ‘ in the Hierarchy. And activate the info object ‘Sales Representative’.
2.2 Creating Info Source. a) Create Info source with direct update for info object ‘Sales Representative’ (ZSREP).
b) Assign flat file source system to the info source ZSREP. c) Activate the transfer Rules .
d) Click on Hier. Structure Push button
e) Give a Name and description to the Hierarchy and press continue .
f) The structure in the screen represents the structure of the flat file . Field sequence of the flat file should be exactly same as that in the screen below.
2.3 Creating Flat File for Upload a) Number the nodes in the hierarchy.
b)Create the flat file based on above hierarchy structure and the node numbers.
2.4 Uploading the Hierarchy Data into BW a) Create Info Package for Hierarchy Upload. Select the Hierarchy to be uploaded and also the Full Update button as we are uploading the entire Hierarchy. b) There are three update methods for uploading the hierarchy. Full Update : For Uploading the entire hierarchy structure Insert Subtree: For appending the hierarchy with new nodes. Update Subtree : For modifying the nodes of the hierarchy.
c) Select the CSV file to be uploaded and schedule the upload. d) Display the loaded Hierarchy .
2.5 Uploading Time Dependent Hierarchy a) For making the hierarchy time dependent select the ‘Time-Dependent Hierarchy structure’ radio button and activate the info object ZSREP
b) In the transfer structure there will be 2 more additional fields date from and date to for the time dependent nodes.
c) Consider that Sales Representative ‘SREP2’ was in England up to 31/12/1995 and moved to USA from 01/01/1996 .
d) Flat file structure for the above hierarchy is shown below . It contains two extra columns Date-to and Date-from.
e) In the info-package Update tab , select Fixed Time interval radio button and give start date as 01/01/1000 and End date as 31/12/9999 so that all nodes are uploaded.
f) Upload the hierarchy data from flat-file to BW.
g) Display the loaded hierarchy. 



















Congrats for first blog.
Hey all,
You can use book on SAP BW by Fu-Fu and for more simpler solution.
Cheers!!!!!!!!!
This topic has often been discussed in many forums and there is nothing new in this weblog. I think there should a minimal standard for any content to be qualified as a blog. If such "basic" things were to be qualified as blog then we would see many more blogs ranging from "creating info-objects" to "creating cubes", etc... I hope the Weblog moderators take some action on this trend.
Let me make it clear I intend no harm to Prakash's contribution. I am just worried at the quality and the trend of such weblogs.
Regards
Dinesh
Nice web log.
I found this web log very useful as you have explained nicely (with step step by instructions)about how to create a Hierarchy and load it.
I think BW is very vast and what seems to be trivial for some, could be very difficult for others to grasp. Hence I always welcome these type of weblogs.
Regards
Velayutham Augustheesan
Very nice web log.
Even though it may be considered a basic topic to some, your detailed step by step instructions may save others precious time.
It was very useful to me!
Best regards,
André Garcia
Nice web log 🙂
What do i have to modify to load the data instead of the flat file from a r/3 table?
Regards
Alexander
This WebLog is really useful, it provides basic information . its very helpful for bw beginners.
THanks
Varun
This is an excellent documeent.
Thx for your time
Regards
Pushkara
Just went through your hierarchy blog. It is quite useful and easy to understand. Incase you have few more blogs kindly mail me to sunitha.sap@gmail.com.
Thanks.
Regards,
Sunitha.R
It' s really excellent. I appreciate for you time. Very useful information
Mano
I appreciate ur time & concern veryy good blog keep it up
Manjula
The document is very good.
I would like to know the pros and cons of maintaining hierarchy in source system and in BI system.
how do we decide if the hierarchy should be maintained in R/3 or in Bi system ?
Can you please provide your feedback /views.
my email is pvdevaraj257@yahoo.com
It’s really very nice and I appreciate it.
Thanks
Sathis
Thanks a lot
Mahesh
Would you by any chance have instructions on uploading hierarchies where a node can have multiple parent nodes? The idea is to 'Link' the duplicate nodes to the parent node.
Thanks!
this is Madhu.The material whatever u have sent is very helpful.Once again Thank u very much.
Bye
Madhu
Thanks.
Good work
Any one who is starting their career in BW need to check this out....
struggled for while but finally made..
thanks for ur help...
cheers
GVS
Thanks
I appreciate this blog
Excellent document and it is self explanatory for loading the hierarchies.Good..
Meera
If you find a solution to this problem, please add it to your blog.
This is very useful for me because of am new of SDN and also new of SAP BW. nice document to upload the hierarchy from flat file.
Regards,
Srikar
Keep up the good work...
rgds,
nash