on 09-30-2009 2:19 PM
Hi All
In my web dynpro application I use a ALV grid to present the data from the database table. It works fine except when users click on the filter settings I have a column called Region.
The values in the table for region are values like CanadaEast, USEast, MexicoEast, East, West, MexicoWest ,etc
When the user puts a value for filtering at the top as East it seems to Show all records with values like CanadaEast, USEast, MexicoEast and also East. So appears the the filter seems to do pattern search and show all records containing East anywhere in the filter not just East .
Appreciate if any of you can share ideas how I can force the filter to bring only records with just East rather than showing all records with values like CanadaEast, USEast & MexicoEast.
Also are there any options to use in the filter search specification so I can avoid the pattern search but a exact search.
Thanks
Karen
Hi,
If you want to have the exact match then user needs to give the filter criteria as =EAST or EAST something like this.
If this doesnot work then you need to have your own filter condition and retireval process.
The ALV is of type CL_SALV_WD_FIELD, in this there is a filter there is a GET_FILTER_RULE method which
returns CL_SALV_WD_FILTER_RULE. In this class, it has a operator GET_OPERATOR(SALV_WD_FILTER_OPERATOR). when
you check this for fixed values you can find relevant oeprators. Now try these operators then you can understand.
CP Contains string
NP Does Not Contain Pattern
But how to test these 2 cases needs to be known. I mean how to give the filter criteria for the above values.
For Ex:
You can test with these criteria
*EAST*
(star oneither sides of the string) then this returns all the ones that has 'EAST' in it which acts as 'CS' search.
Edited by: Lekha on Sep 30, 2009 7:16 PM
Edited by: Lekha on Sep 30, 2009 7:20 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.