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 String Comparing

Former Member
0 Likes
670

Hai friends

I have doubt on case sensitive of upper case or lower case

EXP:

I have two string in two variable

Data: string1 type string value u2018ABCDu2019 ,

String2 type sting value u2018abcdu2019.

How do I comparing which string upper case or lower case of the string?

by

imuthu.

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
618


FIND all occurrences of string1 in string2 RESPECTING CASE  .

4 REPLIES 4
Read only

Former Member
0 Likes
618

you can use regular expression to check upper case or lower case.

type regex in SE38. press F1 . you will get all options.

Read only

athavanraja
Active Contributor
0 Likes
619


FIND all occurrences of string1 in string2 RESPECTING CASE  .

Read only

0 Likes
618

There are 2 methods you can use it,

1 Convert any one of the variable in lowecase or uppercase and then compare it.

To convert text to uppercase or lowercase use TRANSLATE stmt.

Data: string1 type string value u2018ABCDu2019 ,

String2 type sting value u2018abcdu2019.

Translate string2 to Upper case.

or

Translate String1 to lower case

if string1 eq string2.

endif.

2 USE Find Stmt.

FIND ALL OCCURRENCES OF STRING1 to STRING2 RESPECTING CASE.

Thanks & Regards,

ShreeMohan

Read only

Former Member
0 Likes
618

CANCEL THIS QUESTION