IDoc Processing in SAP: A Complete Guide

Talk to an SAP IDoc Expert Today or Request a Free Consultation

Let’s Connect with our Senior SAP Expert for Free Consultation

IDoc Processing in SAP: An Overview

We are Think Tree Technologies, the best SAP training provider. We understand how crucial seamless data exchange is in modern enterprises. One of the key components that makes this possible in SAP is the IDoc (Intermediate Document). On this page, we walk you through everything you need to know about IDoc processing in SAP, from the basics to advanced troubleshooting — all crafted to help you rank on search engines and inform your users.

What is an IDoc in SAP?

An IDoc, or Intermediate Document, is SAP’s standard format for data interchange between SAP and external systems. Think of it as a container that carries structured data like invoices, purchase orders, or shipping notifications between systems.

  • Format: Structured, segment-based document
  • Use Case: Integration with EDI, third-party applications, legacy systems
  • Direction: Can be inbound (data into SAP) or outbound (data from SAP)

How IDoc Processing works in SAP

Let’s look at a high-level process flow for both inbound and outbound IDoc processing.

Outbound IDoc Process

  1. Business process is triggered (e.g., sales order creation).
  2. SAP generates the IDoc based on a message type.
  3. IDoc is passed to the EDI subsystem or middleware.
  4. Middleware converts it to EDI format and sends it to the partner.

Inbound IDoc Process

  1. IDoc is received from external partner/middleware.
  2. SAP performs syntax validation.
  3. Data is processed and posted in SAP (e.g., invoice, delivery).
  4. Status is updated and logged for monitoring.

IDoc Processing Tools and Transaction Codes

SAP provides robust tools to monitor, test, and troubleshoot IDoc data.

IDoc Processing Tools and Transaction Codes List

 

T-Code Description
WE02 Display IDoc
WE19 Test IDoc
BD87 Reprocess inbound IDoc
WE20 Partner Profile Setup
WE21 Port Configuration
WE05 List of IDocs
WE10 Search for specific data within IDocs

IDOC Testing Process in SAP

T-Codes

WE19 Test tool
WE12 IDoc test: Inb. Proc of Outb. File
WE16 IDoc test: Inbound File
WE17 IDoc test: Inbound status report

If you want to reprocess IDOCS

  • BD87 Process inbound IDocs

  • BD88 Process outbound IDocs

To Display the executed IDOC to check the status of idoc.

  • WE02

  • WE05

WE19

Debugging an IDOC

You can test the IDoc using the IDoc test tool. Just follow the steps.

  1. Go to transaction WE19
  2. Enter the IDoc number you want to test
  3. Go to menu IDOC -> test inbound idoc -> standard inbound
  4. One popup screen comes get the “FUCTION NAME” to test the idoc.
  5. Click on the “INBOUND FUNCTION MODULE” button.
  6. Enter function module name.
  7. Click on CALL IN DEBUGGING MODE check box and choose foreground mode.
    And choose yes to run it.

Edit IDoc

  1. Go to transaction WE19
  2. Enter the IDoc number you want to test
  3. Double click on each segments and u can edit the values
  4. Then click start inbound

WE02, WE05 (DISPLAY IDOC FOR STATUS CHECK)

  • Basically, WE02 and WE05 are the same in terms of functionality. Displays the IDocs.
  • But there is one diff. One of these transactions is for administrative purposes.
  • And WE07 is for error statistics. It displays the IDocs that went into errors. It classifies
  • the IDocs in there error types

Use transaction WE05 or WE02 to add missing data for your inbound IDoc. If you use transaction WE19, the system will generate a new IDoc. However, the system will not generate a new IDoc if you use WE05 or WE02.

  1. Go to transaction WE05 or WE02.
  2. Enter the corresponding inbound IDoc number and execute.
  3. Double-click on the segment (page icon) where you want to add missing data.
  4. In the screen “Display Data Record for IDoc,” go to menu “Data Record” and click on

“Display -> Change.” Then system will display a popup information “Changes to the IDoc are written to the database,” then press enter .
In order to process the edited inbound IDoc, please execute standard program RBDAGAIE by providing the above IDoc number.

BD87 (Status Monitor for ALE Messages)

To reprocess same IDoc number

  • Use BD87 if you want to reprocess same IDoc number; here it will not generate new IDoc number
  • Suppose there was RFC Issue, connection got failed then after rectifying RFC Connection then you can reprocess same idoc number.
  • You have an error IDoc, and if you want to edit it and reprocess you can do it in BD87.

EDIT IDOC IN BD87

Follow the steps.

  • Go to BD87 ->enter error idoc number
  • Double click on the IDoc with an error until you reach the IDoc tree.
  • Search your segments with errors.
  • Double click on the paper-icon (important!!!), not on the segment name
  • Choose ‘Data-Record->Display-change from the menu.
  • Change the values. Click ‘Save’ and confirm the message that the changes will be written to the database (creates an IDoc with the original values and status 70).
  • Go back until you reach BD87 again. Reprocess the IDoc

Difference between 3 options in WE19

In WE19 your get 3 options Start Inbound, Start Inbound Function Module, and Inbound file.

  • You can call the inbound process using the normal path by clicking the Standard Inbound button, in which case the process goes through the checks as if it had been sent in by the subsystem
  • Alternatively, you can pass the process to a function module directly by clicking the Inbound Function Module button. In this case, the system bypasses the checks for partner profile and hands the IDoc data to your inbound function module directly. This approach is useful for testing an inbound process without having to maintain any inbound configuration
  • You can also start the function module in debug mode and select the processing option for your posting module
  • Finally, you can choose to save the IDoc in a file