<?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: ABAP methods overloading in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808682#M346884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  In ABAP objects we dont have overloading. But we can acheive it using OPTIONAL parameters. To the method A itself add one more OPTIONAL parameter of type your internal table then you can use the same method. Als make sure your String parameter is also optional so that you can pass which ever you need to pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS xyz definition.&lt;/P&gt;&lt;P&gt;Methods: A importing A type String OPTIONAL itab type &amp;lt;ttype&amp;gt; OPTIONAL.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Dec 2006 07:30:21 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2006-12-08T07:30:21Z</dc:date>
    <item>
      <title>ABAP methods overloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808679#M346881</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;&lt;/P&gt;&lt;P&gt;In ABAP objects, is it possible to use same method name with different signature &lt;/P&gt;&lt;P&gt;in the same class. In Se24, i have build a class xyz and a method A. The method A has a string as importing parameter. I have to use the same method A with an internal table as importing parameter. Any code samples and replies would be really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 13:36:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808679#M346881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T13:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP methods overloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808680#M346882</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 think you are asking about overriding. There is no concept in OO ABAP. You can achieve paritially using Multiple inheritance technique in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here using SUPER keyword we can deferenciate Parent class and Child class. Based on SUPER keyword you can achieve overridding concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bhupal Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 13:45:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808680#M346882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T13:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP methods overloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808681#M346883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In abap objects overloding(we can change the signature ) is possible only with construcor.&lt;/P&gt;&lt;P&gt;It is not possible with methods and the signatures can not be changed.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZTEST_TWO                                                   *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_TWO   .&lt;/P&gt;&lt;P&gt;class c_base definition.&lt;/P&gt;&lt;P&gt;  public section.&lt;/P&gt;&lt;P&gt;    methods: constructor importing value(p_name) type string,&lt;/P&gt;&lt;P&gt;             m_show1,&lt;/P&gt;&lt;P&gt;             m_show2.&lt;/P&gt;&lt;P&gt;  private section.&lt;/P&gt;&lt;P&gt;    data     a_name type string.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c_derived definition inheriting from c_base.&lt;/P&gt;&lt;P&gt;  public section.&lt;/P&gt;&lt;P&gt;    methods: constructor importing value(p_name1) type string&lt;/P&gt;&lt;P&gt;                                   value(p_name2) type string,&lt;/P&gt;&lt;P&gt;             m_show1 redefinition.&lt;/P&gt;&lt;P&gt;  private section.&lt;/P&gt;&lt;P&gt;    data     a_name type string.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c_base implementation.&lt;/P&gt;&lt;P&gt;  method constructor.&lt;/P&gt;&lt;P&gt;    a_name = p_name.&lt;/P&gt;&lt;P&gt;  endmethod.&lt;/P&gt;&lt;P&gt;  method m_show1.&lt;/P&gt;&lt;P&gt;    write: / 'Show1  :', a_name.&lt;/P&gt;&lt;P&gt;  endmethod.&lt;/P&gt;&lt;P&gt;  method m_show2.&lt;/P&gt;&lt;P&gt;    write: / 'Show2  :', a_name.&lt;/P&gt;&lt;P&gt;  endmethod.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c_derived implementation.&lt;/P&gt;&lt;P&gt;  method constructor.&lt;/P&gt;&lt;P&gt;    call method: super-&amp;gt;constructor exporting p_name = p_name1.&lt;/P&gt;&lt;P&gt;    a_name = p_name2.&lt;/P&gt;&lt;P&gt;  endmethod.&lt;/P&gt;&lt;P&gt;  method m_show1.&lt;/P&gt;&lt;P&gt;    write: / 'Show1_r:', a_name.&lt;/P&gt;&lt;P&gt;  endmethod.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data o type ref to c_derived.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object o exporting p_name1 = 'Base...' p_name2 = 'Derived...'.&lt;/P&gt;&lt;P&gt;call method: o-&amp;gt;m_show1,&lt;/P&gt;&lt;P&gt;             o-&amp;gt;m_show2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 07:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808681#M346883</guid>
      <dc:creator>former_member842213</dc:creator>
      <dc:date>2006-12-08T07:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP methods overloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808682#M346884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  In ABAP objects we dont have overloading. But we can acheive it using OPTIONAL parameters. To the method A itself add one more OPTIONAL parameter of type your internal table then you can use the same method. Als make sure your String parameter is also optional so that you can pass which ever you need to pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS xyz definition.&lt;/P&gt;&lt;P&gt;Methods: A importing A type String OPTIONAL itab type &amp;lt;ttype&amp;gt; OPTIONAL.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 07:30:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808682#M346884</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2006-12-08T07:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP methods overloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808683#M346885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  In ABAP objects we dont have overloading. But we can acheive it using OPTIONAL parameters. To the method A itself add one more OPTIONAL parameter of type your internal table then you can use the same method. Als make sure your String parameter is also optional so that you can pass which ever you need to pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS xyz definition.&lt;/P&gt;&lt;P&gt;Methods: A importing A type String OPTIONAL itab type &amp;lt;ttype&amp;gt; OPTIONAL.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 07:33:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808683#M346885</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2006-12-08T07:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP methods overloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808684#M346886</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;Sorry we cannot do that in ABAP because ABAP doesnt support &amp;lt;b&amp;gt;overloading&amp;lt;/b&amp;gt; concept. overloading is possible only with constructor .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 05:04:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-methods-overloading/m-p/1808684#M346886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T05:04:35Z</dc:date>
    </item>
  </channel>
</rss>

