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: 

select-options values display

Former Member
0 Kudos

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 .

5 REPLIES 5

Former Member
0 Kudos

Hi,

This has been posted in the following thread,

[;

A loop statement for the select-option would do the job.

Former Member
0 Kudos

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.

Former Member
0 Kudos

hi check this....do like this..

CALL FUNCTION 'PRINT_SELECTIONS'

EXPORTING

RNAME = SY-CPROG

RVARIANTE = SY-SLSET

MODE = 'TABLE'

TABLES

INFOTAB = I_INFO.

Former Member
0 Kudos

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

Former Member

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