Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

debugging user exit

Former Member
0 Likes
649

Hi all,

could anybody of you tell me how can I debug a user exit?

Thanks much,

4 REPLIES 4
Read only

Former Member
0 Likes
599

Make sure that you have activated your project in cmod for the user exit.

then you can place a break point in the user exit.(You can see a red button on the application toolbar )in the user exit include.

Run the transaction in which the user exit is triggered from.

It will stop at the braek point.

Regards,

ravi

Read only

0 Likes
599

Hi Ravi,

I'm doing the same process, but it's not getting triggered. i'm writing the exit on transaction MSC2N. The exit is 'EXIT_SAPLVBMD_001' and the Include is 'ZXMHDU01'.

Could you tell me will this exit gets triggered when I change a batch and 'SAVE' it?

Message was edited by: sam jose

Message was edited by: sam jose

Read only

0 Likes
599

May be run in update task, in that case a single break poin isn´t useful. Put a call to FM TH_POPUP inside userexit and send any message to your own user, by this way you can check if exit is running.

Regards.

Read only

Former Member
0 Likes
599

Hi !

It depends if it is a "Dialog" Userexit or a "Updatetask" Userexit.

If it is "dialog" you could set an break-point or put a break-point in your code. It will stop then !

If it is "updatetask" you could check out this:

put this into your code:

BREAK-POINT log_text.

where log_text has to be defined as log_text(40) type c.

put anything you want to see into log_text.

Then execute your program.

After that - go to the SM21. There should now be an entry like "BREAK-POINT"....reached...

That indicates that it is a updatetask-userexit.

You may debug it as any other updatetask-module (see online-help for that.

If there is no entry in your SM21 it is an indication that your userexit was not called.

Regards

Rainer

Some points would be fine if that helped a bit.