Today, i have tried to create a concurrent in Oracle R12.1.3, which is contents PL/SQL procedure. I have tried to set the completion status of that concurrent.
When i was googling for this case, i have founded reference from oracleerpappsguide.blogspot.com. Then, i have created a script for be called in concurrent. They are :
/*Developed by Andreas Victor
Developed date 14th Aug, 2013 */
CREATE OR REPLACE PROCEDURE xrspi_avi_test_conc(
ERRBUF OUT VARCHAR2,
RETCODE OUT VARCHAR2,
P_ARGUMENT1 IN VARCHAR2) IS
l_retcode Number;
l_retcode_var VARCHAR2(1);
CONC_STATUS BOOLEAN;
BEGIN
SELECT CASE WHEN p_argument1 = 1 THEN 'E' --1
WHEN p_argument1 = 2 THEN 'W' --2
WHEN p_argument1 = 0 THEN 'S' --0
END as col_val
INTO l_retcode_var --l_retcode
FROM dual;
if l_retcode_var = 'S' then --L_Retcode = 0 then
RETCODE := 'Success';
--It can be seen with VIEW DETAILS button, at Completion Text
CONC_STATUS := FND_CONCURRENT.SET_COMPLETION_STATUS('NORMAL','Concurrent Normal Status');
--It can be seen with VIEW LOG button
FND_FILE.put_line (FND_FILE.log, 'Log for Concurrent Normal Status');
elsif l_retcode_var = 'W' then --L_Retcode = 1 then
RETCODE := 'Warning';
--It can be seen with VIEW DETAILS button, at Completion Text
CONC_STATUS := FND_CONCURRENT.SET_COMPLETION_STATUS('WARNING','Concurrent Warning Status');
--It can be seen with VIEW LOG button
FND_FILE.put_line (FND_FILE.log, 'Log for Concurrent Warning Status');
elsif l_retcode_var = 'E' then --L_Retcode = 2 then
RETCODE := 'Error';
--It can be seen with VIEW DETAILS button, at Completion Text
CONC_STATUS := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR','Concurrent Error Status');
--It can be seen with VIEW LOG button
FND_FILE.put_line (FND_FILE.log, 'Log for Concurrent Error Status');
end if;
END xrspi_avi_test_conc;
To use this script, we can follow the steps from my reference on top.
Thanks, i hope this useful.