‎2008 Dec 29 6:38 AM
Hi,
I have an internal table which contains object refrence and points to some class. I am trying to fetch the data stored in the static attributes of that class. How can i do this??
Any input will be very very helpful.. Thanks in advance..
Warm Regards,
Naveen M
‎2008 Dec 29 6:42 AM
Hi Naveen,
Try out this code:
LOOP AT it_table INTO wa_table.
name = wa_table-object=>name.
ENDLOOP.
‎2008 Dec 29 6:47 AM
hello sidh,
in place of object shld i write my class name and in place of name i shld write the static attribute name rite.
warm regards,
Naveen M
‎2008 Dec 29 6:44 AM
Use this type of coding, itab contains a field oref1 as an object reference. OREF1 object has a static attribute called data.
loop at itab into wa.
wa_data = wa-oref1=>data.
write:/ wa_data.
endloop.
‎2008 Dec 29 7:04 AM
hi,
Thanks for the suggestion. but they dint work. The internal table is of some table type. And this table type has a reference type which is name of an interface. This interface has some methods in it.
But when i go into debugging mode and check for the data stored in the table i find it holding memory of some class and that has some static attributes. I am unable to understand how this is actually working./
Any idea...
Warm Regards,
naveen m
‎2008 Dec 29 6:49 AM
Hi Naveen,
If they are Static Attributes, you can access then directly using class name as:
class_name=>attr1.
Regards,
Nitin.