SELECT fcpv.user_concurrent_program_name "USER PROG NAME",
fcpv.concurrent_program_name "PROG NAME",
fcpv.concurrent_program_id "PROGRAM ID",
fcpv.creation_date "PROG CREATION DATE",
fcpv.created_by "PROG CREATED BY",
xddv.application_short_name "DD APP SHORT NAME",
xddv.data_source_name,
xtv.application_short_name "DT APP SHORT NAME",
xtv.template_code,
xtv.template_name,
fe.executable_name,
fe.execution_method_code,
fe.execution_file_name ,
xl.file_name,
fcpv.enabled_flag, xl.last_update_date
FROM apps.fnd_concurrent_programs_vl fcpv,
apps.fnd_executables fe,
apps.xdo_ds_definitions_vl xddv,
apps.xdo_templates_vl xtv,
apps.xdo_lobs xl
WHERE xddv.data_source_code = xtv.data_source_code
AND xddv.data_source_code = fcpv.concurrent_program_name
AND fe.executable_id = fcpv.executable_id
AND UPPER(template_name) like '%PACK%'
AND fcpv.enabled_flag = 'Y'
AND fe.execution_method_code = 'P'
AND xl.lob_type in ('TEMPLATE','TEMPLATE_SOURCE')
AND lower(xl.file_name) like '%.rtf'
AND xtv.template_code=xl.lob_code
fcpv.concurrent_program_name "PROG NAME",
fcpv.concurrent_program_id "PROGRAM ID",
fcpv.creation_date "PROG CREATION DATE",
fcpv.created_by "PROG CREATED BY",
xddv.application_short_name "DD APP SHORT NAME",
xddv.data_source_name,
xtv.application_short_name "DT APP SHORT NAME",
xtv.template_code,
xtv.template_name,
fe.executable_name,
fe.execution_method_code,
fe.execution_file_name ,
xl.file_name,
fcpv.enabled_flag, xl.last_update_date
FROM apps.fnd_concurrent_programs_vl fcpv,
apps.fnd_executables fe,
apps.xdo_ds_definitions_vl xddv,
apps.xdo_templates_vl xtv,
apps.xdo_lobs xl
WHERE xddv.data_source_code = xtv.data_source_code
AND xddv.data_source_code = fcpv.concurrent_program_name
AND fe.executable_id = fcpv.executable_id
AND UPPER(template_name) like '%PACK%'
AND fcpv.enabled_flag = 'Y'
AND fe.execution_method_code = 'P'
AND xl.lob_type in ('TEMPLATE','TEMPLATE_SOURCE')
AND lower(xl.file_name) like '%.rtf'
AND xtv.template_code=xl.lob_code