EDI Knowledge Base   IDOC

About IDOC

IDoc or Intermediate Document is a standard data structure for electronic data interchange (EDI) between SAP application programs or between a SAP application and an external program. IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system and are used for asynchronous transactions: each IDoc generated exists as a self-contained text file that can then be transmitted to the requesting workstation without connecting to the central database.

Documents

IDocs have two levels, the technical level and the business level. IDoc documentation can be extracted from SAP by executing the WE60 transaction.

  • Technical level - Defined by the three record types compatible with the IDoc interface:
    • Control record
    • Data record
    • Status record
  • Business level - Defined by the segments of an IDOC.

Example of IDOC structure

BEGIN_RECORD_SECTION
  BEGIN_CONTROL_RECORD
    BEGIN_FIELDS
    NAME TABNAM
    TEXT Name of table structure
    TYPE CHARACTER
    LENGTH 000010
    FIELD_POS 0001
    CHARACTER_FIRST 000001
    CHARACTER_LAST 000010
    .
    .
    .
    END_FIELDS
  END_CONTROL_RECORD
  BEGIN_DATA_RECORD
    BEGIN_FIELDS
    NAME SEGNAM
    TEXT Segment (external name)
    TYPE CHARACTER
    LENGTH 000030
    FIELD_POS 0001
    CHARACTER_FIRST 000001
    CHARACTER_LAST 000030
    .
    .
    .
    END_FIELDS
  END_DATA_RECORD
  BEGIN_STATUS_RECORD
    BEGIN_FIELDS
    NAME TABNAM
    TEXT Name of table structure
    TYPE CHARACTER
    LENGTH 000010
    FIELD_POS 0001
    CHARACTER_FIRST 000001
    CHARACTER_LAST 000010
    .
    .
    .
    END_FIELDS
  END_STATUS_RECORD
END_RECORD_SECTION
BEGIN_SEGMENT_SECTION
  BEGIN_IDOC ORDERS03
    BEGIN_SEGMENT E2EDK01005
      SEGMENTTYPE E1EDK01
      LEVEL 01
      STATUS MANDATORY
      LOOPMIN 0000000001
      LOOPMAX 0000000001
      BEGIN_FIELDS
      NAME ACTION
      TEXT Action code for the whole EDI message
      TYPE CHARACTER
      LENGTH 000003
      FIELD_POS 0001
      CHARACTER_FIRST 000064
      CHARACTER_LAST 000066
      NAME KZABS
      TEXT Flag: order acknowledgment required
      TYPE CHARACTER
      LENGTH 000001
      FIELD_POS 0002
      CHARACTER_FIRST 000067
      CHARACTER_LAST 000067
      .
      .
      .
      END_FIELDS
    END_SEGMENT
  END_IDOC
END_SEGMENT_SECTION

IDoc Transactions

The table bellow contains some of the IDOC transactions and their EDIFACT and X12 equivalent messages.

X12 EDIFACT IDOC
850 ORDERS ORDERS01, ORDERS02, ORDERS03, ORDERS04, ORDERS05
855 ORDRSP ORDERS01, ORDERS02, ORDERS03, ORDERS04, ORDERS05
810 INVOIC INVOIC01
832 PRICAT PRICAT01
856 DESADV DELVRY01, DELVRY02, DELVRY03
Back to Top