Infolinks

Saturday 12 May 2012

XML--QUIRES

Query to find RTF file name,Template Name by passing Request ID.sql

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




Details of Con Request that submitted with specific Template
---------------------------------------------------------------
We have a Concurrent Program and associated Data definition for XML report.
We have TWO Templates attached to the Data Definition.
We would like to know the Concurrent Reuqest ID of the CONC Program which ran for a Specific TEMPLATE.
We are using the version Oracle Applications : 11.5.10.2
TEMPLATE_CODE column in FND_CONCURRENT_PROGRAMS Table is not populated with data.

CONC Program Name = 'ABC'
Data Definition = 'ABC'
Template 1    = 'TEMP1'
Template 2    = 'TEMP2'

How can we get the details of Concurrent Program which was submitted with Template "TEMP2".
Conc Program Name and Template are Paramters.
I am using the following SQL and not getting the desired results.


SELECT g.user_concurrent_program_name,fcr.request_id, e.template_id,
e.template_code,fcr.*,
a.data_source_name,
a.data_source_code,
a.description,
b.application_short_name,
b.DATA_SOURCE_STATUS,
f.application_id,
c.executable_name
FROM xdo_ds_definitions_tl a,
xdo_ds_definitions_b b,
xdo_templates_b e,
fnd_application f,
fnd_executables c,
fnd_concurrent_programs d,
fnd_concurrent_programs_tl g,
fnd_concurrent_requests fcr
WHERE a.data_source_code = b.data_source_code
and e.template_code = 'TEMP1'
AND a.data_source_code = e.data_source_code
AND a.application_short_name = f.application_short_name
AND c.application_id = f.application_id
AND a.data_source_code = c.executable_name
AND c.application_id = d.application_id
AND a.data_source_code = d.concurrent_program_name
AND d.concurrent_program_id = g.concurrent_program_id
AND fcr.concurrent_program_id = g.concurrent_program_id
and d.concurrent_program_name ='ABC'

No comments:

Post a Comment