<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: accessing super class method inside a sub class method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554108#M1936831</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;Hi Tharun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;It is only possible to access super class method in subclass redefinition method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;METHOD check_doc_x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super-&amp;gt;check_doc_x( ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE : /'This is check_doc_x redifined'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; ENDMETHOD.&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;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.&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;Even in case of widening cast,if you call super class method(check_doc_x),eventually it means you are calling subclass redefinition method. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp; lob_x ?= lob_y. &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; lob_x-&amp;gt;check_doc_x( ). &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;As per my understanding,accessing super class abstract method in subclass method is not possible.I would be glad to know if its possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;Regards&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;Pallavi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Mar 2016 04:18:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-03-18T04:18:33Z</dc:date>
    <item>
      <title>accessing super class method inside a sub class method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554106#M1936829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a class CL_X created as an abstract class. In this, there is a method, called check_doc_x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I have a sub class inheriting from CL_X. In this sub class, I've redefined check_doc_x for some standalone checks. In addition I have a sub class method check_doc_y.&amp;nbsp; Now, I want to access super class method check_doc_x inside the sub class method check_doc_y. All the methods are instance methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible? I tried casting and it didn't work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 23:20:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554106#M1936829</guid>
      <dc:creator>tharun_kumar1</dc:creator>
      <dc:date>2016-03-17T23:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: accessing super class method inside a sub class method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554107#M1936830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure I understand your question. Do you have two levels of subclasses or one?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens when you try to execute super-&amp;gt;check_doc_x?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 00:01:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554107#M1936830</guid>
      <dc:creator>paul_bakker2</dc:creator>
      <dc:date>2016-03-18T00:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: accessing super class method inside a sub class method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554108#M1936831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;Hi Tharun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;It is only possible to access super class method in subclass redefinition method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;METHOD check_doc_x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super-&amp;gt;check_doc_x( ).&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE : /'This is check_doc_x redifined'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; ENDMETHOD.&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;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.&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;Even in case of widening cast,if you call super class method(check_doc_x),eventually it means you are calling subclass redefinition method. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp; lob_x ?= lob_y. &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; lob_x-&amp;gt;check_doc_x( ). &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;As per my understanding,accessing super class abstract method in subclass method is not possible.I would be glad to know if its possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;Regards&lt;/P&gt;&lt;P style="color: #000000; font-family: Calibri; font-size: 15px;"&gt;Pallavi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 04:18:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554108#M1936831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-03-18T04:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: accessing super class method inside a sub class method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554109#M1936832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Pallavi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had this scenario and unnecessarily I am copy pasting the entire contents of super class method inside the sub class method. So maybe there is no workaround I believe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 05:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554109#M1936832</guid>
      <dc:creator>tharun_kumar1</dc:creator>
      <dc:date>2016-03-18T05:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: accessing super class method inside a sub class method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554110#M1936833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The super class is abstract, so why would you want to execute the (empty) method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 05:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554110#M1936833</guid>
      <dc:creator>paul_bakker2</dc:creator>
      <dc:date>2016-03-18T05:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: accessing super class method inside a sub class method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554111#M1936834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The super class is abstract, but I've implemented all the methods. These are used in many of my subclasses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I create a sub class object and call a method, the super class method implantation is called. If I refund it in sub class, then the latter one is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tharun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 09:01:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-super-class-method-inside-a-sub-class-method/m-p/11554111#M1936834</guid>
      <dc:creator>tharun_kumar1</dc:creator>
      <dc:date>2016-03-18T09:01:07Z</dc:date>
    </item>
  </channel>
</rss>

