生成下拉菜单

REPORT zrpp014.

  TYPE-POOLS vrm.
  PARAMETERS: zlist(2) TYPE c AS LISTBOX VISIBLE LENGTH 15.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR zlist.
 PERFORM selectlist CHANGING zlist.
FORM selectlist CHANGING zlist.
DATA itab_list TYPE vrm_values.
DATA wa_list LIKE LINE OF itab_list.
wa_list-key = '01'.
wa_list-text = '入库单'.
APPEND wa_list TO itab_list.
wa_list-key = '02'.
wa_list-text = '移库单'.
APPEND wa_list TO itab_list.
wa_list-key = '03'.
wa_list-text = '出库单'.
APPEND wa_list TO itab_list.
wa_list-key = '04'.
wa_list-text = '销售出库单'.
APPEND wa_list TO itab_list.
wa_list-key = '05'.
wa_list-text = '销售退货单'.
APPEND wa_list TO itab_list.
wa_list-key = '06'.
wa_list-text = '整车出库单'.
APPEND wa_list TO itab_list.
wa_list-key = '07'.
wa_list-text = '整车退货单'.
APPEND wa_list TO itab_list.
wa_list-key = '08'.
wa_list-text = '复核'.
APPEND wa_list TO itab_list.
wa_list-key = '09'.
wa_list-text = '过账'.
APPEND wa_list TO itab_list.
CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
            id     = 'ZLIST'  "屏幕中的下拉菜单的NAME,下拉菜单选择LISTBOX
            values = itab_list.
            "if zlist = ''.    "好像没什么用
READ TABLE itab_list INTO wa_list INDEX 1. 
REFRESH itab_list.

ENDFORM.

你可能感兴趣的:(生成下拉菜单)