‎2009 Jan 16 9:47 AM
Hi,
I am calling a batch job (B) (in back groung) using SUBMIT statement, from a report program (Say A). But I have to Pass some internal tables and few variable to the Batch job (B).
Can someone tell me how I can pass the Internal tables and variables ? Is it possible to pass through SUBMIT statement only? Is there some other than the use of Import-Export statement?
Thanks and regards,
Pankaj Bist.
‎2009 Jan 16 9:53 AM
U can use the SHARED MEMORY addition with import/export statement.
REPORT ZJG.
data: werks type werks_d.
DATA: wa TYPE indx.
werks = '1000'.
EXPORT werks FROM werks
TO SHARED MEMORY indx(xy)
FROM wa
CLIENT sy-mandt
ID 'MID'.
Import program....
REPORT ZP2.
data: werks type werks_d.
DATA: wa TYPE indx.
IMPORT werks TO werks
FROM SHARED MEMORY indx(xy)
TO wa
CLIENT sy-mandt
ID 'MID'.
write werks.
‎2009 Jan 16 9:55 AM
‎2009 Jan 16 9:56 AM
‎2009 Jan 16 9:58 AM
Hi pankaj,
SUBMIT <PROGRAM NAE> = ds_name " Creating batch input session
WITH fl_check = fl_check
WITH os_xon = os_xon
WITH xnonunic = xnonunic
WITH callmode = callmode
WITH max_comm = max_comm
WITH pa_xprot = pa_xprot
WITH anz_mode = anz_mode
WITH update = update
WITH xpop = xpop
WITH xlog = xlog
WITH xinf = xinf AND RETURN.
u can pass the variables like this.
the variables which i have pass to the program all are the selection screen aprameteers of the program .
I hope this will work for you.
Thanks,
‎2009 Jan 16 10:15 AM
Hi,
I have tried using WITH statement, but the value is not passing the the Batch job. There is no selection screen for the batch job, I just need to pass few variables and internal tables also.
And I want to use IMPORT-EXPORT statement.
Thanks and regards,
Pankaj Bist.
‎2009 Jan 16 10:20 AM
Hi Pankaj,
see related all threads https://www.sdn.sap.com/irj/scn/advancedsearch?query=submit+program&cat=sdn_all
Cheers,
Pravin
‎2009 Jan 18 7:20 PM
This should work:
DATA: wa_rspar TYPE rsparams.
DATA: t_rspar LIKE TABLE OF wa_rspar.
(I loaded idoc info previously to it)
CLEAR wa_rspar.
wa_rspar-selname = 'P_IDOC'.
wa_rspar-kind = 'P'.
wa_rspar-sign = 'I'.
wa_rspar-option = 'EQ'.
wa_rspar-low = wa_docnum-docnum.
APPEND wa_rspar TO t_rspar.
SUBMIT PROGRAMNAME WITH SELECTION-TABLE t_rspar AND RETURN
EXPORTING LIST TO MEMORY.