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: 

is it possible to provide list box using select-options ?

Former Member
0 Kudos

Hello All,

Please let me know is it possible to provide a list box using select-options ?

If so please explain the process.

Thanks for your time,

Vijay

4 REPLIES 4

Former Member
0 Kudos

I apologize .

It is possible via the following code and populating values as suggested by Abhijit Mandal above

TABLES MARA.
SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME.

SELECTION-SCREEN: BEGIN OF LINE.

SELECTION-SCREEN: COMMENT 1(20) VMATNR.
PARAMETERS : S_MATNR TYPE MARA-MATNR AS LISTBOX VISIBLE LENGTH 18.
SELECTION-SCREEN: COMMENT 45(2) VTO.
SELECTION-SCREEN: POSITION 50.
PARAMETERS : S_MATNR1 TYPE MARA-MATNR AS LISTBOX VISIBLE LENGTH 18.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN END OF BLOCK A.

AT SELECTION-SCREEN OUTPUT.
  VMATNR = 'Material Number'.
  VTO = 'To'.

Edited by: Kapil Sharma @ Steria on Feb 2, 2010 7:15 AM

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Using List Box is not possible in select-options only in parameters.

BR,

Suhas

Abhijit74
Active Contributor
0 Kudos

Hi,

1.The List Box will be create in the selection screen using PARAMETERS staement with AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox)

2. PARAMETERS LIST(n) AS LISTBOX VISIBLE LENGTH n.

Here n is an integer and LIST is the name of parameter. To populate the value list we use the FM VRM_SET_VALUES and the

selection screen event AT SELECTION-SCREEN OUTPUT is used to write the code to fill it.

Thanks,

Abhijt

Former Member
0 Kudos

Hi Vijay,

We can provide list option only for parameters. Hence if we use following logic, it will provide you look n feel as if select-option with listbox. However we will not be able to provide multiple selection, we can only define range -

selection-screen begin of line.

selection-screen comment for the field name position 1(10

parameters p_low as listbox

selection-screen comment for the 'To" text position 20(5)

parameters p_high as listbox

selection screen end of line.

And then in At selection-screen output we have to fill comment texts and call Fm "VM_SET_VALUES" twice, once for p_low and another call for p_high. List data should remain same. You need to build logic to use this data in further program. One way is to transfer data from parameters to range. Also you need to include tpe-pools: vrm in you program