SAP Business Warehouse_hierarchies.pdf
Transcript of SAP Business Warehouse_hierarchies.pdf
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 1/12
SAP Business Warehouse
Previous postNext post
Currently Being Moderated
BW 7.30: Hierarchy loading becomes easier with the help of new framework
Posted by Lalitha Swaroop Krishna Tangudu in SAP Business Warehouse on Jan 8, 2012 7:00:33 AM
inShare0
Hello SCN,
This blog explains the benefits and process of loading hierarchies with transformations and DTP,
using new framework in BW 7.30
In our example, we will take the below structure of hierarchy to load as shown in the below figure.
Structure of Hierarchy:
In the above figure, we can see the hierarchy levels.
Root Node: DCR (0HIER_NODE)
Level 1: Components (info object = ZCOMP)
Level 2: Parts (info object = ZPARTS)
Step 1:
Create Hierarchy file:
Create the following file in excel and save it as .CSV file.
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 2/12
Step 2:
Now we have to create info objects required for our hierarchy loading i.e. ZCOMP and ZPARTS
Creation of Info Objects:
1) ZCOMP:
You can see screenshots of different tabs I have maintained in the info object maintenance screens
of ZCOMP & ZPARTS.
General Tab:
2) ZPARTS:
General Tab:
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 3/12
Step 3:
Adding ZCOMP as External Characteristic:
Since we are loading the hierarchy to info object ZPART, which involves the usage of ZCOMP in its
hierarchy structure, we should add ZCOMP as a external characteristic to ZPARTS as shown below:
Step 4:
Creating Hierarchy Data source and Assigning Source System:
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 4/12
We will discuss about different tabs present in Hierarchy Data Source:
1) Extraction Tab:
We can load the hierarchy using Adapter, where we specify the location of our file name.
We choose Data Format as “Hierarchy Separated by Separator “as we are using CSV file.
If we use “Hierarchy is Flexible” then data source is created using “New Structure” we have to
mention Target Info Object name to which we load the Hierarchy, if we uncheck , the data source is
created in “Old Structure”
Creating Header:
We can now Create Header from this screen using “Create Header”. We create a Header named as
“Custom Hierarchy”.
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 5/12
2) File Structure:
This shows the format of file which we are loading. We can use “Create Example File” if we want to
change the format of the file.
3) Segment/ Fields:
Hierarchies are usually loaded in multiple segments. You can find the segments below:
Hierarchy Header
Hierarchy Description
Hierarchy Structure
Description for text
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 6/12
Hierarchy Header:
Hierarchy Structure:
5) Preview:
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 7/12
Here we can see the preview of our data load after activation of Data source.
Step 5:
Create an IP to load the data till PSA.
Step 6:
Create Transformation:
As we can use transformations, we can now use all the functionalities like Start Routine, End Routine,
Expert Routine and all the in-built formulas when we load hierarchy. This helps us to load hierarchies
not only info objects but also to data targets like DSOs and Info cubes.
Data source using PSA or Idoc as transfer method can use transformations to load. To load 3.x
hierarchies, migrate data source from 3.x to 7.3 using migration tool, which creates a PSA table thatcan be used to load hierarchies using transformations.
We have to select Source Segments and Target Segments and do the necessary mappings.
Segment/Hierarchy Header:
We set the Info Object 0H_NORESTNO (Display Assigned Nodes Only) to 'X' using a constant. This
ensures that non-assigned are not saved in the hierarchy SID table and do not have to be loaded into
memory at runtime. We set it as shown in the below figure.
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 8/12
Hierarchy Structure:
Using Rule Type: Derive Hierarchy Characteristic:
If we are using IDOC format and we have FIELDNM, to get Info object names at run time we use rule
type “Derive Hierarchy Characteristic”. But in our case we need not use this rule as we are using
“New Structure”.
Using Rule Type: Hierarchy Split:
If the target info object is compounded, then we have to use this rule type to split the information
according to the info object.
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 9/12
Example:
In our Example:
We do 1:1 mapping for Node ID, Info Object Name and Parent Node. As this is new data source
structure (PSA format) , we have to map Node Name to Link, Name of text Node, ZPARTS(target info
object ) and ZCOMP(external characteristic).
Activate Transformations:
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 10/12
Step 6:
Create a DTP and Load to the Target.
Extraction Tab:
We use “FULL” mode and Check “Only retrieve last request”
Update Tab:
We use “Full Update” and “Activate Hierarchy” to automatically activate the hierarchy loaded.
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 11/12
Execute DTP:
Hierarchy Loaded:
Step 7:
Display Hierarchy:
8/10/2019 SAP Business Warehouse_hierarchies.pdf
http://slidepdf.com/reader/full/sap-business-warehousehierarchiespdf 12/12
Hence we can see the hierarchy we loaded just now.