Reveal SAP EWM – Work Center determination in the context of KTS

Reveal SAP EWM

Work center determination in the context of KTS

Note: The purpose of this series of blogs/videos is to discover & reveal the secrets of SAP EWM. Thus, I will mainly be talking about functionalities which are not mentioned and explained in any of the SAP books available on the market.

In this blog/video I will be talking about Work center determination in the context of Kit-to-Stock (KTS). Note that I will not explain the KTS process as such. Might do this in a separate blog/video of the series Understand SAP EWM. For now, you can refer to the SAP online help.

Where is the coding?
Technically the determination is done in class /SCWM/CL_VAS_MODEL method DETERMINE_WORKCENTER:

When will it be used?
From document-flow perspective the coding is relevant for example upon the activation of the inbound delivery for the finished goods in EWM. PPF action /SCWM/PRD_IN_VAS_CREATE_KTS should be scheduled & executed which is responsible for the creation of a VAS order.

The method DETERMINE_WORKCENTER is called from method CREATE_ACTIVITIES and updates the activity structure:

In the first step, the EWM standard selects select destination storage type, section and bin from the given VAS step of the storage process (customizing process-oriented storage control):

Once done, the coding tries try to find a work center with the combination of the given storage type and bin in table /SCWM/TWORKST via function module /SCWM/TWORKST_READ_BY_BIN:

Note: The work center bin assignment (respectively the bin in table /SCWM/TWORKST) can be maintained via transaction /SCWM/TWORKST:

If the WC determination via the storage bin is not successful (~ bin from POSC step is not maintained in any of the work centers), we take the storage section of this bin
• Try to find a work center from table /SCWM/TWORKST with the same section as inbound section. If this is still not successful,
• We try to find a work center from customizing table /SCWM/TWORKST with the same section as outbound section
Check the following screenshots for the detailed flow:

If this is still not successful (~ we might be in a situation where the external step of the POSC does only have destination type and section, but no destination bin), EWM tries to find a work center based on the combination of destination type & section from the external POSC step:

1st try with the section from the step as inbound section, then outbound section (not applicable in this context as not imported to the FM at all) and last but not least, with the storage type only:

Note: Inbound and outbound sections for work centers can be maintained via customizing:

If we also do not find a work center based on the ‘section approach’, EWM raises an exception and throws an error message.
Interesting fact: If we find multiple work centers based on the logic explained above (that could happen in case bin from the POSC step does not point to a specific one and we find multiple WCs with the same section), the first one is the winner (EWM just takes the first one from the internal table):

If we could finally find a work center, we update the activity structure at the end of the method and handover to method CREATE_ACTIVITIES again

Note: In case this approach to determine the work center (1.Step: Bin, 2.Step: Section) does not fulfill your project requirements, you can implement Badi /SCWM/EX_VAS_CREATE_ACTIVITIES in order to adjust/overwrite the activity table (this table which is also carrying the work center). The Badi is called at the end of method CREATE_ACTIVITIES:

Summary
• The external step in POSC customizing needs to have the work center storage type / bin (or at least the storage section) as destination
• If the WC should be determined based on the bin, the same bin needs to be assigned to the work center in /SCWM/TWORKST
• If this logic is not sufficient, implement Badi /SCWM/EX_VAS_CREATE_ACTIVITIES

That’s it! We hope you liked this post and could learn something out of it. In case you are faced with other ‘secrets’ that need to be revealed, feel free to write a comment or contact the author directly (contact details below).

Subscribe to our blog-updates or follow us on linkedin in case you want to be notified about new posts!

Watch this post on Youtube
 

Leave a Reply

Your email address will not be published. Required fields are marked *