Skip to Content
Technical Articles

SAP Process Integration/Process Orchestration support for Cloud Platform Integration Advisor Mapping artifacts

Introduction

As already announced in a previous blog Integration Advisor supports the generation of Mapping artifacts for SAP Process Integration/Process Orchestration ( Release Increment 1810).

The blog explains in more dept the configuration steps to be executed within SAP Process Integration / Process Orchestration to consume the customized interface mappings generated out of the Integration Advisor( IA). 

The example scenario that will be described is a mapping from and IDOC ORDERS05 message to ANSI X12 850 Purchase Order.

 

 

Prerequisite: Configure an external XSLT processor

IA mapping scripts use XSLT 2.0 and PI/PO Mapping Runtime supports execution of XSLT 2.0 transformations for 7.31 SP10 & 11 / 7.4 SP05&06 and higher. However, PI/PO systems do not have built in implementation of XSLT 2.0 processor. Here are the steps to configure an external XSLT transformer:

1. Obtain a license for an external XSLT parser that supports XSLT 2.0 (for e.g., Saxonica 9.x).

2. Import the .jar file as “Imported Archive” in the software component that needs to utilize it in the Enterprise Services Repository (ESR) Web start tool.

In ESR select the desired software component where the IA mapping artifacts will be imported, click on the button “Create Object” -> Mapping Objects -> Imported Archive, add a name of the XSLT parser and choose a proper namespace and choose Create.

Import the .jar file into the newly created Imported Archive object, Save and Activate the changes.

Note:

When importing an external transformer, the following resources must be available in the archive(s), according to the JAXP specification:

  • /META-INF/services/javax.xml.transform.TransformerFactory
  • /META-INF/services/javax.xml.xpath.XPathFactory

The content of these resources defines the implementation of the transformer or XPATH evaluator.

3. Tell PI/PO to look for the external parser by setting the value of the global parameter “com.sap.aii.ibrun.server.mapping.externalTransfomer” to true.

To maintain the parameter, perform the following steps:

  • Access SAP NetWeaver Administrator at http://<host>:<port>/nwa
  • Choose Configuration -> Infrastructure -> Java System Properties, select the “Services” tab and navigate to “XPI Service: AII Config Service”
  • Under Properties section find the parameter “com.sap.aii.ibrun.server.mapping.externalTransfomer”, choose Modify button, set the Custom value to “true” and save the changes

Step 1:  Create the mapping runtime artifacts within Integration Advisor

The generation process is well explained in the blog Integration Advisor: Support of SAP Process Integration runtime artefacts.

 

Step 2: Import the zip file as an archive in the Enterprise Service Repository (ESR).

Open the ESR and under the desire Software Component version & namespace, import the IA runtime artifacts zip file as “Imported Archive”. Follow the same steps as described in Prerequisite step 2.

Step 3: Create Inbound and Outbound Service Interfaces

In the ESR, create the Inbound and Outbound Message Types and the corresponding Service interfaces. Here are the steps to configure the Design objects:

3.1 Create Outbound Service Interface for the IDoc message ORDERS05 Purchase Order

Import the IDoc message structure in the desired Software Component. Here is more information on how to do it : https://help.sap.com/viewer/019c64f86a154b09922baedcacd54331/7.31.22/en-US/ed473c45ceb6441fb3f4bba0692d7c52.html

3.2 Generate the XSD for the EDI message type from the B2B Integration Cockpit

  • Access the B2B Integration Cockpit at http://<host>:<port>/b2bic
  • Choose EDI Content Manager -> ANSI X12 (the desired Message Standard in our case) -> XSD-Generator

  • Type the same Namespace for the XSD as the one maintained in the Integration Advisor Runtime Context / Process Integration Envelope Namespace of the MIG . Select the X12 Set (850 Purchase Order in our case) and the desired X12 message version.
  • Start the XSD generation and Save the XSD on the File System.

Note:

If the 850 message has been modifued in IA, the same changes should be maintained in the B2B Add-on EDI Content Manager in a Custom Control.

3.3 Create a Message type design object with the generated XSD of message 850

  • From the context menu of the desired Software Component version choose New -> Interface Objects -> Data Type and specify a name of the X12 850 message and the namespace. It should be the same namespace from step 3.2.
  • When the new object opens navigate to the XSD tab, select the button  and choose from the File system the generated XSD in step 3.3

  • Save and Activate the Data Type object.
  • Create a Message Type using the same context menu from the previous steps and specify a name and namespace of the X12 850 message type.
  • Click on the list button  to select the “Data Type Used” and choose the already created Data Type.

  • Save and Activate the Message Type object.

3.4 Create Inbound Service Interface for the ANSI X12 850 Purchase Order message

  • Use the same context menu as before to choose Service Interface and specify a name of the object.
  • Navigate to Definition -> Attributes group and change the Category to “Inbound”.
  • Under Operations section -> Messages table select the list button for the Name of the Request Message Type and choose the newly created Message Type.

  • Save and Activate the Service Interface object

Step 4: Create an EDI Header Mapping, if needed

If an envelope header mapping for the EDI message would be necessary, a one-to-one message mapping has to be created by using the same Message Type ASC850_004010 as both source and target message in the ESR. Make sure that every field except the fields of the header segments (i.e. ISA, GS, GE and IEA segments of an ASC X12 EDI message type) are mapped directly.

  • From the same context menu choose New -> Mapping Objects -> Message Mapping and specify a name.
  • Select the ANSI X12 850 message Type for the Definition -> Source message and Target message type
  • Expand the target message tree until you reach the Transaction Set Header (S_ST) in case of ANSI X12 message or the Message Header (S_UNH) in case of EDIFACT message. Select the whole branch and drag and drop it to the same branch in the source message. Then select the button “Map Selected Fields and Substructures if Names are Identical”
  • Make sure that every field except the fields of the header segments (i.e. ISA, GS, GE and IEA segments) are mapped directly.
  • Map the header segments (i.e S_ISA, S_GS, S_GE and S_IEA) fields in the target message with Constants or using the B2B Trading Partner Management User Defined Functions. XI Message Headers as part of the Dynamic Configuration can also be used as an input to fill the fields.

Step 5: Create the Operation Mapping

5.1 Create the Operation Mapping object

  • From the same context menu choose New -> Mapping Objects -> Operation Mapping and specify a name.
  • Select the IDoc Outbound service interface for the Definition -> Source Operation
  • Select the ANSI X12 Purchase Order Inbound Service Interface for the Definition -> Target Operation
  • Use the button “Read Operations” to make sure the objects are valid and correct.

5.2 Add the Integration Advisor runtime artifacts to the Operation Mapping

  • Navigate to Definition – > Mapping Program table and start adding the 3 XSLT files from the Integration Content Advisor following the order

 

Type Name
1 XSLT   <Name of the MAG>_PO_preproc.xsl
2 XSLT Mapping_<Name of the MAG>_PO.xsl
3 XSLT <Name of the MAG>_PO_postproc.xsl

 

  • If you have created an EDI Header Message Mapping it has to be added on 4th place in the Mapping Program table as shown above.

 

Step 5: Test the Operation Mapping

The operation mapping can be tested directly in the ESR using the Test tab of the Operation Mapping object. There is an option to specify which step of the mapping to test. An example IDoc message ORDERS05 should be imported as a Source message and the testing can begin.

 

Summary

This blog is an overview of the configuration steps within SAP Process Integration / Process Orchestration to consume the Cloud Platform Integration Advisor runtime artifacts. Stay tuned for a blog explaining the same steps in the Enterprise Services Builder in Eclipse.

 

Further Reading

Be the first to leave a comment
You must be Logged on to comment or reply to a post.