Introduction
With the built-in component SAP EWM MFS, automated material handling equipment (MHE) of warehouses can be connected to and can be conducted by SAP EWM. To achieve this, information has to be exchanged between SAP EWM and the control systems of the automated MHE. This blog provides insight into the mechanisms of how the system is automatically monitoring the interface to the automated MHE.
Connection Monitoring
Once at least one connection has been established by SAP EWM MFS, the system will monitor the connections automatically. When the last connection has been closed, the monitoring of the connections will be stopped automatically. SAP EWM MFS is providing this out of the box – no job has to be administrated or planned by your basis department.
Technically, on establishing a connection (/SCWM/MFS_START_CHANNEL) the function module /SCWM/MFS_PERIODCHK_PREP will be called. This FM checks whether the periodic MFS job is already running. If not, the job (EWMMFS_<client>_<warehouse number>_<date>_<time>) will be started and planned for every five minutes.
The report /SCWM/R_MFS_PERIODCHK_PREP will call the function module /SCWM/MFS_PERIODCHK, which will run endlessly until being stopped (by closing the last established connection).The periodically planned jobs are just a fail-safe solution: If the job is still running, the newly started one will end itself. If the job is not running anymore and still some connection is established, the newly started job will substitute the previous one.
Note: It is normal that this job is a long running job. There is no need to worry as the job hardly consumes resources as it is only checking whether
- to repeat sending a telegram without acknowledgment
- to create and send a LIFE telegram
- to re-process a telegram with a retry-exception
- to launch periodic MFS-related project-specific activities.
The function module is called with these parameters: lgnum.
Parameter Name |
Typing |
Associated Type |
Optional |
Description |
IV_LGNUM |
TYPE |
/SCWM/LGNUM |
|
Warehouse Number |
Functional description of /SCWM/MFS_PERIODCHK
- Check, that no periodic check process is running
- Determine minimum time interval from retry and life-interval over all channels
- Start endless loop with waiting for minimum time interval
- Check from special entry in /SCWM/MFSDELAY (lgnum = iv_lgnum, PLC initial, channel initial, seqno = 0 and status = ‘A’ – “process running”), whether process should be stopped
- Perform a loop over all PLCs and channels of the current warehouse number
- If the channel is set up for handshakes and telegram repetitions (Please refer to the blogs on communication basics [Communication Basics] as well as customizing & master data [Communication Customizing & Master Data] for more information), one record for the channel is read from /SCWM/MFSDELAY
- If this telegram has already been sent and the difference between the current time and the sending time is bigger than the retry interval
- the telegram is re-sent, if the number of retries is less than the defined maximum number of retries
- an exception is set on the channel, if the number of retries equals the defined maximum number of retries; usually, the exception is used to restart the connection
- If the channel is set up for LIFE telegrams, the difference between current time and the timestamp of the sending of the last telegram of the channel is calculated; if it is bigger than the LIFE interval, a LIFE telegram is built and sent, if the channel is up and running
- Check, whether an inbound telegram with status RETRY exists in /SCWM/MFSTELEQ; if the retry time is less or equal than the actual time, processing of this telegram is initiated
- A BAdI for customer logic is called
With the transaction /SCWM/EGF - warehouse cockpit (Easy access menu Extended Warehouse Management -> Monitoring -> Warehouse Cockpit -> Warehouse Cockpit) you can manually start and stop the monitoring process.
With the transaction /SCWM/MFS_APPSRV (Easy access menu Extended Warehouse Management -> Master Data -> Material Flow System (MFS) -> Maintain Application Server group for MFS processes) you can define with which user this job will be executed. If you do not define this user, the user, who started the first connection, will be the job user.
Standard Enhancement Possibilities in /SCWM/MFS_PERIODCHK
BAdI /SCWM/EX_MFS_PERIOD_ACT (methods minimum_wait_get, custom_logic_check, custom_logic)
In this BAdI you can perform own activities periodically as long as at least the connection on one channel is established (Otherwise /SCWM/MFS_PERIODCHK does not run and thus does not call the BAdI methods).
There is a fallback implementation /SCWM/CL_EI_MFS_PA_DEL_RETRY and a sample implementation /SCWM/CL_EI_MFS_PERIOD_ACT.
Method minimum_wait_get
Has to be implemented to set the minimum wait time. With that value the initial timestamps and follow-up timestamps are set as all consecutive steps will only be executed after the minimum wait time has passed.
Method custom_logic_check
In this method you can decide according to the current situation, whether the method custom_logic should be called.
Method custom_logic
In this method you can launch your own activities. As this method is always executed asynchronously it does not add to the runtime of the background job.
Sample applications:
- Delete outdated incoming telegrams (/SCWM/CL_EI_MFS_PA_DEL_RETRY)
- Trigger house keeping action like moving single stored HUs to populated bins in a multi-deep storage (/SCWM/CL_EI_MFS_PERIOD_ACT)
For the other topics in the MFS series, please visit one of the following links:
This blog has been drafted together with Development Architect, Tobias Adler
For more details on SAP MFS capabilities and select customer examples you can
access our latest presentation on MFS.
To make sure you are notified of new parts of this blog series, please follow our assigned tag,
SAP Extended Warehouse Management and see an overview of all related blog posts published for this series
here.
For more information about SAP Extended Warehouse Management, please follow us on social media, our YouTube channel or our community pages:
SAP EWM Community:
https://www.sap.com/community/topics/extended-warehouse-management.html
SAP Digital Supply Chain Channel:
https://www.youtube.com/channel/UCELmE2CEAkcwqpBLnuZHufA
EWM LinkedIn Community:
https://www.linkedin.com/groups/1952257/
For a complete list of Q&A from the EWM community, please access this link:
https://answers.sap.com/tags/01200615320800000705
In case you do not find your specific question there, feel free to post your question via the following form:
https://answers.sap.com/questions/ask.html?primaryTagId=01200615320800000705