Supply Chain Management Blogs by SAP
Expand your SAP SCM knowledge and stay informed about supply chain management technology and solutions with blog posts by SAP. Follow and stay connected.
cancel
Showing results for 
Search instead for 
Did you mean: 
shailesh_mishra5
Product and Topic Expert
Product and Topic Expert
1,152

Requirement: During internal transfer posting of a Full HU (/SCWM/ADHU) or a Product transfer( /SCWM/ADPROD) using Fiori or RF transaction, there shall be a capability of stopping HU/Product movement based on certain condition.

 Business Conditions:

  • Don't allow internal movement of HU/Product if Batch is expired
  • Don't allow internal movement of HU/Product if stock type is Blocked.

Problem Addressed/ Standard Scenario: There is no standard functionality available in SAP which allows to control the movement of HU/Product based on above condition.

SolutionSAP EWM offers a BAdI /SCWM/EX_WHO_DSTGRP which can be used to put a validation on lot of business conditions. This blog will showcase a solution how to this BADI. There could be many usage of this BAdI, and primarily this is used for changing the consolidation group of WT during WO creation.( This BAdI gets triggered every time when each WT is assigned to WO).However, this is extremely critical BAdI in EWM and its usage is at lot of places before WO generation. In this blog, the business conditions of stopping internal movement of Expired & Blocked stock would be controlled using the BAdI  /SCWM/EX_WHO_DSTGRP.

pic1.png

Replication Steps: During Bin to Bin transfer from Component warehouse to Production supply( Adhoc), system should forbid the movement of HU reading the condition from BAdI.

Using RF: Create & Conf ADHOC HU

PIC4.png

Using /SCWM/ADHU:

PIC5.png

 

Using RF: Create & Conf ADHOC Product

pic6.png

Using /SCWM/ADPROD:

PIC7.png

BAdI details: The BAdI uses interface /SCWM/IF_EX_WHO_DSTGRP using importing parameter IT_TO which allows to read HU WT( FLGHUTO), Warehouse Process Type( PROCTY=3), Stock Type( CAT=BB), Batch( CHARG), Shelf Life Expiration Date( VFDAT< current date), Product(MATID) & Warehouse Task(TANUM). Reading the above attribute before WT creation( HU or Product), a validation is put inside the BAdI.

Other BAdIs: Customer can also use /SCWM/EX_CORE_CR_INT_CR. This BAdI is specifically designed for Internal Process and customer can put validation. This BAdI is called during every WT creation.
In this BAdI, you can read the Batch ID, HU,VFDAT, Stock type and abort WT creation using parameter setting to ET_BAPIRET. This would work both HU WT and Adhoc Product WT.

Thanks for reading. All test is performed in S/4HANA 2022 Embedded EWM.

The blog is co-authored by @prem_swaroop 

1 Comment