Extract multi-valued fields

Appropriate configuration of the relevant table element in the table configuration enables all different values of a field to be extracted (fieldtoread) to be written to a system event. A separate class must be used to do this.

Example

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE jdbc_tableconfiguration SYSTEM

'jdbc_tableconfiguration.dtd'>

<jdbc_tableconfiguration>

<configuration name="MULTIPLE_VALUES">

<docspec>

<docreftable name="...">

...

</docreftable>

<doctable name="...">

...

</doctable>

</docspec>

<table name="VBEP" classtouse="com.idsscheer.ppm.

xmlextractortools.extractor.jdbc2ppm.

ZTableMultipleValues_jdbc2ppm">

<pkfield name="VBELN" fktablename="VBAP"

fkfieldname="VBELN"/>

<pkfield name="POSNR" fktablename="VBAP"

fkfieldname="POSNR"/>

<fieldtoread name="WMENG"/>

<fieldtoread name="EDATU"/>

</table>

<table name="VBAK" classtouse="com.idsscheer.ppm.

xmlextractortools.extractor.jdbc2ppm.

ZTableMultipleValues_jdbc2ppm">

<pkfield name="VBELN" fktablename="VBEP"

fkfieldname="VBELE"/>

<fieldtoread name="VBTYP"/>

</table>

</configuration>

</jdbc_tableconfiguration>

In the example configuration, using the com.idsscheer.ppm.xmlextractortools.extractor.jdbc2ppm.
ZTableMultipleValues_jdbc2ppm class for all data tables (table elements) specifies that all fields to be extracted (fieldtoread elements) are extracted with multiple values if multiple values exist for a field in the source system database. In the XML output file, the extracted field with multiple values appears as an attribute with the same name in a system event:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE eventlist SYSTEM "event.dtd">

<eventlist>

<event>

<attribute type="VBAP-POSNR">000010</attribute>

<attribute type="VBAP-VBELN">0000004969</attribute>

<attribute type="VBEP-EDATU">19970103</attribute>

<attribute type="VBEP-EDATU">19970107</attribute>

<attribute type="VBEP-WMENG">138.000</attribute>

<attribute type="VBEP-WMENG">317.000</attribute>

<attribute type="VBEP-WMENG">496.000</attribute>

</event>

</eventlist>