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

Regarding SUBMIT Statement

Former Member
0 Likes
735

Hi All,

I have a issue with SUBMIT statement.

My issue is as below:

I have a report say <b>REPORT1</b> .

In this right now i am capturing material information and storing in one new internal table <b>I_MAT</b>. which is having MATNR field in it.

Now from here i need to submit a new program say <b>REPORT2</b> which is having few selection-screen elements i need to fill them from here with SUBMIT statement.

Selection screen elements need to be filled:

<b>S_MATNR, P_WERKS, P_MAT, P_S, S_EMAIL.</b>

Now for this purpose i have declared another internal table as below:

<b>DATA: RSPAR LIKE RSPARAMS OCCURS 0 WITH HEADER LINE.</b>

Now i need to fill this internal table for above screen elements.

I have appended <b>P_WERKS, P_MAT, P_S</b> elements as below:

<b> RSPAR-SELNAME = 'P_WERKS'.

RSPAR-KIND = 'P'.

RSPAR-LOW = p_werks.

APPEND RSPAR.

RSPAR-SELNAME = 'P_MAT'.

RSPAR-KIND = 'P'.

RSPAR-LOW = C_X.

APPEND RSPAR.

RSPAR-SELNAME = 'P_S'.

RSPAR-KIND = 'P'.

RSPAR-LOW = ''.

APPEND RSPAR.</b>

Now i need to update <b>S_MATNR, S_EMAIL</b>.

<b>S_MATNR i need to fill with I_MAT internal table with values of I_MAT-MATNR. which can be multiple.

Here how i need to append the same.

S_EMAIL i need to fill in with values in S_EMAIL which can be multiple.

Here how i need to append the same.</b>

Then i can write submit statement as below:

<b> SUBMIT REPORT2 VIA SELECTION-SCREEN

WITH SELECTION-TABLE RSPAR

AND RETURN.</b>

Can anybody tell me how can i fill above two <b>[S_MATNR, S_EMAIL]</b> elements to pass all the data to <b>SUBMIT</b> statement.

Thanks in advance.

Thanks,

Deep.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
701

Hi Deep

Please check out how I filled my select option 'DOCNUM'.

The table i_edidc had the values which needed to be populated

LOOP AT i_edidc INTO wa_edidc.

wa_rsparams-selname = 'DOCNUM'.

wa_rsparams-kind = 'S'.

wa_rsparams-sign = 'I'.

wa_rsparams-option = 'EQ'.

wa_rsparams-low = wa_edidc-docnum.

APPEND wa_rsparams TO i_rsparams.

CLEAR wa_rsparams.

You can do the same... and then call the submit statement

ENDLOOP.

SUBMIT program name EXPORTING LIST TO MEMORY

WITH SELECTION-TABLE i_rsparams.

6 REPLIES 6
Read only

Former Member
0 Likes
701

HI Deep

To keep it simple, for select-options populate a range and use as below:

SUBMIT ZREPORT2 VIA SELECTION_SCREEN
   WITH P_WERKS = p_werks
   WITH S_MATNR in R_MATNR
   AND RETURN.

Kind Regards

Eswar

Read only

Former Member
0 Likes
702

Hi Deep

Please check out how I filled my select option 'DOCNUM'.

The table i_edidc had the values which needed to be populated

LOOP AT i_edidc INTO wa_edidc.

wa_rsparams-selname = 'DOCNUM'.

wa_rsparams-kind = 'S'.

wa_rsparams-sign = 'I'.

wa_rsparams-option = 'EQ'.

wa_rsparams-low = wa_edidc-docnum.

APPEND wa_rsparams TO i_rsparams.

CLEAR wa_rsparams.

You can do the same... and then call the submit statement

ENDLOOP.

SUBMIT program name EXPORTING LIST TO MEMORY

WITH SELECTION-TABLE i_rsparams.

Read only

0 Likes
701

Hi,

How <b>S_EMAIL</b> screen element need to be filled up.

Which is available in REPORT1 with multiple emails i need to pass the same into REPORT2 through submit statement.

Thanks,

Deep.

Read only

0 Likes
701

lets say s_email is available in internal table i_email

then

loop at i_email into wa_email.

wa_rsparams-selname = 'S_EMAIL'.

wa_rsparams-kind = 'S'.

wa_rsparams-sign = 'I'.

wa_rsparams-option = 'EQ'.

wa_rsparams-low = wa_email-emailname.

APPEND wa_rsparams TO i_rsparams.

CLEAR wa_rsparams.

endloop.

suppose it is also in a select-option with the same name 'S_EMAIL'then

wa_rsparams-selname = 'S_EMAIL'.

wa_rsparams-kind = 'S'.

wa_rsparams-sign = 'I'.

wa_rsparams-option = 'BT'.

wa_rsparams-low = s_email-low.

wa_rsparam-high = s_email-high

APPEND wa_rsparams TO i_rsparams.

CLEAR wa_rsparams.

Hope this helps you ...

Read only

0 Likes
701

As per the approach i have given earlier,

use WITH and '=' operation for PARAMETERS and 'IN' for Select-Options.

Kind Regards

Eswar

Read only

Former Member
0 Likes
701

instead of ur logic, declare separate internal tables for all selection-screen fields and populate them with data...It can have multiple entries. then use

SUBMIT ZREPORT2 VIA SELECTION_SCREEN

WITH P_WERKS = p_werks

WITH S_MATNR in i_MATNR

AND RETURN.