I have an After Submit computation in my APEX 5.1 application that looks like this:
Type: PL/SQL Function Body
PL/SQLFunction Body:
return fz_pct_of_total(:P2_ZORENRL_APPL, :P2_ZORENRL_INQ);
That PL/SQL function looks like this:
create or replace function fz_pct_of_total (num1 number,
totl number)
return number
as
pct_of_total number(12,4);
begin
-- If both numbers are positive, use normal calculation
if num1 != 0 and totl != 0 then
pct_of_total := (num1 / totl) * 100;
else
pct_of_total := 0;
end if;
return pct_of_total;
end;
The P2_ZORENRL_INQ, P2_ZORENRL_APPL, AND P2_ZORENRL_PCT_APPL fields are all defined as Number fields.
The format mask for P2_ZORENRL_PCT_APPL IS 999G999G999G999G990D0000
I don't understand why I'm getting this error.
When I look at the session variables after the error is displayed, they have the following values:
P2_ZORENRL_INQ Number Field 1600
P2_ZORENRL_APPL Number Field 1500
P2_ZORENRL_PCT_APPL Number Field 93.75
Can anyone suggest other things to looks at?