Skip to Content
author's profile photo Former Member
Former Member

Problem With Background Job

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Apr 15, 2011 at 06:51 AM

    Hi,

    it may be because of the paramters which you are passing to ZTEST1 druing submit is different than when you are executing in forgound. check the parametrs. also use function module JOB_CLOSE to close the job.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 15, 2011 at 06:55 AM

    Hi,

    if you pass SELECT-OPTIONS, do not pass them with

    WITH ... = ...

    but with

    WITH ... IN ...

    If you have matching PARAMETERS and SELECT-OPTIONS, use "=" for PARAMETERS and "IN" for SELECT-OPTIONS!

    Regards,

    Klaus

    Edited by: Klaus Babl on Apr 15, 2011 8:56 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 20, 2011 at 07:56 AM

    Hi,

    Please check my reply to the post [JOB IN BACKGROUND - HELP |JOB IN BACKGROUND - HELP; .

    Hope it helps.

    Regards,

    Sagar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.