When extracting from a JDBC database you have the option of creating additional system events based on a system event table.
At the source system level, a 1:n relationship may exist that cannot be resolved when determining the system events. Use the class com.idsscheer.ppm.xmlextractortools.extractor.jdbc2ppm.ZTableMultiplyEvents_jdbc2ppm to create multiple system events from a system event and thus resolve the 1:n relationship.
Example
<configuration name="MultiplyEvents">
<docspec>
<doctable name="VBAK" tablename="VBAK">
<condition fieldname="VBELN" logicaloperator="in">
<value>0000006662</value>
<value>0000006741</value>
</condition>
<pkfield name="VBELN" />
</doctable>
</docspec>
<table name="VBAP" classtouse="com.idsscheer.ppm.xmlextractortools.extractor.jdbc2ppm.ZTableMultiplyEvents_jdbc2ppm">
<pkfield name="VBELN" fktablename="VBAK" fkfieldname="VBELN"/>
<fieldtoread name="POSNR"/>
<fieldtoread name="MATNR"/>
</table>
<table name="MAKT">
<condition fieldname="SPRAS" logicaloperator="eq">
<value>de</value>
</condition>
<pkfield name="MATNR" fktablename="VBAP" fkfieldname="MATNR"/>
<fieldtoread name="MAKTX"/>
</table>
</configuration>
This is the associated system event output file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE eventlist SYSTEM "event.dtd">
<eventlist>
<event>
<attribute type="VBAK-VBELN">0000006662</attribute>
</event>
<event>
<attribute type="MAKT-MAKTX">Flatscreen MS 1460 P</attribute>
<attribute type="VBAK-VBELN">0000006741</attribute>
<attribute type="VBAP-MATNR">M-06</attribute>
<attribute type="VBAP-POSNR">000010</attribute>
</event>
<event>
<attribute type="MAKT-MAKTX">Flatscreen MS 1775P</attribute>
<attribute type="VBAK-VBELN">0000006741</attribute>
<attribute type="VBAP-MATNR">M-10</attribute>
<attribute type="VBAP-POSNR">000020</attribute>
</event>
<event>
<attribute type="MAKT-MAKTX">MAG PA/DX 175</attribute>
<attribute type="VBAK-VBELN">0000006741</attribute>
<attribute type="VBAP-MATNR">M-14</attribute>
<attribute type="VBAP-POSNR">000030</attribute>
</event>
<event>
<attribute type="MAKT-MAKTX">Jotachi SN4500</attribute>
<attribute type="VBAK-VBELN">0000006741</attribute>
<attribute type="VBAP-MATNR">M-18</attribute>
<attribute type="VBAP-POSNR">000040</attribute>
</event>
</eventlist>
The following example (excluding the class described) explains the procedure during extraction:
<configuration name="MultiplyEvents_Doctable_Only">
<docspec>
<doctable name="VBAK" tablename="VBAK">
<condition fieldname="VBELN" logicaloperator="in">
<value>0000006662</value>
<value>0000006741</value>
</condition>
<pkfield name="VBELN" />
</doctable>
</docspec>
<table name="VBAP" >
<pkfield name="VBELN" fktablename="VBAK" fkfieldname="VBELN"/>
<fieldtoread name="POSNR"/>
<fieldtoread name="MATNR"/>
</table>
<table name="MAKT">
<condition fieldname="SPRAS" logicaloperator="eq">
<value>de</value>
</condition>
<pkfield name="MATNR" fktablename="VBAP" fkfieldname="MATNR"/>
<fieldtoread name="MAKTX"/>
</table>
</configuration>
Since multiple entries in the VBAP table are assigned to an entry in the VBAK table only one random row is extracted from the VBAP table.
This is the associated system event output file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE eventlist SYSTEM "event.dtd">
<eventlist>
<event>
<attribute type="VBAK-VBELN">0000006662</attribute>
</event>
<event>
<attribute type="MAKT-MAKTX">Flatscreen MS 1775P</attribute>
<attribute type="VBAK-VBELN">0000006741</attribute>
<attribute type="VBAP-MATNR">M-10</attribute>
<attribute type="VBAP-POSNR">000020</attribute>
</event>
</eventlist>