04-09-2010 7:57 AM
Hi Experts,
I have one Z function module , in this there is an another function module which is running in Background task.
eg :
CALL FUNCTION 'ZTEST_RAISE_EXCEPTION'
in BACKGROUND TASK
if the fucntion module is running in background task then we are not able to debug the Function module.
for this i need to do check here...
if debugging is ON
Run the same function module in foreground
eg : CALL FUNCTION 'ZTEST_RAISE_EXCEPTION'
else.
Run in Background.
eg :
CALL FUNCTION 'ZTEST_RAISE_EXCEPTION'
in BACKGROUND TASK
endif.
i have tried with the system field SY-DEBUG, but it is working. please help me. is there any other way to do this.
Thanks
SAP main
04-09-2010 8:04 AM
Hi
I have a better solution for you Pls try this.
Please follow the below processu2026.to debug the back ground job.
1. Use SM37 to get list of jobs , type 'JDBG' in the command line ( no '/' ), put the cursor on the job and press ENTER
2. You are in debug mode now. Step through SAP program (press F7 couple of times) until you get to code you need.
Regrads,
Lokesh.
04-09-2010 8:14 AM
Thanks lokesh for quick responce,
But i need to check by coding it in my program , because the Z function modules are RFC's. so i need to know how the function module is working.
for checking the RFC function module i need to debug the code.
so even in the debug mode i can't check as this function module is running in background task. For that i am trying to code the lines in my program to check the fucntion module.
Hope you understand my problem.
Thanks
SAP main
04-09-2010 8:11 AM
There is nothing like "Debugging on or off" . It is decided at runtime. If you say explicitly the system to run your FM in background mode this simply means "turn off the debugging" else you run it in foreground which means "turn it on".
So it is you who decides whether to run FM with debugging on or off .
Regards
Marcin
04-09-2010 8:20 AM
Sorry.. in first thread a mistake happend.
SY-DEBUG is Not working...