WSW Logo Claim
Suche
Close this search box.

SAP IDoc

Table of contents

Two laptops are standing on a black desk, graphically the data exchange between both devices is shown.

Numerous companies around the world use an SAP ERP system to map their business processes. This means that the SAP user base usually includes not only the company's own organization, but also its environment - consisting of customers, suppliers, business partners and affiliated companies. To ensure that data can be exchanged smoothly between multiple SAP systems, SAP has established the central SAP IDoc format.

What is SAP IDoc?

SAP IDoc is the abbreviation for SAP Intermediate Document. It is a standardized format that can be used to exchange data between SAP systems. It is compatible with all "major" SAP ERP products - from R/2 and SAP ERP (R/3) to the current SAP S/4HANA. Various third-party systems can also process SAP IDocs. 

The advantages of SAP IDoc

Whenever data exchange is mentioned in the context of SAP IDoc, data always refers to business documents. Classic examples are purchase orders, invoices and delivery bills. Thanks to the SAP standard format, files of this type can be sent back and forth between systems without any problems. In the target system, they can also be automatically processed directly. In this way, entire process chains can be digitized and automated across companies. This reduces manual work, accelerates business processes and strengthens collaboration between the partners involved.

The most important features of an IDoc

SAP IDocs have some characteristic features. First, they are application-neutral, i.e. independent of the source and target systems. Accordingly, they are suitable for SAP-to-SAP communication as well as for SAP-to-Non-SAP data exchange. At the same time, they are independent of the direction of data exchange. They can map both outgoing and incoming business documents. Furthermore, IDocs are stored in character format, not binary format. Thus, they can be displayed in a text editor.

How are SAP IDocs structured?

SAP iDocs exist in two forms. Especially older SAP systems use the Fix-Lenght format. In the newer solutions, the IDoc is based on XML. We will deal with the XML variant in the following.

Each SAP IDoc has the same structure. It consists of the following three components:

  • Control Record
  • Data Record
  • Status Record (Status Record)

 

 

The control record contains information about the sender and the receiver. It also contains a set of administrative data such as IDoc type, IDoc number, message type, direction (inbound vs. outbound) and current status.

The data record contains all contents of the business document to be transferred. The individual IDoc data are divided into segments. In addition to standard segments, individual (company-specific) segments can also be defined.

The status record logs all stations through which an SAP IDoc passes. It is therefore used for statistics and monitoring. Possible errors are also attached to an IDoc with the help of the status record.

What are the differences between SAP IDoc, EDI and ALE?

In connection with communication between SAP systems, two other terms are frequently mentioned in addition to SAP IDoc:

  • ALE (Application Link Enabling): A middleware technology for internal data exchange between SAP and non-SAP systems.
  • EDI (Electronic Data Interchange): A transfer procedure for the intercompany exchange of data.
 

In Application Link Enabling (ALE), data is exchanged between logical systems. ALE uses IDocs for this internal data transfer.

The EDI format, on the other hand, can be described as a uniform exchange language. SAP IDocs are not exchanged directly, but are translated into this uniform language beforehand using an EDI converter. Known EDI formats are for example UN/EDIFACT, ANSI ASC X12 and VDA. Unlike ALE, Electronic Data Interchange does not use a logical system, but defines partners. These partners can be, for example, suppliers or customers.

In short: ALE is responsible for internal and EDI for external communication. Both communication methods use IDocs.

What are the IDoc types?

IDocs are triggered either in an SAP system or an EDI subsystem. Two IDoc types can be distinguished in this context:

  • The Inbound IDoc: It is received from an SAP system.
  • The outbound IDoc: it is sent from a system.
 

Furthermore, IDocs can also be divided into different types from a business perspective. In this context, SAP refers to so-called basic types. These can either be used in the original or supplemented with additional data using a so-called extension type. Examples of the most important SAP IDoc basic types are as follows:

  • INVOIC02 (invoice/bill)
  • ORDERS05 (Purchasing/Sales)
  • INCINV_CREATE02 (incoming invoice)
  • DELVRY07 (delivery interface)
  • SHPMNT06 (Transport)
  • DELFOR02 (delivery schedule)
 

Users can obtain detailed documentation for all IDoc types via SAP transaction WE60. 

How is IDoc used in an SAP system?

SAP IDocs can be generated at various points in transaction processes. For example, an SAP IDoc can be generated in a shipping process that contains the data fields for printing a shipping list.

Depending on the configuration of IDoc processing, IDocs are automatically generated in the sending database when users execute a specific SAP transaction. There are also several ways in which the IDoc can reach its destination:

  • Write IDoc via file port to a file system (where it can be picked up by the receiver)
  • Send IDoc via http to another system (previous conversion to XML)
  • IDoc received via http from source system (also in XML format)

 

The most important IDoc transactions

In order to configure the process outlined above and establish a connection between the systems involved, various settings are required in the SAP system. The following IDoc transactions are particularly relevant in this context:

  • WE21: Configure IDoc processing ports
  • SM59: Configure RFC connections
  • WE20: Maintain partner profiles
  • SICF: Maintain services
  • WE02: Call IDoc list
  • WE19: Test IDoc processing

 

What role do ports play in SAP IDoc processing?

Ports are an important element in IDoc processing. They define the connection between the source and target systems based on technical characteristics. More precisely, they define the medium to be used for data exchange. The most common are the TRFC ports used in the ALE process and the file ports relevant for EDI. When using the file port, users specify the directory where the IDoc file is to be stored. The target system or a middleware can then fetch the file from this location.

SAP IDoc: Application examples

IDocs can be used in numerous business processes. A classic example is communication with suppliers. In this use case, the business requirement could be as follows: As soon as a user creates an order, it should be automatically transmitted to the supplier via IDoc.

In order to implement this scenario, the partner's system must be EDI-capable. If this is the case, the SAP software can recognize that the supplier is capable of receiving electronic documents. Once this basic requirement is met, the IDoc communication process can start.

The purchase order (PO) sent by the customer is an outbound IDoc. From the supplier's point of view, however, it is an inbound IDoc. His SAP system can process it further by automatically creating a logically matching business document (a sales order, SO).

If errors occur during processing of the inbound or outbound IDoc, they remain in a state that reflects the error in a corresponding status, depending on the type of error. This prevents problems from arising in the subsequent process as a result of the document containing the error. If such a case occurs, manual intervention is necessary. First, the error must be corrected. In the second step, IDoc processing is then repeated.

Conclusion

Overall, the SAP IDoc is an indispensable medium for internal and cross-company business communication. It has already ensured a smooth flow of data between SAP and non-SAP systems for many years. In the course of the digital transformation, it is becoming even more relevant. This is because the trend is clearly moving toward seamless networking of the entire supply chain.

To enable all partners along the supply chain to exchange business documents without manual intermediate steps, you need a common standard. SAP IDoc can take on this role. So it will continue to play an important role in business success in the future. 

Get in touch with WSW Software
For those who want to know more.

You want to know more about our services, products or have questions that our website could not answer? Then we look forward to talking to you!

Suche
Suche
KPI Packages
Suche
Consulting
Services
Suche
Suche
Company
Career
Suche
Suche
Suche
Suche
Suche
Suche
Suche