Tuesday, November 3, 2015

Showing Custom Error Message - Web ADI

There are two ways to do this.

1>  Simplest way is to change the 'API Returns' attribute to 'FND Message Code' and use raise_application_errro to raise errors
 Desktop Integration Manager > Manage Integrators
  >> Search the Integrator and go to the 'Interfaces' screen and select the Interface
     >> Change the 'API Returns' to 'FND Message Code' if it is null or 'Error Message'
 
>> Now change the exception section of the related API packaged procedure  

when ex_web_adi1 then
   raise_application_error(-20001,'Web ADI Error Message: '||lc_emp_number);

2> Change the exception section of the related API packaged procedure as below

when ex_web_adi1 then
   lc_err_msg := 'Web ADI Error Message: '||lc_emp_number;
   fnd_message.set_name('XXCMN', lc_err_msg);
   --fnd_message.set_token('ERROR_MESSAGE', lc_err_msg);
   lc_mesg := fnd_message.get;     
   raise_application_error(-20001, lc_mesg);


6 comments:

  1. Thanks a lot. Very useful.

    ReplyDelete
  2. this is what exactly I was looking for thanks for sharing.

    ReplyDelete
  3. what is the difference between first and second method? can we use any one of them?

    ReplyDelete
  4. Can we use any one of them? what is the difference between them?

    ReplyDelete
  5. Hi,
    I have tried the same method, but it is not showing custom messages, i think it is showing seeded messages with column names in the error messages. Could you please help me out.

    Thanks in Advance,
    Vijay

    ReplyDelete
  6. I wish to show thanks to you just for bailing me out of this particular trouble. As a result of checking through the net and meeting techniques that were not productive, Same as your blog I found another one Oracle Cloud Applications .Actually I was looking for the same information on internet for Oracle Cloud Applications Consultant and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.

    ReplyDelete