cancel
Showing results for 
Search instead for 
Did you mean: 

check Case sensitive values

Former Member
0 Kudos

A field value is coming in caps.

lf_tmp = u2018RMu2019.

I have to check this with another field lf_werks ,which always comes in small letters.

if lf_tmp CN lf_werks .

MESSAGE e002(zm) WITH 'The Path is wrong for the plant'

p_werks.

ENDIF.

This check always fails even if the values are like belowu2026

lf_tmp = u2018RMu2019.

lf_werks = u2018rmu2019.

How do I by-pass this case sensitiveness u2026.when I want to do the check.

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

naimesh_patel
Active Contributor
0 Kudos

Convert yout lf_tmp into the Lowercase and than do the comparision.

Like:


TRANSLATE IF_TMP TO LOWER CASE.

if lf_tmp CN lf_werks .
MESSAGE e002(zm) WITH 'The Path is wrong for the plant'
p_werks.
ENDIF.

Regards,

Naimesh Patel

Former Member
0 Kudos

Actually, I'd do it the other way:

TRANSLATE lf_werks to UPPER CASE.

Since lf_werks can be a combination of upper and lower case, translating lf_tmp to lower case may not always work. This way you are always comparing upper case to upper case.

Rob

naimesh_patel
Active Contributor
0 Kudos

Yes, I would go with that But, I replied to that based on the:

I have to check this with another field lf_werks ,which always comes in small letters.

Regards,

Naimesh Patel

Former Member
0 Kudos

>

lf_werks ,which always comes in small letters.

That's the part I didn't believe.

Rob

Answers (0)