<?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: Instance vs Static Method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/instance-vs-static-method/m-p/4795675#M1123142</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;Instance methods are called using the following syntax: &lt;/P&gt;&lt;P&gt;CALL METHOD instance_name-&amp;gt;instance_method_name.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;A static method which is also called as class method can be called using the class and does not require an Instance. Static methods are called using the following syntax:&lt;/P&gt;&lt;P&gt;CALL METHOD class_name=&amp;gt;instance_method_name&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Nov 2008 04:01:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-20T04:01:46Z</dc:date>
    <item>
      <title>Instance vs Static Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/instance-vs-static-method/m-p/4795673#M1123140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a BADI Definition in the Enhancement Spot. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am creating a method in the BADI interface; I have the option of INSTANCE and STATIC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please elaborate the difference between the two; giving examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2008 15:28:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/instance-vs-static-method/m-p/4795673#M1123140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-19T15:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Instance vs Static Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/instance-vs-static-method/m-p/4795674#M1123141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it's an elementary concept of object-oriented programming languages, please look at books or lots of threads in the forum.&lt;/P&gt;&lt;P&gt;briefly, you may call instance methods only on instances:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data instance_name type ref to class_name.
create object instance_name...
call method instance_name-&amp;gt;instance_method( ... )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;you may call static methods (also called class methods) only on class, does not need an instance&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method class_name=&amp;gt;static_method( ... )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2008 20:29:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/instance-vs-static-method/m-p/4795674#M1123141</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2008-11-19T20:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Instance vs Static Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/instance-vs-static-method/m-p/4795675#M1123142</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;Instance methods are called using the following syntax: &lt;/P&gt;&lt;P&gt;CALL METHOD instance_name-&amp;gt;instance_method_name.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;A static method which is also called as class method can be called using the class and does not require an Instance. Static methods are called using the following syntax:&lt;/P&gt;&lt;P&gt;CALL METHOD class_name=&amp;gt;instance_method_name&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 04:01:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/instance-vs-static-method/m-p/4795675#M1123142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T04:01:46Z</dc:date>
    </item>
  </channel>
</rss>

