cancel
Showing results for 
Search instead for 
Did you mean: 

How to make an input field case sensitive?

Former Member
0 Kudos

Hi Guys,

There's a very simple request that I should allow user to enter mix-case string and save to database.

And next time we read it out from DB, it should stay mix-case.

But I found it's hard to meeting this requirement.

1. I can't make an input field on the web dynpro abap application case sensitive. after I finish my input, the content

will be automatically translated to upper case. Any idea how to achieve this?

2. I can't search in DB case-insensitive. e.g. there's a record contain string: 'AbAp' , but when the search parameter I get from

user input is always ' ABAP ' , whatever I try, that record can never be addressed.

Thanks for your help in advance.

Regards,

Aaron

Accepted Solutions (1)

Accepted Solutions (1)

former_member262988
Active Contributor
0 Kudos

Hi,

If the field is your custom field you can set the check box lower case at domian level

Thanks,

Shailaja Ainala.

Former Member
0 Kudos

Hi,

there is no standard functionality is available in Layout to specify that the given input field is case-sensitive.

But you can change the case of the text entered in the code as required.

For example, if you want all the characters to be in upper case, you can use the following statement to change the same:

TRANSLATE text TO UPPER CASE

Similarly to convert it to lower case:

TRANSLATE text TO LOWER CASE

Regards,

Amarnath S

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Aaron,

I would suggest to take a look of option TO_MIXED which will converts the second position's first letter as Caps and the others in a lower case..

Sample Eg:

data: lv_name type string value 'TEST'.

TRANSLATE lv_name TO LOWER CASE.

DATA: lv_text TYPE string,

lv_string TYPE string.

CONCATENATE 'A ' lv_name INTO lv_text SEPARATED BY '_' .

""" here TO_MIXED option is used to get the mixed case but

lv_string = to_mixed( val = lv_text

sep = '_'

case = 'a'

min = '1' ).

write:/ lv_STRING.

Regards,

Sana.