Inbound Interface: EDI → SAP BTP (Integration Suite with TPM) → SAP S/4HANA (via IDoc) for B2B

Estimated read time 8 min read

This Blog will guide you to set up an inbound EDI-to-IDOC integration using SAP BTP’s Trading Partner Management (TPM). It involves creating company and partner profiles, defining identifiers, systems, and communications, then configuring agreements and mapping to route EDI messages through BTP IS to SAP S/4HANA via IDOC.

Step 0: Create MIG

0.1: Create a MIG in your Integration Advisor as per below details and use that MIG in the steps 3.2 and 4.3 and refresh & save it.

Step 1: Create Company Profile

Create a new Company for “CPI”.

Note: Only 1 Company Profile can exist per tenant.

1.1: Navigate to the Design tab, choose the B2B Scenario, then select Company Profile within TPM (Trading Partner Management), and click the Create profile button.

Provide Company Name and short name then save it.

1.2: Create Identifier in above company which you have created, in the right side there is Identifier tab at top. You can have as many Identifiers for your Company as you want. In our case we have to create 2 Identifiers for our company, one is for SAP S4 and another for EDI.

Note: for EDI, check Custom Scheme as per EDI and provide Scheme code and Scheme Name as per requirement.

1.3: Go to the Systems Tab of created Company and Create a System.

Click on + button to create new Type.

1.4: Select/Click on above system which you have created, in that new option will open in right side as Create Type System.

Note: The Version of System should match the DOCREL in your EDI Control Record (EDI_DC40) from your IDOC, so please provide the same version which is available in IDOC.

1.5: Select Communication as per the below image and create it.

As we are going to map the EDI file to an IDOC and post it to SAP S4, we need to define a Receiver Communication for our Company. Provide all IDOC details and save it.

 

Step 2: Create Trading Partners

2.1: Go to your Trading Partner Management (B2B Scenarios) in Design and select Partner Profile Tab. Click on Create Trading Partner and provide all details.

2.2: Create Identifiers for above Trading Partner which we have created.

Note: Refer 1.2 for details.

2.3: Create a System for Trading Partner which you have created. Go to the Systems Tab of created Trading Partner and Create a System.

Note: Refer 1.3 for more details.

2.4: Select/Click on above system which you have created, in that new option will open in right side as Create Type System.

Create a Type System for the Trading Partner with the details.

Note: Refer 1.4 for details.

2.5: Create Communication for Trading Partner.

As we will receive the EDI File from our trading partner (HF) from SFTP, we will need to create a Sender Communication for this Trading Partner in TPM. 

Step 3: Define Agreement Template

3.1: We will create an Agreement Template in our Trading Partner Management. The Agreement Template here is where CUSTOMER1 is the Initiator and SAPS4Hana200 is the Reactor.

Select Agreement Templates in Trading Partner Management and click on create button.

3.2: Select MIG if you have created.

3.3: Define the Communication channel (IDoc) in your Template and save it.

Step 4: Define Agreement

4.1: Create an Agreement in your Trading Partner Management as per below details.

You will now see D.96B.S3 in your Trading Partner Agreement. Select that and the remaining Identifiers as per screenshot below.

4.2: Provide Sender Communication Details in Trading Partner Agreement. Select Sender Communication.

Select Communication and save it.

4.3: Provide Sender Interchange Details in Trading Partner Agreement.

Choose MIG and save it.

4.4: Provide Mapping Details in Trading Partner Agreement.

Note: As per our scope, we will not use MAG and use a Message Mapping in Cloud Integration. Select option “Customized Mapping Processing” and provide your Process Direct endpoint of your Iflow (/tpm/Customer1/EDIFACT_ORDERSD86B/IDOC_ORDERS_ORDERS05). Note this endpoint as you will use it in the next step.

4.5: Activate your Trading Partner Agreement.

 

Conclusion:

By following these steps, you can successfully set up an inbound EDI-to-IDOC integration using SAP BTP’s Trading Partner Management (TPM). The process involves creating company and partner profiles, defining identifiers and systems, configuring communications, and establishing agreements. Leveraging MIG for message structure and customized mapping in Cloud Integration ensures that EDI messages are accurately transformed and routed to SAP S/4HANA via IDoc. This approach provides a standardized, scalable, and efficient way to manage B2B integrations on SAP BTP.

 

 

​ This Blog will guide you to set up an inbound EDI-to-IDOC integration using SAP BTP’s Trading Partner Management (TPM). It involves creating company and partner profiles, defining identifiers, systems, and communications, then configuring agreements and mapping to route EDI messages through BTP IS to SAP S/4HANA via IDOC.Step 0: Create MIG0.1: Create a MIG in your Integration Advisor as per below details and use that MIG in the steps 3.2 and 4.3 and refresh & save it.Step 1: Create Company ProfileCreate a new Company for “CPI”.Note: Only 1 Company Profile can exist per tenant.1.1: Navigate to the Design tab, choose the B2B Scenario, then select Company Profile within TPM (Trading Partner Management), and click the Create profile button.Provide Company Name and short name then save it.1.2: Create Identifier in above company which you have created, in the right side there is Identifier tab at top. You can have as many Identifiers for your Company as you want. In our case we have to create 2 Identifiers for our company, one is for SAP S4 and another for EDI.Note: for EDI, check Custom Scheme as per EDI and provide Scheme code and Scheme Name as per requirement.1.3: Go to the Systems Tab of created Company and Create a System.Click on + button to create new Type.1.4: Select/Click on above system which you have created, in that new option will open in right side as Create Type System.Note: The Version of System should match the DOCREL in your EDI Control Record (EDI_DC40) from your IDOC, so please provide the same version which is available in IDOC.1.5: Select Communication as per the below image and create it.As we are going to map the EDI file to an IDOC and post it to SAP S4, we need to define a Receiver Communication for our Company. Provide all IDOC details and save it. Step 2: Create Trading Partners2.1: Go to your Trading Partner Management (B2B Scenarios) in Design and select Partner Profile Tab. Click on Create Trading Partner and provide all details.2.2: Create Identifiers for above Trading Partner which we have created.Note: Refer 1.2 for details.2.3: Create a System for Trading Partner which you have created. Go to the Systems Tab of created Trading Partner and Create a System.Note: Refer 1.3 for more details.2.4: Select/Click on above system which you have created, in that new option will open in right side as Create Type System.Create a Type System for the Trading Partner with the details.Note: Refer 1.4 for details.2.5: Create Communication for Trading Partner.As we will receive the EDI File from our trading partner (HF) from SFTP, we will need to create a Sender Communication for this Trading Partner in TPM. Step 3: Define Agreement Template3.1: We will create an Agreement Template in our Trading Partner Management. The Agreement Template here is where CUSTOMER1 is the Initiator and SAPS4Hana200 is the Reactor.Select Agreement Templates in Trading Partner Management and click on create button.3.2: Select MIG if you have created.3.3: Define the Communication channel (IDoc) in your Template and save it.Step 4: Define Agreement4.1: Create an Agreement in your Trading Partner Management as per below details.You will now see D.96B.S3 in your Trading Partner Agreement. Select that and the remaining Identifiers as per screenshot below.4.2: Provide Sender Communication Details in Trading Partner Agreement. Select Sender Communication.Select Communication and save it.4.3: Provide Sender Interchange Details in Trading Partner Agreement.Choose MIG and save it.4.4: Provide Mapping Details in Trading Partner Agreement.Note: As per our scope, we will not use MAG and use a Message Mapping in Cloud Integration. Select option “Customized Mapping Processing” and provide your Process Direct endpoint of your Iflow (/tpm/Customer1/EDIFACT_ORDERSD86B/IDOC_ORDERS_ORDERS05). Note this endpoint as you will use it in the next step.4.5: Activate your Trading Partner Agreement. Conclusion:By following these steps, you can successfully set up an inbound EDI-to-IDOC integration using SAP BTP’s Trading Partner Management (TPM). The process involves creating company and partner profiles, defining identifiers and systems, configuring communications, and establishing agreements. Leveraging MIG for message structure and customized mapping in Cloud Integration ensures that EDI messages are accurately transformed and routed to SAP S/4HANA via IDoc. This approach provides a standardized, scalable, and efficient way to manage B2B integrations on SAP BTP.    Read More Technology Blog Posts by Members articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author