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 get drop down list (list of values) in selection-screen

Former Member
0 Kudos
347

Hi al,

This is anilreddy. Please let me knew the solution

How to get the drop down list for a field in selection-screen (not in dialog programming)

(not as POV)

Regards,

anilreddy

1 ACCEPTED SOLUTION

Former Member
0 Kudos
176
REPORT  zXXXX.


TYPE-POOLS: vrm.

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

PARAMETERS: p_list(10) AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN OUTPUT.

  name = 'P_LIST'.

  value-key = cl_abap_char_utilities=>horizontal_tab.
  value-text = 'Tab'.
  APPEND value TO list.

  value-key = ','.
  value-text = 'Comma'.
  APPEND value TO list.

  value-key = ':'.
  value-text = 'Colon'.
  APPEND value TO list.

  value-key = ';'.
  value-text = 'Semi Colon'.
  APPEND value TO list.

  value-key = '.'.
  value-text = 'Period'.
  APPEND value TO list.


  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id     = name
      values = list.

START-OF-SELECTION.

  WRITE: / 'PARAMETER:', p_list.
2 REPLIES 2

Former Member
0 Kudos
177
REPORT  zXXXX.


TYPE-POOLS: vrm.

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

PARAMETERS: p_list(10) AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN OUTPUT.

  name = 'P_LIST'.

  value-key = cl_abap_char_utilities=>horizontal_tab.
  value-text = 'Tab'.
  APPEND value TO list.

  value-key = ','.
  value-text = 'Comma'.
  APPEND value TO list.

  value-key = ':'.
  value-text = 'Colon'.
  APPEND value TO list.

  value-key = ';'.
  value-text = 'Semi Colon'.
  APPEND value TO list.

  value-key = '.'.
  value-text = 'Period'.
  APPEND value TO list.


  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id     = name
      values = list.

START-OF-SELECTION.

  WRITE: / 'PARAMETER:', p_list.

Former Member
0 Kudos
176

REPORT ZTESTPRG.

TYPE-POOLS: VRM.

DATA: NAME TYPE VRM_ID,

LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN OUTPUT.

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.

CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.

START-OF-SELECTION.

WRITE: / 'PARAMETER:', PS_PARM.

Thanks

Mahesh