The data extracted by the relevant PPM process extractor is to be written to the XML output file in the special import format for one, two or multi-level dimensions. XML output files in this format can be imported into PPM using the rundimdata.bat command line program (see PPM Data import technical reference).
To extract data correctly, the relevant process extractor requires a mapping file that assigns the keys (and any descriptions) for the individual dimension levels to the correct extracted field values. This XML configuration file has the following structure:
...
<dimdatamapping>
<dimension name="...">
<dimcolmapping>
<datacol name="..."/>
<keyspec key="..."/>
</dimcolmapping>
...
</dimension>
</dimdatamapping>
...
XML element |
XML attribute |
Description |
---|---|---|
dimdatamapping |
|
Root element of mapping definition. Contains a list of PPM dimensions to be configured. |
dimension |
name |
Identifier of the PPM dimension (corresponds to the value of the name XML |
dimcolmapping |
|
Groups configuration elements for a data column. |
datacol |
name |
Name of the data column, in which the dimension values are saved. |
|
format |
Format string for transformation of the data value for use in the PPM system |
keyspec |
key |
Name of the key for the extracted key-value assignments |
|
desckey |
Name of the key for the extracted key-description assignments |
value |
|
Specification of a constant dimension value |
Example
The following key-value pairs are the expected result of the extraction in the XML output file in PPM system event format:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE eventlist SYSTEM "event.dtd">
<eventlist>
<event>
<attribute type="MAT1_ID-MATNR">1000</attribute>
<attribute type="MAT1_DESC-HTEXT">Motor44</attribute>
<attribute type="MAT2_ID-MTART">32</attribute>
<attribute type="MAT2_DESC-MTBEZ">Components</attribute>
</event>
<event>
<attribute type="MAT1_ID-MATNR">1001</attribute>
<attribute type="MAT1_DESC-HTEXT">Wrench77</attribute>
<attribute type="MAT2_ID-MTART">45</attribute>
<attribute type="MAT2_DESC-MTBEZ">Tools</attribute>
</event>
<event>
<attribute type="MAT1_ID-MATNR">1002</attribute>
<attribute type="MAT1_DESC-HTEXT">Pump43</attribute>
<attribute type="MAT2_ID-MTART">33</attribute>
<attribute type="MAT2_DESC-MTBEZ">Trade goods</attribute>
</event>
</eventlist>
The mapping file below transfers the key-value pairs into the PPM-compatible XML format for importing dimension values:
...
<dimdatamapping>
<dimension name="MATERIAL">
<dimcolmapping>
<datacol name="LEVEL1_ID"/>
<keyspec key="MAT1_ID-MATNR"/>
</dimcolmapping>
<dimcolmapping>
<datacol name="LEVEL1_DESC"/>
<keyspec key="MAT1_DESC-HTEXT"/>
</dimcolmapping>
<dimcolmapping>
<datacol name="LEVEL2_ID"/>
<keyspec key="MAT2_ID-MTART"/>
</dimcolmapping>
<dimcolmapping>
<datacol name="LEVEL2_DESC"
<keyspec key="MAT2_DESC-MTBEZ"/>
</dimcolmapping>
</dimension>
</dimdatamapping>
The names of the data columns for a PPM dimension level are fixed (LEVEL1_ID, LEVEL1_DESC, LEVEL2_ID, LEVEL2_DESC, etc.) and must not be changed.
The table below illustrates the assignment of the data columns to the keys and descriptions of the individual dimension levels:
dimdata configuration |
Dimension configuration |
---|---|
LEVEL1_ID |
Identifier of first dimension level |
LEVEL1_DESC |
Description of first dimension level |
LEVEL2_ID |
Identifier of second dimension level |
LEVEL2_DESC |
Description of second dimension level |
LEVELn_ID |
ID of the n-th dimension level |
LEVELn_DESC |
Description of the n-th dimension level |
The XML output file generated in DIMDATA format has the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dimdata SYSTEM "dimdata.dtd">
<dimdata>
<dim name="MATERIAL">
<datacols>
<datacol name="LEVEL1_ID"/>
<datacol name="LEVEL1_DESC"/>
<datacol name="LEVEL2_ID"/>
<datacol name="LEVEL2_DESC"/>
</datacols>
<datarow>
<value>1001</value>
<value>Motor44</value>
<value>32</value>
<value>Components</value>
</datarow>
<datarow>
<value>1002</value>
<value>Wrench77</value>
<value>45</value>
<value>Tools</value>
</datarow>
<datarow>
<value>1003</value>
<value>Pump43</value>
<value>33</value>
<value>Trade goods</value>
</datarow>
</dim>