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: 

data types & field lengths

Former Member
0 Kudos

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

Sm1tje
Active Contributor
0 Kudos

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..

GrahamRobbo
Active Contributor
0 Kudos

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