Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Raise error in a trigger

KdeGraafSep 5 2007 — edited Sep 6 2007
Hi

I have a question about a trigger.
The purpose of this trigger is to prevent modifications being made to a record.
TRIGGER AR_APPLICATIONS_ARU BEFORE UPDATE OF DISPLAY ON AR.AR_RECEIVABLE_APPLICATIONS_ALL 
FOR EACH ROW 
DECLARE
e_ERRORNAME EXCEPTION;
e_TEST EXCEPTION;
PRAGMA EXCEPTION_INIT(e_TEST, -06512);
BEGIN
   IF (:NEW.DISPLAY = 'N') AND (:OLD.DISPLAY= 'Y') AND ((:OLD.ATTRIBUTE13='PAYED') OR (:OLD.ATTRIBUTE13='PAID'))
    THEN
     RAISE_APPLICATION_ERROR(-20001,'-----------Test foutmelding!-------------');
   END IF; 
END;
This trigger shoots when it should, but I get also other error messages:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "APPS.FND_MESSAGE", line 581
ORA-06512: at "APPS.FND_MESSAGE", line 537
ORA-06512: at "APPS.APP_EXCEPTION", line 42
ORA-06512: at "APPS.ARP_APP_PKG", line 681
ORA-20001: -----------Test foutmelding!-------------
ORA-06512: at "APPS.XXABET_AR_APPLICATIONS_ARU", line 17
ORA-04088: error during execution of trigger 'APPS.XXABET_AR_APPLICATIONS_ARU'
ORA-06512: at "APPS.ARP_PROCESS_APPLICATION", line 522

--------------------------------------------------------------
FRM-40735: ON-UPDATE trigger raised unhandled exception ORA-06502.
What do I do wrong, or how can I suppress those messages?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2007
Added on Sep 5 2007
10 comments
11,289 views