‎2008 Aug 08 7:17 AM
HI
is there any Function Module which will return the table attributes.
Eg Table - MARA
Field Matnr
I need datatype, field length, decimal etc.
Thanks
Sridhar
‎2008 Aug 08 7:28 AM
Hi,
Use this function module:
C14Z_TABLE_INFO_GET
Regards,
Shailaja
‎2008 Aug 08 7:22 AM
try using the RTTI class CL_ABAP_STRUCTDESCR.
sample code is as below
data lo_structdescr type ref to cl_abap_structdescr.
data lv_type type string.
lv_type = 'SFLIGHT'.
LO_STRUCTDESCR ?= CL_ABAP_structDESCR=>DESCRIBE_BY_name( P_name = LV_TYPE ).
lt_components = lo_structdescr->get_components( )
lt_components wil lcontain the field names as well as the other details
‎2008 Aug 08 7:34 AM
Hi Piyush
Thanks for your reply but
It is returning Field name and type reference
eg
fieldname - MANDT
Type reference - "->"
m also need data type short desc length etc.
Sridhar
‎2008 Aug 08 7:28 AM
Hi,
Use this function module:
C14Z_TABLE_INFO_GET
Regards,
Shailaja
‎2008 Aug 08 7:35 AM
‎2008 Aug 08 7:41 AM