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

data types & field lengths

Former Member
0 Likes
411

hi,

we can compare values of fields using where condition,if condition etc.,

but is there a chance of comparing data types & field lengths of two fields.

2 REPLIES 2
Read only

Sm1tje
Active Contributor
0 Likes
381

sure you can. If you know the name of the data element that is been used, you can determine the type and length from data dictionary (table DD03L, not sure though).

If it has to be dynamically, you can use the (SUB) classes CL_ABAP_TYPEDESCR..

Read only

0 Likes
381

Hi Sari,

sure you can. Use the DESCRIBE FIELD statement or Run Time Type Identification.

Look at http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb3145358411d1829f0000e829fbfe/frameset.htm

Cheers

Graham Robbo