Skip to Content

Debugging background jobs.

Hi

Consider this piece of code.

SUBMIT zcall_function

USER sy-uname VIA JOB jobname NUMBER jobcount

WITH fun_name = 'ZMYFUNC'

AND RETURN.

The submitted job then further calls function ZMFYFUNC in background.

However, I need to debug this function module ZMYFUNC.

Can anyone help me in this situation.

It is also not possible to replace the above code by a simple call to function module ZMYFUNC due to certain requirements.

If I have to debug from the work-process level, how would I know, which app server this work-process has been sent to ?

Any other tips would be appreciated.

I would be glad, if someone can help me at the earliest.

Thanks

Prasad

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    author's profile photo
    Former Member
    Aug 09, 2004 at 03:57 PM

    As already mentioned, you can debug the program from SM37. Another way to debug is via SM50. Select the process executing your program and go to menu Program/Session -> Program -> Debugging.

    It is helpful to put a loop based on a variable which will keep executing untill you go into debug mode and change the value of the variable. This way you can ensure that you are able to debug the job exactly where you want to debug.

    Hope this helps.

    Raj

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Aug 12, 2004 at 09:02 AM

    Hi Prasad,

    use SM51 instead of SM50!

    Viktor

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 09, 2004 at 03:20 PM

    You can debug batch jobs by going to 'SM37', select the active job and type in 'JDBG' in the command line ( no '/' )

    Peter

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 11, 2004 at 08:49 AM

    Hi Peter

    Thanks for your help. Your approach worked.

    Rajendra, tks to you too. However, i was not able to track the bkgnd work process from sm50 as I do not know to which app server it was sent to.

    Thanks again. My problem is solved.

    Prasad

    Add comment
    10|10000 characters needed characters exceeded