Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Obsolete Language Elements →  Obsolete Program Flow →  Obsolete Logical Expressions 

log_exp - IN, Short Form

Other versions: 7.31 | 7.40 | 7.54

Obsolete Syntax

... seltab ...

Effect

This logical expression has the same effect as

... operand IN seltab ....

For this short form to be used, operand must be the data object for which selection table seltab was declared with

SELECT-OPTIONS seltab FOR operand, whereby the operand data object must be specified statically. The short form cannot be used for selection tables that were not generated with the SELECT-OPTIONS statement.


Note

If this short form is used, the readability of the program is affected. This especially applies if the short form is used in processing blocks that are not executed in direct proximity to the declaration of the selection table.


Example

Maintain selection table s_number and evaluate with the short form of number IN s_number. The numbers 5, 7, and 9 are output.

DATA number TYPE i. 

SELECT-OPTIONS s_number FOR number NO-DISPLAY. 

s_number-sign   = 'I'. 
s_number-option = 'EQ'. 
s_number-low    = 9. 
APPEND s_number TO s_number. 

s_number-sign   = 'I'. 
s_number-option = 'BT'. 
s_number-low    = 3. 
s_number-high   = 7. 
APPEND s_number TO s_number. 

s_number-sign   = 'E'. 
s_number-option = 'EQ'. 
s_number-low    = 6. 
APPEND s_number TO s_number. 

s_number-sign   = 'E'. 
s_number-option = 'BT'. 
s_number-low    = 1. 
s_number-high   = 4. 
APPEND s_number TO s_number. 

DO 10 TIMES. 
  number = sy-index. 
  IF s_number. 
    WRITE / sy-index. 
  ENDIF. 
ENDDO.