‎2007 Jan 28 1:44 PM
I am calling a Custom Functional module in Background mode using the syntax CALL FUNCTION ZFM in background task.
Can anyone tell how to debug the code using this..
Thanks ,
Yatish
‎2007 Jan 28 2:28 PM
Hello Yatish
You could try to use the following trick:
(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 <b>SM50</b> and search for the background process.
(3) Choose from menu <i>Program/Mode -> Program -> Debugging</i>
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
Uwe
‎2007 Jan 29 7:00 AM
hi yathish.
try this... it works...
1. put the break point in the Function Module Where u want to debug.
2. run u r program. at initial stage.. press /H in then run in the debugging screen will be opened.... then in the menu bar->GOTO>CONTROL DEBUGGING-->SETTING... HERE if u click on this one nwe screen will be displayed..ther u will fing a check box called UPDATE DEBUGGING. TICK ON THIS THEN press SAVE.
2. then press F8.... when the controle reaches the breakpoin in the FM... it opens another session... where u can debugg.
<b>at last wht i mean to say is... Swith on the UPDATE DEBUGGING. put the breakpoint... then run u r code...</b>
Please Close this thread.. when u r problem is solved
Reward if Helpful
Regards
Naresh Reddy K
‎2008 Jun 15 7:32 AM
Hi,
Place a breakpoint at the call of the function module. In the debugger under Settings Check the option Background Task Do not process. Now press F8 to continue the debugging. The option 'Background Task Do not process' instructs the system to collect the calls to function modules in background task but not to execute them.
In a new session, execute transaction SM58 and start debugging by selecting Edit->Debug LUW.
I hope that the above description helps you.
Regards,
Mudit