REFRESH itab FROM TABLE dbtab.
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, the name of a database table that begins with "T" and covers five characters, at most, must be specified. For the database table dbtab, a table work area must be declared using the statement TABLES. The internal table itab must be an index table.
Which rows are read is determined by the content of the components in the table work area. These are contents that match 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. Blanks in the search key are treated as if they matched all values.
If the database table does not match the specified naming conventions, then the statement's behavior is undefined.
System fields
The statement always sets sy-subrc to 0.
Reading several 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 Open SQL syntax to be used instead is:
DATA itab TYPE STANDARD TABLE OF t100.
SELECT *
FROM t100
INTO TABLE itab
WHERE sprsl = 'E' AND
arbgb LIKE 'BC%'.