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: 

Get Data Type from its name...

Former Member
0 Kudos

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

ferry_lianto
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Use FM : SWC_DDIC_GET_CONT_DATATYPE

Former Member
0 Kudos

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

former_member194669
Active Contributor
0 Kudos

Use fm

DDIF_NAMETAB_GET

aRs

ferry_lianto
Active Contributor
0 Kudos

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

Former Member
0 Kudos

One more function module :

SWP_DDIC_FIELD_INFO_GET