Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

comparing values..


i have 2 variables, one of type char 30 and another char 10. One has a value 0.220 and another has 0.22.

When I compare these two values, it seems it fails.

If var = var2.


Is there a way where i can convert one of these into a format of the other just before comparing ? i cannot change the data types of these variables now as it will affect many parts of the related programs. I just need to typecast them to same width for comparison purpose only. any tips ?


Former Member


if these character type variables always contain numbers with decimals, than I would suggest to define variables type p with some decimals. Than move the values to these p variables and then you can compare.

hope this helps


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question