Quantcast
Channel: SCN : Document List - SAP Business Warehouse
Viewing all articles
Browse latest Browse all 1574

Hierarchy Loads using Transformation ( Ver BW 7.3 onwards )

$
0
0


Hierarchy Loads using Transformation from Version BW 7.3 onwards.


Here I am trying to load hierarchies from one object to another Info provider specific object in BW 7.4

 

Flow.JPG

 

 

 

 

 

 

 

 

 

 

I have covered below 2 scenarios in the below example :


Scenario 1 : If the Source Object has NO External Hierarchy object.

Scenario 2 : If the Source Object has an External Hierarchy object.

 

Scenario 1 : If the Source Object has NO External Hierarchy object.


Source Info object : Y_ACC

Target Info Object : Z_ACC


LOOP AT SOURCE_PACKAGE_3 ASSIGNING <SOURCE_FIELDS_3>.
if <SOURCE_FIELDS_3>-H_IOBJNM <> '0HIER_NODE'.
<SOURCE_FIELDS_3>
-H_IOBJNM =’Z_ACC'.
endif.
ENDLOOP.

 

Note : SOURCE_FIELDS_3 represents segement 3 ( Hierarchy Structure )

Z_ACC.JPG


Provide the Application component and InfoArea name where you need this Characteristics to be displayed as Infoprovider.

 

Once the characteristic is defined as info provider specific you can see the same object in the Info provider under the specified Info area ( under Infoprovider ) and Application component ( under infosources )

GDRS Account.JPG

In the above screen shot we have attributes, Hierarchies and Texts because we have enabled them in the infoobject Properties under Master Data/Texts tab ( with Master Data and With Text ) and in the Hierarchy tab ( With Hierarchy )

Now we connect Target object with Source object using Transformation.

Right click on the Hierarchy Target Object ( Z_ACC ) and select Create Transformation from the context menu as specified below :


Z_ACC_create Transformation.JPG

Z_ACC_create Transformation2.JPG

Any Hierarchy has the following segments 5 Segments :

 

  1. 1.  Hierarchy Header
  2. 2.  Hierarchy Description
  3. 3.  Hierarchy Structure
  4. 4.  Texts for Text Node
  5. 5.  Texts for Hierarchy Level


Target Segments.JPG

Under each segment the mapping between Source and Target is Direct assignment. Please check the below screen shots for the mapping under each segement.


 

1.  Hierarchy Header

Hierarchy Header.JPG 

2.  Hierarchy Description


Hierarchy Description.JPG


3.  Hierarchy Structure


Hierarchy Structure.JPG


4.  Texts for Text Node


Texts for Text Node.JPG


5.  Texts for Hierarchy Level


Texts for Hierarchy level.JPG

Scenario 2 : If the Source Object has an External Hierarchy object.


Note : Y_SET is an external object for Source Object Y_AUD.

            Z_SET is an external object for Target Object Z_AUD.


Steps are same as specified above except in the start routine you need to also map external BW Target Object to Source Object. 

Please check below for the Start routine code and also the screen shot of source and Target Objects.


The Start routine code is as follows :


LOOP AT SOURCE_PACKAGE_3 ASSIGNING <SOURCE_FIELDS_3>.
if <SOURCE_FIELDS_3>-H_IOBJNM EQ 'Y_AUD'.
<SOURCE_FIELDS_3>-H_IOBJNM ='Z_AUD'.
else.
if <SOURCE_FIELDS_3>-H_IOBJNM EQ 'Y_SET'.
<SOURCE_FIELDS_3>-H_IOBJNM ='Z_SET'.
endif.
endif.
ENDLOOP.

Display Transformation.JPG


In my next document I will update the details of how to upload hierarchies from DSO which has Node id and Parent id.



Viewing all articles
Browse latest Browse all 1574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>