Show TOC

Naming Conventions for Memory ObjectsLocate this document in the navigation structure

Use

Anonymous memory objects are objects that are accessed in the ABAP program indirectly through a reference, not directly through their names. They include:

  • Strings

  • Internal Tables

  • Class instances (objects)

  • Anonymous Data Objects

Note

Value semantics apply to strings and internal tables so that it will suffice to enter the variable name in order to process its data content. Names for describing anonymous data objects are necessary here so that each storage object has a unique identification. If you have string sharing, for example, these names are important since several string variables can point to the same storage address

On the other hand, in the case of class instances created with the CREATE OBJECT and anonymous data objects created with the CREATE DATA statement, only their references in the program can be addressed. Here reference semantics apply since the objects need to be de-referenced first in order to be able to access the data of the object concerned.

Anonymous memory objects cannot be accessed directly in the program but instead in the Debugger and other analysis tools when using relevant memory object names.

Naming Conventions for Memory Object Names

The following naming convention applies to memory object names.

As a rule, the names of memory objects are enclosed in curly brackets. They contain an abbreviation, together with a colon and the internal identification.

  • The following notation rules apply to the abbreviations:

    Abbreviation

    Storage Object

    S

    Strings

    T

    Internal Tables

    O

    Class instances

    A

    Anonymous Data Objects

    C

    Class

  • The following notation rules apply to the internal names:

    • The internal names are in the form <x> or <x>.<y>. for strings, internal tables, class instances, and anonymous data objects. <x> stands for the object identification used internally and <y> for the identification of the internal Shared Objects version.

    • You can enter an exclamation mark and the name of a superclass for class instances to ensure that the object is displayed from the view of this superclass.

    • Enter the class name instead of the identification for classes.

  • You can also enter an asterisk as well as the internal identification (or class name) which stand for a comment or additional information that cannot be interpreted.

Example

In the following table you can find examples of valid memory object names.

Name

Explanation

{S:1}

String with internal identification 1

{S:1.3}

String with internal identification 1 and internal Shared Objects version

{O:3*\CLASS=MY_CLASS}

Instance of my_class class with nternal identification 3

{O:1!MY_SUPER_CLASS}-ATTR

Attribute attr of instance with internal identification 1 from the view of the my_super_class superclass

{C:MY_CLASS}-ATTR

Class attribute attr of my_class class