Monday, November 9, 2020

Query to find Concurrent Program related information

 The following query takes the concurrent program name (for example, "Active Users") and returns its related information (i.e. Reports, Created By, etc.).


Note: I have pointed out that I could use the "lookup" as opposed to my previous hard-coded "decode" for finding the Execution Method (or program type), which is very efficient.

---------------------------------------------------------
-- Query to find Concurrent Program related information
---------------------------------------------------------
SELECT 
       fcpv.user_concurrent_program_name "Concurrent Program Name",
       fcpv.concurrent_program_name      "Program Short Name",
       ffv.application_name              "Application",
       fcpv.enabled_flag                 "Enabled Flag",
       fcpv.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 = ffv.execution_method_code
       )                                "Execution Method",
       ffv.executable_name              "Executable Name",
       ffv.execution_file_name          "Execution Filename"
  FROM 
       fnd_executables_form_v      ffv,
       fnd_concurrent_programs_vl  fcpv,
       fnd_user                    fu
 WHERE 
       ffv.executable_id  = fcpv.executable_id
   AND ffv.application_id = fcpv.application_id
   AND fcpv.created_by     = fu.user_id
   AND fcpv.user_concurrent_program_name = 'Active Users' -- // change it
 ORDER BY fcpv.user_concurrent_program_name;

No comments:

Post a Comment