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: 

FM to check whether an input is numeric

Former Member
0 Kudos

Hi ,

I am uploading data from a file to an internal table , i want to check whether the value uploaded in a perticular field is numeric or not.

Is there any FM to do it.

Regards

Arun

4 REPLIES 4

FredericGirod
Active Contributor
0 Kudos

Hi,

Why don't you play with ca co ? (contain any, contain only)

Frédéric

Former Member
0 Kudos

Hi Arun,

may be you can just use

CHECK field CO '0123456789.,'.

regards

Siggi

Lakshmant1
Active Contributor
0 Kudos

Hi Arun,

Check the value with system variable SY-ABCDE to find out whether any alphabets are there or not. The system variable Sy-ABCDE contains all alphabets.

Also check FM NUMERIC_CHECK.

Thanks

Lakshman

Message was edited by: Lakshman Tandra

andreas_mann3
Active Contributor
0 Kudos

Hi,

1)

data amount type p decimals 2.

CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.

MOVE itab-field TO amount.

ENDCATCH.

IF sy-subrc EQ 1...

or

2)

regards