Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

is multiple inheritence is possible in sap?

Former Member
0 Kudos

can any one help me?

is multiple inheritence possible in sap ?

and is one class can extend multiplre interfaces??

5 REPLIES 5

amol_chaudhari5
Explorer
0 Kudos

Yes, but it is not direct such, you have to use interfaces which replicates multiple inheritance.

regards,

Amol.

Former Member
0 Kudos

yes multiple inheritance is possible in SAP....check ABAPDOCU for more details...

Former Member
0 Kudos

Multiple Inheritance is not possible in ABAP objects.

But you can achieve this using Interfaces,

Yes one class can extend multiple interfaces.

Regards,

Anji

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Yes and No.

multiple inheritence is not possible in sap but for constructor this is exceptional.

Regards,

kumar

0 Kudos

Hi,

Multiple inheritance as a concept is not allowed in ABAP Objects. But the effect and behaviour that you get by multiple inheritance is acheviable in ABAP objects with the help of interfaces. As follows.

An interface can inlcude more than one interface, that is an interface can extend more than one interface. Now if you have say interface1, interface2 and interface3.

interface4 can be declared to include all three other interfaces. And you class can include this interface4 in its interfaces tab.

Due to this your class gets the behviour(methods) that is defined in all ther interfaces. You can assign an object of this class to a reference of any one of these four interfaces. So one object can react to method calls on four different interfaces which is what you want to achevie in multiple inheritance.

Regards,

Sesh