Show TOC Start of Content Area

Background documentation Business Add-Ins (BAdIs)  Locate the document in its SAP Library structure

Definition

A BAdI is an object-oriented enhancement option, which makes it the most sophisticated enhancement type. The main characteristic of a BAdI is that it provides a mechanism to change the functionality of a well-defined business function (e.g. a BAPI) without making changes to the delivered source code. Future upgrades of the original business function can be applied without losing the customer-specific enhancements or the need to merge the changes. The two code lines (the original one and the customer-specific coding) are strictly separated but still integrated.

Note

The BAdI technology is not limited to SAP applications. BAdI calls can be integrated in customer applications, which in turn can then be enhanced by other customer applications.

Reimplementation of the BAdI Technology

The new BAdI concept takes advantage of SAP’s extensive experience in offering customers different ways to enhance the standard SAP system. The new BAdIs add some major improvements to the classic BAdIs such as better performance. The new BAdIs are integrated in the kernel and are switchable.

The reimplementation of BAdIs has two main goals:

      By integrating the BAdIs in the ABAP programming language through the new language elements GET BADI and CALL BADI, their performance is considerably enhanced.

      The new BAdIs provide considerably more flexibility in the conversion of predefined enhancement options through new properties such as contexts and filters.

The new ABAP language elements and their additions ensure that these additional options can be easily used in ABAP programs.

Note

Within the Enhancement Framework, a new BAdI is always meant when the term BAdI is used. If there is an explicit reference to the previous BAdI concept, such BAdIs are referred to as classic BAdIs.

Examples

The following examples explain some of the most common problems that BAdIs solve:

      Standard software – the customer wants specific changes but modifications cause problems.

The solution is a BAdI, a type of enhancement with a well-defined interface; BAdIs are more robust to changes than source code plug-ins.

      Different country and industry solutions need their own specific solution of a specified problem.

The solution is to create a BAdI definition in the core and the different countries can add their own implementations.

      You want to add and later choose parts of code dynamically.

The solution is to create an internal BAdI and add the different parts in different implementations. The BAdI and its implementations may belong to different software layers.

      As an SAP developer, you have a program in the SAP standard and want to give customers the chance to add some specific code of their own.

The solution is to include BAdI calls in the standard software. The customer can add the implementations of these objects later.

      You have a program which needs specific implementations for different countries.

The solution is to put the country-specific parts in BAdI implementations. These implementations can be overwritten later for the respective countries without modifying the original program that contains the BAdI calls.

      You want to program a registry.

It is possible to use the BAdI infrastructure to build a high-performance registry. In that case, the filter is used as selection criteria for the registry.

More information:

BAdIs - Documentation

BAdIs - Migration of Classic BAdIs

BAdIs - More Information

 

 

End of Content Area