Entering content frameSelection Tables in GET Events Locate the document in its SAP Library structure

When database tables are read using logical databases, you can use a special variant of the CHECK statement in the event blocks for GET events.

CHECK SELECT-OPTIONS.

The statement checks if the contents of the interface work area that has been filled by the logical database for the current GET event, meets the conditions in all selection tables that are linked to the database table read.

This variant of the CHECK statement only works in conjunction with selection criteria that are linked to database tables, and should only be used for GET events.

Since the CHECK statement cannot be used until after a row has been read by the logical database, you should use this variant only if the selections provided by the logical database are not sufficient to meet your requirements, and the relevant table is not designated for dynamic selections.

Example

The following program is linked to logical database F1S.

REPORT DEMO.

NODES: SPFLI,SFLIGHT.

SELECT-OPTIONS: MAX FOR SFLIGHT-SEATSMAX,
OCC FOR SFLIGHT-SEATSOCC.

GET SFLIGHT.
   WRITE: / SPFLI-CARRID, SPFLI-CONNID.
   CHECK SELECT-OPTIONS.
   WRITE: SFLIGHT-SEATSMAX, SFLIGHT-SEATSOCC.

After the program has been started, the selection screen appears, on which the user might fill the input fields as follows:

This graphic is explained in the accompanying text

The list output appears as follows:

This graphic is explained in the accompanying text

The system reads all rows from SFLIGHT that meet the selection criteria of the logical database. If these contents do not meet the selection criteria MAX and OCC defined in the program, the system leaves the GET event before writing the contents of SEATSMAX and SEATSOCC onto the screen.

 

 

 

 

Leaving content frame