Total Pageviews

Monday, March 9, 2015

Query to find Concurrent Program related information

--------------------------------------------------------------------------
-- Query to find Concurrent Program related information
--------------------------------------------------------------------------
SELECT cpv.user_concurrent_program_name "Concurrent Program Name",
       cpv.concurrent_program_name      "Program Short Name",
       efv.application_name             "Application",
       cpv.enabled_flag                 "Enabled Flag",
       cpv.output_file_type             "Output Format",
       fu.user_name                     "Created By (userid)",
       (SELECT meaning
          FROM fnd_lookup_values_vl flv
         WHERE UPPER (flv.lookup_type) = 'CP_EXECUTION_METHOD_CODE'
           AND flv.Lookup_code = efv.execution_method_code
       )                                "Execution Method",
       efv.executable_name              "Executable Name",
       efv.execution_file_name          "Execution Filename"
  FROM fnd_executables_form_v      efv,
       fnd_concurrent_programs_vl  cpv,
       fnd_user                    fu
 WHERE efv.executable_id  = cpv.executable_id
   AND efv.application_id = cpv.application_id
   AND cpv.created_by     = fu.user_id
   AND cpv.user_concurrent_program_name = 'Active Users' -- // change it
 ORDER BY cpv.user_concurrent_program_name;


--------------------------------------------------------------------------
--  Query to get Responsibility Name when CP(Concurrent Program) Name as input
--------------------------------------------------------------------------

 SELECT DISTINCT
  FCPL.USER_CONCURRENT_PROGRAM_NAME
, FCP.CONCURRENT_PROGRAM_NAME
, FAPP.APPLICATION_NAME
, FRG.REQUEST_GROUP_NAME
, FNRTL.RESPONSIBILITY_NAME
FROM
  APPS.FND_REQUEST_GROUPS FRG
, APPS.FND_APPLICATION_TL FAPP
, APPS.FND_REQUEST_GROUP_UNITS FRGU
, APPS.FND_CONCURRENT_PROGRAMS FCP
, APPS.FND_CONCURRENT_PROGRAMS_TL FCPL
, APPS.FND_RESPONSIBILITY FNR
, APPS.FND_RESPONSIBILITY_TL FNRTL
WHERE
          FRG.APPLICATION_ID=fapp.APPLICATION_ID
AND FRG.APPLICATION_ID = FRGU.APPLICATION_ID
AND FRG.REQUEST_GROUP_ID = FRGU.REQUEST_GROUP_ID
AND FRG.REQUEST_GROUP_ID = FNR.REQUEST_GROUP_ID
AND FRG.APPLICATION_ID = FNR.APPLICATION_ID
AND FNR.RESPONSIBILITY_ID = FNRTL.RESPONSIBILITY_ID
AND FRGU.REQUEST_UNIT_ID = FCP.CONCURRENT_PROGRAM_ID
AND FRGU.UNIT_APPLICATION_ID = FCP.APPLICATION_ID
AND FCP.CONCURRENT_PROGRAM_ID = FCPL.CONCURRENT_PROGRAM_ID
AND FCPL.USER_CONCURRENT_PROGRAM_NAME = 'Active Users' -- // change it
AND FNRTL.LANGUAGE = 'US'

AND FAPP.LANGUAGE = 'US';

2) Sql Query to get Concurrent program name and its parameter 

SELECT fcpl.user_concurrent_program_name     , 
               fcp.concurrent_program_name     , 
               par.end_user_column_name     , 
               par.form_left_prompt prompt     , 
               par.enabled_flag     , 
               par.required_flag     , 
               par.display_flag
FROM   fnd_concurrent_programs fcp     , 
              fnd_concurrent_programs_tl fcpl     , 
              fnd_descr_flex_col_usage_vl par
WHERE  fcp.concurrent_program_id = fcpl.concurrent_program_id
     AND  fcpl.user_concurrent_program_name = &conc_prg_name
     AND  fcpl.LANGUAGE = 'US'
     AND  par.descriptive_flexfield_name = '$SRS$.' || fcp.concurrent_program_name

3) Sql Query to get the responsibility name,request group name when request set name as input. 
 
select frt.responsibility_name,     
         frg.request_group_name,
         frgu.request_unit_type,
         frgu.request_unit_id,
         fcpt.user_request_set_name
From apps.fnd_Responsibility fr,
         apps.fnd_responsibility_tl frt,
         apps.fnd_request_groups frg,
         apps.fnd_request_group_units frgu,
         apps.fnd_request_Sets_tl fcpt
where frt.responsibility_id = fr.responsibility_id
    and frg.request_group_id = fr.request_group_id
    and frgu.request_group_id = frg.request_group_id
    and fcpt.request_set_id = frgu.request_unit_id
    and frt.language = USERENV('LANG')
    and fcpt.language = USERENV('LANG')
    and fcpt.user_request_set_name = '&request_set_name'
 order by 1,2,3,4

No comments:

Post a Comment