Skip to Content
0
Former Member
Oct 02, 2012 at 05:55 PM

How to exclude spaces/ special characters while checking for an alphanumeric key

1160 Views

Hi Experts,

I have a case where I need to check for an alphanumeric key number in the first few characters of a field. However, there is a possiblity of spaces or special characters being present. I have used 'CA' operator to check for numbers and alphabets. However, these two checks alone do not deal with spaces and spaces/ special characters are likely included in the output.

"

IF ( operator1(4) CA '%0123456789%' " Check for numbers
AND operator1(4) CA sy-abcde ). " Check for alphabets

DO something.

END IF.

"

Is there an easier way to add an additional check for getting rid of spaces/ sp characters, apart from counting string lengths?

Thanks in advance,

PKD