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: 

Global Data Details

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Hello Kasi,

Use this Fm DDIF_DTEL_GET

Also Try DDIF_FIELDINFO_GET

If useful reward.

Vasanth

Message was edited by:

Vasanth M

0 Kudos

Use FM DDIF_DTEL_GET.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.