Enhancements
ABAP Developmentintermediate

Enhancements Part 3: Implicit vs Explicit Enhancement Points

Key takeaway

Compare explicit enhancement points and sections (placed by SAP in the code) with implicit enhancement options (available at standard positions everywhere): where each exists, how to display them, stability across upgrades and when to use which.

Explanation

📌 KEY POINTS
✅ Explicit options (ENHANCEMENT-POINT / ENHANCEMENT-SECTION) are placed deliberately by SAP where extensions are expected.

✅ Implicit options exist automatically at the start/end of FORMs, function modules and methods, at the end of includes and in some declarations.

✅ Explicit points are more stable: SAP designed the context; implicit ones depend on internal code that may change.

⚠️ An ENHANCEMENT-SECTION implementation REPLACES SAP's code in that section — high risk.

━━━━━━━━━━━━━━━━━━━━
▶ WHERE WE ARE

Part 2 introduced both kinds. Now we compare them in detail to choose correctly.

━━━━━━━━━━━━━━━━━━━━
▶ 1. EXPLICIT ENHANCEMENT POINT

SAP source: ENHANCEMENT-POINT ep_xy SPOTS es_xy.

  • Your code is inserted at that point (additional logic).
  • Several implementations can exist and all run.
  • SAP knows the context (available variables), so it tends to remain valid in upgrades.
  • STATIC variant (ENHANCEMENT-POINT … STATIC) for declarations.

━━━━━━━━━━━━━━━━━━━━
▶ 2. EXPLICIT ENHANCEMENT SECTION

SAP source:

ENHANCEMENT-SECTION es_xy SPOTS es_spot.

… SAP code …

━━━━━━━━━━━━━━━━━━━━
▶ END-ENHANCEMENT-SECTION.

  • Your implementation replaces the SAP code between the markers.
  • Only one active implementation should replace a section.
  • You own the replaced logic — SAP corrections to it no longer reach you.

━━━━━━━━━━━━━━━━━━━━
▶ 3. IMPLICIT ENHANCEMENT OPTIONS

  • Start and end of FORM routines, function modules, methods (for methods: pre-/post-/overwrite-exit methods of global classes).
  • End of includes, reports, structures (append fields in structures with care), end of the PUBLIC/PROTECTED/PRIVATE section of classes.
  • Additional optional parameters for FMs and methods.
  • Not available in the middle of a FORM, FM or method — only at these defined positions.

━━━━━━━━━━━━━━━━━━━━
▶ 4. HOW TO SEE THEM

Source editor → Enhance (spiral) → Edit → Enhancement Operations → Show Implicit Enhancement Options: markers appear as lines of quotes. Explicit points show as ENHANCEMENT-POINT statements.

━━━━━━━━━━━━━━━━━━━━
▶ 5. CHOOSING

  • Explicit point exists at the right place → use it.
  • Need to replace SAP logic → prefer a BAdI; an enhancement section only with strong justification.
  • Only implicit fits → acceptable with care: small code, documentation, regression tests at every upgrade (Part 7).

━━━━━━━━━━━━━━━━━━━━
▶ STEP BY STEP

  1. Search program SAPMV45A for ENHANCEMENT-POINT (Ctrl+F) and pick one inside an include.
  2. Show implicit options in a FORM of the same program.
  3. Compare: what data is available at each place (use the debugger).

✅ CHECKPOINT: you can distinguish explicit points, sections and implicit options and judge their risk.

Code example

ABAP Code
* ===== Explicit point in SAP code =====* ... SAP logic ...* ENHANCEMENT-POINT ep_after_price SPOTS es_zdemo.* ... SAP logic continues ... * Your implementation (added, SAP code unchanged):ENHANCEMENT 1 zei_after_price.  " additional logic runs here, SAP code before and after still runsENDENHANCEMENT. * ===== Explicit section in SAP code =====* ENHANCEMENT-SECTION es_default_plant SPOTS es_zdemo.*   ls_item-werks = ls_material-werks.        " SAP default logic* END-ENHANCEMENT-SECTION. * Your implementation REPLACES the section:ENHANCEMENT 2 zei_default_plant.  IF ls_item-vkorg = '2000'.    ls_item-werks = '2100'.                  " own rule for sales org 2000  ELSE.    ls_item-werks = ls_material-werks.       " must re-implement SAP default!  ENDIF.ENDENHANCEMENT. * ===== Implicit option at the START of a function module =====* FUNCTION z_or_sap_fm.*"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$*$**$*$-Start: (1)---------------------------------------------------$*$*ENHANCEMENT 3 zei_fm_start.  " e.g. log the call or default an optional importing parameterENDENHANCEMENT.*$*$-End:   (1)---------------------------------------------------$*$**   ... SAP code of the FM ...* ENDFUNCTION. * ===== Class method: implicit pre/post exit =====* In SE24 (Enhance mode): Insert Pre-Method / Post-Method* Post-method gets the method's parameters (CHANGING/EXPORTING can be adjusted).

Real project scenario

A project replaced an ENHANCEMENT-SECTION for plant determination with its own code for one sales organisation. After a support package, SAP corrected the original logic in that section for another country, but the project's systems kept the old behaviour because the section was replaced.
The team moved the rule to an explicit point after the section (keeping SAP's logic and overriding the plant only for sales org 2000). SAP's correction became effective again, and the custom rule stayed.

Common mistakes

  • Replacing enhancement sections without re-implementing SAP logic.
  • Believing implicit options exist anywhere in the code.
  • Using implicit options when an explicit point or BAdI is available.
  • Not checking other implementations at the same point.
  • Assuming variables at an implicit point are stable across releases.

Best practices

  • Prefer explicit points and BAdIs.
  • Avoid replacing sections; add logic after them instead.
  • Keep plug-ins small and call classes.
  • Retest implicit enhancements after every upgrade.
  • Document why an implicit option was chosen.

Interview angle

Questions: "Implicit vs explicit enhancement?", "Enhancement point vs enhancement section?", "Where are implicit enhancement options?"
Strong answer: explicit points/sections are placed by SAP (ENHANCEMENT-POINT adds code, ENHANCEMENT-SECTION replaces code), stable context; implicit options exist automatically at start/end of FORMs/FMs/methods (pre/post/overwrite), end of includes, extra parameters; implicit are riskier across upgrades; prefer BAdI/explicit.

Practice this lesson

Quick check

1. Why are explicit enhancement points generally more stable across upgrades than implicit ones?

2. What is the key functional difference between explicit and implicit enhancement points in ABAP source code?

3. Implicit enhancement points can be added at…

Interview questions

1. A pricing issue appeared after a support package; an implicit enhancement in a pricing routine is involved while an explicit enhancement point exists nearby. How do you analyse and fix it?

Answer it in your own words first, then compare.

2. Differentiate a user exit from a customer exit. How would you choose the correct enhancement for a sales-order save requirement?

Answer it in your own words first, then compare.

Practice more with Interview AI →

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

Interview questions on this topic

Related SAP topics