Sie sind auf Seite 1von 6

Structure of a Flat Hierarchy File for Loading Using

a PSA
Prerequisites

You have created a sorted hierarchy and the system generates a structure with the
following hierarchy format. The hierarchy basis characteristic has n node attributes, is
compounded m times, and has additional node characteristics that contain additional
fields with compounding l:

Description Field Name Length Type


Node ID NODEID 8 NUMC
InfoObject name INFOOBJECT 30 CHAR
Node name NODENAME 32 CHAR
Catalog ID LINK 1 CHAR
Parent 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 - TXTMD 40 CHAR
medium
Description- long TXTLG 60 CHAR
<Node attribute 1>
...
<Node attribute n>
<Node field 1 >*
...
<Node field m >*
<Node field m+1 >
...
<Node field m+1>
<To field 1>* TO-**
... TO-**
<To field m>* TO-**
• 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.

• The rows marked red are only automatically generated if you have permitted
additional node attributes.

• The rows marked red* are only automatically generated if you have set the Expand
Leaf Values and Node InfoObjects indicator in the maintenance of the hierarchy
header in the InfoSource maintenance. The to- fields are inserted with the same name
as the from- fields, but in their own sub-structure (TO-**).

Choosing the Expand Leaf Values and Node InfoObjects pushbutton displays the
hierarchy structure. For additional details about this function, also refer to the Hierarchy
Maintenance section of Uploading Hierarchies from Flat Files.

Process

You can find out how you need to fill the fields in the section Process in Structure of a
Flat Hierarchy File for Loading Using an IDoc.

Result

You have created a flat file with a hierarchy, which you must save as a CSV or ASCII
file. You can then upload it into the BW using the PSA.

Structuring a Simple Hierarchy File - Example:

Without expanded leaf values and node InfoObjects:


With expanded leaf values and node InfoObjects:

Here the columns controlling area (CO_AREA) and cost element (COSTELMNT), as
well as interval controlling area (CO_AREA) and interval cost element (COSTELMNT)
are added.

The files displayed above would correspond to the following hierarchy:

This hierarchy of cost elements has the following properties:

• It has 0COSTELMNT as a hierarchy basic characteristic, which is compounded to


0CO_AREA. That is why both characteristics have to be included in the file. For
expanded leaf values and node InfoObjects both characteristics have to be included twice
for intervals: An interval is assigned to the USA node, which includes the cost element
20-25. The file needs the fields 0CO_AREA and 0COSTELMNT twice for the interval,
for both the from- and to- value. The interval description is made up from a combination
of the specifications for these two characteristics: 0002 for 0CO_AREA and 0000000020
for 0COSTELMNT.

• The controlling area (0CO_AREA) has to be maintained as an external characteristic


for the cost element InfoObject (0COSTELMNT).
• The hierarchy is a sorted hierarchy.

• This node also has the node attribute sign change, meaning that the cost element can
be displayed as a negative in the query. For this reason, an X is uploaded for this node
representing the sign change (SIGNCH)

See also:

Special Features when Loading via the PSA

Special Features when Loading using the PSA


Use

When loading hierarchies using the PSA transfer method, a much more flexible option is
at your disposal for processing hierarchies in comparison with the Idoc transfer method.

Prerequisites

A hierarchy DataSource from a SAP source system must support loading by using a PSA.

Functions

Error treatment

By storing hierarchies in PSA tables, the system allows you to make manual corrections
when errors arise.

The system generates up to 5 PSA tables for a hierarchy DataSource. These tables contain
the following hierarchy segments:

• Hierarchy header

• Texts for hierarchy header

• Hierarchy node

• Node texts

• Intervals
You only need the interval segment when the DataSource supports intervals in hierarchies
and this is indicated in InfoObject maintenance.

If you are editing the hierarchy in the PSA, you can select a hierarchy segment in the
selection dialog. The system displays each segment individually in a table.

Flexible attributes for the hierarchy header and hierarchy node

• Attributes for the hierarchy header are settings that are valid for the display and
processing of the entire hierarchy in the query. You can find additional information in the
table Functions for Displaying and Processing Hierarchies in a BEx Query under
Functions of Hierarchy Processing.

• Attributes for hierarchy nodes are hierarchy attributes that are selected for the
hierarchy basic characteristic in InfoObject maintenance and which are valid for all
hierarchies for this characteristic. See Hierarchy Properties and Tab Page: Hierarchy.

Checking permitted node characteristics

When transferring hierarchies via the RFC, the system checks for which characteristics
characteristic values with hierarchy nodes are allowed to be identified. The permitted
InfoObjects must be selected via External Characteristics in Hierarchies.

• If no InfoObject is selected, only text nodes (for the artificial characteristic) are
allowed as inner nodes.

• All selected InfoObjects are included together with the characteristics compounded to
them in the communication structure for hierarchy nodes.

Communication structure and transfer rules for hierarchies

If a hierarchy structure is loaded via the transfer method PSA, you can then define the
transfer rules. The result is the same flexible transformation options as is the case for
transaction data, attributes and texts, excluding the fact that it is not possible to create a
start routine.

In the InfoSource maintenance, there are the following views of the transfer rules:

• View for the hierarchy header segment

• View for the hierarchy node segment

For the hierarchy header, you can set the properties of the hierarchy header and the
properties of the file structure via Hierarchy Structure.
In the following example, the field KOKRS is assigned to the field Controlling Area
(0CO_AREA) and the field KOSTL is assigned to the field Cost Center
(0COSTCENTER) using the transfer rules. The alpha conversion routine is executed for
KOKRS. The node has the hierarchy property Reversing the Sign (0SIGNCH). This is
also uploaded. As InfoObject 0COSTCENTER is compounded to InfoObject
0CO_AREA, the characteristic values in NODENAME are saved added to one another.

See also:

Structure of a Flat Hierarchy File for Loading Using a PSA

Das könnte Ihnen auch gefallen