Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Obsolete Language Elements →  Obsolete Processing of External Data →  Obsolete Database Access →  Obsolete Access Statements 

REFRESH itab FROM

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Obsolete Syntax

REFRESH itab FROM TABLE { dbtab | *dbtab }.

Effect

The variant of the statement REFRESH that is forbidden in classes initializes the internal table itab, reads several rows from the database table dbtab, and adds their contents to the internal table itab. The row contents are cast to the row type of the internal table. If the row type of the internal is too short, then it is truncated from the right.

For dbtab, you must specify a database table that begins with "T" and has a maximum length of five characters. For the database table dbtab, a table work area or an additional table work area must be declared using the statement TABLES. The internal table itab must be an index table. All components of the table work area that match the primary key fields of the database table dbtab must be character-type.

The lines to be read are determined by the content of the components of the table work area, which correspond with the primary key fields of the database table dbtab. The content of these components is taken, flush left, as a search key, and the system makes a generic search for suitable entries in the database table. The search key handles blanks as if they match all values.

If the database table does not match the specified naming conventions, then the statement's behavior is undefined.

System Fields

This statement always sets sy-subrc to 0.


Note

This form of the REFRESH statement must be replaced by the SELECT statement.

  • The obsolete access statements do not support automatic client handling. The client identifier of a database table must be specified explicitly. The application programs are only to work with data for the current client. In systems with multitenancy, this is checked by the ABAP runtime environment.


Example

Reads multiple ows from the database table T100 into an internal table itab.

TABLES t100.
DATA itab TYPE STANDARD TABLE OF t100.
t100-sprsl = 'E'.
t100-arbgb = 'BC'.
REFRESH itab FROM TABLE t100.

The Open SQL syntax to be used instead reads:

DATA itab TYPE STANDARD TABLE OF t100. 
SELECT * 
       FROM t100 
       INTO TABLE itab 
       WHERE sprsl = 'E' AND 
             arbgb LIKE 'BC%'. 

Exceptions


Non-Catchable Exceptions

  • Cause: No memory available to execute the statement.
    Runtime Error: REFRESH_NO_SHORT_MEMORY