Register Login

Whether Multiple Inheritance is used in SAP.. or not.

Updated May 19, 2018

Multiple inheritance is an idea where more than one class can be a superclass of a class. ABAP objects doesn’t support multiple inheritance using more than one class. In ABAP Objects, you can only define a class inheriting from only one class. If you try to define multiple super class while defining a class, compiler would prompt an error message but you can achieve the similar functionality using Interfaces. ABAP Objects does not support multiple inheritance to make it simple as possible.
Some languages support a feature in which a class can inherit components – methods, attributes, events – from more than one Superclass. In other words, you can define a class which has multiple “parent” class. Language like C++ supports this feature. In Java and ABAP, the programmer decided this was not a good idea, leading to ambiguity and contradiction - and therefore, programs that are more complicated and expensive to maintain.

 

 
 


 


×