Get Example source ABAP code based on a different SAP table
ID REFRESH • REFRESH FROM TABLE ABAP Statement
REFRESH itab FROM> Short Reference >
ABAP_SYNTAX_OBS REFRESH itab FROM TABLE ${ dbtab $| *dbtab$}.>
What does it do? The variant of the statement REFRESH>, which is forbidden in classes, initializes the internal table itab>, reads multiple rows from a database table or DDIC table view> dbtab>, and appends their content to the internal table itab >. The row content is cast to the line type of the internal table. If the line type of the internal table is too short, it is truncated on the right. dbtab> expects a database table or a DDIC table view> that starts 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 left-aligned 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.
Latest notes:
This form of the REFRESH> statement must be replaced by the SELECT>> statement.