The content of a class is composed of components. The components define the attributes of objects of a class. Each component is declared in the definition of the class in one of the four visibility areas that the interfaces define externally. Within a class, all its components are visible. All components are in the same namespace, which means that the names of all components in a class must be different.
The individual components are:
- Attributes
- Methods
- Events
- Types and Constants
SAP makes a distinction between components of this type that are available on an instance-dependent basis for every object, and components that are only available once in a class and are instance-independent. The instance-dependent components are called instance components, the instance-independent components are known as static components.
In ABAP Objects, classes can define the components listed above. Since all components that can be declared in classes can also be declared in interfaces, this description also applies for interfaces.
The components of classes can be accessed from inside, and depending on the visibility, also from outside the class. If they are accessed from externally, component selectors must be used for addressing.
No comments:
Post a Comment