Friday, June 24, 2011

ERRBUF and RETCODE in ORACLE APPLICATIONS 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;


6 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
    Replies
    1. Thanks Ram you saved my day because of the last line :)

      Delete
  2. in a form, after I query a form which populates the data on the form. When I change in any of the field, and presee on refresh button, I am prompted with below standard message

    "Do you want to overwrite save your changes?" which has 3 options
             -------------------------------------------------- ---------------------
    "Yes" to save the record, the lock of changed record releases.
    "No" the screen goes back to the previous change, locked records goes into error without releasing the lock
    "Cancel" the goes back to the orginla screen without changing and, unlock the changed records

    I want to capture the return code of these 3 buttons . Is it possible

    ReplyDelete
  3. in a form, after I query a form which populates the data on the form. When I change in any of the field, and presee on refresh button, I am prompted with below standard message

    "Do you want to overwrite save your changes?" which has 3 options
             -------------------------------------------------- ---------------------
    "Yes" to save the record, the lock of changed record releases.
    "No" the screen goes back to the previous change, locked records goes into error without releasing the lock
    "Cancel" the goes back to the orginla screen without changing and, unlock the changed records

    I want to capture the return code of these 3 buttons . Is it possible

    ReplyDelete