Google Search - Blog...........

ABAP - ListBox From User Values In Selection Screen.

report ztest.

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.

VALUE-KEY = '3'.
VALUE-TEXT = 'LINE 3'.
APPEND VALUE TO LIST.

VALUE-KEY = '4'.
VALUE-TEXT = 'LINE 4'.
APPEND VALUE TO LIST.

VALUE-KEY = '5'.
VALUE-TEXT = 'LINE 5'.
APPEND VALUE TO LIST.

VALUE-KEY = '6'.
VALUE-TEXT = 'LINE 6'.
APPEND VALUE TO LIST.

VALUE-KEY = '7'.
VALUE-TEXT = 'LINE 7'.
APPEND VALUE TO LIST.

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

START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.



No comments:

Post a Comment