Ansicht
Dokumentation

ABAPCHECK_SELECT-OPTIONS - CHECK SELECT-OPTIONS

ABAPCHECK_SELECT-OPTIONS - CHECK SELECT-OPTIONS

PERFORM Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

CHECK SELECT-OPTIONS

Short Reference



CHECK SELECT-OPTIONS.

Effect

This form of the statement CHECK for exiting processing blocks is only intended for use in executable programs that are linked with a logical database, and then only in the event blocks for the reporting events GET. It must not be used in methods.

The statement checks whether the content of the interface work area that was filled for the current GET event by the logical database meets the conditions in all selection tables that are linked with the current node of the logical database. The name of the node is taken statically from the next highest GET statement in the program. The following restrictions apply:

  • The statement CHECK SELECT-OPTIONS is only effective when the type of the current node of the logical database is a DDIC database table.
  • If the node is intended for dynamic selections, the statement evaluates only those selection criteria that were declared using the NO DATABASE SELECTION addition of the SELECT-OPTIONS statement.

If the conditions in one of the selection tables are not met, and the statement is not listed within a loop, the GET event block is exited and the runtime framework behaves as with the other variant of CHECK used for exiting processing blocks. If the statement is listed within a loop, then only the current loop pass is exited.

Notes

  • For performance reasons, the CHECK statement should only be used to check data selections during GET events if the selections provided by the logical database are not sufficient.
  • The statement CHECK SELECT-OPTIONS should not be used within a loop, since it otherwise only exits the current loop pass.
  • If logical databases are no longer used, it is no longer necessary to use this variant of the statement CHECK.

Example

Exiting a GET event block if the content of the components seatsmax and seatsocc of the interface work area sflight do not meet the conditions in the selection tables s_max or s_occ. Before the program can be processed, it must be linked with the logical database F1S.

Exceptions

Non-Catchable Exceptions

  • Cause: Incorrect OPTION in the SELECT-OPTIONS table or the RANGES table
    Runtime Error: CHECK_SELOPT_ILLEGAL_OPTION
  • Cause: Incorrect SIGN in the SELECT-OPTIONS table or the RANGES table
    Runtime Error: CHECK_SELOPT_ILLEGAL_SIGN
  • Cause: Access to a nonexistent memory area
    Runtime Error: CHECK_ADDR_NOT_ALLOC






CL_GUI_FRONTEND_SERVICES - Frontend Services   General Material Data  
This documentation is copyright by SAP AG.

Length: 4192 Date: 20240616 Time: 110145     sap01-206 ( 67 ms )