Skip to Content
0
Former Member
Mar 25, 2009 at 06:26 AM

Job Submit Problem..

468 Views

Hello everyone,,

I am facing a problem...could any one please help me out in solving this 😊

The issue is : I have a program which will submit some jobs at the background.

Now,Before calling the FM Job_Submit , I am exporting some values.

Now the program that is submitted in the Job_Submit, I am trying to import the values that i have exported in the main program. I couldnt able to import the values in the program that is submitted using Job_Submit. I also tried using set and get parameters still couldnt able to make it work.

   lv_jobid = p_v_jobid.
   lv_repid = wa_submitjoblist-rep_id.
   lv_unit = wa_submitjoblist-bj_unit.

   " exporting the values for the report being submitted .
   export lv_jobid to memory id 'JOBID2REP'.
   export lv_repid to memory id 'REPID2REP'.
   export lv_unit to memory id 'UNIT2REP'.

     call function 'JOB_SUBMIT'
     exporting
*     ARCPARAMS                         =
       authcknam                         = sy-uname
*     COMMANDNAME                       = ' '
*     OPERATINGSYSTEM                   = ' '
*     EXTPGM_NAME                       = ' '
*     EXTPGM_PARAM                      = ' '
*     EXTPGM_SET_TRACE_ON               = ' '
*     EXTPGM_STDERR_IN_JOBLOG           = 'X'
*     EXTPGM_STDOUT_IN_JOBLOG           = 'X'
*     EXTPGM_SYSTEM                     = ' '
*     EXTPGM_RFCDEST                    = ' '
*     EXTPGM_WAIT_FOR_TERMINATION       = 'X'
       jobcount                          = p_v_jobid
       jobname                           = 'TFDBBATCHJOBRUN'
*     LANGUAGE                          = SY-LANGU
*     PRIPARAMS                         = ' '
      report                            = wa_submitjoblist-bj_repname
      variant                           = wa_submitjoblist-bj_variant
    importing
      step_number                       = p_v_stepid
*   EXCEPTIONS
*     BAD_PRIPARAMS                     = 1
*     BAD_XPGFLAGS                      = 2
*     INVALID_JOBDATA                   = 3
*     JOBNAME_MISSING                   = 4
*     JOB_NOTEX                         = 5
*     JOB_SUBMIT_FAILED                 = 6
*     LOCK_FAILED                       = 7
*     PROGRAM_MISSING                   = 8
*     PROG_ABAP_AND_EXTPG_SET           = 9
*     OTHERS                            = 10
             .
   if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
   endif.

now in the program thats getting submitted in the Job_Submit.


    import lv_jobid from memory id 'JOBID2REP'.
    import lv_repid from memory id 'REPID2REP'.
    import lv_unit from memory id 'UNIT2REP'.

Could any one please help me out in solving the problem....

thanks and regards

Chandu Reddy Sunkari