ABAP Keyword Documentation → ABAP − Reference → Declarations → Declaration Statements → Classes and Interfaces → CLASS → CLASS - DEFINITION
CLASS - components
The components of the classes are defined in the
visibility sections. The following declaration statements are possible for
CONSTANTSfor data types and data objects
CLASS-EVENTSfor methods and events
INTERFACESfor implementing interfaces and
ALIASESfor alias names for interface components
Other versions: 7.31 | 7.40 | 7.54
All the components in a class are in the same namespace. Within a class, the name of a component must
be unique to its type (data type, attribute, method, event, or alias name). The components of an implemented
interface are marked with the prefix
intf~ (the name of the interface with interface component selector).
Declaration of various components in the public and private visibility area of a class.
CLASS cls DEFINITION.
factory RETURNING VALUE(ref) TYPE REF TO cls.
attr TYPE ...