‎2008 Jul 10 3:49 AM
hi experts ,
in my sap script, i have to put condition on a field. the positive value of that field should write the word 'Debit' and -ve value should be prefixed by 'Credit'.
i have written the following code:
/: IF &RF130-SALDO& < 0
AS CREDIT
/: ENDIF
/: IF &RF130-SALDO& > 0
AS DEBIT
/: ENDIF
But the code is not working fine. can anyone suggest me something on it ?
thanx in advance
akanksha
‎2008 Jul 10 10:27 AM
Hi Akanksha,
Evaluation is performed strictly from left to right. The comparison is always performed on literal values, to compare a value with simply '0' doesn't work. You have to use the exact value.
Regards, Norbert
‎2008 Jul 11 6:28 AM
hi Norbert,
well i actually have to check for the -ve and +ve values of the specified field. that is y i m comparing it with < 0 and > 0.
is there any other way out ?
‎2008 Jul 11 7:20 AM
HI, you can use this statement, but you will have to compare with a value like '0.000,00' - try some different lenghts and versions, I dont know how long exactly your field is. Regards
‎2008 Jul 11 7:27 AM
dear norbet ,
my field type is currency.
i have tried it the y way u hav written