SAP Virtual/Onsite Trainings

Document Categories:

What's New?

Contribute?

Sample Specs

What's Hot?

Web Dynpro for ABAP Tutorials 


Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe  Unsubscribe 

Achieving Multiple Inheritance

By Raja Narayanan

In ABAP, we can achieve Multiple Inheritance through interface.

ABAP objects don’t support multiple inheritances using more than one class.

Here I have considered a sample scenario which demonstrates how we can achieve the multiple inheritances in ABAP OO.  

Create two separate interfaces called ZIF_VECHICLE_MODEL

With the parameter as RV_MODEL

 

Create interface called ZIF_VECHICLE_DETAIL  

With the parameter as RV_DETAIL

   

Create a class called ZCL_CAR_DETAILS  and add these interface’s as shown below.

Implement the method ZIF_VECHICLE_MODEL~GET_MODEL and write your logic.

 

Implement the method ZIF_VECHICLE_DETAIL~GET_DETAIL and write your logic.

The similar way we will create another class called ZCL_BIKE_DETAIL which again implement the same interface’s.

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image