‎2013 Oct 07 4:47 PM
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.
‎2013 Oct 07 4:52 PM
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
‎2013 Oct 08 5:03 PM
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
‎2013 Oct 08 5:42 PM
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
‎2013 Oct 09 12:09 AM
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