Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Job submit in more than program.

ronaldo_aparecido
Contributor
0 Likes
999

Hi experts

I have a job created in sm37 with 3. programs

My question is:

how can i use CALL FUNCTION 'JOB_SUBMIT' to call this programs in one job?

need i to call one by turn?

CALL FUNCTION 'JOB_SUBMIT'

       EXPORTING

         authcknam               = 'ECCREMOTE' " Runtime authorizations user

         jobcount                = lv_jobcount " Value from JOB_OPEN

         jobname                 = lv_jobname  " Value from JOB_OPEN

         report                  = 'RIMODGEN'  " Report to be run

         variant                 = lv_variante " Variant to use with

       EXCEPTIONS

         bad_priparams           = 01

         invalid_jobdata         = 02

         jobname_missing         = 03

         job_notex               = 04

         job_submit_failed       = 05

         lock_failed             = 06

         program_missing         = 07

         prog_abap_and_extpg_set = 08

         OTHERS                  = 99.



thanks.

Hi experts

I have a job created in sm37 with 3. programs

My question is:

how can i use CALL FUNCTION 'JOB_SUBMIT' to call this programs in one job?

need i to call one by turn?

CALL FUNCTION 'JOB_SUBMIT'

       EXPORTING

         authcknam               = 'ECCREMOTE' " Runtime authorizations user

         jobcount                = lv_jobcount " Value from JOB_OPEN

         jobname                 = lv_jobname  " Value from JOB_OPEN

         report                  = 'RIMODGEN'  " Report to be run

         variant                 = lv_variante " Variant to use with

       EXCEPTIONS

         bad_priparams           = 01

         invalid_jobdata         = 02

         jobname_missing         = 03

         job_notex               = 04

         job_submit_failed       = 05

         lock_failed             = 06

         program_missing         = 07

         prog_abap_and_extpg_set = 08

         OTHERS                  = 99.



thanks.

3 REPLIES 3
Read only

Former Member
0 Likes
955

Hi Ronaldo

Have you tried using the SUBMIT Function with and Return

SUBMIT    your_program_name

using selection-set your_variant

and return.

Repeat this code for your 3 program calls

Regards

Arden

Read only

Sandra_Rossi
Active Contributor
0 Likes
955

As your screen captures shows the result achieved, I guess you did it manually and you ask how to do it programmatically.

call function 'JOB_OPEN' ...
call function 'JOB_SUBMIT' ... "program of step 1
call function 'JOB_SUBMIT' ... "program of step 2
call function 'JOB_SUBMIT' ... "program of step 3
call function 'JOB_CLOSE' ...

cf sap Library

Read only

RaymondGiuseppi
Active Contributor