如何在列表框中设置值?
我在选择屏幕中定义了一个列表框,如下所示:
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE ALTITLE1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (30) ALCONT4 FOR FIELD L1.
PARAMETERS: L1 AS LISTBOX VISIBLE LENGTH 20 MODIF ID AOD.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
现在我需要为该列表框提出可能的值,我该怎么做?
I have defined a list box in my selection screen, as follows:
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE ALTITLE1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (30) ALCONT4 FOR FIELD L1.
PARAMETERS: L1 AS LISTBOX VISIBLE LENGTH 20 MODIF ID AOD.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
Now I need to propose possible values for that list box, how can I do it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在屏幕的 PBO 期间(对于选择屏幕,PBO 代码在事件块内定义
在选择屏幕OUTPUT
),您必须调用功能模块VRM_SET_VALUES
,传递字段名称和值列表。执行:
可以通过将条目传输到中间内部表来从国家/地区数据库表
T005T
获得相同的结果:有关信息,您 可以在 SAP 库中找到更多信息(解释对所有类型的屏幕都有效,示例仅适用于经典屏幕,但它们可以轻松适应选择屏幕):http://help.sap.com/saphelp_470/helpdata/en/9f/dbabe435c111d1829f0000e829fbfe/frameset.htm
During the PBO of your screen (for selection screens, the PBO code is defined inside the event block
AT SELECTION-SCREEN OUTPUT
), you must call the function moduleVRM_SET_VALUES
, passing the name of the field and a list of values.Execution:
For information, you can achieve the same result from the database table of countries
T005T
, by transferring the entries to an intermediate internal table:You may find more information in the SAP Library (the explanations are valid for all kind of screens, the examples are only for classic screens but they may be adapted easily to selection screens): http://help.sap.com/saphelp_470/helpdata/en/9f/dbabe435c111d1829f0000e829fbfe/frameset.htm