ABAPCHECK_SELECT-OPTIONS - CHECK SELECT-OPTIONS
General Data in Customer Master CL_GUI_FRONTEND_SERVICES - Frontend ServicesThis documentation is copyright by SAP AG.
CHECK SELECT-OPTIONS
Syntax
CHECK SELECT-OPTIONS.
Effect
This form of the statement CHECKfor exiting processing blocks is only intended for use in executable programs that are associated using alogical database, and then only in the event blocks for thereportingevents 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 fulfills the conditions in allselectiontables that are associated with the current node of the logical database. The name of the node is copied statically from the next highest GET statement in the program. The following restrictions apply:
- The statement CHECK SELECT-OPTIONS can only be used when the type of the current node of the logical database is a database table.
- If the node is to be used for dynamic selections, the statement evaluates only those selection criteriathat have been declared with 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 withina loop, then the GET event block is exited and the runtime environment behaves as with the othervariant of CHECKused 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 CHECK SELECT-OPTIONS statement should not be used within a loop since it otherwise only exits the current loop pass.
- If logical databases are no longer used, then you no longer need to use this variant of the statement CHECK either.
Example
Exiting a GET event block if the content of the components seatsmax and seatsoccof the interface work area sflight do not fulfill the conditions in the selection tables s_max or s_occ.
NODES sflight.
SELECT-OPTIONS: s_max FOR sflight-seatsmax,
s_occ FOR sflight-seatsocc.
GET sflight.
WRITE: / sflight-carrid, sflight-connid.
CHECK SELECT-OPTIONS.
WRITE: sflight-seatsmax, sflight-seatsocc.
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 storage area that has not been created
Runtime Error: CHECK_ADDR_NOT_ALLOC
rdisp/max_wprun_time - Maximum work process run time TXBHW - Original Tax Base Amount in Local Currency
This documentation is copyright by SAP AG.
Length: 4676 Date: 20120518 Time: 203459 triton ( 134 ms )






