cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Filter not working for operators GT, LT etc.,

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hello Krishna,

I have checked the function module 'MOVE_CHAR_TO_NUM', but it is not available in some of the systems. Is there any other function module that belongs to the SAP_BASIS component ?

Thanks and Regards,

Aslin

Former Member
0 Kudos

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.