Guides

SAP EDI integration guide: IDocs, partner profiles and best practices

How EDI connects to SAP ECC and S/4HANA through IDocs, the configuration involved and the practices that keep it reliable.

3 min read · Updated October 19, 2026

The short answer

SAP EDI integration usually runs through IDocs. An EDI translator converts partner documents into IDocs such as ORDERS for sales orders, and SAP generates outbound IDocs such as ORDRSP, DESADV and INVOIC from output determination. Partner profiles, ports, customer material info records and EDI conversion tables tie it together; S/4HANA adds released APIs and new output management options.

How EDI flows through SAP with IDocsSequence diagram for SAP: the trading partner’s 850 is converted by the EDI translator into an inbound ORDERS IDoc through the WE21 port. SAP applies the WE20 partner profile and conversions from customer material info records, EDPAR and EDSDC, and creates the sales order. Output determination generates ORDRSP, DESADV and INVOIC IDocs, which the translator sends as 855, 856 and 810.How EDI flows through SAP with IDocsThe translator converts X12 to IDocs; partner profiles and ports connect SAP to itTrading partnerEDI translatorSAP850 purchase orderInbound ORDERS IDocThrough the port defined in WE21Partner profile (WE20) and conversionsVD51 customer materials, EDPAR partners, EDSDC sales areaSales order createdOutbound ORDRSP, DESADV andINVOIC IDocsGenerated by output determination855, 856 and 810Transactions, tables and message types as described in this guide. Your SAP release and configuration decide the details.
How EDI flows through SAP with IDocsSequence diagram for SAP: the trading partner’s 850 is converted by the EDI translator into an inbound ORDERS IDoc through the WE21 port. SAP applies the WE20 partner profile and conversions from customer material info records, EDPAR and EDSDC, and creates the sales order. Output determination generates ORDRSP, DESADV and INVOIC IDocs, which the translator sends as 855, 856 and 810.How EDI flows through SAPwith IDocsThe translator converts X12 to IDocs; partnerprofiles and ports connect SAP to itTradingpartnerEDItranslatorSAP850 purchase orderInbound ORDERS IDocThrough the port defined inWE21Partner profile (WE20)and conversionsVD51 customer materials,EDPAR partners, EDSDCsales areaSales order createdOutbound ORDRSP,DESADV and INVOICIDocsGenerated by outputdetermination855, 856 and 810Transactions, tables and message types as describedin this guide. Your SAP release and configurationdecide the details.

Read from top to bottom. IDoc message types map to X12 documents: ORDERS to the 850, ORDRSP to the 855, DESADV to the 856 and INVOIC to the 810. WE02 and WE05 show each IDoc and its status history.

Expand diagram Download SVG

How EDI and SAP fit together

SAP does not exchange X12 or EDIFACT directly. It exchanges IDocs (intermediate documents), structured messages that represent business objects such as orders, deliveries and invoices. An EDI translator or integration platform sits between SAP and trading partners, converting partner documents to IDocs and back.

Partner (X12 850) → Translator → ORDERS IDoc → SAP sales order
SAP delivery → DESADV IDoc → Translator → Partner (X12 856)

Common message types

Business documentX12SAP message typeTypical basic type
Customer order850ORDERSORDERS05
Order response855ORDRSPORDERS05
Order change860ORDCHGORDERS05
Ship notice856DESADVDELVRY series
Invoice810INVOICINVOIC02
Remittance advice820REMADVPEXR2002

Exact basic types depend on your release and configuration.

Key configuration

Partner profiles and ports

  • Partner profiles (WE20) define, for each trading partner, which message types are exchanged, in which direction, and how they are processed.
  • Ports (WE21) define how IDocs move between SAP and the integration layer, such as file, tRFC or HTTP ports.

Inbound processing

Inbound IDocs are assigned a process code that calls the posting logic. For customer orders, standard processing creates sales orders from ORDERS IDocs. Failed IDocs keep an error status that can be corrected and reprocessed.

Outbound processing

Outbound IDocs are typically triggered by output determination: an order confirmation output on the sales order, a shipping notification output on the delivery, an invoice output on the billing document. ECC uses the condition technique; S/4HANA can use the same approach or the newer output management framework, depending on configuration.

Master data conversion

Several standard tables translate partner data into SAP data:

  • Customer material info records (VD51) map customer item numbers to SAP materials.
  • EDI partner conversion (VOE4, table EDPAR) converts external partner numbers, such as store numbers, into SAP customer numbers.
  • Sales area determination for EDI (VOE2, table EDSDC) assigns the sales area for inbound orders.

Missing entries in these tables are among the most common reasons inbound orders fail.

Monitoring and testing

  • WE02 / WE05: display IDocs and their status history.
  • BD87: reprocess IDocs after fixing the cause.
  • WE19: test tool for creating and processing test IDocs.

These tools show IDoc status, but not whether the partner received an acknowledgment or whether the order eventually shipped and was invoiced. End-to-end monitoring in the integration layer fills that gap.

S/4HANA considerations

  • Edition matters. Public cloud editions rely more on released APIs, such as OData services for sales orders, while private cloud and on-premises editions commonly continue with IDocs.
  • Migrating from ECC. Many IDoc interfaces carry forward, but output determination, custom IDoc extensions and partner profiles need review. See the ERP migration checklist.
  • Clean core. Keeping partner-specific logic in the integration layer rather than custom ABAP simplifies future upgrades.

Best practices

  • Keep partner-specific mapping in the integration layer; keep SAP on standard IDocs where possible.
  • Maintain customer material info records and EDI conversion tables as part of partner onboarding.
  • Use output determination consistently so outbound documents are triggered by business events.
  • Monitor IDoc errors and business outcomes together.
  • Document every extension to standard IDocs.
SAP S/4HANA integration and implementationIntegration methods, document mappings and ECOM services for SAP S/4HANA.

Frequently asked questions

Does SAP translate EDI by itself?

No. SAP exchanges IDocs, its own document format. A separate EDI translator or integration platform converts between IDocs and X12 or EDIFACT and handles partner communication.

Which IDoc is used for inbound sales orders?

Inbound customer orders typically use message type ORDERS with basic type ORDERS05, processed by the standard inbound function for sales orders.

Does S/4HANA still support IDocs?

Yes. IDocs remain widely used in S/4HANA, especially on premises and in private cloud. Public cloud editions emphasize released APIs.

How do we monitor SAP IDocs?

Common tools include WE02 or WE05 to display IDocs and their statuses, and BD87 to reprocess failed IDocs. An integration platform adds end-to-end monitoring across partners.

Have an EDI question we did not answer?

ECOM's integration specialists can review your partners, documents and systems and recommend next steps.