Ansicht
Dokumentation
ABENDEFINING_CLASSES_INTERFACES - DEFINING CLASSES INTERFACES
BAL Application Log Documentation Fill RESBD Structure from EBP Component StructureThis documentation is copyright by SAP AG.
- Statements for Defining Classes and Interfaces
These statements are used to define classes and interfaces and their components. They can be used in any ABAP program where classes and interfaces can be defined.
Statements for Defining Classes
Defining the Declaration Part
CLASS ... DEFINITION ...
...
ENDCLASS ...
Defining the Implementation Part
CLASS ... IMPLEMENTATION ...
...
ENDCLASS ...
Statements for Defining Components of Classes
Statements in the Declaration Part
PUBLIC SECTION.
PROTECTED SECTION.
PRIVATE SECTION.
TYPES ...
INTERFACES ...
ALIASES ...
CONSTANTS ...
CLASS-DATA ...
DATA ...
CLASS-METHODS ...
METHODS ...
CLASS-EVENTS ...
EVENTS ...
Statements in the Implementation Part
METHOD ...
...
ENDMETHOD.
Statements for Defining Interfaces
Declaring the Interface
INTERFACE ...
...
ENDINTERFACE ...
Statements for Declaring Components of Interfaces
The same statements can be used to declare components in interfaces as in the declaration part of classes.
Note
The components of classes or interfaces, that is, their attributes, methods, and events) are declared in their declaration parts. TYPES can also be used to declare local data types. ALIASES can be used to declare alias names for the components of implemented interfaces. In a class, all declarations must be assigned to one of the four visibility sections defined by the corresponding statements.
The implementation part of a class can only contain method implementations between METHOD - ENDMETHOD. In methods, only the statements for method implementations can be used.
No statements other than those specified above are necessary for defining classes or interfaces and therefore no other statements are allowed between CLASS - ENDCLASS or INTERFACE - ENDINTERFACE outside of methods.
The stricter syntax in ABAP Objects applies to all statements for class and interface definitions.
CPI1466 during Backup Vendor Master (General Section)
This documentation is copyright by SAP AG.
Length: 2841 Date: 20240424 Time: 181932 sap01-206 ( 46 ms )