Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

In this document, we will see

  • Load hierarchies in BW 7.3 using this Generic data source and hierarchy transformation

How to create a custom hierarchy and generic hierarchy data source are described in the below documents.

http://scn.sap.com/docs/DOC-27510

http://scn.sap.com/docs/DOC-30686

Once the data source is replicated and activated in BW system, we will see all segments in the data source, similar to a standard hierarchy data source.

Lets assume that intervals are also permitted in the hierarchy.

These are the hierarchy tab settings of master data ZCOMPCODE.

Now, right click on the ZCOMPCODE hierarchy to create transformation.

Choose the data source and source system.

Once the transformation is created, we can see the mappings between source and target segments, and we can access segments as below.

Segments:

Hierarchy header

By default, hierarchy name and object id from source are mapped to the corresponding fields in the target.

If the hierarchy is version dependent, the source field VERSION has to be mapped.

If the hierarchy is time-dependent, DATEFROM and DATETO have to be mapped. And the corresponding target fields will appear only if these version dependency and time dependency settings are checked in the info object hierarchy tab properties shown above.

Hierarchy Description

The above mapping for hierarchy description ensures, texts for the hierarchy header are loaded.

Hierarchy Structure

All the fields other than ZCOMPCODE will be mapped automatically.

The field ZCOMPCODE has to be mapped from NODENAME with 'Hierarchy Split' assignment.

This is because, the source field NODENAME can contain text nodes like CC1, CC2, CC3 (in our example) and it will also contain company code values 1000, 1001, 1003 etc. And only the company code values should be mapped to the field ZCOMPCODE. The rule type 'Hierarchy Split' ensures this split between Nodes and the values, and transfers the values to ZCOMPCODE.

Also, We need to add a routine for mapping 0H_IOBJNM from IOBJNM. 

This is needed because, from the source the info object comes as 'BUKRS', but this info object is not a valid info object. And the corresponding field in BW is ZCOMPCODE in our case.

So the below routine has to be included.

Texts for Text Node

This mapping is also automatic, this ensures texts for the hierarchy nodes are filled.

To Value of Interval

For intervals, We need to map LEAFTO to ZCOMPCODE and add a code in the start routine of the transformation.

This is the code generated by system, but by default commented. We need to uncomment this.

This code ensures that the intervals are splits from Segment 5 and added as single values to Segment 3. And the values are stored in LEAFTO.

But after loading the hierarchy, intervals are visible, not the individual values.

Texts for Hierarchy Level

This segment loads texts to the hierarchy levels. I didn't use it, and left it unmapped.

Now we are done with mappings of segments. Activate the transformation and create a full DTP and activate.

Create an info package for the data source and choose the custom hierarchy that we wanted to load.

Now Execute the IP and DTP. You can see the hierarchy is loaded to ZCOMPCODE and appears as below.

Include the IP and DTP in a process chain.

Any changes to the hierarchy can be done in ECC using GS02, and corresponding changes will be reflected in BW hierarchy.

This concludes the topics of

  

  • Create a custom hierarchy in R/3
  • Create a Generic Hierarchy data source for the hierarchy created above in R/3
  • Load hierarchies in BW 7.3 using this Generic data source and hierarchy transformation

I hope this helps.

Until next time!!!!

Bindu Priya Chaluvadi

8 Comments
Labels in this area