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: 

How to debug a program running in background ?

Former Member
0 Kudos

How do we debug a prorgram running in the background ?

Is BREAK-POINT statement is used for this or ne other method exists

I have gone thr the standard documentation help for BREAK-POINT Statement, but not getting it.

Regards,

Nitin

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I don't think you can debug backgroung program with break-point statement.

try tcode SM51 then look for the process that running your program. Then goto Program/Mode=>Program=>Debugging.

hope it's usefull for you

joseph

5 REPLIES 5

Former Member
0 Kudos

I don't think you can debug backgroung program with break-point statement.

try tcode SM51 then look for the process that running your program. Then goto Program/Mode=>Program=>Debugging.

hope it's usefull for you

joseph

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Go to SM37.Choose the job once it is completed.Then just type JDBG [ no /].Then you can debug the job.

Hope this helps.

manuel_bassani
Contributor
0 Kudos

Hi Nitin, try to do this:

1. use the following code instead of break-point:

data a type c.

do.

if a = 'X'.

exit.

endif.

enddo.

2. while the program is running in background, launch transaction SM50.

3. select the program in the list and choose Program/Mode -> Program -> Debugging

4. at this point the program should stop in the infinite loop. to exit from the loop, set the variable a to 'X'

Best regards, Manuel

Former Member
0 Kudos

Nitin,

Joseph is correct.

Goto SM51-> keep a cursor on user running program in background.

Then program/mode ->program ->debugging.

Alternatively what you can do it.. add few WRITE statements in your program where you want to check your values. Once program is finished.

Goto SM37 and check spool for the user. You will see value populated in your program.

Hope it will help. Do award few points if this resolves your issue.

Warm Regards.

Pras Durafe

Former Member
0 Kudos

Hi,

1. Go to SE38

2. Type this pgm name "LFKKAKTIV2F01"

3. Go to line number "1983" containing the statement

"IF g_debug IS INITIAL"...

4. Keep the break point at this statement "IF g_debug IS INITIAL" and also in your code.

5. While running your pgm the control will come here.

6. Change the value of this g_debug = 'X' and press "Copy" button at run time.

7. Now slowly debug ( It may take time ).

8. Atlast it will come to your piece of code where u marked to debug.

Cheers,

Venkat