Skip to Content
author's profile photo Former Member
Former Member

how to check numeric on data type P

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 10:29 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.