选择屏幕中的下拉框和dialog中下拉框设计
REPORT YTEST014.
PARAMETERS: auart LIKE vapma-auart AS LISTBOX VISIBLE LENGTH 6.
AT SELECTION-SCREEN OUTPUT.
PERFORM fill_data_to_auart.
" DEFAULT 'ZESC' OBLIGATORY.
FORM fill_data_to_auart .
TYPE-POOLS: vrm . "存放combobox内容的type pool
DATA: name TYPE vrm_id, " list box的名称
list TYPE vrm_values, " list box的值
value LIKE LINE OF list . " list box的结构
REFRESH list .
DEFINE fill_list.
value-key = &1. "个就是变量P_LIST的值
value-text = &2. "这个是text
append value to list.
END-OF-DEFINITION.
fill_list 'ZESC' 'ZESC'.
fill_list 'ZESE' 'ZESE'.
fill_list 'ZEDN' 'ZEDN'.
fill_list 'ZEEN' 'ZEEN'.
fill_list 'ZPBB' 'ZPBB'.
fill_list 'ZPBE' 'ZPBE'.
fill_list 'ZPDN' 'ZPDN'.
fill_list 'ZPEN' 'ZPEN'.
fill_list 'ZOCS' 'ZOCS'.
fill_list 'ZASC' 'ZASC'.
fill_list 'ZASE' 'ZASE'.
fill_list 'ZADN' 'ZADN'.
fill_list 'ZAEN' 'ZAEN'.
"---〉调用函数显示listbox里面的值
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'AUART' " PARAMETERS's Name
values = list.
ENDFORM. " fill_data_to_auart
****************************************************************************************************
dialog中的下拉框设计
和选择屏幕中的是一样的只不过函数调用的
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'AUART' " 是选择屏幕画出来的输入框名称
values = list.