How to find badi in sap abap ?

How to find badi in sap abap

How to find badi in sap abap? To find BADI, the initial step is to go to the SE24 exchange and show CL_EXITHANDLER class. Then double tap on the GEL_INSTANCE technique and put a breakpoint on the class strategy CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE.

Run the exchange you want to find BADI in another screen and it will naturally stop at the breakpoint you put in SE24. Each time you execute in debugger it will show the BADI names.

Want to see how to find badi in sap abap with practical?

To find whether BADI exist or not for any transaction, first go to class developer i.e tcode SE24.

How to find badi in sap abap - 1

Enter “CL_EXITHANDLER” for the article type and press display.

How to find badi in sap abap - 2

Double tap on “GET_INSTANCE” technique to show it.

How to find badi in sap abap - 3

Set a break-point in GET_INSTANCE strategy for CL_EXITHANDLER. Presently run the exchange for which we need to find regardless of whether BADI exist. Assuming any BADI exist the control stops at the break-point set in GET_INSTANCE strategy.

Allow us to run the transaction MM02.

How to find badi in sap abap - 4

The control stops at the break-point.

How to find badi in sap abap - 5

The BADI name can be determined from the variable “EXIT_NAME” in GET_INSTANCE technique.

The control stops at the break-point set in GET_INSTANCE technique for each BADI that exists in the exchange.

Perfect Answer given by SAP Community

Answer 1:
You can find all the Badi’s and User Exits by following this steps also…

suppose for Transaction VA01.

go to se93 provide VA01 and click display,there you will get the package VA.

Now go to SE84 > ENhancements >Bisuness Add-ins >Definitons >Package as VA >F8

then you will get set of BADI’s related to that Transaction

Answer 2:

Go to transaction SE24

Provide the class name CL_EXITHANDLER

Place a break point at sy-subrc

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.

The exit name will give you all the BAdis. Check which suits your requirement and also for which implementation can be done since it shows all SAP internal BAdi’s as well.

Answer 3:

These steps should enable you to find any BADI related to any transaction.

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

2) Locate the function SXV_GET_CLIF_BY_NAME.

3) Put a breakpoint before call function ‘SXV_ADD_PREFIX’.

Break-point.

call function ‘SXV_ADD_PREFIX’

exporting

name = name

prefix = prefix

importing

new_name = clif.

endfunction.

When you execute the screen, the break-point will trigger and you will be able to find the BADI name.

Hope this is helpful.

You may be interested in:

How Many Total T-Codes?

Using “Check Function Module” in Workflow

Using Function Module Enhancement: Triggering of an event

SAP HANA Training and Placement: A Complete Guide

Apex University: Crafting Dynamic Write Business Logic in Salesforce

Innovative TLM For Pre Primary Classes



Leave a Reply

X
WhatsApp WhatsApp us