06-19-2008 8:18 AM
Hello,
I currently want know if it is possible to override attributes in ABAP objects. i know it is possible with methods. I have extend a previous class functionality and want to change the refrence type of an attribute from the parent class, but only on the child. Is this possible in ABAP object or even in normal object oriented techniques.
Thanks
Brendan
06-19-2008 9:23 AM
Hi,
ususally you can achive this with other technics. You can e.g. use the class hierarchy for this:
The attribute is of type REF_SUPERCLASS. Within the superclass it should be working when you set subclasses of REF_SUPERCLASS as attribute.
Another way is to use interfaces as reference type for your attribute.
Please refer to [ABAP Objects|http://help.sap.com/saphelp_nw70/helpdata/EN/ce/b518b6513611d194a50000e8353423/frameset.htm]. Especially the chapters about Inheritance and Interfaces.
Regards Rudi