<?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 Static Cunstructor will execute first or Instance Cunstructor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758489#M904212</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Static Cunstructor will execute first or Instance Cunstructor.&lt;/P&gt;&lt;P&gt;Plz explain me. Its urgent.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2008 10:57:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-22T10:57:38Z</dc:date>
    <item>
      <title>Static Cunstructor will execute first or Instance Cunstructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758489#M904212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Static Cunstructor will execute first or Instance Cunstructor.&lt;/P&gt;&lt;P&gt;Plz explain me. Its urgent.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 10:57:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758489#M904212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T10:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Static Cunstructor will execute first or Instance Cunstructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758490#M904213</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;Static Constructor will execute first , then Instance constructor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason is during compile time itself the static constructor will have value..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and for instance constructor when the object gets created i.e during runtime ...it has value..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Brijesh..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Briesh Patel on Apr 22, 2008 4:55 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Briesh Patel on Apr 22, 2008 5:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 11:25:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758490#M904213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T11:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Static Cunstructor will execute first or Instance Cunstructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758491#M904214</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; Static constructo was executed whenever u r class is loaded. But instance constructor was executed whenever u Created the object using 'CREATE OBJECT' Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Static constructor is executed first before executing the instance constructor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constructor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Constructors are special PUBLIC methods that are triggered when an object is instantiated from a class. They are necessary when you want to set the initial state of an object dynamically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like normal methods, there are two types of constructor - instance constructors and static constructors. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use the instance constructor, the CONSTRUCTOR method must be declared in the public section of the class using the METHODS statement, and implemented in the implementation section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constructors must always be declared in the PUBLIC section of a class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instance Constructor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)Executed once for each instance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)Called automatically, immediately after the CREATE OBJECT statement.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;3)Can contain an interface with IMPORTING parameters and EXCEPTIONS , but cannot have any EXPORTING/CHANGING/RETURNING parameters .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)The interfaces are defined using the same syntax as for normal methods in the METHODS statement. To transfer parameters and handle exceptions, use the EXPORTING and EXCEPTIONS additions to the CREATE OBJECT statement .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Static Constructor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)Static methods, declared as  CLASS-METHODS : CLASS_CONSTRUCTOR  in the public section of  the  class definition and are also implemented in the implementation part. &lt;/P&gt;&lt;P&gt;2)Has  no interface parameters and cannot trigger exceptions.  &lt;/P&gt;&lt;P&gt;3)Executed once in each program. It is called automatically for the class before it is accessed for the first time - that is, before one of the following actions: &lt;/P&gt;&lt;P&gt;        a)CREATE OBJECT obj  from the class.&lt;/P&gt;&lt;P&gt;       b)Call a static method : [CALL METHOD] class=&amp;gt;meth. &lt;/P&gt;&lt;P&gt;       c)Registering a static event handler method using SET HANDLER class=&amp;gt;meth for obj. &lt;/P&gt;&lt;P&gt;        d)Registering an event handler method for a static event of the class class. &lt;/P&gt;&lt;P&gt;        e)Addressing a static attribute with class=&amp;gt;a. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is helpful rewards points&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pratap.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 12:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758491#M904214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T12:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Static Cunstructor will execute first or Instance Cunstructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758492#M904215</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;for more info refer&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/OO/defn.htm" target="test_blank"&gt;http://www.erpgenie.com/abap/OO/defn.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 13:45:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758492#M904215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T13:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Static Cunstructor will execute first or Instance Cunstructor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758493#M904216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ranveer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The static constructor is a special static method in a class and is always named&lt;/P&gt;&lt;P&gt;CLASS_CONSTRUCTOR. It is executed no more than once per program (and&lt;/P&gt;&lt;P&gt;class). The static constructor is called automatically before the class is first&lt;/P&gt;&lt;P&gt;accessed, but before any of the following actions are executed for the first time:&lt;/P&gt;&lt;P&gt;- Creating an instance of this class (CREATE OBJECT)&lt;/P&gt;&lt;P&gt;- Accessing a static attribute of this class&lt;/P&gt;&lt;P&gt;- Calling a static method of this class&lt;/P&gt;&lt;P&gt;- Registering an event handler method for an event in this class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always consider the following points when you define static constructors:&lt;/P&gt;&lt;P&gt;- Each class has no more than one static constructor&lt;/P&gt;&lt;P&gt;- The static constructor must be defined in the public area&lt;/P&gt;&lt;P&gt;- The constructor's signature cannot have importing parameters or exceptions&lt;/P&gt;&lt;P&gt;- The static constructor cannot be called explicitly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 05:40:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/static-cunstructor-will-execute-first-or-instance-cunstructor/m-p/3758493#M904216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T05:40:34Z</dc:date>
    </item>
  </channel>
</rss>

