Query to finde Template name from Request_id

Select  xddt.Data_source_name "TEMPLATE NAME"
     --,xl.lob_type
       ,xl.file_name "RTF FILE NAME"
     --,xtb.template_code
      ,fcr.request_id  "REQUEST ID"
from   xdo_lobs xl
      ,xdo_templates_b xtb
      ,xdo_ds_definitions_tl xddt
      ,fnd_concurrent_requests fcr
      ,fnd_concurrent_programs_tl fcpt
      ,fnd_concurrent_programs fcp
where xl.application_short_name = xtb.application_short_name
and   xl.lob_code = xtb.template_code
and   xtb.data_source_code = xddt.data_source_code
and   fcr.concurrent_program_id = fcpt.concurrent_program_id
and   fcp.concurrent_program_id = fcpt.concurrent_program_id
and   xddt.data_source_code = fcp.concurrent_program_name
and   xl.lob_type='TEMPLATE_SOURCE'
and   fcr.request_id='5095760' --PASS REQUEST ID

Post a Comment