2013 Jan 17 9:31 AM
Can a reference pointer for any type which be able to point an ABAP Class Object? Since the genetic type can be for any ABAP
For example:
DATA: F1 TYPE REF TO ANY,
V1(30) TYPE C VALUE 'ANOBJECT',
.
.
.
CREATE OBJECT F1 TYPE (V1).
.
.
.
Moderator Message - Basic ABAP question. Please read the ABAP Keyword Documentation on generic ABAP types.
Message was edited by: Suhas Saha
2013 Jan 17 9:39 AM
2013 Jan 17 10:07 AM
Hi Hai Wang,
You Can't Declare Generic type after 'TYPEREFTO' and you can use this example.
class abc definition.
endclass.
class pqr definition.
endclass.
data : obj_abc type ref to abc,
obj_pqr type ref to pqr.
create object obj_pqr type obj_abc.
Thanks,
Raghunadh.K
2013 Jan 18 1:46 AM
Well, thanks a lot, I was thinking about void pointer for ABAP.