PARAMETERS: P_RANGE type char12 AS LISTBOX VISIBLE LENGTH 12 DEFAULT '1' modif id MKE.
INITIALIZATION.
PERFORM F_RANGE_INITIAL.
FORM F_RANGE_INITIAL .
DATA: LIT_VALUES TYPE VRM_VALUES WITH HEADER LINE.
DATA: L_NAME TYPE VRM_ID.
REFRESH: LIT_VALUES.
LIT_VALUES-KEY = '1'.
LIT_VALUES-TEXT = TEXT-001.
APPEND LIT_VALUES.
CLEAR LIT_VALUES.
LIT_VALUES-KEY = '2'.
LIT_VALUES-TEXT = TEXT-002.
APPEND LIT_VALUES.
CLEAR LIT_VALUES.
LIT_VALUES-KEY = '3'.
LIT_VALUES-TEXT = TEXT-003.
APPEND LIT_VALUES.
CLEAR LIT_VALUES.
*指定要下拉框的参数名--------------------------------------------
L_NAME = 'P_RANGE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = L_NAME
VALUES = LIT_VALUES[]
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " F_RANGE_INITIAL