SELECTION-SCREEN: BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-001.
**定义下拉框
PARAMETERS S_LSBOX TYPE c AS LISTBOX VISIBLE LENGTH 20 DEFAULT '2'.
SELECTION-SCREEN: END OF BLOCK SCR1.
*初始化时下拉框赋值
INITIALIZATION.
REFRESH LIST .
VALUE-KEY = '1' . "这个就是变量P_LIST的值
VALUE-TEXT = 'ZPR0' . "这个是text
APPEND VALUE TO LIST .
VALUE-KEY = '2' .
VALUE-TEXT = 'ZB01' .
APPEND VALUE TO LIST .
VALUE-KEY = '3' .
VALUE-TEXT = 'ZB02' .
APPEND VALUE TO LIST .
**调用下拉框赋值函数
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'S_LSBOX'
VALUES = LIST.