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: 

how to check numeric on data type P

Former Member
0 Kudos

hi all,

To check whether an input contain only numeric, we'll use

CALL FUNCTION 'NUMERIC_CHECK'.

how about for data type P which is containing decimal?

eg.

123.56

it will be treated as character due to the decimal dot.

i'm thinking of doing the CALL FUNCTION 'NUMERIC_CHECK' by separate it into 123 and 56.

please kindly advise if there is better option to do that.

thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Declare field ..

data : v_check(11) value '0123456789.'.

data : v_num(20).

pass '123.56' to v_num.

if v_num CO v_check.

else.

*give a message not numeric ...

endif.

1 REPLY 1

Former Member
0 Kudos

Declare field ..

data : v_check(11) value '0123456789.'.

data : v_num(20).

pass '123.56' to v_num.

if v_num CO v_check.

else.

*give a message not numeric ...

endif.