Multiply method with BigDecimal

One Star

Multiply method with BigDecimal

Hi,
I'm using TOS v.3.1.3 and facing an error with the multiply method :
In TMAP, i have created a variable with BigDecimal type.
In this variable, I am trying to do this simple operation : row3.myamount.multiply(1000) -- row3.myamount is a bigdecimal too.
But while i'm trying to use this code, i'm facing this error :
"The method multiply (BigDecimal) of BigDecimal type does not apply to arguments (int)"
Can someone help me ?
Thx in advance


Accepted Solutions
Six Stars

Re: [resolved] Multiply method with BigDecimal

Hello,
1000 is not a BigDecimal, that's why you have this error. You can do :
row3.myamount.multiply(BigDecimal.valueOf(1000))

All Replies
One Star

Re: [resolved] Multiply method with BigDecimal

Hi,
after some help from a friend, I improve this solution :
- creating a variable "toto" = PersoNumeric.conversionBigDecimal("1000")
- in a second variable = row3.myamount.multiply(Var.toto)
Six Stars

Re: [resolved] Multiply method with BigDecimal

Hello,
1000 is not a BigDecimal, that's why you have this error. You can do :
row3.myamount.multiply(BigDecimal.valueOf(1000))