ABAP 设置下拉框

  TYPE-POOLS: VRM.
DATA: NAME1 TYPE VRM_ID,
      LIST1 TYPE VRM_VALUES,
      VALUE1 LIKE LINE OF LIST1.

SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-T02.
PARAMETERS: P_BSART LIKE EKKO-BSART AS LISTBOX VISIBLE LENGTH 20
OBLIGATORY. "配送订单类型
SELECTION-SCREEN: END OF BLOCK B2.

AT SELECTION-SCREEN OUTPUT.
REFRESH LIST1.
  NAME1 = 'P_BSART'.
  VALUE1-KEY = 'ZEB'.
  VALUE1-TEXT = '配送转储采购订单'.
  APPEND VALUE1 TO LIST1.
  VALUE1-KEY = 'ZCB'.
  VALUE1-TEXT = '非生产材料领料单'.
  APPEND VALUE1 TO LIST1.
  VALUE1-KEY = 'ZPB'.
  VALUE1-TEXT = '生产领料单'.
  APPEND VALUE1 TO LIST1.
  VALUE1-KEY = 'ZXB'.
  VALUE1-TEXT = '计划直传转储采购订单'.
  APPEND VALUE1 TO LIST1.

  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID     = NAME1
      VALUES = LIST1.

你可能感兴趣的:(function,list)