How to Restrict Goods Receipt Before Delivery Date in SAP Using Enhancements |
IntroductionIn many SAP MM (Materials Management) implementations, one critical control requirement is to prevent the posting of a Goods Receipt (GR) before the Purchase Order (PO) delivery date. This is essential for ensuring procurement compliance, inventory accuracy, and vendor performance tracking. SAP does not provide standard error handling for this by default, but you can implement a custom solution using SAP Enhancements and user exits.Why Restrict Goods Receipt Before the PO Delivery Date?Allowing goods to be received before the scheduled delivery date can cause: - Inaccurate inventory valuation - Misleading supplier performance metrics - Process compliance issues - Early financial postings affecting period close Hence, enforcing a control at the MIGO (Goods Movement) transaction level is crucial for robust procurement governance.Recommended SAP Enhancement: MBCF0002To create a restriction mechanism, we use Enhancement MBCF0002 with the component EXIT_SAPMM07M_001. This enhancement allows you to implement custom ABAP logic to validate delivery dates during the MIGO transaction.Step-by-Step Guide: How to Implement the Restriction1. Identify the Right EnhancementUse Tcode SMOD to find enhancements related to Inventory Management. Focus on package MB which is used for MM Inventory Management functionalities.Common Enhancements:
2. Create a Custom Project in CMOD
3. Add Custom ABAP CodeWithin the ABAP Editor: - Double-click the include starting with ZX..., which will prompt you to create the include.- In the include, insert logic to check if the GR Posting Date < PO Delivery Date - Trigger an error message if this condition is violated. IF sy-datum < eket-eindt. " Compare system date
with delivery date Note: Replace eket-eindt and other fields with the correct structure as available in your internal tables (e.g., xekpo, xeket, mkpf, etc.). 4. Activate and Test
Known LimitationCurrently, only error messages are supported via this enhancement. Warning messages (that allow continuation) are not functional in this exit. |
Fast links: IM And Control Review Questions And Answers Get help for your SAP MM problems
SAP MM Books
SAP MM Tips
Best regards,
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|