Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.9K Databases
- 221.6K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.9K SQL & PL/SQL
- 21.3K SQL Developer
- 295.5K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.1K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 154 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 401 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 230 Portuguese
Custom trigger on IBY_PMT_INSTR_USES_ALL column BEFORE UPDATE OF END_DATE raise userfriendly excepti

Hi,
ORACLE E-business suite
RDBMS_VERSION = 11.2.0.3.0
PL/SQL Release 11.2.0.3.0 - Production
ORacle release 12.2.4
ARU_RELEASE_NAME =R12
I would like to raise an exception when the user is changing the end_date of a bank account.
an exception is raised by oracle but it isn't the exception I have specified
I have placed a custom trigger on the table IBY_PMT_INSTR_USES_ALL and I want to raise an user-friendly exception when the user changes the end_date of the bank.
but whatever I'm doing Oracle is always showing the error down below in the web form.
Error Page
You have encountered an unexpected error. Please contact the System Administrator for assistance.
My question is.
is it possible to raise a user-friendly exception using a trigger which is defined on the table IBY_PMT_INSTR_USES_ALL column BEFORE UPDATE OF END_DATE ?
create or replace TRIGGER APPS.XXTEST_IPIUA_BRU BEFORE UPDATE OF END_DATE ON IBY.IBY_PMT_INSTR_USES_ALL#
If so, how should this raise exception look like?
I already have tried.
- RAISE_APPLICATION_ERROR(-20001, '----------test----------'); at the begin of the trigger
- already defined a custom Exception using the pragma Exception_init
- Exception handling at the end of the trigger
- fnd_message.set_name ('FND', 'test');
app_exception.raise_exception;
But all these options will end in the same errormessage
Error Page You have encountered an unexpected error. Please contact the System Administrator for assistance.
steps to reproduce
- add a bank account on customer site level in the responsibility Receivables
- make sure a bank account is added on site level
- end_date the bank account, so that the trigger will be triggered
- make sure that the exception is added at the begin of the trigger
- you will face the errormessage :You have encountered an unexpected error. Please contact the System Administrator for assistance.
hopefully you can help me with this.
I already did some research on the web but without any success.
The same approach is working at another database table and column.
thanks for your help.
Edwin
Answers
-
We can't debug code we can not see
Please click on URL below & provide details as stated in #5 - #9 inclusive
How do I ask a question on the forums?
-
The trigger runs on the DB and does not show any message, exceptions are passed to the UI
What application are you talking about? It is one that Oracle sells like EBS or a home made app? If it is an Oracle app, you may want to ask on the space of that app.
Otherwise you need to talk to the team that develops the App and ask them to handle the exception the way you want.
-
We don't have access to your application / web pages.
We don't have your tables, data or code.
So your "steps to reproduce" are meaningless to us, we can't mind-read what your code does.
However, exceptions propagate from a trigger the same as from any pl/sql block (anonymous block / stored proc / package etc. etc.). So it seems like your application layer is gobbling them up and returning a generic "You have encountered an unexpected error. Please contact the System Administrator for assistance.", which in my eyes is poor programming.
-
Hi John,
Please find below the code what will raise an errormessage.
it's the most simple code yet, but this will reproduce it my scenariocreate or replace TRIGGER APPS.XXTEST_IPIUA_BRU BEFORE UPDATE OF END_DATE ON IBY.IBY_PMT_INSTR_USES_ALL#
FOR EACH ROW
DECLARE
BEGIN
IF (:NEW.payment_function = 'CUSTOMER_PAYMENT') THEN
fnd_message.set_name ('FND', 'Please do not remove end_date') ;
app_exception.raise_exception;
-- RAISE_APPLICATION_ERROR(-20001, '----------test----------');
END IF;END XXTEXT_IPIUA_BRU;
thanks
Edwin -
Hi John,
Please find below the code what will raise an errormessage.
it's the most simple code yet, but this will reproduce it my scenariocreate or replace TRIGGER APPS.XXTEST_IPIUA_BRU BEFORE UPDATE OF END_DATE ON IBY.IBY_PMT_INSTR_USES_ALL#
FOR EACH ROW
DECLARE
BEGIN
IF (:NEW.payment_function = 'CUSTOMER_PAYMENT') THEN
fnd_message.set_name ('FND', 'Please do not remove end_date') ;
app_exception.raise_exception;
-- RAISE_APPLICATION_ERROR(-20001, '----------test----------');
END IF;END XXTEXT_IPIUA_BRU;
thanks
Edwin -
You have a mystery & gives us NO clues.
Posted "error message" is not a standard Oracle error message & is NOT coming from posted code.
So we are clueless from where or why it appears.
We have no evidence that posted TRIGGER is actually getting invoked.
When below is FALSE, then TRIGGER code exits silently & does nothing
>IF (:NEW.payment_function = 'CUSTOMER_PAYMENT') THEN