Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
adarshrao_rao
Product and Topic Expert
Product and Topic Expert
704

Many customers use SAP PI/PO systems for B2B transactions that use ASC X12 message types. When they decide to migrate to SAP Cloud Integration, they encounter some challenges. Specifically, SAP PI/PO uses XML Schema Definition (XSD) format that aren't compatible with Cloud Integration - XML to EDI or EDI to XML converters, making it difficult to re-use existing SAP PI/PO mappings in Cloud Integration.

To solve this problem, we have created a package called the B2B Interface Migration Accelerator – ASCX12 which is in SAP Business Accelerator Hub. This package helps move your B2B ASCX12 interfaces to the cloud easily, saving time and effort by using your existing SAP PI/PO message mappings.

 

 

1.  Concept:adarshrao_rao_0-1747076727876.png    

Whenever xml file which is PI/PO xsd specific or Cloud Integration xsd specific enters Cloud Integration iflow, the structure is modified with the help of XSLT mapping based on the reference xml file which is stored in the Partner directory. This also depends on the flow. When the files are triggered from Company to the Trading Partner then it is Outbound Flow. When the files are triggered from Trading Partner to the Company then it is Inbound Flow.

In this blog, we'll explore at how to migrate inbound B2B interfaces that use ASC X12 message types.

For migrating ASCX12 outbound interfaces, please refer to blog

2.  High-Level Design – Inbound Flow

adarshrao_rao_1-1747076727877.png

In an inbound flow, a file triggered from the Trading Partner enters a specific iFlow in Cloud Integration. Then, a generic iFlow is called which compares the structure of this inbound file with a reference XML file stored in the Partner directory. After making necessary changes, the revised file is sent to the Company. This setup ensures the file is in the right format for the Company.adarshrao_rao_2-1747076727881.png

In the above depiction,

  1. EDI file is received by the iFlow inbound template (specific iFlow)
  2. EDI  file sent to EDI to XML Converter and the output of this is EDI XML file is in CI specific XML format because there is no standard support for SAP PI/PO specific xsd in the converter
  3. Call the XML structure modifier flow (Generic iFlow)
  4. Modified XML file from Generic iFlow is sent to Mapping flow
  5. Output is sent to Company

3.  Migration Steps – Inbound Flow

Example: Migrate an inbound ASCX12 interface which has message type, 850 and version, 004010 from SAP PI/PO to CI

Preparation:

Refer the Configuration Guide maintained in the Document section of this package, complete Pre-requisites and copy the package to your workspace/tenant.

1. Go to Integrations under Discover, select the package and copy it to your tenanadarshrao_rao_3-1747076727883.png

2. Refer Configuration Guide maintained in the Document Sectionadarshrao_rao_4-1747076727897.png

3. From the package, copy the inbound template flow to a separate package which is Trading Partner specificadarshrao_rao_5-1747076727902.png

adarshrao_rao_6-1747076727904.png

4. To create a reference file for inbound flow of message type 850 and version 004010, Go to Type Systems, Select ASC X12, Messages 850 and version 004010

adarshrao_rao_7-1747076727907.png

Click on Export XSDadarshrao_rao_8-1747076727908.png

5. Create Partner Directories with names mentioned in the Configuration Guide.

I have uploaded a sample EDI XML file as value from SAP PI/PO which is in SAP PI/PO specific format and has all the fields utilized by all the partners in the landscape for 850 message type and 04010 message version. Hence, this payload can be the reference xml file and it is sufficient for me to migrate all the 850 message type interfaces for all the Trading Partners.adarshrao_rao_9-1747076727909.png

Configuration:

1. In this Trading Partner Specific Inbound flow, I will configure the sender and receiver systems

2. Under Mapping Flow, configure the existing message mapping for this Trading Partner which is imported from SAP PI/POadarshrao_rao_10-1747076727910.png

3. In the EDI to XML converter under converter flow, upload Cloud Integration specific ASC 850 message type of version 004010 xsd from the downloaded artifact which was exported from Integration Advisor in step#4 of Preparationadarshrao_rao_11-1747076727913.png

4. Add required namespace URI and namespace prefix. By default it is saved as #NOT_USED# but if your wsdl/xsd in the SAP PI/PO imported message mapping needs it then it should be configured.

In my case, my wsdl which is used in the SAP PI/PO imported message mapping or this trading partner uses prefix as ns0 and namespace URI as http://sap.com/xi/B2B/Exampleadarshrao_rao_12-1747076727916.png

adarshrao_rao_13-1747076727920.png

5. Deploy the following Artifacts

adarshrao_rao_14-1747076727920.png

Testing:

I have completed the configuration and in my inbound flow Trading Partner is sending ASC 850 EDI file which needs to be converted to ORDERS IDOC format before sending it to Company

Triggered 850 EDI file will be passed through converter flow where EDI file is converted to EDI xml file which CI specific structure. Since this structure can’t be passed directly to imported SAP PI/PO message mapping which is expecting the file to be in PI/PO specific structure, we will call the generic flow which will do the structure modification and convert CI specific EDI xml file to PI/PO specific EDI xml file

Inbound 850 EDI file from the Trading Partner:adarshrao_rao_15-1747076727922.png

Output of the converter which is a EDI XML file CI specific structure:adarshrao_rao_16-1747076727925.png

This file can’t be passed directly to SAP PI/PO imported message mapping. Hence the Structure Modifier Generic flow is called which will modify this CI specific structure to PI/PO specific EDI XML structure by referring to the reference file uploaded in the Partner Directory.

Output of XML Structure Modifier Flow:adarshrao_rao_17-1747076727927.png

This modified file can be sent to SAP PI/PO imported message mapping and the output can be forwarded to the Company

Output of the SAP PI/PO message mapping which can be sent to Company:adarshrao_rao_18-1747076727930.png

Status in the Message Monitor:

adarshrao_rao_19-1747076727930.png

4.  Summary – Inbound Flow

Migrating inbound B2B interfaces using ASC X12 message types to SAP Cloud Integration is a well-organized task that makes use of existing SAP PI/PO mappings. The key is the inbound template, which transforms the file structures through specific and generic iFlows so they fit correctly into the company's systems. This template is flexible, so you can adjust it to add additional mapping logic or handle retries if errors occur. Once the standard solution is available by SAP to support SAP PI/PO xsds in the converters, structure modification flow can be easily switched off in the Converter Flow.

One crucial step in the migration process is setting up Partner directories and reference XML files. This is done once and greatly simplifies future operations. For example, if your company is handling inbound interfaces for ASC X12 message type 850, version 004010 for several Trading Partners, you only need to create one reference XML file that includes all necessary segments. This single reference file can be used to adjust incoming XML files, ensuring they fit the SAP PI/PO format.

The Partner directory, named SAP_PI_to_CPI_Inbound, is created once and can be used for all inbound flows and message versions. If a new inbound flow, like sales order processing using message type 850 with version 004010, is added, its reference file can be included in this directory without needing further setup. Using these directories and reference files reduces repetition, makes XML structure management straightforward, and offers a resource-efficient way to shift to Cloud Integration while keeping communication with Trading Partners smooth and reliable.

5.  Additional Read

Migration Guide : https://help.sap.com/docs/migration-guide-po/migration-guide-for-sap-process-orchestration/interface...

We'd love to hear from you in the comments section below. Feel free to share your questions about the migration process, your own experiences, or any suggestions for improvement. Your feedback is valuable, helping others who are also navigating similar transitions and contributing to a shared pool of practical knowledge.