Sei sulla pagina 1di 3

www.biportal.

org

rp-TXTMD = <txt>-TXTMD.
rp-TXTLG = <txt>-TXTLG.
ENDIF.
INSERT rp INTO TABLE RESULT_PACKAGE.
ENDLOOP.

* assign parent node ids


LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
READ TABLE t_bp ASSIGNING <bp>
WITH TABLE KEY BPARTNER2 = <RESULT_FIELDS>-nodename(10)
CDM_CSEG = <RESULT_FIELDS>-nodename+11(10).
IF sy-subrc = 0.
CONCATENATE <bp>-BPARTNER1 '.' <bp>-CDM_CSEG INTO nname.
READ TABLE RESULT_PACKAGE ASSIGNING <rp>
WITH KEY NODENAME = nname.
IF sy-subrc = 0.
<RESULT_FIELDS>-PARENTID = <rp>-NODEID.
ENDIF.
ENDIF.
ENDLOOP.

SORT RESULT_PACKAGE BY NODEID NODENAME ASCENDING.


DELETE ADJACENT DUPLICATES FROM RESULT_PACKAGE COMPARING NODEID.

5. Set up Transformation and Load Hierarchy


In this transformation we have to connect the new infoobject ZBPSHIE with the flat file datasource
that contains input data for the hierarchy.

Hierarchy Description mapping

Hierarchy Structure: Credit Segment should be extracted from the Nodename field by skipping first
10 digits assigned to the BP code and a dot (RESULT = SOURCE_FIELDS_3-NODENAME+11(10).)

4
www.biportal.org

Texts for text nodes.

In the corresponding infopackage specify source File path and name based on the Open Hub file
destination configured earlier.

6. Set up Transformation and Load Text


Text load for the infoobject ZBPSHIE should be based on the same source file and the following field
mapping:

5
www.biportal.org

7. Test results

Here is the generated hierarchy populated in the infoobject ZBPSHIE. This infoobject will be used in
the reports and related infoproviders where the hierarchical view on Business Partner relationships
is required.

Potrebbero piacerti anche