Inheritance in SAP OOABAP

What is inheritance in SAP Classes, uses of inheritance, properties of inheritance in SAP OOABAP

+ -

What is Inheritance in SAP OOABAP ?

Inheritance is the concept of passing the behavior of one class to another class.

You can use an existing class to derive a new class.

Derived class inherits the data and methods of a super class.

However they can overwrite the existing methods also add new code. Advantage of this property is re-usability.

This means we can add additional features to an existing class without modifying it.

SUPER is the keyword used to represent the super class in oops, you can access the methods and attributes the super class using this word super.

REDIFINATION is the keyword which is used to overwrite the parent class methods with new definition.

NOTE: In Object Oriented ABAP we have only single inheritance. There is no multiple inheritance.

Inheritance in general

Super Class Is a main class by using this we can derive a new class which will be called as Child class.

Final Class is a class which can not be used for inheritance, it is a class property (check box under properties of class).

Final class in SAP Classes

If the final check box is selected, we can not use this class for inheritance, to use inheritance remove the final check box.

Learner Questions


No Questions by learners, be first one to ask ..!!

    Please Sign in to ask a question

    Was this lesson helpful to you? Yes No 38 People out of 39 think this lesson helpful


    Lesson Navigation

    Interfaces in SAP OOABAP← Previous Lesson
    Next Chapter →