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

To Calulate Balance

Hi Friends,

I Have field to calculate balance .

If it is ranges from + 50 to -50 it should be written as settled.

if not print the value of balance , here i am giving the code but i am unable to include negative value. i am getting error.

IT_FINAL1-BALANCE = IT_FINAL1-TOT_AMOUNT - IT_FINAL1-FC_AMT.

IF IT_FINAL1-BALANCE GE 50 OR IT_FINAL1-BALANCE LE ( - 50 ).

IT_FINAL1-BALANCE = 'Settled'.

ENDIF.

Thanks in advance.

ramesh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 03:56 AM

    Try:

    IF IT_FINAL1-BALANCE GE 50 OR IT_FINAL1-BALANCE LE ' - 50 '.  "<=== Single quotes
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 04:04 AM

    Try putting it into a constant

    c1 = 50

    c2 = c1 * -1.

    now check your condition between c1 and c2

    Regards,

    siva chalasani.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 04:07 AM

    what is the type of this balance field...

    Regards,

    DIPIKA

    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.