Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3458

Re: accessing super class method inside a sub class method

$
0
0

Hi Tharun,

 

It is only possible to access super class method in subclass redefinition method.

 

METHOD check_doc_x.

     super->check_doc_x( ).

     WRITE : /'This is check_doc_x redifined'.

   ENDMETHOD. 

 

As mentioned about casting, you can perform only widening cast(super ref ?= sub object) but the vice versa up casting ( sub ref ?= supobj) is not possible as super class is an abstract class.

Even in case of widening cast,if you call super class method(check_doc_x),eventually it means you are calling subclass redefinition method.

 

  lob_x ?= lob_y.

   lob_x->check_doc_x( ).

 

As per my understanding,accessing super class abstract method in subclass method is not possible.I would be glad to know if its possible.

 

Regards

Pallavi.


Viewing all articles
Browse latest Browse all 3458

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>