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

Ranges input using multiple selection in select-options

Former Member
0 Likes
785

Hello,

I have declared a single selection field with multiple selection as follows:

SELECT-OPTIONS:

S_PONUM FOR EKKO-EBELN NO INTERVALS,

If a range is entered using multiple selection, no value appears in the selection field on screen, however, the ranges tab in multiple selection shows the range. Is there a way to programatically test if a range has been entered using multiple selection? Help is appreciated.

Regards

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
728

data: lv_lines type i.
describe table S_PONUM lines lv_lines.

if lv_lines GT 1.
  write:/ 'multiple selection'.
else.
  write: 'single value'.
endif.
4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
729

data: lv_lines type i.
describe table S_PONUM lines lv_lines.

if lv_lines GT 1.
  write:/ 'multiple selection'.
else.
  write: 'single value'.
endif.
Read only

Former Member
0 Likes
728

Hi,

If you not displaying the intervals then user can enter only one value then option field will be with 'EQ' sign.

LOOP AT S_PONUM.

IF S_PONUM-OPTION NE 'EQ'
 " Then Values are entered using the multple selections
ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
728

Hi,

s_ponum will work as itab. So, you get check for number of entries in s_ponum using:

DESCRIBE TABLE s_ponum LINES wf_lines.

IF wf_lines GT 1.

  • It means more than one entry...

ENDIF.

Hope I got u correct and this helps...

Read only

former_member242255
Active Contributor
0 Likes
728

Hi,

data n type i value 0.

TABLES: ekko.

SELECT-OPTIONS:

s_ponum FOR ekko-ebeln NO INTERVALS.

DESCRIBE TABLE s_ponum lines n.

IF n = 0.

WRITE: 'Initial'.

ENDIF.

this will work....