The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT application_id
INTO l_appl_id
FROM fnd_application
WHERE application_short_name = P_APPLICATION_SHORT_NAME;
SELECT layout_id
INTO l_layout_id
FROM hxc_layouts
WHERE layout_name = p_layout_name;
SELECT layout_comp_definition_id
INTO l_layout_comp_definition_id
FROM hxc_layout_comp_definitions
WHERE component_type = p_component_type
AND render_type = p_render_type;
SELECT layout_component_id
INTO l_layout_component_id
FROM hxc_layout_components comp
,hxc_layouts lay
WHERE component_name = p_component_name
AND comp.layout_id = lay.layout_id
AND lay.layout_name = p_layout_name;
SELECT layout_comp_qualifier_id
INTO l_layout_comp_qualifier_id
FROM hxc_layout_comp_qualifiers
WHERE qualifier_name = p_comp_qualifier_name
AND layout_component_id = p_layout_component_id;
SELECT 'yes'
FROM dual
WHERE EXISTS (SELECT 'x'
FROM hxc_layouts_tl
WHERE layout_id = p_layout_id
and DISPLAY_LAYOUT_NAME <> P_DISPLAY_LAYOUT_NAME --added
AND userenv('LANG') in ( language, source_lang )
);
SELECT modifier_level
,layout_id
,object_version_number
INTO l_modifier_level
,l_layout_id
,l_object_version_number
FROM hxc_layouts
WHERE layout_name = p_layout_name
AND application_id = l_application_id;
DELETE FROM hxc_layout_comp_prompts
WHERE layout_component_id IN
(SELECT comp.layout_component_id
FROM hxc_layout_components comp
WHERE comp.layout_id = l_layout_id);
DELETE FROM hxc_layout_comp_qualifiers cq
WHERE EXISTS
(SELECT comp.layout_component_id
FROM hxc_layout_components comp
WHERE comp.layout_id = l_layout_id
AND cq.layout_component_id = comp.layout_component_id);
DELETE FROM hxc_layout_components
WHERE layout_id = l_layout_id;
SELECT 'yes'
INTO l_dummy
FROM dual
WHERE EXISTS (SELECT 'x'
FROM hxc_layouts_tl
WHERE layout_id = l_layout_id
and DISPLAY_LAYOUT_NAME <> P_DISPLAY_LAYOUT_NAME --added
AND userenv('LANG') in ( language, source_lang )
);
SELECT layout_comp_definition_id
,object_version_number
FROM hxc_layout_comp_definitions
WHERE component_type = p_component_type
AND render_type = p_render_type;
SELECT 'N'
FROM hxc_layout_components lc
WHERE lc.layout_comp_definition_id = p_layout_comp_definition_id;
SELECT layout_component_id
,comp.object_version_number
INTO l_layout_component_id
,l_object_version_number
FROM hxc_layout_components comp
,hxc_layouts lay
WHERE component_name = P_COMPONENT_NAME
AND comp.layout_id = lay.layout_id
AND layout_name = p_layout_name;
SELECT lcp.layout_comp_prompt_id
,lcp.object_version_number
INTO l_layout_comp_prompt_id
,l_object_version_number
FROM HXC_LAYOUT_COMP_PROMPTS lcp
WHERE lcp.prompt_alias = p_prompt_alias
AND lcp.prompt_type = p_prompt_type
AND lcp.layout_component_id = l_layout_component_id;
SELECT layout_comp_qualifier_id
,object_version_number
INTO l_layout_comp_qualifier_id
,l_object_version_number
FROM HXC_LAYOUT_COMP_QUALIFIERS
WHERE qualifier_name = p_qualifier_name
and layout_component_id = l_layout_component_id;
SELECT layout_comp_qual_rule_id
,object_version_number
INTO l_layout_comp_qual_rule_id
,l_object_version_number
FROM HXC_LAYOUT_COMP_QUAL_RULES
WHERE rule_name = p_rule_name;
p_last_update_date IN VARCHAR2
)
IS
--
l_layout_id hxc_layouts.layout_id%TYPE;
l_last_update_date_db DATE;
l_last_updated_by_db NUMBER(15);
l_last_updated_by_f NUMBER(15);
l_last_update_date_f DATE;
SELECT 'yes'
FROM dual
WHERE EXISTS( SELECT 'x'
FROM hxc_layouts_tl
WHERE layout_id = p_layout_id
AND display_layout_name <>
p_display_layout_name --added
AND userenv('LANG') IN (LANGUAGE, source_lang));
l_last_updated_by_f := fnd_load_util.owner_id(p_owner);
l_last_update_date_f :=
nvl(TO_DATE(p_last_update_date, 'YYYY/MM/DD'), sysdate);
SELECT modifier_level,
layout_id,
object_version_number,
last_update_date,
last_updated_by
INTO l_modifier_level,
l_layout_id,
l_object_version_number,
l_last_update_date_db,
l_last_updated_by_db
FROM hxc_layouts
WHERE layout_name = p_layout_name
AND application_id = l_application_id;
DELETE FROM hxc_layout_comp_prompts
WHERE layout_component_id IN (SELECT comp.layout_component_id
FROM hxc_layout_components comp
WHERE comp.layout_id =
l_layout_id);
DELETE FROM hxc_layout_comp_qualifiers cq
WHERE EXISTS( SELECT comp.layout_component_id
FROM hxc_layout_components comp
WHERE comp.layout_id = l_layout_id
AND cq.layout_component_id =
comp.layout_component_id);
DELETE FROM hxc_layout_components
WHERE layout_id = l_layout_id;
l_last_updated_by_f,
l_last_update_date_f,
l_last_updated_by_db,
l_last_update_date_db,
p_custom_mode
)
)
THEN
hxc_ula_upd.upd(
p_layout_name=> p_layout_name,
p_application_id=> l_application_id,
p_layout_type=> p_layout_type,
p_modifier_level=> p_modifier_level,
p_modifier_value=> p_modifier_value,
p_top_level_region_code=> p_top_level_region_code,
p_layout_id=> l_layout_id,
p_object_version_number=> l_object_version_number
);
p_last_update_date IN VARCHAR2
)
IS
--
l_layout_id hxc_layouts.layout_id%TYPE;
l_last_update_date_db DATE;
l_last_updated_by_db NUMBER(15);
l_last_updated_by_f NUMBER(15);
l_last_update_date_f DATE;
l_last_updated_by_f := fnd_load_util.owner_id(p_owner);
l_last_update_date_f :=
nvl(TO_DATE(p_last_update_date, 'YYYY/MM/DD'), sysdate);
SELECT 'yes'
INTO l_dummy
FROM dual
WHERE EXISTS( SELECT 'x'
FROM hxc_layouts_tl
WHERE layout_id = l_layout_id
AND display_layout_name <>
p_display_layout_name --added
AND userenv('LANG') IN (LANGUAGE, source_lang));
SELECT last_update_date,
last_updated_by
INTO l_last_update_date_db,
l_last_updated_by_db
FROM hxc_layouts_tl
WHERE layout_id = l_layout_id
AND display_layout_name <> p_display_layout_name --added
AND userenv('LANG') = LANGUAGE;
l_last_updated_by_f,
l_last_update_date_f,
l_last_updated_by_db,
l_last_update_date_db,
p_custom_mode
)
OR (l_dummy = 'yes')
)
THEN
hxc_ult_upd.upd_tl(
p_language_code=> userenv('LANG'),
p_layout_id=> l_layout_id,
p_display_layout_name=> p_display_layout_name
);
p_last_update_date IN VARCHAR2
)
IS
--
l_last_update_date_db DATE;
l_last_updated_by_db NUMBER(15);
l_last_updated_by_f NUMBER(15);
l_last_update_date_f DATE;
SELECT layout_comp_definition_id,
object_version_number,
last_update_date,
last_updated_by
FROM hxc_layout_comp_definitions
WHERE component_type = p_component_type
AND render_type = p_render_type;
SELECT 'N'
FROM hxc_layout_components lc
WHERE lc.layout_comp_definition_id = p_layout_comp_definition_id;
l_last_updated_by_f := fnd_load_util.owner_id(p_owner);
l_last_update_date_f :=
nvl(TO_DATE(p_last_update_date, 'YYYY/MM/DD'), sysdate);
l_last_update_date_db,
l_last_updated_by_db;
l_last_updated_by_f,
l_last_update_date_f,
l_last_updated_by_db,
l_last_update_date_db,
p_custom_mode
)
)
THEN
--
-- Call the row handler to update the row
--
hxc_uld_upd.upd(
p_component_class=> p_component_class,
p_component_type=> p_component_type,
p_layout_comp_definition_id=> l_layout_comp_definition_id,
p_render_type=> p_render_type,
p_object_version_number=> l_object_version_number
);
p_last_update_date IN VARCHAR2
)
IS
--
l_layout_id hxc_layouts.layout_id%TYPE;
l_last_update_date_db DATE;
l_last_updated_by_db NUMBER(15);
l_last_updated_by_f NUMBER(15);
l_last_update_date_f DATE;
l_last_updated_by_f := fnd_load_util.owner_id(p_owner);
l_last_update_date_f :=
nvl(TO_DATE(p_last_update_date, 'YYYY/MM/DD'), sysdate);
SELECT layout_component_id,
comp.object_version_number,
comp.last_update_date,
comp.last_updated_by
INTO l_layout_component_id,
l_object_version_number,
l_last_update_date_db,
l_last_updated_by_db
FROM hxc_layout_components comp,
hxc_layouts lay
WHERE component_name = p_component_name
AND comp.layout_id = lay.layout_id
AND layout_name = p_layout_name;
l_last_updated_by_f,
l_last_update_date_f,
l_last_updated_by_db,
l_last_update_date_db,
p_custom_mode
)
)
THEN
hxc_ulc_upd.upd(
p_layout_id=> l_layout_id,
p_parent_component_id=> l_parent_comp_id,
p_sequence=> p_sequence,
p_component_name=> p_component_name,
p_component_value=> p_component_value,
p_name_value_string=> p_name_value_string,
p_region_code=> p_region_code,
p_region_code_app_id=> l_application_id,
p_attribute_code=> p_attribute_code,
p_attribute_code_app_id=> l_attr_application_id,
p_layout_component_id=> l_layout_component_id,
p_object_version_number=> l_object_version_number,
p_layout_comp_definition_id=> l_layout_comp_definition_id,
p_component_alias=> p_component_alias,
p_parent_bean=> p_parent_bean,
p_attribute1=> p_attribute1,
p_attribute2=> p_attribute2,
p_attribute3=> p_attribute3,
p_attribute4=> p_attribute4,
p_attribute5=> p_attribute5
);
p_last_update_date IN VARCHAR2
)
IS
--
l_layout_component_id hxc_layout_components.layout_component_id%TYPE;
l_last_update_date_db DATE;
l_last_updated_by_db NUMBER(15);
l_last_updated_by_f NUMBER(15);
l_last_update_date_f DATE;
l_last_updated_by_f := fnd_load_util.owner_id(p_owner);
l_last_update_date_f :=
nvl(TO_DATE(p_last_update_date, 'YYYY/MM/DD'), sysdate);
SELECT lcp.layout_comp_prompt_id,
lcp.object_version_number,
last_update_date,
last_updated_by
INTO l_layout_comp_prompt_id,
l_object_version_number,
l_last_update_date_db,
l_last_updated_by_db
FROM hxc_layout_comp_prompts lcp
WHERE lcp.prompt_alias = p_prompt_alias
AND lcp.prompt_type = p_prompt_type
AND lcp.layout_component_id = l_layout_component_id;
l_last_updated_by_f,
l_last_update_date_f,
l_last_updated_by_db,
l_last_update_date_db,
p_custom_mode
)
)
THEN
--
-- Use the Row handler to update the row
--
hxc_ulp_upd.upd(
p_layout_component_id=> l_layout_component_id,
p_prompt_alias=> p_prompt_alias,
p_prompt_type=> p_prompt_type,
p_region_code=> p_region_code,
p_region_application_id=> l_region_app_id,
p_attribute_code=> p_attribute_code,
p_attribute_application_id=> l_attribute_app_id,
p_layout_comp_prompt_id=> l_layout_comp_prompt_id,
p_object_version_number=> l_object_version_number
);
p_last_update_date IN VARCHAR2
)
IS
--
l_layout_component_id hxc_layout_components.layout_component_id%TYPE;
l_last_update_date_db DATE;
l_last_updated_by_db NUMBER(15);
l_last_updated_by_f NUMBER(15);
l_last_update_date_f DATE;
l_last_updated_by_f := fnd_load_util.owner_id(p_owner);
l_last_update_date_f :=
nvl(TO_DATE(p_last_update_date, 'YYYY/MM/DD'), sysdate);
SELECT layout_comp_qualifier_id,
object_version_number,
last_update_date,
last_updated_by
INTO l_layout_comp_qualifier_id,
l_object_version_number,
l_last_update_date_db,
l_last_updated_by_db
FROM hxc_layout_comp_qualifiers
WHERE qualifier_name = p_qualifier_name
AND layout_component_id = l_layout_component_id;
l_last_updated_by_f,
l_last_update_date_f,
l_last_updated_by_db,
l_last_update_date_db,
p_custom_mode
)
)
THEN
--
-- Use the Row handler to update the row
--
hxc_ulq_upd.upd(
p_layout_component_id=> l_layout_component_id,
p_qualifier_name=> p_qualifier_name,
p_qualifier_attribute_category=> p_qualifier_attribute_category,
p_qualifier_attribute1=> p_qualifier_attribute1,
p_qualifier_attribute2=> p_qualifier_attribute2,
p_qualifier_attribute3=> p_qualifier_attribute3,
p_qualifier_attribute4=> p_qualifier_attribute4,
p_qualifier_attribute5=> p_qualifier_attribute5,
p_qualifier_attribute6=> p_qualifier_attribute6,
p_qualifier_attribute7=> p_qualifier_attribute7,
p_qualifier_attribute8=> p_qualifier_attribute8,
p_qualifier_attribute9=> p_qualifier_attribute9,
p_qualifier_attribute10=> p_qualifier_attribute10,
p_qualifier_attribute11=> p_qualifier_attribute11,
p_qualifier_attribute12=> p_qualifier_attribute12,
p_qualifier_attribute13=> p_qualifier_attribute13,
p_qualifier_attribute14=> p_qualifier_attribute14,
p_qualifier_attribute15=> p_qualifier_attribute15,
p_qualifier_attribute16=> p_qualifier_attribute16,
p_qualifier_attribute17=> p_qualifier_attribute17,
p_qualifier_attribute18=> p_qualifier_attribute18,
p_qualifier_attribute19=> p_qualifier_attribute19,
p_qualifier_attribute20=> p_qualifier_attribute20,
p_qualifier_attribute21=> p_qualifier_attribute21,
p_qualifier_attribute22=> p_qualifier_attribute22,
p_qualifier_attribute23=> p_qualifier_attribute23,
p_qualifier_attribute24=> p_qualifier_attribute24,
p_qualifier_attribute25=> p_qualifier_attribute25,
p_qualifier_attribute26=> p_qualifier_attribute26,
p_qualifier_attribute27=> p_qualifier_attribute27,
p_qualifier_attribute28=> p_qualifier_attribute28,
p_qualifier_attribute29=> p_qualifier_attribute29,
p_qualifier_attribute30=> p_qualifier_attribute30,
p_layout_comp_qualifier_id=> l_layout_comp_qualifier_id,
p_object_version_number=> l_object_version_number
);
SELECT layout_comp_qual_rule_id
,object_version_number
INTO l_layout_comp_qual_rule_id
,l_object_version_number
FROM HXC_LAYOUT_COMP_QUAL_RULES
WHERE rule_name = p_rule_name;