<?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 inheritance problem in oo programming in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418770#M1737795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, I wrote a simple program to try to learn inheritance in oo programming. Here is part of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In superclass:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;METHODS&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;display_value &lt;SPAN class="L0S52"&gt;IMPORTING &lt;/SPAN&gt;im_value &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;string&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;In subclass:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;METHODS &lt;/SPAN&gt;display_value &lt;SPAN class="L0S52"&gt;REDEFINITION &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;As you can see, superclass's 'display_value' does have a parameter while subclass doesn't.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;The problem is, even if I define a data type ref to subclass like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;DATA &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;obj_dis &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;TO &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;lcl_vbap_sub&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CREATE &lt;/SPAN&gt;OBJECT obj_dis&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;when I wrote CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;obj_dis&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;display_value.&lt;/P&gt;&lt;P&gt;It occured an error said that I have to assign value into parameter&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;im_value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody give me some ideas, thanks for that.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Apr 2013 14:12:43 GMT</pubDate>
    <dc:creator>raffinkira</dc:creator>
    <dc:date>2013-04-29T14:12:43Z</dc:date>
    <item>
      <title>inheritance problem in oo programming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418770#M1737795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, I wrote a simple program to try to learn inheritance in oo programming. Here is part of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In superclass:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;METHODS&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;display_value &lt;SPAN class="L0S52"&gt;IMPORTING &lt;/SPAN&gt;im_value &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;string&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;In subclass:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;METHODS &lt;/SPAN&gt;display_value &lt;SPAN class="L0S52"&gt;REDEFINITION &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;As you can see, superclass's 'display_value' does have a parameter while subclass doesn't.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;The problem is, even if I define a data type ref to subclass like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;DATA &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;obj_dis &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;TO &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;lcl_vbap_sub&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CREATE &lt;/SPAN&gt;OBJECT obj_dis&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;when I wrote CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;obj_dis&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;display_value.&lt;/P&gt;&lt;P&gt;It occured an error said that I have to assign value into parameter&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;im_value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody give me some ideas, thanks for that.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 14:12:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418770#M1737795</guid>
      <dc:creator>raffinkira</dc:creator>
      <dc:date>2013-04-29T14:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: inheritance problem in oo programming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418771#M1737796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The method "display_value" inherits the signature (the parameters) from the superclass. Unless the parameter is optional, you have to supply it whether you're calling the method from the superclass or the subclass. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how ABAP Objects works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 15:29:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418771#M1737796</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-04-29T15:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: inheritance problem in oo programming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418772#M1737797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what if I need more parameters in the method in subclass than in the superclass?&lt;/P&gt;&lt;P&gt;I will be very appreciate if you give me some guides of how to use &lt;/P&gt;&lt;P&gt;"&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt;"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;super&lt;/SPAN&gt;&lt;SPAN class="L0S70" style="font-size: 10pt;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;display_value&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;" in the redefinition of display_value in subclass.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 15:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418772#M1737797</guid>
      <dc:creator>raffinkira</dc:creator>
      <dc:date>2013-04-29T15:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: inheritance problem in oo programming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418773#M1737798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When you say REDEFINITION in a sub-class, it means that the method implementation (coding) can be changed according to the specific requirement of sub class. Like Matthew said, the method inherits signature which can not be changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Athreya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 16:01:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418773#M1737798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-29T16:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: inheritance problem in oo programming</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418774#M1737799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;But why some sample coding use"&lt;SPAN class="L0S52" style="font-size: 10pt; background-color: #ffffff; color: #333333;"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-size: 10pt; background-color: #ffffff; color: #333333;"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff; color: #333333;"&gt;super&lt;/SPAN&gt;&lt;SPAN class="L0S70" style="font-size: 10pt; background-color: #ffffff; color: #333333;"&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff; color: #333333;"&gt;display_value" in the redefinition of the method in subclass. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background-color: #ffffff; color: #333333;"&gt;It is also hard to understand, compare to other languages.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 16:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inheritance-problem-in-oo-programming/m-p/9418774#M1737799</guid>
      <dc:creator>raffinkira</dc:creator>
      <dc:date>2013-04-29T16:11:23Z</dc:date>
    </item>
  </channel>
</rss>

