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

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.

AbhimanyuY_109-1766480558958.png

Provide Company Name and short name then save it.

AbhimanyuY_110-1766480558963.png

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.

AbhimanyuY_111-1766480558969.png

AbhimanyuY_112-1766480558975.png

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.

AbhimanyuY_113-1766480558980.png

Click on + button to create new Type.

AbhimanyuY_114-1766480558982.png

AbhimanyuY_115-1766480558986.png

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

AbhimanyuY_116-1766480558993.png

AbhimanyuY_117-1766480558994.png

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.

AbhimanyuY_118-1766480558998.png

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.

 

AbhimanyuY_147-1766480935795.png

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.

AbhimanyuY_148-1766481002470.png

AbhimanyuY_121-1766480559007.png

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

AbhimanyuY_149-1766481046750.png

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.

AbhimanyuY_150-1766481076135.png

AbhimanyuY_124-1766480559019.png

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.

AbhimanyuY_151-1766481130513.png

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. 

AbhimanyuY_152-1766481212601.png

AbhimanyuY_127-1766480559038.png

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.

AbhimanyuY_153-1766481345690.png

AbhimanyuY_129-1766480559050.png

AbhimanyuY_130-1766480559058.png

AbhimanyuY_131-1766480559065.png

3.2: Select MIG if you have created.

AbhimanyuY_154-1766481410440.png

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

AbhimanyuY_155-1766481438019.png

Step 4: Define Agreement

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

AbhimanyuY_156-1766481464933.png

AbhimanyuY_135-1766480559094.png

AbhimanyuY_166-1766482364961.png

AbhimanyuY_167-1766482395374.png

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

AbhimanyuY_165-1766482266290.png

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

AbhimanyuY_158-1766481557176.png

Select Communication and save it.

AbhimanyuY_159-1766481581959.png

4.3: Provide Sender Interchange Details in Trading Partner Agreement.

AbhimanyuY_160-1766481604131.png

Choose MIG and save it.

AbhimanyuY_142-1766480559122.png

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.

AbhimanyuY_161-1766481695006.png

4.5: Activate your Trading Partner Agreement.

 

AbhimanyuY_164-1766482197636.png

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 

#abap

By ali