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

Comparing the numeric values according to sign

Dear Gurus,

I have a requirement that if the numeric value is (-ve) than the formula will apply otherwise it will not done.

So how to compare the values according to sign so that the system understands the difference of (-ve)

and (+ve) values.

Hope to get reply soon.

Regards,

Himanshu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 01:11 PM

    Hi,

    do like below..

    If value LT 0.

    endif.

    Hope it helps!!

    Regards,

    Pavan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 01:12 PM

    Hi,

    If <urvalue> lt 0.

    do this.

    else.

    do this.

    endif.

    Hope this will help u.

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 01:14 PM

    Hi,

    You can try this approach.....

    data: l_val type i.

    if l_val < 0.

    • do your processing here

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 01:14 PM

    Thanks Gurus.

    Regards,

    Himanshu Rangappa

    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.