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

Lower case / upper case

h_senden2
Active Contributor
0 Likes
564

Hi,

In a standard SAP table I have an entry field1 'Abcdef'. (domain has lower case checkbox checked).

In a new RFC the user must have the possibility to fill in 'AB' or 'ab' (so case insensitive), and the rfc must return the record with field 'Abcdef'.

Is there a way to make the select statement case insensitive on that field?

regards,

Hans

hans.senden@philips.com

3 REPLIES 3
Read only

Former Member
0 Likes
506

I understand this will have to be done in ABAP (select all records from the table and loop through, translating and matching each record).

Or, if the RFC is sending only a few characters (say two first chars only, like AB*), you can create a select like

<i>where field1 like 'AB&' or field1 like 'Ab&' or field1 like 'ab&' or field1 like 'aB&' ...</i>

Read only

0 Likes
506

Unfortunately i don't know what search string the rfc is sending. I can be 2 long (4 possibilities) but it can also be 16 position (a lot of possibilities).

I've solved it in another way :

I have to search for the vendor's name (LFA1-NAME1). So i cannot write all vendor names first to upper case. In some case the user want to print the vendor's name in both upper/lower case.

But I have found a field LFA1-MCOD1 (Search term for matchcode search) which contains the first 25 characters of LFA1-NAME1 (35 charachers) in upper case. With restrictions to the length i can use this field.

For the other text field for which the problems exists, country's name (T005T-LANDX), i can first read all countries into an internal table, translate them to upper case and do the search. There only 237 countries in our system, so this must not be such a performance problem.

regards,

Hans

Read only

Former Member
0 Likes
506

Hi,

Use the <b>TRANSLATE</b> stmt.

data myfield(20).

myfield = 'AB*' .

translate myfield+1(19) to lower case.

write myfield.

output Ab*

Svetlin