Badi In SAP ABAP

Vibhavari SarafVibhavari Saraf
2 min read

What is Badi in Enhancement and How To Create Badi?

Business Add-In (BAdI) is Adding some additional functionality to Standared Functionality Without Disturbing The Standared Functionality.

Enhancement Spot?

The enhancement concept is a framework that allows one to enhance or modify the functionality of standard SAP applications without directly modifying the original source code.

  1. Identify the enhancement point

    • Find the enhancement point in your application where you want to provide the BAdI for consumption.
  2. Create an enhancement spot

    • Go to TCODE SE18 and create an enhancement spot.

      TCODE SE19 Screen

Create enhancement spot screen

  1. Define BAdI definition

    • Click on Create icon for BAdI definition. Provide a meaningful name and description.

Create BAdI option selection

Create BAdI definition screen

BAdI definition is created. Now select necessary options based on requirements like Usability, Instance Creation Mode, and more.

Screen to add further info regarding BAdI definition

Now comes the important part, defining the interface which will be implemented by the developer. Before creating the interface, think from the perspective of other developers and include the necessary parameters that they may require for their enhancements.

  1. Define BAdI definition interface

    • Click on Interface under the required BAdI definition name.

    • Provide the Interface name and create, if not created already.

BAdI interface definition

If you are creating an interface directly from SE24 then ensure that the interface “IF_BADI_INTERFACE” is included in the interface.

BAdI interface definition

  1. Create an enhancement point

    • Create an enhancement point for the BAdI in necessary places in your product.

      Creating an enhancement point

you have completed defining BAdI for user consumption.

Consuming a BAdI

It is a common requirement in SAP to modify the functionality of the standard application as per the business requirement. To facilitate the same, SAP has provided lots of different BAdI for different solutions it has.

  1. Identify the BAdI for implementation

    • BAdI can be identified using the product documentation

    • Using transaction SE20.

Suppose we want to implement the following BAdI

Searching an enhancement point

  1. mplementation

    • Go to transaction SE19. Provide the name of the enhancement spot navigating path.
      “Create Implementaton→New BAdI→Enhancement Spot”

    • Create enhancement implementation.

For a BAdI definition, we can get the enhancement spot using transaction SE20

Enhancement implementation

  • Provide the name of BAdI implementation, and implementing class, and select the BAdI definition.

BAdI implementation information

  • Implement and activate the BAdI implementation class.

BAdI definition interface implementation class

1
Subscribe to my newsletter

Read articles from Vibhavari Saraf directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vibhavari Saraf
Vibhavari Saraf