Hello Everyone,
SAP MII (Manufacturing Integration and Intelligence) is a powerful tool provided by SAP to connect shop floor systems (PLC / SCADA / Historians) to ERP (SAP ECC / SAP S/4 HANA).
There may be cases where you need to transfer the BOM with phantom items to external system. Using MII we can achieve this.
Why we need this?
To display the BOM details with Phantom components to the External System.
Prerequisites:
- MEINT Configuration
- IDOC Configuration for BOMMAT S4 to MII
- External system URL to Post BOM Component from MII
High-Level Overview
- MII workflow configuration
- Built BLS transaction for pass handler of BOMMAT05.
- Built BLS transaction to transfer BOM with Phantom items to external system (Service Transaction)
- Transfer of BOM Details to External system
- Conclusion
1. MII workflow configuration
- Go to SAP ME ERP Integration-->SAPMEINT Configuration-->Workflow Configuration standard workflow of BOM BOMMAT05 in SAPMEINT workflow configuration. Fig: 1.1
- To the BOMMAT05 workflow, add the pass handler transaction.
- Pass handler transaction should trigger the new workflow after BOM is updated to ME standard tables. Fig: 1.2
- Create a new workflow message type name Z_SEND_BOM to transfer BOM to external system and attach trigger point in BOMMAT05 pass handler.
- So that whenever BOM updated in Standard ME tables. Z_SEND_BOM workflow will be triggered and BOM will send to external system.
- In Z_SEND_BOM workflow add service transaction and request XSLT. Fig: 1.3
- Whenever BOM is pushed from S4 in MII BOMMAT05 workflow triggered and update in standard ME tables and after updating Z_SEND_BOM workflow trigger.
- It will initiate the transfer of BOM to external system.
- The triggered message to external system can be noticed on the MII Queue.
2. Built BLS transaction for pass handler of BOMMAT05
- Create a BLS Pass handler transaction.
- In pass handler check the Modified data of BOM.
- Assign the Date to local property of data type date. Irrespective of date format we should be able to check the date.
- Figure 2.1 shows condition to check Modified date of BOM value from BOM Component Table which is assigned in local property.
Fig: 2.1
- So that whenever there is a change in BOM or BOM component. The new BOM is allowed to transfer to external system. Fig: 2.2
3. Built BLS transaction to transfer BOM with Phantom items to external system (Service Transaction)
- Create two local properties BOM header and BOM components as shown in below figure 3.1 & 3.2.
- Based on the requirement change the local properties accordingly Fig: 3.1
Fig: 3.2
- Using SQL query get the BOM details and
- check phantom indicator is active. Fig: 3.3
- If component indicator is active append the components in BOM component local property
- External system only accepts JSON format. So, I have built an XML and converted into JSON format before transferring to external system.
- Using for next loop checked every Components which have phantom indicator and get the phantom components and added it with the parent BOM xml structure.
- In Configure for next loop set loop count FROM 0 and TO 25 (TO represents how many times the loop should run). Based on requirement varies.
- As of now twenty-five levels Phantom’s can be achieved by for next loop action block. Fig: 3.4
- Assign the BOM details from repeater to BOM component local property.
- Using condition block separated assignment of BOM header and Append BOM components. We can avoid append BOM header details repeatedly assigning in XML structure. Fig: 3.5
4. Transfer of BOM Details to External System
- Converted the BOM details to JSON using XML to JSON converter action block because the external system only accepts JSON format.
- External system team have provided Posting URL.
- Using HTTP Post action block linked the converted JSON BOM details in post data and external system URL. Fig: 4.1
5. Conclusion
I would also recommend that you follow the SAP Manufacturing Integration and Intelligence community so that you can receive notifications about upcoming content from myself and other community members.
SAP Manufacturing Integration and Intelligence
You can also look at the Q&A in communities and ask questions.
Q&A Platform
Finally, I’d like to request and encourage you to follow my profile so that you can be the first to learn about any new and exciting technical or functional information regarding SAP Manufacturing Integration and Intelligence.
Thank you for reading my blog post, and if you have any thoughts or suggestions, please let me know.