SAP

About SAP IDoc

SAP IDoc, Intermediate Document, is a standard file format to exchange data of S/4-, ERP, R/3- and other systems. IDoc files can be used for data imports and exports. Data can represent orders, invoices etc. - in particular transaction based data.

XML vs. Fix-Length-Format: IDoc files can be of to format types: XML or fixed-length-format. Fixed-length-format is mostly used by older legacy systems, which is why we focus only on XML-based IDoc.

SAP IDoc format via XML

Each IDoc file has the same structure:

  1. Control data contains information about the transmitting and receiving partner.

  2. Data contains the actually data to be transferred.

  3. Status data keeps track of the stations the IDoc wen trough on its way of data transfer.

Example of IDoc file

An example of the IDoc file content can be found here in the SAP help center.

Processing IDoc files with Locoia

Locoia supports XML based IDoc files and process them in the following manner:

  1. Convert XML IDoc file to JSON for easier usage with the XML Helper

  2. Define two dictionaries from the above result, one with header information and one with body (data contents) with the Dict Helper

  3. Join the two with the Spreadsheet Helper (SQL query against the header and body to join them) to get the full data set

Last updated