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: 

submitting of report using selection screen

Former Member
0 Kudos

Hi,

My requirement is iam having one report so it is executed when we r given site and date it gives one excel file data so now iam having 150 sites so now I want to write the report as date as selection screen and I want to submit that report in this one (new report) so it wants to take the sites automatically from werks (t001w table) and it wants to execute in a loop upto 150 times then it gives 150 excel files so now how can I pass the sites and date to the submitting selection screen date as same for all but only the site wants to varry in the submitting report pls provide the coding ..

Thanks & Regards,

Mohan Reddy.

2 REPLIES 2

Former Member
0 Kudos

Hello Mohan Reddy,

I think we can try in this way

data: y_v_rspar_line LIKE LINE OF y_v_rspar_tab,

y_v_rspar_tab TYPE TABLE OF rsparams,

y_lk_parm3 TYPE char5 VALUE 'SPERR'. " Selection screen variable name

y_v_rspar_line-selname = y_lk_parm3.

y_v_rspar_line-kind = y_k_p.

y_v_rspar_line-sign = y_k_i.

y_v_rspar_line-option = y_k_eq.

y_v_rspar_line-low = y_k_e. "Excel file site value.

APPEND y_v_rspar_line TO y_v_rspar_tab.

SUBMIT Program name USING SELECTION-SCREEN '1000'

WITH SELECTION-TABLE y_v_rspar_tab AND RETURN.

But try in 2different ways i.e

1) Keep the submit program in the loop of the excel file internal table

and take the site value in the variable and pass the value to this y_v_rspar_line-low

and call submit program.

2) Sort the excel file internal table then pass all the values to y_v_rspar_line-low and use the append statement in the same way and then call the SUBMIT program outside the loop.

Former Member
0 Kudos

Hi,

Try like this


SUBMIT <called program name>
              WITH <selection screen element> EQ <value passed>
             WITH <selection screen element1> EQ <value passed1>
         VIA SELECTION-SCREEN.