<?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: Getting error while creating abstract method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733742#M1581229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Halo Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply . Its a new information for me . I thought the compiler would yell at you for the below scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what I meant in my note was if you have an abstract method then the class should be always abstract .&lt;/P&gt;&lt;P&gt;Good to have this kind of discussions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arshad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Mar 2011 07:56:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-30T07:56:00Z</dc:date>
    <item>
      <title>Getting error while creating abstract method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733738#M1581225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi folks,&lt;/P&gt;&lt;P&gt;i facing issue for ABSTRACT Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create abstarct method, (refered example from saptechnical site), &lt;/P&gt;&lt;P&gt;I created one attribute i-num, created one method AREA, in  implementation area , i made it as Abstract, then i did syntax check, then it is giving below error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Class ZTEST_CLASS01_AB,Method AREA&lt;/P&gt;&lt;P&gt;The abstract method "AREA" can only be implemented after its&lt;/P&gt;&lt;P&gt;redefinition (METHODS AREA REDEFINITION).*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried all the ways..&lt;/P&gt;&lt;P&gt;created subclass for this, i writted some code in AREA of Sub-class, there it is giving dump, because first one is not activated properly..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you please somebody help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 16:35:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733738#M1581225</guid>
      <dc:creator>suresh_s9</dc:creator>
      <dc:date>2011-03-29T16:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while creating abstract method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733739#M1581226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Halo Sri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1 &lt;/P&gt;&lt;P&gt;Create a class(ZABSTRACT) and make its type as Abstract( Which means atleast one of its methods is abstract)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step2&lt;/P&gt;&lt;P&gt;Create a method (AREA) inside class ZABSTRACT .Mark this method as ABSTRACT in the definition part( In Se24 you should check this in the detail button) .This method cannot have any implementation , only definition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step3&lt;/P&gt;&lt;P&gt;Activate the class ZABSTRACT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step4&lt;/P&gt;&lt;P&gt;Now create another class ZSUB inheriting from ZABSTRACT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step5&lt;/P&gt;&lt;P&gt;Redefine the Method (AREA) and write the implementation. Activate ZSUB Class also&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;Arshad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 19:32:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733739#M1581226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-29T19:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while creating abstract method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733740#M1581227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arshad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Create a class(ZABSTRACT) and make its type as Abstract( &lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;&lt;STRONG&gt;Which means atleast one of its methods is abstract&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can have abstract classes with all it's methods as non-abstract or concrete. A small example is given below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS gcl_abstract DEFINITION ABSTRACT.

  PUBLIC SECTION.
    METHODS concrete. "Concrete

ENDCLASS.                    "gcl_abstract DEFINITION

*----------------------------------------------------------------------*
*       CLASS gcl_abstract IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS gcl_abstract IMPLEMENTATION.

  METHOD concrete.
    WRITE: / `I'm a concrete method`.
  ENDMETHOD.                    "concrete

ENDCLASS.                    "gcl_abstract IMPLEMENTATION

*----------------------------------------------------------------------*
*       CLASS gcl_abstract_sub DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS gcl_abstract_sub DEFINITION INHERITING FROM gcl_abstract.

  PUBLIC SECTION.
    METHODS concrete REDEFINITION.

ENDCLASS.                    "gcl_abstract_sub DEFINITION

*----------------------------------------------------------------------*
*       CLASS gcl_abstract_sub IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS gcl_abstract_sub IMPLEMENTATION.

  METHOD concrete.
    super-&amp;gt;concrete( ).
    WRITE: / 'Abstract class might not have abstract methods at all!'.
  ENDMETHOD.                    "concrete

ENDCLASS.                    "gcl_abstract_sub IMPLEMENTATION

START-OF-SELECTION.
  DATA: go_abstract TYPE REF TO gcl_abstract_sub.

  CREATE OBJECT go_abstract.

  go_abstract-&amp;gt;concrete( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although i will agree there is no point in making a class as abstract &amp;amp; having no abstract method &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;@Sri&lt;/STRONG&gt;&lt;/SPAN&gt;: Looks like you're trying to implement the abstract method "AREA" in the abstract class hence the error. For abstract method you cannot define their implementation in the corres. abstract class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Mar 30, 2011 12:04 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 06:27:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733740#M1581227</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-03-30T06:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while creating abstract method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733741#M1581228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you for your time,i have deleted these two classes from se24, again i created, it is working fine with out any issues.i dont know how it is workign now, yesterday also i tried the same way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 06:39:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733741#M1581228</guid>
      <dc:creator>suresh_s9</dc:creator>
      <dc:date>2011-03-30T06:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while creating abstract method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733742#M1581229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Halo Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply . Its a new information for me . I thought the compiler would yell at you for the below scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what I meant in my note was if you have an abstract method then the class should be always abstract .&lt;/P&gt;&lt;P&gt;Good to have this kind of discussions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arshad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 07:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733742#M1581229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-30T07:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while creating abstract method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733743#M1581230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arshad, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found one thing today, i created a class as Public, created one method, made it as Abstract, activated it,then when i verified the class properties ,&lt;STRONG&gt;its changed to Abstract from Public.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so we can conclude now if any one of the method is Abstract , class will become automatically Abstract, &lt;/P&gt;&lt;P&gt;please correct me if it is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 08:32:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-error-while-creating-abstract-method/m-p/7733743#M1581230</guid>
      <dc:creator>suresh_s9</dc:creator>
      <dc:date>2011-03-30T08:32:24Z</dc:date>
    </item>
  </channel>
</rss>

