Start of Content Area

Procedure documentation Maintaining Selection Conditions of Views  Locate the document in its SAP Library structure

Once you have defined the base tables and fields of the view, you can restrict the set of data records that can be selected with the view by defining a selection condition (see Join, Projection and Selection).

Procedure

  1. You can enter a condition having the following form in each line of the Selection conditions tab page:
  2. Table, Field name, Operator, Comparison value, AND/OR

  3. The entries have the following meaning:
  4. Table: Name of the base table from which the field was taken.

    Field name: Name of the field for which the selection condition was formulated.

    Operator: Operator for comparing the field contents and comparison value. You can find the valid operators with the F4 help.

    Comparison value: Constant value with which the field value is compared. Text literals, which must be enclosed in apostrophes, and numbers are permitted as comparison values, depending on the data type of the field.

    AND/OR: Link between two lines of the selection condition.

    You can enter the fields for which you want to define selection conditions directly or copy them with Table fields.

  5. If you enter more than one selection condition, you must link them with AND or OR.
  6. OR operations are only possible between lines referring to the same field. Note that OR takes priority over AND. The condition <COND1> AND <COND2> OR <COND3> is therefore interpreted as <COND1> AND (<COND2> OR <COND3>).

  7. Save your entries for the selection condition(s).

Note

You can formulate selection conditions for all the fields of the table contained in the view. It is not important whether or not these fields were included in the view.

Note

If you attach a table to your text table using a maintenance view you need no selection condition in the form text field = SY-LANGU since the system derives this restriction directly from the text foreign key.