The com.idsscheer.ppm.xmlextractortools.extractor.
jdbc2ppm.ZTableConcatFKs_jdbc2ppm class can be used when extracting data from an JDBC system to generate new system event attributes by concatenating the values of attributes already extracted. The new system events created can be referenced in other data table configurations (table XML element).
Example
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xmlextractor_tableconfiguration SYSTEM
'xmlextractor_tableconfiguration.dtd'>
<xmlextractor_tableconfiguration>
<configuration name="SD">
<docspec>
<doctable name="RBKP">
<condition logicaloperator="eq" fieldname="GJAHR">
<value>2005</value>
</condition>
<pkfield name="BELNR"/>
<pkfield name="GJAHR"/>
</doctable>
</docspec>
<table name="RBKP_NEW" classtouse="com.idsscheer.ppm.
xmlextractortools.extractor.
jdbc2ppm.ZTableConcatFKs_jdbc2ppm">
<pkfield name="BELNR" fktablename="RBKP"
fkfieldname="BELNR"/>
<pkfield name="GJAHR" fktablename="RBKP"
fkfieldname="GJAHR"/>
<fieldtoread name="AWKEY_GENERATED"/>
</table>
</configuration>
</xmlextractor_tableconfiguration>
If you are using the ZTableConcatFKs_jdbc2ppm class, you must specify exactly one fieldtoread element. The element contains the name of the system event attribute to be created. In the example, a new system event attribute with the name RBKP_NEW-AWKEY_GENERATED is created. The value of the attribute consists of the values of the pkfield elements specified.
The normal fkpart, prefix and postfix operations can be used for the pkfield elements.
A system event created with the above configuration could look like this:
...
<event>
<attribute type="RBKP-BELNR">5105601204</attribute>
<attribute type="RBKP-GJAHR">2005</attribute>
<attribute type="RBKP_NEW-AWKEY_GENERATED">51056012042005
</attribute>
</event>
...
The new attribute – RBKP_NEWER-AWKEY_GENERATED – can then be referenced in other table configurations in the same way as every other JDBC table field.
Example
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xmlextractor_tableconfiguration SYSTEM
'xmlextractor_tableconfiguration.dtd'>
<xmlextractor_tableconfiguration>
<configuration name="SD">
<docspec>
<doctable name="RBKP">
<condition logicaloperator="eq" fieldname="GJAHR">
<value>2005</value>
</condition>
<pkfield name="BELNR"/>
<pkfield name="GJAHR"/>
</doctable>
</docspec>
<table name="RBKP_NEW" classtouse="com.idsscheer.
ppm.xmlextractortools.extractor.
jdbc2ppm.ZTableConcatFKs_jdbc2ppm">
<pkfield name="BELNR" fktablename="RBKP"
fkfieldname="BELNR"/>
<pkfield name="GJAHR" fktablename="RBKP"
fkfieldname="GJAHR"/>
<fieldtoread name="AWKEY_GENERATED"/>
</table>
<table name="BKPF">
<pkfield name="AWKEY" fktablename="RBKP_NEW"
fkfieldname="AWKEY_GENERATED"/>
<fieldtoread name="BELNR"/>
</table>
</configuration>
</xmlextractor_tableconfiguration>
A system event created with this configuration could look like this:
...
<event>
<attribute type="RBKP-BELNR">5105601204</attribute>
<attribute type="RBKP-GJAHR">2005</attribute>
<attribute type="RBKP_NEW-AWKEY_GENERATED"
>51056012042005</attribute>
<attribute type="BKPF-BELNR">5100004691</attribute>
</event>
...