<?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 calling super class constructure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-super-class-constructure/m-p/2580061#M589892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have created two classes, class A and sub class- classB, using class builder how can I call consture of super class A .&lt;/P&gt;&lt;P&gt;getting following error - In the constructor method, you can only access instance attributes&lt;/P&gt;&lt;P&gt;after the constructor of the superclass (SUPER-&amp;gt;CONSTRUCTOR) has been&lt;/P&gt;&lt;P&gt;called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help.&lt;/P&gt;&lt;P&gt;jog&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2007 17:43:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-07T17:43:51Z</dc:date>
    <item>
      <title>calling super class constructure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-super-class-constructure/m-p/2580061#M589892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have created two classes, class A and sub class- classB, using class builder how can I call consture of super class A .&lt;/P&gt;&lt;P&gt;getting following error - In the constructor method, you can only access instance attributes&lt;/P&gt;&lt;P&gt;after the constructor of the superclass (SUPER-&amp;gt;CONSTRUCTOR) has been&lt;/P&gt;&lt;P&gt;called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help.&lt;/P&gt;&lt;P&gt;jog&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 17:43:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-super-class-constructure/m-p/2580061#M589892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T17:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: calling super class constructure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-super-class-constructure/m-p/2580062#M589893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your class B inherits from class A, make sure that you specify so in the attributes tab, then in the constructor of class B,  make sure to call the super-&amp;gt;constructor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method super-&amp;gt;constructor( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 17:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-super-class-constructure/m-p/2580062#M589893</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-07T17:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: calling super class constructure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-super-class-constructure/m-p/2580063#M589894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Similar to this in a local class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

*---------------------------------------------------------------------*
*       CLASS lcl_a DEFINITION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_a definition.

  public section.
    methods: constructor.

endclass.

*---------------------------------------------------------------------*
*       CLASS lcl_a IMPLEMENTATION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_a implementation.

  method constructor.
    write:/ 'A constructor'.
  endmethod.

endclass.

*---------------------------------------------------------------------*
*       CLASS lcl_b DEFINITION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_b definition inheriting from lcl_a.

  public section.
    methods: constructor.

endclass.

*---------------------------------------------------------------------*
*       CLASS lcl_b IMPLEMENTATION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class lcl_b implementation.

  method constructor.
    call method super-&amp;gt;constructor( ).
       write:/ 'b constructor'.
  endmethod.

endclass.

data: o_clb type ref to lcl_b.


start-of-selection.

  create object o_clb.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 17:58:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-super-class-constructure/m-p/2580063#M589894</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-07T17:58:19Z</dc:date>
    </item>
  </channel>
</rss>

