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: 

To Calulate Balance

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try:

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

5 REPLIES 5

Former Member
0 Kudos

Try:

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

0 Kudos

Hi Rob,

Thanks for updating me,

I tried with that option previously, only thing is i dint space between quotes,

but i don't it is working fine or not , i don't have negative right know.

once again Thanks

Byee

ramesh

0 Kudos

Hi,

In Debuggine mode, you can assign negative value to the variable and then check the same.

Former Member
0 Kudos

Try putting it into a constant

c1 = 50

c2 = c1 * -1.

now check your condition between c1 and c2

Regards,

siva chalasani.

Former Member
0 Kudos

what is the type of this balance field...

Regards,

DIPIKA