Query to Fetch RDF file and RTF Template Name

SELECT fev.execution_file_name,
       fcp.concurrent_program_name,
       xtb.default_output_type,
       fcp.user_concurrent_program_name,
       fat.application_name,
       '$' || fat.basepath || '/' || 'reports/US' reports_path,
       xtt.template_name,
       xddt.data_source_name,
       fcp.enabled_flag,
       fcp.output_file_type cp_output_file_type,
       xtb.default_output_type rtf_default_output_type,
       xtb.template_type_code,
       fev.execution_method_code
  FROM fnd_executables_vl fev,
       fnd_application_vl fat,
       fnd_concurrent_programs_vl fcp,
       xdo_ds_definitions_tl xddt,
       xdo_templates_b xtb,
       xdo_templates_tl xtt
 WHERE 1 = 1                             
   AND fev.application_id = fat.application_id
   AND (   UPPER (fev.execution_file_name) LIKE UPPER ('XX%')
        OR UPPER (fev.execution_file_name) LIKE UPPER ('%XXX%')
        OR UPPER (fev.execution_file_name) LIKE UPPER ('XX%')
       )
   AND fev.application_id = fcp.application_id
   AND fev.executable_id = fcp.executable_id
   AND xddt.data_source_code(+) = fcp.concurrent_program_name
   AND xddt.data_source_code = xtb.data_source_code(+)
   AND xtb.template_code = xtt.template_code(+)
  AND xtb.default_output_type IN ('PDF', 'EXCEL')  --FEV.EXECUTION_METHOD_CODE = 'P'
 UNION
  SELECT fev.execution_file_name,
       fcp.concurrent_program_name,
       xtb.default_output_type,
       fcp.user_concurrent_program_name,
       fat.application_name,
       '$' || fat.basepath || '/' || 'reports/US' reports_path,
       xtt.template_name,
       xddt.data_source_name,
       fcp.enabled_flag,
       fcp.output_file_type cp_output_file_type,
       xtb.default_output_type rtf_default_output_type,
       xtb.template_type_code,
       fev.execution_method_code
  FROM fnd_concurrent_programs_vl fcp,
       fnd_executables_form_v fev,
       xdo_ds_definitions_tl xddt,
       xdo_templates_b xtb,
       xdo_templates_tl xtt,
       fnd_application_vl fat
 WHERE 1 = 1
   AND (   UPPER (user_concurrent_program_name) LIKE UPPER ('XX%')
        OR UPPER (user_concurrent_program_name) LIKE UPPER ('XX%')
        OR UPPER (user_concurrent_program_name) LIKE UPPER ('XX%')
       )
   AND fev.executable_id = fcp.executable_id
   AND fev.execution_file_name = 'JCP4XDODataEngine'
   AND fev.application_id = fat.application_id
   AND xddt.data_source_code(+) = fcp.concurrent_program_name
   AND xddt.data_source_code = xtb.data_source_code(+)
   AND xtb.template_code = xtt.template_code(+)








Comments

Popular posts from this blog

Deleting the Sourcing Rule Assignments API

BarCode with XML Publisher