How to Find Request Group and Application for Concurrent Programs


SELECT FAT.APPLICATION_NAME,FRG.REQUEST_GROUP_NAME,FCP.CONCURRENT_PROGRAM_NAME PROGRAM_SHORT_NAME,FCP.ENABLED_FLAG
,(SELECT USER_CONCURRENT_PROGRAM_NAME FROM FND_CONCURRENT_PROGRAMS_TL WHERE CONCURRENT_PROGRAM_ID=FCP.CONCURRENT_PROGRAM_ID) PROGRAM_NAME
,FRGU.APPLICATION_ID ,FRGU.REQUEST_GROUP_ID,FRGU.REQUEST_UNIT_ID,FRG.DESCRIPTION
FROM FND_REQUEST_GROUP_UNITS FRGU
    ,FND_APPLICATION_TL FAT
    ,FND_REQUEST_GROUPS FRG
    ,FND_CONCURRENT_PROGRAMS FCP
WHERE FRGU.APPLICATION_ID=FAT.APPLICATION_ID(+)
AND FRG.APPLICATION_ID=FAT.APPLICATION_ID
AND FRG.REQUEST_GROUP_ID=FRGU.REQUEST_GROUP_ID
AND FCP.CONCURRENT_PROGRAM_ID =FRGU.REQUEST_UNIT_ID
--AND FRGU.APPLICATION_ID=FCP.APPLICATION_ID(+)
AND FCP.CONCURRENT_PROGRAM_NAME = NVL(:P_SHORT_NAME,FCP.CONCURRENT_PROGRAM_NAME)
AND FAT.APPLICATION_NAME        = NVL(:P_APPLICATION_NAME,FAT.APPLICATION_NAME)
AND FRG.REQUEST_GROUP_NAME      = NVL(:P_REQUEST_GROUP_NAME,FRG.REQUEST_GROUP_NAME)