Search This Blog
Thursday, February 14, 2013
Using FND_REQUEST.ADD_LAYOUT to pick template without Hardcoding
BEGIN
SELECT fcpt.user_concurrent_program_name,
fcp.concurrent_program_name,
fa.application_short_name,
fcpt.description,
fcp.concurrent_program_id,
fcp.application_id,
fcp.output_file_type
INTO v_full_name,
v_short_name,
v_app_short_name,
v_description,
v_concurrent_program_id,
v_application_id,
v_output_file_type
FROM fnd_concurrent_programs_tl fcpt,
fnd_concurrent_programs fcp,
fnd_application fa
WHERE UPPER(fcpt.user_concurrent_program_name) =
v_concurrent_prgm_name
AND fcpt.concurrent_program_id = fcp.concurrent_program_id
AND fcp.application_id = fa.application_id
AND fcp.enabled_flag = 'Y'
AND fcpt.language = USERENV('LANG');
--
IF v_output_file_type = 'XML' THEN
--
BEGIN
SELECT default_language,
default_territory,
default_output_type
INTO v_default_language,
v_default_territory,
v_default_output_type
FROM xdo_templates_vl
WHERE template_code = v_short_name
AND NVL(end_date,SYSDATE) >= SYSDATE
AND object_version_number = (SELECT MAX(xdt1.object_version_number)
FROM xdo_templates_vl xdt1
WHERE xdt1.template_code = v_short_name
AND NVL(xdt1.end_date,SYSDATE) >= SYSDATE)
AND ROWNUM < 2;
--
v_set_layout_option :=
fnd_request.add_layout (
template_appl_name => v_app_short_name
, template_code => v_short_name
, template_language => v_default_language
, template_territory => v_default_territory
, output_format => v_default_output_type
);
--
EXCEPTION WHEN OTHERS THEN
NULL;
END;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment