Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Finding BADI and User exits/Customer exits in a SAP Program

$
0
0

'Finding BADI and User exits/Customer exits in a SAP Program', is a commonplace topic ,but this document is targeted towards the beginners, who find this concept little bit difficult and confusing.

 

It is always tricky to find BADI,user exits etc in a T-code.So here is a simplified generic method to search for it:

 

Finding User exits:

 

The simplest way to find user exits is to search for the string 'User exit' in the main program of the T-code.

For e.g. in the T-code VA01, the user exits can be searched, like:

 

image1.png

image1.png

image1.png

image1.png

  • Usually the User exits are available as FORM-ENDFORM statements, which could be easily implemented by either object key (Source code Modifications) or using the ABAP Implicit Enhancements techniques.

 

Finding Customer Exits

 

There are numerous ways to find the Customer exits.Few good ones are enumerated below:

 

Searching the string ' call*Customer-function* '

 

Search the string *Customer*Exit*  in the main program of the T-code.

 

For e.g. In the T-code VA01/VA03, we can find the following user exits:-

 

 

image1.png

 

 

image1.png

 

 

Now,click on the CALL CUSTOMER-FUNCTION '002',in the code.

 

This wll take you directly to the Function Module of the exit,where the include ZXVVAO04 is available.

Click on this include and the system will prompt you to create the include.Select 'Yes' and the include

is created.Here you can write the logic for the exit.

 

image1.png

image1.png

Using the T-code SMOD/CMOD

 

Another way to search for exits is via the T-code SMOD/CMOD.Here you can search the exits via the Find option.

Path:  SMOD->Utilities->Find

 

image1.png

 

image1.png

Press the execute button and all the exits available in the package are displayed.For advance search, some more parameters like Component Name,Exit name and Application component can also be used.

 

 

image1.png

Via IMG

 

Some exits are also documented in the SAP IMG( Implementation Guide )Tcode -SPRO,which can be implented directly through navigation

 

image1.png

Finding BADI( Business Add-ins)

 

The simplest way to search for BADI is to open the class cl_exithandler in T-code SE24 and put the breakpoint in the static method get_instance;as,

 

image1.png

image1.png

image1.png

Now,Lauch the Transaction VA03

 

image1.png

 

It will launch the debugger automatically,whenever any BADI is encountered.Here the BADI BADI_SD_SALES is triggered.

 

image1.png

Via IMG

 

Some BADI are also documented in the IMG,which can be implemented directly via navigation.

 

image1.png

 

Difference between BADI and User-exit

 

  • An exit can be active in only one project - only one implementation is possible - whereas,A BADI can be implemented multiple times.
  • There are filter dependent BADI's available but no such facilities are available in Exits.
  • There is fixed naming convention in exits , while that is not the case with BADI.

Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>