128: | ----------- |
129: | |
130: +======================================================================*/
131:
132: CURSOR c_xla_rules_t IS -- cursor for xla_rules_t
133: SELECT *
134: FROM xla_rules_t
135: WHERE error_value = 0
136: FOR UPDATE of error_value;
130: +======================================================================*/
131:
132: CURSOR c_xla_rules_t IS -- cursor for xla_rules_t
133: SELECT *
134: FROM xla_rules_t
135: WHERE error_value = 0
136: FOR UPDATE of error_value;
137:
138: CURSOR c_xla_rule_details_t IS -- cursor for xla_rule_details_t
157: SELECT language_code
158: FROM fnd_languages
159: WHERE installed_flag = 'I';
160:
161: l_xla_rules c_xla_rules_t%ROWTYPE;
162: l_xla_rule_details c_xla_rule_details_t%ROWTYPE;
163: l_xla_conditions c_xla_conditions_t%ROWTYPE;
164: l_xla_line_assgns c_xla_line_assgns_t%ROWTYPE;
165: l_base_language VARCHAR2(4);
217:
218: /* Missing the validation of the interface tables */
219:
220: /* Upload rules into SLA tables */
221: OPEN c_xla_rules_t;
222: LOOP
223: FETCH c_xla_rules_t INTO l_xla_rules;
224: EXIT WHEN c_xla_rules_t%NOTFOUND;
225: BEGIN -- Block begins
219:
220: /* Upload rules into SLA tables */
221: OPEN c_xla_rules_t;
222: LOOP
223: FETCH c_xla_rules_t INTO l_xla_rules;
224: EXIT WHEN c_xla_rules_t%NOTFOUND;
225: BEGIN -- Block begins
226: -- Insert data into xla_seg_rules_b
227: INSERT INTO xla_seg_rules_b
220: /* Upload rules into SLA tables */
221: OPEN c_xla_rules_t;
222: LOOP
223: FETCH c_xla_rules_t INTO l_xla_rules;
224: EXIT WHEN c_xla_rules_t%NOTFOUND;
225: BEGIN -- Block begins
226: -- Insert data into xla_seg_rules_b
227: INSERT INTO xla_seg_rules_b
228: (application_id
247: (l_xla_rules.application_id
248: ,l_xla_rules.amb_context_code
249: ,l_xla_rules.segment_rule_type_code
250: ,UPPER(l_xla_rules.segment_rule_code)
251: ,l_xla_rules.transaction_coa_id
252: ,l_xla_rules.accounting_coa_id
253: ,l_xla_rules.flexfield_assign_mode_code
254: ,l_xla_rules.flexfield_segment_code
255: ,l_xla_rules.enabled_flag
330: );
331: END LOOP;
332: END IF;
333: -- Mark the row in the interface table as been processed
334: UPDATE xla_rules_t
335: SET error_value = 1 -- The row has been processed with no error
336: WHERE CURRENT OF c_xla_rules_t;
337: EXCEPTION
338: WHEN OTHERS THEN
332: END IF;
333: -- Mark the row in the interface table as been processed
334: UPDATE xla_rules_t
335: SET error_value = 1 -- The row has been processed with no error
336: WHERE CURRENT OF c_xla_rules_t;
337: EXCEPTION
338: WHEN OTHERS THEN
339: l_error_code := SQLCODE;
340: UPDATE xla_rules_t
336: WHERE CURRENT OF c_xla_rules_t;
337: EXCEPTION
338: WHEN OTHERS THEN
339: l_error_code := SQLCODE;
340: UPDATE xla_rules_t
341: SET error_value = l_error_code -- The row has been processed with errors
342: WHERE CURRENT OF c_xla_rules_t;
343: END; -- Block ends
344: END LOOP;
338: WHEN OTHERS THEN
339: l_error_code := SQLCODE;
340: UPDATE xla_rules_t
341: SET error_value = l_error_code -- The row has been processed with errors
342: WHERE CURRENT OF c_xla_rules_t;
343: END; -- Block ends
344: END LOOP;
345: CLOSE c_xla_rules_t;
346:
341: SET error_value = l_error_code -- The row has been processed with errors
342: WHERE CURRENT OF c_xla_rules_t;
343: END; -- Block ends
344: END LOOP;
345: CLOSE c_xla_rules_t;
346:
347: OPEN c_xla_rule_details_t;
348: LOOP
349: FETCH c_xla_rule_details_t into l_xla_rule_details;
573: END LOOP;
574: CLOSE c_xla_line_assgns_t;
575:
576: --END LOOP;
577: --CLOSE c_xla_rules_t;
578:
579: /* handle_errors; */
580:
581: EXCEPTION