In principle there are two ways:
- The preferred way with SAP EWM-MFS: The materials flow system component of our EWM.
- The other way🧐: SAP EWM-WCU: The IDoc integration to Warehouse Control Units as we know it from the days of SAP LE-WM!
I found there was very little help and documentation for the second approach and recently got asked what it would look like and when to use what. Now, this blog isn’t going into the depth of pros and cons just that much:
- Go with SAP EWM-MFS whenever you can. It offers enormous flexibility, can work without middleware due to ABAP Push Channels and makes usage of other communication layers easy (e.g. OData or SOAP webservices). Your requests are HU related.
No doubt the learning curve ist steeper but it’s more rewarding in most cases.
- Use WCU if the requests you plan to send to your automation are product (material) related. This is often the case in a “black box” scenario where EWM is not in control of strategies or physical bin stock.
Please also refer to the S/4HANA related documentation to get a good overview, I will cover the parts which you won’t find in there.
What can be communicated with EWM-WCU?
There are several message types with according IDoc-types that you can use for your integration, these are:
|/SCWM/WMTORD||Create Warehouse Order||/SCWM/IDOC_INPUT_WMTORD||/SCWM/IDOC_CREATE_WMTOID01|
|/SCWM/WMSUMO||Move Handling Unit||/SCWM/IDOC_INPUT_WMSUMO|
|/SCWM/WMRREF||Release reference number||/SCWM/IDOC_CREATE_WMRRID01|
|/SCWM/WMBBIN||Block storage bins||/SCWM/IDOC_INPUT_WMBBIN|
- Create Warehouse Order – Sends a warehouse order with warehouse task(s) as child segments to your 3rd-party automation or creates one in the SAP EWM.
- Confirm Warehouse Order/Warehouse Task – The counterpart of the first message to confirm execution of a tasks or several tasks at once. Works only inbound SAP EWM.
- Move Handling Unit – Instead of building a pair of inbound WMTORD/WMTOCO to SAP EWM you can also “inject” HU movements in a single message.
- Cancel warehouse order: You can cancel a WO or a connected WT by this message in SAP EWM when it’s sent as an inbound message. In an outbound message you send a cancel request, meaning it’s not yet cancelled in SAP EWM. That can only happen with an inbound message from the automation.
- Create Pick-HU: Creates a Pick-HU in SAP EWM or sends the information to the automation.
- Release reference number: Informs the subsystem of the wave-number that got released. Just one segment.
How is it set up in SAP EWM?
It’s a little hidden in the customizing, but you find it under the name “subsystem” in the interfaces section of the IMG.
It’s activated on a warehouse number level – from there are three areas for configuration:
- Variants IDoc Issue:
Here you would define variants that go into the IDoc control record when the IDoc is created by SAP EWM. An example:If you use an ID point storage type for all goods that enter the automated area and a pick-point storage type for all goods that leave the automation, you can let EWM tag the IDocs accordingly.
That way you can easily distinguish between inbound and outbound movements (and more, just as needed). It helps you in the monitoring of IDocs as that’s the easiest way to filter.
- Control IDoc Issue:
You can see how the variant defined in ① is determined. In above example a WMTORD is issued for every movement from SEID to SEWC storage type for every warehouse process type used using the logical system MYAUTOMATION which in turn is defined in transaction WE20:
Obviously the linked RFC destination would point to the automation component.
You can use wildcards in this setting for the source and/or destination storage types. If every source storage type to e.g. SEWC would be relevant for subsystem, you would write:
****/SEWC. For the warehouse process type you can only set the actual type or space (initial). No wildcards. Have a look at function /SCWM/T327A_READ to understand the access sequence in detail.
- Function Module IDoc Issue:
here you use the function modules which we introduced at the beginning of the blog. As you can see you could use your own modules if they provide the identical interface.
Benefits: By that you can use e.g. webservices (REST or SOAP) instead of IDocs if that is what your automation expects. You can however, also use the BAdIs in each IDoc FM to add your own logic!
Observing IDocs during SAP EWM operation
Finally a few words how it looks in operation. Let’s create a movement to the pick-point by WPT Y998. The IDoc is created and sent to the subsystem.
Note: In a layout-oriented storage control if the sub-system-relevant movement comes later (according warehouse task dormant) the IDoc is sent once the warehouse task gets activated! The picture below shows such a WMTORD IDoc.
You see the hierarchy of warehouse order/ warehouse task and also there’s quite a lot of data transmitted regarding product specific information (more can be added as stated above). Let’s say we made a mistake and we want to cancel the WO. What we receive is this message:
Have a wonderful year-end and a happy new year 2021! 🎍