How To Use BigDecimal Output Data Type in Mathematical Operations
(Doc ID 2423927.1)
Last updated on DECEMBER 22, 2020
Applies to:
Oracle Fusion Sales - Version 11.12.1.0.0 and laterInformation in this document applies to any platform.
Goal
On : 11.12.1.0.0 version, Opportunities
I am attempting to use the groovy script function 'adf.util.getCurrencyRate()' in an object function.
The return type is BigDecimal.
However, I am unable to perform any math operations on the resulting variable, even when it is interacting with a variable of type java.math.BigDecimal.
Upon validating the script, the following message is returned:
Warning(14,32) : Cannot find matching method java.math.BigDecimal#multiply(BigDecimal). Please check if the declared type is right and if the method exists.
Code:
def current_val = new BigDecimal(0)
def top_currency = CurrencyCode
java.sql.Date top_date = new java.sql.Date(CreationDate.getTime())
def conversionrate = adf.util.getCurrencyRate(row_currency,top_currency,top_date)
def additional_val = row_val * conversionrate
current_val = current_val.add(additional_val)
Changing row 14 to 'def additional_val = row_val.multiply(conversionrate)' has the same result
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |
References |