Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing External Data →  ABAP - Database Accesses →  Open SQL →  Open SQL - Read Accesses →  SELECT →  SELECT - cond →  WHERE - sql_cond 

sql_cond - IN

Other versions: 7.31 | 7.40 | 7.54


... col [NOT] IN (dobj1, dobj2 ... ) ...


This expression is true if the value of the column col matches (does not match) the contents of the data object in the value list. The value list is specified as a list of elementary objects in parentheses and separated by commas dobj1, dobj2 ....


Reading the bookings in which the class does not lie in the value range (C - Business, F - First, Y - Economy) of the corresponding domain in the ABAP Dictionary.

DATA sbook_tab TYPE TABLE OF sbook. 

       FROM sbook 
       INTO TABLE sbook_tab 
       WHERE class NOT IN ('C','F','Y'). 

IF sy-subrc = 0. 
  "Error handling