We can not only create a concurrent program from backend but also assign the concurrent program to a Request Group byFND_PROGRAM.ADD_TO_GROUP api, below is the sample script.
DECLARE
v_program_short_name VARCHAR2 (200);
v_program_application VARCHAR2 (200);
v_request_group VARCHAR2 (200);
v_group_application VARCHAR2 (200);
v_check VARCHAR2 (2);
BEGIN
v_program_short_name := 'XX_SHAREORACLEAPPS';
v_program_application := 'Payables';
v_request_group := 'All Reports';
v_group_application := 'Assets';
apps.fnd_program.add_to_group (program_short_name => v_program_short_name,
program_application => v_program_application,
request_group => v_request_group,
group_application => v_group_application
);
COMMIT;
BEGIN
SELECT 'Y'
INTO v_check
FROM FND_REQUEST_GROUPS FRG,
FND_REQUEST_GROUP_UNITS FRGU,
FND_CONCURRENT_PROGRAMS FCP
WHERE FRG.request_group_id = FRGU.REQUEST_GROUP_ID
AND FRG.application_id = FRGU.application_id
AND FRGU.request_unit_id = FCP.concurrent_program_ID
AND FRGU.unit_application_id = FCP.application_id
AND FCP.concurrent_program_name = 'XX_SHAREORACLEAPPS';
EXCEPTION
WHEN NO_DATA_FOUND
THEN
DBMS_OUTPUT.put_line ('Adding Concurrent Program to Request Group Failed');
END;
END;
DECLARE
v_program_short_name VARCHAR2 (200);
v_program_application VARCHAR2 (200);
v_request_group VARCHAR2 (200);
v_group_application VARCHAR2 (200);
v_check VARCHAR2 (2);
BEGIN
v_program_short_name := 'XX_SHAREORACLEAPPS';
v_program_application := 'Payables';
v_request_group := 'All Reports';
v_group_application := 'Assets';
apps.fnd_program.add_to_group (program_short_name => v_program_short_name,
program_application => v_program_application,
request_group => v_request_group,
group_application => v_group_application
);
COMMIT;
BEGIN
SELECT 'Y'
INTO v_check
FROM FND_REQUEST_GROUPS FRG,
FND_REQUEST_GROUP_UNITS FRGU,
FND_CONCURRENT_PROGRAMS FCP
WHERE FRG.request_group_id = FRGU.REQUEST_GROUP_ID
AND FRG.application_id = FRGU.application_id
AND FRGU.request_unit_id = FCP.concurrent_program_ID
AND FRGU.unit_application_id = FCP.application_id
AND FCP.concurrent_program_name = 'XX_SHAREORACLEAPPS';
EXCEPTION
WHEN NO_DATA_FOUND
THEN
DBMS_OUTPUT.put_line ('Adding Concurrent Program to Request Group Failed');
END;
END;
No comments:
Post a Comment