What kind of enhancements are possible?
Depending on your release there a lot of ways to enhance your system.
- BAdI
- classic BAdIs
- kernel-based BAdIs from Enhancement Framework since Netweaver 2004s
- User Exits (also known as CMODs/SMODs)
- Appends to structures and database tables
- additional values in fixed-value domains
What is a BADI?
BADI stands for Business Add-In. These are like user exits but are implemented using ABAP Objects. BADI's can be implemented in every stage of the systems landscape. That means there are more than SAP and Customer specific views, but also country or language specific views.
How to Search BADI for a Transaction?
?Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Go to the Transaction, for which we want to find the BADI,
Get the Program Name of Corresponding Transaction.
(Click on System->Status. Double Click on Program Name)
Once inside the program search for 'CL_EXITHANDLER=>GET_INSTANCE'.
Make sure the radio button "In main program" is checked.
A list of all the programs with call to the BADI's will be listed.
The export parameter 'EXIT_NAME' for the method GET_INSTANCE of class CL_EXITHANDLER will give you the BADI name for the Transaction.
?Finding BADI Using SQL Trace (TCODE-ST05).
HOW TO FIND BADI`S?
Introduction
There are multiple ways of searching for BAdIs. My favorite one is using the Performance Trace (formerly known as SQL trace) transaction code ST05.
This analyzing technique is based on the fact that all BAdIs are registrated in SAP database tables. So for each BAdI call these database tables will be accessed. The BAdI database tables are SXS_INTER, SXC_EXIT, SXC_CLASS and SXC_ATTR. These tables are always accessed by the views V_EXT_IMP and V_EXT_ACT. So these two ABAP views (T: SE11) will be the basis for the trace.
BADI
The procedure to discover BAdIs by a Performance Trace will be explained by using the example used below.
Example case
I want to know which BAdIs are called in the transaction "Maintain Business Partners" transaction code BP.
Pre checks
Trace Actions
Start the Performance trace
Remark: We need to trace also the buffer calls, because BAdI database tables are buffered. (especially view V_EXT_IMP and V_EXT_ACT)
Execute the Business transaction
Name | NL4B |
Street | Olympia |
House number | 1a/1b |
Postal code | 1213 NS |
City | Hilversum |
Country | NL |
Performance trace
Analyzing the Trace List
Showing the Trace List
The popup screen "Set Restrictions for Displaying Trace" appears
Now we are going to filter the trace on Objects: V_EXT_IMP and V_EXT_ACT.
See the result:
Interpreting the Trace list
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BAdI class interfaces. The BAdI name is after the IF_EX_.
So the BAdI name of IF_EX_ADDR_LANGU_TO_VERS is ADDR_LANGU_TO_VERS.
In transaction SE18 you can see the BAdI definition.
(If you can’t find the BAdI definition name, search in table SXS_INTER.)
Exporting the Trace list
If you’d like to keep your analysis, you can export it to Excel file format.
Actually the file will be saved in tab separated file format, but giving the file the extension .xls it will automatically be opened by Excel.
View V_EXT_IMP and V_EXT_ACT
The reason for filtering the result not only on the view V_EXT_IMP but also on V_EXT_ACT is necessary, because not all BAdIs are implemented in the same way.
For example:
V_EXT_IMP catches BAdI BPTIME_BP001.
V_EXT_ACT catches BAdI ADDRESS_SEARCH
Tips
So during the Performance trace you won’t make mistakes. Making mistakes during the recording will cause extra trace lines in your trace list.
This tip is best explained by an example.
When I restart transaction BP after I have created, displayed or changed a business partner, the last opened business partner will be displayed automatically. This means also I will get extra trace lines in my trace list.
To start again with an empty business partner screen you have to close all GUI sessions and login again.
Appendix BP analysis
View | Call | BAdI |
V_EXT_ACT | R 20 ADDR_LANGU_TO_VERS | ADDR_LANGU_TO_VERS |
V_EXT_IMP | R 30 IF_EX_ADDR_LANGU_TO_VERS | ADDR_LANGU_TO_VERS |
V_EXT_ACT | R 20 BUPR_FILTER_RELTYP | BUPR_FILTER_RELTYP |
V_EXT_IMP | R 30 IF_EX_BUPR_FILTER_RELTYP | BUPR_FILTER_RELTYP |
V_EXT_ACT | R 20 BUPR_FILTER_RELTYP | BUPR_FILTER_RELTYP |
V_EXT_IMP | R 30 IF_EX_BUPR_FILTER_RELTYP | BUPR_FILTER_RELTYP |
V_EXT_ACT | R 20 BUPR_FILTER_RELSHP | BUPR_FILTER_RELSHP |
V_EXT_ACT | R 20 BUPA_AUGRP | BUPA_AUGRP |
V_EXT_IMP | R 30 IF_EX_BUPA_AUGRP | BUPA_AUGRP |
V_EXT_IMP | R 30 IF_EX_BPTIME_BP001 | BPTIME_BP001 |
V_EXT_ACT | R 20 ADDRESS_SUBSCREEN | ADDRESS_SUBSCREEN |
V_EXT_ACT | R 20 ADDRESS_SEARCH | ADDRESS_SEARCH |
V_EXT_IMP | R 30 IF_EX_ADDRESS_SUBSCREEN | ADDRESS_SUBSCREEN |
V_EXT_IMP | R 30 IF_EX_ADDRESS_SUBSCREEN | ADDRESS_SUBSCREEN |
V_EXT_IMP | R 30 IF_EX_ADDRESS_SUBSCREEN | ADDRESS_SUBSCREEN |
V_EXT_IMP | R 30 IF_EX_ADDRESS_SUBSCREEN | ADDRESS_SUBSCREEN |
V_EXT_ACT | R 20 ADDRESS_SEARCH | ADDRESS_SEARCH |
V_EXT_ACT | R 20 ADDRESS_CHECK | ADDRESS_CHECK |
V_EXT_ACT | R 20 ADDRESS_CHECK | ADDRESS_CHECK |
V_EXT_ACT | R 20 ADDR_TXJCD_CHECK | ADDR_TXJCD_CHECK |
V_EXT_ACT | R 20 ADDRESS_CHECK | ADDRESS_CHECK |
V_EXT_ACT | R 20 ADDR_PRINTFORM_SHORT | ADDR_PRINTFORM_SHORT |
V_EXT_IMP | R 30 IF_EX_ADDR_PRINTFORM_SHORT | ADDR_PRINTFORM_SHORT |
V_EXT_ACT | R 20 BUPA_ROLE_EXPORT | BUPA_ROLE_EXPORT |
V_EXT_IMP | R 30 IF_EX_BUPA_ROLE_EXPORT | BUPA_ROLE_EXPORT |
V_EXT_ACT | R 20 BUPA_BANK_EXPORT | BUPA_BANK_EXPORT |
V_EXT_IMP | R 30 IF_EX_BUPA_BANK_EXPORT | BUPA_BANK_EXPORT |
V_EXT_ACT | R 20 BUPA_CCARD_EXPORT | BUPA_CCARD_EXPORT |
V_EXT_IMP | R 30 IF_EX_BUPA_CCARD_EXPORT | BUPA_CCARD_EXPORT |
V_EXT_ACT | R 20 BUPA_INDSEC_EXPORT | BUPA_INDSEC_EXPORT |
V_EXT_IMP | R 30 IF_EX_BUPA_INDSEC_EXPORT | BUPA_INDSEC_EXPORT |
V_EXT_ACT | R 20 BUPA_ADDR_EXPORT | BUPA_ADDR_EXPORT |
V_EXT_IMP | R 30 IF_EX_BUPA_ADDR_EXPORT | BUPA_ADDR_EXPORT |
V_EXT_ACT | R 20 BUPA_GENERAL_EXPORT | BUPA_GENERAL_EXPORT |
V_EXT_IMP | R 30 IF_EX_BUPA_GENERAL_EXPORT | BUPA_GENERAL_EXPORT |
V_EXT_ACT | R 20 BUPA_GENERAL_UPDATE | BUPA_GENERAL_UPDATE |
V_EXT_IMP | R 110 IF_EX_BUPA_GENERAL_UPDATE | BUPA_GENERAL_UPDATE |
V_EXT_ACT | R 20 BUPA_BANK_UPDATE | BUPA_BANK_UPDATE |
V_EXT_IMP | R 110 IF_EX_BUPA_BANK_UPDATE | BUPA_BANK_UPDATE |
V_EXT_ACT | R 20 BUPA_CARDS_UPDATE | BUPA_CARDS_UPDATE |
V_EXT_IMP | R 30 IF_EX_BUPA_CARDS_UPDATE | BUPA_CARDS_UPDATE |
V_EXT_ACT | R 20 BUPA_ROLES_UPDATE | BUPA_ROLES_UPDATE |
V_EXT_IMP | R 30 IF_EX_BUPA_ROLES_UPDATE | BUPA_ROLES_UPDATE |
V_EXT_ACT | R 20 BUPA_INDSEC_UPDATE | BUPA_INDSEC_UPDATE |
V_EXT_IMP | R 30 IF_EX_BUPA_INDSEC_UPDATE | BUPA_INDSEC_UPDATE |
V_EXT_ACT | R 20 BUPA_IDENT_UPDATE | BUPA_IDENT_UPDATE |
V_EXT_IMP | R 30 IF_EX_BUPA_IDENT_UPDATE | BUPA_IDENT_UPDATE |
V_EXT_ACT | R 20 ADDRESS_UPDATE | ADDRESS_UPDATE |
V_EXT_IMP | R 30 IF_EX_ADDRESS_UPDATE | ADDRESS_UPDATE |
V_EXT_IMP | R 30 IF_EX_ADDRESS_UPDATE | ADDRESS_UPDATE |
V_EXT_ACT | R 20 BUPA_ADDR_UPDATE | BUPA_ADDR_UPDATE |
V_EXT_IMP | R 110 IF_EX_BUPA_ADDR_UPDATE | BUPA_ADDR_UPDATE |
V_EXT_ACT | R 20 BUPA_TAX_UPDATE | BUPA_TAX_UPDATE |
V_EXT_IMP | R 110 IF_EX_BUPA_TAX_UPDATE | BUPA_TAX_UPDATE |
V_EXT_ACT | R 20 FSBP_BPID_UPDATE | FSBP_BPID_UPDATE |
V_EXT_IMP | R 30 IF_EX_FSBP_BPID_UPDATE | FSBP_BPID_UPDATE |
V_EXT_IMP | R 30 IF_EX_BPTIME_BP001 | BPTIME_BP001 |
V_EXT_ACT | R 20 FSBP_BP001_UPDATE | FSBP_BP001_UPDATE |
V_EXT_IMP | R 30 IF_EX_FSBP_BP001_UPDATE | FSBP_BP001_UPDATE |
V_EXT_IMP | R 30 IF_EX_BPTIME_BUT021_FS | BPTIME_BUT021_FS |
V_EXT_ACT | R 20 FSBP_BUT021_UPDATE | FSBP_BUT021_UPDATE |
V_EXT_IMP | R 30 IF_EX_FSBP_BUT021_UPDATE | FSBP_BUT021_UPDATE |
V_EXT_ACT | R 20 ADDRESS_SEARCH | ADDRESS_SEARCH |
V_EXT_ACT | R 20 PARTNER_UPDATE | PARTNER_UPDATE |
V_EXT_IMP | R 30 IF_EX_PARTNER_UPDATE | PARTNER_UPDATE |
V_EXT_IMP | R 30 IF_EX_PARTNER_UPDATE | PARTNER_UPDATE |
V_EXT_IMP | R 30 IF_EX_BPTIME_BP001 | BPTIME_BP001 |
V_EXT_IMP | R 30 IF_EX_BPTIME_BUT021_FS | BPTIME_BUT021_FS |
V_EXT_ACT | R 20 GOS_SRV_SELECT | GOS_SRV_SELECT |
V_EXT_IMP | R 30 IF_EX_GOS_SRV_SELECT | GOS_SRV_SELECT |
V_EXT_ACT | R 20 ADDRESS_SEARCH | ADDRESS_SEARCH |