You are on page 1of 4

How to Implement a BADI in SAP ABAP with Tutorial

REQUIREMENT: To change the Text of the Alert in runtime.

How to find appropriate BADI for this requirement??

Go to the TCode SE24 and put the break- point into Class CL_EXITHANDLER  GET_INSTANCE method.

Then go to the program where you want to find the BADI. We would use the RSALERTTEST. Go to SE38
and execute the program with the necessary variant or parameters. This will take you to the debugger and will hit
the debugger in the CL_EXITHANDLER class. Check the EXIT_NAME variable to find your BADI
After some investigation we found that the BADI I would need to implement is ALERT_MODIFY_TEXT.

Implement into the BADI


Now go to transaction SE18 and Click BADI Name. Then fill this BADI. And click Display.

Navigate on the top menu to Implementation > Create

Now Fill in your Implementation Name and click on create. Use Z* for the Implementation Name since you are
doing a custom Implementation.
This will bring you to the Implementation Page. Fill up the Implementation Short Text.

Now click on the Interface Tab, and you will be able to find the Interface that you would have to write the code
into. That is, you would have to implement. Click the Method that you want to implement. In this case we would
implement the MODIFY_LONG_TEXT
Double click on the Method Name (MODIFY_LONG_TEXT) and you would be able to see the ABAP Editor with the
various parameters (Click on the Signature button for Parameter). However this might stop you and ask you for a
filter value. Go back to the Attribute Tab and Fill the Alert Category where you want this BADI to be triggered.

You might also like