EWM-MES Direct Integration For Receiving HUs in EWM
EWM-MES Direct Integration For Receiving HUs in EWM
Community
Technical Articles
Prakash Pol
December 22, 2020 4 minute read
Introduction
This technical blog post is intended to share my experience with A2A (Application to Application) Interface for
the EWM-MES Integration without middleware. MES application in this A2A integration is a non-SAP system. In
the Decentralized-EWM system, there are few important APIs provided by SAP for a smooth integration with
Manufacturing Execution System (MES), some of the most useful of them are as below:
Above are RFC enabled FMs that can be found inside function group /SCWM/MFG (Advanced Production
Integration).
In this blog post, I have taken the example of receipt of Handling Units from MES communicated to
Decentralized EWM on S/4 HANA, via API /SCWM/MFG_RECEIVE_HUS_EXT.
Implementation
To expose the out-of-the box API /SCWM/MFG_RECEIVE_HUS_EXT to an external Manufacturing Execution
System (MES) of our enterprise, I used the web-service based integration (i.e. WSDL le based Integration).
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 1/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
Web Services Description Language (WSDL) is based on XML message schema framework.
To use a exposed web service de nition, MES must know the URL of the target WSDL.
Step 1: Web Service De nition Creation. For the creation of web-service, I have used below the SE37 transaction
which calls Enterprise Service wizard. One can also use SE80 for web service creation.
SE37-Utilities
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 2/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 3/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 4/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
Once the service de nition is generated, there will be WSDL URL generated and it is then provided to the
partner MES system, in order to invoke the API in EWM.
WSDL URL
As you could also see the web service de nition also shows up the input and output eld structure involved for
the interface communication of MES with EWM, using underlying API.
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 5/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
Other important steps: Make sure SOAMANAGER is also set-up correctly for the web service based Integration.
Usually it is a Basis (system administrator) activity.
The API function module /SCWM/MFG_RECEIVE_HUS_EXT invokes the method RECEIVE_HU of the API
“/SCWM/IF_API_MFG_RECEIVING” that enables to post goods receipt of packed products from production
shop oor in speci c packages i.e. handling units.
The system creates new inbound delivery with a packed delivery item for each HU for receipt is posted by MES
and communicated to EWM.
Prerequisite to create Inbound delivery by this API is that Expected Goods Receipt (EGR) document must exist
prior in the EWM with ref. to ERP production order.
Querying the expected goods receipt (EGR) based on the manufacturing order reference and the product
Creating a new inbound delivery based on the EGR
Creating planned HUs linked to the inbound delivery
Creating and valuating batches for batch-managed products
Creating serial numbers for serialized products
Updating deliveries with the valuation quantity and valuation unit of measure (UoM) for catch-weight
managed products
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 6/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
Following table shows the input and output parameters used in the API.
2 IV_PLANT (mandatory) This is a plant of the ERP system. Plant + Logical System=>maps
PSA(ERP-EWM)
3 IV_WHS_NUMBER This is a ERP warehouse number ERP WHS Number => maps EWM
(mandatory) WHS number
6 IT_SERIAL_ For serial number managed products, the unique serial numbers must
NUMBERS(optional) be received.
The API is having following export parameters based on the above import or inputs provided by MES system
using the Interface.
1. ET_HANDLING_UNITS- This contains the number of the HU for which receipt is posted
2. ET_BAPIRET- This parameter provides the return message upon FM execution
Example-Sample Test Results from Direct API execution (without web service call)
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 7/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
Conclusion
SAP EWM API /SCWM/MFG_RECEIVE_HUS_EXT when integrated seamlessly with the partner system MES
using integration methods like webservice, it can be deployed without much development e ort and time.
Key References:
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 8/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
Alert Moderator
Assigned tags
Related Questions
1 Comment
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 9/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
Ramesh Batta
Hi Prakash
I am getting short dump when packaging material was entered as 400006935 and I got success message when
packaging materials as "PALLET2", is it due to Routine - MDLP1 maintained for Domain -
/SCMB/MDL_PRODUCT_NO
Regards
Ramesh
Like(0)
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 10/11
4/15/2021 EWM-MES Direct Integration For Receiving HUs in EWM | SAP Blogs
Find us on
Newsletter Support
https://blogs.sap.com/2020/12/22/sap-ewm-mes-direct-a2a-integration-via-api-for-receiving-hus-in-ewm/ 11/11