ABAP Keyword Documentation → ABAP − Reference → Obsolete Language Elements → Obsolete Processing of External Data → Obsolete Database Access → Obsolete Access Statements
REFRESH itab FROM
Other versions: 7.31 | 7.40 | 7.54
Obsolete Syntax
REFRESH itab FROM TABLE { dbtab | *dbtab}.
Effect
The variant of the statement REFRESH
, which is forbidden in classes, initializes the internal table itab
, reads multiple rows from a database table or
classic view 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 table is too short, it is truncated from the right.
dbtab
expects a database table or
classic view that begins with "T" and has a maximum length of five characters. For the database table or view 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 or view dbtab
must be character-like.
The rows 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 or view 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 or view. The search key handles blanks as if they match all values.
If the database table or view does not match the specified naming conventions, the behavior of the statement is undefined.
System Fields
This statement always sets sy-subrc
to 0.
Notes
-
This form of the
REFRESH
statement must be replaced by theSELECT
statement. -
Obsolete access statements do not support implicit client handling. The
client ID of a database table must be specified explicitly. Note that application programs should only use data from the current client.
Example
Reads multiple rows 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 ABAP SQL syntax to be used instead reads:
DATA itab TYPE STANDARD TABLE OF t100.
SELECT *
FROM t100
WHERE sprsl = 'E' AND
arbgb LIKE 'BC%'
INTO TABLE @itab.
Exceptions
Non-Handleable Exceptions
-
Cause: No memory available to execute the statement.
Runtime error:REFRESH_NO_SHORT_MEMORY