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
Search with EDIFACT and select (UN/EDIFACT)
Â
Search with ORDERS and select purchase order as below
Â
Select the required version in my case its D.93A S3
Â
Select with envelope
Â
Skip the sample payload upload step
Â
Provide Name, Direction, Business process(it can be anything in my case I kept as
create order)
Â
Click on create and MIG gets created as below
Â
Now we need to download receiver MIG
Search with SAP S/4HANA On Premise IDoc and select it
Â
In my case it’s (ORDERS.ORDERS05)
Â
Select version as per your requirement
Â
Skip the sample payload upload step
Â
Provide Name, Direction, Business process(it can be anything in my case I kept as
create order)
Â
Click on create and MIG gets created as below
Both Source MIG and Target MIG gets generated.
Now we need to create MAG (mapping guidelines)
Click on Design → MAG → Click on create
Â
Select the source MIG
Â
Select the target MIG
Â
In the below screen click on create
Â
MAG gets created as below
Â
In MAG click on Export → SAP Cloud Integration Runtime Artifacts
Â
ZIP files gets downloaded
pls unzip it.
Â
Below are the files which we will use in further steps.
Â
Go to Discover tab and search with ‘EDI’ and select Package EDI Integration Templates
for SAP Integration Advisor
Â
My scenario is EDI to IDOC so I will be selecting EDI to SAP IDoc – Inbound as below
Â
Click on download, zip file will be downloaded as below
Â
Now we need to go to Design tab →Integrations and APIs → Add → Integration flow →
Upload → Select the iflow which was downloaded
Â
Open the iflow which is uploaded
Â
We need to upload total 4 files
1: In EDI to XML Converter upload (UN-EDIFACT_ORDERS_D93A.xsd)
2: In EDI – Qualifier Pre-Processing upload (TestingEDI_preproc )
Â
3: In EDI to SAP IDoc – Mapping upload (Mapping_TestingEDI_to_TestIdoc)
Â
4: In SAP IDoc – Qualifier Post-Processing upload (TestIdoc_postproc)
Â
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.
Â
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.
Â
​ IntroductionHi 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 createSearch with EDIFACT and select (UN/EDIFACT) Search with ORDERS and select purchase order as below Select the required version in my case its D.93A S3 Select with envelope Skip the sample payload upload step Provide Name, Direction, Business process(it can be anything in my case I kept ascreate order) Click on create and MIG gets created as below Now we need to download receiver MIGSearch with SAP S/4HANA On Premise IDoc and select it In my case it’s (ORDERS.ORDERS05) Select version as per your requirement Skip the sample payload upload step Provide Name, Direction, Business process(it can be anything in my case I kept ascreate order) Click on create and MIG gets created as belowBoth Source MIG and Target MIG gets generated.Now we need to create MAG (mapping guidelines)Click on Design → MAG → Click on create Select the source MIG Select the target MIG In the below screen click on create MAG gets created as below In MAG click on Export → SAP Cloud Integration Runtime Artifacts ZIP files gets downloadedpls unzip it. Below are the files which we will use in further steps. Go to Discover tab and search with ‘EDI’ and select Package EDI Integration Templatesfor SAP Integration Advisor My scenario is EDI to IDOC so I will be selecting EDI to SAP IDoc – Inbound as below Click on download, zip file will be downloaded as below Now we need to go to Design tab →Integrations and APIs → Add → Integration flow →Upload → Select the iflow which was downloaded Open the iflow which is uploaded We need to upload total 4 files1: In EDI to XML Converter upload (UN-EDIFACT_ORDERS_D93A.xsd)2: In EDI – Qualifier Pre-Processing upload (TestingEDI_preproc ) 3: In EDI to SAP IDoc – Mapping upload (Mapping_TestingEDI_to_TestIdoc) 4: In SAP IDoc – Qualifier Post-Processing upload (TestIdoc_postproc) 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. 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 sentto the S4 system. ConclusionThis 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Â
#SAP
#SAPTechnologyblog