| Aspect | Enhancement 🚀 (Safe) | Modification ⚠️ (Risky) |
|---|---|---|
| Definition | Extend standard SAP without changing its code | Change SAP standard code directly |
| Upgrade Impact | Upgrade-safe ✅ | Upgrade issues ❌ (need rework) |
| Where Used | User Exits, BAdIs, Enhancements | Direct changes in SAP standard objects |
| Maintainability | Easy to maintain | Hard to maintain |
| Example | Add custom field validation | Change standard pricing logic inside SAP program |
Scenario: Sales Order Creation (VA01)
Business Requirement:
When creating a Sales Order, the company wants to block the order if the customer has overdue invoices.
Solution with Enhancement (Recommended)
Use a User Exit or BAdI (e.g.,
USEREXIT_SAVE_DOCUMENTin program MV45AFZZ).In the exit, add custom logic to check customer overdue status from tables BSID/BSAD.
If overdue invoices are found → issue an error message and stop the save.
Result: Standard SAP program stays intact. Upgrade-safe.
IF lv_overdue = ‘X’.
MESSAGE e001(zmsg) WITH ‘Customer has overdue invoices. Sales Order cannot be saved.’.
ENDIF.
Solution with Modification (Not Recommended)
Directly change the standard SAP program SAPMV45A.
Insert custom code inside the
SAVE_DOCUMENTroutine itself to check overdue invoices.This alters SAP’s original code.
Risk:
After a system upgrade, SAP may overwrite your changes.
You’ll need to re-implement modifications manually, increasing maintenance cost.
Key Difference in This Example
Enhancement: Code added in a user exit (safe extension point) → future upgrades won’t break it.
Modification: Code inserted directly into SAP standard program → risky during upgrades.