Skip to Content

Introduction

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.

Compounded

objects

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

!http://dl.dropbox.com/u/11677676/1.png|alt=|src=http://dl.dropbox.com/u/11677676/1.png!

 

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.* *

Transformation

IF <source_fields_3>-h_nodeid EQ 1.

<source_fields_3-h_iobjnm = ‘0H_HIERNODE’.

ELSE.

<source_fields_3-h_iobjnm = ‘0CUSTOMER’.

ENDIF.

ENDLOOP.

<br />

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

 

Make
following mapping in the hierarchy header:

OBJECTID to
OBJECTID

HIENM to 0H_HIENM

 

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:

!http://dl.dropbox.com/u/11677676/2.png|alt=|src=http://dl.dropbox.com/u/11677676/2.png!

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:

 

+RESULT

= SOURCE_FIELDS_3-nodename8 (10).

<br />

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

Result

!http://dl.dropbox.com/u/11677676/3.png|height=161|alt=|width=497|src=http://dl.dropbox.com/u/11677676/3.png!

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

Some

caution

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
mapping.

 

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

To report this post you need to login first.

3 Comments

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

Leave a Reply