SAP CLASS ATTRIBUTES
Get Example source ABAP code based on a different SAP table
ABAP_OBJ - Attributes of Classes
Attributes are internal data objects of a class of any ABAP data type. The content of the attributes determines the state of the object. Reference variables can also be defined, which can then be used to create and address objects. This allows objects to be accessed within classes.
Attributes are defined in the declaration part of a class. Public attributes are visible from outside the class without restrictions and as such are part of the interface between objects and their users. To encapsulate the state of the object, protected, package-visible, or private attributes must be used. In addition to the visibility, the modifiability of non-private attributes can also be restricted using the addition
ITOC
Instance Attributes
The content of instance attributes represents the instance-dependent state of the object. Instance attributes are declared using the
Latest notes:
NON_V5_HINTS
ABAP_HINT_END
ABAP_EXAMPLE_VX5
Referring to an instance attribute behind
ABEXA 00559
ABAP_EXAMPLE_END
Static Attributes
The content of static attributes represents the instance-independent state of the class that is valid for all instances. Static attributes exist once for each class. They are declared using the statement
Data Types of Attributes
The data types of all attributes, including instance attributes and, in particular,
ABAP_EXAMPLE_VX5
Reference to the data type of an instance attribute
ABAP_EXAMPLE_END
Boxed Components
Like substructures of nested structures, attributes declared as structures can be declared as