Entering content frame

Selection Screens and Logical Databases Locate the document in its SAP Library structure

The selection parts of logical databases contain statements for defining selection screens. The standard selection screen of an executable program that is linked to a logical database automatically contains the corresponding input fields. A particular feature that you can find on the selection screen of logical databases are the dynamic selections. Dynamic selections allow users to enter values for fields that are not part of the main selection screen of the logical database.

Static Selections in Logical Databases

The static selections of the logical database are defined in its selection part with the same ABAP statements as the program selections. The input fields for the logical database selections that actually appear on the screen depend on the nodes of the logical database that are specified in the program using the TABLESor NODES statement.

Example

The following program is linked to logical database F1S.

REPORT demo.

NODES spfli.

After demo has been started, the following selection screen is displayed:

This graphic is explained in the accompanying text

It contains input fields for selection criteria and parameters for the fields of database table SPFLI. The statements that define this screen (SELECT-OPTIONS and PARAMETERS) are contained in the selection part of the logical database.

Assume another program:

REPORT demo.

NODES sbook.

After demo has been started, the following selection screen is displayed:

This graphic is explained in the accompanying text

It not only contains the input fields of the selection criteria for database table SBOOK, but also the criteria for tables SPFLI and SFLIGHT.

The logical database uses its own selections to restrict the amount of data read from the database. You should make extensive use of the selection criteria provided by the logical database. You should only define program-specific selections if the selection criteria of the logical database are insufficient for your requirements. On the selection screen, the input fields for the program-specific selections appear below the selections for the logical database.

Dynamic Selections of Logical Databases

Logical databases allow the user to specify dynamic selections that are not defined in the selection part of the logical database.  The user accesses these selections by clicking Dynamic selections in the application toolbar of the selection screen. The system displays a new selection screen or a screen where the user can select the database fields that he or she wants to specify selection criteria for.

Example

For logical database F1S, the screen for dynamic selections might look as follows:

This graphic is explained in the accompanying text

Dynamic selections reduce the database accesses of logical database programs by means of dynamic statements. The use of dynamic selections must be coded in the logical database program (see Dynamic Selections in Database Programs).

If a logical database allows dynamic selections (Dynamic selections appears in the application toolbar), you can use the ABAP Workbench to define for which fields the user can define dynamic selections (a selection view). To find out which database tables offer dynamic selections, choose Tools ABAPDevelopment Workbench  DevelopmentProgramming environ. Logical databasesExtrasDynamic selections. On the next screen, the system displays a list of the names of these database tables.

Example

For logical database F1S, dynamic selections are only possible for database table SPFLI:

This graphic is explained in the accompanying text

 

 

 

Leaving content frame