ABAP Keyword Documentation → ABAP − Reference → Declarations → Declaration Statements → Classes and Interfaces → Components in Classes and Interfaces
Methods
Methods are declared using the statements
METHODS
for instance methods
CLASS-METHODS
for static methods
that only possible in the declaration part of classes and interfaces.
Methods determine the behavior of a class.
Instance methods are declared by the statement METHODS
.
Static methods are declared
by the statement CLASS-METHODS
. The declaration defines the interface of a method. For special tasks there are different types of methods:
- General instance methods and static methods
- Functional instance methods and static methods
The following methods are also available:
- Test methods of ABAP Unit, which can only be declared as instance methods.
- AMDP methods, which are implemented in a database-specific language and not in ABAP.
Other versions: 7.31 | 7.40 | 7.54