2006 Apr 11 8:28 AM
Hi!
I'm trying to bulid an applicaton with abab g and as a Java developer I'm doing it with Abap Objects. Now I have a nice abstract superclass and now I have to check references what type they have, before casting them into the subclasses. I'm looking for something like "instanceof" in java. Does someone know how to do that in Abap?
Best regards
Patrick Lehmann
Hi!
I'm trying to bulid an applicaton with abab g and as a Java developer I'm doing it with Abap Objects. Now I have a nice abstract superclass and now I have to check references what type they have, before casting them into the subclasses. I'm looking for something like "instanceof" in java. Does someone know how to do that in Abap?
Best regards
Patrick Lehmann
2006 Apr 14 8:40 PM
Hi,
Sure, we do have runtime type identification for each object instance.
Use the Class CL_ABAP_CLASSDESCR to get the RTTI of any object instance.
Read more on how to use this class in Class documentation.
Hope this helps.
Regards,
Nagaraju Chidurupalli.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |