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);
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);