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

How to avoid case sensitivity in select statement while matching with the range table

Former Member
0 Likes
2,307

Hi Experts,

I am accepting the first name and last name  of client from the ui . now these datas are coming in range table.

My requirement is i need to match these names with out case sensitiveness.

Eg: input Vinod then it should match below all

VINOD

vInod

VInoD

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,049

Which table you are querying it into ? Check if the table has a field which holds the value in ALL CAPS. In this case, translate everything to caps and query it.

As Raymond said, Search for the available information.

Hi Experts,

I am accepting the first name and last name  of client from the ui . now these datas are coming in range table.

My requirement is i need to match these names with out case sensitiveness.

Eg: input Vinod then it should match below all

VINOD

vInod

VInoD

5 REPLIES 5
Read only

former_member585060
Active Contributor
0 Likes
2,049

Hi,

    Move the data to a new field, then translate them to UPPER CASE or LOWER CASE and then use that variable for comparision.

Ex:-

DATA : lv_name TYPE c LENGTH 15,

             lv_field   TYPE c LENGTH 5.

  lv_field = 'Vinod'.

  TRANSLATE lv_field TO UPPER CASE.

LOOP AT r_name1.

  lv_name = s_name1-low.

  TRANSLATE lv_name TO UPPER CASE.

  IF lv_name1 LIKE lv_field.

    Your logic

  ENDIF.

  CLEAR : lv_name.

ENDLOOP.

Thanks & Regards

Baa Krishna

Read only

Former Member
0 Likes
2,049

Hi,

one possible solution is Select everything by other selection conditions except name. Loop at internal table and convert name to uppercase and check this name exists in your range. Now you can delete record if it is not found in range.

thanks.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,049
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,050

Which table you are querying it into ? Check if the table has a field which holds the value in ALL CAPS. In this case, translate everything to caps and query it.

As Raymond said, Search for the available information.

Read only

Former Member
0 Likes
2,049

Hi Vishal,

            you can use operators for comparing strings like CS (Contain String).

Refer to the below link for comparing strings with case insensitiveness.

http://help.sap.com/saphelp_bw/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm

Regards

Sindhuja