Hi All,
Recently i got a requirement to create request and attach all the standard reports of GL to these request groups. It seems a lot tedious task to do manually. So i developed this script to copy the request group content to other request groups. This is very useful if you have to create multiple request groups and attach reports to all.
DECLARE
CURSOR c1 IS
SELECT b.concurrent_program_name programname,c.application_name appname
FROM fnd_request_group_units a
,fnd_concurrent_programs b
,fnd_application_tl c
,fnd_request_groups d
WHERE a.request_Group_id=d.request_Group_id
AND a.request_unit_id=b.concurrent_program_id
AND b.application_id=c.application_id
AND d.request_Group_name='GL Concurrent Program Group';
BEGIN
FOR rec IN c1 LOOP
fnd_program.add_to_group(program_short_name =>rec.programname
,program_application=>REC.APPNAME
,request_group=>'XX_GL_REQ_GRP'
,group_application=>'Custom Application');
END LOOP;
END;
Thanks & Regards,
Anto Joe Natesh
Wednesday, October 21, 2009
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.
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.
Subscribe to:
Posts (Atom)