Ansicht
Dokumentation
ABENOO_DIFFERENCES_CLASS_LIB_SYNT - OO DIFFERENCES CLASS LIB SYNT
BAL_S_LOG - Application Log: Log header data BAL_S_LOG - Application Log: Log header dataThis documentation is copyright by SAP AG.
Statements for Defining Classes and Interfaces
The following statements are used to define classes and interfaces and their components. They can be used in any ABAP program where class and interface definitions are allowed.
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 both components in interfaces as in the declaration part of classes.
Note
The components of classes or interfaces (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 belong to one of the four visibility sections introduced by the relevant statements.
The implementation part of a class can only contain method implementations between METHOD - ENDMETHOD blocks. 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. Consequently, no other statements are allowed between CLASS - ENDCLASS or INTERFACE - ENDINTERFACE, except in methods.
The stricter syntax in ABAP Objects applies to all class and interface definitions.
PERFORM Short Reference BAL_S_LOG - Application Log: Log header data
This documentation is copyright by SAP AG.
Length: 2843 Date: 20240423 Time: 115100 sap01-206 ( 51 ms )