Requirement is to add number (increment) to all concurrent programs to identify easily:
--CREATE TABLE FND_CONCURRENT_PROG_TL_8115 AS SELECT * FROM FND_CONCURRENT_PROGRAMS_TL
DECLARE
L_NUMBER NUMBER := 500;
BEGIN
FOR I IN (
SELECT FCP.CONCURRENT_PROGRAM_NAME SHORT_NAME,
FCP.CONCURRENT_PROGRAM_ID CONCURRENT_PROGRAM_ID,
FCP.USER_CONCURRENT_PROGRAM_NAME ENGLISH,
FCPTL.USER_CONCURRENT_PROGRAM_NAME CONC_PROG,
decode(fe.EXECUTION_METHOD_CODE,'P','Oracle_Reports','I','PLSQL','')EXECUTION_METHOD,
--FCP.DESCRIPTION,
FCP.CREATED_BY, FCP.LAST_UPDATED_BY, FCP.CREATION_DATE, FCP.LAST_UPDATE_DATE
,FCP.ENABLED_FLAG
FROM FND_CONCURRENT_PROGRAMS_VL FCP,
FND_CONCURRENT_PROGRAMS_TL FCPTL,
fnd_executables FE
WHERE
(FCP.CREATED_BY = 2605 OR FCP.LAST_UPDATED_BY = 2605)
AND FCP.ENABLED_FLAG = 'Y'
AND FCP.CONCURRENT_PROGRAM_ID = FCPTL.CONCURRENT_PROGRAM_ID
AND FCPTL.LANGUAGE = 'US'
AND FE.EXECUTABLE_NAME = FCP.CONCURRENT_PROGRAM_NAME
--AND FCP.CONCURRENT_PROGRAM_NAME NOT IN ('XX_INVPAYDETAIL','XXFUJ_TENCONT','XXFUJ_CHKVOU','XXFUJ_PAYVOU','XXARRECIPT_LAST_II','RAXGLA')
AND FCP.CONCURRENT_PROGRAM_ID IN ( 65376)
--ORDER BY 5,7
ORDER BY FCP.CONCURRENT_PROGRAM_ID
)
LOOP
L_NUMBER := L_NUMBER + 1;
UPDATE FND_CONCURRENT_PROGRAMS_TL FND
SET USER_CONCURRENT_PROGRAM_NAME = I.CONC_PROG||'-'||L_NUMBER
WHERE FND.CONCURRENT_PROGRAM_ID = I.CONCURRENT_PROGRAM_ID
AND FND.LANGUAGE = 'US'
;
commit;
END LOOP;
END;
--CREATE TABLE FND_CONCURRENT_PROG_TL_8115 AS SELECT * FROM FND_CONCURRENT_PROGRAMS_TL
DECLARE
L_NUMBER NUMBER := 500;
BEGIN
FOR I IN (
SELECT FCP.CONCURRENT_PROGRAM_NAME SHORT_NAME,
FCP.CONCURRENT_PROGRAM_ID CONCURRENT_PROGRAM_ID,
FCP.USER_CONCURRENT_PROGRAM_NAME ENGLISH,
FCPTL.USER_CONCURRENT_PROGRAM_NAME CONC_PROG,
decode(fe.EXECUTION_METHOD_CODE,'P','Oracle_Reports','I','PLSQL','')EXECUTION_METHOD,
--FCP.DESCRIPTION,
FCP.CREATED_BY, FCP.LAST_UPDATED_BY, FCP.CREATION_DATE, FCP.LAST_UPDATE_DATE
,FCP.ENABLED_FLAG
FROM FND_CONCURRENT_PROGRAMS_VL FCP,
FND_CONCURRENT_PROGRAMS_TL FCPTL,
fnd_executables FE
WHERE
(FCP.CREATED_BY = 2605 OR FCP.LAST_UPDATED_BY = 2605)
AND FCP.ENABLED_FLAG = 'Y'
AND FCP.CONCURRENT_PROGRAM_ID = FCPTL.CONCURRENT_PROGRAM_ID
AND FCPTL.LANGUAGE = 'US'
AND FE.EXECUTABLE_NAME = FCP.CONCURRENT_PROGRAM_NAME
--AND FCP.CONCURRENT_PROGRAM_NAME NOT IN ('XX_INVPAYDETAIL','XXFUJ_TENCONT','XXFUJ_CHKVOU','XXFUJ_PAYVOU','XXARRECIPT_LAST_II','RAXGLA')
AND FCP.CONCURRENT_PROGRAM_ID IN ( 65376)
--ORDER BY 5,7
ORDER BY FCP.CONCURRENT_PROGRAM_ID
)
LOOP
L_NUMBER := L_NUMBER + 1;
UPDATE FND_CONCURRENT_PROGRAMS_TL FND
SET USER_CONCURRENT_PROGRAM_NAME = I.CONC_PROG||'-'||L_NUMBER
WHERE FND.CONCURRENT_PROGRAM_ID = I.CONCURRENT_PROGRAM_ID
AND FND.LANGUAGE = 'US'
;
commit;
END LOOP;
END;
No comments:
Post a Comment