Application Development 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: 

Search Help Condition check for Upper Case and Lower Case

Former Member
0 Kudos

Hi All,

I have to check the field for upper case and lower case in a search help.

Eg. if the user enters main or MAIN in the parameter field of the search help, it should take as MAIN i,e in CAPS for comparision.

Could you pls let me know how can i achieve this....

Thanx in advance,

Surehs

8 REPLIES 8

Former Member
0 Kudos

Use Translate UPPER

TRANSLATE c TO UPPER CASE.

Rgds,

Mano Sri

Former Member
0 Kudos

Suresh,

I dont think the CASE will be a problem!!!!

Thanks

Kam

0 Kudos

Hello,

Could you pls tell me where i have to write the code for this.. for a search help... ??

Thanx,

Suresh

0 Kudos

Hello,

I guess you guys didnt get my question, this comparision is for a SEARCH HELP PARAMETER... Pls tell me where can i write the condition for this...

Thanx,

Suresh

0 Kudos

SURESH,

As per my understanding, u cannot convert the SEARCH HELP PARAMETER in the program!!!!!!

And i feel the CASE (with the user fills in the Search Help parameter ) wouldnot be a problem.

Thanks

Kam

Note : Allot points for all worthful postings

Message was edited by: Kam

Former Member
0 Kudos

Hi,

Have the solution.

REPORT z3xfr_krreddy_test .

PARAMETERS: p_field1(10) TYPE c,

p_field2(10) TYPE c LOWER CASE.

WRITE / : p_field1.

WRITE / : p_field2.

Explanation:

By default it considers upper case.

your problem is solved considering p_field1.

if U want to convert that to lower case then consider p_field2 example.

Enjoy SAP

K.R.Reddy

Former Member
0 Kudos

Hi Suresh.......

For a case insensitive search help you have to check the domain of the field for which you are creating the search help.

In the domain screen if the "lower case" check-box is ticked the that makes it case sensitive.

The proper SAP standard example for this is material description wise search help for a

material. In that case, they have used domain as MAKTG(case insensitive) instead of MAKTX (case sensitive).

Hope this will help you and solve ur problem.

Regards,

Raj

Former Member
0 Kudos

Hi Suresh,

If your scenario is to get search help for all possible cases(Lower case, Upper case & Mixed cases) like below.

MAIN , Main, main ,MaiN , 'MAiN*

Here is one of the possible solution.

Define an extra field in the search table and remember you should not check Lowercase option while defining the domain .

While saving the data into table for the field, Convert the content to upper case & store that value.

In your search help condition you should use the new field instead of old field.

This would take care about all cases when you are searching using search help.

Cheers

Raghava