Mon – Sat: 9:00 AM – 7:00 PM IST
SAP

What is an IDoc in SAP?

SAP's long-standing document format for system-to-system exchange — and the monitoring most estates never set up.

In short

An IDoc (Intermediate Document) is SAP's structured container for exchanging business documents between systems. It has a control record identifying type and partner, data records holding the content in segments, and status records tracking what happened. IDocs are asynchronous: one is created, queued and processed, and each step records a status.

Why It Matters

Why this matters in practice

IDocs remain the backbone of SAP integration in most estates, and the common failure is not the format but the silence. Because processing is asynchronous, a failed IDoc does not interrupt anyone — it sits in error status. Without active monitoring, the first sign of a problem is a customer asking where their order went.

Asynchronous, so sender and receiver need not be available together
Status codes record exactly where processing stopped
Partner profiles control what is exchanged with whom
Reprocessable — a corrected IDoc can usually be reprocessed rather than recreated
How It Works

How it works in practice

1

Control record

Message type, basic type, sender and receiver partner, direction. This is what routing decisions read.

2

Data records

The content, in segments and fields defined by the basic type and any extension.

3

Status records

A trail of what happened. 53 means posted successfully inbound; 51 means an application error; 03 means sent outbound.

4

Partner profiles

Defined per partner and message type, controlling processing mode, ports and whether processing is immediate or batched.

5

Monitoring and reprocessing

Error statuses need an owner and a daily review. Most errors are data problems that can be corrected and reprocessed.

Worked example

A worked example: 51s that nobody watched

A business receives sales orders from a customer by EDI, converted into IDocs. For four weeks everything looks fine, because the interface is judged by whether IDocs arrive rather than by whether they post.

Then a reconciliation finds thirty-one orders missing. All thirty-one IDocs arrived and all thirty-one sit at status 51 — application error. The cause is mundane: the customer added new ship-to locations that do not exist in SAP, so the orders cannot post. The IDocs are not lost, they are parked, and nobody has looked at the queue because nothing alerted.

Two lessons follow, and the second matters more. An inbound interface needs monitoring on posting status rather than on receipt, with an alert on anything sitting at 51 past a threshold — an hour, not a day. And a reprocessing procedure has to exist before it is needed, because the fix here is to create the ship-tos and reprocess, which is straightforward if someone has done it before and alarming if nobody has.

Key terms

The vocabulary, briefly

Term What it means
Basic type The IDoc structure definition — which segments exist and how they nest.
Segment A record within the IDoc, roughly equivalent to a line or a block of fields.
Partner profile Configuration saying which partner sends or receives which message type, and how.
Status code The processing state. The numbers matter: 53 is posted successfully, 51 is an application error.
Extension A customer addition to a basic type, for fields the standard structure does not carry.
What Goes Wrong

Common mistakes worth avoiding

No monitoring at all

The most common and most expensive gap. Failed IDocs accumulate silently and surface as business problems weeks later.

Processing immediately at high volume

Immediate processing on a high-volume interface can overwhelm the system. Collect and batch instead.

Ignoring status 51 backlogs

Application errors indicate a data or configuration problem that will keep recurring until it is fixed at source.

Nobody owning the interface

Interfaces need a named owner. Without one, errors are everyone's problem and therefore nobody's.

What to measure

Numbers worth tracking

Metric What it tells you What distorts it
IDocs in error status The health of the interface. Should be checked continuously, not at reconciliation.
Time in error before resolution How quickly failures are noticed. Usually the real gap rather than the error rate itself.
Error reasons by category Master data gaps, mapping faults or genuine business exceptions — three different fixes.
Reprocessing success rate Whether errors are genuinely fixed or repeatedly retried against the same cause.
FAQ

Questions we are asked about this

An IDoc is asynchronous and queued, with a stored document and a status trail. A synchronous API call returns a result immediately and keeps no equivalent record unless you build one.
Usually yes. Once the underlying data or configuration problem is corrected, the IDoc can be reprocessed from its stored content rather than resent by the partner.
No, though they are no longer the default for new integrations. IDocs remain well suited to high-volume asynchronous batch exchange, particularly classic EDI with established trading partners, and they carry decades of standard message types you would otherwise rebuild. Synchronous, low-latency and external-facing integrations are better served by OData or REST. Most real landscapes run both, and choosing by workload rather than by fashion is the sound approach.
An IDoc is a document format exchanged asynchronously — it is sent, queued and processed independently of the sender. A BAPI is a function call, invoked synchronously, returning a result to the caller immediately. The practical difference is error handling: a failed BAPI tells the caller at once, while a failed IDoc sits in a queue until somebody looks. That is why IDoc monitoring is not optional.
You correct the resulting document, not the IDoc. A posted IDoc has done its job and its status reflects that; reprocessing it will usually create a duplicate rather than fix anything. The IDoc remains valuable as evidence of what was received and when, which is often the quickest way to establish whether a discrepancy originated with you or with the sender.
Extend, almost always. An extension to a standard type keeps SAP's processing logic and segment definitions while adding your fields, so standard upgrades continue to apply. A fully custom basic type means you own the processing logic forever. The exception is a message that has no standard equivalent at all, which is rarer than it first appears — check the catalogue before concluding it.
Related

Where to read next

What is ABAP?

Read more

Our integration services

Read more

Our SAP consulting services

Read more

Need this applied to your own systems?

We build and support the systems this page describes. Start with a free working proof of concept — no cost, no commitment.