Enhancements Part 2: The Enhancement Framework Overview
Learn the building blocks of the Enhancement Framework: enhancement spots and composite spots, enhancement options (BAdIs, explicit points and sections, implicit points), enhancement implementations, the tools SE18/SE19/SE20/SE80 and how implementations are activated and transported.
Explanation
📌 KEY POINTS
✅ The Enhancement Framework (NetWeaver 7.0+) unifies enhancements: SAP defines enhancement options, you create enhancement implementations.
✅ Enhancement spots group options: explicit points/sections (source code) and new BAdIs (object-oriented).
✅ Implicit enhancement options exist automatically (start/end of FORMs, FMs, methods; end of includes, structures).
⚠️ Implementations are repository objects in your package — they are transported and can be switched on/off.
━━━━━━━━━━━━━━━━━━━━
▶ WHERE WE ARE
Part 1 listed all techniques. This lesson zooms into the framework used by most modern SAP code.
━━━━━━━━━━━━━━━━━━━━
▶ 1. TERMS
- Enhancement option — a place where SAP allows an enhancement.
- Enhancement spot — a container (SE20) for explicit options: BAdI definitions and/or explicit enhancement points/sections.
- Composite enhancement spot — groups several spots.
- Enhancement implementation — your object that fills an option (source code plug-in or BAdI implementation).
- Composite enhancement implementation — groups your implementations.
━━━━━━━━━━━━━━━━━━━━
▶ 2. TYPES OF OPTIONS
- Explicit: ENHANCEMENT-POINT and ENHANCEMENT-SECTION in SAP source; new BAdI definitions.
- Implicit: available everywhere without SAP preparation — start/end of FORM, FM, method; end of include/report; additional parameters for methods/FMs; additional fields in structures (with care).
━━━━━━━━━━━━━━━━━━━━
▶ 3. TOOLS
- SE18 — BAdI definitions (enhancement spot view).
- SE19 — create/change BAdI implementations (new and classic).
- SE20 — enhancement spots and implementations overview.
- SE80 / source editor — implement enhancement points: Edit → Enhancement Operations → Create/Show Implementation (spiral icon, "Enhance" mode).
- SE84 — repository info system for enhancements.
━━━━━━━━━━━━━━━━━━━━
▶ 4. LIFE CYCLE
Create implementation in your Z package → write code → activate → transport. Deactivation: in SE19/SE20 you can deactivate a BAdI implementation; source code plug-ins are active with their implementation (switches can control them, Part 8).
━━━━━━━━━━━━━━━━━━━━
▶ 5. WHY BETTER THAN MODIFICATIONS
Implementations are separate objects: SAP code is untouched, upgrades rarely need adjustment (SPAU_ENH only if the option changed), multiple implementations can coexist.
━━━━━━━━━━━━━━━━━━━━
▶ STEP BY STEP
- SE20: display enhancement spot ES_SAPMV45A (sales order) and its explicit points.
- SE18: display a BAdI definition and its interface.
- In SE38 open a standard program, click the spiral (Enhance) and show implicit enhancement options (Edit → Enhancement Operations → Show Implicit Enhancement Options).
✅ CHECKPOINT: you know the framework's objects and tools and can navigate them.
Code example
* ===== Explicit enhancement point in SAP code (read-only example) =====* ENHANCEMENT-POINT ep_vbak_check SPOTS es_sapmv45a. * ===== Your source code plug-in (enhancement implementation ZEI_ORDER_CHECK) =====ENHANCEMENT 1 zei_order_check. "active version IF vbak-vkorg = '1000' AND vbak-zterm IS INITIAL. MESSAGE w002(zsd). " 'Payment terms missing' ENDIF.ENDENHANCEMENT. * ===== Implicit enhancement at the end of a FORM (no SAP preparation needed) =====* FORM some_sap_form.* ... SAP code ...*"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$*$**$*$-Start: (1)---------------------------------------------------$*$** ENHANCEMENT 1 zei_implicit_demo.* " your code here - runs at the end of the FORM* ENDENHANCEMENT.*$*$-End: (1)---------------------------------------------------$*$** ENDFORM. * ===== New BAdI (defined in an enhancement spot) called by SAP =====* DATA lo_badi TYPE REF TO badi_name.* GET BADI lo_badi.* CALL BADI lo_badi->method EXPORTING ... * ===== Where to find what =====* SE18 BAdI definition / enhancement spot* SE19 BAdI implementation* SE20 enhancement spots and implementations* SE80 source code plug-ins (Enhance mode, spiral icon)Real project scenario
During an upgrade, a team found 40 modifications and 25 enhancement implementations in the system. The modifications needed two weeks of SPAU adjustment; the enhancement implementations needed only a check in SPAU_ENH for three changed spots.
The team decided that new requirements must use framework enhancements (BAdIs, explicit points) and that each implementation belongs to a Z package with documentation of the business rule.
Common mistakes
- Confusing enhancement spot (SAP) with enhancement implementation (customer).
- Creating implementations in $TMP so they are not transported.
- Ignoring existing implementations of the same option.
- Not knowing that implicit options exist without SAP preparation.
- Mixing many unrelated rules in one implementation.
Best practices
- One implementation per business purpose, with a clear name.
- Keep plug-in code thin; call classes.
- Use composite implementations to group related work.
- Check SPAU_ENH after upgrades.
- Document implementations centrally.
Interview angle
Questions: "What is an enhancement spot?", "Explain the Enhancement Framework.", "Which transactions do you use?"
Strong answer: framework with enhancement options (explicit points/sections, new BAdIs, implicit options) grouped in (composite) enhancement spots; customers create enhancement implementations; tools SE18/SE19/SE20/SE80/SE84; implementations are separate transportable objects, so upgrades need little adjustment (SPAU_ENH).
Practice this lesson
Quick check
1. Which objects does a customer create in the Enhancement Framework?
2. In the classic BAdI enhancement technology, what is the primary difference between transaction SE18 and transaction SE19?
3. In kernel-based (new) BAdIs, how does an implementing class typically fulfill the BAdI interface requirement?
Interview questions
1. Explain the difference between classical customer enhancements and the modern Enhancement Framework. Why might SMOD/CMOD still be used in an ECC system?
Answer it in your own words first, then compare.
2. Compare Classical Enhancements (SMOD/CMOD) with BADIs. When would you recommend SMOD/CMOD over BADIs in a new SAP S/4HANA project? Justify your answer.
Answer it in your own words first, then compare.
Reference-verified: the steps are checked against official SAP documentation and tutorials, and object and field names in the sample code are checked for consistency. The code has not been compiled or run on an SAP system by ERPClimb. Syntax marked release-dependent varies by SAP release, so check it in your own system.
More lessons in this topic
- Enhancements Part 1: SAP Enhancement Techniques Overview
- Enhancements Part 10: Enhancements in S/4HANA and Clean Core
- Enhancements Part 3: Implicit vs Explicit Enhancement Points
- Enhancements Part 4: Finding Enhancements Using Debugging
- Enhancements Part 5: Implementing Explicit Enhancement Points and Sections
- Enhancements Part 6: Enhancement Spots and Implementations
- Enhancements Part 7: Implicit Enhancements — Power and Risk
- Enhancements Part 8: Switch-Controlled Enhancements (Switch Framework)