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: 

Replacement for FM NAMETAB_GET

Former Member
0 Kudos
134

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

3 REPLIES 3

Former Member
0 Kudos
56

have u checked DDIF_NAMETAB_GET and for texts use DDIF_FIELDINFO_GET

Former Member
0 Kudos
56

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,

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
56

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