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

SUBMIT with parameter

Hi,

I am trying to create background jobs with the help of SUBMIT.

Statements are something liek this:

KICK_COUNT = 0.

WHILE KICK_COUNT < 3.

CONCATENATE 'ZSUBMIT_BIW' KICK_COUNT INTO jbname.

KICK_COUNT = KICK_COUNT + 1.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

JOBNAME = jbname

IMPORTING

JOBCOUNT = jbcnt.

p_pid = kick_count. " Brahma

  • set parameter id 'PID' field p_pid.

SUBMIT ZBW_BP_SI_USER_EXIT

with P_PID = KICK_COUNT

via job jbname number jbcnt

AND RETURN.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

JOBCOUNT = jbcnt

JOBNAME = jbname

STRTIMMED = 'X'.

MOVE JBNAME TO I_JOB_STATUS-I_JOB_NAME.

MOVE JBCNT TO I_JOB_STATUS-I_JOB_COUNT.

APPEND I_JOB_STATUS.

ENDWHILE.

IN the ZBW_BP_SI_USER_EXIT program I have select statment :

SELECT * FROM ZBW_EXIT_TAB

INTO CORRESPONDING FIELDS OF TABLE I_REFPROC

WHERE PID = p_pid.

This select statment doesn't work when it is kicked off through above SUBMIT statement. By having WRITE statements I am confirming that p-pid (parameter) is getting passed perfectly alright.

If I execute the ZBW_BP_SI_USER_EXIT program separately with the value in P_PID , then SELECT statment above works fine.

PLease let me know what could be going wrong.

Thanks in advance.

-Santosh Taware

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Feb 10, 2005 at 08:36 PM

    Also, please check to make sure that there is a parameter "P_PID" in program ZBW_BP_SI_USER_EXIT. When you use the Submit statement "WITH" parameters, there is no checking that the parameters exist in the submitted program.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 10, 2005 at 08:06 PM

    Your code looks pretty good to me, are you sure that the ZBW_EXIT_TAB-PID and the P_PID are of the same type and the data is in the same format? If so, what exactly are the data types/lengths.

    Regards,

    Rich Heilman

    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.