ABAPDATA_RANGES - DATA RANGES

Vendor Master (General Section)   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

DATA - RANGE OF

Short Reference



Syntax

DATA rtab {TYPE RANGE OF type}|{LIKE RANGE OF dobj}
          [INITIAL SIZE n]
          [VALUE IS INITIAL]
          [READ-ONLY].

Effect

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

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

Notes

Outside of classes, you can also use the addition WITH HEADER LINE to declare an obsoleteheader line

The declaration of a ranges table with the statement RANGES is obsolete.

Example

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

DATA: spfli_wa TYPE spfli,
      r_carrid TYPE RANGE OF spfli-carrid,
      r_carrid_line LIKE LINE OF r_carrid.

r_carrid_line-sign   = 'I'.
r_carrid_line-option = 'BT'.
r_carrid_line-low    = 'AA'.
r_carrid_line-high   = 'LH'.
APPEND r_carrid_line TO r_carrid.

SELECT *
       FROM spfli
       INTO spfli_wa
       WHERE carrid IN r_carrid.
  ...
ENDSELECT.




General Data in Customer Master   ABAP Short Reference  
This documentation is copyright by SAP AG.


Length: 3126 Date: 20120522 Time: 044135     triton ( 83 ms )