sapdev logo background
sapdev logo sapdev logo
Comments

SAP OO OBS FS 1 documentation, setup help and example usage



Return to SAP documentation index


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




    OO_OBS_FORMAT_1
    OO_OBS_HEADER_LINE_1




    comments powered by Disqus