SAP BADI (Business ADD-INS)
SAP BADIs are used to adding some additional functionality to standard functionality without disturbing the standard functionality. BADIs are introduced from 4.6C version on wards.
BADI contains 2 sections.
1. BADI Definition
2. SAP BADI Implementation
Each BADI definition contains one adapter class and interface.
Adapter class taking care the version change management (When ever the version is changed if any changes required in the BADI those are done by adapter class).
Interface is the collection of methods which are defined not implemented. Those are implemented through BADI implementation based on client requirement.
The transaction code for BADI definition is SE18.
SAP BADI Implementation: – BADI Implementation is nothing but implementing the methods which are defined in BADI definition. The transaction code for BADI implementation is SE19.
Differences between Customer exit (Enhancement) and BADI.
Customer Exit (Enhancement)
1.We can implement the customer exit only.
2.Customer exit is the procedural approach. So it takes some extra time to enhancing.
3.In the screen exit the screen number is fixed which is provide by SAP.
4.By using CMOD transaction we can implement the customer exit.
BADI
1. We can implement the same BADI any number of times.
2. BADIS are object oriented approach. So it takes very less time to enhancing.
3. In the screen BADI we provide our own screen number.
4. By using SE19 transaction we can implement the BADI.
Note: -In the real time we never create our own BADI. We always use existing BADIs.
Some of the scenario:
example of SAP BADI implementation
Scenario 1:
In the real time MDM (Master Data Management) people create the vendor and customer ‘XK01’ & ‘XD01’ & later they maintain the key information in a excel sheet at end of the month they take a printout. They put a sign & their respective people also put a sign. This is required for audit companies. We implement a BADI to maintain the key information in a excel sheet at the time of create & save the vendor & customer.
Scenario 2:
At the time of creating the vendor and customer some times MDM people provide the incorrect recon account and cash management group. To avoid this we implement the BADI to preset the recon account and cash management group based on given company code.
Scenario 3:
At the time of creating the vendor and customer some times MDM people provide the invalid terms of payment to avoid this we implement the BADI to preset the terms of payment based on the purchase organization or sales organization.
Scenario 4:
Against the vendor supplies, the warehouse department create a goods receipt with MIGO transaction 101 movement type. Against GR the finance people physically verify the stock & prepares the IR document. Against IR document the account payable department pay the amount to the vendor with declaration of previous amount. After few days the vendor asks the Form 16A to finance people at the time of generating form 16. The finance department must provide LR Number, Vehicle number, Transport name. These information isn’t captured in the entire MM life cycle. Here we implement the BADI to attach additional subscreen which contains above fields to MIGO transaction.
Steps to identify the standard SAP BADI tutorial: -
Method 1:
-> Execute ‘SE24’.
-> Provide the object type as ‘CL_EXITHANDLER’.
-> Click on display.
-> Double click on GET_INSTANCE method.
-> Place the break-point on first call method.
-> Now we execute our required transaction (which transaction BADIs we want) in a separate session.
-> Execute XK01. Enter.
-> In the menu bar click on debugger -> switch to classic debugger.
-> Provide the field name as EXIT_NAME. Enter.
-> Identify the BADI (VENDOR_ADD_DATA). Continuously click on F8 button.
-> Identify the all the BADIs & maintained in Excel sheet.
–> Once the transaction is completed, we go to SE24 and remove the break point
-> Now open the each & every BADI in ‘SE18’.
-> (BADI Name: VENDOR_ADD_DATA). Click on display.
-> Click on interface tab. Double click on each & every method. Identify the input, output parameters.
-> In the menu bar click on goto -> documentation -> to component. Read the documentation if it satisfies our requirement then we implement this method through SE19.
Note: In the real time we always identify the BADIs with the help of functional people.
Method 2:
-> Execute ‘SE93’.
-> Provide transaction code (XK01).
-> Click on display. Click on display object list (Ctrl + Shift + F5).
-> Expand the package in the left panel (FBK).
->Expand the enhancements. Expand the classic BADIs definition.
-> Identify the all the BADIs.
-> Open the each and every BADI in SE18. Click on interface tab.
Double click on each method.
-> Identify the input, output parameters.
-> In the menu bar click on go to -> documentation -> to component.
-> Read the documentation.
-> If it satisfies client requirement then we implement this method through SE19.
Object: SAP BADI implementation to maintain/ download the key information of vendor into excel sheet at the time of create and save the vendor through XK01 transaction .
The key information is Vendor number, company code ,account group, name, search term, street, city,
postal code, created by and created date
BADI NAME : VENDOR_ADD_DATA
Method name : CHECK_ALL_DATA
This is the best way to crack for SAP BADI interview questions in real time and in working environment.
BADI in SAP ABAP: How to Implement and Configure Part 2 continue
To learn SAP ABAP from SAP click here