INCLUDE
ARTICLE
Cannot Use Field Symbols As Class Components
You cannot declare field symbols as components of classes in the
declaration part of the class definition. However, you can create local
field symbols within methods.
In the declaration part of the class, the following statement causes an
error message::
FIELD-SYMBOLS ...
Correct syntax:
DATA ... TYPE REF TO ...
or
ALIASES ...
Cause:
The only components allowed in classes are attributes, methods, and
events. Field symbols are symbolic names for other fields. They work by
means of value semantics . Their role
as pointers is now performed in ABAP Objects by reference variables.
Their role as symbolic names has now been replaced by aliases.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved