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 the function module?

Former Member
0 Likes
10,414

hi,

how to debug the function module? either sap std., or our own fm?

8 REPLIES 8
Read only

Former Member
0 Likes
3,242

Hi,

You can try the following:

(1) Put an endless loop into the coding of your function module where you want to start debugging, e.g.

DATA:

lx_exit_loop(1) TYPE c.

lx_exit_loop = ' '.

DO.

IF ( lx_exit_loop = 'X' ).

EXIT.

ENDIF.

ENDDO.

(2) Call your function module in background task

(3) Call transaction SM50 and search for the background process.

(3) Choose from menu Program/Mode -> Program -> Debugging

Now you the debugger should bring you right to your endless loop. Set lx_loop_exit = 'X' in the debugger and continue (F5 or F6).

Regards,

Padmam.

Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
3,242

Hi,

Go to se37,

Enter F.M name and execute it...then u will get the values screen where u have to provide the inputs.

And on the application toolbar u can see two buttons exceute and execute with debugging.

Select the second button and then proceed...

Cheers,

Simha

Reward all the helpful answers..

Read only

Former Member
0 Likes
3,242

go to SE37 and enter your function module. Press execute(test). You can find a push button "debugging". Fill in the data and press debugging.

reward if ithelps

Krisna

Read only

Former Member
0 Likes
3,242

Hi Murthy,

You can put break point in Source code.

Other wise Press F8 button twice.

Thanks,

reward If Helpful.

Message was edited by:

Viji

Read only

Former Member
0 Likes
3,242

open the FM and press F8 (execute)

there, u will see that debug button. u can press this and do the debug.

thanks,

max

Read only

Former Member
0 Likes
3,242

Hi,

From the Debugger, you can set the debugging mode and the system behavior in the event of a kernel warning by choosing Settings.

<b>System Debugging</b>

If you set this option, the Debugger is also activated for system programs (programs with status S in their program attributes). When you save breakpoints, the System Debugging setting is also saved.

<b>Update Debugging</b>

Update function modules do not run in the same user session as the program that is currently running in the ABAP Debugger. These function modules are therefore not included in debugging. Only if you select the Update Debugging option can you display and debug them after the COMMIT WORK.

<b>In Background Task: Do not Process</b>

When you debug a program that calls function modules using the IN BACKGROUND TASK addition, they are processed in a background work process (additional internal session). If you set the In background task: Do not process option, the system collects the function calls, but does not start the background work process. The Debugger assigns a transaction ID, which identifies the background work process uniquely. You can now start the Debugger for the background work process using transaction SM58. You can select the function module concerned here, and then execute it via the Edit menu.

Regards

Sudheer

Read only

Former Member
0 Likes
3,242

hi there,

just go to se37 put your fuction module name goto change or display mode

set a breake point in the source code(pressing stop red color buttom)

then exicute and you are into debug mode

choose field or table as per your requirement.

hope this might hellp you

anuj

Read only

Former Member
0 Likes
3,242

HI.

1.run Functional module.

2.give input

3. /H in transaction code input.

5.excute it.

reward all helpfull answers.

regards.

Jay