hi
I have a report with a formula column to display the invoice description. For few accounts it is working fine but for few accounts it is displaying an error
what might be the problem, i have tried for a solution in google but it says null value has been assigned to a non null column. but i don't find such thing any where in my code.
Please help me out
here are the details
ERROR:
Spawned Process 12357
MSG-00001: kakrishn 1
REP-1401: 'cf_inv_descfor mula': Fatal PL/SQL error occurred.
ORA-06502: PL/SQL: numeric or value error
FORMULA COLUMN:
function CF_INV_DESCForm ula return char is
v_desc varchar2(2000);
description varchar2(5000);
cursor cur1 is
(select reference2,refe rence5
from ap_ae_lines_all
where reference3 =:reference_3
and AE_LINE_TYPE_CO DE ='LIABILITY');
begin
for i in cur1
loop
begin
select description into v_desc
from ap_invoices
where invoice_id = i.reference2;
exception
when no_data_found then
null;
end;
description := description||' '||i.reference5 ||'-'||v_desc||chr( 10);
end loop;
if :C_category = 'Payments' then
return description;
else
return :descr;
end if;
-- return :descr;
end;
I have a report with a formula column to display the invoice description. For few accounts it is working fine but for few accounts it is displaying an error
what might be the problem, i have tried for a solution in google but it says null value has been assigned to a non null column. but i don't find such thing any where in my code.
Please help me out
here are the details
ERROR:
Spawned Process 12357
MSG-00001: kakrishn 1
REP-1401: 'cf_inv_descfor mula': Fatal PL/SQL error occurred.
ORA-06502: PL/SQL: numeric or value error
FORMULA COLUMN:
function CF_INV_DESCForm ula return char is
v_desc varchar2(2000);
description varchar2(5000);
cursor cur1 is
(select reference2,refe rence5
from ap_ae_lines_all
where reference3 =:reference_3
and AE_LINE_TYPE_CO DE ='LIABILITY');
begin
for i in cur1
loop
begin
select description into v_desc
from ap_invoices
where invoice_id = i.reference2;
exception
when no_data_found then
null;
end;
description := description||' '||i.reference5 ||'-'||v_desc||chr( 10);
end loop;
if :C_category = 'Payments' then
return description;
else
return :descr;
end if;
-- return :descr;
end;
Comment