Monday, April 27, 2009

RETCODE & ERRBUFF

Hi ALL,
As we all know there are two mandatory parameters that need to be pased for all the procedures called
1.ERRBUFF
2.RETCODE..
They are very useful parameters if used properly..like setting the status of the conucrrent program and putting the log messages...
i think it is better we make some rule like we make the program end in Error when ever there is a unidentified exception occurs based on your business rule...

define ERRBUFF as the first parameter and Retcode as the second one...Dont forget to specify the out variable type in it...

CREATE PROCEDURE SAMPLE_PROC (ERRBUF OUT VARCHAR2,
RETCODE OUT VARCHAR2,
p_1 varchar2)

The retcode has three values returned by the concurrent manager
0--Success
1--Success & warning
2--Error

we can set our concurrent program to any of the three status by using these parameters...
for example
Begin
.....
Exception
when others then
fnd_File.put_line(fnd_file.log,'Unhandled exception occurred in package.procedure'||SQLERRM);
retcode='2';
end;
Even you can use fnd_concurrent.set_completion_Status to send the concurrent program to more status than success,error and warning.....

6 comments:

Binuraj said...

Hi Murthi,

Thanks for the useful article. It will be better if you can also provide information on the use of ERRBUF variable. If I assign a value to this variable from within my program, where can I see it?


Binuraj Nair

sudhu said...

Hi murthi,

thanx for doing a wonderful in spreading your knowledge. i just had a doubt what is difference between tehnical and functional consultants. i mean how much functional knowledge a pure technical consultant should have?

Unknown said...
This comment has been removed by the author.
Simhachalam said...

One Interviewer asked me , what will happen if i use retcode as my first parameter and errbuf as my second parameter.

Is there any sequence to follow with these out parameters

Unknown said...
This comment has been removed by the author.
Unknown said...
This comment has been removed by the author.