01-16-2007 12:00 PM
Hi Abapers
My requirement is to get the data type and length of a dictionary table field in program. please kindly let me know if there is any function module for this.
For Eg. If i give MARA-MATNR as input to function Module the output should give its data type C and length 18.
Suitable answers will be rewarded
Regards,
Kasi S
01-16-2007 12:01 PM
Hello Kasi,
Use this Fm DDIF_DTEL_GET
Also Try DDIF_FIELDINFO_GET
If useful reward.
Vasanth
Message was edited by:
Vasanth M
01-16-2007 12:08 PM
01-16-2007 12:12 PM
hi
Hi use this FM
RMST501_DTEL_GET
enter <b>mara-matnr</b>
u will get the output
this is well suited for ur req
RM_DTEL_INFO_GET
EEW_DTEL_GETINFO
Hope this will help u.
Thanks
Shiva
01-16-2007 12:28 PM
Hi Kasi,
<b> Run this code</b> ,
REPORT zex31 .
TABLES: dfies,
x030l.
DATA: BEGIN OF inttab OCCURS 100.
INCLUDE STRUCTURE dfies.
DATA: END OF inttab.
PARAMETERS: tablenm TYPE ddobjname DEFAULT 'MARA',
fieldnm TYPE dfies-fieldname DEFAULT 'MATNR'.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = tablenm
fieldname = fieldnm
langu = sy-langu
LFIELDNAME = ' '
ALL_TYPES = ' '
IMPORTING
X030L_WA = WATAB
DDOBJTYPE =
DFIES_WA =
LINES_DESCR =
TABLES
dfies_tab = inttab
FIXED_VALUES =
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE:/ 'Field name not found'.
ENDIF.
LOOP AT inttab.
WRITE:/ inttab-fieldname,inttab-leng , inttab-datatype.
inttab-tabname, inttab-fieldtext .
ENDLOOP.