Regarding Super classes

Hi,
I have created one class in SE24. This class will be used as a super class for other classes.
When subclasses are derived from this superclass, i want to make sure that some of the methods of superclasses are redefined by the subclasse compulsarily.
So i want to force the subclasses to redefine complusarily some of the methods of its super class.
Is this feasible. If so please let me know the corresponding approach.
Thanks in advance !
Pramod

Hi,
Check this out this will help you.
Inheritance is the concept of passing the behavior of a class to another class.
1.You can use an existing class to derive a new class.
2.Derived class inherits the data and methods of a super class.
3.However they can overwrite the methods existing methods and also add new once.
4.Inheritance is to inherit the attributes and methods from a parent class.
Inheritance:
Inheritance is the process by which object of one class acquire the properties of another class.
Advantage of this property is reusability.
This means we can add additional features to an existing class with out modifying it.
Go to SE38.
Provide the program name.
Provide the properties.
Save it.
Provide the logic for inheritance.
*& Report  ZLOCALCLASS_VARIABLES                      *
*&----------------------------------------------------*REPORT  ZLOCALCLASS_VARIABLES.
*OOPS INHERITANCE
*SUPER CLASS FUNCTIONALITY
*DEFINE THE CLASS.
CLASS CL_LC DEFINITION.
PUBLIC SECTION.
DATA: A TYPE I,
      B TYPE I,
      C TYPE I.
METHODS: DISPLAY,
         MM1.
CLASS-METHODS: MM2.
ENDCLASS.
*CLASS IMPLEMENTATION
CLASS CL_LC IMPLEMENTATION.
METHOD DISPLAY.
WRITE:/ 'THIS IS SUPER CLASS' COLOR 7.
ENDMETHOD.
METHOD MM1.
WRITE:/ 'THIS IS MM1 METHOD IN SUPER CLASS'.
ENDMETHOD.
METHOD MM2.
WRITE:/ 'THIS IS THE STATIC METHOD' COLOR 2.
WRITE:/ 'THIS IS MM2 METHOD IN SUPER CLASS' COLOR 2.
ENDMETHOD.
ENDCLASS.
*SUB CLASS FUNCTIONALITY
*CREATE THE CLASS.
*INHERITING THE SUPER CLASS.
CLASS CL_SUB DEFINITION INHERITING FROM CL_LC. "HOW WE CAN INHERIT
PUBLIC SECTION.
DATA: A1 TYPE I,
      B1 TYPE I,
      C1 TYPE I.
METHODS: DISPLAY REDEFINITION,     "REDEFINE THE SUPER CLASS METHOD
         SUB.
ENDCLASS.
*CLASS IMPLEMENTATION.
CLASS CL_SUB IMPLEMENTATION.
METHOD DISPLAY.
WRITE:/ 'THIS IS THE SUB CLASS OVERWRITE METHOD' COLOR 3.
ENDMETHOD.
METHOD SUB.
WRITE:/ 'THIS IS THE SUB CLASS METHOD' COLOR 3.
ENDMETHOD.
ENDCLASS.
*CREATE THE OBJECT FOR SUB CLASS.
DATA: OBJ TYPE REF TO CL_SUB.
START-OF-SELECTION.
CREATE OBJECT OBJ.
CALL METHOD OBJ->DISPLAY. "THIS IS SUB CLASS METHOD
CALL METHOD OBJ->SUB.
WRITE:/'THIS IS THE SUPER CLASS METHODS CALLED BY THE SUB CLASS OBJECT'COLOR 5.
SKIP 1.
CALL METHOD OBJ->MM1.     "THIS IS SUPER CLASS METHOD
CALL METHOD OBJ->MM2.
*CREATE THE OBJECT FOR SUPER CLASS.
DATA: OBJ1 TYPE REF TO CL_LC.
START-OF-SELECTION.
CREATE OBJECT OBJ1.
SKIP 3.
WRITE:/ 'WE CAN CALL ONLY SUPER CLASS METHODS BY USING SUPER CLASS OBJECT' COLOR 5.
CALL METHOD OBJ1->DISPLAY. "THIS IS SUPER CLASS METHOD
CALL METHOD OBJ1->MM1.
CALL METHOD OBJ1->MM2.
This example will help you to solve your problem.
For more detailed information GOTO -> SAPTECHNICAL ->Tutorials -> Object Oriented Programming.
Regards Madhu.
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 12:13 PM

Similar Messages

  • Overwriting a method of a super class in the subclass ???

    Hi,
    can somebody tell me whether it's possible to add a new implementation of a method in the sub class which is inherited from a super class?
    I want to model my program in that way:
    1. I define a super class with some implemented methods.
    2. This class should be inherited in a sub class. One method should be used as it was implemented in the super class but another method should be overwritten in the subclass.
    I know this concept from Java but I couldn't find a way how to do it in ABAP
    Many thanks for any help!
    Best regards,
    Birgit

    hi,
    yeas you can do it,
    Subclass can re-implement  the inherited public and protected methods from superclass.Class C1 contains method METH1(public) and METH2(protected), both of which are modified and re-implemented in  its subclass C2.also you can have ur own methods in subclass.Objects are created out of both classes and the method METH1 for both objects are called.
    Output of the program demonstrates different behaviour for method METH1 of class C1 and C2.
    This demonstrates the theme.
    REPORT YSUBDEL.
    CLASS C1 DEFINITION.
      PUBLIC SECTION.
       METHODS : METH1.
      PROTECTED SECTION.
       METHODS METH2.
      ENDCLASS.
    CLASS C1 IMPLEMENTATION .
      METHOD : METH1.
       WRITE:/5 'I am meth1 in class C1'.
       CALL METHOD METH2.
      ENDMETHOD.
      METHOD : METH2.
       WRITE:/5 ' I am meth2 in class C1 '.
      ENDMETHOD.
    ENDCLASS.
    CLASS C2 DEFINITION INHERITING FROM C1.
    PUBLIC SECTION.
      METHODS : METH1 redefinition,
      meth3.
    PROTECTED SECTION.
      METHODS : METH2 redefinition.
    ENDCLASS.
    CLASS C2 IMPLEMENTATION.
    METHOD METH1.
       WRITE:/5 'I am meth1 in class C2'.
       call method meth2.
    endmethod.
      METHOD : METH2.
      WRITE:/5 ' I am meth2 in class C2 '.
    ENDMETHOD.
    METHOD : METH3.
      WRITE:/5 ' I am own method of class C2'.
    ENDMETHOD.
    endclass.
    START-OF-SELECTION.
      DATA : OREF1 TYPE REF TO C1 ,
             OREF2 TYPE REF TO C2.
      CREATE OBJECT :  OREF1 , OREF2.
      CALL METHOD : OREF1->METH1 ,
                    OREF2->METH1.
    hope it helps,
    regards

  • How to indicate the object of the super Class ?

    hello,
    I need to notify when one dialog is close to the class that generated it.
    Of course I do it from the method windowClosing() in the class WindowAdapter.
    But if I use "this" how parameter in the method, I noted the value is that of the inner anonymous class, and not that of the dialog class.
    I write down some code to reproduce the problem ....
    public ReferenceToTheSuperClass() {
            final SecondClass sc = new SecondClass(this);
            jButton1 = new javax.swing.JButton();
    //        final ReferenceToTheSuperClass xx = this;
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                     sc.checkSuper(xx);                    // work
                     sc.checkSuper(this);                   // not work
                     sc.checkSuper(super.getClass()); // not work
    }  // ReferenceToTheSuperClass
    class SecondClass {
        ReferenceToTheSuperClass superiorClass;
        public SecondClass(ReferenceToTheSuperClass supClass){
            superiorClass = supClass;
        public void checkSuper(Object o){
            if (o instanceof ReferenceToTheSuperClass){
                JOptionPane.showMessageDialog(null,"HELLO");
    } // SecondClass My ask is: It is possible to indicate the value of the instance of the super Class, inside one his anonynimous inner class?
    thank you
    regards
    tonyMrsangelo

    thank you for your kinkly answer jeverd,
    yes what you say is right, in this case the class is only nested (in the hurry I used a wrong word).
    About the sintax, I vould find only a short statement to use inside the inner anomymous class and, reading what you say, I can guess it is not possible to do it..
    again thank you
    regards
    tonyMrsangelo

  • Binding of super class property

    can we bind super class property, for example:
    class A
    private String message;
    pubic String getMessage()
    return "My Message";
    public void setMessage( String message )
    this.message = message;
    class B extends A
    }now my managed bean returns me a collection of class B objects, and i want to bind in JSF page poperty of its super class like that:
    <h:outputText value="#{b.message}" />
    It gives me a error "PropertyNotFoundException: b.message.
    Is it possible in JSF ??
    regards,
    Y_NOT_

    I threw a quick test up on my JSF app and it works fine for me. It is not because of polymorphism. It must be in the way you are accessing the method. A typo or something small. Or perhaps it's because you are using a collection (and not accessing the Collection properly)?
    CowKing

  • Super class default constructor

    Hello,
    I want to clear some confusion. I am studying for the exam. In this particular book an example shows that
    Super class has 2 constructor
    public abc() and public abc(int n)
    Sub class has 2 constructor
    public xyz() and public xyz(int n)
    now when an instance is created for the subclass
    xyz t = new xyz(1)
    It will invoke the super class no argument constructor eventhough a default constructor exist in subclass?
    Regards,
    adil

    Here are the rules for constructors--"ctors" because I'm lazy. Also, because I'm lazy, "super(...)" and "this(...)" mean any super or this call, regardless of how many args it takes, including those that take no args.
    1) Every class has at least one ctor.
    1.1) If you do not define an explicit constructor for your class, the compiler provides a implicit constructor that takes no args and simply calls super().
    1.2) If you do define one or more explicit constructors, regardless of whether they take args, then the compiler no longer provides the implicit no-arg ctor. In this case, you must explicitly define a public MyClass() {...} if you want one.
    1.3) Constructors are not inherited.
    2) The first statement in the body of any ctor is either a call to a superclass ctor super(...) or a call to another ctor of this class this(...) 2.1) If you do not explicitly put a call to super(...) or this(...) as the first statement in a ctor that you define, then the compiler implicitly inserts a call to super's no-arg ctor super() as the first call. The implicitly called ctor is always super's no-arg ctor, regardless of whether the currently running ctor takes args.
    2.2) There is always exactly one call to either super(...) or this(...) in each constructor, and it is always the first call. You can't put in more than one, and if you put one in, the compiler's implicitly provided one is removed.

  • Invoked super class constructor means create an object of it?

    Hei,
    i have create one class that extends another class. when i am creating an object of sub class it invoked the constructor of the super class. thats okay.
    but my question is :
    constructor is invoked when class is intitiated means when we create an
    object of sub class it automatically create an object of super class. so means every time it create super class object.

    Hi,
       An object has the fields of its own class plus all fields of its parent class, grandparent class, all the way up to the root class Object. It's necessary to initialize all fields, therefore all constructors must be called! The Java compiler automatically inserts the necessary constructor calls in the process of constructor chaining, or you can do it explicitly.
       The Java compiler inserts a call to the parent constructor (super) if you don't have a constructor call as the first statement of you constructor.
    Normally, you won't need to call the constructor for your parent class because it's automatically generated, but there are two cases where this is necessary.
       1. You want to call a parent constructor which has parameters (the automatically generated super constructor call has no parameters).
       2. There is no parameterless parent constructor because only constructors with parameters are defined in the parent class.
       I hope your query is resolved. If not please let me know.
    Thanks & Regards,
    Charan.

  • Can we chagne Super class method parameters in Sub class

    Hi,
    I created a super class.  In that class i created a method. That method is having 4 input parameters and 4 export parameters.
    I created a sub class for that super class. I need to use only 2 input parameters in this class rather than 4 parameters. I want to delete 2 Input parameters in the sub class of the super class method.  Is it possible.
    If possible. can we give an simple code or pseudo code?
    regards,
    krishna

    Hi,
    I think you can not.
    Because, only public attributes can be inherited and they will remain public in the subclass.
    for further detail check,
    http://help.sap.com/saphelp_nw70/helpdata/en/1d/df5f57127111d3b9390000e8353423/content.htm
    regards,
    Anirban

  • Regarding OBJECT class. A question please.

    A question regarding the Object class.
    Please correct me in case I am wrong.
    If I create a class called Foo :
    class Foo{
          Foo(){
    }The constructor of class Foo automatically invokes the constructor
    of its super class.ie it is like saying :
    class Foo{
      Foo(){
        super();
    }Am I Right?
    Even if the Foo class constructor does not include a call to 'super',
    it is implicitly invoked.
    That is the reason the Foo class can invoke/send messages toe methods defined by 'Object',
    as 'super' defined on Foo's constructor constructs/instantiates 'Object'
    Am I Right again ?
    Now,I have just noticed that the Object class does not contain any constructor
    So how can the constructor of Foo call super implicitly if the Object class
    does not contain any constructor.

    So how can the constructor of Foo call superimplicitly if the Object class
    does not contain any constructor.Even if you don't specify one, there will alwaysbe
    at least a no-args c'tor.But if you do specify a ctor with args, the
    compiler will not insert a no-arg ctor for you.That why I said there is "at least" a no-args (or more args) c'tor [in any class].

  • How to pass subclass to variable of super class ?

    class /EVUIT/EXCH_PRD_GUI definition
    public section.
      methods CONSTRUCTOR
        importing
          value(I_APPLICATION) type ref to /UIT/EXCH_PRD_APP optional
          value(I_REPID) like SY-REPID .
    class /UIT/EXCH_PRD_VERT_NN_MODEL definition
      public
      inheriting from /EVUIT/EXCH_PRD_APP
      create public .
    DATA: l_vert_nn_model type ref to /uit/exch_prd_vert_nn_model.
    DATA: l_gui type ref to /uit/exch_prd_gui_vbeleg.
       CREATE OBJECT l_vert_nn_model
            EXPORTING
              I_ALV_RECORDS = gt_alv_records[].
    CREATE OBJECT l_gui
       EXPORTING
         I_APPLICATION = l_vert_nn_model
         I_REPID = sy-repid .{color}
    Problem i am facing is for l_gui the parameter i_application is of type super class of l_vert_nn_model.
    Any suggestions, how can i pass this subclass object to the parameter which is of type super class?

    Hello Trivenn
    On SAP basis release 7.00 the following coding works:
    *& Report  ZUS_OO_DUMMY
    REPORT  zus_oo_dummy.
    *       CLASS lcl_local DEFINITION
    CLASS lcl_local DEFINITION.
      PUBLIC SECTION.
        METHODS:
          constructor
            IMPORTING
              value(io_instance)  TYPE REF TO zcl_edi_uk_svcs_out. " super class
      PRIVATE SECTION.
        data: mo_instance         type ref to object.
    ENDCLASS.                    "lcl_local DEFINITION
    *       CLASS lcl_local IMPLEMENTATION
    CLASS lcl_local IMPLEMENTATION.
      METHOD constructor.
        mo_instance ?= io_instance.
      ENDMETHOD.                    "constructor
    ENDCLASS.                    "lcl_local IMPLEMENTATION
    DATA: go_super    TYPE REF TO zcl_edi_uk_svcs_out,
          go_sub      TYPE REF TO zcl_edi_uk_svcs_out_customer,
          go_local    type ref to lcl_local.
    START-OF-SELECTION.
      CREATE OBJECT go_super.
      CREATE OBJECT go_sub.
      create object go_local
        exporting
          io_instance = go_sub.
      BREAK-POINT.
    END-OF-SELECTION.
    Regards
      Uwe

  • Can we change the Super class attribute scope in Sub class

    Hi.
    I created a super class. In that i have 4 attributes. That attributes are PUBLIC.
    I created a sub class. In that i got all super class attributes. I want to change that attributes as a Private. Is it possible.
    If it is possible.Give me an Example with code or Pseudo code.
    Regards.
    Krishna.

    Hi Krishna,
    It is not possible... If you declare the Attributes again in Subclass of the same name as that of Super class
    then the way of accessing them would be different from that of attributes in the main class.
    Hope this would help you
    Good luck
    Narin

  • How to pass importing parameter of super class method to subclass method?

    hi all,
    i have defined  a class
    CLASS CUST_REPORT DEFINITION.
      PUBLIC SECTION.
        METHODS:DATA_RETRIVE IMPORTING  CUSTID_LOW  TYPE ZCUSTOMER-ZCUSTID
                                       CUSTID_HIGH TYPE ZCUSTOMER-ZCUSTID.
        DATA:IT_CUST TYPE TABLE OF ZCUSTOMER,
             WA_CUST TYPE ZCUSTOMER.
    ENDCLASS.                    "cust_report DEFINITION
    The method DATA_RETRIVE   in this class  has two importing parameters named CUSTID_LOW   and CUSTID_HIGH.
    then i have defined subclas of this clas.
    LASS CUST_ORD DEFINITION INHERITING FROM CUST_REPORT.
      PUBLIC SECTION.
        DATA:IT_ORD TYPE TABLE OF ZORDER.
        METHODS:DATA_RETRIVE  REDEFINITION,
               DISPLAY.
    ENDCLASS.                    "cust_ord DEFINITION
    Method DATA_RETRIVE   is redefined.
    So how to pass importing parameteres of super class method to sub class method with the same name.
    Thanks and Regards,
    Arpita

    Hi,
    I tried like this.
    METHOD DATA_RETRIVE.
    CALL METHOD SUPER->DATA_RETRIVE
          EXPORTING
            CUSTID_LOW  = I_CUSTLOW
            CUSTID_HIGH = I_CUSTHIGH.
    ENDMETHOD.
    But  parameters I_CUSTLOW and I_CUSTHIGH are not getting values after call to method.
    Thanks and Regards,
    Arpita

  • Why isn't there a simpler way to initialize a subclass with its super class

    Let me explain my doubt with an example...
    public class Parent {
    �    public String parent;
    public class Child extends Parent{
    �    public String child;
    I've an instance of Parent p. I want to construct Child c, with the data in p.
    The only way that is provided by Java language seems to be, having a constructor in Child like
    public class Child extends Parent{
    �    public String child;
    �    public Child(Parent p){
    �    �    parent = p.parent;
    �    }
    The problem with this is there is lot of redundant assignment code.
    What I don't understand is why there is not a simpler way of doing this when a subclass is after all super class data + some other data(excuse me for not looking at the bahavior part of it)
    I'm looking for something as simple as Child c = p, which I know is wrong and know the reasons too.
    Yes, we can wrap Child over Parent to do this, but it necessitates repeating all the methods in Parent.
    Why is the language writers didn't provide a simple way of doing this? I should be missing something here...I'm just searching for an explanation. May be I'm asking a dumb question, but this bugs me a lot...
    Regards,
    Kothapalli.

    To answer DrClap, I'm demanding it now :-). Let me
    not suggest something that Mr.Gosling didn't think of;
    he should be having some reasons in not providing it.Because it's essentially impossible in the general case. One of the reasons you may be extending a class is to add new invariants to the superclass.
    eg- extend java.awt.Rectangle by BoundedRectangle - extra invariant that none of its corner points may be less than 0 or more than 100 in any dimension. (The rectangle must be entirely contained in the area (0,0)-(100,100))
    What would happen if you try to create a BoundedRectangle from a rectangle representing (50,50)-(150,150)? Complete invariant breakdown, with no generic way to handle it, or even recognise it.
    Actually, BIJ and sgabie are asking for it. Provide an
    automatic copy constructor. Every object should have
    an implicit copy constructor defined. From any
    subclass, I should be able to invoke
    super(parentClass). From the subclass, we can invoke
    super(parentClass) first and then go on to initialize the
    subclass data.
    I really don't know the implementation issues of this,
    but what I'm looking for is something like this. I'm just
    curious to know the implementation issues.Implementation issue #1: Classes that should not, under any circumstane, be copied.
    * eg 1- Singleton objects. If there's an automatic copy constructor, then multiple singletons can be created, making them essentially useless. This by extension kills the Typesafe Enum pattern also.
    * eg 2- Objects with extra information, such as java.sql.Connection - if you copied this, would the copy be using the same socket connection, or would another connection be required? What happens if opening another connection, and the JDBC driver requires the password to be entered for every new connection? If the wrong password is entered, what happens to the newly creating connection?
    Implementation issue #2: Copying implementation?
    * Already mentioned by RPWithey. The only guaranteed way to perform the copy would be with a shallow copy, which may end up breaking things.
    Why can't you write the copy constructor yourself? If it's a special case, it only has to be done once. If it's a recurring case, you could write a code generation tool to write them for you, along with most of the rest of the class.

  • Serializing super class

    hi All,
    I was working with object serialization and of the condition is that *"if superclass is not serializable then it must have a public default constructor"*.
    My question is, how will having a default constructor in the super class will help serialization.
    any sort of information in this regard is much appreciated.

    codingMonkey wrote:
    9th-Stallion wrote:
    Thanx for the reply Maaijade.
    The question now is that, if no constructor is available in the super class, won't java will creat a default constructor itself, as it does to creat objects of classes that do not have constructors.
    ThanxOnly if the super class has no other constructors whatsoever.Which, of course, means that after compilation it already has the default constructor anyway, as that is added by the compiler. ;-)

  • Overriding super class methods @ OIM 9x

    Hi All,
    I'm working on a requirement where I need to override superclass method in sub class.The problem is, method defined in sub class is not getting called by OIM.
    My question more looks like Pure Java related,but as it is OIM which uses Struts, calling of ActionForward methods defined in
    protected Map getKeyMethodMap()
    +{+
    +}+
    Super class is OUT OF BOX class and sub class is I m developing.Both superclass & subclass having the protected Map getKeyMethodMap() method with same declaration.
    Can any one give me a clue on this.
    Regards,
    Krish

    HI All,
    Issue resolved after deleting stage & tmp folders in weblogic instance directory and restarted weblogic instance.
    Regards,
    Krish

  • Error while calling a super class public method in the subclass constructor

    Hi ,
    I have code like this:
    CLASS gacl_applog DEFINITION ABSTRACT.
      PUBLIC SECTION.
        METHODS:
                create_new_a
                   IMPORTING  pf_obj       TYPE balobj_d
                              pf_subobj    TYPE balsubobj
                              pf_extnumber TYPE string
                   EXPORTING  pfx_log_hndl TYPE balloghndl
                   EXCEPTIONS error
    ENDCLASS.
    CLASS gacl_applog IMPLEMENTATION.
      METHOD create_new_a.
        DATA: ls_log TYPE bal_s_log.
      Header aufsetzen
        MOVE pf_extnumber TO ls_log-extnumber.
        ls_log-object     = pf_obj.
        ls_log-subobject  = pf_subobj.
        ls_log-aluser     = sy-uname.
        ls_log-alprog     = sy-repid.
        ls_log-aldate     = sy-datum.
        ls_log-altime     = sy-uzeit.
        ls_log-aldate_del = ls_log-aldate + 1.
        CALL FUNCTION 'BAL_LOG_CREATE'
             EXPORTING
                  i_s_log      = ls_log
             IMPORTING
                  e_log_handle = pfx_log_hndl
             EXCEPTIONS
                  OTHERS       = 1.
        IF ( sy-subrc NE 0 ).
          MESSAGE ID      sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH    sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING error.
        ENDIF.
      ENDMETHOD.
    CLASS gcl_applog_temp DEFINITION INHERITING FROM gacl_applog.
      PUBLIC SECTION.
        DATA: log_hndl   TYPE balloghndl READ-ONLY
            , t_log_hndl TYPE bal_t_logh READ-ONLY
        METHODS: constructor
                   IMPORTING  pf_obj       TYPE balobj_d
                              pf_subobj    TYPE balsubobj
                              pf_extnumber TYPE string
                   EXCEPTIONS error
               , msg_add      REDEFINITION
               , display      REDEFINITION
    ENDCLASS.
    CLASS gcl_applog_temp IMPLEMENTATION.
      METHOD constructor.
        CALL METHOD create_new_a
               EXPORTING  pf_obj       = pf_obj
                          pf_subobj    = pf_subobj
                          pf_extnumber = pf_extnumber
               IMPORTING  pfx_log_hndl = log_hndl.
        IF ( sy-subrc NE 0 ).
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING error.
        ENDIF.
      ENDMETHOD.
    A public method of Super class has been called from the constructor of the sub class. we are getting the syntax error :
    ' In the constructor method, you can only access instance attributes, instance methods, or "ME" after calling the constructor of the superclass…'
    Can you please suggest how to change the code with out affecting the functioanlity.
    Thank you ,
    Lakshmi.

    Hi,
    Call that method by instance of Subclass.   OR
    SUPER-->method.
    Read very useful document
    Constructors
    Constructors are special methods that cannot be called using CALL METHOD. Instead, they are called automatically by the system to set the starting state of a new object or class. There are two types of constructors - instance constructors and static constructors. Constructors are methods with a predefined name. To use them, you must declare them explicitly in the class.
    The instance constructor of a class is the predefined instance method CONSTRUCTOR. You declare it in the public section as follows:
    METHODS CONSTRUCTOR
            IMPORTING.. [VALUE(]<ii>[)] TYPE type [OPTIONAL]..
            EXCEPTIONS.. <ei>.
    and implement it in the implementation section like any other method. The system calls the instance constructor once for each instance of the class, directly after the object has been created in the CREATE OBJECT statement. You can pass the input parameters of the instance constructor and handle its exceptions using the EXPORTING and EXCEPTIONS additions in the CREATE OBJECT statement.
    The static constructor of a class is the predefined static method CLASS_CONSTRUCTOR. You declare it in the public section as follows:
    CLASS-METHODS CLASS_CONSTRUCTOR.
    and implement it in the implementation section like any other method. The static constructor has no parameters. The system calls the static constructor once for each class, before the class is accessed for the first time. The static constructor cannot therefore access the components of its own class.
    Pls. reward if useful....

Maybe you are looking for

  • Album view and Cover Flow problem

    Well, im going to get one of the new ipods soon and they have that Cover Flow feature which is pretty cool. Anyway i have a problem, when i try and sort them by album, i go to Album View and even if the album names are the same, they arnt in the same

  • Implementing password policie using Role and CoS

    Hy all, I have created a directory with the following partial structure (Sun directory 5.2 patch 2): ou=people,o=accounts,c=an |----- cn=user1 |----- cn=user2 |----- cn=user3 ou=services,o=accounts,c=an |---------cn=user4 |---------cn=user5 |--------

  • Why does Firefox not display symbols and diacritic marks correctly in html pages

    I reset my profile because of a problem displaying a particular web page. I am now using the reset profile. Using this profile Firefox does NOT correctly display symbols and diacritic marks in my html pages. Such pages were correctly displayed in my

  • Is it possible to have both the CS6 and CC suites on the same computer

    I have just purchased a new computer. I will be needing to download the Adobe CC suite. I fear that having to adjust to so many new things at once will be too much of a a chalenge since I have many projects in the works at this time. I would really p

  • Multiple line select in TableView

    Hello all! I have this problem while working with Tableview. I have to delete multiple rows at a time but not able to. I created an instance(<b>lr_tableview</b>) of the class <b>cl_htmlb_tableview</b>. Although the instance is getting loaded correctl