Discover SAP EWM MFS – Deep-dive Layout-oriented Storage Control

Discover SAP EWM MFS

Deep-dive Layout-oriented Storage Control

This blog is part of the series ‘SAP EWM meets Automation – Discover EWM MFS’ and ventures to deep-dive into the usage of the layout-oriented storage control (LOSC) in the context of MFS processes. We will assume that we are in a MFS-environment, moving a HU across MFS-relevant storage bins (~ communication points). To be more specific, we will look at an HU moving across a conveyor:
SAP EWM MFS Layout-oriented storage control_01
Some parts of the logic we look at is not relevant for non-MFS movements but this deep dive will still cover everything which is also relevant for non-MFS relevant usage of the LOSC (one could also say that non-MFS LOSC logic is a subset of the MFS LOSC logic here). Note that I will not explain the basic concept of the LOSC here again. In case you are not familiar with the general approach I would suggest having a look at this blog post / video here upfront. As with all posts of this series, the content provided here has been created in cooperation with the SAP EWM team at Swisslog. Feel free to visit their website in case you want to learn more about the services offered by @ Swisslog or to browse open positions within their EWM team! Now let us jump into the technical details right away! Technically, the LOSC is invoked during the warehouse task creation. In the context of the HU WT creation (visible in the stack shown below), EWM calls function module /SCWM/ROUTING_LAYOUT_CHECK which calls FM /SCWM/TROUTL_DET after having collected some necessary data:
SAP EWM MFS Layout-oriented storage control_02

FM /SCWM/TROUTL_DET is the most important one in this context here. So let us have a look at it step-by-step!

1. Read the LOSC customizing

Right at the beginning we read the routing records from the customizing:

SAP EWM MFS Layout-oriented storage control_04.2
SAP EWM MFS Layout-oriented storage control_04.1
SAP EWM MFS Layout-oriented storage control_03

2. Fire selects onto the customizing table in order to find a valid record

We have a hard-coded access sequence here (unlike e.g. queue determination or STSS where we have an option to customize the access sequence). This is very important in order to understand which record is selected for routing (keeping a screenshot of this access table is a life hack for every EWM consultant ):

SAP EWM MFS Layout-oriented storage control_05
Having that many combinations we end up with almost 500 lines of code, trying to find one or more valid records. Yes – it can be multiple ones as EWM included a sequence number in the key of the table and a Do-statement in the code makes sure to select all valid ones: 
SAP EWM MFS Layout-oriented storage control_06

.Note that EWM standard will always apply the matching record on sequence number #1. We will come back to the usage of the other records later, when we look at options for enhancements (Prio BAdi).

3. Capacity check

Note: Have a look at this blog post in case you want to make yourself familiar with important MFS objects (like the communication point).

SAP EWM MFS Layout-oriented storage control_07
Right at the beginning we read the customizing and application data of the segment and the communication point. Of course this is only needed in case we are in a MFS environment which we assume for this blog post (mentioned above already):
SAP EWM MFS Layout-oriented storage control_08