SELECT-OPTIONS - screen_options Syntax ... [OBLIGATORY|NO-DISPLAY] 必输|不显示用于SUBMIT [VISIBLE LENGTH vlen] 指定显示长度 [NO-EXTENSION] 不显示多值选择按钮 [NO INTERVALS] 不显示字段的HIGH条件
[MODIF> 用于修改屏幕(系统表SCREEN)
用了很久了,还不知道SELECT-OPTIONS的完整用法,惭愧……
今天仔细研读了一下SAP帮助,受益非浅呀!
以下为SAP帮助中对SELECT-OPTIONS的描述: Extras: 附加条件
1. ... OBLIGATORY
2. ... NO-DISPLAY
3. ... VISIBLE LENGTH vlen
4. ... NO-EXTENSION
5. ... NO INTERVALS
6. ... MODIF> Effect 作用
You can use these additions to declare the first input field as a required field, to suppress display on the selection screen, and to define the visible length. You can suppress display of the second input field and the pushbutton for multiple selection. All screen elements for the selection criterion can be assigned to a modification group.
你可以用这些附加项来声明首先输入的字段为必输字段,禁止显示在选择屏幕上,和定义显示长度。你可以禁止第二个输入字段和多先按钮显示在屏幕上。所有标准屏幕上的屏幕元素可以被分配给一个修改分组。 Note 注
In addition to the additions available, you can use the function module SELECT_OPTIONS_RESTRICT to restrict the number of selection options available and prohibit the value "E" for column sign in the selection table before the selection screen is sent.
除了这些可用的附加项之处,你可以屏幕生成之前使用函数组SELECT_OPTIONS_RESTRICT来禁止可用的选择条件的数量并且禁止选择表中的列SIGN被赋值“E”。 Addition 1 ... OBLIGATORY Effect 作用
This addition defines the first input field for the selection criterion on the selection screen as a required field. If this field is blank, the user cannot exit display of the selection screen using the Execute function (F8), but only using the functions Back, Exit, or Cancel.
这个选项定义了在选择屏幕上的标准选择的第一个输入字段作为必输字段。如果这个字段为空,用户就不能用运行函数(F8)来退出选择屏幕,只能使用Back, Exit, 或者 Cancel。 Addition 2 ... NO-DISPLAY Effect 作用
If you specify this addition, no screen elements are created on the selection screen for the selection criterion. In an executable program, a selection criterion of this type is used exclusively as part of the interface defined by the selection screen. It can be supplied with a value by the calling program when it is called with SUBMIT.
If the addition NO-DISPLAYis specified, the low and high columns in the selection table can have any flat data types. These selection tables can only be supplied with data with aWITH addition to the SUBMIT statement.
如果你指定了这个条件,就没有标准选择的屏幕元素在选择屏幕上生成。在一个可执行程序中,这种类型的标准选择唯一地被用来作为被选择屏幕定义的接口的一部分。它可以被一个通过SUBMIT调用的程序提供一个数值。如果NO-DISPLAY被指定了,选择表中的LOW和HIGH列可以使用任何扁平的数据类型。这些选择表只能在SUBMIT语句的WITH条件中被提供数据。 Note 注
The length of the values transferred to columns low and high in the selection table, for which there is no input field, is not restricted to 45 characters, as is the case for selection criteria with input fields.
传送给没有输入字段的选择表中的LOW和HIGH列的数值长度不限制在45个字符骨,这和有输入字段的选择条件相同。 Addition 3 ... VISIBLE LENGTH vlen Effect 作用
This addition defines a visible length of vlen for the input fields, where vlen must be specified directly as a positive number. If vlen is shorter than the length of columns low andhigh in the selection table and shorter than the maximum visible length, the input field is displayed at a length of vlen and the entry can be scrolled. Otherwise, the addition is ignored.
这个条件定义输入字段的可见长度为vlen,vlen必须被直接指定成一个正数。如果veln比选择表中的列LOW和HIGH的长度短,并且小于最大的可见长度,那么这个输入字段就以vlen的长度被显示出来并且输入值可以滚动。否则,这个条件将被忽略。 Addition 4 ... NO-EXTENSION Effect 作用
If you specify this addition, the pushbutton for multiple selection is not created on the selection screen.
如果你指定了这个条件,选择屏幕上的多选按钮将不会显示出来。 Note 注
The user cannot access the dialog box for multiple selection on the selection screen, which means they cannot edit selection tables containing several lines.
用户不能使用屏幕上的多选对话框,这意味着选择表不能包含多个单值行。 Addition 5 ... NO INTERVALS Effect 作用
If you specify this addition, the second input screen is not created on the selection screen.
如果你指定了这个条件,选择屏幕上的第二个输入框将不会生成。 Note 注
The user can only specify a single comparison in the first line in the selection table on the selection screen. The dialog box for multiple selections still allows interval selections.
用户只能为选择屏幕上的选择表在第一行指定单一值。多选对话框仍然充许多选。 Example 例子
Declaration of a selection criterion for which a single comparison is possible on the selection screen, but multiple selection isnot possible.
在选择屏幕上定义一个单一值可用的选择条件,并且多先框也被禁用。 DATA spfli_wa TYPE spfli.
SELECT-OPTIONS s_carrid FOR spfli_wa-carrid NO-EXTENSION
NO INTERVALS. Addition 6
... MODIF> Effect 作用
The addition MODIF> assigns all the screen elements for the selection criterion to the modification group modid that is assigned to column group1 in the system table screen. This means they can be modified with a MODIFY SCREEN statement before the selection screen is displayed. You must specify the name of the modification group modid directly and it can only contain a maximum of three characters.
MODIF> Note 注
The modification groups that are assigned to columns group2 and group3 in the system table screen are set by the system when a selection screen is generated and are described with the screen elements for a selection screen.
当一个选择屏幕生成时被指定给系统表SCREEN的列group2和group3的可修改组由系统设置并且被选择屏幕的屏幕元素所以识别。
http://www.cnblogs.com/clsoho/archive/2010/01/15/1648376.html