Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Declarations →  Declaration Statements →  Data Types and Data Objects →  Declaring Data Objects →  DATA 


Quick Reference

Other versions: 7.31 | 7.40 | 7.54


DATA range_tab {TYPE RANGE OF type}|{LIKE RANGE OFdobj} 
               [INITIAL SIZE n]
               [VALUE IS INITIAL]


This statement defines a ranges table range_tab with the table type described in the section TYPES - RANGE OF. The table type defined here, however, is not a standalone type, but exists as a property of the data object range_tab.

The addition VALUE IS INITIAL can be used to specify an initial start value.


  • Outside of classes, the addition WITH HEADER LINE can also be used to declare an obsolete header line.
  • The declaration of a ranges table using the statement RANGES is obsolete.


In this example, a ranges table is declared, filled, and evaluated in the WHERE condition of a SELECT statement.

DATA carrid_range TYPE RANGE OF spfli-carrid. 

carrid_range = VALUE #( 
  ( sign = 'I' option = 'BT' low = 'AA' high = 'LH') ). 

       FROM spfli 
       WHERE carrid IN @carrid_range 
       INTO TABLE @DATA(spfli_tab).