Infolinks

Monday 21 May 2012

RETCODE & ERRBUFF

RETCODE & ERRBUFF Parameters in Concurrent Program

RETCODE & ERRBUFF Parameters in Concurrent Program


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..

Based on the business process if there is any undefined exeception 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