语法如下. 实际上就是从内表读取1行.
Syntax
READ TABLE itab { table_key
| free_key
| index } result.
Effect
This statement reads a row from the internal table itab. itab is a functional operand position.
The row must be specified by naming values for either table_key for a table key, a free condition free_key, or an index index. The latter is possible only for index tables and when using a sorted secondary key. The output response result determines how and to where the row contents are read.
If the row to be read is not specified uniquely, the first suitable row is read. In the case of index tables, this row has the lowest row number of all suitable rows in the table index used.
If the internal table is specified as the return value or result of a functional method, a constructor expression, or a table expression, the value is only available when the statement is executed. Afterwards, it is no longer possible to access the internal table.
Example
READ TABLE itb_cwms_in INTO wa_cwms_in WITH KEY matnr = gw_ekpo-matnr .
Summary
Don’t add table key