The file below shows the SD_C configuration for an SQL database system:
...
<configuration name="SD_C">
<docspec>
<docreftable name="VBAK">
<booleancondition>
<condition fieldname="ERDATCHAR#-#ERZETCHAR"
logicaloperator="char_creationtimestamp">
<value>yyyyMMdd</value>
<value>HHmmss</value>
</condition>
<condition fieldname="ERDAT#-#ERZET"
logicaloperator="date_creationtimestamp">
<value>DATE</value>
<value>TIME</value>
</condition>
<condition fieldname="VBTYP" logicaloperator="eq">
<value>C</value>
</condition>
</booleancondition>
<pkfield name="VBELN" />
</docreftable>
<doctable name="Orders" tablename="VBAP">
<pkfield name="VBELN" fktablename="VBAK"
fkfieldname="VBELN"/>
<pkfield name="POSNR" />
<fieldtoread name="VBELN"/>
<fieldtoread name="POSNR"/>
<fieldtoread name="ERDAT"/>
<fieldtoread name="ERZET"/>
<fieldtoread name="MATNR">
<textref tablename="MAKT" reffieldname="MATNR"
textfieldname="MAKTX" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="KONDM">
<textref tablename="T178T" reffieldname="KONDM"
textfieldname="VTEXT" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="SPART">
<textref tablename="TSPAT" reffieldname="SPART"
textfieldname="VTEXT" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="WERKS">
<textref tablename="T001W" reffieldname="WERKS"
textfieldname="NAME1"/>
</fieldtoread>
<fieldtoread name="CHARG"/>
<fieldtoread name="PSTYV"/>
<fieldtoread name="ERNAM"/>
<fieldtoread name="NETWR"/>
</doctable>
</docspec>
<table name="VBAK">
<pkfield name="VBELN" fktablename="Orders"
fkfieldname="VBELN"/>
<fieldtoread name="VTWEG">
<textref tablename="TVTWT" reffieldname="VTWEG"
textfieldname="VTEXT" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="VKORG">
<textref tablename="TVKOT" reffieldname="VKORG"
textfieldname="VTEXT" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="VDATU"/>
<fieldtoread name="VKBUR">
<textref tablename="TVKBT" reffieldname="VKBUR"
textfieldname="BEZEI" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="VKGRP">
<textref tablename="TVGRT" reffieldname="VKGRP"
textfieldname="BEZEI" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="VBTYP"/>
<fieldtoread name="AUART"/>
</table>
<table name="MARA">
<pkfield name="MATNR" fktablename="Orders"
fkfieldname="MATNR"/>
<fieldtoread name="MATNR"/>
<fieldtoread name="MTART">
<textref tablename="T134T" reffieldname="MTART"
textfieldname="MTBEZ" langfieldname="SPRAS"/>
</fieldtoread>
</table>
</configuration>
Foreign key table
...
<docreftable name="VBAK">
<booleancondition>
<condition fieldname="ERDATCHAR#-#ERZETCHAR"
logicaloperator="char_creationtimestamp">
<value>yyyyMMdd</value>
<value>HHmmss</value>
</condition>
<condition fieldname="ERDAT#-#ERZET"
logicaloperator="date_creationtimestamp">
<value>DATE</value>
<value>TIME</value>
</condition>
<condition fieldname="ERDAT_DATE"
logicaloperator="date_geq">
<value>05.12.2001</value>
</condition>
<condition fieldname="ERZET_TIME"
logicaloperator="time_gt">
<value>22:27:13</value>
</condition>
<condition fieldname="VBTYP"
logicaloperator="eq">
<value>C</value>
</condition>
</booleancondition>
<pkfield name="VBELN" />
</docreftable>
...
The identifier and name of the foreign key table from the SQL database system is VBAK. All order documents of the VBTYP=C type are extracted. The value elements of the char_creationtimestamp condition operator specify the format of the time stamp to be generated from the corresponding database fields. The value elements of the date_creationtimestamp condition operator specify the data types of the fields extracted. The values in the ERDAT table column are of the DATE type and those in the ERZET column are of the TIME type.
Only those rows in the table in which the values of the ERDAT_DATE and ERZET_TIME attributes are greater than/equal to or greater than the values specified with value (05.12.2001 or 22:27:13).
The name of the primary key table column is VBELN. For each different VBELN field value, data records are extracted from the linked system event table for which VBELN has the same value as in the foreign key table.
System event table
...
<doctable name="Orders" tablename="VBAP">
<pkfield name="VBELN" fktablename="VBAK"
fkfieldname="VBELN"/>
<pkfield name="POSNR" />
<fieldtoread name="VBELN"/>
<fieldtoread name="POSNR"/>
<fieldtoread name="ERDAT"/>
<fieldtoread name="ERZET"/>
<fieldtoread name="MATNR">
<textref tablename="MAKT" reffieldname="MATNR"
textfieldname="MAKTX" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="KONDM">
<textref tablename="T178T" reffieldname="KONDM"
textfieldname="VTEXT" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="SPART">
<textref tablename="TSPAT" reffieldname="SPART"
textfieldname="VTEXT" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="WERKS">
<textref tablename="T001W"
reffieldname="WERKS" textfieldname="NAME1"/>
</fieldtoread>
<fieldtoread name="CHARG"/>
<fieldtoread name="PSTYV"/>
<fieldtoread name="ERNAM"/>
<fieldtoread name="NETWR"/>
</doctable>
...
The VBAP system event table is assigned the Orders identifier. The foreign key relation specified in the line
<pkfield name="VBELN" fktablename="VBAK"
fkfieldname="VBELN"/>
links the table to the VBAK foreign key table. The primary key consists of the VBELN and POSNR columns.
For each table row extracted, a system event (event XML element) is created in the XML output file. For each fieldtoread XML element, a line of the form
<attribute type="...">...</attribute>
is written to the output file. For some fieldtoread elements, the value extracted from the referenced table (textref XML element) is written in addition to the extracted data field value. The optional langfieldname extracts the language-specific text of the data field.
The complete source system attribute type is made up of the identifier of the system event table (doctable name), the field name (fieldtoread name) and the name of the referenced text field (textref ... textfieldname). The source system attribute type for the first extracted fieldtoread element with a referenced table looks like this:
<attribute type="Orders-MATNR-MAKTX">...</attribute>
Data table
...
<table name="VBAK">
<pkfield name="VBELN" fktablename="Orders"
fkfieldname="VBELN"/>
<fieldtoread name="VTWEG">
<textref tablename="TVTWT" reffieldname="VTWEG"
textfieldname="VTEXT" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="VKORG">
<textref tablename="TVKOT" reffieldname="VKORG"
textfieldname="VTEXT" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="VDATU"/>
<fieldtoread name="VKBUR">
<textref tablename="TVKBT" reffieldname="VKBUR"
textfieldname="BEZEI" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="VKGRP">
<textref tablename="TVGRT" reffieldname="VKGRP"
textfieldname="BEZEI" langfieldname="SPRAS"/>
</fieldtoread>
<fieldtoread name="VBTYP"/>
<fieldtoread name="AUART"/>
</table>
<table name="MARA">
<pkfield name="MATNR" fktablename="Orders"
fkfieldname="MATNR"/>
<fieldtoread name="MATNR"/>
<fieldtoread name="MTART">
<textref tablename="T134T" reffieldname="MTART"
textfieldname="MTBEZ" langfieldname="SPRAS"/>
</fieldtoread>
</table>
...
The foreign key relations to the VBELN and MATNR primary key fields in the Orders table are used to extract supplementary information from the VBAK and MARA data tables.