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

alv filter not working

Former Member
0 Likes
814

Dear all,

In my alv report if char field is there like Kunnr, Maktx and when i am filtering its not working its showing blank value.

where as when i am using some Numric or Int value like VBELN or ERDAT and Filtering its working fine.

what will be the Problem ?

                                                • Point is Assured.*****************

Dear all,

In my alv report if char field is there like Kunnr, Maktx and when i am filtering its not working its showing blank value.

where as when i am using some Numric or Int value like VBELN or ERDAT and Filtering its working fine.

what will be the Problem ?

                                                • Point is Assured.*****************

5 REPLIES 5
Read only

Former Member
0 Likes
731

Hi Jim,

Try entering the filter text with *.

eg

TEST

and then filter.

Best regards,

Prashant

Read only

0 Likes
731

Hi

Try like this

what i found to filter records : you can use the code below

1/ fill the internal table filter_1


DATA: FILTER_1 TYPE SLIS_T_FILTER_ALV,
WA_FILTER TYPE slis_filter_alv.
* Filter für detail setzen
WA_FILTER-TABNAME = 'WT_EDIT_PLT'.
WA_FILTER-FIELDNAME = 'KUNNR'.
WA_FILTER-SIGN0 = 'I'.
WA_FILTER-OPTIO = 'BT'.
WA_FILTER-VALUF_INT = '0000300080'. 
WA_FILTER-VALUT_INT = '0000300090'.
APPEND WA_FILTER TO FILTER_1.



2/export the internal table filter_1 to the function module REUSE_ALV_LIST_DISPLAY.

  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING     i_callback_program             = wv_repid
                     i_callback_user_command        = 'USER_COMMAND'
                     is_layout                      = wps_layout
                     it_fieldcat                    = wpt_fieldcat
                     i_default                      = 'X'
                     i_save                         = 'A '
                     it_events                      = wpt_events[]
                     IT_FILTER                   = filter_1
 
       TABLES        t_outtab                       = wpt_itab
       EXCEPTIONS    program_error                  = 1
                     OTHERS                         = 2.

the displayed ALV list will concern kunnr between '0000300080' AND '0000300090'.

Reward points if helpfull

Regards

Pavan

Read only

Former Member
0 Likes
731

It seems that ur trying to filet on fields like descriptions. I guess the problem is with the case of the letters ( u r searching with uppercase and the entry is in lower case).

if you are filtering after keying the value - then i will suggest you to pick it from the drop down list while applying the filter.

Hope it will solve ur prob. if it doesnt then revert back.

Read only

Former Member
0 Likes
731

Thanks Patil,

Your idia is working, Point has been Given.

Also Thannks all .

Read only

Former Member
0 Likes
731

Thanks to all,

Point has been given