Learn how to set up EDI interfaces in SAP S/4HANA to automate the exchange of procurement documents like purchase orders, invoices, and order confirmations between buyers and suppliers.
Supplier collaboration is vital in automating, standardizing, and streamlining the procure-to-pay process in materials management. Business documents such as purchase orders, purchase order confirmations, ASNs, invoice documents, and so on are shared between the buyer’s and supplier’s ERP systems electronically via EDI. Let’s explore the setup of these interfaces in SAP S/4HANA, assuming that SAP S/4HANA is the ERP system on the buyer side.
Let’s start with the outbound EDI interfaces from SAP S/4HANA.
The purchase order and the scheduling agreement delivery schedule are two important documents that will be shared by the buyers with supplier business partners. SAP S/4HANA generates IDocs for transmitting purchase orders (message type ORDERS) and scheduling the agreement delivery schedule (message type PURSAG_MAINTAIN) for business partners (suppliers) in real time via EDI.
SAP S/4HANA uses output determination for generating and transmitting outbound IDocs to an external system. Output messages are automatically generated during the creation of a purchase order and transmitted to suppliers after the purchase order is released or approved. NEU is the standard output type used to transmit purchase orders and scheduling agreement delivery schedules.
Let’s walk through the main configuration steps for outbound EDI interfaces.
The condition technique is used for output determination for the message output in SAP S/4HANA. Creating an output determination condition record enables the automation of generating and transmitting output messages. To create, change, or display an output condition record, use the following transactions:
Use Transaction MN05 to arrive at the screen shown in the figure below, which is the initial screen for changing an output condition record for output type NEU. Specify the output type NEU in the entry field and then press (Enter). The Key Combination popup will be displayed. Key combinations can be configured based on business requirements to determine the output condition record during the creation of a purchase order and a scheduling agreement delivery schedule.
For example, if you maintain an output condition record for purchasing output determination with the key combination set to Doc.Type/Purch.Org/Vendor, the output condition record will be determined during the creation of the purchase order automatically when the same combination of a document type, purchasing organization, and vendor is found in the purchase order.
Press (Enter) after selecting a key combination from the initial screen. The next figure shows the output condition record details that are created for output type NEU and with key combination Purch.Org/Vendor for EDI.
The following are the key fields of the output condition record:
Output Medium | Description |
1 | Print output |
2 | Fax |
4 | Telex |
5 | External send |
6 | EDI |
Thie figure shows that output record with output type NEU was generated automatically to trigger an EDI output that transmitted a purchase order to supplier 200080.
Ports are used in IDoc processing to define the communication channel for transmitting outbound IDocs from SAP S/4HANA to external systems and business partners. The following are the different types of ports in SAP S/4HANA:
Ports are defined in SAP S/4HANA using Transaction WE21. A prerequisite for creating a port for IDoc processing is to define a remote function call (RFC) destination using Transaction SM59. The RFC destination contains the logical address and the authentication of the destination (target) system.
The figure below shows information for transactional RFC port A000000004. You can see the RFC destination field, where you specify an RFC destination to communicate the IDoc messages to the target system. The RFC destination contains the logical address and authentication details for the data transfer through IDocs.
The partner profile consists of logical attributes to send and receive application documents (messages) electronically using IDocs. For every logical system, vendor, customer, other business partner, and so on, a partner profile must exist in SAP S/4HANA to process inbound and outbound IDocs.
Partner profiles are created in SAP S/4HANA using Transaction WE20 for the partner types shown in this table.
Partner Type | Description |
AD | Address |
B | Bank |
BP | Benefits provider |
GP | Business provider |
KU | Customer |
LI | Vendor |
LS | Logical system |
US | User (first 10 characters, no check) |
A partner type is a vital attribute to create a partner profile. To create a new partner profile, execute Transaction WE20 and click the Create icon at the top. Then specify a partner type and the corresponding partner number. Now, let’s discuss the various attributes of a partner profile while examining an existing profile created for a vendor.
To display an existing partner profile, click the arrow in front of a partner type on the left-hand side to expand the list. This arrow will appear only if at least one partner profile exists for the partner type. Then, double-click a partner number.
This figure shows the partner profile created for vendor 200080 using partner type LI (vendor), the outbound IDoc message type ORDERS (purchase order), and the partner function VN. In the partner profile, you can define the inbound and outbound message types and the corresponding IDoc processing parameters.
Let’s dive deep into the settings required in the partner profile for processing outbound IDocs:
Then, under the Post Processing: Valid Processors tab, you can define a user who gets the error messages if any during the IDoc processing. Specify “US” in the Ty. (user type) field, the user ID of the user who gets error messages in the Agent field, and the desired language in the Lang field as the postprocessing parameters.
Next, maintain the outbound options. Click the + icon under the Outbound section of the partner profile initial screen. This figure shows the outbound parameters of the partner profile for transmitting a purchase order to an external system via EDI using IDocs.
The Outbound Options tab has the following key fields:
Let’s explore message control settings in the partner profile. In the Message Control tab of outbound parameters, you can link the corresponding output type of the application document (e.g., purchase order output type). This is how the system generates the IDoc and transmits it to the receiver port for sending the electronic document to the business partner. The next figure shows Message Control attributes such as application EF (purchase order), message type NEU (purchasing output type), and process code ME10 (purchase order).
If the NEU output message is triggered with medium 6 (EDI) from purchase order creation, the system checks the corresponding partner profile for the partner function of the output message using message type NEU and the partner ID of the vendor.
Process code ME10 is defined for the purchase order transmission in the standard system. It contains a function module to process the purchase order IDoc.
This figure shows the EDI Standard attributes of the partner profile for the purchase order transmission. Message type 850 represents the EDI standard for the purchase order transmission.
The purchase order confirmation, ASN, and invoice are the most important documents received from the supplier. To receive them via EDI, IDocs with specific message types and basic types must be generated in the EDI system or external system and sent to SAP S/4HANA. A partner profile for the respective partner and partner type is mandatory to process the inbound IDocs.
Let’s walk through the main configuration steps for inbound EDI interfaces.
To maintain inbound options for a partner (e.g., vendor), go back to the partner profile initial screen. Click the + icon under the Inbound section of the partner profile initial screen to arrive at the inbound options screen.
This figure shows the partner profile for partner number 200080 and partner type LI (vendor). Inbound parameters of the partner profile are defined for receiving an invoice document from the vendor via EDI using IDocs.
The following are the key fields:
The figure below shows the partner profile for partner 200080 and partner type LI (vendor). Inbound parameters of the partner profile are defined for receiving an order confirmation from the vendor via EDI using IDocs.
The following are the key fields:
Editor’s note: This post has been adapted from a section of the book Integrating Materials Management in SAP S/4HANA by Murthy KP. Murthy is a senior manager at Deloitte with a focus on supply chain and intelligent spend management. He has more than 16 years of SAP experience delivering complex supply chain transformation projects enabled by SAP S/4HANA and SAP Ariba.
This post was originally published 6/2025.