Extract R/3 Hierarchies Directly into BW

  • by Christian Harrington, Business Intelligence Consultant, Harrington Informatique
  • September 1, 2005
Business Content extractors do not support all hierarchies in the R/3 source system, such as Treasury Cash Management, so there is no standard DataSource to link these hierarchies to BW. Learn a workaround to this problem by creating an empty DataSource to extract an existing hierarchy from R/3 and load it directly into BW.
Key Concept
The user exit EXIT_SAPLRSAP_004 in the R/3 source system allows you to enhance your hierarchy DataSources. It is a flexible way to manipulate the data and gives you the opportunity to meet complex requirements.

Say you want to extract an existing hierarchy from an SAP R/3 system and load it into BW so you can present your reports in a hierarchical way. For example, by loading a cost center hierarchy into BW, you could show expenses at the top node and then drill down to the lower nodes to see the details.

Although standard Business Content extractors support main hierarchies (e.g., cost center, general ledger [G/L] account, material, plant, work center), they do not support all hierarchies in the R/3 source system, such as Treasury Cash Management. In this case, SAP does not provide a standard DataSource to link R/3 hierarchies to BW.

So what are your options? In my example of working in Treasury Cash Management, you could define hierarchies for planning levels and create your own ABAP program to extract the data from R/3, send it to a flat file, then upload the flat file into BW via a custom DataSource, a multistep process. This is what I call the “traditional” method.

I developed a workaround that allows you to bypass the step of creating a flat file and extract directly from R/3 in a single step, like any Business Content DataSource. My workaround combines two different standard SAP mechanisms: the generation of a hierarchy DataSource on the R/3 IMG side and the user exit EXIT_SAPLRSAP_004 on the R/3 side. I tested this workaround with BW 3.5 and plug-in (PI) 2004-1, but it also works with BW 2.0B with PI 2002-1 and later.

In the steps that follow, I will show you how to create an empty hierarchy DataSource and populate it by using EXIT_SAPLRSAP_004. You then can link this DataSource in BW to the InfoSource belonging to the Info-Object like any other DataSource. When BW receives the data, the DataSource created with this workaround does not differ from a standard SAP DataSource. Table 1 shows the difference between my workaround and the traditional method.

Christian Harrington

Christian Harrington is an independent SAP NetWeaver BI consultant. He has worked with BI tools since 2000, helping large companies implement data warehouses. He has 13 years of experience in IT and has worked as a developer, functional analyst, business analyst, and architect. You may contact him in English or French.

See more by this author


Comments

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.