Вы находитесь на странице: 1из 5


1. WHAT IS A BADI (BUSINESS AD-INS)? The badi (business ad-ins) are the new sap Object Oriented Enhancement Technique which is used to add our own functionality to the existing standard Sap functionality. 2. WHY BADI (BUSINESS AD-INS)? In earlier enhancement technique, badi follows and Object Oriented Approach to make them reusable. These badis can use many number of times. Whereas Standard enhancement technique can be used only once. For example if we want to assign an enhancement to one custom project. Then that enhancement cannot be assigned to any other custom projects. To overcome this project we go with this new sap enhancement technique BADI. 3. PURPOSE OF BADI (BUSINESS AD-INS)? The main purpose of this technique is to guarantees the upward compatibility of all badis . Release upgrades do not effect enhancement calls from within the standard software nor they do not effect the validity of call interfaces. You do not have to register badis in SSCR (Sap Software Change Registration). 4. TRANSACTION CODE FOR BADI DEFINATION AND CODE TO IMPLEMENT BADI? Transaction code for definition: SE-18. Transaction code to implement badi: SE-19.

5. TYPES OF BADIS? When we creating a badi using the t-code SE-18, it provides the pop up screen to select the type of badi . There are two types of badis MULTI-USE BADI: we can assign active number of implementations to badi. By default this option will be checked. the disadvantage of this badi is, it is not possible to know that which badi is active especially in country specific version. FILTER DEPENDENT BADI: we can define the badi according to the filter values to control the add-in implementation on specific criteria. 6. HOW TO FIND BADI IN SAP SYSTEM?

There are three methods to find out a badi in a sap system. METHOD-1. 1. 2. 3. 4. 5. 6. 7. 8. Go to SE-24 transaction, type CL_EXITHANDLER and then click on display. Double click on GET_INSTANCE method. Put a break point on class method CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE. Run any transaction on which we want to find out to find the badi (EX: va01). Give the transaction va01 and then press enter. It will automatically take u to that breakpoint which we set in SE-24 transaction. Each time if u press F8 it will display list of badi names. U can find the badi name in field EXIT_NAME and if we double click on it we can get the corresponding badi name before hit the corresponding screen. 9. Based on the requirement find the badi name and accordingly implement your functionality in transaction SE-19. METHOD-2. 1. Go to transaction SE-84 and click on enhancements then double click on business add-ins. 2. Go to transaction ME22N select the system option from the menu and then click on STATUS. It displays the technical information of that particular transaction. 3. Double click on the package name it will directly take u to that program and then click on go to tab from the menu. 4. There we can find out the package name in the standard transaction ME22N and copy and paste it in the package field. 5. Press F8, it will displays a list of badi names. Select the appropriate badi name and implement it based on business requirements in the transaction SE-19. METHOD-3. 1. Find the badi name using transaction SE-18. 2. Go to transaction SE-18 select F4 help on the definition name and click the button Information system. 3. A pop up screen will be displayed and give the package name for any standard transaction. 4. A list of badi names for the transaction and click on appropriate badi name and implement the code in transaction SE-19. METHOD-4. 1. 2. 3. 4. 5. 6. 7. 8. Go to transaction ST05 (performance analysis). Set the flag field buffer trace Push the button activate trace. Start transaction VA02 in a new gui session. Go back to the performance trace session. Push the button deactivate trace. Push the button display trace. The pop-up screen set restrictions for displaying trace appears. Now filter the trace on objects. *V_EXT_IMP *V_EXT_ACT

9. Push button multiple selections behind field object. 10. Fill: V_EXT_IMP and V_EXT_ACT. 11. All the interface class names of view V_EXT_IMP start with IF_EX_ this is the standard sap prefix for badi class interface. The badi name is after the IF_EX_ 12. So the badi name is IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA.

METHOD-5. 1. 2. 3. 4. 5. 6. 7. Go to main transaction (t-code) SE93 Enter the transaction VD02 for which u want to bind badi. Click on the display push buttons. Get the package name . Go to SE84enhancementsbusiness add-innsdefination. Enter the package name and execute. We will get the list of all the enhancement badis for the given package.

METHOD-6. 1. 2. 3. 4. Go to transaction code SE93 and enter transaction code (say some XK01). Press display. Copy the program name that is tied to the transaction code. Go to transaction code SE-37, enter function module name as EXIT_<Program Name>_* Press F4 value help so that u can see all the available list of function modules.

METHOD-7. 1. Go to transaction SE-37 and enter the following function module name as SXV_GET_CLIF_BY_NAME. Press display. 2. Set a breakpoint by selecting the first line and clicking stop icon as highlighted. 3. Run the transaction code (say MIRO), program will stop at the breakpoint that is set in step2. 4. Double click on the name variable; it will display all the badis used in MIRO. 5. Press F8 to find all badis. 6. As our intension is to find badi, when the save button is clicked on MIRO. 7. Enter all the required information and presssave. 8. It will stop u in debugging mode; by pressing F8 it will show all the available badis that are tied to MIRO save option. 9. Make use of relevant badi that suits your requirement. Here is the scenario INVOICE_UPDATE badi will fulfil the requirement.

USER-EXITS 1. WHAT IS USER EXIT? A user exit is a three character code that instructs the system to access a program during system processing. SXX: S is for standard exits that are delivered by sap. XX represents the two digit exit number. UXX: U is for user exits that are defined by the user. XX represents the two digit exit number. These user exits are implemented in the form of subroutines and hence we call also call them as FORM EXITS. The user exits are generally collected in includes and attached to the standard program by sap. The R/3 enhancement concept allows you to add your own functionality to sap standard business applications without changing/modifying the original applications. Sap creates the user exits for specific programs screens and menus within standard R/3 applications. These exits do not contain any functionality but instead of that customer exits acts as hooks.so that u can add-on your own functionality to these hooks. 2. HOW TO FIND USER EXITS? Go to SE-38 display the program where you are searching for exit and search for CALL CUSTOMER-EXIT and if u knows the exit-name go to transaction cmod. Choose menu utilities sap enhancements and then enter the exit-name and then click enter. Now u will come to a screen that shows the function module exits for the exit. 3. WHY USER EXITS? User-exits allow u to add the additional functionality to the sap standard. Customers can modify anything they want that is found in the include (tables, structuresetc). User-exits are primarily used in the sales and distribution component (SD). 4. TYPES OF EXITS? There are mainly six types of exits in the sap which have been collected in the form of enhancement packages and attached to standard code by sap and these exits acts as hooks where u can attach or hang your own add-ons. Menu exits Function exits Table exits Screen exits Keyword exits Field exit

MENU EXIT: These menu exits add items to the pull down menus in standard sap applications. you can use these menu items to call up your own screen or trigger the entire add-on application.

Sap creates menu items by defining special menu items in the menu painter. These function codes begin with +. U can specify the menu item text when activating the item in an add-on project. FUNCTION EXIT: Function module exits add functions to R/3 applications. It plays a role in both screen and menu exits. When u add a new item menu to a standard pull down menu, we use a function module exit to define the action that should take place once your menu is activated. These function module exits also controls the data flow between standard programs and screen exit fields.

TABLE EXIT: SCREEN EXIT: Screen exits add fields to screens in r/3 application. It creates screen exits by placing special sub screen areas on a standard screen and calling a customer sub screen from the standard screen flow logic. KEYOWORD EXIT: FIELD EXIT: It allows u to create your own logic for any data element in the dictionary. We can use this logic to carry out checks, conversions or business related processing for any screen field. This field exit creates a special function module that contains this logic.