sapexperts _ 3 easy methods for finding enhancements

10
3 Easy Methods for Finding Enhancements by Muhammad Usman Malik, Senior SAP Consultant, Saudi Business Machines (SBM) April 9, 2009 SAPexperts/IT - You use enhancements to improve and mold business processes according to company standards. Learn how to find enhancements quickly to increase efficiency and minimize effort when seeking to locate a particular enhancement. Although SAP provides a variety of industry solutions, SAP cannot anticipate company-specific requirements. For example, you might need to modify the business process for your business, enhance screens to address your end users’ needs, or manipulate data in a specific way at runtime to generate the data needed to analyze business futures. To help you meet these challenges, SAP provides a variety of access points, known as enhancements, which you can use to manipulate the system. Enhancements include function exits, screen exits, and Business Add-ins (BAdIs). Before enhancing an application, first you need to locate these enhancements in your SAP system. Here are three different ways to do this: Search an SAP program Search the BOR Find a BAdI using SQL Trace Note This article is intended for ABAP developers and functional consultants and assumes that the reader is familiar with the tools and execution of programs in an SAP environment. All examples are taken from SAP ERP Central Component (SAP ECC) 6.0 and are applicable to higher versions. Search an SAP Program You can find an enhancement by searching for it in the program itself. I use the example of finding an enhancement for goods movement. 1. Execute transaction MIGO (goods movement). Click System and then select Status from the context menu. 2. Double-click SAPLMIGO in the System: Status window, as shown in Figure 1 .

Upload: bhupendrasingh1975

Post on 06-Dec-2015

14 views

Category:

Documents


5 download

DESCRIPTION

SAPexperts _ 3 Easy Methods for Finding Enhancements

TRANSCRIPT

Page 1: SAPexperts _ 3 Easy Methods for Finding Enhancements

3 Easy Methods for FindingEnhancementsby Muhammad Usman Malik, Senior SAP Consultant, SaudiBusiness Machines (SBM)April 9, 2009

SAPexperts/IT - You use enhancements to improve andmold business processes according to companystandards. Learn how to find enhancements quickly toincrease efficiency and minimize effort when seeking tolocate a particular enhancement.

Although SAP provides a variety of industry solutions, SAPcannot anticipate company-specific requirements. Forexample, you might need to modify the business process foryour business, enhance screens to address your end users’needs, or manipulate data in a specific way at runtime togenerate the data needed to analyze business futures. Tohelp you meet these challenges, SAP provides a variety ofaccess points, known as enhancements, which you can useto manipulate the system. Enhancements include functionexits, screen exits, and Business Add-ins (BAdIs).

Before enhancing an application, first you need to locatethese enhancements in your SAP system. Here are threedifferent ways to do this:

Search an SAP programSearch the BORFind a BAdI using SQL Trace

NoteThis article is intended for ABAP developers andfunctional consultants and assumes that the reader isfamiliar with the tools and execution of programs in anSAP environment. All examples are taken from SAP ERPCentral Component (SAP ECC) 6.0 and are applicable tohigher versions.

Search an SAP ProgramYou can find an enhancement by searching for it in theprogram itself. I use the example of finding an enhancementfor goods movement.

1. Execute transaction MIGO (goods movement). ClickSystem and then select Status from the contextmenu.

2. Double-click SAPLMIGO in the System: Statuswindow, as shown in Figure 1.

Page 2: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 1

Display the status of the enhancedprogram

3. Click the search icon in the SAP System datasection. Enter CL_EXITHANDLER to search for theBAdI you want to locate (Figure 2), and click theexecute icon. Then repeat this step to find thefunction exit by entering CALL CUSTOMER-FUNCTION in the Find field.

Page 3: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 2

Search for a BAdI in the SAPLMIGOprogram

Search the BORThe most common way to find an enhancement is to searchfor it through its package, which is stored in the BOR. Hereis another example using the goods movement program.

1. Display the System: Status window for the MIGOprogram as you did in the previous section.

2. Click Goto on the menu bar, and then selectAttributes. The Display Function Group dialogappears (Figure 3). You need to write down thepackage name, which is MB in this example,because you need the name for the next step.

Page 4: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 3

Write down the name of the packageMB

3. Execute transaction SE84 (Repository InformationSystem). Follow menu path Repository InformationSystem > Enhancements > Business Add-ins >Definitions. Enter MB in the Package field, as shownin Figure 4. Click the execute icon.

Page 5: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 4

Search for an enhancement bypackage name

4. From the list of available BAdIs that appears, selectthe one you want. If you are not sure which BAdI youneed, check the information provided in theDescription column.

5. Repeat step 3, but follow menu path RepositoryInformation System > Enhancements > CustomerExits > Enhancement Implementations to display thelist of available enhancements.

Find a BAdI Using SQL TraceTo use this method, you must have authorization to usetransaction ST05 (performance trace). This method is usefulif you want to see only the BAdIs that have been triggeredfor a particular save event, such as when you click a saveor execute icon, press the Enter key, or delete a document.

To illustrate this method, I use a different example. This timeyou are working in the Budgeting Workbench and want toknow that which BAdIs are triggered in your SAP systemwhen you enter and save data.

1. Execute transaction FMBBC (Budgeting Workbench),shown in Figure 5.

Page 6: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 5

Use the Budgeting Workbench totrace BAdIs that have been triggeredon an SAP screen event

2. Enter the data that you want to save (e.g., B1 Budget, ENTR Enter). Do not close this window.

3. Execute transaction ST05 in a new session. ThePerformance Analysis window opens, as shown inFigure 6.

Page 7: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 6

Use the Performance Analysis windowto find a BAdI

4. Select the Table Buffer Trace check box and click theActivate Trace button. Do not close this session.

5. Switch to the Budgeting Workbench, and then clickthe save icon to save this budget document (Figure7).

Page 8: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 7

Budget document saved in the system

6. Return to the Performance Analysis window (Figure6), and click the Deactivate Trace button, which haltsthe tracing operation because the system hasalready traced BAdIs related to the save event.

7. Click the Display Trace button. The Trace Listwindow displays all the trace activities (Figure 8). Ifyou receive an error, you cannot see the complete listof BAdIs because only BAdIs triggered before theerror were found.

Page 9: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 8

Display the trace data

Figure 9

Search for V_EXT

8. Next, you need to search for V_EXT. This viewcontains all the BAdIs triggered during the saveevent. Enter V_EXT in the Find field (Figure9) andthen click the search icon.

9. The BAdIs that were triggered during the same timeas the save event in transaction FMBBC aredisplayed (Figure 10).

Page 10: SAPexperts _ 3 Easy Methods for Finding Enhancements

Figure 10

List of BAdIs found after the saveevent

NoteSystem BAdIs, which cannot be implemented, also appear