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

lowercase

Former Member
0 Likes
1,171

Gurus!

is there a way for me to know if a string is in lowercase or uppercase letter?

example

if 'm' = 'M'.

ANSWER: false

if 'm' = 'm'.

ANSWER: true.

if 'M' = 'M'.

ANSWER: true.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,125

Check this way out


PARAMETERS : zparam(1) TYPE c.

IF zparam CA sy-abcde.
WRITE:/ 'Upper'.
ELSE .
WRITE:/ 'lower'.
ENDIF. 

5 REPLIES 5
Read only

Former Member
0 Likes
1,125

Hi,,

use this keyword..

TRANSLATE

Converts characters in strings.

Syntax

TRANSLATE <c> TO UPPER|LOWER CASE

|USING <r>.

The characters of the string <c> are converted into upper- or lowercase, or according to a substitution rule specified in <r>.

Hope this helps u,,

Regards,

Arunsri

Read only

0 Likes
1,125

my problem is i need to know if a string is in upper case and lower case not how to translate it in upper/lower.

is there a way?

Read only

Former Member
0 Likes
1,126

Check this way out


PARAMETERS : zparam(1) TYPE c.

IF zparam CA sy-abcde.
WRITE:/ 'Upper'.
ELSE .
WRITE:/ 'lower'.
ENDIF. 

Read only

0 Likes
1,125

thanks its working.ill give u perfect points.till next

Read only

Former Member
0 Likes
1,125

write as :

data : v_a1(1) value 'a',

v_a2(1) value 'A'.

if v_a2 CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.

WRITE 😕 'true'.

ELSE.

WRITE 😕 'false'.

ENDIF.