怎么制作下拉菜单?

参考SAP系统的程序RSDEMO_DROPDOWN_LISTBOX

  Example:

       TYPE-POOLS: VRM.

DATA: IT_VAL TYPE VRM_VALUES,

      W_LINE LIKE LINE OF IT_VAL.

PARAMETERS P_BUKRS LIKE T001-BUKRS AS LISTBOX VISIBLE LENGTH 25

OBLIGATORY.

 

INITIALIZATION.

  SELECT BUKRS BUTXT FROM T001 INTO (W_LINE-KEY, W_LINE-TEXT).

    APPEND W_LINE TO IT_VAL.

    CHECK P_BUKRS IS INITIAL.

    P_BUKRS = W_LINE-KEY.

  ENDSELECT.

 

AT SELECTION-SCREEN OUTPUT.

  CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

      ID     = 'P_BUKRS'

      VALUES = IT_VAL.

 

END-OF-SELECTION.

  WRITE: / 'Company Code:', P_BUKRS.

你可能感兴趣的:(怎么制作下拉菜单?)