CLASS - DEFINITION
CLASS class DEFINITION [class_options].
The statement block
CLASS class DEFINITION - ENDCLASS declares a class named
Naming conventions apply to the name
of the class are declared between
ENDCLASS. Each component must be included in a
after one of the statements
PUBLIC SECTION, PROTECTED
PRIVATE SECTION. These statements must be listed in the above order. The class does not need to include all the
class options additions
of the statement
CLASS can be used to publish a class globally in the Class Library, define an inheritance relationship, make the class abstract or final, control where the class can be instantiated, and offer
friendship to other classes or interfaces.
- The class is the smallest encapsulation unit in ABAP Objects. A method can therefore use all components of all instances of the same class apart from the components of its own instance. An exception to this rule are subclasses that cannot access the private components of superclasses, if they are not their friends.
The declaration part of a class can only be specifed in the context described under