Get Example source ABAP code based on a different SAP table
ARTICLE • IN ABAP_RELAT_EXPR • NOT IN ABAP_RELAT_EXPR
rel_exp - Table-Like Relational Operator IN
Syntax ABAP_KEY ... operand [NOT] IN seltab ...
Effect In a comparison expression with relational operator IN, the conditions of a selection table or a table with this layout are checked, that is whether an operand operand meets the conditions of the rows in the selection table or, with addition NOT, does not meet them. The table-like comparison expression is equivalent to a join using binary or ternary comparison expressions whose number is determined by the number of rows in the internal table. As a selection table seltab, any internal table can be specified whose row type matches that of a selection table, or a functional method with the corresponding type of return value. This includes, in particular, ranges tables. The selection table can be of any table category. For the layout of a selection table, refer to section SELECT-OPTIONS. The evaluation of a selection table requires the table to contain the valid values specified in that section in the columns sign and option. If the selection table contains invalid values, an exception that cannot be handled is raised. If the selection table is initial, the comparison expression is always true. Each row in a non-initial selection table is included in the join using one of the following comparison expressions. Depending on the operator in the column option, this involves a comparison between two operands using a binary relational operator or the delimitation of an interval using the ternary operator BETWEEN.