Bulk EDI Splitter using EDI Separator Adapter – B2B Integration Cockpit

In this article, we will discuss the concept of EDI merging and splitting, EDI processing pipeline in B2B-add-on, how to configure EDI Separator/B2B Integration Cockpit to split bulk EDI messages.

EDI (Electronic Data Interchanges) is a global standard that is used to communicate business transactions like sales orders, invoices, etc. between business partners. When the volume of transactions is high, usually multiple EDI messages (transactions) are bundled together as one message before being transmitted to a business partner. The EDI message receiver needs to split the bulk EDI message into individual transactions before processing them.

Why do we need to split EDI messages?

In B2B business processors, often a large number of the transactional data is transmitted between partners. Therefore, it is cost-effective to bundle several transactions in one EDI file rather than transmitting multiple messages. For example, it is more effective to transmit 200 invoices in one EDI file than transmitting each invoice in 200 different files. This can reduce transmission costs through VAN or other networks.

Also, there are scenarios where EDI partner bundles together different types of transactions that are merged into a single EDI file. For example, one EDI file could contain multiple sales orders, invoices and delivery notifications (ASN).

Therefore, EDI message senders collect multiple transactions and message types into one EDI message before transmitting it to the receiver. Hence, at the receiver, these bulk EDI messages should be split into individual transactions and messages before being processed.

In PI/PO, we use the EDI Separator adapter provided with B2B Integration Cockpit to split bulk messages into individual transaction sets.

Prerequisites for Splitting EDI Messages using B2B Add-on:

Before we can implement EDI split scenarios, we need to have B2B Integration Cockpit installed in the SAP Process Orchestration system. Next, we must import the standard Control Key associations to B2B add-on.

Installing B2B Add-on in SAP PI/PO

Before we can implement any B2B integration scenarios through Integration Cockpit, we need to install the add-on if it hasn’t been done yet.

We need to setup components B2B Toolkit, B2B Mapping Kit and B2B EDI Runtime Content to complete the installation. You can follow the detailed guide on how to install B2B Integration Cockpit in my previous article.

Setup Standard Control Key Associations

To integrate standard EDI message formats, SAP has provided a set of B2B standard objects we can reuse in integration scenarios. For example, standard EDI message formats with different versions, EDI message XSDs, Control Key associations are some of the standard objects provided by SAP. You can download them directly from SAP Marketplace and import them to your system. The set of objects is known as B2B EDI Runtime Content.

These reusable objects come in handy when the integration scenario uses standard EDI formats. You can check my previous posts on how to import standard content to PI/PO and set up B2B EDI Runtime Content for detailed guides.

Message Processing Pipeline for EDI Splitting via B2B Integration Cockpit

Let us assume we have an EDI partner who delivers EDI files to SAP PI/PO using AS2 protocol. EDI files can have multiple messages such as order (ORDERS) and deliveries (DESADV). From the EDI messages received, sales orders and deliveries should be created in SAP S4 HANA back-end system.

B2B Integration Cockpit's message processing pipeline overview diagram. Messages are split by EDI seperator reciver adapter and processed by EDI seperator sender adapter.
Message Processing Pipeline for EDI Splitting in SAP PI/PO

Step 1 – Sender Adapter (AS2)

The first step of the processing pipeline is done by the sender adapter. The adapter engine connects with the external system and extracts EDI file for processing. With B2B Integration Cockpit, SAP has provided several EDI specific adapters such as AS2, OFTP and X100. Depending on the communication capabilities of external EDI partners, we can use not only these adapters but any adapter from the Adapter Engine to exchange EDI files.

Step 2 – EDI Separator Receiver Adapter

The EDI files extracted from EDI partner are then sent to EDI Separator Receiver Adapter (Communication Channel). At the EDI Separator receiver adapter, EDI file is split into individual transaction sets (messages).

EDI Separator receiver adapter always splits EDI messages to individual messages. The splitting criteria depend on the EDI message format. For example, ANSI X 12 EDI files are split at each “ST” (Transaction Set) segment. EANCOM EDI files are split at each “UNH” (Message Header) segment.

Step 3 – EDI Separator Sender Adapter

Then the EDI Separator Sender Channels pick these individual EDI messages and route them to the Operation and Message mapping program. Another important process performed by the sender EDI separator Communication Channel is converting the EDI message to EDI XML. SAP has provided different Converter Adapter modules to transform different types of EDI formats to XML. We will look at how to configure these Adapter Modules in this article.

Step 4 – EDI to iDoc Message Mapping

Next, individual EDI XML messages are mapped with relevant iDoc messages using appropriate message mapping programs.

Step 5 – Receiver iDoc_AAE Adapter

Finally, iDoc XMLs returned by message mapping programs are sent to SAP back-end system via iDoc_AAE receiver adapter.

ANSI X 12 EDI Split Scenario with Configuration

Let’s assume we have a scenario where multiple invoice (EDI 810) messages are sent by the EDI partner in one message. We need to split them into individual invoice messages and map them to INVOIC.INVOIC02 iDoc.

EDI Message formatANSI X12
Transaction set810 (Invoice)

Bulk ANSI X12 EDI File

Here we have an EDI file with one ISA envelope and two invoices in two ST segments.

ISA/IEA Segment – Interchange Envelope

EDI envelope for ANSI X 12 starts with ISA and ends with a corresponding IEA segment. This is called the Interchange Envelope of the EDI file.

You can find transmission information such as Data separator, Interchange Sender ID, Interchange Receiver ID, Date, Time, Interchange Control Number, etc. under Interchange Envelope.

In this example,

Authorization Information Qualifier00
Security Information Qualifier00
Interchange ID QualifierZZ
Interchange Sender IDSender_ID1
Interchange ID Qualifier01
Interchange Receiver IDReceiver_ID1
Repetition SeparatorU
Interchange Control Version Number00400
Interchange Control Number000000145
Acknowledgment Requested0
Usage IndicatorP

GS/GE Segment – Functional Group

The functional group is the inner envelope of EDI file inside ISA/IEA segment. Functional Group can contain multiple Transaction Sets (ST/GE) all of the same type. For example, it can hold multiple invoices or multiple purchase orders, etc. But all the Transactional Sets inside one Functional Group should be of the same type.

Functional ID codeIN
Interchange Sender IDSender_ID1
Interchange Receiver IDReceiver_ID1
Date and Time20191109/0509
Group Control Number145
Responsible Agency CodeX
Version/Release/Identifier Code004010

ST/GE Segment – Transactional Set

In ANSI X12 every transactional Set is represented by a three-digit code. For example, 810 for invoices, 856 for ASN, 997 for Functional Acknowledgment, etc.

Transactional Set in ANSI X12 starts with a ST segment and ends with a GE segment.

Transaction Set Identifier Code810
Transaction Set Control Number0001

In the Receiver EDI Separator adapter, these Transaction Sets are split into individual Transactions. We can use B2B Number Range Objects to assign Control Numbers of outgoing EDI messages.

Let’s look at how to configure the EDI splitting integration scenario.

Step 1 – Confirm EDI Runtime Content is available

Before moving to configuration, confirm EDI Runtime Content for EDI Invoice message Type 810 and version 004010 is available in EDI Content Manager.

Control KeySAP
Message FormatANSI X12
Definition of EDI messages should be available in EDI content manager of B2B cockpit. ANSI X12 810 message version 004010 available in EDI content manager.
EDI Definition for ANSI X12 810 message Version 004010

Step 2 – Download EDI XSD

Download the XSD schema of the EDI 810 message’s XML format.

ANSI X12 XSD generator menu option of EDI content manager.
ANSI X12 XSD Generator
Message Type and Version Selection of XSD Generator of EDI content manager.
Message Type and Version Selection of XSD Generator

Step 3 – Create External Definition

Create an External Definition with the downloaded XSD.

EDI XSD imported to ESR as an External Definition. External Definition name EDI_810_004010
EDI XML (XSD) Imported to ESR as an External Definition

Step 4 – Create an Outbound Service Interface

Assign External Definition as the Data Type to create an Outbound Service Interface.

Outbound Service Interface for EDI Separator sender.
EDI Sender Outbound Service Interface

Step 5 – Import iDoc Type to ESR

Import the target iDoc structure to ESR.

INVOIC message type with INVOIC02  basic type idoc schema imported to ESR from SAP.
iDoc imported to ESR

Step 6 – Create Message Mapping between EDI XML and iDoc

Create a mapping program between source EDI XML format and target iDoc structure.

Message mapping program for EDI XML and inbound iDoc. EDI External definition as the sender structure and iDoc as thew target.
Message Mapping between EDI XML and Inbound iDoc

Assign the EDI External Definition we created in Step 3 to the sender message type and iDoc type we imported in Step 5 to the target Message Type.

Map the iDoc Control Record and other relevant segments/fields of the iDoc.

Step 7 – Create Operation Mapping between EDI Sender Service and iDoc

Using the Outbound Service Interface, iDoc imported, and Message Mapping created in previous steps, build an Operation mapping.

Operation mapping between EDI Separator sender service EDI_810_004010_Out_Async and iDoc reciver INVOIC.INVOIC02.
Operation Mapping for EDI Separator Sender and iDoc Reciever

Step 8 – Create and Configure EDI Separator Reciever Channel

Configure EDI Separator receiver adapter that splits EDI files. This Channel splits the bulk EDI file into multiple Transaction Sets.

Adapter TypeEDISeperator
Transport ProtocolPI
Message ProtocolElectronic Document Interchange
Adapter EngineCentral Adapter Engine
FormattingIndent messages, Enable Plain, XML and Default
EDI Separator Receiver Adapter General Configuration
EDI Separator Receiver Adapter General Configuration
EDI Separator Receiver Adapter ANSI X12 Configuration
EDI Separator Receiver Adapter ANSI X12 Configuration

Step 9 – Create and Configure EDI Separator Sender Channel

Configure a sender EDI Separator Communication Channel that picks split EDI messages (Transaction Sets) of Type 810 with Interchange Sender ID as “Sender_ID1” and Interchange Receiver ID as “Receiver_ID1”.

EDI separator sender communication channel configuration
EDI Separator sender adapter configuration
Adapter TypeEDISeperator
Message ProtocolANSI X12
Version/Release/Identifier Code004010 (ASC X12)
Transaction Set Identifier Code810
Interchange Sender IDSender_ID1
Interchange Sender ID QualifierZZ
Interchange Receiver IDReceiver_ID1
Interchange Receiver ID Qualifier01
Character EncodingUFT-08

Not only does EDI Separator sender Adapter pick individual EDI Transaction Sets split by Receiver Adapter, but also converts ANSI X12 EDI format to XML.

EDI format is converted to XML by adapter modules. To convert EDI files of format ANSI X12 to XML, we need to use the adapter module “localejbs/X12ConverterModule”.

Complete list of EDI to XML Converter Modules in SAP PI/PO

EDI FormatConverter Module
ANSI X12localejbs/X12ConverterModule
EDIFACT localejbs/EdifactConverterModule
EANCOM localejbs/EdifactConverterModule
ODETTE localejbs/OdetteConverterModule
TRADACOMS localejbs/TradacomsConverterModule
VDA localejbs/VdaConverterModule
PLAIN localejbs/PlainConverterModule
EDI Seperator Sender Channel Adapter Module Configuration
EDI Separator Sender Channel Adapter Module Configuration

Step 10 – Create EDI Sender Communication Channel

Create a Communication Channel that extracts EDI files from the external partner. Use a suitable protocol depending on the scenario. For this example, I will create an AS2 sender Communication Channel.

Common EDi sender communication channel configuration for AS2 adapter.
Common EDI sender Adapter – AS2

Step 11 – Create an iFlow from EDI Partner Sender System to EDI Separator

Build a common EDI sender interface from EDI partner to EDI Separator Reciever Adapter. You can use an internal Business Component or a Business System to represent the EDI Separator receiver.

This interface is just a pass-through without any mapping.

EDI sender partyEDIPartner
EDI sender Communication ComponentB2B
Inbound Service InterfaceB2B_Common_Inb_Async
Sender Communication Channel (AS2)AS2_s_Common
Receiver Communication ComponentBC_B2B
Outbound Service InterfaceB2B_Common_Out_Async
Receiver Communication ChannelEDISeparator_r
Bulk EDI processing common interface from EDI sender party to EDI separator adapter
Bulk EDI extraction iFlow
Bulk EDI sender component with sender AS2 communication channel
Bulk EDI sender AS2 Communication Channel
Receiver Interface for EDI Separator
Receiver Interface for EDI Separator
EDI Separator Receiver Communication Channel
EDI Separator Receiver Communication Channel

Step 12 – Configure iFlow from EDI Separator to SAP Back-end System

The second iFlow is needed to process the EDI files split by the EDI Separator receiver adapter. This is the integration flow that captures individual Transaction Sets and executes mapping between EDI XML and iDoc.

Communication partyEDIPartner
Communication ComponentB2B
Inbound InterfaceEDI_810_004010_Out_Async
Sender Communication ChannelEDISeparator_s_810
Receiver InterfaceINVOIC.INVOIC02
Operation MappingEDI_810_004010_to_INVOIC_INVOIC02
Receiver ChanneliDoc_r
Receiver Business SystemSSXCLNT900
Split EDI transaction set processing iFlow. from EDI separator sender adapter to SAP back-end.
Split EDI transaction set processing iFlow
Split EDI inbound processing from B2B component (EDI separator adapter)
EDI Separator (810) sender Communication Channel
iDoc Receiver Communication Channel

How to Test EDI Splitting in PI/PO

Let’s test the complete EDI splitting interface using the Test Tool.

To test the scenario go to Test Tool and trigger the EDI Common interface from EDI partner. This is the first iFlow we built in step 11.

Assign the EDI message to test tool and execute the common EDI iFlow
Test EDI integration via Test Tool

Message Successfully Processed by EDI Reciever Adapter

EDI message is passed from the EDI partner to EDI Separator Receiver Adapter and processed successfully.

Message processing of common EDI to EDI Separator Receiver
Message processing of common EDI to EDI Separator Receiver

Bulk EDI Message Split into Multiple Transaction Sets by EDI Separator

EDI File split into two 810 Transaction Sets by EDI Separator adapter.

Bulk EDI message split into two transaction sets- message log
Bulk EDI message split into two transaction sets (viewed in message log)

Split EDI Messages Picked up by EDI Separator Sender Adapter

Split EDI Transaction Sets picked by Sender Channel
Split EDI Transaction Sets picked by Sender Channel
EDI Separator Sender Adapter to iDoc processing successful in message monitor
EDI Separator Sender Adapter to iDoc processing (viewed in message monitor)

EDI Message Converted to XML by Adapter Module

EDI message transformed to XML by ANSI X12 Converter Module in message log
EDI message transformed to XML by ANSI X12 Converter Module

XML of Invoice # “InvoiceNo1”

XML of Invoice # “InvoiceNo2”

EDI XML Mapped with iDoc Reciever

Converted EDI XML by EDI separator Sender adapter mapped with INVOIC02 iDoc by Massage Mapping Program.

EDI XML mapped with the iDoc by message mapping program
EDI XML mapped with iDoc

iDocs Generated in SAP

Two invoice iDocs generated in SAP back-end system.

To summarize, EDI messages are often transmitted as a collection of Transactions in one message. EDI message receivers should split them and process them individually. B2B Integration Cockpit provides a set of functionalities to split and process bulk EDI messages. You can configure iFlows and B2B Integration Cockpit to set up as shown above to process bulk EDI messages.

Please leave a comment if you have used any other techniques and if you have any questions about the EDI processing procedure described here.


These are some of the tech gadgets I use every day. If you make a purchase through these links I will earn a small comission at absolutely no extra cost to you.

4 thoughts on “Bulk EDI Splitter using EDI Separator Adapter – B2B Integration Cockpit

  1. Indraneel says:

    The articles are indeed very good .However will appreciate if you can specify an article on below topics
    a) The best practise method to integrate SAP TM with non SAP warehouse management system ( both inbound and outbound)
    b) The pointers which will help to identify if integration needs to be done using A2A or B2B for warehouse integrations.

  2. Divya Dharmapuri says:

    Hello Isuru Fernando,

    Thanks for this article. Appreciate your efforts in collecting and publishing this information.
    I am an SAP PO integration consultant and found this information very helpful. Keep up the good work!


  3. Peter says:

    Hello Isuru,

    Thank you, that is a very good blog.
    I have a similar setup and I have a question.
    1) I have “AS2 –> EDI Sep. Receiver” -> Communication Comp. BS_EDI_SEPARATOR but no Communication Party.
    2) now in the next step, can I have multiple EDI Sep. Sender with Communication Comp. but with Communication Party? (PARTNER | BS_EDI_SEPARATOR)

    I tried it but the message got stuck and the message log told me there was a “binding” problem.

    Thank you,

Leave a Reply

Your email address will not be published. Required fields are marked *