5 minute read

IDoc Message Type and IDoc Basic Type - IDoc Basics Explained

Do you have any questions about IDocs, SAP or Electronic Data Interchange? Please do contact us or use our chat ā€“ weā€™re more than happy to help!

IDoc ā€“ conceptual differentiation

IDocs are a vital tool for the import and export of data to and from an SAP system. The basic idea behind an IDoc was introduced in a previous blog post.

Unfortunately, the term IDoc is not always used consistently. An ABAP programmer may understand something different when referring to an IDoc, than an SAP consultant or EDI project manager for example. In this post we want to define the following five IDoc terms and take a closer look at their specific concepts.

  1. IDoc Instance
  2. IDoc File
  3. Logical Message Type
  4. IDoc Basic Type
  5. IDoc Extension Type

IDoc instance

In computer science an instance is an occurrence of an object during the runtime of a program. An IDoc instance is of no difference here ā€” it is a concrete occurrence of a document object.

IDocs are stored internally in a persistent manner in the database in SAP, whereby the following tables are filled:

  • EDIDC
    Contains one Control Record per IDoc with one unique IDoc number.
  • EDID4
    Contains one or more Data Records. The reference to the Control Record is done via the unique IDoc number.
  • EDIDS
    Contains one or more Status Records. The reference to the Control Record is done via the unique IDoc number.

Usually the user will not access the database tables directly but use the appropriate SAP transaction, like BD87. The following image shows IDoc Nr. 1068215 in transaction BD87.


IDoc Instance in transaction BD87
IDoc Instance in transaction BD87

Ā© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

File

To exchange an IDoc between SAP and an external system, an IDoc instance will be serialised to an export format and written into a physical file. There are two ways to represent the data ā€“ ASCII-based IDocs or XML-based IDocs. Modern SAP systems predominantly make use of XML-based IDocs.

The following image shows an XML IDoc of a delivery forecast. This XML IDoc was sent to the SAP system where it was saved as IDoc Nr. 1068215.


IDoc XML-file
IDoc XML-file

Ā© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

The hierarchy of the IDoc as seen in the XML tree is similar to its display in transaction BD87. The following image shows the stored IDoc 1068215 in transaction BD87.


IDoc tree in transaction BD87
IDoc tree in transaction BD87

Ā© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

Logical message type

The message type describes the type of business document in an SAP system ā€“ e.g., an ORDERS IDoc message type is used to describe ā€” as the name already indicates ā€” an order document. A message type can support different use cases. The message type ORDERS for example can be used for an outbound order (sent to a supplier) or an inbound order (received from a customer).

In an IDoc XML, the logical message type can be found in element <MESTYP>, a sub element of <EDI_DC40>. This is also depicted in the XML screenshot of the IDoc further up this post.

The logical message type defines which application logic is being applied to the IDoc in the SAP system. Thus, the logical message type provides the connection between the structure of the information and the application logic.

The structure of the logical message type is further described by the IDoc basic type, which we will present in the next section.

White Paper - EDI Integration in SAP

IDoc basic type

The IDoc basic type provides the structure for the logical message type. The following image shows the structure of IDoc Nr. 1068215 in transaction WE19. In this case the utilized IDoc basic type is DELFOR02.


IDoc structure in transaction WE19
IDoc structure in transaction WE19

Ā© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

The IDoc basic type can manifest itself in multiple logical message types. An ORDERS05 basic type is the foundation for an order (ORDERS), an order change (ORDCHG), an order response (ORDRSP), a quote request (REQOTE) etc.

In the XML representation of an IDoc, the basic type can be found in element <IDOCTYP>, which is a sub element of <EDI_DC40>.

To get a list of all basic types and their logical message types, one may start a query via the following three tables.

  • EDIMSG (Message types and their assigned IDoc types)
  • EDBAS (Basic types)
  • EDBAST (Short description of the basic type)

It is possible to use the QuickViewer under transaction SQVI to access these tables.


IDoc tables in QuickViewer
IDoc tables in QuickViewer

Ā© 2020. SAP SE or an SAP affiliate company. All rights reserved. Used with permission of SAP SE.

The two logical message types for the IDoc basic type DELFOR02 are for example DELINS (Delivery Schedule) and DELJIT (Delivery Schedule Just-In-Time).

IDoc Extension Type

An IDoc extension type is an IDoc basic type with one or multiple additional segments. Following the SAP naming convention, IDoc extension types begin with a Z.

Any questions?

Do you have any further questions about IDocs, SAP or Electronic Data Interchange? Please do contact us or use our chat ā€” weā€™re more than happy to help!

 

SAP ERP and SAP S/4HANA are the trademarks or registered trademarks of SAP SE or its affiliates in Germany and in several other countries. 

Subjects

Find out how ecosio can help you

TAKE THE FIRST
STEP. WE TAKE
CARE OF THE
REST.

By submitting the form you agree to our privacy policy.

most read

Keep on reading

2 minute read

How to End Another User's SAP Session

Unable to edit a crucial document in SAPĀ® because you're locked out? Learning how to end another user's SAP session will solve this issue.

3 minute read

Ɯbersetzungen fĆ¼r SAPĀ®-Terminologie und SAPĀ®-Begriffe finden

Using the correct translations for SAPĀ® terminology is important in international projects. Discover how to find these quickly.

2 minute read

How to Save an IDoc Parser Report to a Local File

In this short and simple guide we show you how to save an IDoc parser report to a local file in just a couple of easy steps.

6 minute read

How to Debug SAP Message ME161 - "The Notified Quantity Exceeds the Ordered Quantity"

Don't know how to fix SAP error message ME161 "The notified quantity exceeds the ordered quantity"? In this article we break it down.

6 minute read

SAPĀ® EDI Project Roles - A Breakdown

Learn the various EDI project roles involved in achieving successful EDI integration in SAP systems and how the different roles interact.

5 minute read

Alternatives to the Seeburger PI Adapter

The end of maintenance for the Seeburger PI Adapter is imminent. What alternatives are there and which is the best suited for your business?

3 minute read

How to create an SAP transaction code

Want to know how to create an SAP transaction code for an existing ABAP program so that you can easily call the program?

9 minute read

Alternative Solutions for EDI Data Exchange with SAP PI and SAP PO

Discover the three possibilities when it comes to implementation of electronic data interchange (EDI) in SAP Process Integration or SAP Process Orchestration (SAP PI/PO).

6 minute read

How to Set Up and Manage Automatic SAP Jobs

SAP jobs can be used to automate processes in SAP ERP so they can be carried out without user intervention. We explore the key features.

4 minute read

IDoc Status Change in SAP ERP

IDoc statuses are not always the clearest - particularly when errors occur. In this article we explain how to change IDoc status as required.

6 minute read

How Can I Add an Entry to an SAP Table?

In this article we show how to add entries to an existing SAP table - even if it does not have its own maintenance dialog.

4 minute read

IDocs in SAP S/4HANA: The Differences to SAP ECC 6.0

The change to S/4HANA also impacts the format of IDocs. In this article we explore IDocs in S/4HANA and the new and changed elements.

White paper

Die 7 teuersten EDI-Fehler

Nutzen Sie unsere Expertise, um die ideale EDI-Lƶsung fĆ¼r Ihr Unternehmen zu finden

White paper

The 7 most expensive mistakes to avoid

Our white paper will help you ensure EDI integration is a success.

Subscribe to the e-Invoicing newsletters