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 check a Character Variable?

Former Member
0 Likes
605

Hi,

I having the following code below.

Data: htext(10) Type C.

htext = '500 KG'.

Is there a Function to know that "htext" has Alphabetical characters as shown in the following example.

Thanks,

Kishan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
579

Hi Kishan,

You could do something like this

 if htext ca sy-abcde.  ...  endif.

kind regards

Pieter

3 REPLIES 3
Read only

Former Member
0 Likes
580

Hi Kishan,

You could do something like this

 if htext ca sy-abcde.  ...  endif.

kind regards

Pieter

Read only

Former Member
0 Likes
579

hi, try following code:

Data: htext(10) Type C.

data: compare(52) type c

value 'ABCDEFG.....Zabcdefghi....z'.

  • 52 alphabet include upper case and lower case

htext = '500 KG'.

if compare CA htext.

  • include alphabet

else.

  • doesn't include alphabet

endif.

hope this is helpful

thanks

Read only

0 Likes
579

Thanks All, Points awarded.