You can load hierarchy files with the DataSource with object type R3TR RSDS. The hierarchy file has the same structure as 3.x hierarchy files for loading with PSA. The hierarchy file is a flat file, meaning that every row has the same structure. The DataSource is segmented though and has up to five structures. It therefore has multiple PSA tables for hierarchy header, header texts, hierarchy nodes, node texts and intervals. The properties of the loaded hierarchy determine which segments are available and which fields a segment contains. You set the format of the file in the DataSource Maintenance transaction. To simplify working with complex file structures, you can create example files for the current DataSource layout.
When creating a DataSource in the Data Warehousing Workbench (transaction RSA1), you elected data type Hierarchies for source syste type File and are now in the DataSource Maintenance transaction.
Make the hierarchy-specific settings on the Extraction tab page:
In the Data Format field, select either Hierarchy Fixed Length or Hierarchy Separated by Separator. These corresond to the standard CSV (separated by separators) and ASCII (fixed length) parsers.
If you have selected Hierarchy Separated by Separator, enter a sign for the data separator and an escape sign too.
If you want to define the nodes of a hierarchy with a sequence, choose Hierarchy is sorted.
The file structure then contains the CHILDID and NEXTID fields. Every node has a child note (CHILDID) assigned to it. This node also has successor nodes that are positioned on a level (NEXTID).
If you choose Hierarchy is flexible, the values for the leaves in the hiearchy will not be delivered by a combination of the INFOOBJECT and NODENAME fields. They will be delivered by additional fields added at the end of the file structure instead. The additional flexible fields are defined by specifying the target InfoObject (see step 4). If the characteristic that you specify here and that the hierarchy is loaded for is compounded with other characteristics, the fields from the compounded characteristics will also be added as flexible fields.
You can use this option load characteristic values whose node name length corresponds to the maximum length for characteristics (currently 60).
The option corresponds to the Resolve Leaf Values and Node InfoObjects flag that you can set for 3.x DataSources in the InfoPackage Maintenance transaction when creating the hierarchy index.
You can copy over the hierarchy properties from the InfoObject that you are loading the hierarchy data for. Enter the name of the InfoObject in the Target InfoObject field and press Read InfoObject Properties. The following fields are filled in accordance with the properties defined in the InfoObject:
Intervals Permitted in Hierarchy
Reverse +/- Sign for Node
Hierarchy structure is time-dependent/ Entire hierarchy is time-dependent/ Hierarchy is not time-dependent
If you load a flexible hierarchy, you need to specify an InfoObject, as the flexible fields will be read by the InfoObject (see step 3). No new fields can be added to the DataSource field list for hierarchy DataSources.
Press Create Header to create a hierarchy header. You need this before loading, as the file does not fill the hierarchy header and header text segments.
In the dialog for creating the hierarchy header, enter a hierarchy name, a description and - if required - a hierarchy version. If the entire hierarchy is time-dependent, the Valid to and Valid from fields are input-ready.
By pressing Delete Header, you can delete existing hierarchy headers.
You can also find the pushbuttons for creating and deleting hierarchy headers on the Extraction tab page in the InfoPackage. On the Hierarchy Selection tab page in the InfoPackage, select a hierarchy header to load. The hierarchy header is read during runtime and its data is added to the relevant DataSource segments.
The File Structure tab page shows the proposed structure of the hierarchy file based on the hierarchy settings that you made on the Extraction tab page.
To show what a file with this structure will look like, you can create an example file. This file is a very simple hierarchy with just one root node, two subnodes and a leaf for each subnode. It does contain all properties defined for the hierarchy though, for example whether the hierarchy nodes are time-dependent or are intervals.
The Segment/Fields tab page displays the segments in the DataSource.
The fields from the file are distributed to two or three segments, depending on whether the hierarchy contains intervals or not. Two further segments contain the fields from the hierarchy header and the hierarchy heade text.
You can change the segment descriptions here.
To check which information from the file is distributed to which segments, you can load the example file on the Preview tab page.
To do this, select the segment that you want to load and press Read Preview Data.
As you cannot select a specific hierarchy header in the preview, the two header segments remain empty.