Directly Populate User-Defined Hierarchies

  • by Michael Shtulaizen, SAP NetWeaver Technical Manager, Strauss Group Ltd., Israel
  • March 1, 2007
You can create your own hierarchies for custom InfoObjects and populate them to meet unique business requirements. This requires only one extraction, transformation, and loading step.
Key Concept

A directly populating hierarchy is possible from a DataSource of the hierarchy type only. There is no standard mechanism for creating such sources. R/3 allows you to create user-defined hierarchies based on one data element. You can use a hierarchy DataSource as a basis for direct populating. This is limited to R/3 source systems and allows populating single InfoObject hierarchies only.

Recently, I had to generate a hierarchy based on three custom InfoObjects: Flank, Department, and Production_Machine loaded from non-SAP DataSources (Oracle tables) through DB Connect. The hierarchy relation (parent-child) between them was presented as an attribute of the child InfoObject. The Department (child) InfoObject contains Flank (parent) as an attribute, and the Pro-duction_Machine (child) InfoObject contains Department (parent) as an attribute.

I had two options. Using the standard method, I could generate a flat file reflecting the hierarchy content (ABAP program) and load hierarchy from it, or enhance a workaround for directly populating non-business content R/3 single-object hierarchies. I chose the second option because of the disadvantages of loading flat files (two- step process, difficult to synchronize, poor accessibility). Both of these options require the same development efforts.

The proposed method generates a hierarchy DataSource and populates it in BW. This allows populating a hierarchy for every InfoObject from different information sources in one extraction, transformation, and loading (ETL) step.

You might also use my technique when a merged company results in two independent SAP R/3 systems. In this situation, BW plays the role of an integration platform. You might integrate two business content hierarchies (organizational units, for instance) from the separate SAP R/3 systems into one mixed hierarchy.

My solution is based on the user exit EXIT_SAPLRSAP_004, which you implement in BW. This method works for BW 3.x and SAP NetWeaver 2004s. It requires basic ABAP coding knowledge. In SAP NetWeaver 2004s, expect some minor changes related to navigational routines. For example, you can generate a hierarchy DataSource from the InfoObject tree instead of the InfoSource tree (in BW 3.x).

Michael Shtulaizen

Michael Shtulaizen is the SAP NetWeaver technical manager of Strauss Group Ltd., Israel. He has been working with SAP BW since 2002. He has rich development experience in SAP environments (more than 10 years) that allows him to propose original solutions in SAP NetWeaver BW systems.

See more by this author


No comments have been submitted on this article. 

Please log in to post a comment.

To learn more about subscription access to premium content, click here.