How To Defining and Implementing Business Add-ins (BADI)




Business add-ins (BADI) are enhancements to the standard version of the system. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery.

Two different views are available:

  1. In the definition view, an application programmer defines exit points in a source that allow specific industry sectors, partners, and customers to attach additional coding to standard SAP source code, without having to modify the original object. 
  2. In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard solution, if one is available. 

Steps for Defining BADI

Go to transaction SE18 and create a BADI Definition.










Enter the description of the definition. The name of the interface will be automatically proposed.
   










Save 













Double click on the interface  YIF_EX_H387_GET_MATNRDATA .  Enter the name of the method you want to create. 










Click the Parameters’ pushbutton to create parameters for the method. 









Save and activate it. 

Steps for BADI Implementation

This can be done in any of the following way: 
(a) On the menu bar of the initial screen of SE18 -> Implementation -> Create. 
















Enter the Implementation name. Press enter

(b) Or go to T.code SE19
















A popup window will ask you for the definition name. Enter the name of the BADI definition which you have created. Press Enter.  















Enter the description for the implementation. Then save and activate it. Double click on the method name. Write the following code. Save and activate it











Now create the following code, using the created BADI  




















Note: The above example is Single implementation. For multiple implementations, define an add-in and select the Multiple Use checkbox from the Attributes tab. 














We can differentiate between single-use and multiple use Business Add-Ins. The distinction is based on the procedure or event character of an enhancement. In the first case, the program waits for the enhancement to return something, usually a return code. 

A typical example could be a benefit calculation in HR. Depending on the implementation, alternative calculations can be executed. With multiple use add-INS, an event that may be of interest to other components is processed in program flow. 

Any number of components could use this event as a “hook” to hang their own additional actions on to.  

Note: The system does not check whether the class or method specified in BADI implementation actually exists. If a class or method does not exist, a runtime error occurs when using the function in the formula builder.

(By : Jaya Vani Bheemarasetti)


Ranking: 5