Requirement: System should not generate EWM Quality inspection lot when Vendor is sending same Supplier /SAP batch. If the supplier or SAP batch has ever been inspected, EWM should skip generating inspection lot and post GR into unrestricted stock type.
Problem Addressed/ Standard Scenario: There is no SAP standard functionality which allows to skip inspection lot creation based on above scenario when its product having Supplier/ SAP batch already undergone Usage decision. Standard SAP keeps generating inspection lot or add into common inspection lot using ' Inspection Lot Summary. But there is no workaround in standard to avoid generating 'Inspection Lot' if SAP/Supplier batch is already inspected.
Process: During receiving against Purchase Order either from Fiori or RFUI, system creates inspection lot for inspection type '01' for corresponding Supplier/SAP batch. Latter, result recording and Usage decision is conducted for the required supplier/ SAP batch with acceptance or rejection.
Solution: Since there is no standard functionality available to address the above requirement, SAP has provided Badi /SCWM/EX_QM_INSP_RELEVANCE which can be used to prevent inspection lot creation according to the business requirement.( e.g. for a Product and its batch is already inspected) .This BAdI is available for both decentralized and embedded landscape.
During first time SAP batch receiving 0000000140, system creating corresponding QI inspection with Q4 stock type.
In same vendor lot/ SAP batch of the required product is received again. standard SAP would either create a new inspection lot or with inspection lot summary it will club this batch into already created inspection lot( Not inspected) using 'Inspection Lot Summary' as below
Badi Implementation: Using SAP Badi /SCWM/EX_QM_INSP_RELEVANCE, it is possible to add a logic of stopping generation of inspection lot if Supplier/SAP batch has already been inspection.
We build a logic reading QALS table if Product/Batch is already inspected in any of the plants, avoid creation of inspection lot generation using changing parameter of Badi.
In IS_QINSP_DATA importing parameter in Badi, customer can read many fields & can build their logic on custom requirement( E.g Avoid creation of inspection of certain document type or item type ) using CV_NOT_RELEVANT as influencing parameter.
Post Badi Implementation: Post Badi implementation, system allowed to skip inspection lot creation for Same Vendor/SAP batch combination in below example.
In below example, a shipment is received already received and inspected for Supplier Batch VEND006/ SAP batch 0000000140.
UD is completed.
In QALS table, inspection is marked with UD.
Receiving the same Vendor/ SAP batch combination, badi allowed to skip inspection lot creation.
On top of that, customer has to implement SAP note:3200795 - Stock type remains in quality when inspection is set to not relevant via BAdI. Even if you implement the badi, system would skip the inspection lot creation, but the stock of inbound delivery items remain in 'Q4' stock type. The above note fixes the issue of stock type change from Q4 to F2 at GR or at Warehouse task creation
Thanks for reading. All test is performed in S/4 HANA 2022 Sandbox Embedded EWM system
Thanks to authors Shailesh Mishra and the Co-Authored by Prem Swaroop Mund from SAP labs India.