cancel
Showing results for 
Search instead for 
Did you mean: 

Selection Screen Values

Former Member
0 Kudos

Hi,

I want to create a common include or a function module to write the Selection Screen Input values in each report I write(at the end of the report as the last page).

I want to pass just the Program name (SY-CPROG) to the fn module or include. The fn module may use LOAD statement.

Is there someone who has already done this before?

Thanks,

Bala

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Function module RS_LIST_SELECTION_TABLE could provide you with the info you need.

Cheers

Colin

PS. If this fixes your issue, please award me the points as so few people do !

Thanks.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bala,

If you were to do something like this, then you'd get your desired result:

<b> DATA : PRGNAME LIKE SY-REPID.

DATA: BEGIN OF ITAB_VAR OCCURS 0.

INCLUDE STRUCTURE RSPARAMS.

DATA: END OF ITAB_VAR.

PRGNAME = SY-REPID.

CALL FUNCTION 'RS_LIST_SELECTION_TABLE'

EXPORTING

REPORT = PRGNAME

NEWPAGE = ' '

SELTEXT = 'X'

TABLES

SEL_TAB = ITAB_VAR.</b>

I hope this helps.

Hafeez

Former Member
0 Kudos

Oh dear,

It looks like three of us had the idea of helping out Bala - at the same time!

I personally would recommend John Heutmekers reply.

Regards,

Hafeez

Former Member
0 Kudos

Yes, it is possible. I have done that before.

Former Member
0 Kudos

Could please explain how did you do it?

Thanks for your help,

Bala

Former Member
0 Kudos

Hi Bala,

Take a look at this piece of code to see how it works:

FORM print_selections.

DATA:

zzl_repid TYPE syst-repid,

zt_selections TYPE TABLE OF rsparams.

zzl_repid = syst-repid.

CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

EXPORTING

curr_report = zzl_repid

TABLES

selection_table = zt_selections

EXCEPTIONS

OTHERS = 0.

CALL FUNCTION 'RS_LIST_SELECTION_TABLE'

EXPORTING

report = zzl_repid

seltext = 'X'

newpage = ' '

TABLES

sel_tab = zt_selections

EXCEPTIONS

OTHERS = 0.

SKIP 3.

ENDFORM. " print_selections

If this helps, please give your points to Colin, as he provided the solution already.

Regards,

John.

Former Member
0 Kudos

Hi,

Call this function at the event START-OF-SELECTION and process the resulting SELTAB to output your list.

Kind regards

Colin.

Former Member
0 Kudos

Hi all,

I used the RS_LIST_SELECTION_TABLE function module to print the input fields, and I have a problem:

The <b>DATE</b> fields are printed in format YYYYMMDD, and I need it to be in the format <b>DD.MM.YYYY</b>

How can I do it?

Thanks,

Itzhak.