<?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: multiple inheritance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922193#M59137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u pls give me one example of using INTERFACE instead of multiple inheritance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks n Regards&lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2007 12:39:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-04T12:39:16Z</dc:date>
    <item>
      <title>multiple inheritance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922190#M59134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;can anybody tell me why multiple inheritance is not supported in ABAP? is it design aspect or any logic involved?&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;mainak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2005 14:09:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922190#M59134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-03T14:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: multiple inheritance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922191#M59135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't give you a reason why multiple inheritance is not supported, but you can simulate multiple inheritance in ABAP objects using interfaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2005 14:16:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922191#M59135</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-03-03T14:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: multiple inheritance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922192#M59136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably for 2 reasons:&lt;/P&gt;&lt;P&gt;1. the complexity of implementing the feature&lt;/P&gt;&lt;P&gt;2. the limited use of the feature&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Rich mentioned you can use Interfaces to simulate multiple inheritance.  A somewhat similar feature is called Friends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The different relationships possible are describe here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_470/helpdata/en/ca/c035b7a6c611d1b4790000e8a52bed/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_470/helpdata/en/ca/c035b7a6c611d1b4790000e8a52bed/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2005 01:51:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922192#M59136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-04T01:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: multiple inheritance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922193#M59137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u pls give me one example of using INTERFACE instead of multiple inheritance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks n Regards&lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 12:39:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922193#M59137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T12:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: multiple inheritance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922194#M59138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ABAP Objects, the same components (attributes, methods, constants, types, alias names) can be&lt;/P&gt;&lt;P&gt;defined in an interface in largely the same way as in classes. However, interfaces do not have component&lt;/P&gt;&lt;P&gt;visibility sections.&lt;/P&gt;&lt;P&gt;Interfaces are implemented in classes.&lt;/P&gt;&lt;P&gt;The interface name is listed in the definition part of the class. Interfaces can only be implemented &amp;#145;publicly&amp;#146;&lt;/P&gt;&lt;P&gt;and are therefore always in the PUBLIC SECTION (this is only valid as of Release 4.6). If you do not do&lt;/P&gt;&lt;P&gt;this, you risk multiple implementations, if a superclass and a subclass both implement the same interface&lt;/P&gt;&lt;P&gt;privately.&lt;/P&gt;&lt;P&gt;The operations defined in the interface are implemented as methods of a class. A check is carried out to&lt;/P&gt;&lt;P&gt;ensure that all the methods defined in the interfaces are actually present in the implementation part of the&lt;/P&gt;&lt;P&gt;class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Declaration of an interface&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;INTERFACE lif_document.&lt;/P&gt;&lt;P&gt;DATA: author TYPE REF TO lcl_author.&lt;/P&gt;&lt;P&gt;METHODS: print,&lt;/P&gt;&lt;P&gt;display.&lt;/P&gt;&lt;P&gt;ENDINTERFACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_text_document DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;INTERFACES lif_document.            &amp;lt;b&amp;gt; " Defining within a class.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;METHODS: display.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_img_document DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;INTERFACES lif_document.            &amp;lt;b&amp;gt; " Defining within a class.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;METHODS: display.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*Interfaces are implemented in classes&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_text_document IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD lif_document~print.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*Your specific code here....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD lif_document~display.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*Your specific code here....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_img_document IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD lif_document~print.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*Your specific code here....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD lif_document~display.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*Your specific code here....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Creating an object of that class.&lt;/P&gt;&lt;P&gt;DATA: text_doc TYPE REF TO lcl_text_document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*Calling methods&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT text_doc.&lt;/P&gt;&lt;P&gt;CALL METHOD text_doc-&amp;gt;lif_document~print.&lt;/P&gt;&lt;P&gt;CALL METHOD text_doc-&amp;gt;lif_document~display.&lt;/P&gt;&lt;P&gt;CALL METHOD text_doc-&amp;gt;display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;The interface resolution operator enables you to access interface components using an object reference&lt;/P&gt;&lt;P&gt;belonging to the class implementing the interface in exactly the same way as the method definition in the&lt;/P&gt;&lt;P&gt;implementation part of the class.&lt;/P&gt;&lt;P&gt;This allows you to differentiate between components defined in the interface and components of the same&lt;/P&gt;&lt;P&gt;name that are defined in the class itself. This is caused by the shared namespace.&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hope this is helpful, Do reward.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2007 13:47:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-inheritance/m-p/922194#M59138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-04T13:47:32Z</dc:date>
    </item>
  </channel>
</rss>

