In ABAP Objects, the following statements cause an error message:
t100 = space.
t100-sprsl
= 'D'.
t100-arbgb = 'BC'.
t100-msgnr = '100'.
READ TABLE t100.
Correct syntax:
DATA wa TYPE t100.
SELECT
SINGLE * FROM t100 INTO wa WHERE sprsl = 'D' AND
arbgb
= 'BC' AND
msgnr = '100'.
Cause:
The Open-SQL statement SELECT has replaced
READ TABLE. The latter works only with database tables
whose names correspond to the naming conventions for R/2-ATAB tables (maximum of 5 characters, starting
with T) and with table work areas declared using TABLES
, which are not supported in ABAP Objects. Generic key values are used for accesses, which are taken
from the filled area of the table work area from left to right. Instead, declare the key explicitly
in the WHERE clause of the SELECT statement.
Overview:
Replacement for Obsolete Statements ABAP Objects