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

problem with filter in alv layout

Former Member
0 Likes
777

I have an ALV output with the field KSTAR , the fieldlength is 10 characters but the values containing it only have 5 values. when I have the output and try to filter on the value 55000 then no result.

I have already removed the trailing 0's from the value so the value in the field is 55000.

when I filter on 55000* the filter works .

Is there any way to make it work as a user would expect it to work ?? so with Entering the value 55000 .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
708

hi

good

try to use these function modules

CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right

Example:

input = 123

output = 0000000000000...000000000000123

CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer

Example:

input = 00000000000123

output = 123

thanks

mrutyun^

I have an ALV output with the field KSTAR , the fieldlength is 10 characters but the values containing it only have 5 values. when I have the output and try to filter on the value 55000 then no result.

I have already removed the trailing 0's from the value so the value in the field is 55000.

when I filter on 55000* the filter works .

Is there any way to make it work as a user would expect it to work ?? so with Entering the value 55000 .

4 REPLIES 4
Read only

Former Member
0 Likes
709

hi

good

try to use these function modules

CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right

Example:

input = 123

output = 0000000000000...000000000000123

CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer

Example:

input = 00000000000123

output = 123

thanks

mrutyun^

Read only

0 Likes
708

with conversion input the problem was solved :). still I find it strange to add trailing zeros to be able to use the filtermethod.

the last option mentioned

WHEN 'KSTAR'.

lo_fieldcat-edit_mask = '==ALPHA'.

MODIFY tab_fieldcat FROM lo_fieldcat.

didn't work. ?

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
708

Hi Smidt,

The filter functionality should work even if u have 5 char long value but if not working then u can use the FM as given in above thred.

Hope this helps.

Read only

Former Member
0 Likes
708

in the fieldcataloag for that field , add this and try out

wa_fieldcat-edit_mask = '==ALPHA'.