Protected by Copyscape Web Copyright Protection Software

Pages

Search This Blog

Thursday, May 30, 2013

Mandatory Parameters RETCODE & ERRBUFF in Concurrent Program

we already know there are two mandatory parameters that need to be passed for all the procedures called in oracle apps
1.ERRBUFF
2.RETCODE..

Based on the business process if there is any undefined exception occured while running concurrent program, we can end the concurrent program with Error/Warning.

Define ERRBUFF as the first parameter and Retcode as the second one. Mention the OUT variable type.

CREATE PROCEDURE PROCEDURE_NAME (errbuf  OUT VARCHAR2,
                                 retcode OUT VARCHAR2)

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

we can set the concurrent program to any of the three status by using these values in the retcode parameter

Example:
========

BEGIN
.....
EXCEPTION
     WHEN OTHERS THEN
        FND_FILE.PUT_LINE(FND_FILE.LOG,'Unhandled exception occurred in package. ErrMsg: '||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.

No comments:

Post a Comment