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: 

How to use dropdown list in selection screen

Former Member
0 Kudos

Hi everyone.

I'm stating a new report and a drop down list is required in initial filtering. I red different articles in google but istill just don't get it... please help...

3 REPLIES 3

Former Member
0 Kudos

Use 'AS LISTBOX ' addition in Parameters.

Use 'VRM_SET_VALUES' for populating data in this field.

Search in the forum related to these words if you are not sure how to use them.

BR,

Diwakar

former_member302911
Active Participant
0 Kudos

Sample Code:


TYPE-POOLS: vrm.

DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.

* List box
PARAMETERS: ps_parm AS LISTBOX VISIBLE LENGTH 10.

INITIALIZATION.

* Populate list box values
  name = 'PS_PARM'.
  value-key = '1'. value-text = 'Line 1'. APPEND value TO list.
  value-key = '2'. value-text = 'Line 2'. APPEND value TO list.

AT SELECTION-SCREEN OUTPUT.

* Set list box with value
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id     = name
      values = list.

START-OF-SELECTION.
  WRITE: / 'Parameter:', ps_parm.

Regards,

Angelo.

Former Member
0 Kudos

Hi,

Declare your parameters like this.

PARAMETERS: p_test AS LISTBOX VISIBLE LENGTH 10. ( length is ur choice based on the field length)

Thanks,

guru.