Tuesday, September 25, 2018

Hierarchical Inheritance in sap abap

                           Hierarchical Inheritance IN SAP ABAP



If more than one class is inherited from the base class, it's known as hierarchical inheritance. In hierarchical inheritance, all features that are common in child classes are included in the base class.
For example: Physics, Chemistry, Biology are derived from Science class.


CLASS SCIENCE DEFINITION.
****CODE HERE*******

END CLASS.

CLASS BIOLOGY DEFINITION INHERITING FROM SCIENCE.

ENDCLASS.

CLASS PHYSICS DEFINITION INHERITING FROM SCIENCE.

***CODE HERE***************
ENDCLASS.

CLASS CHEMISTRY DEFINITION INHERITING FROM SCIENCE.

**********CODE HERE************

ENDCLASS.