Application Development and Automation 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: 
Read only

Get Data Type from its name...

Former Member
0 Likes
1,419

Hi,

I have a table name and a field name in two char variables, I want to the data type of the variable. Is there any function to do this?

For example:

CALL FUNCTION get_data_type

EXPORTING

table_name = 'SPFLI'

field_name = 'CARRID'

IMPORTING

data_type = data_type.

where at the end data_type would have 'CHAR'.

Thanks in advance,

André Costa

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,253

Hi,

Please try this FM DDIF_FIELDINFO_GET.

Enter the table name and field name and check the return table DFIES_TAB parameter for field DATATYPE.

Regards,

Ferry Lianto

5 REPLIES 5
Read only

Former Member
0 Likes
1,253

Use FM : SWC_DDIC_GET_CONT_DATATYPE

Read only

Former Member
0 Likes
1,253

Hi

from the Domain of that field we know the data type and length

see the tables DD03L enter table and field name

or from table DD07L enter domain and get its values

Reward points for useful Answers

Regards

Anji

Read only

former_member194669
Active Contributor
0 Likes
1,253

Use fm

DDIF_NAMETAB_GET

aRs

Read only

Former Member
0 Likes
1,254

Hi,

Please try this FM DDIF_FIELDINFO_GET.

Enter the table name and field name and check the return table DFIES_TAB parameter for field DATATYPE.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,253

One more function module :

SWP_DDIC_FIELD_INFO_GET