Skip to main content
Hello everyone,
I’m trying to update the QtyToIssue value of a line with the QtyRemToIssue value from the header.
I’ve created a BPA (Business Process Automation) that retrieves this value by calling the attached function.
However, when I run it, I get the following error message:
class java.lang.Integer cannot be cast to class java.math.BigDecimal (java.lang.Integer and java.math.BigDecimal are in module java.base of loader 'bootstrap')
It seems there’s a type mismatch when the value is passed between the BPA and the function — probably because the field or variable is defined as Integer instead of BigDecimal.
 Has anyone faced a similar issue or knows how to properly handle this conversion (e.g., using an expression or a to_number() / BigDecimal.valueOf() call in the function)?
Thanks in advance for your help!

 

@Karim.katif5 

Will this approach work in your case?
 

 


Same issue