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

SUBMIT & JOB_SUBMIT

0 Likes
994

Hi,

How we can use the function "job_submit" with settings of instruction "submit" :

SUBMIT z_programme USER 'Z_USER' VIA JOB l_jobname NUMBER l_idjob

WITH p_param1 = value1

WITH p_param2 = value2

AND RETURN.

is that possible ?

Thank you.

4 REPLIES 4
Read only

Former Member
0 Likes
906

Have you looked at this?  It has most of the basic stuff for submitting a job from code.

http://scn.sap.com/docs/DOC-46614

Any troubles and I'd be happy to discuss it with you...

Neal

Read only

0 Likes
906

Hi,

I wanted to know how i could pass the values ​​(value1 and value2) in my program with function job_submit.

the solution is to create a variant with abap and then use it, because the values ​​are dynamic, is that possible ?

thnx

Read only

0 Likes
906

Given dynamic values, I'd make a variant as you said.  But then I'd have the variant read tvarvc for the values.  Your job creation program can than change out the values before each job creation.  I'm assuming that the jobs are set to run immediate.  If not, the values might over write before the first job could obtain it's variables.  Further, you'd have to be concerned that just because you schedule a job as immediate, does not mean that it was started immediately.  I'd look into setting locks when I created the parameters and unlocks when they were read.

Neal

Read only

0 Likes
906

Thank you Neal,

if I understand correctly, if we have a variant then it is better to use the function job_submit

If we have dynamic parameters which are calculated by the program that appeals to our program, in this case we uses simply submit instruction like :

SUBMIT z_programme USER 'Z_USER' VIA JOB l_jobname NUMBER l_idjob

WITH p_param1 = value1

WITH p_param2 = value2

AND RETURN.

is that right ?

Your solution that we can use table tvarvc for dynamic values is ok too

Thank you so much