Application Development 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: 

Function Module tto check special characters in a field

Former Member
0 Kudos

Hi All,

I have a requriemnt where i need to make sure there are no special characters allowed

in a paremeter ( is there any functional module to check it)

r anyway to work with

Thank in advance for u replies.

Regards,

Riyaz.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate

Don't think that there is a function module, but you can of course check this manually. For example, say you want to check for a set of values.



If im_parameter ca '/.,:;"[]\{}|<>?/'
   message e001(00) with 'Special Characters not allowed'.
endif.

Regards,

Rich Heilman

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate

Don't think that there is a function module, but you can of course check this manually. For example, say you want to check for a set of values.



If im_parameter ca '/.,:;"[]\{}|<>?/'
   message e001(00) with 'Special Characters not allowed'.
endif.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Mohd..

Use FM

CHECK_STRING_SPEC_CHARACTERS

Cheers

Lokesh

Former Member
0 Kudos

Hi Farooq,

Check this.

Its a very simple way.

DATA : TEMP(10) VALUE 'sam@'.

IF TEMP Ca '@#$%^&*'.

WRITE : 'SPECIAL CHARACTER'.

ELSE.

WRITE : 'NO SPECIAL CHARACTER'.

ENDIF.

Thanks.

Former Member
0 Kudos

DATA: vergleich_string(100) VALUE

'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.

CONCATENATE vergleich_string ' 1234567890,./!@#$%&*-_+=~|\[{]}()"'

INTO vergleich_string.

use condition.

if var ca vergleich_string.

raise error message.

endif.

Former Member
0 Kudos

Thank u all

solved the problem...

Regards

Riyaz.