Business Add-Ins (BAdIs) have been around since BW 2.x, but are little understood. They offer significant advantages over user exits in most cases, however. The author describes those advantages and gives a quick step-by-step overview of how you create a BAdI.
A Business Add-In (BAdI) is an enhancement of the well-known user exit that you can use in BW 2.x and higher, as well as in SAP R/3 4.6. Despite having been available for a few years, BAdIs are not well known or used a lot. This is likely to change, given SAP's approach toward using BAdIs from SAP BW 3.0 on. For example, SAP recommends the use of BAdIs with the transformation library in BW 3.x.
If you are part of a functional team, you might never work directly with a BAdI. Nonetheless, it is important to know about this system feature so you understand how it might be used in the appropriate situation. BAdIs give technical teams more flexibility in using the same ABAP code (BAdI) for different levels of the company. For example, you could use the same code for each country during a global rollout. With a user exit, new code would be required for each country.
To review, user exits are points in the SAP program code where you can add a custom program to derive and exchange (upload, download, change, and so on) data with the standard SAP program, thus extending the functionality of standard SAP. In BW, user exits are used mainly in routines that are part of transfer and update rules.
BAdIs do not make user exits obsolete. Your existing user exits will still work after an upgrade as long as none of the objects (e.g., fields and tables) the program uses have changed. You also do not have to open an SAP Software Change Registration (SSCR). The same holds true of BAdIs after an upgrade.
Below are common questions regarding BAdIs and the answers to those questions. Figures 1 through 6 walk you through the basic steps required to create a BAdI.

Figure 1
Execute transaction code SE18 and enter the Definition name of your BAdI

Figure 2
Enter a short definition and flag the appropriate type

Figure 3
If you are creating your own BAdI, BW proposes an interface name. This name always consists of the components ZIF_EX_[definition name without the first letter]. If you double-click on the interface name or method, you get to the interface definition.

Figure 4
Click on the Parameters tab and enter the parameters

Figure 5
Specify the types of parameters that you use for the chosen method

Figure 6
You can also create sample or default code to be used in BAdIs. This code is specific for this BAdI and can be used by a programmer as a template.
What is the difference between user exits and BAdIs?SE18CMODSMODWhat do I use BAdIs for? BAdIs are generally used for the same purposes as user exits, but the additional flexibility allows them to perform more sophisticated tasks, such as working with the transformation library or the report/report interface in BW. You might also use a BAdI for an address search in R/3. My recommendation is to use a BAdI unless you need to implement quickly and the code is used for just one specific application.
Does SAP provide BAdIs as standard Business Content? Predefined BAdIs come with BW. Table 1 lists the BAdIs available for BW 3.1C.
BAdI Name |
BAdI Description |
Available in BW 3.1C |
Available in BW 2.0B |
BW_BCT_CO_CCTR_PERS |
Cost center personalization |
X
|
|
BW_SCHEDULER |
Warehouse scheduler |
X
|
X
|
BW_SERVICE_API |
BW service APIs |
X
|
X
|
RSDBEXPORT_BADI01 |
Change the BW export file for Dunn & Bradstreet data |
X
|
|
RSD_CUBE_BADI |
Enhance InfoCubes |
X
|
X
|
RSD_IOBJ_BADI |
Enhance InfoObjects |
X
|
X
|
RSRA_ALERT |
BW alert export |
X
|
|
RSU5_SAPI_BADI |
BW service APIs with Business Add-Ins |
X
|
|
RS_BADI_SAPI |
Business Add-Ins for BW service APIs |
X
|
X
|
RS_BBS_BADI |
Enhancement of BW jump target types |
X
|
|
SMOD_RSR00004 |
BW report/report interface field mapping |
X
|
|
Table 1 |
Predefined BAdIs available for BW 3.1C |
Frank Bulacher
Frank Bulacher is manager of SAP CH at Alstom Switzerland. He has worked in BI for more than 14 years in the United States and Europe. Prior to that, he was a consultant in data warehousing and SAP FI/CO. His career has taken him to top-tier and boutique companies. Frank is a graduate of the University of Augsburg in Germany and the University of Wales in Swansea, UK, with majors in banking and computer science.
You may contact the author at f.bulacher@gmail.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.