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.
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.
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".
a. Download WSDL file from SAP Business Accelerator hub => API Resources => API Specifications
b. Edit WSDL file using test editor, replace SOAP address https://host:port/ with iflow endpoint and save WSDL file.
c. Navigate to Tools => WSDL Upload
d. Upload WSDL using create button. Give a name and description for WSDL in create popup.
2. Publish WSDL to Services Registry
a. Navigate to Services Registry => Publication of External WSDL
b. Import WSDL using WSDL name from previous step and proceed to service details.
c. Give a name to the service and proceed to Service State
d. Service bindings are already configured. So, select configured radio button and proceed to Binding
e. Access URL for bindings should show iflow endpoint added to WSDL in step 1.b.
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.
g. Review service details in summary section and click finish to publish the WSDL in services registry.
h. Published services can be viewed by navigating to Services Registry => Published Service Definitions (Optional)
Then search by service name (internal name used in service details)
i. Publishing WSDL to Services registry also generates an Identifiable Business Context (IBC). To view IBC, navigate to Services Registry => Published IBCs
3. Create profile
a. Profile allows to create security settings for business scenario configuration. Profile can be reused. Navigate to Technical Administration => Profiles
b. Click on create button to create new profile
c. Enter profile name and description and proceed to security
d. Select desired security settings (Since I wanted to use user ID/Password based authentication, opted for the same)
e. Since there is no proxy server between S/4 & BTP, proxy details are left blank. Click finish and activate the profile.
4. Create Provider system
a. Navigate to Technical Administration => Provider Systems
b. Click on Create to create provider system
c. Enter provider system name, description. Select profile name created in previous step, then Services Search Settings
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
e. Click on Retrieve Business Application and Finish. Activate Provider System
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)
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
b. Click on Create button to create logon data
c. Select type Local. Enter Logon Data Name, Description and proceed to Credentials
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.
6. Local Integration Scenario Configuration
a. Navigate to Service Administration => Local Integration Scenario Configuration
b. Click on Create button
c. Enter configuration name description and proceed to Service Groups
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.
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
f. Select Logon Data created in previous step and click Finish. Activate Integration Scenario.
7. Generate Webservice configuration
a. Navigate to Service Administration => Pending Tasks
b. Select Switch to Expert Mode
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.
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
e. Search for object CO_PPINT_MFGORD_EXE_REQ_OUT_V2 and click on service name from results
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.
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
b. Click on Create to define rules
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
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.
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.
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
After releasing the order, order status changes to DISB (Distributed) indicating order is distributed. Upon save order will be replicated to target system.
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
To monitor messages using AIF monitor, use application namespace /LOGPE, interface name MFGORDOUT2
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |