Show TOC

Creating SelectionsLocate this document in the navigation structure


All queries have a selection screen that is called when a query is run. With the entries he or she makes on this selection screen, the user determines which data should be read from the dataset. As described in Executing Queries Online selection screens are divided into several parts. In the case of InfoSets associated with logical databases, part of the selection possibilities on the screen are determined by the logical database. Another portion of what appears on the selection screen can be determined when defining the query (see Extending the Selection Criteria) or is automatically retrieved for you. In addition to these two possibilities, you can also define additional selection fields (parameters and selection criteria) in an InfoSet. These selection fields appear on the selection screens of all queries created using the InfoSet and form a set of standard selection fields for these queries.


When using InfoSets associated with logical databases, you should check to see if the logical database's dynamic selections can be used for selections of this sort, seeing as they are a much more efficient way of selecting data. When using InfoSets without an underlying database (see Creating and Changing InfoSets without an Underlying Database), selection fields defined for a InfoSets are the only way to provide standard selections.

To define or change selection fields for a particular InfoSet, call up Selections on the functional group creation screen. A window is displayed containing all selection fields for the InfoSet.

This window contains the sequence number, the names of the selections and a checkbox respectively, in order to determine whether the selection is to appear on the selection screen of the InfoSet query.

In the case of InfoSets associated with logical databases, all selections for that logical database are also displayed. You cannot change these selections.

The window's first column contains a number. This number determines the order in which the code for each individual selection field will appear on the selection screen. This number only affects those selection fields that have been defined using the InfoSet. These are displayed on the selection screen after selection fields from the logical database and before all query specific selection fields.


If two selection fields have the same sequence number, then the order they appear in on the selection screen is uncertain.

This window also allows you to Create, Change, or Delete selection fields. When using Change and Delete, you must place your cursor on the appropriate selection field entry. You can also trigger the Change function with a double-click.

For every selection that is defined in the InfoSet or retrievd by the logical database, you can make a code for the time AT SELECTION-SCREEN to carry out checks. For this, the cursor must be placed on a selection, and then the function Check Code for Element should be called.

Coding at the AT SELECTION-SCREEN has to be decided upon separately for each selection. When generating a query report, you ensure that the check coding for all selections is grouped together at a joint time AT SELECTION-SCREEN.

Parameters which are defined for an InfoSet belong to every query in the InfoSet. They are, however, not fields which you can assign to a logical database table. For this reason, they cannot appear as fields in a query list.

You can use parameters in InfoSets wherever ABAP code occurs, that is in any of the following situations:

  • when specifying values for the key fields of linked additional tables

  • the code of additional fields

  • the code for the events GET/GET LATE

  • the code for the events START/END

Parameters are not associated with particular logical database tables.

As with parameters, selection criteria defined for an InfoSet belong to every query of that InfoSet and appear on the selection screen.

You can use selection criteria wherever ABAP code occurs, for example, in any of the following:

  • the code of additional fields

  • the code for the events GET/GET LATE

  • the code for the events START/END


    Selection fields must always be backed up by ABAP code to ensure that they function properly.

More Information

For more information, see the following explanations of parameters and selection criteria.