2007 Oct 26 7:01 AM
Is constructor overloading or construtor overriding possible.If so how.Can the constructor of super class redefined in subclasses.
2007 Oct 26 11:09 AM
Hi Sandeep,
Constructor overloading is not there in abap. As a matter of fact Overloading concept is not there in abap.
Overriding is there. In a constructor of sub class you can call super class constructor by using SUPER->constructor.
I dont have time now.. otherwise i would have given u code.
If u need it just give a reply....Reward points .
Aleem.
2007 Oct 26 7:39 AM
Hi
One of the use of calling constructor of super class in a subclass is while before calling the constructor of subclass if you want to access the methods,or if u want to handle any data/information of a super class in a subclass u can call the consttructor of superclass. but i dont think we can redefine the constructor of superclass in subclass
2007 Oct 26 11:09 AM
Hi Sandeep,
Constructor overloading is not there in abap. As a matter of fact Overloading concept is not there in abap.
Overriding is there. In a constructor of sub class you can call super class constructor by using SUPER->constructor.
I dont have time now.. otherwise i would have given u code.
If u need it just give a reply....Reward points .
Aleem.
2007 Oct 26 11:18 AM
hi sandeep,
Constructor overloading is not their in ABAP since we are using the same name constructor in every class.So that a conflict occurs while recognising the name.
so that is not in a state to recognize that method.
however constructor overriding is possible.
It means nothing but we are redefining the method in the sub class.
if want the code i will send u that will expalin .
Otherwise you go for ABAPDOCU-tcode.u can get clear examples in that.
WITH REGARDS,
Lokesh@EDS