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

Submit Report.

Former Member
0 Likes
642

Hi,

I need to pass dynamic values to Submit (REPORT)

Please see the code below.

SUBMIT (L_REP)

USING SELECTION-SET L_VARI

WITH <b>ER_EBELN</b> IN <b>R_EBELN</b> AND RETURN.

In the above statement is it possible to pass dynamic values instead of ER_EBELN.

Any help will be rewarded.

Thanks,

Pavan

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
616

If you are calling the report dynamically, then you shouldn't be passing values thru the selection screen "Statically". You should send the parameters thru with a selection-table.



report zrich_0001.

data: isels type table of RSPARAMS with header line.

clear isels.
isels-SELNAME = 'S_DATUM'.
isels-KIND    = 'S'.
isels-SIGN    = 'I'.
isels-OPTION  = 'BT'.
isels-LOW     = sy-datum.
isels-HIGH    = sy-datum .
append isels.

clear isels.
isels-SELNAME = 'P_CHK'.
isels-KIND    = 'P'.
isels-LOW     = 'X'.
append isels.

submit <report_Name> via selection-screen
             with selection-table isels
                         and return.

Regards,

Rich Heilman

4 REPLIES 4
Read only

Former Member
0 Likes
616

Hi

Try to use the option WITH SELECTION-TABLE <seltab>

Max

Read only

Former Member
0 Likes
616

Yes you can declare field symbols.

Assign field name to that field sysmbol.

Pass the field symbol to ER_EBELN

rgds,

TM

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
617

If you are calling the report dynamically, then you shouldn't be passing values thru the selection screen "Statically". You should send the parameters thru with a selection-table.



report zrich_0001.

data: isels type table of RSPARAMS with header line.

clear isels.
isels-SELNAME = 'S_DATUM'.
isels-KIND    = 'S'.
isels-SIGN    = 'I'.
isels-OPTION  = 'BT'.
isels-LOW     = sy-datum.
isels-HIGH    = sy-datum .
append isels.

clear isels.
isels-SELNAME = 'P_CHK'.
isels-KIND    = 'P'.
isels-LOW     = 'X'.
append isels.

submit <report_Name> via selection-screen
             with selection-table isels
                         and return.

Regards,

Rich Heilman

Read only

0 Likes
616

Thanks Rich Heilman ,

I GOT IT

-Pavan

Message was edited by: Pavan Kothapalli