ME Data collection from External System using SOAP Web Service
SAP ME (Manufacturing Execution) and MII (Manufacturing Integration and Intelligence) are niche tools given by SAP to connect shop floor systems like PLCs, / SCADA / Historians / Third-party systems to ERP (SAP ECC / SAP S/4 HANA).
Here, in this article, I am describing the steps involved in connecting such a third-party shop floor system with SAP MII using SOAP Web service methods instead of the traditional OPC integration methods.
- ME data collection parameters setup completed as required
- To make the Web service call, create a ME/MII UME service user.
- Expose the MII BLS transaction as a WSDL service to send Machine parameter values.
- Create a Custom workflow.
- Built BLS transaction to receive Machine values and record them in ME data collection.
1. MII BLS transaction as WSDL service
- Developed a BLS transaction in the MII workbench with an input XML parameter.
- XML structure should be enveloped by the message name and enlist required parameter names as nodes containing respective values, as shown below.
<Message_Name> <Param_Name1>Value</Param_Name1> : </Message_Name>
- Validate and assign the input XML parameter to the Message Enqueuer action block to call the Custom Workflow configurations.
- Provide the MII WSDL URL for the third-party system to call and pass external system Machine parameter values.
2. Create a Custom Workflow
- Create a Custom workflow for Message type processing, as shown below.
- Message name should start with Z to identify as Custom Workflow.
- Map a new MII BLS transaction as a service transaction to receive the input XML and proceed further.
Note: Using a custom MII Workflow Configuration, the triggered messages can be traced for any failure and can be re-run from the SAP MII Queue monitor.
3. BLS Service transaction to receive and record ME data collection values.
- Within the mapped MII BLS service transaction, repeat through the XML nodes to validate the required conditions for the DC data type and value received.
- Then call the PAPI (logDCGroup) to initiate the ME Data collection. Catch and handle any exceptions thrown from PAPI as needed.
Frame the MII BLS transaction WSDL path with parameter name(s) for the Third-party system developer to call and pass the ME Data collection parameters & values.
- For SOAP Webservice call, MII WSDLGen shall be used as shown below after assigning proper reference documents,
- Or you can encapsulate the MII transaction into a XACUTE query to have session parameters properly binded and expose the web service call URL as below,
- Directly use the Runner based URL to call the transaction,
Conclusion & Merits:
Usually, for shop floor integration scenarios, where Machine data is captured from PLC / SCADA / Other Third-party systems, MII will use PCo (Plant Connectivity) based OPC or ODBC connections to drive the interface.
In cases like this where a Third-party system doesn’t expose data through OPC or ODBC frameworks but can call a simple web service to pass data over for further SAP processing above demonstrated the interface works seamlessly.
This also eliminates an additional integration point/software i.e., PCo which needs to be maintained.
I believe, this article will help you how to set up the Machine Integration and use the MII transactions to improve the application development in SAP MII. I encourage you to post your comment and I will try to answer them as soon as possible. Please follow me for more useful content.