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

Multiple entries for SUBMIT PROGRAM

Former Member
0 Likes
3,613

HI Experts!

I want to SUBMIT multiple values to a report and call that report. the values are in ITAB and please let me know how to submit multiple values to a another program sel-screen.

Plz help me on the same

Mahesh

6 REPLIES 6
Read only

Former Member
0 Likes
1,853

hi

you can use import / export statements to pass the internal table values.

regards

Sajid

Read only

Former Member
0 Likes
1,853

Hi Mahesh,

Take a look at the help for the SUBMIT statement, particularly the WITH SELECTION-TABLE option, this should enable you to pass multiple values to the same select-option.

Regards,

Nick

Read only

Former Member
0 Likes
1,853

your question is not clear.

Do you mean multiple values to same parameter or same select option, at a time or one by one?

are both the reports customized or standard?

Read only

Former Member
0 Likes
1,853

hi

use


export itab to memory id 'NID'.

in the report from which you are calling another report.

& use


import itab from memory id 'NID'.

in the second report.

Read only

Former Member
0 Likes
1,853

Hi Mahesh,

U can solve ur problem with this code:

" internal table to fill multiple values for submit

DATA : rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab.

" for filling multiple values of matnr in the select option

LOOP AT it_matnr INTO wa_matnr.

rspar_line-selname = 'MATNR'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = wa_matnr-model.

APPEND rspar_line TO rspar_tab.

CLEAR rspar_line.

ENDLOOP.

" normal parameter field

rspar_line-selname = 'LGORT'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = '1000'.

APPEND rspar_line TO rspar_tab.

rspar_line-selname = 'DATUM'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'BT'.

rspar_line-low = fr_date.

rspar_line-high = to_date.

APPEND rspar_line TO rspar_tab.

SUBMIT ('ZTEST') WITH SELECTION-TABLE rspar_tab AND RETURN.

Read only

Former Member
0 Likes
1,853

Hi Mahesh,

What I understand is:

a) you have some values in ITAB in Z Program.

b) These all values are to be submitted to a report. say ABC

(The ABC report should have a SELECT-OPTION on selection screen for this values)

So the steps would be:

1. Create a range declaration in your z program. eg. myrange

2. Populate this myrange, with values in ITAB , like this.



myrange-sign = 'I'.
myrange-option = 'EQ'.

loop at itab.
     myrange-low = ITAB-FieldName
append myrange
endloop.

3. Now, use submit statement from Z report

(Please see F1 help for exact syntax)



SUBMIT ABC 
with SelectOption = MyRange

Regards,

Amit Mittal.