Application Development 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: 

Dereference a generic reference

Former Member
0 Kudos

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

uwe_schieferstein
Active Contributor
0 Kudos

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

uwe_schieferstein
Active Contributor
0 Kudos

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