‎2007 Apr 20 6:26 PM
Hi,
I need sytax to submit a job
Right now I am using this code to send 4 parameters.
I need to send these 4 in a structure.
submit Ztestjob USER sy-uname
via job p_jobnm
number p_jobcount
with afko-rsnum eq afko-rsnum
with aufnr_d eq aufnr_d
with sernr_d eq sernr_d
with p_lmnga eq p_lmnga
AND RETURN.
So I have to pass a structure of values into the BGprogram through a submit and do a couple of loops in the BGPROGRAM.
I need the syntax for submit .
I also need to know how to catch the structure with values in the BGPROGRAM.
Anyone please answer ASAP
Message was edited by:
ramana peddu
Message was edited by:
ramana peddu
‎2007 Apr 20 7:25 PM
Hi,
Please try this.
Call Program:
DATA: WA_MARA LIKE MARA.
*Export structure values
EXPORT WA_MARA TO MEMORY ID 'ZMARA'.
...
submit ZRAJJOBSUB USER sy-uname
via job p_jobnm
number p_jobcount
with afko-rsnum eq afko-rsnum
with aufnr_d eq aufnr_d
with sernr_d eq sernr_d
with p_lmnga eq p_lmnga
AND RETURN.
....
Submit Program:
DATA: WA_MARA LIKE MARA.
*Import structure values
IMPORT WA_MARA FROM MEMORY ID 'ZMARA'.
...
FREE MEMORY ID 'ZMARA'.
Regards,
Ferry Lianto
‎2007 Apr 20 6:58 PM
Hi,
Please try to use EXPORT TO MEMORY and IMPORT FROM MEMORY statements to pass the data structure from call program to submit program.
For more information, please check this link.
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3bc4358411d1829f0000e829fbfe/content.htm
Regards,
Ferry Lianto
‎2007 Apr 20 7:00 PM
Hi,
<u>SUBMIT</u>
Calls an executable program of type 1.
Syntax
SUBMIT <rep> [AND RETURN] [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>]
[LINE-SIZE <width>]
[LINE-COUNT <length>].
Calls the program <rep>. If you omit the AND RETURN addition, the current program is terminated. Otherwise, the data from the current program is retained, and processing returns to the calling program when <rep> has finished running. The other additions control the selection screen and set attributes of the default list in the called program.
Regards,
Bhaskar
‎2007 Apr 20 7:13 PM
Please tell me which is the one I need to select for structure.
‎2007 Apr 20 7:25 PM
Hi,
Please try this.
Call Program:
DATA: WA_MARA LIKE MARA.
*Export structure values
EXPORT WA_MARA TO MEMORY ID 'ZMARA'.
...
submit ZRAJJOBSUB USER sy-uname
via job p_jobnm
number p_jobcount
with afko-rsnum eq afko-rsnum
with aufnr_d eq aufnr_d
with sernr_d eq sernr_d
with p_lmnga eq p_lmnga
AND RETURN.
....
Submit Program:
DATA: WA_MARA LIKE MARA.
*Import structure values
IMPORT WA_MARA FROM MEMORY ID 'ZMARA'.
...
FREE MEMORY ID 'ZMARA'.
Regards,
Ferry Lianto