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: 

DEBUGGING of Backgroung jobs

former_member1061582
Active Participant
0 Kudos
6,077

Hi ABAP gurus,

I wud like to know..

How to debug a background jobwith status 'Finished'?

Kindly send in u r inputs.

THNX,

HKR

1 ACCEPTED SOLUTION

Former Member
0 Kudos
4,922

Hi Hemanth,

Follow the below steps to debug a background job.

1. Go to Transaction SM37.

2. Select the job which you want to debug. One at a time.

3. You can only debug the jobs whose status is in

Scheduled

Released

Ready

Finished

Canceled

4. Type u201CJDBGu201D (without u201C/nu201D) in the command prompt.

5. Hit enter key.

6. The SAP debugger will start. Press F7 twice or thrice to get the cursor to your program.

Regards,

SB.

11 REPLIES 11

Former Member
0 Kudos
4,922

hi....

goto SM37 and give the name of the job and in command window give 'JDBG' and execute the job

it will be in debug mode

regards

Former Member
0 Kudos
4,922

>

> How to debug a background jobwith status 'Finished'?

> HKR

Not possible ! The job has already run and the result has been output to a spool if there is one = 'Finished'. So there is no chance you can debug the job.

regards,

Advait

0 Kudos
4,922

Oh well, that was a new learning for me. Indeed you can debug the job ( in Finished status ) using the option JDBG in the command line.

However I'm not sure of the risk involved in doing so in the Production system. Any inputs on this are most welcome.

regards,

Advait

Edited by: Advait Gode on Feb 18, 2009 12:28 PM

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
4,922

>

> However I'm not sure of the risk involved in doing so in the Production system.

Hello Advait,

Just to let you know debugging in Production is definitely not risky ) given :

1. Your client's data is NOT CONFIDENTIAL.

2. User does not have "change value" authority in debug mode.

BR,

Suhas

0 Kudos
4,922

Of course I understand that Suhas ) . I've been debugging in Production too. However, I was referring to the risk of debugging a finished Job -:)) using the technique everyone is talking above (JDBG).

Question that arise in my mind are :

- Does the code run again ?

- What if there are database updates programmed in the job, will they execute again ?

regards,

Advait

Former Member
0 Kudos
4,923

Hi Hemanth,

Follow the below steps to debug a background job.

1. Go to Transaction SM37.

2. Select the job which you want to debug. One at a time.

3. You can only debug the jobs whose status is in

Scheduled

Released

Ready

Finished

Canceled

4. Type u201CJDBGu201D (without u201C/nu201D) in the command prompt.

5. Hit enter key.

6. The SAP debugger will start. Press F7 twice or thrice to get the cursor to your program.

Regards,

SB.

Former Member
0 Kudos
4,922

Hi,

Goto SM37 select the job which you want to debug and type JDBG in the OK-code, press Enter. Remember the key word JDBG.

Regards

Kiran

Former Member
0 Kudos
4,922

Hi Hemanth,

There is a small limitation with this.

It would only allow to debug who has scheduled this job.

If you are not in production system, you could debug this in the

foregroung with breakpoint where applicable., and in production landscape

you could use the trnsaction sa38., use /h to enter in debugging mode..

Hope this helps.

Sumit.

former_member404244
Active Contributor
0 Kudos
4,922

Hi,

yes u can debug the finished jobs...Put a breakpoint in ur program and then

Goto SM37 and give the name of the job and in command window give 'JDBG' (NO /)and execute the job

it will be in debug mode.

Regards,

Nagaraj

Former Member
0 Kudos
4,922

Hi,

Go to Transaction SM37. Select jobs type Scheduled, Released, Ready, Finished, Canceled

It displays list of all jobs Select the job which you want to debug.

Type JDBGin the command prompt enter

Or

Select the job which you want to debug. click on Joblog there job related data based on that take the program you can debug in narmal.

Regards

Md.MahaboobKhan

former_member1061582
Active Participant
0 Kudos
4,922

HI GURUS,

Sorry for the delay in responding!

THNX FOR U R VALUABLE INPUTS

THNX

HKR