Application Development 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: 

Regarding SUBMIT Statement

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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.

Former Member
0 Kudos

This message was moderated.

tarangini_katta
Active Contributor
0 Kudos

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,

0 Kudos

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.

Former Member
0 Kudos

Former Member
0 Kudos

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.