You are on page 1of 18

BADI

Disadvantages of earlier enhancement techniques

Could only be used once (customer exits)

No screen enhancement (business transaction events (BTEs)

No menu enhancement (BTEs)

No administration level (BTEs)

Requirements for new enhancement techniques

Reusable

All enhancement types (program / menu / screen exit)

Administration level

Implemented using latest technology

Why OOPS ?

Each function module execution has copies of the data, and it is


difficult to keep them consistent when changes are made at global
level in a function group .

Data and functions are defined in classes instead of function groups.


An ABAP program can then work with any number of runtime instances
(objects ) that are based on the same template unlike the FM .

What is Interface ?

Interface has a definition but not implementation.

Interfaces are implemented by classes .

They contain declarations for elements such as attributes and


methods.

In a program, you can create reference variables with reference to


interfaces. However, you cannot instantiate an interface.

A BADI can offer ..

Program enhancements: The interfaces for program enhancements are defined


in the form of interface methods. This interface is used to implement the
enhancement. The SAP program calls the interface methods of the generated
Business Add-In class.

Menu enhancements: As with customer exits, you can enter function codes in a
Business Add-In.These menu entries are available in the GUI definition and are
made visible when the Business Add-In is implemented.

Screen enhancements

Components of BADI

Interface .

Generated class (Business Add-In class) that implements the interface :

Filtering: If you implement a filter-dependent Business Add-In, the Add-In


class ensures that only the relevant implementations are called with
FLT_VAL parameter.
Multiple implementations : A BADI can be implemented multiple times
however the sequence of execution cant be predicted . Popular in
validation scenarios .

Flow of a BADI

Syntax

How to identify a BADI ?

Global search in the main program for "CL_EXITHANDLER and


"GET_INSTANCE ,Double click on interface reference variable .

Set a breakpoint directly in


SE24 -> CL_EXITHANDLER -> GET_INSTANCE

SE80 -> Enhancements -> Business Add-ins

SPRO -> Navigate to relevant business function -> BADI .

Customer exits Vs BTE Vs BADI

Why new BADIs ???

SAP introduced the new BAdI technology in SAP NetWeaver Application


Server 7.0 primarily to improve performance and enhance functions.

The integration of the new BAdIs as well as enhancement points and


enhancement sections into the enhancement framework enables you
to use the new enhancement options within a single, unified tool.

By integrating the new enhancement technology into the Switch


Framework, SAP enables you to use switches activate and deactivate
the BAdI implementations implemented by Industry Solutions.

Older BAdIs, which were created using the classical technology, remain
in the system. In future, new enhancements will only be implemented
using the new BAdI technology or using explicit enhancement points
and enhancement sections.

Q&A?

You might also like