(Custom.pll) Raise FORM-TRIGGER-FAILURE [message #230877] |
Fri, 13 April 2007 03:17  |
sinem
Messages: 2 Registered: April 2007 Location: Turkey
|
Junior Member |

|
|
Hi everyone,
I'm really sorry if this is not the right place to post this topic. I'm coding in custom.pll and i want to summarize my problem. There is a table 'xx_payroll.my_debug' When a wrong data is entered a different trigger fires and writes an error message to this table.And in Post-Forms-Commit trigger i read the error from table which has a login_id equal to users login_id, i show the error message to user then delete message from table and i have to prevent the data to be saved.I use raise form trigger failure it throws exception but saves the data. Do you have any explanation? Below is part of my code:
if (form_name = 'PERWSEAD') and ( block_name = 'ABA') and (event_name = 'POST-FORMS-COMMIT') then
BEGIN
v_login_id_now := apps.fnd_profile.value('LOGIN_ID');
if v_login_id_now is not null then
select login_id,message
into v_login_id_table,v_error_message
from xx_payroll.my_debug
where login_id = v_login_id_now;
end if;
if (v_login_id_now = v_login_id_table) then
fnd_message.set_string('HATA : '|| v_error_message);
fnd_message.error;
DELETE FROM xx_payroll.my_debug
where login_id = v_login_id_now;
RAISE FORM_TRIGGER_FAILURE; end if;
exception when no_data_found then
v_login_id_table:=null;
when others then
fnd_message.set_string('ERROR CODE: '||TO_CHAR(SQLCODE));
fnd_message.show ;
END;
END IF;
Thanks a lot..
sinem
|
|
|
|
|