<?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: Working with Abstract Class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467047#M1416601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcin and All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the document from a website called Saptechnical and  under the tab Object Oriented Programming. Pls correct me If I have missed something or of something is missing here..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps I followed for Abstract Class are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Transaction Se24 created a class with Instantiation as Abstract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) I defined an atribute X as Instance attibute and visibility as public.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) I defined an Method M1 as a instance Method and Visibiity as protected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) I went inside the method and selected Go to Tab -&amp;gt; Method definition and selected abstract.By this method is also an abstract.When I chose abstract,I got a pop up message stating Implementation of the method M1 deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) I then clicked on continue and a pop up messgae "Method changed sucessfully".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is where when i try to activate the class ,I get a message abstract class cannot be implemented(I understand that the abstract methods placed inside the abstract class cannot be implemented but is it not possible to activate the class)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps I followed for Sub Class are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Transaction Se24 created a sub class and gace the Abstract class for inhering the properties of the abstract class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 ) The Method that was declared in Abstract class automatically came in Sub Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) I selected the method and clicked on the redefinition method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Between Method and End Method i wrote now a very simple logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method m1.&lt;/P&gt;&lt;P&gt;DATA:  Var1 TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VAR1 = X + 1.&lt;/P&gt;&lt;P&gt;Write : / VAR1.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;5)  I then saved the class and activated the class.When I try to activate ,I get the message the method not implemented or declared.This is all I did.I have not declared the object like u had shared.Can you letme know what next steps I should be doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is immensely appreciated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You had shared the following code with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_abstract DEFINITION ABSTRACT.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS m1 ABSTRACT.                            " Already done as I explained in my Demo for Abstract class Correct me if I am wrong.." &lt;/P&gt;&lt;P&gt;ENDCLASS.                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_subclass DEFINITION INHERITING FROM lcl_abstract.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS m1 REDEFINITION.  "this one you are missing I guess  " Already done as I explained in my Demo for Sub class Correct me if I am wrong.." &lt;/P&gt;&lt;P&gt;ENDCLASS.                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_subclass IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD m1.&lt;/P&gt;&lt;P&gt;    WRITE 'Method m1 implemented in sublcass'.    " Already done as I explained in my Demo for Sub class .Correct me if I am wrong" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  DATA r_sub TYPE REF TO lcl_subclass.   I have not created a program to declare the object.Can you let me know the steps to take this forward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT r_sub.&lt;/P&gt;&lt;P&gt;  r_sub-&amp;gt;m1( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:11 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:37 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:41 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:43 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:44 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:45 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jan 2010 06:11:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-08T06:11:18Z</dc:date>
    <item>
      <title>Working with Abstract Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467041#M1416595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a class by declaring it as Abstract.I created a sub class of the Abstract class(Inherting by giving the name of the super clasS) and when I try to activate it says Method not declared or Inherited in Sub class .The Abstract class is inactive and when i Activate it says method is abstract&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have inherited the method by going to the Go to Method definition.The class is also inherited.I am unsure where i have gone wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me understand where I have gone wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 10:24:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467041#M1416595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T10:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Abstract Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467042#M1416596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the method is declared as &lt;EM&gt;abstract&lt;/EM&gt; you have to &lt;EM&gt;redefine&lt;/EM&gt; it in your subclass.&lt;/P&gt;&lt;P&gt;If, in contrary, the method is not abstract, you need to provide its implementation in an abstract class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:36:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467042#M1416596</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-01-07T12:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Abstract Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467043#M1416597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had created a class  by defining it as abstract.I have a method say m1.Since the class is abstract,I will not be able to implement the method m1 of the abstract class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had created a sub class by inheriting from the abstract class.I am trying to implement the method of the abstract class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to activate the sub class,it says Method not declared or Inherited in Sub class .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I have declared it in the method.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Local Data Declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA: lv_count TYPE i,&lt;/P&gt;&lt;P&gt;        lv_res TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;initialize Count value to '1'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  lv_count = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO 10 TIMES.&lt;/P&gt;&lt;P&gt;    IF lv_count &amp;lt;= '10'.&lt;/P&gt;&lt;P&gt;      lv_res = v_num * lv_count.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Displa the multiplication table for a Given Number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      WRITE: / v_num,&lt;/P&gt;&lt;P&gt;               '*',&lt;/P&gt;&lt;P&gt;               lv_count,&lt;/P&gt;&lt;P&gt;               '=',&lt;/P&gt;&lt;P&gt;               lv_res.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Increment Count value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      lv_count = lv_count + 1.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear variable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR: v_num.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me where I have gone wrong or if I have missed something...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 7, 2010 2:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:54:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467043#M1416597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T12:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Abstract Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467044#M1416598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;I had created a class by defining it as abstract.I have a method say m1.Since the class is abstract,I will not be able to implement the method m1 of the abstract class.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Abstract&lt;/EM&gt; for class means you cannot instiante it. You can however implement method inside it, unless you declared the method with &lt;EM&gt;ABSTRACT&lt;/EM&gt; addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had created a sub class by inheriting from the abstract class.I am trying to implement the method of the abstract class.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Either:&lt;/P&gt;&lt;P&gt;- change the method definition in abstract class to be also abstract -&amp;gt; then redefine it in subclass. This way you have implementation provided in subclass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;- implement the method in abstract class and use it in your subclass (or redefine to extend the functionality in subclass)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 13:06:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467044#M1416598</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-01-07T13:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Abstract Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467045#M1416599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats what I did first(Sorry I did not explain properly earlier) but not working..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had created a class  by defining it as abstract.I have a method say m1 that is declared as abstract.Since the class is abstract,I will not be able to implement the method m1 in the abstract class.When I activate the abstract class,it says method cannot be implemented (which is true)but would we not be able to activate ther abstract class??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had created a sub class by inheriting from the abstract class ie the base class here.I am trying to implement the method m1 in the sub class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to activate the sub class,it says Method not declared or Inherited in Sub class .I am sure I gave the Abstract class name to inherit it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I have declared it in the method.&lt;/P&gt;&lt;P&gt;method m1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Local Data Declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA: lv_count TYPE i,&lt;/P&gt;&lt;P&gt;        lv_res TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;initialize Count value to '1'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  lv_count = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO 10 TIMES.&lt;/P&gt;&lt;P&gt;    IF lv_count &amp;lt;= '10'.&lt;/P&gt;&lt;P&gt;      lv_res = v_num * lv_count.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Displa the multiplication table for a Given Number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      WRITE: / v_num,&lt;/P&gt;&lt;P&gt;               '*',&lt;/P&gt;&lt;P&gt;               lv_count,&lt;/P&gt;&lt;P&gt;               '=',&lt;/P&gt;&lt;P&gt;               lv_res.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Increment Count value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      lv_count = lv_count + 1.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear variable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR: v_num.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me where I have gone wrong or if I have missed something...Pls give me ur mail id so that I can explain line by line what I did..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 7, 2010 2:03 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 7, 2010 2:11 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 7, 2010 2:14 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 7, 2010 2:14 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 7, 2010 2:16 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 7, 2010 2:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 13:08:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467045#M1416599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T13:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Abstract Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467046#M1416600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem is that you didn't add &lt;EM&gt;REDEFINITION&lt;/EM&gt; addition to method m1 in subclass. See below snippet&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS lcl_abstract DEFINITION ABSTRACT.
  PUBLIC SECTION.
    METHODS m1 ABSTRACT.
ENDCLASS.                   

CLASS lcl_subclass DEFINITION INHERITING FROM lcl_abstract.
  PUBLIC SECTION.
    METHODS m1 REDEFINITION.  "this one you are missing I guess
ENDCLASS.                    

CLASS lcl_subclass IMPLEMENTATION.
  METHOD m1.
    WRITE 'Method m1 implemented in sublcass'.
  ENDMETHOD.                 

ENDCLASS.                   

START-OF-SELECTION.
  DATA r_sub TYPE REF TO lcl_subclass.

  CREATE OBJECT r_sub.
  r_sub-&amp;gt;m1( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 14:22:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467046#M1416600</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-01-07T14:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Abstract Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467047#M1416601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcin and All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the document from a website called Saptechnical and  under the tab Object Oriented Programming. Pls correct me If I have missed something or of something is missing here..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps I followed for Abstract Class are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Transaction Se24 created a class with Instantiation as Abstract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) I defined an atribute X as Instance attibute and visibility as public.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) I defined an Method M1 as a instance Method and Visibiity as protected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) I went inside the method and selected Go to Tab -&amp;gt; Method definition and selected abstract.By this method is also an abstract.When I chose abstract,I got a pop up message stating Implementation of the method M1 deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) I then clicked on continue and a pop up messgae "Method changed sucessfully".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is where when i try to activate the class ,I get a message abstract class cannot be implemented(I understand that the abstract methods placed inside the abstract class cannot be implemented but is it not possible to activate the class)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps I followed for Sub Class are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Transaction Se24 created a sub class and gace the Abstract class for inhering the properties of the abstract class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 ) The Method that was declared in Abstract class automatically came in Sub Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) I selected the method and clicked on the redefinition method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Between Method and End Method i wrote now a very simple logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method m1.&lt;/P&gt;&lt;P&gt;DATA:  Var1 TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VAR1 = X + 1.&lt;/P&gt;&lt;P&gt;Write : / VAR1.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;5)  I then saved the class and activated the class.When I try to activate ,I get the message the method not implemented or declared.This is all I did.I have not declared the object like u had shared.Can you letme know what next steps I should be doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is immensely appreciated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You had shared the following code with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_abstract DEFINITION ABSTRACT.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS m1 ABSTRACT.                            " Already done as I explained in my Demo for Abstract class Correct me if I am wrong.." &lt;/P&gt;&lt;P&gt;ENDCLASS.                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_subclass DEFINITION INHERITING FROM lcl_abstract.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS m1 REDEFINITION.  "this one you are missing I guess  " Already done as I explained in my Demo for Sub class Correct me if I am wrong.." &lt;/P&gt;&lt;P&gt;ENDCLASS.                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_subclass IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  METHOD m1.&lt;/P&gt;&lt;P&gt;    WRITE 'Method m1 implemented in sublcass'.    " Already done as I explained in my Demo for Sub class .Correct me if I am wrong" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  DATA r_sub TYPE REF TO lcl_subclass.   I have not created a program to declare the object.Can you let me know the steps to take this forward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT r_sub.&lt;/P&gt;&lt;P&gt;  r_sub-&amp;gt;m1( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:11 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:37 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:41 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:43 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:44 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:45 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Viswanathan_1983 on Jan 8, 2010 7:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2010 06:11:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467047#M1416601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-08T06:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Abstract Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467048#M1416602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcin for all your help.My query is resolved now..What i did was I had declared the method as protected in the base class and was trying to redefine in Sub class as public and hence there was a conflict .I changed to Public in the Abstract class and now it works absolutely fine..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2010 07:43:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-abstract-class/m-p/6467048#M1416602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-08T07:43:56Z</dc:date>
    </item>
  </channel>
</rss>

