Skip to Content
0
Former Member
Apr 15, 2011 at 06:21 AM

Problem With Background Job

17 Views

Hi ,

I am facing problem with background scheduling a program . i have program ZTEST and in that i am submitting another program ZTEST1 for background..

CALL FUNCTION 'JOB_OPEN'

EXPORTING

JOBNAME = NAME_JOB

IMPORTING

JOBCOUNT = NUMBER

EXCEPTIONS

CANT_CREATE_JOB = 1

INVALID_JOB_DATA = 2

JOBNAME_MISSING = 3

OTHERS = 4.

SUBMIT ZTEST1 TO SAP-SPOOL "DESTINATION l_dest

"LINE-SIZE l_linsz

"IMMEDIATELY 'X'

"KEEP IN SPOOL 'X'

SPOOL PARAMETERS PRINPAR

"WITHOUT SPOOL DYNPRO

WITH scheme1 = scheme1

WITH descript = descript

WITH p_bukrs = p_bukrs

WITH r1 = r1

WITH offline = OFFLINE

WITH ex = EX

WITH py = PY

WITH bj = BJ

WITH IM = IM

WITH schno = schno

WITH spart1 = spart1

WITH spart = spart

WITH date1 = date1

VIA JOB NAME_JOB NUMBER NUMBER AND RETURN.

Job is getting scheduled but the problem is no spool number is geneated for this job .

Moreover , if run ZTEST1 normally it is running perfectly fine and updating the database , but if i run it through SUBMIT command

it is not working fine and not updating the DB.

Thanks.