到现在碰到2种下拉菜单的情况。总结下:
第一种: 使用ddic中定义了的表的字段.这种情况下又分2种情况。

1>
该字段的input help 是 单独的 input help 。直接写参数,值会自动传进来。
TABLES : sflight ,ekko .
PARAMETERS : bbb TYPE ekko-lifnr AS LISTBOX VISIBLE LENGTH 20.
下拉菜单的值自动传进来。

2>
该字段的input help 是联合的。这样的情况下值不会自动传到field 里,必须建一个内表。把值传入内表。
TYPE-POOLS: vrm . "include type pools: vrm,used in set value to list-box
TABLES : sflight ,ekko .
*list box
DATA: name TYPE vrm_id ,
it_list TYPE vrm_values ,
wa_value LIKE LINE OF it_list .
DATA: BEGIN OF wa_temp_para,
lifnr TYPE ekko-lifnr,
name1 TYPE lfa1-name1,
matnr TYPE ekpo-matnr,
maktx TYPE makt-maktx,
END OF wa_temp_para.
DATA itab_temp_para LIKE TABLE OF wa_temp_para.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-012.(自己补充text-012的值)
PARAMETERS: i_lifnr TYPE ekko-lifnr
AS LISTBOX VISIBLE LENGTH 20
USER-COMMAND fuch.
SELECTION-SCREEN END OF LINE. "Vendor Name

SELECT DISTINCT lifnr INTO CORRESPONDING FIELDS OF TABLE itab_temp_para FROM ekko .
LOOP AT itab_temp_para INTO wa_temp_para .
wa_value-key = wa_temp_para-lifnr .
wa_value-text = wa_temp_para-lifnr .
APPEND wa_value to it_list .
ENDLOOP .
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'I_LIFNR'
values = it_list.

将查询的值输入内表中,在界面上显示。

第二种:这种情况是自己建的参数,跟第二种情况大同小异。可以自己建立一个data elements 将少数的值 加紧fixed value ,也可以建立一个内表
把值append到内表中,在list下拉菜单中显示。

TYPE-POOLS: VRM.
DATA: LNAME TYPE VRM_ID,
ILIST TYPE VRM_VALUES, "VRM_VALUES结构有两个字段:KEY(40) TYPE C,TEXT(80) TYPE C
LILIST LIKE LINE OF ILIST.
DATA: PS_T(10) TYPE C.

PARAMETERS: PS(10) AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN OUTPUT.

LNAME = 'PS'.
LILIST-KEY = '1'.
LILIST-TEXT = 'LINE 1'.
APPEND LILIST TO ILIST.

LILIST-KEY = '2'.
LILIST-TEXT = 'LINE 2'.
APPEND LILIST TO ILIST.

CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = LNAME
VALUES = ILIST.