How to search for BADI's

Method 1: The BADI's can selected from the database view V_EXT_ACT and V_EXT_IMP.

Goto ST05 --> Select SQL trace and buffer trace --> Activate trace --> Now run your transaction --> Deactivate trace --> Display trace.

A pop will come as shown below:


Select following objects (Views)



Now display the trace results.
It will return all the BADI's and enhancement triggered in order of their execution.




Method 2: Using CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE.

* Goto SE24, open CL_EXITHANDLER (Class).
* Goto Method, GET_INSTANCE.
* Set a BREAK-POINT.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
CALL METHOD CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE
EXPORTING
INSTANCE = INSTANCE
IMPORTING
CLASS_NAME = CLASS_NAME
CHANGING
EXIT_NAME = EXIT_NAME
EXCEPTIONS
NO_REFERENCE = 1
NO_INTERFACE_REFERENCE = 2
NO_EXIT_INTERFACE = 3
DATA_INCONS_IN_EXIT_MANAGEM = 4
CLASS_NOT_IMPLEMENT_INTERFACE = 5
OTHERS = 6.

CASE SY-SUBRC.

WHEN 1.
RAISE NO_REFERENCE.
WHEN 2.
RAISE NO_INTERFACE_REFERENCE.
WHEN 3.
RAISE NO_EXIT_INTERFACE.
WHEN 4.
RAISE DATA_INCONS_IN_EXIT_MANAGEM.
WHEN 5.
RAISE CLASS_NOT_IMPLEMENT_INTERFACE.
ENDCASE.


It will return the names of all Enhancements and BADI


Method 3: Using FM SXV_GET_CLIF_BY_NAME.

These steps should enable you to find any BADI related to any transaction in a matter of minutes.

1) Go to the transaction SE37 to find your function module.

2) Locate the function SXV_GET_CLIF_BY_NAME.

3) Put a BREAK-POINT there.

4) Now open a new session.

5) Go to your transaction.

6) At that time, it will stop this function.

7) Double click on the function field NAME.

8) That will give you name of the BADI that is provided in your transaction.

2 comments:

Isaac E Wright Wright said...

Thank You For Sharing Your Knowledge .good information keep it up.
SAP ABAP


Pavel Astashonok said...

And what is the difference between these ways of searching?
They all work similarly or there is the most universal?

Post a Comment