My Oracle Support Banner

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 and later
Information in this document applies to any platform.


On : 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.


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


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

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.