cancel
Showing results for 
Search instead for 
Did you mean: 

Filter functionality is not working....

Former Member
0 Kudos

Hi Experts,

I have developed an application where I am using Filter functionality on table. It is working fine but how to make the search case insensitive.

Thanks,

Deepshikha

Accepted Solutions (0)

Answers (1)

Answers (1)

Madhu2004
Active Contributor
0 Kudos

Can you elaborate on what you mean by search case insensitive?

Regards,

Madhu

Former Member
0 Kudos

Hi Madhu,

My functionality is working fine if we search with either the 'EXACT name' as that of the record or 'part of the name followed by *' AND THAT TOO only CASE SENSITIVE.

I need help how to make the search CASE INSENSITIVE.

Thanks.

Deepshikha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The only way is to make sure that all the data is converted to the same case. You can use the ABAP commands TRANSLATE TO UPPER CASE, for example. If all your source data is upper case (as is quite often the situation in ABAP) then simply translate the filter to upper case before performing the search for the filter logic.

If all your data is mixed case you might have to create another column in your source internal table to hold a converted version of the text.

Former Member
0 Kudos

Hi Thomas,

Thanks for the reply.

Our data is mixed as you said.But can you elaborate on your solution.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

If the data in the table itself is mixed, I would suggest creating another column in the internal table (that won't be displayed). You can then loop through the table and for each row copy the dta to the additional column and perform the TRANSLATE TO UPPER CASE on it. This way you have a copy of all the data which is case insensitive in order perform the filter upon.

Former Member
0 Kudos

Hello Thomas,

i thought about it but by this way basically we are converting the data of the complete table in UPPER CASE and then search will be performed using UPPER CASE LETTERS only.

My exact requirement is as this example

Scenario 1:

FILTER

DEEP

DATA

DEEP

dee123

Present result = DEEP

Scenario 2:

FILTER

deep

DATA

DEEP

dee123

Present result = no result ( i want DEEP to come so that search becomes case insensitive without *)

and similarly vice versa.

Former Member
0 Kudos

Convert all data in the table to upper case as Thomas has mentioned. When the user enters the search criteria convert that as well to upper case and then search.

Example:

Data in table before conversion:

deep

Dee123

Data in table after conversion to upper case: (do not display this to user, store it internally)

DEEP

DEE123

Now when the user enters the filter as 'Deep', convert this to upper case. Then it becomes 'DEEP' which can be found in the table as first row. Therefore you can return 'deep' from the orginal table to the user.