SELECT XDDV.data_source_code "Data Definition Code",
XDDV.data_source_name "Data Definition",
XDDV.description "Data Definition Description",
XTB.template_code "Template Code",
XTT.template_name "Template Name",
XTT.description "Template Description",
XTB.template_type_code "Type",
XTB.default_output_type "Default Output Type",
xldd.FILE_NAME "Data Template File Name",
XLtemp.file_name "Template File Name",
xlbur.FILE_NAME "Bursting File Name"
FROM apps.XDO_DS_DEFINITIONS_VL XDDV,
apps.XDO_TEMPLATES_B XTB,
apps.XDO_TEMPLATES_TL XTT,
apps.XDO_LOBS XLTemp,
apps.XDO_LOBS XLDD,
apps.XDO_LOBS XLBUR,
apps.FND_APPLICATION_TL FAT,
APPS.FND_APPLICATION FA
WHERE XDDV.application_short_name = FA.application_short_name
AND FAT.application_id = FA.application_id
AND XTB.application_short_name = XDDV.application_short_name
AND XDDV.data_source_code = XTB.data_source_code
AND XTT.template_code = XTB.template_code
AND XTT.language = 'US'
AND fat.language = 'US'
AND XLtemp.LOB_CODE = XTB.TEMPLATE_CODE
AND XLtemp.XDO_FILE_TYPE = XTB.TEMPLATE_TYPE_CODE
AND xldd.LOB_CODE = XDDV.data_source_code
AND xldd.LOB_TYPE = 'DATA_TEMPLATE'
AND xlbur.LOB_CODE(+) = XDDV.data_source_code
AND xlbur.LOB_TYPE(+) = 'BURSTING_FILE'
AND XTT.TEMPLATE_CODE IN (:XXTEMPLATE_CODE)