Skip to Content
0
Former Member
Feb 10, 2005 at 07:42 PM

SUBMIT with parameter

31 Views

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