Language & Region
SAP Wiki

SAP EDI: Electronic Data Interchange in an SAP Environment

EDI stands for Electronic Data Interchange, which refers to the electronic exchange of structured business data between business partners.

In an SAP environment, SAP EDI enables seamless and standardized communication between SAP systems and external systems, such as those of suppliers, customers, or logistics partners.

With EDI, business documents like purchase orders, invoices, or delivery notes can be exchanged automatically. Combined with SAP S/4HANA, SAP EDI becomes even more efficient, as modern interfaces and new technologies such as APIs complement the traditional IDoc-based communication.

Key Benefits of SAP EDI at a Glance

BenefitsDescription
AutomationReduces manual data entry
SpeedEnables faster processing of business documents
Error ReductionMinimizes typing and transmission errors
StandardizationConsistent data formats and processes
IntegrationDirect connectivity with business partners worldwide

How Does EDI Work in SAP?

The foundation of SAP EDI is the IDoc format (Intermediate Document) – a standardized SAP format for structured data. It serves as a transport medium for information between SAP systems and external systems.

The process can be summarized as follows:

  • Trigger in the SAP system (e.g., a purchase order is created)
  • Creation of an IDoc
  • Transmission via the EDI interface (e.g., through ALE, RFC, FTP, or web services)
  • Receipt by the partner system, which interprets and processes the IDoc
     

Commonly Used EDI Message Types in SAP

Message TypeDescription
ORDERSPurchase Orders
INVOICInvoices
DESADVDespatch Advice (Delivery Notes)
DELFORDelivery Forecast/Schedule
REMADVRemittance Advices
PRICATPrice Catalogs

These message types are particularly relevant in logistics, finance, and in collaboration with warehouse and fulfillment service providers.

Use Case: EDI Ordering Process with SAP

  1. A purchaser in the SAP system creates a purchase order (transaction ME21N).
  2. The system then generates an ORDERS IDoc.
  3. An EDI converter translates the IDoc into an EDI format such as EDIFACT or ANSI X12.
  4. The supplier receives and processes the order automatically.
  5. Upon shipment, a DESADV IDoc is sent back to the SAP system.

Important Transactions & Tools

TransactionFunction
WE02 / WE05Display IDocs
WE20Maintain Partner Profiles
WE19Test Tool for IDoc Simulation
BD87Reprocess Faulty IDocs
WE60Display IDoc Documentation

Error Handling: “Partner Profile not available”

This common EDI error message indicates that no matching partner profile exists in the system for an incoming or outgoing IDoc.

Possible causes:

  • Partner number not maintained correctly (e.g., missing UNB segment definition)
  • Message type or process code not assigned
  • No corresponding entry in transaction WE20 

Solution Approach: 

  1. Check the entry in WE20 for the affected partner.
  2. Verify the partner type (e.g., LI for supplier, KU for customer) and partner number.
  3. Ensure the message type is correctly linked.
  4. Confirm that the process code is active and a valid processing program is assigned.

Optional: Simulate the IDoc in WE19 and test the process step by step.

Structure of an IDoc in SAP

An IDoc (Intermediate Document) is the core data structure for electronic data interchange in SAP. It follows a clear, hierarchical structure consisting of three main components:

  1. Control Record
    Contains general information about the IDoc, such as sender, receiver, partner number, message type, and IDoc number.
  2. Data Records
    Include the actual business data, such as order numbers, delivery quantities, or invoice amounts. Each segment has a defined structure that is maintained in the SAP system via the segment definition.
  3. Status Records
    Document the processing status of the IDoc, e.g., “Successful outbound transmission” or “Error passing data to port”. These entries are essential for monitoring and error analysis.

Example Structure of an ORDERS IDoc

A commonly used IDoc is the ORDERS IDoc, which transmits purchase orders electronically. Its structure typically consists of the following components:

  • Control Record
    • Message Type: ORDERS
    • Partner Type: KU (Customer) or LI (Vendor)
    • Partner Number: Unique identifier of the business partner
    • Port: Communication channel (e.g., ALE, EDI converter)
  • Document Header (General order information)
    • E1EDK01: Contains purchase order number, document date, and currency
    • E1EDK14: Additional document information (e.g., order type, payment terms)
    • E1EDK03: Date elements (e.g., delivery date, validity period)
    • E1EDKA1: Partner functions (e.g., vendor, ship-to party, bill-to party)
  • Item Data (Details for purchase order items)
    • E1EDP01: Article number, quantity, units of measure
    • E1EDP19: Identification numbers (e.g., GTIN, vendor number)
    • E1EDP20: Prices and conditions at item level
    • E1EDP26: Quantity details (e.g., packaging units, delivery quantity)
  • Additional Information
    • E1EDK17: Reference number (e.g., Customer number, internal document number)
    • E1EDKT1 / E1EDKT2: Texts at header or item level (e.g., notes, delivery instructions)
  • Status Records
    • Document the processing progress:
      • 03: Data passed to port OK
      • 12: Dispatch OK
      • 53: Application document posted

In summary, an IDoc is modular in structure, capable of containing both general and detailed item-level information. Depending on the message type (e.g., ORDERS, DESADV, INVOIC), the segments used may vary – but the underlying principle remains the same.

FAQ on SAP EDI

What Does EDI Mean in the SAP Context?

EDI refers to the electronic exchange of business data using standardized formats (IDocs) between SAP systems and external partners.

What Role Do IDocs Play?

IDocs are the transport structure for EDI data in SAP. They enable standardized communication and data exchange between systems.

What Should You Do if the Message “Partner Profile not available” Appears?

Check the partner profile in transaction WE20, verify the message type and partner number, and ensure that the process code is active and correctly assigned.

What Does the Future of SAP EDI Look Like?

With the increasing adoption of web service APIs and the overall shift toward cloud architectures, the question arises whether EDI will soon be replaced. Over the decades, numerous companies have implemented classic EDI integration scenarios based on the IDoc format. For SAP S/4HANA deployments in both Private Cloud and on-premises environments, IDocs remain the primary standard format for data exchange. In contrast, within the Public Cloud context, the focus is shifting toward integration technologies such as OData or SOAP APIs. These interfaces offer advantages for real-time processing of smaller data volumes but show limitations when handling large-scale data transfers, where asynchronous IDoc communication continues to perform more efficiently.

SAP’s strategic roadmap emphasizes the Public Cloud and the increased use of standard APIs from the S/4HANA Public Cloud system. However, the “classic” IDoc-based integration still provides clear advantages in certain areas – particularly in terms of customization flexibility and mass data handling. As a result, it is expected that different integration scenarios will continue to coexist for some time, with organizations leveraging both modern API-based and traditional EDI/IDoc-based approaches depending on their specific requirements.