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: 

retreiving type of a "type any table" variable

dany_charbonneau
Explorer
0 Kudos

Hi,

I have a receiving parameter "type any table". If I send a table of type SFLIGHT in this parameter, I want to retreive the litteral name "SFLIGHT", how can I do it ?

I was expecting to do something like :

descr_ref ?= cl_abap_tabledescr=>describe_by_data( it_data ).

and look for the ABSOLUTE_NAME but I end up with a useless generated string, something like \TYPE=%_T00004S00000000O0000001280

Thanks !

Edited by: Dany Charbonneau on Sep 4, 2008 3:02 PM

1 REPLY 1

dany_charbonneau
Explorer
0 Kudos

I found the problem... a transparent table is nothing and a generated name is provided...

It work fine when we access the structure name behing the transparent table :

data: lr_descr_ref TYPE ref to cl_abap_typedescr,

lr_descr_tab TYPE ref to cl_abap_tabledescr,

lr_descr_struc TYPE ref to cl_abap_structdescr.

lr_descr_ref = cl_abap_typedescr=>describe_by_data( it_data ).

lr_descr_tab ?= lr_descr_ref.

lr_descr_struc ?= lr_descr_tab->get_table_line_type( ).

WRITE: / 'Typename :', lr_descr_struc->absolute_name.