Application Development and Automation 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: 
Read only

Doubt in Inheritance !

Former Member
0 Likes
563

Hi Experts,

i have doubt in inheritances .

why multiple inheritance is not possible in OOAbap ?

wat is the Reason ?

can any one Clarify my doubt ?

Cheers,

Rajesh .!

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
539

Multiple inheritance is not permitted in ABAP Objects, because the language designers considered that it would cause ambiguity and complexity they didn't want.

Use interfaces instead. See my recent post about interfaces for ideas.

matt

Hi Experts,

i have doubt in inheritances .

why multiple inheritance is not possible in OOAbap ?

wat is the Reason ?

can any one Clarify my doubt ?

Cheers,

Rajesh .!

2 REPLIES 2
Read only

matt
Active Contributor
0 Likes
540

Multiple inheritance is not permitted in ABAP Objects, because the language designers considered that it would cause ambiguity and complexity they didn't want.

Use interfaces instead. See my recent post about interfaces for ideas.

matt

Read only

former_member576008
Active Participant
0 Likes
539

Problems:

mostly used as ’mixin’ = interface

polymorphism on all axes (substitutability is hard)

name conflicts (in distributed development!)

multiple base classes? (diamond inheritance)

combinatorial explosion for multiple classification

  • must be resolved by role pattern or the like

  • would be static, not dynamic

=> multiple inheritance doesn’t do it!