Object Oriented ABAP method redefinition and super keyword

For scenarios where subclass has to change the implementation of the inherited instance method to have its own implementation, we can use method redefinition. Method redefinition supports only re-implementation of inherited method, signature of the method cannot be changed. Also, the visibility of the redefined method should remain the same as in the parent class. …

Object Oriented ABAP method redefinition and super keyword Read More »

Object Oriented ABAP Inheritance Implementation in Local Class

Inheritance is used to derive a new class from an existing class. New class is called child class, subclass or derived class. Existing class is called parent class or superclass. The subclass inherits all the components of the superclass defined under PUBLIC and PROTECTED section, but not under PRIVATE section. Subclass components can access the …

Object Oriented ABAP Inheritance Implementation in Local Class Read More »

Object Oriented ABAP Generalization, Specialization and Inheritance

Inheritance is an important concept of Object-Oriented programming. But, to really understand the importance of inheritance, you need to first understand the concept of Generalization and Specialization. Inheritance The general concept of Inheritance is : a class ( known as subclass ) inherits another class ( known as superclass ). In Inheritance, the subclass inherits …

Object Oriented ABAP Generalization, Specialization and Inheritance Read More »

Object Oriented ABAP Static Constructor in Local Class

Similar to instance constructor, static constructor is a special method called by the system runtime when the class is accessed for the first time during that program. How to define static constructor? Static constructor is basically a static method. To define a static constructor, In the ABAP Class definition, create a method with name CLASS_CONSTRUCTOR …

Object Oriented ABAP Static Constructor in Local Class Read More »