Application Development and Automation 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: 
Read only

batch job scheduling problem..

Former Member
0 Likes
1,756

HI All,

I'm encoutering 2 issues in production while scheduling batch job ,,

1. the batch job is scheduled to run daily in production, but once i check it in sm37 its schedule only for 0 secs,which is not true

2. if I manually schedule the batch job thru program for the first time , the first batch job will run for 0 sec which is not true,, but if i again schedule the batch job for 2nd time,.then its working fine..

I dont face this issue in development system..

Pls. suggest the possible soln.

thanks

suresh

7 REPLIES 7
Read only

former_member226519
Active Contributor
0 Likes
1,204

If it works in dev. system and not in prod. there are usually 2 reasons:

1. report variant does not match the data

2. authorisation issue

Read only

0 Likes
1,204

hi volker,

thanka for the reply.

if it is a variant problem..,then it should not be working while scheduling the background job manually also..

but it is working for 2nd time if I schedule the background job manually .. and strange thing is its not working for the firs time..

is there any way to debug the background job??

thnks

suresh

Read only

0 Likes
1,204

Suresh,

Batch job debugging very much possible, if you have that access.

Select it in Scheduled status, type 'JDBG' in the command field and debugging gets started, just press F8 to reach your breakpoint.

Lot of threads relating to debug details if you find any issue.

BR,

Diwakar

Read only

0 Likes
1,204

Hi.,

Am still unable to find out a soln for the batch job problem in production client.

It works fine in dev.system but its not working in production system.

Also authorization object is ok the batch job in production system.

Any pos. solns for this strange problem

thanks

suresh

Read only

0 Likes
1,204

Suresh,


1. the batch job is scheduled to run daily in production, but once i check it in sm37 its schedule only for 0 secs,which is not true

What is the status when you are seeing the time 0 secs, if it is SCHEDULED/RELEASED status, then 0 secs is OK as it will show any time only when job is FINISHED. It should be same behaviour in DEV as well.


2. if I manually schedule the batch job thru program for the first time , the first batch job will run for 0 sec which is not true,, but if i again schedule the batch job for 2nd time,.then its working fine. 

What is the status when you see 0 secs for the First time ? Is it FINISHED ?? Try to run the program in Foreground and note the behaviour.

Is your program setting some parameter or some table value which is actually used in the 2nd run and hence the correct results ??

Better to use SM36 or take basis help to schedule a batch job rather doing it from SE38 Execute background.

BR,

Diwakar

Edited by: Diwakar Aggarwal on Aug 10, 2011 10:40 AM

Read only

0 Likes
1,204

Hi ALL,

thanks for all your replies...

There was a problem in the directory folder in production , so basis guys helped me to resolve it.

thanks for all your time

rgrds

suresh

Read only

Former Member
0 Likes
1,204

Hi

To debug background job just follow this procedure .

write below loop in ur program.

do.

clear count.

If count = 'X'.

Exit.

Endif.

Enddo.

at transaction sm50, you will see the process , select it and go to program / mode - > program ->debug.

OR

1) Set a breakpoint in your program

2) select the job in SM37

3) enter JDBG into the SAP fast path of the SM37 screen and press ENTER

This will navigate you into a b/g debug - you can then press the debugger buttons to move to your breakpoint.

TRY IT..