09-04-2008 2:02 PM
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
09-04-2008 3:12 PM
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.