Please see this error REP-1401 or ORA-01403 [message #205763] |
Mon, 27 November 2006 07:53 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
Rep-1401: 'CF_2Formula'; Fatal PL/SQL Error eccourred
ORA-01403 not data found.
I wrote these lines in formula there is no complied error but when I run the report shows above error.
Please help why?
function CF_2Formula return Number is
yopn number(10,2);
yrec number(10,2);
mqty number(10,2);
total number(10,2);
PR_NOT_FOUND EXCEPTION;
begin
--- opening balance from yarn table
Select sub1.opn, sub2.RecKGS, sub3.rmqty into yopn,yrec,Mqty from
(select y.yarn_type, y.balance Opn from yarn y) sub1,
(select yr.yarn_type yarnType, sum(yr.rec_kgs) RecKGS
from sub_yarn_received yr group by yr.yarn_Type) sub2,
(select p.ppno ppno, p.subpp subpp, p.req_date ETD, p.fabric_code, sum(s.req_kgs) RmQTY, p.b_code
from program p, sub_program s
where s.jobno = p.jobno
and req_date not between :dd and :dd1
group by p.ppno, p.subpp, p.b_code, p.fabric_code, req_date) sub3,
(select l.fabric_code fabric_code, sl.yarn_code yarn_code, sl.cons cons
from link l, sub_link sl
where sl.jobno= l.jobno
group by l.fabric_code, sl.yarn_code, sl.cons) sub5,
(select y.yarn_code, y.yarn_type yarn from yarn y) sub6,
(select b.b_code, b.b_ref
from buyer b) sub4
where sub3.b_code = sub4.b_code
and sub5.fabric_code = sub3.fabric_code
and sub5.yarn_code=sub6.yarn_code
and sub6.yarn = :yarn
and sub2.yarnType = :yarn
and sub1.yarn_type = :yarn;
IF SQL%NOTFOUND THEN
RAISE PR_NOT_FOUND;
END IF;
EXCEPTION
WHEN PR_NOT_FOUND THEN
null;
total:= yopn+yrec+mqty;
return(total);
end;
|
|
|
|
|
|