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

Function module for checking alphanumeric characters

Former Member
0 Likes
4,249

Hi All,

Is there is any function module for checking if an input is alphanumeric or a number?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,962

IF wa_string CO '0123456789'.

*-- it has numbers only

ELSE.

*-- alpha numeric

ENDIF.

5 REPLIES 5
Read only

Former Member
0 Likes
1,963

IF wa_string CO '0123456789'.

*-- it has numbers only

ELSE.

*-- alpha numeric

ENDIF.

Read only

0 Likes
1,962

Hi,

or try with command catch (F1)

CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.

MOVE text TO amount.

ENDCATCH.

IF sy-subrc EQ 1.

*not numeric

...

A.

Read only

Former Member
0 Likes
1,962

HI

good

i dont think there is any such function module who can check the number as alpha numeric or number, you have to write the logic for that.

thanks

mrutyun

Read only

Former Member
0 Likes
1,962

hello,

use the below FM

NUMERIC_CHECK.

Thanks,

Krishnakumar

Read only

Former Member
0 Likes
1,962

Hello,

Use the FM <b>NUMERIC_CHECK</b>. It will gives u the DATATYPE OF THE INPUT.

If useful reward.

Vasanth