2006 May 30 1:49 PM
HI ,
I want to replace FM NAMETAB_GET. I used the FM DDIF_FIELDINFO_GET , but the table parameter structur contains more number of fields in it. Will i get any problem means will it gives any dump?..Table type in the higher version is DFIES. And in lower version is DNTAB
.
thanks,
kishore
2006 May 30 1:54 PM
have u checked DDIF_NAMETAB_GET and for texts use DDIF_FIELDINFO_GET
2006 May 30 1:56 PM
Hi Kishore,
You can definetly use this function module DDIF_FIELDINFO_GET and remember to pass the parametres correctly and use this This can help you out.
Cheers,
2006 May 30 2:04 PM
Please try something like this.
report zrich_0001.
data: l_dref type ref to cl_abap_typedescr.
data: l_xref type ref to cl_abap_structdescr.
data: xcomps type abap_compdescr.
call method cl_abap_tabledescr=>describe_by_name
exporting
p_name = 'MARA'
receiving
p_descr_ref = l_dref
exceptions
type_not_found = 1
others = 2.
if sy-subrc <> 0.
exit.
endif.
l_xref ?= l_dref.
loop at l_xref->components into xcomps.
write:/ xcomps-name, xcomps-type_kind, xcomps-length, xcomps-decimals.
endloop.
Regards,
Rich HEilman