In this post we will see how to load a hierarchy from SAP standard datasource using new ODP framework for datasources.
In BW4HAHA, you can use DTP and transformation to load hierarchies like normal data.
Data can be loaded via datasource and distributed to several hierarchy tables.
You can also use infosource in between source and target.
Open ODS Views and aDSOs can serve as source of data to populate infoobject hierarchy tables.
In your ECC system, make sure that SAP note 2232584 is applied and you can use the program BS_ANLY_DS_RELEASE_ODP
This program is used to enable the datasource for use with ODP.
Another prerequisite is an ODP source system exists which connects your ECC system to BW system.
The profit center hierarchy is taken as example.
It includes all the profit centers for a particular controlling area.
There is only one standard hierarchy at any given point in time but customers can have as many other alternative hierarchies as needed.
In ECC, you can use transaction KCH3 to view the profit center hierarchy-
Step 1: Activate hieararchy datasource in transaction RSA6
In your ECC system, go to transaction RSA6 and expand the sub tree
Search for profit center
Select the hierarchy datasource for profit center by double clicking on it-
Click on select subtree-
Choose Activate Datasources from the menu item-
Now go to SE38 in your ECC system and run the program BS_ANLY_DS_RELEASE_ODP to make this datasource ODP enabled.
Check this datasource in RSA3 once whether it is fetching data or not-
Now login to your BW system (in HANA studio, go to BW modeling perspective and login to your project). Go to Datasources – > ODP datasources -> right click and select replicate
Note: It is recommended to replicate only your relevant datasource instead of all
Deselect other datasources.
After replication, you can see datasource in BW. The unique feature is that these data sources are divided into segments which corresponds to each table that will store hierarchy in BW4HANA
Go to the application component to see the datasource, double click on it and activate
Go to fields tab to see the segments-
There are five segments, 1 and 3 being mandatory-
- Hierarchy name
- Hierarchy text
- Hierarchy nodes
- Node texts
Create a transformation to load hierarchy to infoObject.
Note that transformations also also broken down into segments.
Go to each tab to map each segment objects
System proposes automatic mappings-
Activate your transformation
If the source is hierarchy type datasource, there are special options available in DTP Update tab-
DTP can be used to merge hierarchy from multiple sources. Also, hierarchy name can be changed during the load process.
After loading hierarchy, you can store it as subtree provided that hierarchy already exists under specified technical name in BW4HANA system and this target hierarchy contains root nodes of the subtree hierarchy that you want to load.
You use subtree hierarchies for example to combine hierarchies from various source systems into single hierarchy tree in BW4HANA.
Thus, the target hierarchy will look like one root node under which different hierarchies are added as nodes.
If you use option ‘Update subtree’, you get target hierarchy with only recently loaded subtree.
This is because all the nodes under the interface node are deleted before the new subtree is added.
The subtree related options should not be considered like delta. There is no delta
for hierarchies (there is not that much data). Subtree option is like a small tree within a tree “full load”.
You can see the loaded hierarchy in transaction RSH1 in BW4HANA system.
or you can also go to hierarchy maintenance in HANA studio from infoobject maintenance screen-
Now you can use this hierarchies in reports. Also, in analysis for office, a hierarchy can be added to display independent of SAP BW query settings.
Refer to SAP HELP documentation for more complex scenarios in hierarchies and options for loading.
After practicing the content of this post you will be able to:
- Load hierarchy from SAP ECC using a standard datasource