‎2008 Jul 24 8:53 AM
Hi experts,
I have three select-options in a selection-screen like
s_vbeln for vbak-vbeln,
I want to display the values entered in the select-options of the selection-screen on the report.
eg!..
If user enters the multiple values in the select-options, it should show all the multiple values .
If the user enter only the ranges ("From and To"), it should display only the ranges .
‎2008 Jul 24 8:57 AM
‎2008 Jul 24 9:00 AM
use FM : PRINT_SELECTIONS
data : begin of i_varinfo occurs 0,
flag type c,
olength type x,
line like raldb-infoline.
data : end of i_varinfo .
call function 'PRINT_SELECTIONS'
exporting
mode = ' '
rname = sy-cprog
rvariante = sy-slset
tables
infotab = i_varinfo.
loop at i_varinfo.
Write each selection variable
write: / i_varinfo-line.
endloop.
‎2008 Jul 24 9:03 AM
hi check this....do like this..
CALL FUNCTION 'PRINT_SELECTIONS'
EXPORTING
RNAME = SY-CPROG
RVARIANTE = SY-SLSET
MODE = 'TABLE'
TABLES
INFOTAB = I_INFO.
‎2008 Jul 24 9:10 AM
Hi,
Actualy all the select option behave as internal and stores the value entered in them. So here your select options s_vbeln is an internal tables.
To display the value Just use LOOP AT Write statement to print values.
REPORT z_sdn.
TABLES:
vbak.
SELECT-OPTIONS:
s_vbeln for vbak-vbeln,
loop at s_vbeln.
WRITE:
/ s_vbeln-low,
s_vbeln-high.
endloop.By the way you are repeating the same question in the same community and you also heve more than 10 post unresolved. Both are against the rule of engagement. Moderator may lock the thread. So please avoid them.
Regards,
Anirban
‎2008 Jul 24 9:16 AM
Hi!
Check out this sample code
REPORT YH1146_SDN1.
TABLES sflight.
DATA:
fs_carrid TYPE scarr-carrid.
DATA:
t_carr LIKE TABLE OF fs_carrid.
SELECT-OPTIONS:
s_carrid FOR sflight-carrid.
START-OF-SELECTION.
IF s_carrid-high IS INITIAL.
WRITE: s_carrid-low.
ELSE.
SELECT carrid
FROM sflight
INTO TABLE t_carr
WHERE carrid IN s_carrid.
LOOP AT t_carr INTO fs_carrid.
WRITE: / fs_carrid.
ENDLOOP.
ENDIF.
Regards
Abhijeet