... col [NOT] IN seltab ...
This expression is true if the value of the column col is (not) in the result set described in the rows of the selection table seltab. Any internal table with a row type that corresponds to that of a selection table can be specified as the selection table seltab. This includes, in particular, ranges tables.
The selection table is evaluated in the same way as in logical expressions apart from the fact that in comparisons with the operators CP and NP the capitalization in the WHERE condition is taken into account whereas in other logical expressions it is not.
If the selection table is inital, the expression is true. If the selection table contains invalid values an untreatable exception occurs.
Reading of flights with a primary key that corresponds to the user entries on the selection screen.
DATA spfli_wa TYPE spfli.
SELECT-OPTIONS: s_carrid FOR spfli_wa-carrid NO INTERVALS
NO-EXTENSION,
s_connid FOR spfli_wa-connid NO INTERVALS
NO-EXTENSION.
SELECT SINGLE *
FROM spfli
INTO spfli_wa
WHERE carrid IN s_carrid AND
connid IN s_connid.