Skip to Content

SAP BW 7.3 Hierarchy Framework – a real-life example


So what do
you when your client asks you to activate the customer hierarchy in reporting?
Simple your say, you deep dive into ECC, look for the 0CUSTOMER hierarchy DataSource
and activate. You do a quick RSA3 check and receive….no data.


Your day just
became a little more interesting. After some
investigation you find out your client did not implement “Classification” and therefore has no hierarchy on 0CUSTOMER. They do however have a hierarchy on the logistical view of the customer. As 0CUSTOMER is
part of your data model you decide not to introduce 0CUST_SALES, but instead
load it to your 0CUSTOMER object.


So how do you
load a hierarchy from the 0CUST_SALES to your 0CUSTOMER object? SDN supplies
the answer:

The new SAP NetWeaver BW 7.30 hierarchy framework


Well party.
I have to load from an object with multiple compounds (the logistical view
ones) to an object without compounds. That means I have to do some more steps
to make this happen.

h2. Migrating
your DataSource

In order
use the new hierarchy framework you need to migrate your DataSource to a 7.x
version. Before migrating them, you must first implement note 1313068 in you
ECC system as this will enable PSA usage.



Looking at
your hierarchy on 0CUST_SALES you can see the compounded objects in the nodes.



The node “000010002000000120” is the compounded key.
Representing Division “00”, Distribution Channel “00”, Sales Organization
“1000” and Customer “2000000027”. As our
0CUSTOMER object does not have all these compounds, you will have to remove
them in your transformation.* *


IF <source_fields_3>-h_nodeid EQ 1.

<source_fields_3-h_iobjnm = ‘0H_HIERNODE’.


<source_fields_3-h_iobjnm = ‘0CUSTOMER’.



<br />

Note that
NodeID “1” is always the top node and must be set to 0H_HIERNODE.


following mapping in the hierarchy header:




And in the header texts do a simple 1:1 mapping
from source to target fields.


In the hierarchy nodes there is a little more
logic required:


As you can see in the above we need to create a
small routine to get rid of the compounded objects. We can do that in this
example by taking the last 10 positions:



= SOURCE_FIELDS_3-nodename8 (10).

<br />

Finally the node texts again is a simple straight
forward 1:1 mapping.



And success! We have successfully loaded the
0CUST_SALES hierarchy to our 0CUSTOMER object.



Ofcourse compounded objects are there for a reason.
In my example my hierarchy was unique per sales organisation and therefore I
did not run into problems with different mappings per sales organisation. When
this is different be sure to filter on only those objects which hold a unique


The examples above can ofcourse be used with
different objects. Be sure however to keep the limitations in the back of your

You must be Logged on to comment or reply to a post.