Start of Content Area

Process documentationStructure of a Flat Hierarchy File for Loading via IDoc  Locate the document in its SAP Library structure

Prerequisites

You have created a sorted hierarchy and the system generates a structure with the following hierarchy format:

 

Description

Field name

Length

Type

Node ID

NODEID

8

NUMC

Name of the basic characteristic of the hierarchy

INFOOBJECT

30

CHAR

Node name

NODENAME

32

CHAR

Catalog ID

LINK

1

CHAR

Higher-level node

PARENTID

8

NUMC

First subnode

CHILDID(*)

8

NUMC

Next adjacent node

NEXTID(*)

8

NUMC

 

DATETO*

8

CHAR

 

DATEFROM*

8

CHAR

 

LEAFTO*

32

CHAR

 

LEAFFROM*

32

CHAR

Language key

LANGU

1

CHAR

Description - short

TXTSH

20

CHAR

Description - medium

TXTMD

40

CHAR

Description- long

TXTLG

60

CHAR

·         The rows marked in green (*) are only generated automatically if a sorted hierarchy is being used.

·         The rows marked blue* are only automatically generated if you have created an InfoObject with a time-dependent hierarchy and/or intervals.

Process Flow

The following table shows which data you should upload from the flat file.

 

NODEID

NUMC 8

Specify the internal ID of the hierarchy node.

INFOOBJECT

CHAR 30

In the row INFOOBJECT, specify the name of the basic characteristic to which the hierarchy should be assigned. The master data for this characteristic is then used. Alternatively, you can include a text node.

Text nodes are always based on InfoObject 0HIERNODE.

Example 

You can use text nodes if you need country or city names for the evaluation criteria of a hierarchy.

NODENAME

CHAR 32

For master data, enter the key of the master data table. Enter any name you choose for text nodes.

LINK

CHAR 1

With ‘normal’ nodes, leave the field empty.

If the node is a link node that is, if the node is a lower-level node with two higher-level nodes, create two rows for the InfoObject. Then create a row and leave the field LINK empty. In the second row, create the InfoObject as the lower-level of the second higher-level node with a new NODEID, but give it the same NODENAME. Also enter an ‘X’ in the LINK column.

If you enter the ‘X’, a link exists between this node and the second node by the same name. This means that the node has the same subtree as the second node. If you change the structure of the second node, the structure of the link node also changes.

PARENTID

NUMC 8

Enter the NODEID for the first higher-level node. Enter, “00000000“ if there is no higher-level node.

CHILDID

NUMC 8

Enter the NODEID for the first lower-level node. Enter, “00000000“ if there is no lower-level node.

NEXTID

NUMC 8

Enter the NODEID for the first ‘next node’. Enter, “00000000“ if there is no ‘next node’.

DATETO

CHAR 8

Valid–to nodes (are needed if the hierarchy structure is time-dependent).

DATEFROM

CHAR 8

Valid–to nodes (are needed if the hierarchy structure is time-dependent).

LEAFTO*

CHAR 32

Upper limit of a hierarchy interval (needed if the hierarchy contains intervals).

LEAFFROM*

CHAR 32

Upper limit of a hierarchy interval (needed if the hierarchy contains intervals).

LANGU

CHAR 8

Enter the language ID (is required for text nodes) For example, F for French, E for English, and so on.

TXTSH

CHAR 8

Enter a short text. This is needed for text nodes, as no texts can be loaded for these nodes.

TXTMD

CHAR 32

Enter a medium text. This is needed for text nodes, as no texts can be loaded for these nodes.

TXTLG

CHAR 32

Enter a long text. This is needed for text nodes, as no texts can be loaded for these nodes.

 

 

Result

You have created a flat file with a hierarchy, which you can save as a CSV or ASCII file and upload into the BW as an IDoc.

 

Structuring a Simple Hierarchy File - Example:

 

NODEID

INFOOBJECT

NODENAME

LINK

PARENTID

CHILDID

NEXTID

LANGU

TXTSH

00000001

0HIER_NODE

EA

 

 

00000002

 

D

World

00000002

MTCONT

EU

 

00000001

 

00000003

 

 

00000003

MTCONT

AS

 

00000001

 

00000004

 

 

00000004

MTCONT

AF

 

00000001

 

00000005

 

 

00000005

0HIER_NODE

US

 

00000001

00000006

00000008

 

 

00000006

MTCONT

NA

 

00000005

 

00000007

 

 

00000007

MTCONT

SA

 

00000005

 

 

 

 

00000008

MTCONT

AA

 

00000001

 

 

 

 

 

The file displayed above would correspond to the following hierarchy:

This graphic is explained in the accompanying text

 

The names of the characteristic nodes (yellow triangles) are taken from the master data text table. The names of the text nodes (folders) are taken from the hierarchy table above. In this example, only the name ‘World’ was entered in the hierarchy table. This is why the NODENAME ‘US’ is displayed for the second text node.

 

End of Content Area