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

How to debug a function module

Former Member
0 Likes
3,482

hi,

Please Tell me how to debug an Function module

Thanks in advance

ajay

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,076

Hi,

In SE37 while executing the FM there is an option to execute the same in Debugging mode. If you want to debug the FM as a stand alone code you can make use of this functionality. Provide the necessary input values and run the FM in debugging mode.

If you intend to debug the FM from another program wherein it is called you can always set a breakpoint inside the FM and execute the code in the calling program. The control will stop for you at the point where you have set the break point inside the FM automatically.

Hope you have a clear picture now.

Reward if helpful.

4 REPLIES 4
Read only

Former Member
0 Likes
2,076

Hi,

You can put a break point in the FM (BREAK USERNAME, don't use the BREAK-POINT instruction) or use the SE37 (enter the name of the FM and press F8 then fill the parameters and choose the debugging button).

You can also use the SE37 to put a break point in a standard FM. Press the display button after entering the name of the FM. In the code put the break point where you want (stop icon button).

Read only

Former Member
0 Likes
2,076

Hi Ajay,

Type in /h in the Command Field and execute the FM.

Regards,

Sai

Read only

Former Member
0 Likes
2,077

Hi,

In SE37 while executing the FM there is an option to execute the same in Debugging mode. If you want to debug the FM as a stand alone code you can make use of this functionality. Provide the necessary input values and run the FM in debugging mode.

If you intend to debug the FM from another program wherein it is called you can always set a breakpoint inside the FM and execute the code in the calling program. The control will stop for you at the point where you have set the break point inside the FM automatically.

Hope you have a clear picture now.

Reward if helpful.

Read only

Former Member
0 Likes
2,076

hi

good

go through this link, this will give you clear idea about the testing of a function module,.

http://help.sap.com/saphelp_nw04s/helpdata/en/d1/801f36454211d189710000e8322d00/content.htm

thanks

mrutyun^