SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
Cannot Use Obsolete READ Variants
In ABAP Objects, the following statement causes an error message:
READ TABLE itab.
Correct syntax:
READ TABLE itab FROM key INTO wa.
or
READ TABLE itab WITH KEY ... INTO wa.
Cause:
This variant uses an implicit key consisting of all the fields of the table header that
are not of numeric type (I, DECFLOAT16, DECFLOAT34, F, or P) and whose content is not space.
Declare the key explicitly instead. You could only ever use this variant with tables with a header.
In ABAP Objects, the following statement causes an error message:
READ TABLE itab WITH KEY key INTO wa.
Cause:
The key fields of a table must always be components of the line structure.
In ABAP Objects, the following statement causes an error message:
READ TABLE itab WITH KEY = key INTO wa.
Correct syntax:
READ TABLE itab WITH KEY table_line = key INTO wa.
Cause:
This variant is a special solution that lets you access the table with unstructured line types using a key. The introduction of the
pseudo-component
table_line, which can always be used instead of a key field, renders this variant superfluous.
In ABAP Objects, the following statement causes an error message:
READ TABLE itab INTO line WITH KEY col1 = ... col1 = ...
Correct syntax:
READ TABLE itab INTO line WITH KEY col1 = ...
Cause:
Only the last declaration is evaluated. Multiple declarations are unnecessary.