In the dynamic landscape of enterprise resource planning, efficient and standardized data exchange acts as a linchpin for seamless business operations and effective data transfer across systems.

At the heart of this data integration framework lies SAP Intermediate Documents — or IDoc for short.

As the foundation of communication within and beyond SAP environments, IDocs facilitate the structured exchange of critical business information, from complex order processing to inventory management, external partnerships, document message control, and more.

In this article, we’ll discuss the key components and capabilities of IDoc in SAP, how they can transform core inbound and outbound processing tasks, and where our expert SAP consultant team can come in to help.

What is an SAP IDoc?

An IDoc, or intermediate document, is a functional data container used to facilitate the exchange of data between any business transaction that can understand the full syntax and semantics of the data and its predefined process code.

IDocs are stored in a comprehensive database, where each intermediate document is assigned a unique number within a client, making it easier for users to access the right IDoc message type when needed to initiate data exchange between systems.

Here are a few key features IDocs in the SAP system:

  • IDocs are created when an outbound ALE or EDI process is initiated in the target system
  • IDocs are based on EDI standards, like ANSI X12 and EDIFACT
  • IDocs are independent of both sending and receiving systems, whether navigating SAP-to-SAP or non-SAP-to-SAP data exchange processes
  • IDocs are independent of the direction of the actual data transfer, including inbound IDoc and outbound IDoc processing tasks
  • IDocs can be stored in character or binary format and viewed in a functional text editor

A Closer Look into IDoc Processing Types

Understanding the different IDoc processing types can be a make-or-break factor in your company’s success, ensuring your IDocs contain the right functionality to handle even your most complex data configuration and exchange processes.

Here’s a closer look at the main IDoc processing types in SAP:

Basic IDoc Type

An IDoc Basic type is designed to define the structure and format of the business document that will be exchanged, and it provides the foundation for the IDocs that can be used for data communication and integration within or between SAP systems and with external partners.

A basic IDoc type typically includes the following components:

1) Segments: Segments are the building blocks of an IDoc and represent the individual data elements or fields. They can be grouped into hierarchical structures to represent complex data.

2) Fields: Within each segment, some fields hold specific data values that are defined with specific data types and lengths.

3) Control Records: Control records are used to manage the flow and processing of IDocs, containing information such as the sender and receiver system, the type of IDoc, and status information.

4) Data Records: Data records are based on specific segment definitions and contain the actual business data that is being exchanged.

5) Status Records: Status records store information about the processing status of an IDoc, including whether it was successfully transmitted or if there were errors.

6) Extension Fields: Depending on the specific requirements, additional custom fields or segments can be added to extend the basic IDoc type.

Basic IDoc types are often provided within the SAP user landscape as standard templates for common business processes, such as order processing, invoice posting, or customer master data updates. However, organizations can also create custom basic IDoc types tailored to their unique business needs or data requirements over time.

Extension IDoc Type

Most of the time, Basic IDoc types will provide the right functionality to handle IDocs, but in the case that organizations need to add more data to the restricted basic types, users would need to leverage the IDoc extension feature.

Extension IDoc types in SAP allow organizations to adapt and customize standard IDocs to meet their specific data exchange needs over time, providing flexibility and versatility in integrating SAP systems with other systems and partners across the landscape.

Here are a few key features of extension IDoc types in SAP:

1) Customization: IDoc extension types are used when the standard IDoc types provided by SAP do not fully meet the data exchange needs of an organization. They provide a way to customize and adapt IDocs to specific business processes.

2) Additional Segments: Organizations can define and add custom segments to the IDoc extension type. These custom segments contain the additional data elements required for their unique business scenarios. These segments are integrated into the extended IDoc type’s structure.

3) Field Additions: Besides adding entire segments, IDoc extension types also allow the addition of individual fields to existing segments within the standard IDoc. This is useful when only specific data elements need to be modified or added.

4) Extension Scenario: When an IDoc is extended, it usually follows an “extension scenario” in which a standard IDoc type is used as a foundation. The extended IDoc type inherits the structure of the standard IDoc and incorporates the customizations made through added segments or fields.

5) Partner Agreements: When implementing IDoc extensions, organizations must ensure that their external partners or systems know these customizations. This typically involves agreements between partners to exchange and process the extended IDocs correctly.

6) Naming Conventions: IDoc extensions are usually named following specific naming conventions to distinguish them from standard IDoc types. SAP recommends using a naming convention that reflects the standard IDoc type being extended and includes a custom identifier.

IDoc Segments

An IDoc segment is a functional component of IDocs in the SAP system, and it defines core IDoc format and structure characteristics for organizing and managing data records within the IDoc. For each IDoc segment, the SAP system creates a segment type, segment definition, and segment documentation.

IDoc segments play a critical role in standardizing the exchange of data between systems and ensuring that data conforms to a predefined format, making IDocs an effective tool for integrating SAP systems and communicating with external partners.

Here are a few key characteristics of IDoc segments in SAP:

1) Hierarchical Structure: Segments can be organized hierarchically, representing complex data structures. This makes it possible to convey multi-level or nested information, such as sales order headers with multiple line items.

2) Data Fields: Each segment contains individual data fields with specific information pieces. These fields are defined with data types, lengths, and sometimes additional attributes, ensuring that the data conforms to a predefined structure.

3) Repeatability: Segments can be defined as either “single occurrence” or “repeating.” Single-occurrence segments appear only once in an IDoc, while repeating segments can occur multiple times within the same IDoc. This flexibility allows for the representation of repetitive data, such as multiple line items in a purchase order.

4) Standard and Custom Segments: SAP provides standard segments for common business processes, like the MATERIAL segment for material master data or the E1EDP01 segment for purchase order items. However, organizations can create custom segments to accommodate their data requirements.

5) Segment Relationships: Segments can have relationships with other segments, indicating how they are related within the IDoc structure.

IDoc Port

An IDoc port is a configuration setting that defines the specific technical characteristics of the connection between SAP and non-SAP systems, ensuring the correct medium is defined and assigned to the right SAP transaction. The two most commonly used IDoc ports are TRFC ports used in ALE exchange and File ports used in EDI transfers.

Here are a few key components and settings associated with an IDoc port:

1) Communication Method: This specifies the communication protocol or method to be used for sending or receiving IDocs. Common communication methods include File, RFC (Remote Function Call), HTTP, FTP, SMTP (Simple Mail Transfer Protocol), and more.

2) Partner Profile: An IDoc port is typically associated with a partner profile, which defines the partner system or partner with which the IDocs will be exchanged. The partner profile contains information such as the partner’s SAP system ID, message types, and processing options.

3) Logical System: The logical system is a unique identifier assigned to an SAP system participating in the IDoc communication, ensuring the correct partner system is targeted during data exchange.

4) Port Type: Ports can be categorized into different types based on their functionality, such as inbound ports for receiving IDocs or outbound ports for sending IDocs. The port type determines the direction of communication.

5) Port Number and Address: For certain communication methods (i.e., RFC or HTTP), the port number and address are specified to identify the destination or source of the IDocs.

6) Processing Mode: IDoc ports can be configured for various processing modes, such as synchronous or asynchronous. In synchronous processing, the IDoc is sent and processed immediately, while asynchronous processing involves queuing the IDoc for later processing.

Key Components of SAP IDoc Structure

Let’s take a closer look at the main components included in the SAP IDoc architecture:

1) Control Record

The IDoc control record is the administrative record for SAP IDoc configuration. It contains all the information needed to initiate IDoc processing, including message type, IDoc processing type, current status, and the sending and receiving systems and parties involved in the IDoc transfer.

Here are a few critical capabilities of the control record in facilitating efficient IDoc processing:

  • IDoc control record data is stored in an EDIDC table, where data is organized by an IDoc number
  • Directions indicate the nature of the IDoc process (i.e., Direction ‘1’ is for outbound processes, and Direction ‘2’ is for inbound processes)
  • Contains critical IDoc processing information, including IDoc number, inbound or outbound direction, IDoc channel, sender and recipient, and IDoc port

2) Data Record

The IDoc data record refers to the IDoc segment or record that contains all the data needed to exchange data between SAP and non-SAP systems.

Here are some key capabilities of the data record in IDoc processes:

  • Contains all relevant application data, like client details and employee header information
  • Includes data like IDoc numbers, segment names and numbers, data hierarchies, and the data itself to organize IDoc processes more efficiently
  • Actual IDoc data is stored as a string in an SDATA field
  • All record data is stored in EDID2 and EDID4 tables that allow users to see all the components of the data record in the same place

3) Status Record

The IDoc status record provides information about all the stages the IDoc has passed through already in the IDoc transmission process.

Here are the critical capabilities of status records in the SAP IDoc process:

  • All status record data is managed and stored in an EDIDS table
  • Organizes status records by number (i.e., Statuses 1-42 are for outbound processes, while Statuses 50-75 are for inbound processes)
  • A status record is attached to an IDoc every time an encounter or milestone occurs in the system

List of IDoc Transactions in the SAP System

The following transactions can be used to create and process new IDoc transactions in SAP:

WE02: Generates a list report for IDoc types and segments.

WE05: Generates a list of all existing IDocs within the system.

WE09: Intitates IDoc Search processes for specific business content.

WE20: Determines an inbound or outbound process code based on the partner profile identified in the control record of the IDoc.

WE21: Identifies an external port (i.e., RFC destination, File, or ABAP) to control the flow of IDoc data to the target external system.

WE41: Connects an outbound process code specified in the partner profile to a specific function module.

WE42: Connect an inbound process code specified in the partner profile to a specific function module.

BD87: Processes outbound IDocs based on predefined outbound parameters.

WLF_IDOC: Facilitates IDoc processing and allows for the display and editing of existing IDocs.

How Can We Help?

Whether you need help setting up core IDoc processing types within your SAP system, additional support completing complex data integration tasks across applications, or just an extra hand outlining plans for new IDoc configuration, Surety Systems is here to help.

Our senior-level, US-based SAP consultant team has the functional skills, technical know-how, and real-world experience to handle your most important project needs — no matter what.

Getting Started with Our Team

Interested in learning how SAP IDoc functionality can help you transfer data more effectively across your SAP and non-SAP systems? Ready to get started on a project with our expert SAP consultants?

Contact us today for more information!