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!
Showing results for 
Search instead for 
Did you mean: 
Former Member

Applies to: SAP ECC 6.0, SAP BI 7.3.

Author: Atul Vardhan Sarraf

Company: Accenture Services Pvt. Ltd.

Created on: 15th October 2013

Author Bio:  Atul is an Associate Software Engineer in Accenture Services Private Limited. He has been involved in SAP BW Implementation Projects.


As a standard, business content extractors support only main ECC hierarchies (e.g., cost center, general ledger [G/L] account, material, plant), but they do not support all hierarchies in the SAP ECC source system. Those hierarchies can be maintained via other methods as well, one of them is using “Set Name and Set Leaf” in ECC.

Configure the Extractor in ECC

The following steps illustrate how the above mentioned workaround can be utilized. These steps include creating a Hierarchy, generating the Datasource, and populating the Datasource with data from the table (In the current e.g. SKA1).

Step 1: Transaction GS01

While any set name can be entered, we need to provide the Table name along with the Field name based on which we want to create the Set hierarchies in source system. Set type as basic set, and then press enter.

In the pop-up window, select field name as SAKNR (as we are creating Set Hierarchy for GL account from table SKA1 (field/tables can be selected as per business requirement or for which you want to create a custom hierarchy)), press enter, and then click on the save icon.

Once the Setname is created, we can further create the Setnames under the Header Hierarchy (header setname) or directly assign the leafs to this setname. Here, we created another Setname under header Setname of (GCOA_*******)

Under the Second Setname, we created the Lead nodes (Set Line Items) as shown below:

Here you can create further Set names or Set Line Items as required depending upon the business requirement. The final Hierarchy should look similar to one shown below.

Step 2: Transaction BW07 to generate the Datasource for Custom Set hierarchies

Enter SKA1 in the table for set field and SAKNR (key field) in the field name. Because the hierarchy is being loaded to the compounded Info Object 0GL_ACCOUNT in BW, the Datasource must be created by providing the data element for compounding which is KTOPL in this example. Enter the Datasource name or you can also allow the system to generate the Datasource name. In this example, a custom name Z****** is entered for the Datasource (refer the Figure below).  Then generate the Datasource by executing F8.

To ensure that a Datasource is generated correctly, use the Datasource browser (transaction code RSA6) to display it. As shown below, Z***** is found via menu path SAP-R/3>*.

All the Datasources that will be created by the above mentioned method will be saved under the folder FI-SL-IO.

Step 3: ABAP code in the user exit EXIT_SAPLRSAP_004 for Compounding Values

Note:  If you don’t have any requirement for compounding InfoObject in BW, this step can be skipped. Please proceed to next Step in that case Else...

This coding allows the user to populate the Datasource created in step 2 with Compounding characteristic value. If this exit is not active, transaction CMOD can be used to make it active using standard Enhancement Process defined by SAP.

To access the user exit to enter the ABAP code, go into transaction SE38 and enter ZXRSAU04 in the Program field.

Or First Create a Project in CMOD transaction to activate the above program.

Click on the Create button to create Project and then click on Components and select SAPLRSAP_0004:

In user exit ZXRSRU04 (we need to code as below)

IF i_datasource = <Datasource_name>   "<--- Your DataSource
AND i_s_hiebas-hclass = '0000'.       "Hierarchy class of FI-SL-Sets

* Add compound value to hierarchy leaves
LOOP AT c_t_hienode WHERE iobjnm <> '0HIER_NODE'.
* Shift nodename right to get space for compound characteristic
SHIFT c_t_hienode-nodename RIGHT BY 4 PLACES.
* Put chart of accounts into first 4 places
c_t_hienode-nodename(4) = <COMPOUNDING_VALUE>.    "<-- Your compound value
MODIFY c_t_hienode.

* Add compound value to intervals in the same fashion if there is an interval defined for Hierarchy in BW.
LOOP AT c_t_hieintv.
SHIFT c_t_hieintv-leaffrom RIGHT BY 4 PLACES.
c_t_hieintv-leaffrom(4) = <COMPOUNDING_VALUE>. "<-- Your compound value
SHIFT c_t_hieintv-leafto RIGHT BY 4 PLACES.
c_t_hieintv-leafto(4) = <COMPOUNDING_VALUE>"<-- Your compound value
MODIFY c_t_hieintv.


c_t_hienode3[] = c_t_hienode[].
c_t_hieintv3[] = c_t_hieintv[].


Configuring the Extractor in BW

Upon finishing the extractor on the ECC side, the BW portion will need to be configured to load the hierarchy into a BW Info Object. This section explains how to replicate the created Datasource in the BW7.3 and create transformation to map it to the Info Object where the hierarchy is assigned. The section then illustrates how to select the hierarchy, and load it into the BW, where the hierarchy will then be available for reporting.

Step 1: Prepare the Info Object to accept data from the Datasource

In BW, go to Administrator Workbench via RSA1 and find the desired Info Object; in this case, 0GL_ACCOUNT. On the Hierarchy tab, make sure the check box with hierarchies is selected. The Info Object 0GL_ACCOUNT is ready to hold the data coming from the Datasource.

Step 2: Replicate the Datasource in SAP BI

Click on source systems in the RSA1 transaction. Find the desired source system in the pane on the right side, right-click on it, and select Datasource Overview from the pop-up menu.

All Datasources generated from the BW07 transaction in ECC fall under the Master Data Financial Accounting: Special Purpose Ledger node. Right-click on Master Data Financial Accounting: Special Purpose Ledger to perform Replicate Datasources. Z****** appears under Data Financial Accounting: Special Purpose Ledger after the replication is complete.

Step 3: Selection of hierarchy and uploading data

The Datasource Z****** is now available under the ECC source system where the Datasource was created.

After creating infopackage, in infopackage on Hierarchy Selection tab, select the hierarchy GCOA_*******.

Select the Schedule tab and click on the Start button to load the hierarchy from the source system. Like any other Datasource, the load with the monitor icon can be checked.


Right click on the G/L Account Hierarchy to create Transformations.

Once the Transformations are created, we can see the mappings between the source and target, via various Source 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.

Header Texts:

All the Fields are mapped automatically between source and target.

Hierarchy Nodes:

All the fields except OH_IOBJNM, 0CHRT_ACCOUNT and 0GL_ACCOUNT are mapped automatically.

The field OH_IOBJNM is mapped with IOBJNM via Routine.

The Routine is as follows:


The field 0CHRT_ACCOUNT is mapped with IOBJNM and NODENAME via Routine.

The Routine is as Follows:


The field 0GL_ACCOUNT is mapped with IOBJNM and NODENAME via Routine.

The Routine is as Follows:


Node Texts:

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

Now, as we are done with the mappings, activate and save it and create a DTP.

Once the load is successful, the GCOA hierarchy can be viewed from transaction RSH1 by double-clicking on it from the list. The icon depicting a tree can also be clicked in the toolbar of the monitor to display the hierarchy once the load is completed. The result is shown below:

The hierarchy shown above depicts the ECC side. Now, the GCOA hierarchy can be included in any reports using the Info Object 0GL_ACCOUNT. The description of the nodes will not be present on the hierarchy. To load them, another text Datasource must be added and loaded into 0GL_ACCOUNT. This is because the texts are stored into a different table.

Labels in this area