What is BADI in SAP ABAP?
โก Smart Summary
BADI in SAP ABAP stands for Business Add-In, an object oriented enhancement that hooks custom logic onto standard SAP functionality. This page explains what a BADI is, its features, the classic and new types, the SE18 and SE19 workflow, and how it compares with exits.

What is BADI?
BADI stands for Business Add Ins. Just like Customer Exits , BADI help hook custom enhancements to SAP functionality. Example of a BADI: In transaction CAT2 – Time Sheet Entry, HR wishes to include an interactive acknowledgment that knowingly submitting incorrect data is grounds for dismissal. This can be achieved using BADI
The difference from a classic exit is technical. A BADI is built on ABAP Objects, so the standard program calls an interface method, and the custom code lives in a class that implements that method. This is why a BADI is often described as the object oriented successor to the customer exit.
Features
- BADI’s are Object Oriented
- They can be implemented multiple times
- It does not require SAP Software Change Registration
- No effect on release upgraded on the functioning of BADI’s
These four features explain why SAP recommends a BADI over a classic exit. Because the enhancement sits in a separate class, it survives an upgrade untouched, and because a BADI can be defined as multiple use, several teams can enhance the same point without overwriting each other.
Types of BADI
SAP offers two generations of Business Add-Ins. The classic BADI is the enhancement based version described above, and the new BADI, introduced with SAP NetWeaver, is part of the Enhancement Framework and is faster and more flexible.
| Criteria | Classic BADI | New (Kernel) BADI |
|---|---|---|
| Maintained in | SE18 and SE19 | The Enhancement Builder inside an enhancement spot |
| Filters | Simple filter values | Filter combinations with logical expressions |
| Fallback | Not available | A default fallback class runs when no implementation is active |
| Instantiation | CL_EXITHANDLER=>GET_INSTANCE | The GET BADI and CALL BADI statements |
| Performance | Slower, object created every call | Faster, managed by the kernel |
Both generations are found and implemented in a similar way, described next.
How to Define and Implement a BADI
This involved three steps
Step 1) Creating BADI Definition and its interface : Transaction SE18.
Step 2) Create the BADI Implementation: Transaction SE19
Step 3) Define a class that implements the interface : During implementation creation, a class for implementing the enhancement’s interface is also created
In code, the standard program reaches the implementation through the exit handler. The classic pattern instantiates the BADI reference and then calls the interface method.
* Reference typed with the BADI interface DATA: lo_badi TYPE REF TO zif_ex_badi_demo. * Get the active implementation(s) CALL METHOD cl_exithandler=>get_instance CHANGING instance = lo_badi. * Call the interface method that carries the custom logic CALL METHOD lo_badi->check_data EXPORTING is_input = ls_input.
๐ก Tip: A new, kernel BADI is called more simply with GET BADI and CALL BADI, which also handle the filter values automatically. Use SE18 to check whether the enhancement point is a classic or a new BADI before writing the call.
โ ๏ธ Warning: Transaction SE18 holds the definition and the interface, while SE19 holds the implementation. Creating the implementation in SE18, or the definition in SE19, is a common mistake that leaves the BADI inactive.
BADI vs Customer Exit vs User Exit
All three techniques enhance standard SAP, but they differ in technology and flexibility. The table below places the BADI next to the two older exit techniques.
| Criteria | User Exit | Customer Exit | BADI |
|---|---|---|---|
| Technology | Subroutine (FORM) | Function module, screen, or menu | Object oriented interface and class |
| Scope | SD module only | All modules | All modules |
| Number of implementations | One | One | Multiple, when defined as multiple use |
| Maintained with | Direct edit of the include | SMOD and CMOD | SE18 and SE19 |
| Upgrade safe | Checked with SPAU | Yes | Yes |
The practical rule is to use a BADI whenever one exists, because it is object oriented, upgrade safe, and can be implemented more than once.



