How to solve the error in application? [message #460808] |
Tue, 15 June 2010 00:14 |
mm_kanish05
Messages: 493 Registered: January 2007 Location: Chennai
|
Senior Member |
|
|
Hi,
i working under client/server technology. I received the following error.
Frm-40735: When-validate-item trigger raised unhandled exception ORA-12516
When Validate Item Code
Declare
Lb_Flag Boolean;
Li_Flag Number;
Lt_Id Timer;
Lt_Id1 Timer;
Li_Count Number;
Li_Count1 Number;
Li_Msg Number;
Al_Button Number;
L_month Number;
L_Year Number;
Lv_Status Varchar2(3);
Lv_Status1 Varchar2(3);
T_Timer Timer;
Lc_Found Varchar2(1);
Li_Button Number;
Ld_Sysdate Date;
lv_err_msg varchar2(100);
BEGIN
IF Upper(Item_Name) = 'CTL_BLK.TXT_VEP_NO' then
declare
cursor cur_prod is select prd_code,stn_wdn_tag,process_date,truck_no
from t_despatch_det
where vep_no = :txt_vep_no
and frm_wh_code = 'TN185';
cursor cur_acc_dt is select max(PROD_PRIO_SET_DATE)
from t_days;
cursor cur_trkchk(lv_truckno varchar2) is select nvl(count(*),0)
from t_truck_time
where vep_no = :txt_vep_no
and truck_no = lv_truckno;
acc_date date;
prc_date date;
lv_prd number;
lv_stn_wdn_tag number;
lv_truckno varchar2(15);
Begin
BREAK;
open cur_prod;
fetch cur_prod into lv_prd,lv_stn_wdn_tag,prc_date,lv_truckno;
close cur_prod;
if lv_prd is not null then
if lv_prd not in (91,82) then
AL_BUTTON :=FN_ALERT_SETTING('AL_NOTE','PRODUCT STATUS','NOT ALLOWED OTHERTHAN GYPSUM PRODUCTS ' , 'OK');
raise form_trigger_failure;
else
open cur_trkchk(lv_truckno);
fetch cur_trkchk into lv_truckno;
close cur_trkchk;
if lv_truckno <> 0 then
AL_BUTTON :=FN_ALERT_SETTING('AL_NOTE','TRUCK STATUS','THIS TRUCK ALREADY SEND OUT FROM PLANT' , 'OK');
raise form_trigger_failure;
else
open cur_acc_dt;
fetch cur_acc_dt into acc_date;
close cur_acc_dt;
if to_date(prc_date,'dd/mm/rrrr') <> to_date(acc_date,'dd/mm/rrrr') then
AL_BUTTON :=FN_ALERT_SETTING('AL_NOTE','Invoice Printing Status','Invoice Date Changed' , 'OK');
raise form_trigger_failure;
else
pr_inv_gen;
end if;
end if;
end if;
ELSE
AL_BUTTON :=FN_ALERT_SETTING('AL_NOTE','VEP STATUS','VEP NUMBER DOESNOT EXIST ' , 'OK');
raise form_trigger_failure;
end if;
-- pr_inv_gen;
end;
END IF;
null;
END;
Please help me to solve this error
[Updated on: Tue, 15 June 2010 00:17] Report message to a moderator
|
|
|
|
Re: How to solve the error in application? [message #460842 is a reply to message #460821] |
Tue, 15 June 2010 03:53 |
cookiemonster
Messages: 13938 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You might also want to put some messages in the trigger to allow you to work out which line is causing that error.
I can't see anything in the trigger code that could possibly give any sort of listener error, my money is on the error coming from the procedure you call - pr_inv_gen
|
|
|
|
|
|