Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dereference a generic reference

Former Member
0 Likes
3,545

hi,

i have a generic reference variable say lv_ref of type ref to data.

Currently it references a table of some type say X.

Now i want to display the table referenced by the above generic reference variable.

Could any1 plz help me out in this regard.

Useful replies will certainly be rewarded.

Thanx in advance.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
862

Hello Shankar

Depending on whether the referenced object is a table or a structure you need an appropriate field symbol:

FIELD-SYMBOLS:
  <ls_struc>    TYPE ANY,
  <lt_itab>       TYPE table.


  ASSIGN lv_ref->* TO <ls_struc>.  " de-referencing structure
  ASSIGN lv_ref->* TO <lt_Itab>.     " de-referencing table type [itab]

Regards

Uwe

1 REPLY 1
Read only

uwe_schieferstein
Active Contributor
0 Likes
863

Hello Shankar

Depending on whether the referenced object is a table or a structure you need an appropriate field symbol:

FIELD-SYMBOLS:
  <ls_struc>    TYPE ANY,
  <lt_itab>       TYPE table.


  ASSIGN lv_ref->* TO <ls_struc>.  " de-referencing structure
  ASSIGN lv_ref->* TO <lt_Itab>.     " de-referencing table type [itab]

Regards

Uwe