The following lines contain the word 'select', 'insert', 'update' or 'delete':
| a) Populate xla_seg_rules_b.updated_flag with 'Y'. |
| b) Add code to populate xla_line_defn_assgns.accounting_line_code |
| 28-DEC-2005 Jorge Larre Fix for bug 4906683 |
| a) Populate side_code with 'NA'. |
| b) Populate inherit_adr_flag with 'N'. |
| c) Populate adr_version_num with 0. |
| d) Populate segment_rule_appl_id with application_id. |
| |
| 15-JUN-2012 VGOPISET added call to AD_ZD_SEED.PREPARE for 12.2 as |
| ADR set tables need to prepared during patching|
+======================================================================*/
--
-- Private types
--
TYPE t_array_VL4 IS TABLE OF VARCHAR2(4) INDEX BY BINARY_INTEGER;
SELECT *
FROM xla_rules_t
WHERE error_value = 0
FOR UPDATE of error_value;
SELECT *
FROM xla_rule_details_t
WHERE error_value = 0
FOR UPDATE of error_value;
SELECT *
FROM xla_conditions_t
WHERE error_value = 0
FOR UPDATE of error_value;
SELECT *
FROM xla_line_assgns_t
WHERE error_value = 0
FOR UPDATE of error_value;
SELECT language_code
FROM fnd_languages
WHERE installed_flag = 'I';
SELECT language_code
INTO l_base_language
FROM fnd_languages
WHERE installed_flag = 'B';
INSERT INTO xla_seg_rules_b
(application_id
,amb_context_code
,segment_rule_type_code
,segment_rule_code
,transaction_coa_id
,accounting_coa_id
,flexfield_assign_mode_code
,flexfield_segment_code
,enabled_flag
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,flex_value_set_id
,version_num
,updated_flag
)
VALUES
(l_xla_rules.application_id
,l_xla_rules.amb_context_code
,l_xla_rules.segment_rule_type_code
,UPPER(l_xla_rules.segment_rule_code)
,l_xla_rules.transaction_coa_id
,l_xla_rules.accounting_coa_id
,l_xla_rules.flexfield_assign_mode_code
,l_xla_rules.flexfield_segment_code
,l_xla_rules.enabled_flag
,l_date
,l_user_id
,l_date
,l_user_id
,l_login_id
,NULL
,0
,'Y'
);
INSERT INTO xla_seg_rules_tl
(last_update_login
,amb_context_code
,last_update_date
,last_updated_by
,created_by
,application_id
,segment_rule_type_code
,segment_rule_code
,name
,description
,creation_date
,language
,source_lang
)
VALUES
(l_login_id
,l_xla_rules.amb_context_code
,l_date
,l_user_id
,l_user_id
,l_xla_rules.application_id
,l_xla_rules.segment_rule_type_code
,l_xla_rules.segment_rule_code
,l_xla_rules.name
,l_xla_rules.description
,l_date
,l_base_language
,l_base_language
);
INSERT INTO xla_seg_rules_tl
(last_update_login
,amb_context_code
,last_update_date
,last_updated_by
,created_by
,application_id
,segment_rule_type_code
,segment_rule_code
,name
,description
,creation_date
,language
,source_lang
)
VALUES
(l_login_id
,l_xla_rules.amb_context_code
,l_date
,l_user_id
,l_user_id
,l_xla_rules.application_id
,l_xla_rules.segment_rule_type_code
,l_xla_rules.segment_rule_code
,l_xla_rules.name
,l_xla_rules.description
,l_date
,l_installed_language(Idx)
,l_base_language
);
UPDATE xla_rules_t
SET error_value = 1 -- The row has been processed with no error
WHERE CURRENT OF c_xla_rules_t;
UPDATE xla_rules_t
SET error_value = l_error_code -- The row has been processed with errors
WHERE CURRENT OF c_xla_rules_t;
INSERT INTO xla_seg_rule_details
(segment_rule_detail_id
,application_id
,amb_context_code
,segment_rule_type_code
,segment_rule_code
,user_sequence
,value_type_code
,value_source_application_id
,value_source_type_code
,value_source_code
,value_constant
,value_code_combination_id
,value_mapping_set_code
,value_flexfield_segment_code
,input_source_application_id
,input_source_type_code
,input_source_code
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,value_segment_rule_appl_id
,value_segment_rule_type_code
,value_segment_rule_code
,value_adr_version_num
)
VALUES
(l_xla_rule_details.segment_rule_detail_id
,l_xla_rule_details.application_id
,l_xla_rule_details.amb_context_code
,l_xla_rule_details.segment_rule_type_code
,UPPER(l_xla_rule_details.segment_rule_code)
,l_xla_rule_details.user_sequence
,l_xla_rule_details.value_type_code
,l_xla_rule_details.value_source_application_id
,l_xla_rule_details.value_source_type_code
,l_xla_rule_details.value_source_code
,l_xla_rule_details.value_constant
,l_xla_rule_details.value_code_combination_id
,l_xla_rule_details.value_mapping_set_code
,l_xla_rule_details.value_flexfield_segment_code
,l_xla_rule_details.input_source_application_id
,l_xla_rule_details.input_source_type_code
,l_xla_rule_details.input_source_code
,l_date
,l_user_id
,l_date
,l_user_id
,l_login_id
,l_xla_rule_details.value_segment_rule_appl_id
,l_xla_rule_details.value_segment_rule_type_code
,l_xla_rule_details.value_segment_rule_code
,l_xla_rule_details.value_adr_version_num
);
UPDATE xla_rule_details_t
SET error_value = 1 -- The row has been processed with no error
WHERE CURRENT OF c_xla_rule_details_t;
UPDATE xla_rule_details_t
SET error_value = l_error_code -- The row has been processed with errors
WHERE CURRENT OF c_xla_rule_details_t;
INSERT INTO xla_conditions
(condition_id
,user_sequence
,application_id
,amb_context_code
,entity_code
,event_class_code
,accounting_line_type_code
,accounting_line_code
,segment_rule_detail_id
,description_prio_id
,bracket_left_code
,bracket_right_code
,value_type_code
,source_application_id
,source_type_code
,source_code
,flexfield_segment_code
,value_flexfield_segment_code
,value_source_application_id
,value_source_type_code
,value_source_code
,value_constant
,line_operator_code
,logical_operator_code
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,independent_value_constant
)
VALUES
(l_xla_conditions.condition_id
,l_xla_conditions.user_sequence
,l_xla_conditions.application_id
,l_xla_conditions.amb_context_code
,NULL
,NULL
,NULL
,NULL
,l_xla_conditions.segment_rule_detail_id
,NULL
,l_xla_conditions.bracket_left_code
,l_xla_conditions.bracket_right_code
,l_xla_conditions.value_type_code
,l_xla_conditions.source_application_id
,l_xla_conditions.source_type_code
,l_xla_conditions.source_code
,l_xla_conditions.flexfield_segment_code
,l_xla_conditions.value_flexfield_segment_code
,l_xla_conditions.value_source_application_id
,l_xla_conditions.value_source_type_code
,l_xla_conditions.value_source_code
,l_xla_conditions.value_constant
,l_xla_conditions.line_operator_code
,l_xla_conditions.logical_operator_code
,l_date
,l_user_id
,l_date
,l_user_id
,l_login_id
,l_xla_conditions.independent_value_constant
);
UPDATE xla_conditions_t
SET error_value = 1 -- The row has been processed with no error
WHERE CURRENT OF c_xla_conditions_t;
UPDATE xla_conditions_t
SET error_value = l_error_code -- The row has been processed with errors
WHERE CURRENT OF c_xla_conditions_t;
INSERT INTO xla_line_defn_adr_assgns
(amb_context_code
,application_id
,event_class_code
,event_type_code
,line_definition_owner_code
,line_definition_code
,accounting_line_type_code
,accounting_line_code
,flexfield_segment_code
,segment_rule_type_code
,segment_rule_code
,object_version_number
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,side_code
,inherit_adr_flag
,segment_rule_appl_id
,adr_version_num
)
VALUES
(l_xla_line_assgns.amb_context_code
,l_xla_line_assgns.application_id
,l_xla_line_assgns.event_class_code
,l_xla_line_assgns.event_type_code
,l_xla_line_assgns.line_definition_owner_code
,l_xla_line_assgns.line_definition_code
,l_xla_line_assgns.accounting_line_type_code
,l_xla_line_assgns.accounting_line_code
,l_xla_line_assgns.flexfield_segment_code
,l_xla_line_assgns.segment_rule_type_code
,l_xla_line_assgns.segment_rule_code
,1
,l_date
,l_user_id
,l_date
,l_user_id
,l_login_id
,'NA'
,'N'
,l_xla_line_assgns.application_id
,0
);
UPDATE xla_line_assgns_t
SET error_value = 1 -- The row has been processed with no error
WHERE CURRENT OF c_xla_line_assgns_t;
UPDATE xla_line_assgns_t
SET error_value = l_error_code -- The row has been processed with errors
WHERE CURRENT OF c_xla_line_assgns_t;