<?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 Regarding  constructors in  oops in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807396#M915781</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;sap gurus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; hw to  view the constructors in  class builder..&amp;amp; also tell  hw  to use construcotrs in  oops abap &lt;/P&gt;&lt;P&gt;with  example..&lt;/P&gt;&lt;P&gt;hw can i  find  out  the   parameters for the  constructor in   stanadard class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Spanadna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 May 2008 06:06:08 GMT</pubDate>
    <dc:creator>spandana_babu</dc:creator>
    <dc:date>2008-05-13T06:06:08Z</dc:date>
    <item>
      <title>Regarding  constructors in  oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807396#M915781</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;sap gurus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; hw to  view the constructors in  class builder..&amp;amp; also tell  hw  to use construcotrs in  oops abap &lt;/P&gt;&lt;P&gt;with  example..&lt;/P&gt;&lt;P&gt;hw can i  find  out  the   parameters for the  constructor in   stanadard class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Spanadna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 06:06:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807396#M915781</guid>
      <dc:creator>spandana_babu</dc:creator>
      <dc:date>2008-05-13T06:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  constructors in  oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807397#M915782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check class in SE24.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 06:15:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807397#M915782</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2008-05-13T06:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  constructors in  oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807398#M915783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Spandana,&lt;/P&gt;&lt;P&gt;You instantiate a class using the ABAP statement CREATE OBJECT. This calls the constructor for the instance. The constructor can contain parameters that you may have to supply with values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are two special methods which you call using CALL METHOD. These are called CONSTRUCTOR and CLASS _CONSTRUCTOR. They are automatically called when you create an object (Constructor) or when you first access the components of a class (CLASS _CONSTRUCTOR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;find the below links are helpful to understand the ABAP Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://help.sap.com/erp2005_ehp_03/helpdata/EN/ce/b518b6513611d194a50000e8353423/frameset.htm|http://help.sap.com/erp2005_ehp_03/helpdata/EN/ce/b518b6513611d194a50000e8353423/frameset.htm]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 07:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807398#M915783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T07:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  constructors in  oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807399#M915784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; hi&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; sap gurus&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt;  hw to  view the constructors in  class builder..&amp;amp; also tell  hw  to use construcotrs in  oops abap &lt;/P&gt;&lt;P&gt;&amp;gt; with  example..&lt;/P&gt;&lt;P&gt;&amp;gt; hw can i  find  out  the   parameters for the  constructor in   stanadard class.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Spanadna&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should have been posted in the ABAP Objects section...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at the class in SE24, you may see a method called "CONSTRUCTOR".  If you set your cursor on the constructor, and click on the PARAMETERS button, you'll see the parameters.  These are always input parameters.  A constructor can have zero, one or many parameters.  Some may be optional.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also tell the parameters of a constructor by using the Create object pattern (Pattern button in the ABAP editor, ABAP Objects Patterns, Create object ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't see a CONSTRUCTOR method in SE24, it means that the class does not have an explicit constructor.  In this case, CREATE OBJECT still returns an object reference, but there's no code run in the class at creation, and there are no parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 07:37:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807399#M915784</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-05-13T07:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  constructors in  oops</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807400#M915785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii..&lt;/P&gt;&lt;P&gt;first constructors are the 1st events tht are triggered in a class..there r 2 type of constructors..static and instance.&lt;/P&gt;&lt;P&gt;for eg in oops.&lt;/P&gt;&lt;P&gt;class cl1 definition.&lt;/P&gt;&lt;P&gt;public section.&lt;/P&gt;&lt;P&gt;methods: add,sub, constructor importing v1 type i v2 type i.&lt;/P&gt;&lt;P&gt;class-methods:class_constructor.  -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;&amp;gt; ths is static constructor.its     only triggered once at the beginning of the object.&lt;/P&gt;&lt;P&gt;private section.&lt;/P&gt;&lt;P&gt;data:var1 type i,var 2 type i,result type i.&lt;/P&gt;&lt;P&gt;class-data: counter type i.----&amp;gt; static data to count the number of the static constructor occurrence.&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;class 1 implementation.&lt;/P&gt;&lt;P&gt;method add. reasult = var1 + var2.&lt;/P&gt;&lt;P&gt;display().&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;method display. &lt;/P&gt;&lt;P&gt;write: 'reasult', result.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;method constructor.&lt;/P&gt;&lt;P&gt;var1 = v1.&lt;/P&gt;&lt;P&gt;var2 = v2.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;method class_constructor.&lt;/P&gt;&lt;P&gt;write: 'ths is static'.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;  _&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;now the main prg...&lt;/STRONG&gt;*_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:ref1 type ref to cl1.&lt;/P&gt;&lt;P&gt;parameters: p1 type i,p2 type i.&lt;/P&gt;&lt;P&gt;data:result type i.&lt;/P&gt;&lt;P&gt;star-of-selection.&lt;/P&gt;&lt;P&gt;create object ref1 exporting v1=p1 v2=p2.&lt;/P&gt;&lt;P&gt;ref1-&amp;gt;add().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hopefully i am able to expalin you with ths example....&lt;/P&gt;&lt;P&gt;plzz reward points if helpful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2008 09:50:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-constructors-in-oops/m-p/3807400#M915785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-13T09:50:18Z</dc:date>
    </item>
  </channel>
</rss>

