<?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: Differ-imp in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/differ-imp/m-p/2850959#M668058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"instance" components need to be instantiated. Static components do not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By example, take a static method of class myclass called mymethod. To call this method you just need to do something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method myclass=&amp;gt;mymethod&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It is essentally the same as a function module you could call like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'myfunction'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Instance components require the class to be instantiated and copies of the components are created for each instantiated class. So you could instantiate the same class twice and the components of each class would be very separate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instantiation can happen a few different ways, but simplistically you would have to do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data myinstance type ref to myclass.
create object myinstance.
call method myinstance1-&amp;gt;mymethod&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Oct 2007 00:25:47 GMT</pubDate>
    <dc:creator>GrahamRobbo</dc:creator>
    <dc:date>2007-10-08T00:25:47Z</dc:date>
    <item>
      <title>Differ-imp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differ-imp/m-p/2850957#M668056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anybody explain what is the main difference between static and instance components of a class in all aspects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2007 16:32:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differ-imp/m-p/2850957#M668056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-07T16:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Differ-imp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differ-imp/m-p/2850958#M668057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two major differences:&lt;/P&gt;&lt;P&gt;1. Static components are "always" there meaning it is not required to create an instance of the class. Example: public static attribute CL_GUI_CFW=&amp;gt;FALSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Instance attributes are not visible in static method (whereas static attributes are visible in instance methods). Example: If you try to reference ME within a static class you get a syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2007 19:41:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differ-imp/m-p/2850958#M668057</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-10-07T19:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Differ-imp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/differ-imp/m-p/2850959#M668058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"instance" components need to be instantiated. Static components do not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By example, take a static method of class myclass called mymethod. To call this method you just need to do something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method myclass=&amp;gt;mymethod&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It is essentally the same as a function module you could call like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'myfunction'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Instance components require the class to be instantiated and copies of the components are created for each instantiated class. So you could instantiate the same class twice and the components of each class would be very separate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instantiation can happen a few different ways, but simplistically you would have to do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data myinstance type ref to myclass.
create object myinstance.
call method myinstance1-&amp;gt;mymethod&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 00:25:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/differ-imp/m-p/2850959#M668058</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2007-10-08T00:25:47Z</dc:date>
    </item>
  </channel>
</rss>

