Use the class com.idsscheer.ppm.xmlextractortools.extractor.sap2ppm.
ZFirstFieldChange_sap2ppm to extract information on the first change of a table field from an SAP system. Specify the class with the XML attribute classtouse in the table configuration in the XML element table.
Calculation
For some documents in the SAP system, there is only one field for the last change date. The initial value of this field in the first change document is interpreted as the creation date of the document. This value is extracted with the class to be used from the change document tables CDHDR and CDPOS.
The conditions for using the class must be as follows:
<table name="name" classtouse="com.idsscheer.ppm.
xmlextractortools.
extractor.sap2ppm.
ZFirstFieldChange_sap2ppm">
<booleancondition>
<condition fieldname="OBJECTCLAS" ...>
...
</condition>
<condition fieldname="OBJECTID" ...>
...
</condition>
<condition fieldname="TABNAME" ...>
...
</condition>
<condition fieldname="TABKEY" ...>
...
</condition>
<condition fieldname="FNAME" ...>
...
</condition>
</booleancondition>
<pkfield name="OBJECTCLAS"/>
<pkfield name="OBJECTID"/>
<pkfield name="CHANGENR"/>
<pkfield name="TABNAME"/>
<pkfield name="TABKEY"/>
<pkfield name="FNAME"/>
<pkfield name="CHNGIND"/>
<pkfield name="<Field that is used in the tabkey>"
fktablename="<Foreign key table, from
which the field is extracted>"
fkfieldname="<Foreign key table field>"/>
... Other fields used in the tabkey
<fieldtoread name="CDPOS-VALUE_OLD"/>
... Other fields from the CDPOS table
<fieldtoread name="CDHDR-UDATE"/>
... Other fields from the CDHDR table
</table>
The combination of values specified in the OBJECTID and TABKEY fields is the same as for the com.idsscheer.ppm.xmlextractortools.extractor.sap2ppm.
ZChangeDocTable_sap2ppm (see chapter Extract system events incl. changes).
Example (of an SAP configuration)
With this configuration, you want to extract data as to who last changed the field containing the approval status of purchase requisitions and when:
<table name="ORIGINAL_ERDAT" classtouse="com.idsscheer.ppm.
xmlextractortools.extractor.sap2ppm.
ZFirstFieldChange_sap2ppm">
<booleancondition>
<condition fieldname="OBJECTCLAS" logicaloperator="eq">
<value>EINKBELEG</value>
</condition>
<condition fieldname="OBJECTID"
logicaloperator="eq_concatEventAttrValues">
<value>EKPO-EBELN</value>
</condition>
<condition fieldname="TABNAME" logicaloperator="eq">
<value>EKPO</value>
</condition>
<condition fieldname="TABKEY"
logicaloperator="eq_concatEventAttrValues">
<value>CLIENT#-#EKPO-EBELN#-#EKPO-EBELP</value>
</condition>
<condition fieldname="FNAME" logicaloperator="eq">
<value>AEDAT</value>
</condition>
</booleancondition>
<pkfield name="OBJECTCLAS"/>
<pkfield name="OBJECTID"/>
<pkfield name="CHANGENR"/>
<pkfield name="TABNAME"/>
<pkfield name="TABKEY"/>
<pkfield name="FNAME"/>
<pkfield name="CHNGIND"/>
<pkfield name="EBELN" fktablename="EKPO"
fkfieldname="EBELN"/>
<pkfield name="EBELP" fktablename="EKPO"
fkfieldname="EBELP"/>
<fieldtoread name="CDPOS-VALUE_OLD"/>
</table>
The result of the value extraction with this table configuration could be as follows in a created system event:
<event>
...
<attribute type="ORIGINAL_ERDAT-VALUE_OLD">
20010402
</attribute>
...
</event>