B2B Scenario Sender EDI to IDOC
Share

[[{“value”:”

Introduction

Hi SAP Community, In this blog post, we will explore how to implement a B2B Scenario Sender: EDI to IDOC. This blog provides a step-by-step procedure explaining the whole process in a simple manner. So let’s walk through this journey together!

First, we need to download the source and target structures (MIGs).

In my Scenario Source MIG is (EDIFACT-ORDERS) and Target MIG is (S4-IDOC Purchaseorder).

Go to Design → MIG → Message implementation guidelines → click on create

Screenshot 2025-10-29 093947.png

Search with EDIFACT and select (UN/EDIFACT)

Screenshot 2025-10-29 094016.png

 

Search with ORDERS and select purchase order as below

Screenshot 2025-10-29 094043.png

 

Select the required version in my case its D.93A S3

Screenshot 2025-10-29 094105.png

 

Select with envelope

Screenshot 2025-10-29 094155.png

 

Skip the sample payload upload step

Screenshot 2025-10-29 094226.png

 

Provide Name, Direction, Business process(it can be anything in my case I kept as
create order)

Screenshot 2025-10-29 094253.png

 

Click on create and MIG gets created as below

Screenshot 2025-10-29 094329.png

 

Now we need to download receiver MIG

Search with SAP S/4HANA On Premise IDoc and select it

Screenshot 2025-10-29 094407.png

 

In my case it’s (ORDERS.ORDERS05)

Screenshot 2025-10-29 094431.png

 

Select version as per your requirement

Screenshot 2025-10-29 094503.png

 

Skip the sample payload upload step

Screenshot 2025-10-29 094524.png

 

Provide Name, Direction, Business process(it can be anything in my case I kept as
create order)

Screenshot 2025-10-29 094542.png

 

Click on create and MIG gets created as below

Screenshot 2025-10-29 094615.png

Both Source MIG and Target MIG gets generated.

Now we need to create MAG (mapping guidelines)

Click on Design → MAG → Click on create

Screenshot 2025-10-29 094650.png

 

Select the source MIG

Screenshot 2025-10-29 094716.png

 

Select the target MIG

Screenshot 2025-10-29 094737.png

 

In the below screen click on create

Screenshot 2025-10-29 094802.png

 

MAG gets created as below

Screenshot 2025-10-29 094829.png

 

In MAG click on Export → SAP Cloud Integration Runtime Artifacts

Screenshot 2025-10-29 094849.png

 

ZIP files gets downloaded

Screenshot 2025-10-29 094919.png

pls unzip it.

Screenshot 2025-10-29 094943.png

 

Below are the files which we will use in further steps.

Screenshot 2025-10-29 095003.png

 

Go to Discover tab and search with ‘EDI’ and select Package EDI Integration Templates
for SAP Integration Advisor

Screenshot 2025-10-29 095033.png

 

My scenario is EDI to IDOC so I will be selecting EDI to SAP IDoc – Inbound as below

Screenshot 2025-10-29 095052.png

 

Click on download, zip file will be downloaded as below

Screenshot 2025-10-29 095117.png

 

Now we need to go to Design tab →Integrations and APIs → Add → Integration flow →
Upload → Select the iflow which was downloaded

Screenshot 2025-10-29 095138.png

Screenshot 2025-10-29 095203.png

Screenshot 2025-10-29 095226.png

 

Open the iflow which is uploaded

Screenshot 2025-10-29 095304.png

 

We need to upload total 4 files
1: In EDI to XML Converter upload (UN-EDIFACT_ORDERS_D93A.xsd)

Screenshot 2025-10-29 095327.png

Screenshot 2025-10-29 095351.png

2: In EDI – Qualifier Pre-Processing upload (TestingEDI_preproc )

Screenshot 2025-10-29 095411.png

Screenshot 2025-10-29 095428.png

 

3: In EDI to SAP IDoc – Mapping upload (Mapping_TestingEDI_to_TestIdoc)

Screenshot 2025-10-29 095446.png

Screenshot 2025-10-29 095511.png

 

4: In SAP IDoc – Qualifier Post-Processing upload (TestIdoc_postproc)

Screenshot 2025-10-29 095542.png

Screenshot 2025-10-29 095605.png

 

I will remove the unwanted steps (EDI Extended Validation (optional), Sender, Receiver, Validate and EDI Interchange steps)

I will use Timer to start the flow

 

I have used the EDI payload in Content modifier to test the flow in starting step.

Screenshot 2025-10-29 095631.png

 

Final IDOC output in body:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<ZORDERS1>
    <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1">
            <TABNAM>EDI_DC40</TABNAM>
            <MANDT>100</MANDT>
            <DOCNUM/>
            <DOCREL/>
            <STATUS/>
            <DIRECT>2</DIRECT>
            <OUTMOD/>
            <EXPRSS/>
            <TEST/>
            <IDOCTYP>ZORDERS1</IDOCTYP>
            <CIMTYP/>
            <MESTYP>ORDERS</MESTYP>
            <MESCOD/>
            <MESFCT/>
            <STD/>
        </EDI_DC40>
    </IDOC>
</ZORDERS1>
```

Once all the steps are completed then EDI will be converted to IDOC which can be sent
to the S4 system.

 

Conclusion

This method simplifies B2B integration through mapping and automation using SAP tools. It reduces manual labor and provides error-free data exchange. By executing these steps, you can manage EDI-to-IDOC scenarios seamlessly and enhance communication between your external partners and SAP system.

 

“}]] 

  Read More Technology Blog Posts by Members articles 

#abap

By ali