SELECT-OPTIONS的用法

SELECT-OPTIONS - screen_options

Syntax

... [OBLIGATORY|NO-DISPLAY]      必輸|不顯示用於SUBMIT
    [VISIBLE LENGTH vlen]          指定顯示長度
    [NO-EXTENSION]                         不顯示多值選擇按鈕
    [NO INTERVALS]                            不顯示字段的HIGH條件
    [MODIF ID modid] ... .              用於修改屏幕(系統表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 ID modid

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-DISPLAY is 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 a WITH 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 and high 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 ID modid

Effect 作用

The addition MODIF ID 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 ID選項爲選擇條件的所有屏幕元素指定到MODID可修改組,這個修改組被分配給屏幕表SCREEN的group1列。這就意味着它們可以在選擇屏幕顯示之前被MODIFY SCREEN語句修改。你必須直接指定可修改組modid的名字並且它最多隻能包含三個字符。

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的可修改組由系統設置並且被選擇屏幕的屏幕元素所以識別。


作者:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章