Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Declarations →  Declaration Statements →  Classes and Interfaces →  ABAP Objects - Overview →  Inheritance 

Abstract and Final Methods and Classes

Other versions: 7.31 | 7.40 | 7.54

ABSTRACTFINAL

Abstract methods are declared in abstract classes and cannot be implemented in the same class. They must first be implemented in a subclass of the inheritance tree. Abstract classes cannot, therefore, be instantiated. A non-abstract method is a concrete method. With the exception of the instance constructor, concrete instance methods of a class can also call their abstract methods.

Final methods can no longer be redefined in subclasses. They cannot have any additional subclasses and close an inheritance tree definitively.


Notes

  • In classes that are both abstract and final, only the static components can be used. Although instance components can be declared, they cannot be used. Specifying ABSTRACT and FINAL together, therefore, is useful only for static classes.

  • Private methods cannot be redefined and can therefore not be abstract.