Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
kishorekumar_p
Product and Topic Expert
Product and Topic Expert

In SAP S/4 Hana, the Manufacturing Order service (CO_PPINT_MFGORD_EXE_REQ_OUT_V2) is set up in SOA Manager with the target BTP iFlow URL. When a manufacturing order aligns with the configured replication conditions, it is automatically published to the designated iFlow URL.

I048752_2-1706586814203.png

 

API: https://api.sap.com/api/OP_CO_PPINT_MFGORD_EXE_REQ_OUT_V2/overview

Documentation: https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/a6f0333202384ba2b48a841a4a6deb1b/5ff8151a70dc4e2ca46...

 

Assumptions: You have an Integration Flow (iFlow) designed and configured to establish a connection with the target Manufacturing Execution System (MES), deployed within the BTP Integration Suite.

To showcase the flow of manufacturing orders from SAP S/4 Hana to the BTP Integration Suite, a fundamental iflow was designed with logging capabilities to capture the incoming payload.

I048752_0-1706586076535.png

Groovy script used to log order payload

 

 

 

 

 

import com.sap.gateway.ip.core.customdev.util.Message;

Message processData(Message message) {
    messageLogFactory.getMessageLog(message)?.addAttachmentAsString('MFG Order', message.getBody(String), 'text/plain')
    return message
}

 

 

 

 

 

Configuration in S/4 Hana:

Web Service configuration in SOA Manager:

SOA Manager (TCode: SOAMANAGER) local configuration is used for this integration. And Services Registry is used WSDL retrieval(Refer SAP Note 2605166 for additional information). 

In SOA Manager, make sure to select mode "Local View".

I048752_64-1706674113604.png

  1. Upload WSDL to SOA Manager

a. Download WSDL file from SAP Business Accelerator hub => API Resources => API Specifications

I048752_57-1706674490767.png

b. Edit WSDL file using test editor, replace SOAP address https://host:port/ with iflow endpoint and save  WSDL file.

2024-02-01_14-01-01.png

 

2024-02-01_13-57-02.png

 

c. Navigate to Tools => WSDL Upload

I048752_58-1706674497618.png

d. Upload WSDL using create button. Give a name and description for WSDL in create popup.  

I048752_60-1706674520519.png

2. Publish WSDL to Services Registry

a. Navigate to Services Registry => Publication of External WSDL

I048752_61-1706674563195.png

b. Import WSDL using WSDL name from previous step and proceed to service details.

I048752_62-1706674578510.png

c. Give a name to the service and proceed to Service State

I048752_63-1706674595967.png

d. Service bindings are already configured. So, select configured radio button and proceed to Binding

I048752_64-1706674621208.png

e. Access URL for bindings should show iflow endpoint added to WSDL in step 1.b.

kishorekumar_p_0-1706814397178.png

f. Create a physical system if you'd not created one already. Otherwise use existing physical system (one physical system per provider). This physical system will be used in provider system configuration. Enter system name (SLD ID), host name (don't worry if entire hostname doesn't fit; use subdomain name so, you can recognize the system). BTP Integration Suite is not an ABAP system. Choose system type Third Party.

I048752_67-1706674672588.png

g. Review service details in summary section and click finish to publish the WSDL in services registry.

I048752_68-1706674688900.png

h. Published services can be viewed by navigating to Services Registry => Published Service Definitions (Optional)

I048752_69-1706674709982.png

Then search by service name (internal name used in service details)

I048752_70-1706674720970.png

i. Publishing WSDL to Services registry also generates an Identifiable Business Context (IBC). To view IBC, navigate to Services Registry => Published IBCs

I048752_71-1706674739064.png

3. Create profile

a. Profile allows to create security settings for business scenario configuration. Profile can be reused. Navigate to Technical Administration => Profiles

I048752_72-1706674759247.png

b. Click on create button to create new profile

I048752_73-1706674774928.png

c. Enter profile name and description and proceed to security

I048752_74-1706674798339.png

d. Select desired security settings (Since I wanted to use user ID/Password based authentication, opted for the same)

I048752_75-1706674809327.png

e. Since there is no proxy server between S/4 & BTP, proxy details are left blank. Click finish and activate the profile.

I048752_76-1706674826714.png

I048752_77-1706674832810.png

4. Create Provider system

a. Navigate to Technical Administration => Provider Systems

I048752_78-1706674859116.png

b. Click on Create to create provider system

I048752_79-1706674899766.png

c. Enter provider system name, description. Select profile name created in previous step, then Services Search Settings

I048752_80-1706674910611.png

d. Enable Use Services Registry check box. Select local service registry from the dropdown and select Physical system ID (from 2.f) in SLD Identifier value help popup. Uncheck Use WSIL flag as we are not using WSIL. Enter S/4 credentials to access WSDL from Services Registry. Finally enable Tolerant Search and Proceed to Applications

I048752_81-1706674928685.png

e. Click on Retrieve Business Application and Finish. Activate Provider System

I048752_82-1706674939858.png

I048752_83-1706674946659.png

f. Activating Provider system generates Identifiable Business Context Reference with name same as provider system name. Same can be found under Service Administration => Identifiable Business Context Reference. (Optional)

I048752_84-1706674969431.png

I048752_85-1706674976686.png

5.  Create Logon Data

a. Logon data can be reused. If you already have logon data created for BTP IS, ignore this step. Otherwise, navigate to Service Administration => Logon Data Management

I048752_86-1706675003881.png

b. Click on Create button to create logon data

I048752_87-1706675017673.png

c. Select type Local. Enter Logon Data Name, Description and proceed to Credentials

I048752_0-1706675832913.png

d. Select Authentication Method. For User/Password authentication enter Client ID and secret from BTP Process Integration Runtime service key. Click Finish and activate logon data.

I048752_1-1706675848197.png

I048752_2-1706675858453.png

6. Local Integration Scenario Configuration

a. Navigate to Service Administration => Local Integration Scenario Configuration

I048752_3-1706675872042.png

b. Click on Create button

I048752_4-1706675881695.png

c. Enter configuration name description and proceed to Service Groups

I048752_5-1706675891000.png

d. Under Service Groups, click Add. Search for service group PPINT_SOA_MFG_ORDER_V2 (Refer API documentation for service group name). Select service group from results and click Ok.

I048752_6-1706675901415.png

e. Click on Assign IBC Reference. In the popup search for IBC reference created during Provider system creation (Search for IBC Reference with name same as provider system from step 4). Select IBC reference from the results and click on Assign to Service Group. Proceed to Logon Data Assignment

I048752_7-1706675911667.png

f. Select Logon Data created in previous step and click Finish. Activate Integration Scenario.

I048752_8-1706675920003.png

I048752_9-1706675926322.png

7. Generate Webservice configuration

a. Navigate to Service Administration => Pending Tasks

I048752_10-1706675938961.png

b. Select Switch to Expert Mode

I048752_11-1706675948565.png

c. Filter pending tasks by business scenario name and processing all pending tasks associated with business scenario created in previous step. Wait for completion of pending tasks.

I048752_12-1706675958363.png

d. Successful completion of pending tasks generates Web Service configuration for service CO_PPINT_MFGORD_EXE_REQ_OUT_V2. Navigate to Service Administration => Web Service Configuration

I048752_13-1706675967490.png

e. Search for object CO_PPINT_MFGORD_EXE_REQ_OUT_V2 and click on service name from results

I048752_14-1706675978483.png

 

f. Details page should show active logical port created based on profile from step 3. View service details and confirm logon credentials under consumer security matches with logon data maintained earlier. Under Messaging ensure RM protocol used is SAP RM (Reliable Messaging Protocol). Under transport settings confirm URL points to iflow URL.

I048752_15-1706675989491.png

I048752_16-1706675994425.png

8. Determine receiver using service group

a. Define rules to control which target system receives which manufacturing orders. Navigate to Service Administration => Logical Determination of Receiver using Service Groups

I048752_17-1706676005735.png

b. Click on Create to define rules

I048752_18-1706676018783.png

c. Enter Service Group PPINT_SOA_MFG_ORDER_V2 (group name from API documentation) and search IBC Reference. In the popup search for IBC reference with name same as provider system. Select IBC reference from the results and proceed to Routing details

I048752_19-1706676031393.png

d. Enter at least one filter condition and hit Create New Routing. To change existing routing conditions, enter condition value and hit Apply to Routing.

I048752_20-1706676045007.png

e. New routing with defined rules will be created or existing routing conditions will be updated depending on the selection. Click finish to save routing rules.

I048752_21-1706676055378.png

Test production order replication

Create production order using TCode CO01. If order meets filter conditions, order gets status RDIS (Relevant for Distribution) indicating order will be replicated to target system once the order is released

img1.png

After releasing the order, order status changes to DISB (Distributed) indicating order is distributed. Upon save order will be replicated to target system.

img2.png

Order message can be seen using webservice monitoring (TCode: SRTUTIL) or AIF monitoring (TCode: /AIF/ERR) tools.

To monitor messages using webservice monitoring, search for messages with sender interface name ManufacturingOrderExecuteRequest_Out_V2

I048752_31-1706676182511.png

To monitor messages using AIF monitor, use application namespace /LOGPE, interface name MFGORDOUT2

I048752_32-1706676190086.png

Troubleshooting:

1. Order status is not RDIS or DIST even though order meets route rules defined in step 8:

a. Route rules in step 8 will be saved only after hitting finish button. At least one filter condition must be defined for order replication to work as expected. Make sure route rules were saved.

b. Manufacturing order replication using service CO_PPINT_MFGORD_EXE_REQ_OUT_V2 is active only if point2point communication is active in S/4 Hana. Confirm point2point communication is active (customizing table BSSOA_WS_ACTIVE). If this configuration is not active, S/4 tries to replicate orders using old service CO_PPINT_MFGORD_EXECT_REQ_OUT. Since old service is not configured, order will not be replicated.

img3.png

2. Order shows correct distribution status, but order data was not received in iflow. Monitoring tools show message in error state:

a. In step 7.f, confirm generated webservice points to correct iflow URL. Also, confirm login credentials are correct.

b. Refer SAP Note 2490080 for details on how to analyze SOA Manager errors.

Reference

Configuring Manufacturing Order Service in SOA Manager

Configuring service group in soamanager using integration scenarios