Friday, June 24, 2011

ERRBUF and RETCODE in ORACLE APPS CONCURRENT PROGRAMS

Hi All,
         First time while registering the concurrent programs we must forget the 2 mandatory parameters. After the error we can know that we need to you those mandatory parameters those are ERRBUF and RETCODE.
These are really good if you use properly.

ERRBUF: It return the error message. For you program if you get any error in exception block you can assign the error message to this parameter. This error message you can see after concurrent program run go to details button it will open details in that Completion Text filed will show your errbuf.

RETCODE: This parameter returns the status of the concurrent program.
0- Success --Completed
1- Warning -- Yellow color
2- Error -- Red

These parameters we call as a first parameters for the program.

Ex:
Create procedure  concurren1(ERRBUF out varchar2, RETCODE  out varchar2, v_order_id in varchar2)
as
begin...
...
begin
..
exception
when no_data_found then
retcode := 1;
errbuf:= 'No data found for this query';
end;
...
...
...
retcode:= 0;
commit;
exception
when others then

retcode := 2;
errbuf:= 'Unexpected Error '||SQLERRM;
end;


3 comments:

  1. RAM PANDAY
    errbuf is the parameter which gives the error-messages whenever a program gets into an exception block.
    retcode is the parameter which record the status of concurrent request.it has some value for specific reason like 0 for success 1 for warning and 2 for error in red color.
    errbuf must be as first parameter and retcode must be as second parameter in pl/sql procedure.

    ReplyDelete