Enhancements Part 6: Enhancement Spots and Implementations
Lessons are open to try during our launch period. Some advanced content may move to Pro later. AI practice limits apply separately.
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.
In this lessonShow sectionsHide sections
Visual overview
Expert visual walkthrough
Enhancement Spots and Implementations
Enhancements · Chapter-specific technical teaching map
Architecture hierarchy
Enhancement spot
Definition
Implementation
Active runtime
Tutor's chapter 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…
In a real project
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…
Watch out for
• 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. •…
The situation: a 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.
Explanation
Parts 2 through 5 used SAP's own enhancement spots. This lesson treats spots and implementations as objects you actively manage — and shows how to create your own.
SE20 is the transaction where this management happens. For an Enhancement Spot, it displays the available options — BAdI definitions, explicit points and explicit sections — along with their implementations. For an Enhancement Implementation, it displays which options that implementation covers, its package, and its status. A composite spot or composite implementation is a logical grouping, for example all implementations belonging to a project such as "Order to Cash". SE20 shows spots (SAP-defined containers of options) and implementations (your code), including composites.
You are not limited to using SAP's own spots — you can define enhancement spots for your own Z code.
Global template programs used by several countries often need country-specific logic, and rather than scattering IF country = … checks through the core program, you can define an enhancement spot such as ZES_ORDER_UPLOAD containing a new BAdI ZBADI_ORDER_UPLOAD, with interface ZIF_EX_ORDER_UPLOAD and a filter on COUNTRY.
The core program then calls GET BADI and CALL BADI, and each country team creates its own implementation with its own filter value, without touching the core at all.
(The mechanics of BAdIs themselves are covered in the BAdI series.) You can create your own enhancement spots in Z programs so other teams or countries can extend your code without changing it.
It is also possible to add plain ENHANCEMENT-POINT statements directly to your own programs, but BAdIs are generally preferred, since they offer a typed interface, clear parameters and filter support.
On activation and status: implementations are active once activated in the transport target, and a new BAdI implementation can be deactivated using a flag in SE19. Inactive or erroneous implementations show up in SE20, and if broken, they can cause syntax errors in the calling program — so it is worth testing carefully after transports.
During upgrades, SPAU_ENH lists enhancement implementations whose options have changed or been deleted, and each one needs to be adjusted or confirmed; this list is typically much smaller than the classic SPAU list used for modifications. After upgrades, SPAU_ENH lists implementations whose options changed.
Governance matters as this grows: use naming conventions such as ZEI_<area>_<purpose> for implementations and ZES_ for your own spots, register each implementation in a list with its owner, business rule and test case, and keep one implementation per purpose, using composites to group by project. Without naming rules and ownership, enhancement implementations become an invisible layer of logic nobody maintains.
As an exercise, use SE20 to display a composite enhancement implementation from your own project (or create a training one), then create a spot ZES_TRAINING with a BAdI that has a method APPLY and a filter on COUNTRY (using SE20 and SE18), and call it from a Z report, implementing it for two different countries as shown in the code example. By the end you should be able to manage spots and implementations, and to provide your own extension points for others to use.
Code example
* ===== 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.Watch out
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.
Do this
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.
In the interview
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
0 of 3 questions attempted
Question 1 of 3
Disabling one BAdI implementation did not stop a behaviour. What is a likely reason?
Question 2 of 3
What is the effect on the standard program's runtime behavior when a BAdI implementation is created in SE19 but left in inactive status?
Question 3 of 3
Filter-dependent BAdIs allow:
Practise this in an interview
Answer in your own words and get instant feedback, the way an interviewer would judge it.
1Your 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.
2Explain how to properly transport CMOD enhancements across SAP systems (DEV → QA → PROD). What are common transport issues and how do you prevent them?
Try a related Code Lab
This published exercise covers the same SAP topic. Apply the ideas in a hands-on scenario, then return to review your answers.
Open: Add a delivery block via BAdI instead of modification →See it in code
Each example starts from a requirement, shows the design, then the code step by step with a plain-language explanation of every part.
- BAdI from both sides: define your own BAdI (SE18), call it with GET BADI, and implement it
- ABAP BAdI: define one, call it from your code and implement it
- User exit in sales orders: stop the save when an item quantity is too high (MV45AFZZ)
- ABAP first steps: variables, IF, CASE and loops in a runnable class
Was this lesson helpful?
Keep exploring
Interview questions on this topic
Related SAP topics
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.