EDUCAÇÃO E TECNOLOGIA

SAP Digital Manufacturing Cloud Integration Extension

Dear Colleagues,

In this blog post will try to introduce some of the Integration Extension scenarios between SAP S/4HANA and SAP Digital Manufacturing Cloud.

Before we we go in details about the Integration Extension, please make sure the standard integration configuration already done. Please follow SAP Digital Manufacturing Cloud Integration Guide to setup configuration for integration.

Check Points:

  1. SAP Digital Manufacturing Cloud side:
    HTTP destinations CPI_DESTINATION_IFLMAP and CPI_DESTINATION_TMN in DMC cockpit configured.
  2. Cloud Connector:
    Add SAP Cloud Integration sub-account in Cloud Connector, and mapped virtual host to internal systems.
  3. SAP Cloud Integration side:
    • Security Materials CF_AUTH and PD_DEPLOYER_USER configured.
    • Package SAP S/4HANA Integration with SAP Digital Manufacturing Cloud copied,  configure artifact ‘Initial Parameters‘ and deployed, all required artifacts in package deployed.
    • Destinations to virtual host(in step 2) configured.
  4. ERP side:
    • HTTP destination configured with Transaction code SM59
    • Logical system created
    • Port created and associated with destination in step above
    • Partner Profiles created and assigning outbound message types

Manage Integration Workflows App in SAP Digital Manufacturing Cloud:

Manage Integration workflows is an app in SAP Digital Manufacturing Cloud which can be used for customize SAP Cloud Integration behaviors by overriding the predefined workflow nodes.

For example, for Production Order(LOIPRO04) processing:

  • If we want to change some fields values mapping rules or add customized fields, we can override the ‘Standard XSLT’ by put new XSLT mapping rules in field ‘Custom XSLT’.
  • If we need get some values from external systems for fields to DMC, we can override the node ‘Standard Service Workflow’ by specify new service workflow in field ‘Custom Service Workflow’.

Custom scenario 1: Custom Fields

Customer want to extend some custom data for Shop Order, lets say they are fields DATA_FIELD_SO_1 and DATA_FIELD_SO_2 with label ShopOrderField1 and ShopOrderField2, these fields should be populated from IDoc(LOIPRO04) with fields ($placeholder).

Implementation steps:

  1. Define Custom Data for Shop Order in SAP Digital Manufacturing Cloud app ‘Manage Custom Data’.
  2. Customize the XSLT mapping rules by copy the standard one.
  3. Uncomment the section ‘customFieldDTOList’ in shopOrderIn block.
  4. Create nodes and mapping rules for DATA_FIELD_SO_1 and DATA_FIELD_SO_2, see below screen capture for details.
  5. Save customized XSLT into field ‘Custom XSLT’ in SAP Digital Manufacturing Cloud app ‘Manage Integration Workflows’.
    Below is samples that DATA_FIELD_SO_1 populated with value from field VORNR in the first E1AFFLL of ‘//IDOC/E1AFKOL’.
    <customFieldDTOList> <customFieldDTO> <attribute>DATA_FIELD_SO_1</attribute> <value> <xsl:value-of select="//IDOC/E1AFKOL/E1AFFLL/E1AFVOL[1]/VORNR"/> </value> </customFieldDTO> <customFieldDTO> <attribute>DATA_FIELD_SO_2</attribute> <value>I Will Be Displayed In DMC</value> </customFieldDTO>
    </customFieldDTOList>​

  6. Check orders from ERP has these two fields populated.

Custom scenario 2: Custom Service

Continue with the scenario 1, if customer want get values for DATA_FIELD_SO_2 from external systems. We need create a new iflow to retrieve values from external system and set it to the custom field dto.

Implementation steps:

  1. Login to SAP Cloud Integration tenant and navigate to Design section
  2. Create or Edit an existing package, and navigate into the package.
  3. Add an new ‘Integration Flow’ under ‘Artifacts’ tab
  4. Give name, id and description for the iflow.
  5. Edit the iflow to Implement the logic
    The iflow should use ‘ProcessDirect’ as sender adapter, set Address as ‘Z_LOIPRO04_CUSTOMIZED_FLOW’.

    The final step should be an ‘ProcessDirect’ adapter to ‘Receiver’, connection address set with value LOIPRO04_STD_SERVICE(from field ‘Standard Service Workflow’ under node ‘LOIPRO04_PRODORDER’), if you want implement all the functions that LOIPRO04_STD_SERVICE has, this step is not mandatory.
  6. Implement the logic for prepare the request to External systems, request the external system, and set retrieved values to custom data field.
    NOTE: When you call an external sytem, the request body in iflow will be replaced by the response body, so keep in mind save it before request and restore after response if you still need the original body.
  7. Save iflow and Deploy
  8. Set ‘Custom Service Workflow’ value as ‘Z_LOIPRO04_CUSTOMIZED_FLOW'(from step 5) and Save.
  9. Test and Modify until everything works as expected.

For SAP Cloud Integration iflow develop, please refer Getting Started with Integration Flow Development.

Conclusion:

With this post, you should already know how to do with Custom Data extension by overriding the XSLT file, and how to create a custom service iflow in SAP Cloud Integration to meet more complex requirements.

Thanks & Best Regards,

Wei