Application Development 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: 

Need to check the Debugging is on or not

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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.

0 Kudos

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

MarcinPciak
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Sorry.. in first thread a mistake happend.

SY-DEBUG is Not working...