Enhancements
ABAP Developmentintermediate

Enhancements Part 6: Enhancement Spots and Implementations

Key takeaway

Work with enhancement spots and implementations as objects: SE20 navigation, simple vs composite spots and implementations, creating your own enhancement spot with a BAdI or explicit point for customer code, activation, SPAU ENH after upgrades and naming/ownership rules.

Explanation

📌 KEY POINTS
✅ SE20 shows spots (SAP-defined containers of options) and implementations (your code), including composites.

✅ You can create your own enhancement spots in Z programs so other teams or countries can extend your code without changing it.

✅ After upgrades, SPAU_ENH lists implementations whose options changed.

⚠️ Without naming rules and ownership, enhancement implementations become an invisible layer of logic nobody maintains.

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

Parts 2–5 used SAP spots. This lesson treats spots and implementations as objects you manage — and create yourself.

━━━━━━━━━━━━━━━━━━━━
▶ 1. SE20 ESSENTIALS

  • Enhancement Spot: display its options (BAdI definitions, explicit points/sections) and their implementations.
  • Enhancement Implementation: display which options it implements, its package and status.
  • Composite spot / composite implementation: logical grouping (e.g. all implementations of project "Order to Cash").

━━━━━━━━━━━━━━━━━━━━
▶ 2. YOUR OWN ENHANCEMENT SPOT (FOR Z CODE)

Global template programs used by several countries often need country-specific logic. Instead of IF country = … inside the core, define:

  • An enhancement spot ZES_ORDER_UPLOAD with a new BAdI ZBADI_ORDER_UPLOAD (interface ZIF_EX_ORDER_UPLOAD, filter COUNTRY).
  • The core program calls GET BADI / CALL BADI.
  • Each country team creates its own implementation with its filter value — no change to the core.

(BAdI details: see the BAdI series.)

━━━━━━━━━━━━━━━━━━━━
▶ 3. EXPLICIT POINTS IN Z CODE

You can also add ENHANCEMENT-POINT statements to your own programs. BAdIs are preferred: typed interface, clear parameters, filter support.

━━━━━━━━━━━━━━━━━━━━
▶ 4. ACTIVATION AND STATUS

  • Implementations are active when activated in the transport target; new BAdI implementations can be deactivated with a flag in SE19.
  • Inactive/erroneous implementations are shown in SE20 and cause syntax errors in the calling program if broken — test after transports.\n\n━━━━━━━━━━━━━━━━━━━━\n▶ 5. UPGRADES: SPAU_ENH\nLists enhancement implementations whose options changed or were deleted. Adjust or confirm each. Much smaller than SPAU for modifications.

━━━━━━━━━━━━━━━━━━━━
▶ 6. GOVERNANCE

  • Naming: ZEI_<area>_<purpose> for implementations, ZES_ for own spots.
  • Register each implementation in a list with owner, business rule and test case.
  • One implementation per purpose; use composites per project.

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

  1. SE20: display a composite enhancement implementation of your project (or create a training one).
  2. Create spot ZES_TRAINING with a BAdI having method APPLY and filter COUNTRY (SE20/SE18).
  3. Call it in a Z report and implement it for two countries (see code example).

✅ CHECKPOINT: you can manage spots and implementations and provide your own extension points.

Code example

ABAP Code
* ===== Own enhancement spot ZES_ORDER_UPLOAD with BAdI ZBADI_ORDER_UPLOAD =====* BAdI interface ZIF_EX_ORDER_UPLOAD:*   METHODS adjust_item CHANGING cs_item TYPE zs_order_upload_item.* BAdI filter: COUNTRY (type LAND1), single use: no (multiple implementations) REPORT zorder_upload_core. DATA: gt_items TYPE STANDARD TABLE OF zs_order_upload_item,      gs_item  TYPE zs_order_upload_item,      go_badi  TYPE REF TO zbadi_order_upload. PARAMETERS p_land TYPE land1 DEFAULT 'IN'. START-OF-SELECTION.  PERFORM read_file.                                  " fills gt_items * ===== Core program calls the BAdI - no country logic here =====  TRY.      GET BADI go_badi FILTERS country = p_land.    CATCH cx_badi_not_implemented.      " no country-specific logic - fine, continue with core behaviour  ENDTRY.   LOOP AT gt_items INTO gs_item.    IF go_badi IS BOUND.      CALL BADI go_badi->adjust_item CHANGING cs_item = gs_item.    ENDIF.    MODIFY gt_items FROM gs_item.  ENDLOOP.   PERFORM create_orders.                              " BAPI calls (not shown) FORM read_file.ENDFORM.FORM create_orders.ENDFORM. * ===== Country implementation ZEI_ORDER_UPLOAD_IN (filter COUNTRY = 'IN') =====* CLASS zcl_ei_order_upload_in DEFINITION PUBLIC FINAL CREATE PUBLIC.*   PUBLIC SECTION.*     INTERFACES if_badi_interface.*     INTERFACES zif_ex_order_upload.* ENDCLASS.* CLASS zcl_ei_order_upload_in IMPLEMENTATION.*   METHOD zif_ex_order_upload~adjust_item.*     IF cs_item-plant IS INITIAL.*       cs_item-plant = '3000'.                        " India default plant*     ENDIF.*   ENDMETHOD.* ENDCLASS.

Real project scenario

A global order upload template was rolled out to six countries. The first three rollouts added country IF blocks directly to the core program, and each change needed regression tests in all countries.
The team introduced ZES_ORDER_UPLOAD with a filter-dependent BAdI. Country logic moved into separate implementations owned by the country teams. The core became stable, and later rollouts only added implementations — tested in that country alone.

Common mistakes

  • Country or company IF blocks inside a global core program.
  • Implementations without owner or documentation.
  • Ignoring SPAU_ENH after upgrades.
  • Using explicit points in Z code where a typed BAdI interface is clearer.
  • Not handling CX_BADI_NOT_IMPLEMENTED for optional BAdIs.

Best practices

  • Provide own BAdIs for extensible Z templates.
  • Use naming conventions and composites.
  • Keep an enhancement register (owner, rule, tests).
  • Process SPAU_ENH in every upgrade.
  • Test after transporting implementations.

Interview angle

Questions: "What is SE20 used for?", "Can you create your own enhancement spots?", "What is SPAU_ENH?"
Strong answer: SE20 manages (composite) enhancement spots and implementations; own spots with BAdIs (filters) let global Z templates be extended per country without changing the core; implementations are transportable, can be deactivated (BAdIs); SPAU_ENH adjusts enhancements after upgrades; governance with naming and register.

Practice this lesson

Quick check

1. Disabling one BAdI implementation did not stop a behaviour. What is a likely reason?

2. What is the effect on the standard program's runtime behavior when a BAdI implementation is created in SE19 but left in inactive status?

3. Filter-dependent BAdIs allow:

Interview questions

1. Your organization has 15 CMOD enhancement projects in production for various modules. Document a maintenance and monitoring strategy including: best practices for documentation, version control, and troubleshooting enhancements.

Answer it in your own words first, then compare.

2. Explain how to properly transport CMOD enhancements across SAP systems (DEV → QA → PROD). What are common transport issues and how do you prevent them?

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