Get Example source ABAP code based on a different SAP table
ABAP Code Snippet ARTICLE
Do Not Use *Work Area The use of *work areas as an indicator for database tables or work areas in ABAP Objects is forbidden.
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.
Reason:
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.