Enhancements Interview Questions With Answers-SAP ABAP-1.

1. What Is a BADI In SAP ABAP?

The use of object orientated code within SAP has led to a new method of enhancing standard SAP code called Business Add-Ins or BADI's. BADI (Business Add-Ins) is an Object Oriented way to enhance SAP System. Just like Customer Exits, BADI’s help hook custom enhancements to SAP functionality.

BADI's are custom enhancements to the standard SAP system. BADI's can be used to accommodate user requirements that are not very common and should not be present in the standard configuration of SAP. For instance, in a particular industry, there might be a specific requirement in a business process that cannot be covered by the standard functionality of SAP.

Such requirements can be addressed by creating or implementing a BADI that will implement the missing functionality. BADI's are nothing but enhancements through classes and methods. Hence BADI's are also called Object Oriented Enhancements.

2. What Is The Difference Between User-Exit, Customer Exit and BADI’s in SAP ABAP?

Basically, all of them are programs and they enable us to extend the functionality of an SAP system in order to meet custom requirements of business.

  • Customer exits are implemented as Function Modules Exits. It has a z include which can be used for enhancement. No access key is required to implement Customer Exit. Example: EXIT_SAPMM06E_012
  • User Exit are Implemented as subroutines. In include program subroutines starting with FORM USEREXIT_* can be used for modifications in SAP. Access key is required to implement User Exits.. Example MV45AFZZ (Subroutine – USEREXIT_SAVE_DOCUMENT)
  • BADIs are the enhanced version of Customer exits where the same logic is implemented via classes and object (OOPS). For Example: MB_MIGO_BADI.

3. What Are The Transaction Code's For Creating a BADI Definition & BADI Implementation?

SE18 transaction code is used to create a BADI Definition. When you create a BADI definition, a class interface will be automatically created and one can define his/her methods in the interface. The implementation of the methods can be done in SE19 transaction.

When a BADI is created following are automatically generated:
  • An interface name with 'IF_EX_' inserted between the first and second characters of the BADI name. For Example: if BADI name is ZBADI_TEST, Interface name will be ZIF_EX_BADI_TEST (You can verify it in SE24 transaction).
  • An adapter class name with 'CL_EX_' inserted between the first and second characters of the BADI name. For Example: if BADI name is ZBADI_TEST, Class name will be ZCL_EX_BADI_TEST (You can verify it in SE24 transaction).

Transaction code to implement a BADI is SE19. However BADI implementation can also be done through SE18 transaction code.

4. How Do You Find Implementations For a BADI?

  • Go to SE18 transaction.
  • Type the name of BADI definition.
  • From menu bar click on implementation ---> Display.
  • It will display all the implementations of that BADI.

5. How Do You Find BADI’s For a Transaction Code?

First Method:
  • Go To SE24 (display class cl_exithandler).
  • Double click on the method GET_INSTANCE.
  • Put a break point at Line no.25 (CASE sy-subrc) or at line "CALL METHOD cl_exithandler=>get_class_name_by_interface"
  • Execute SAP standard transaction
  • Press the required button for which you need to write an exit logic, the execution will stop at the break point.
  • Check the values of variable 'exit_name', it will give you the BADI name called at that time.
  • This way you will find all the BADIs called on click of any button in any transaction

Second Method
  • Go to SE37 and enter this Function Module (FM) : SXV_GET_CLIF_BY_NAME
  • Put Breakpoint to trigger ABAP Debugger.
  • Run your tcode.
  • You can see the BADI names under this variable "Name".


Also Read...