In ABAP Objects, the following statements cause an error message:
SELECT ... FROM *dbtab INTO ...
INSERT *dbtab.
UPDATE *dbtab.
DELETE *dbtab.
MODIFY *dbtab.
Correct syntax:
DATA wa TYPE dbtab.
SELECT ... FROM dbtab INTO
wa.
INSERT dbtab FROM wa.
or
INSERT INTO dbtab VALUES
wa.
UPDATE dbtab FROM wa.
or
UPDATE dbtab SET ...
.
DELETE dbtab FROM wa.
or
DELETE FROM dbtab WHERE ...
MODIFY dbtab FROM wa.
Cause:
The DATA statement, used to declare appropriately
typed work areas, replaced the declaration of *work areas. You can only declare *work areas using the
TABLES statement, which is not supported in ABAP Objects.
You can only use *work areas in the short forms of Open-SQL statements, which are also not supported.
Overview:
Replacement for Obsolete Statements ABAP Objects