What is the SAP IDoc format?
Posted by

If you work with SAP ERP systems in the field of electronic data exchange (EDI), you cannot avoid using the IDoc format. IDoc is the central exchange format of SAP ERP systems and is used for importing and exporting data.

This article introduces the IDoc format and sheds light on its role in the context of electronic data interchange (EDI).

Data exchange with an SAP system

Before we start with IDoc details, we define the terms and definitions of the SAP system. When we talk about SAP system in the context of this article, we mean SAP ERP. This system used to be known as SAP R/3 (you may still hear SAP veterans use this term today). Later, the term mySAP ERP became the common nomenclature. Today, the term SAP ERP is common. More recently also its successor SAP S/4HANA.

Other systems, such as SAP Business ByDesign or SAP Business One, play no role in this IDoc contribution - there are other data exchange concepts for these systems.

Start screen of an SAP ERP system

Start screen of an SAP ERP system

IDocs are used to import data into and export data from an SAP system. Data refers to business relevant information, which is often exchanged with external business partners using electronic data interchange (EDI). This includes information relating to orders, delivery notes, invoices, material master data etc.

XML vs. Fixed-length format

IDocs can be found in two different forms - either as fixed-length format (especially in older SAP systems) or as an XML-based format. In the following we will only discuss the newer XML-based format.

IDoc documentation

To get an overview of the IDocs currently configured in SAP, you can use transaction WE60. SAP uses EDIFACT-like abbreviations to identify IDocs. Anyone familiar with EDIFACT will be quickly able to identify the different types such DESADV, ORDERS, INVOIC, etc. This is not surprising, since the IDoc structure is based on the EDI standards ANSI ASC X12 and EDIFACT.

The following figure shows transaction WE60 and the example IDoc type DELVRY03.

DELVRY03 IDoc type

DELVRY03 IDoc type

IDoc XML schema

The documentation relevant for electronic data exchange can be found in the corresponding IDoc XML schema and the accompanying documentation. After selecting the IDoc type DELVRY03, the corresponding XML schema can be displayed using the menu item Documentation > XML Schema. The XML Schema is the basis for the realization of document mappings – e.g. from IDoc to EDIFACT or vice versa.

The following figure shows an overview of the XML schema of the DELVRY03 IDoc type, using the tree view of Altova XMLSpy. The elements are grouped under a DELVRY03 root element, which in turn contains a header record EDI_DC40 and up to 9,999 delivery header items of type E1EDL20.

DELVRY03 IDoc XML Schema structure

DELVRY03 IDoc XML Schema structure

IDoc documentation

To find out what’s behind the abbreviated names of the XML elements, one has to consult the IDoc documentation. The documentation can also be retrieved using transaction WE60. After selecting the IDoc type DELVRY03, the corresponding documentation can be displayed as HTML file by selecting Documentation > HTML Format.

In order to get a complete documentation, the two checkboxes Documentation Output and Field Value Output should be activated in the user settings, as shown in the following illustration. The user settings can be accessed in transaction WE60 by selecting the menu item Goto > User settings.

IDoc documentation export options

IDoc documentation export options

The following figure shows the resulting HTML documentation. Using the menu item Documentation > Export one may download the HTML files onto the local hard disk. Other options, such as PDF export, are not available.

IDoc DELVRY03 documentation

IDoc DELVRY03 documentation

Together with the corresponding XML schema, the structure and semantics of an IDoc can now be decrypted relatively easily.

Transaction WE19 is also very useful for testing IDocs or finding possible values for a certain field. If the IDoc is not yet available in the SAP system, one may use transaction CG3Z to manually upload the IDoc.

How do I make my SAP system EDI-ready?

In order to be able to exchange EDI files with other business partners, such as suppliers or customers, a service provider can be used. The service provider takes care of the correct translation of IDocs to the target EDI document formats as well as the correct delivery of EDI documents to the business partners.

For the realization of the connection between the service provider and an SAP ERP system, ecosio together with EPO Consulting GmbH has developed the high-performance and flexible EPO connector.

Electronic data exchange with ecosio and EPO connector

Electronic data exchange with ecosio and EPO connector

Any questions about IDocs or EDI?

You still have questions about SAP, IDocs or EDI? Please do contact us or use our chat – we’re more than happy to help!


Share this post:


Topics: SAP  IDoc 

Related articles: