12-21-2009 6:18 AM
Hi Experts,
I have entries in table as mixed case. For example i am searching on an attribute called description in the table. I want the serch to be case insensitive for that attribute. Because in table it is i.e. JUMBO Pack and in the search attribute it is i.e. Jumbo Pack.
I do not want to translate both to the same case and search. Is there an option?
Best Regards!
Sandip
12-21-2009 6:32 AM
If its not a 'Z' table then there is no option.
But you can try some thing like
if aB is the input.
You can generate the cobinations and put into a range and then use in select
aB
Ab
ab
AB
Its a hard logic to build .. BUt i see this as an option
12-21-2009 6:26 AM
Hello,
Check if the Lowecase checkbox is checked in the domain attributes of the particular field of the table. If its a Z table, and this checkbox is not set, you can check it and make the search case insensitive.
Vikranth
12-21-2009 6:35 AM
Hi Vikranth,
The checkbox is checked in the domain. That is why, "If this indicator is set, upper case and lower case are distinguished when you enter values with screen masks.
Otherwise all the letters entered will be converted to upper case when you enter values with a screen mask.
This mechanism is in effect for all the fields referring to this domain.".
This doesn't help my purpose. Thanks for the help.
Best Regards!
Sandip
12-21-2009 6:32 AM
If its not a 'Z' table then there is no option.
But you can try some thing like
if aB is the input.
You can generate the cobinations and put into a range and then use in select
aB
Ab
ab
AB
Its a hard logic to build .. BUt i see this as an option
12-21-2009 6:36 AM
Hi KSD,
This seems to be a much tougher proposition than converting both strings to a common case and compare.
Thanks for the help.
Best Regards!
Sandip
12-21-2009 7:15 AM
Hi Sandip, I wrote a wiki for a similar scenario: [select the text from lower case data element|http://wiki.sdn.sap.com/wiki/x/6gGHBQ] hope that helps you.
12-23-2009 2:58 AM
Hi Guys,
Thanks for your suggestions. But i do not find a direct alternative to translating and comparing. So i am closing the message. Atleast this post helped to know that there is no direct ABAP supported way to copare mixed strings. Eg: like ignore case parameters for string matching in many languages .
Thanks!
Sandip
12-21-2009 6:52 AM
Hi Sandip,
One more alternative:
If ztext is ur original field which is saving the mixed text.
Append one extra field(ztext_upper) to the table.
Now if " Sap Sdn" is the text we are saving then
While saving the entires to the table,
1. asusual save the value(" Sap Sdn") to teh original field(ztext)
2. translate the value to upper case(SAP SDN) and save this entry to teh newly appended field(ztext_upper)
Now while doing search, translate to upper case and compare with the value in ztext_upper. If it satisfies then for display options select the original value from the field (ztext) which is corresponding to the satisfied ztext_upper field.
Regards,
Swarna Munukoti.
12-21-2009 7:03 AM