Enhancements — Modifying Standard SAP (2026 Guide)

ABAP Enhancements: User Exits, BAdIs & Framework 2026 | ABAP Zero to Hero
ABAP Zero to Hero

Chapter 12  ·  Real-World Skills

Enhancements & Standard SAP

How to add custom logic to standard SAP without breaking it — User Exits, BAdIs, and the Enhancement Framework.

Chapter 12 of 20 19 min read Part 3: Real-World 8 Interview Q&A

Here is the uncomfortable truth about SAP: Standard SAP code does not do everything your company needs. Every business has slightly different processes, and eventually someone will ask you to make standard SAP behave differently.

You have two options. The wrong one: modify the SAP source code directly. This breaks the support agreement, causes upgrade nightmares, and gets flagged in every audit. The right one: use Enhancements — SAP’s official mechanism for adding custom logic without touching the original code.

This chapter teaches you all the main enhancement techniques: User Exits, BAdIs, Implicit and Explicit Enhancements, and the Enhancement Framework that ties them all together.

Why this matters Every real SAP project requires enhancements. Knowing how to safely extend standard SAP — and knowing which technique to use when — is one of the most tested skills in ABAP interviews.

🎯 What You Will Learn in This Chapter

  • What enhancements are and why you must never modify standard code
  • How to find and activate User Exits using SMOD and CMOD
  • How to create and implement classic BAdIs with SE18 and SE19
  • How to work with new BAdIs in the Enhancement Framework
  • The difference between Implicit and Explicit Enhancements
  • How to add code at enhancement points using SE80 / SE38
  • When to use an enhancement vs when a modification is unavoidable

🚫 Why You Must Never Modify Standard SAP Code

It is tempting. You find the exact line in SAP’s code that needs to change, you edit it, and everything works. Then upgrade season comes, and everything falls apart.

Problem with ModificationsImpact
SAP support agreement is voidSAP can refuse to help with issues
Upgrades overwrite your codeWeeks of rework after every release
Other modules may depend on original behaviorUnexpected breakdowns elsewhere
Audit trails get messyCompliance teams demand documentation
Testing burden multipliesFull regression needed on every patch
Rule of thumb If a modification is truly unavoidable (no enhancement point exists at the required location), register it in SAP’s Modification Assistant (transaction SPAU / SPDD handle the upgrade process). This tracks every modification and preserves upgrade ability as much as possible.

🧩 Technique 1: User Exits (Legacy but Still Common)

User Exits are SAP-provided subroutine hooks. SAP leaves empty FORM routines in its standard code, and developers fill them with custom logic. This is the oldest enhancement technique but still appears in many production systems.

Two transactions you must know

TransactionPurpose
SMODView all available User Exits in SAP standard code
CMODActivate User Exits and assign them to a custom Enhancement Project

How to use a User Exit

1 Find the User Exit

Go to SMOD. Search for the SAP module or program you want to enhance (e.g., M06B0001 for purchasing). SMOD lists all available User Exits with short descriptions.

2 Create an Enhancement Project

Go to CMOD. Create a new project with a name like ZENH_PO_EXIT. Give it a description and save.

3 Assign the User Exit to the project

In your CMOD project, click Components. Add the SMOD enhancement name (e.g., M06B0001). This assigns the User Exit to your project.

4 Write your code

Double-click the include (e.g., ZXM06U01). SAP opens the include where you write your custom logic. The include is part of your namespace (Z or Y prefix), so it survives upgrades.

5 Activate the project

Save, activate the include, then click Activate on the CMOD project. The User Exit is now live.

User Exit limits User Exits are one-per-enhancement. You cannot have multiple implementations. If two companies both activate the same User Exit, only one can be active. This limitation is why BAdIs were invented.

🎯 Technique 2: BAdIs (Business Add-Ins)

BAdIs are the modern, object-oriented enhancement technique. Instead of filling empty FORMs, BAdIs use interfaces and implementing classes. This allows multiple implementations, filtering, and clean separation of logic.

Classic BAdI vs New BAdI

FeatureClassic BAdINew BAdI
Transaction for definitionSE18SE18 (Enhancement Spot)
Transaction for implementationSE19SE19 (via Enhancement Spot)
Based onInterface + implementing classEnhancement Framework
Multiple active implementations❌ No (one active per BAdI)✅ Yes
Filters supportedLimited✅ Full support
Cloud readyNoYes
Recommended forLegacy maintenanceAll new development

How to implement a classic BAdI

1 Find the BAdI

Go to SE18. Enter the BAdI name (e.g., MB_MIGO_BADI for MIGO enhancements) or search by description. View the interface and documentation.

2 Create the implementation

Go to SE19. Click Create. Give your implementation a name like ZIMPL_MIGO_CHECK. Enter the BAdI name it implements.

3 Implement the interface methods

SE19 generates a class that implements the BAdI interface. Double-click each method and add your custom logic. The BAdI interface defines which methods are called — you just fill them in.

4 Activate

Save, activate the class, then activate the BAdI implementation. The BAdI is now live — whenever SAP calls the BAdI, your implementation runs.

Why BAdIs are better Multiple implementations can be active at the same time. Filters let you scope implementations (e.g., only for a specific company code). BAdIs are clean, object-oriented, and upgrade-safe.

🔧 Technique 3: Implicit & Explicit Enhancements

When User Exits and BAdIs do not exist at the location you need, the Enhancement Framework provides two more options: Implicit Enhancements and Explicit Enhancements.

Implicit Enhancements

SAP automatically provides Implicit Enhancement points at:

  • Beginning and end of FORM routines
  • Beginning and end of Function Modules
  • Beginning and end of Methods
  • End of include programs
  • End of class implementations

You do not need SAP to place a marker. Every FORM, FM, and Method has these points available.

How to add an Implicit Enhancement

1 Open the program in SE38 or SE80

Navigate to the location where you want to add logic (e.g., inside a FORM routine).

2 Go to Edit → Enhancement Operations

In the menu, choose Edit → Enhancement Operations → Show Implicit Enhancement Options. SAP highlights the available enhancement points with a special icon.

3 Create the enhancement

Right-click the enhancement point. Choose Create Enhancement. Give it a name (Z-prefixed). SAP generates an overlay where you can add code.

4 Write your code and activate

Add your code in the generated enhancement block. Save and activate. Your logic now runs at that point in the standard code — without modifying the original line.

Explicit Enhancements

Explicit Enhancements are marker points that SAP places deliberately in standard code using:

" Enhancement Point — free insertion point
ENHANCEMENT-POINT z_my_enhancement SPOTS z_enh_spot.

" Enhancement Section — replaces a code block
ENHANCEMENT-SECTION z_my_section SPOTS z_enh_spot.
  " Standard code that can be replaced
END-ENHANCEMENT-SECTION.

You implement them the same way as Implicit Enhancements — through the Enhancement Framework in SE38 or SE80.

Implicit vs Explicit — the practical difference Implicit points are automatically available everywhere (start/end of routines). Explicit points exist only where SAP deliberately placed them. Both are upgrade-safe. Both use the same Enhancement Framework.

⚖️ Which Enhancement Technique Should You Use?

ScenarioRecommended Technique
A User Exit exists at the exact place you needUser Exit (SMOD/CMOD)
A BAdI exists for the functionalityBAdI (SE18/SE19) — preferred over User Exit if both exist
No BAdI, but an Implicit point existsImplicit Enhancement via SE38/SE80
No Implicit point, but an Explicit point existsExplicit Enhancement
Multiple implementations neededBAdI (only technique that supports this)
Modern ABAP Cloud projectNew BAdI via Enhancement Framework
No enhancement available anywhereModification (last resort, register in Modification Assistant)

📝 Chapter Summary

  • Never modify SAP standard code directly — it breaks upgrades and voids support.
  • Enhancements are SAP’s official way to add custom logic without touching the original.
  • User Exits — legacy technique using SMOD (view) and CMOD (activate). One active implementation per exit.
  • BAdIs — modern object-oriented technique using SE18 (definition) and SE19 (implementation). Support multiple implementations and filters.
  • Implicit Enhancements — automatically available at start/end of FORMs, FMs, Methods, includes.
  • Explicit Enhancements — placed deliberately by SAP using ENHANCEMENT-POINT and ENHANCEMENT-SECTION.
  • The Enhancement Framework unifies all of these — same tooling, consistent process.
  • Use Modifications only as a last resort — and always register them in the Modification Assistant.

🎤 Interview Questions & Answers

Enhancements are a favorite interview topic because they reveal whether you understand upgrade-safe development. Know these cold.

1 What is an Enhancement in SAP ABAP and why is it needed?

An Enhancement in SAP ABAP is a mechanism that allows developers to add custom logic to standard SAP programs without modifying the original SAP source code. It is needed because directly modifying SAP standard code is dangerous — SAP support agreements forbid it, and modifications break during upgrades. Enhancements preserve SAP’s warranty and survive version updates.

2 What is the difference between a User Exit and a BAdI?

A User Exit is an older enhancement technique where SAP provides predefined subroutine hooks (FORM routines) that developers can activate and fill with code. A BAdI (Business Add-In) is the modern, object-oriented enhancement technique based on interfaces and implementing classes. BAdIs support multiple implementations, filtering, and are upgrade-safe. User Exits are legacy but still common in older systems.

3 What is CMOD and SMOD?

SMOD is the transaction used to view and select User Exits provided by SAP. CMOD is the transaction used to activate those User Exits and assign them to a custom enhancement project. You use SMOD to find available User Exits, and CMOD to implement them.

4 What is the difference between classic BAdI and new BAdI?

Classic BAdI uses transaction SE18 for definition and SE19 for implementation. It is based on interfaces but has limitations like a single active implementation per BAdI. New BAdI (sometimes called Enhancement Spot BAdI) is created via the Enhancement Framework and supports multiple active implementations, filters, and full integration with modern ABAP. New BAdI is recommended for all new development.

5 What is an Implicit Enhancement?

An Implicit Enhancement is a predefined extension point that SAP has built into standard code without any explicit declaration. These are automatically available at certain points like the beginning and end of FORM routines, Function Modules, Methods, and at the end of include programs. Developers can add code at these points using the Enhancement Framework in SE80 or SE38.

6 What is an Explicit Enhancement?

An Explicit Enhancement is a specific extension point that SAP has explicitly marked in the standard code using ENHANCEMENT-POINT or ENHANCEMENT-SECTION statements. Unlike Implicit Enhancements, these are intentionally placed by SAP where they expect customers to add custom logic.

7 What is the Enhancement Framework?

The Enhancement Framework is SAP’s unified technology for all enhancement techniques. It provides a consistent way to create Enhancement Spots, Enhancement Points, Enhancement Sections, and BAdI implementations. Everything in modern ABAP enhancements — including new BAdIs — runs on this framework.

8 When should you use an enhancement vs a modification?

Use an enhancement whenever possible — it is upgrade-safe, doesn’t break SAP’s support, and preserves your warranty. Use a modification only when no enhancement point exists at the required location AND the change cannot be achieved any other way. Even then, modifications should be documented and registered in SAP’s Modification Assistant to track them.

🛠 Practice Task for This Chapter

Practice all three enhancement techniques. The goal is to understand the workflow, not to memorize every step.

  1. User Exit (SMOD + CMOD): Find any User Exit in SMOD for a common transaction (e.g., M06B0001). Create a CMOD project, activate the User Exit, and write a simple WRITE statement to verify it runs.
  2. Classic BAdI (SE18 + SE19): Find a well-documented BAdI (e.g., MB_MIGO_BADI or any BAdI in your system). Create an implementation in SE19, implement one method to display a MESSAGE, and test it.
  3. Implicit Enhancement: Open any standard FORM in SE38. Go to Edit → Enhancement Operations → Show Implicit Enhancement Options. Create an enhancement at the top of the FORM and add a simple comment or message.
  4. Read documentation: For each BAdI or User Exit you work with, read the SAP documentation (click the Documentation button in SE18). Understanding what each enhancement was designed to do is more important than the syntax.
Why this matters Every real SAP project requires enhancements. Interviewers will ask: “How would you add a validation to MIGO?” The correct answer includes knowing which BAdI or User Exit to use, and how to implement it safely.
🎯 Chapter 12 Challenge

Test: Kon Banega Crorepati?

5 questions. ₹1 Crore. Prove you understood Enhancements. No pressure — restart anytime.

₹1,000 ₹10,000 ₹1,00,000 ₹10,00,000 ₹1 Crore
Question 1 of 5
Score: 0
Q1
🏆
You Did It!
0/5Correct Answers
You won ₹0
➡️ Next Chapter

➡️ Next Chapter

You can now extend standard SAP safely. In Chapter 13, you will learn BDC, BAPI & IDoc — how to migrate data into SAP and build interfaces between SAP and other systems.

Chapter 13 BDC, BAPI & IDoc — Data Migration & Interfaces →
Want to Learn Faster?

Explore Our Instructor-Led SAP & IT Courses

Self-study works. But if you want guided training, real project practice, and placement support — here are the courses we offer. Book a free demo before you decide.

WhatsApp WhatsApp us
Call Now Button