Pages

Monday, March 25, 2013

Query to fetch Responsiblities attached to a Concurrent Program


Select distinct fr.responsibility_name,
                fcp.concurrent_program_name,
                frg.request_group_name
  from fnd_concurrent_programs fcp,
       fnd_request_group_units frgu,
       fnd_request_groups      frg,
       fnd_responsibility_vl   fr
 Where fcp.concurrent_program_id = frgu.request_unit_id
   AND frg.request_group_id = fr.request_group_id
   AND frg.application_id = fr.group_application_id
   AND frgu.application_id = frg.application_id
   And frgu.request_group_id = fr.request_group_id
   AND frgu.unit_application_id = fcp.application_id
      --AND rgu.request_unit_name = fcp.concurrent_program_name
      --And fcp.concurrent_program_name LIKE 'RSPERSTF1%'
   And fcp.concurrent_program_name = 'RHRREGPERS' -- put short name here

--------------------------------

How many times have you been told by Oracle Support that you should run a concurrent request...only to realize that you have no idea which responsibility to choose to run the request? Or you want to instruct a user to run a request, and you want to be sure they have access? The query below will help you. It will provide for you the responsibility name and the request group name which can run a concurrent program. You can search by the user_concurrent_program_name or the "short_name".


SELECT FRT.RESPONSIBILITY_NAME, FRG.REQUEST_GROUP_NAME, FRG.DESCRIPTION
  FROM FND_REQUEST_GROUPS FRG
      ,FND_REQUEST_GROUP_UNITS FRGU
      ,FND_CONCURRENT_PROGRAMS FCP
      ,FND_CONCURRENT_PROGRAMS_TL FCPT
      ,FND_RESPONSIBILITY_TL FRT
      ,FND_RESPONSIBILITY FR
 WHERE     FRGU.UNIT_APPLICATION_ID = FCP.APPLICATION_ID
       AND FRGU.REQUEST_UNIT_ID = FCP.CONCURRENT_PROGRAM_ID
       AND FRG.REQUEST_GROUP_ID = FRGU.REQUEST_GROUP_ID
       AND FRG.APPLICATION_ID = FRGU.APPLICATION_ID
       AND FCPT.SOURCE_LANG = USERENV('LANG')
       AND FCP.APPLICATION_ID = FCPT.APPLICATION_ID
       AND FCP.CONCURRENT_PROGRAM_ID = FCPT.CONCURRENT_PROGRAM_ID
       AND FR.APPLICATION_ID = FRT.APPLICATION_ID
       AND FR.RESPONSIBILITY_ID = FRT.RESPONSIBILITY_ID
       AND FRT.SOURCE_LANG = USERENV('LANG')
       AND FR.REQUEST_GROUP_ID = FRG.REQUEST_GROUP_ID
       AND FR.APPLICATION_ID = FRG.APPLICATION_ID
       --   AND FCP.CONCURRENT_PROGRAM_NAME = 'OPMTMOPG'  --  YOU CAN PUT THE SHORTNAME HERE
       AND FCPT.USER_CONCURRENT_PROGRAM_NAME LIKE 'Purge OPM Txns and Move Order Lines' --OR THE USER CONC PROGRAM NAME HERE
;

1 comment:

  1. Thank you for sharing such a nice article. This article will surely enhance reader’s knowledge. Keep posting!

    Melbourne Web Developer

    ReplyDelete