on 04-24-2013 5:41 AM
Hello,
I have a column in ALV which has the datatype CHAR10, but the values in it are only numbers. While displaying the values in the UI, I have made use of the function module 'CONVERSION_EXIT_ALPHA_OUTPUT' for converting char to numeric.
The filter works fine for the operator EQ. But when i try to filter using '>100', it will consider only the first digit (i.e., 1 in this case) and the results will have only the values greater than 1. The filter does not work properly for the other operators as well.
Please note that I do not want to change the datatype(CHAR10) of the context attribute to which the ALV column is mapped.
Could anyone help me on this?
Thanks and Regards,
Aslin
Hi Murel,
'CONVERSION_EXIT_ALPHA_OUTPUT' generally used for adding or sub leading zeros to value.
You can use FM 'MOVE_CHAR_TO_NUM' OR
CHAR_NUMC_CONVERSION to convert char to numberic.
Check with this FM it will work.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murel,
You want to covert from char to numeric right?
data : char(10),
num(10) type n.
You can use move statement also.
move char to num.
OR you can use any FM, check below which will works for you.
C14W_CHAR_NUMBER_CONVERSION
MOVE_CHAR_TO_NUM
CONVERT_STRING_TO_INTEGER
NUMERIC_CHECK
CATS_ITS_MAKE_STRING_NUMERICAL
Cheers,
Kris.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.