23: l_seq NUMBER;
24:
25: BEGIN
26:
27: if ec_debug.G_debug_level >= 2 then
28: ec_debug.push ('ECE_RULES_PKG.UPDATE_STATUS');
29: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
30: ec_debug.pl (3, 'p_level', p_level);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
24:
25: BEGIN
26:
27: if ec_debug.G_debug_level >= 2 then
28: ec_debug.push ('ECE_RULES_PKG.UPDATE_STATUS');
29: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
30: ec_debug.pl (3, 'p_level', p_level);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
32: ec_debug.pl (3, 'p_action', p_action);
25: BEGIN
26:
27: if ec_debug.G_debug_level >= 2 then
28: ec_debug.push ('ECE_RULES_PKG.UPDATE_STATUS');
29: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
30: ec_debug.pl (3, 'p_level', p_level);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
32: ec_debug.pl (3, 'p_action', p_action);
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
26:
27: if ec_debug.G_debug_level >= 2 then
28: ec_debug.push ('ECE_RULES_PKG.UPDATE_STATUS');
29: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
30: ec_debug.pl (3, 'p_level', p_level);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
32: ec_debug.pl (3, 'p_action', p_action);
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
27: if ec_debug.G_debug_level >= 2 then
28: ec_debug.push ('ECE_RULES_PKG.UPDATE_STATUS');
29: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
30: ec_debug.pl (3, 'p_level', p_level);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
32: ec_debug.pl (3, 'p_action', p_action);
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
35: ec_debug.pl (3, 'p_stage_id', p_stage_id);
28: ec_debug.push ('ECE_RULES_PKG.UPDATE_STATUS');
29: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
30: ec_debug.pl (3, 'p_level', p_level);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
32: ec_debug.pl (3, 'p_action', p_action);
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
35: ec_debug.pl (3, 'p_stage_id', p_stage_id);
36: ec_debug.pl (3, 'p_document_id', p_document_id);
29: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
30: ec_debug.pl (3, 'p_level', p_level);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
32: ec_debug.pl (3, 'p_action', p_action);
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
35: ec_debug.pl (3, 'p_stage_id', p_stage_id);
36: ec_debug.pl (3, 'p_document_id', p_document_id);
37: ec_debug.pl (3, 'p_document_number', p_document_number);
30: ec_debug.pl (3, 'p_level', p_level);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
32: ec_debug.pl (3, 'p_action', p_action);
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
35: ec_debug.pl (3, 'p_stage_id', p_stage_id);
36: ec_debug.pl (3, 'p_document_id', p_document_id);
37: ec_debug.pl (3, 'p_document_number', p_document_number);
38: ec_debug.pl (3, 'p_msg_text', p_msg_text);
31: ec_debug.pl (3, 'p_valid_rule', p_valid_rule);
32: ec_debug.pl (3, 'p_action', p_action);
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
35: ec_debug.pl (3, 'p_stage_id', p_stage_id);
36: ec_debug.pl (3, 'p_document_id', p_document_id);
37: ec_debug.pl (3, 'p_document_number', p_document_number);
38: ec_debug.pl (3, 'p_msg_text', p_msg_text);
39: end if;
32: ec_debug.pl (3, 'p_action', p_action);
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
35: ec_debug.pl (3, 'p_stage_id', p_stage_id);
36: ec_debug.pl (3, 'p_document_id', p_document_id);
37: ec_debug.pl (3, 'p_document_number', p_document_number);
38: ec_debug.pl (3, 'p_msg_text', p_msg_text);
39: end if;
40:
33: ec_debug.pl (3, 'p_interface_column_id', p_interface_column_id);
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
35: ec_debug.pl (3, 'p_stage_id', p_stage_id);
36: ec_debug.pl (3, 'p_document_id', p_document_id);
37: ec_debug.pl (3, 'p_document_number', p_document_number);
38: ec_debug.pl (3, 'p_msg_text', p_msg_text);
39: end if;
40:
41: xProgress := 'ECERULEB-10-1000';
34: ec_debug.pl (3, 'p_rule_id', p_rule_id);
35: ec_debug.pl (3, 'p_stage_id', p_stage_id);
36: ec_debug.pl (3, 'p_document_id', p_document_id);
37: ec_debug.pl (3, 'p_document_number', p_document_number);
38: ec_debug.pl (3, 'p_msg_text', p_msg_text);
39: end if;
40:
41: xProgress := 'ECERULEB-10-1000';
42: l_cur_status := ec_utils.g_ext_levels(p_level).status;
39: end if;
40:
41: xProgress := 'ECERULEB-10-1000';
42: l_cur_status := ec_utils.g_ext_levels(p_level).status;
43: if ec_debug.G_debug_level =3 then
44: ec_debug.pl (3, 'Current Status', l_cur_status);
45: end if;
46:
47: if (p_valid_rule = 'Y') then
40:
41: xProgress := 'ECERULEB-10-1000';
42: l_cur_status := ec_utils.g_ext_levels(p_level).status;
43: if ec_debug.G_debug_level =3 then
44: ec_debug.pl (3, 'Current Status', l_cur_status);
45: end if;
46:
47: if (p_valid_rule = 'Y') then
48:
80: l_cur_index := g_rule_violation_tbl.count + 1;
81: select ece_rule_violations_s.nextval into l_seq from dual;
82:
83: if SQL%NOTFOUND then
84: ec_debug.pl (0, 'EC', 'ECE_GET_NEXT_SEQ_FAILED',
85: 'PROGRESS_LEVEL', xProgress,
86: 'SEQ', 'ECE_RULE_VIOLATIONS_S');
87: end if;
88:
96: g_rule_violation_tbl(l_cur_index).violation_level := p_violation_level;
97: g_rule_violation_tbl(l_cur_index).ignore_flag := 'N';
98: g_rule_violation_tbl(l_cur_index).message_text := p_msg_text;
99:
100: if ec_debug.G_debug_level =3 then
101: ec_debug.pl (3, 'EC', 'ECE_VIOLATIONS_INSERTED');
102: end if;
103:
104: else
97: g_rule_violation_tbl(l_cur_index).ignore_flag := 'N';
98: g_rule_violation_tbl(l_cur_index).message_text := p_msg_text;
99:
100: if ec_debug.G_debug_level =3 then
101: ec_debug.pl (3, 'EC', 'ECE_VIOLATIONS_INSERTED');
102: end if;
103:
104: else
105:
115: end if;
116:
117: end if;
118:
119: if ec_debug.G_debug_level >= 2 then
120: ec_debug.pl (3, 'Updated status',
121: ec_utils.g_ext_levels(p_level).status);
122: ec_debug.pop ('ECE_RULES_PKG.UPDATE_STATUS');
123: end if;
116:
117: end if;
118:
119: if ec_debug.G_debug_level >= 2 then
120: ec_debug.pl (3, 'Updated status',
121: ec_utils.g_ext_levels(p_level).status);
122: ec_debug.pop ('ECE_RULES_PKG.UPDATE_STATUS');
123: end if;
124:
118:
119: if ec_debug.G_debug_level >= 2 then
120: ec_debug.pl (3, 'Updated status',
121: ec_utils.g_ext_levels(p_level).status);
122: ec_debug.pop ('ECE_RULES_PKG.UPDATE_STATUS');
123: end if;
124:
125: EXCEPTION
126: WHEN OTHERS then
123: end if;
124:
125: EXCEPTION
126: WHEN OTHERS then
127: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
128: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
129: ec_debug.pop ('ECE_RULES_PKG.UPDATE_STATUS');
130: raise fnd_api.g_exc_unexpected_error;
131:
124:
125: EXCEPTION
126: WHEN OTHERS then
127: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
128: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
129: ec_debug.pop ('ECE_RULES_PKG.UPDATE_STATUS');
130: raise fnd_api.g_exc_unexpected_error;
131:
132: END Update_Status;
125: EXCEPTION
126: WHEN OTHERS then
127: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
128: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
129: ec_debug.pop ('ECE_RULES_PKG.UPDATE_STATUS');
130: raise fnd_api.g_exc_unexpected_error;
131:
132: END Update_Status;
133:
182: rule_id = p_rule_id and
183: violation_level = l_violation_level;
184:
185: BEGIN
186: if ec_debug.G_debug_level >= 2 then
187: ec_debug.push ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
188: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
189: ec_debug.pl (3, 'p_address_type', p_address_type);
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
183: violation_level = l_violation_level;
184:
185: BEGIN
186: if ec_debug.G_debug_level >= 2 then
187: ec_debug.push ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
188: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
189: ec_debug.pl (3, 'p_address_type', p_address_type);
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
191: ec_debug.pl (3, 'p_document_id', p_document_id);
184:
185: BEGIN
186: if ec_debug.G_debug_level >= 2 then
187: ec_debug.push ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
188: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
189: ec_debug.pl (3, 'p_address_type', p_address_type);
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
191: ec_debug.pl (3, 'p_document_id', p_document_id);
192: ec_debug.pl (3, 'p_document_number', p_document_number);
185: BEGIN
186: if ec_debug.G_debug_level >= 2 then
187: ec_debug.push ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
188: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
189: ec_debug.pl (3, 'p_address_type', p_address_type);
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
191: ec_debug.pl (3, 'p_document_id', p_document_id);
192: ec_debug.pl (3, 'p_document_number', p_document_number);
193: ec_debug.pl (3, 'p_level', p_level);
186: if ec_debug.G_debug_level >= 2 then
187: ec_debug.push ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
188: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
189: ec_debug.pl (3, 'p_address_type', p_address_type);
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
191: ec_debug.pl (3, 'p_document_id', p_document_id);
192: ec_debug.pl (3, 'p_document_number', p_document_number);
193: ec_debug.pl (3, 'p_level', p_level);
194: ec_debug.pl (3, 'p_map_id', p_map_id);
187: ec_debug.push ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
188: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
189: ec_debug.pl (3, 'p_address_type', p_address_type);
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
191: ec_debug.pl (3, 'p_document_id', p_document_id);
192: ec_debug.pl (3, 'p_document_number', p_document_number);
193: ec_debug.pl (3, 'p_level', p_level);
194: ec_debug.pl (3, 'p_map_id', p_map_id);
195: end if;
188: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
189: ec_debug.pl (3, 'p_address_type', p_address_type);
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
191: ec_debug.pl (3, 'p_document_id', p_document_id);
192: ec_debug.pl (3, 'p_document_number', p_document_number);
193: ec_debug.pl (3, 'p_level', p_level);
194: ec_debug.pl (3, 'p_map_id', p_map_id);
195: end if;
196:
189: ec_debug.pl (3, 'p_address_type', p_address_type);
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
191: ec_debug.pl (3, 'p_document_id', p_document_id);
192: ec_debug.pl (3, 'p_document_number', p_document_number);
193: ec_debug.pl (3, 'p_level', p_level);
194: ec_debug.pl (3, 'p_map_id', p_map_id);
195: end if;
196:
197: -- Standard call to check for call compatibility.
190: ec_debug.pl (3, 'p_stage_id', p_stage_id);
191: ec_debug.pl (3, 'p_document_id', p_document_id);
192: ec_debug.pl (3, 'p_document_number', p_document_number);
193: ec_debug.pl (3, 'p_level', p_level);
194: ec_debug.pl (3, 'p_map_id', p_map_id);
195: end if;
196:
197: -- Standard call to check for call compatibility.
198: if not fnd_api.compatible_api_call (l_api_version_number,
219: raise no_process_rule_info;
220: end if;
221: close c_rule_info;
222:
223: if ec_debug.G_debug_level =3 then
224: ec_debug.pl (3, 'rule_type', l_rule_type);
225: ec_debug.pl (3, 'action_code', l_action_code);
226: end if;
227:
220: end if;
221: close c_rule_info;
222:
223: if ec_debug.G_debug_level =3 then
224: ec_debug.pl (3, 'rule_type', l_rule_type);
225: ec_debug.pl (3, 'action_code', l_action_code);
226: end if;
227:
228: xProgress := 'ECERULEB-20-1004';
221: close c_rule_info;
222:
223: if ec_debug.G_debug_level =3 then
224: ec_debug.pl (3, 'rule_type', l_rule_type);
225: ec_debug.pl (3, 'action_code', l_action_code);
226: end if;
227:
228: xProgress := 'ECERULEB-20-1004';
229: open c_ignore_flag (p_document_id, l_rule_id);
233: l_ignore_flag := 'N';
234: end if;
235: close c_ignore_flag;
236:
237: if ec_debug.G_debug_level =3 then
238: ec_debug.pl (3, 'ignore_flag', l_ignore_flag);
239: end if;
240:
241:
234: end if;
235: close c_ignore_flag;
236:
237: if ec_debug.G_debug_level =3 then
238: ec_debug.pl (3, 'ignore_flag', l_ignore_flag);
239: end if;
240:
241:
242: xProgress := 'ECERULEB-20-1010';
261: raise no_process_rule_info;
262: end if;
263: close c_rule_info;
264:
265: if ec_debug.G_debug_level =3 then
266: ec_debug.pl (3, 'rule_type', l_rule_type);
267: ec_debug.pl (3, 'action_code', l_action_code);
268: end if;
269:
262: end if;
263: close c_rule_info;
264:
265: if ec_debug.G_debug_level =3 then
266: ec_debug.pl (3, 'rule_type', l_rule_type);
267: ec_debug.pl (3, 'action_code', l_action_code);
268: end if;
269:
270: xProgress := 'ECERULEB-20-1040';
263: close c_rule_info;
264:
265: if ec_debug.G_debug_level =3 then
266: ec_debug.pl (3, 'rule_type', l_rule_type);
267: ec_debug.pl (3, 'action_code', l_action_code);
268: end if;
269:
270: xProgress := 'ECERULEB-20-1040';
271: open c_ignore_flag (p_document_id, l_rule_id);
275: l_ignore_flag := 'N';
276: end if;
277: close c_ignore_flag;
278:
279: if ec_debug.G_debug_level =3 then
280: ec_debug.pl (3, 'ignore_flag', l_ignore_flag);
281: end if;
282:
283: if (l_action_code <> g_disabled and l_ignore_flag = 'N') then
276: end if;
277: close c_ignore_flag;
278:
279: if ec_debug.G_debug_level =3 then
280: ec_debug.pl (3, 'ignore_flag', l_ignore_flag);
281: end if;
282:
283: if (l_action_code <> g_disabled and l_ignore_flag = 'N') then
284: xProgress := 'ECERULEB-20-1050';
301:
302: -- Standard call to get message count and if count is 1, get message info.
303: fnd_msg_pub.count_and_get(p_count => x_msg_count,
304: p_data => x_msg_data);
305: if ec_debug.G_debug_level >= 2 then
306: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
307: end if;
308:
309: EXCEPTION
302: -- Standard call to get message count and if count is 1, get message info.
303: fnd_msg_pub.count_and_get(p_count => x_msg_count,
304: p_data => x_msg_data);
305: if ec_debug.G_debug_level >= 2 then
306: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
307: end if;
308:
309: EXCEPTION
310: WHEN fnd_api.g_exc_error then
310: WHEN fnd_api.g_exc_error then
311: x_return_status := fnd_api.g_ret_sts_error;
312: fnd_msg_pub.count_and_get (p_count => x_msg_count,
313: p_data => x_msg_data);
314: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
315:
316: WHEN fnd_api.g_exc_unexpected_error then
317: x_return_status := fnd_api.g_ret_sts_error;
318: fnd_msg_pub.count_and_get (p_count => x_msg_count,
316: WHEN fnd_api.g_exc_unexpected_error then
317: x_return_status := fnd_api.g_ret_sts_error;
318: fnd_msg_pub.count_and_get (p_count => x_msg_count,
319: p_data => x_msg_data);
320: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
321:
322: WHEN no_process_rule_info then
323: if (c_rule_info%ISOPEN) then
324: close c_rule_info;
322: WHEN no_process_rule_info then
323: if (c_rule_info%ISOPEN) then
324: close c_rule_info;
325: end if;
326: ec_debug.pl (0, 'EC', 'ECE_NO_PROCESS_RULE',
327: 'TRANSACTION_TYPE', p_transaction_type,
328: 'RULE_TYPE', l_rule_type);
329: x_return_status := fnd_api.g_ret_sts_error;
330: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
326: ec_debug.pl (0, 'EC', 'ECE_NO_PROCESS_RULE',
327: 'TRANSACTION_TYPE', p_transaction_type,
328: 'RULE_TYPE', l_rule_type);
329: x_return_status := fnd_api.g_ret_sts_error;
330: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
331:
332: WHEN OTHERS THEN
333: if (c_rule_info%ISOPEN) then
334: close c_rule_info;
335: end if;
336: if (c_ignore_flag%ISOPEN) then
337: close c_ignore_flag;
338: end if;
339: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
340: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
341: x_return_status := fnd_api.g_ret_sts_unexp_error;
342: if fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) then
343: fnd_msg_pub.add_exc_msg(g_file_name, g_pkg_name, l_api_name);
336: if (c_ignore_flag%ISOPEN) then
337: close c_ignore_flag;
338: end if;
339: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
340: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
341: x_return_status := fnd_api.g_ret_sts_unexp_error;
342: if fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) then
343: fnd_msg_pub.add_exc_msg(g_file_name, g_pkg_name, l_api_name);
344: end if;
343: fnd_msg_pub.add_exc_msg(g_file_name, g_pkg_name, l_api_name);
344: end if;
345: fnd_msg_pub.count_and_get (p_count => x_msg_count,
346: p_data => x_msg_data);
347: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_PROCESS_RULES');
348:
349: END Validate_Process_Rules;
350:
351:
427: td.map_id = p_map_id ;
428: --rownum = 1;
429:
430: BEGIN
431: if ec_debug.G_debug_level >= 2 then
432: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
433: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
434: ec_debug.pl (3, 'p_address_type', p_address_type);
435: ec_debug.pl (3, 'p_level', p_level);
428: --rownum = 1;
429:
430: BEGIN
431: if ec_debug.G_debug_level >= 2 then
432: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
433: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
434: ec_debug.pl (3, 'p_address_type', p_address_type);
435: ec_debug.pl (3, 'p_level', p_level);
436: ec_debug.pl (3, 'p_map_id', p_map_id);
429:
430: BEGIN
431: if ec_debug.G_debug_level >= 2 then
432: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
433: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
434: ec_debug.pl (3, 'p_address_type', p_address_type);
435: ec_debug.pl (3, 'p_level', p_level);
436: ec_debug.pl (3, 'p_map_id', p_map_id);
437: end if;
430: BEGIN
431: if ec_debug.G_debug_level >= 2 then
432: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
433: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
434: ec_debug.pl (3, 'p_address_type', p_address_type);
435: ec_debug.pl (3, 'p_level', p_level);
436: ec_debug.pl (3, 'p_map_id', p_map_id);
437: end if;
438:
431: if ec_debug.G_debug_level >= 2 then
432: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
433: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
434: ec_debug.pl (3, 'p_address_type', p_address_type);
435: ec_debug.pl (3, 'p_level', p_level);
436: ec_debug.pl (3, 'p_map_id', p_map_id);
437: end if;
438:
439: xProgress := 'ECERULEB-30-1000';
432: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
433: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
434: ec_debug.pl (3, 'p_address_type', p_address_type);
435: ec_debug.pl (3, 'p_level', p_level);
436: ec_debug.pl (3, 'p_map_id', p_map_id);
437: end if;
438:
439: xProgress := 'ECERULEB-30-1000';
440: x_msg_text := NULL;
464: l_translator_code := p_staging_tbl (n_translator_code_pos).value;
465: translator_code := l_translator_code;
466: l_org_id := p_staging_tbl (n_org_id).value;
467:
468: if ec_debug.G_debug_level =3 then
469: ec_debug.pl (3, 'translator_code', l_translator_code);
470: ec_debug.pl (3, 'location_code', l_location_code);
471: ec_debug.pl (3, 'org_id', l_org_id);
472: end if;
465: translator_code := l_translator_code;
466: l_org_id := p_staging_tbl (n_org_id).value;
467:
468: if ec_debug.G_debug_level =3 then
469: ec_debug.pl (3, 'translator_code', l_translator_code);
470: ec_debug.pl (3, 'location_code', l_location_code);
471: ec_debug.pl (3, 'org_id', l_org_id);
472: end if;
473:
466: l_org_id := p_staging_tbl (n_org_id).value;
467:
468: if ec_debug.G_debug_level =3 then
469: ec_debug.pl (3, 'translator_code', l_translator_code);
470: ec_debug.pl (3, 'location_code', l_location_code);
471: ec_debug.pl (3, 'org_id', l_org_id);
472: end if;
473:
474: if (p_address_type = g_customer) then
467:
468: if ec_debug.G_debug_level =3 then
469: ec_debug.pl (3, 'translator_code', l_translator_code);
470: ec_debug.pl (3, 'location_code', l_location_code);
471: ec_debug.pl (3, 'org_id', l_org_id);
472: end if;
473:
474: if (p_address_type = g_customer) then
475:
532: xProgress := 'ECERULEB-30-1070';
533: x_tp_detail_id := -1;
534: end if;
535:
536: if ec_debug.G_debug_level =3 then
537: ec_debug.pl (3, 'loop_count', loop_count);
538: end if;
539:
540: if (loop_count = 0) then
533: x_tp_detail_id := -1;
534: end if;
535:
536: if ec_debug.G_debug_level =3 then
537: ec_debug.pl (3, 'loop_count', loop_count);
538: end if;
539:
540: if (loop_count = 0) then
541: xProgress := 'ECERULEB-30-1080';
551: fnd_message.set_token ('LOCATION_CODE', l_location_code);
552: fnd_message.set_token ('TRANSACTION_TYPE', p_transaction_type);
553: fnd_message.set_token ('ORG_ID', to_char(l_org_id));
554: x_msg_text := fnd_message.get;
555: ec_debug.pl (0, x_msg_text);
556: elsif loop_count > 1 then --bug2151462
557:
558: xProgress := 'ECERULEB-30-1090';
559: x_valid_rule := 'N';
562: fnd_message.set_token ('LOCATION_CODE', l_location_code);
563: fnd_message.set_token ('TRANSACTION_TYPE', p_transaction_type);
564: fnd_message.set_token ('ORG_ID', to_char(l_org_id));
565: x_msg_text := fnd_message.get;
566: ec_debug.pl (0, x_msg_text);
567: elsif loop_count = 1 and l_edi_flag = 'N' then
568:
569: xProgress := 'ECERULEB-30-1090';
570: x_valid_rule := 'N';
573: fnd_message.set_token ('LOCATION_CODE', l_location_code);
574: fnd_message.set_token ('TRANSACTION_TYPE', p_transaction_type);
575: fnd_message.set_token ('ORG_ID', to_char(l_org_id));
576: x_msg_text := fnd_message.get;
577: ec_debug.pl (0, x_msg_text);
578: end if;
579:
580: if ec_debug.G_debug_level >= 2 then
581: ec_debug.pl (3, 'x_msg_text', x_msg_text);
576: x_msg_text := fnd_message.get;
577: ec_debug.pl (0, x_msg_text);
578: end if;
579:
580: if ec_debug.G_debug_level >= 2 then
581: ec_debug.pl (3, 'x_msg_text', x_msg_text);
582: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
583: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
584: end if;
577: ec_debug.pl (0, x_msg_text);
578: end if;
579:
580: if ec_debug.G_debug_level >= 2 then
581: ec_debug.pl (3, 'x_msg_text', x_msg_text);
582: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
583: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
584: end if;
585:
578: end if;
579:
580: if ec_debug.G_debug_level >= 2 then
581: ec_debug.pl (3, 'x_msg_text', x_msg_text);
582: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
583: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
584: end if;
585:
586: EXCEPTION
579:
580: if ec_debug.G_debug_level >= 2 then
581: ec_debug.pl (3, 'x_msg_text', x_msg_text);
582: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
583: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
584: end if;
585:
586: EXCEPTION
587: WHEN OTHERS THEN
597: if (c_hr_addr%ISOPEN) then
598: close c_hr_addr;
599: end if;
600:
601: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
602: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
603: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
604: raise fnd_api.g_exc_unexpected_error;
605:
598: close c_hr_addr;
599: end if;
600:
601: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
602: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
603: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
604: raise fnd_api.g_exc_unexpected_error;
605:
606: END Validate_Trading_Partner;
599: end if;
600:
601: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL',xProgress);
602: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
603: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TRADING_PARTNER');
604: raise fnd_api.g_exc_unexpected_error;
605:
606: END Validate_Trading_Partner;
607:
625: where tp_detail_id = p_tp_detail_id and
626: rownum = 1;
627:
628: BEGIN
629: if ec_debug.G_debug_level >= 2 then
630: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
631: ec_debug.pl (3, 'p_tp_detail_id', p_tp_detail_id);
632: ec_debug.pl (3, 'p_level', p_level);
633: end if;
626: rownum = 1;
627:
628: BEGIN
629: if ec_debug.G_debug_level >= 2 then
630: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
631: ec_debug.pl (3, 'p_tp_detail_id', p_tp_detail_id);
632: ec_debug.pl (3, 'p_level', p_level);
633: end if;
634:
627:
628: BEGIN
629: if ec_debug.G_debug_level >= 2 then
630: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
631: ec_debug.pl (3, 'p_tp_detail_id', p_tp_detail_id);
632: ec_debug.pl (3, 'p_level', p_level);
633: end if;
634:
635: xProgress := 'ECERULEB-40-1000';
628: BEGIN
629: if ec_debug.G_debug_level >= 2 then
630: ec_debug.push ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
631: ec_debug.pl (3, 'p_tp_detail_id', p_tp_detail_id);
632: ec_debug.pl (3, 'p_level', p_level);
633: end if;
634:
635: xProgress := 'ECERULEB-40-1000';
636: x_msg_text := NULL;
642: n_test_flag_pos);
643:
644: l_file_test_flag := p_staging_tbl (n_test_flag_pos).value;
645:
646: if ec_debug.G_debug_level = 3 then
647: ec_debug.pl (3, 'file_test_flag', l_file_test_flag);
648: end if;
649:
650: xProgress := 'ECERULEB-40-1010';
643:
644: l_file_test_flag := p_staging_tbl (n_test_flag_pos).value;
645:
646: if ec_debug.G_debug_level = 3 then
647: ec_debug.pl (3, 'file_test_flag', l_file_test_flag);
648: end if;
649:
650: xProgress := 'ECERULEB-40-1010';
651: open c_test_flag;
654: raise no_row_selected;
655: end if;
656: close c_test_flag;
657:
658: ec_debug.pl (3, 'setup_test_flag', l_setup_test_flag);
659:
660: if (l_file_test_flag <> l_setup_test_flag) or
661: (l_file_test_flag is null) or
662: (l_setup_test_flag is null) then
663: xProgress := 'ECERULEB-40-1020';
664: x_valid_rule := 'N';
665: fnd_message.set_name ('EC', 'ECE_TEST_PROD');
666: x_msg_text := fnd_message.get;
667: ec_debug.pl (0, x_msg_text);
668: end if;
669:
670: if ec_debug.G_debug_level >= 2 then
671: ec_debug.pl (3, 'x_msg_text', x_msg_text);
666: x_msg_text := fnd_message.get;
667: ec_debug.pl (0, x_msg_text);
668: end if;
669:
670: if ec_debug.G_debug_level >= 2 then
671: ec_debug.pl (3, 'x_msg_text', x_msg_text);
672: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
673: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
674: end if;
667: ec_debug.pl (0, x_msg_text);
668: end if;
669:
670: if ec_debug.G_debug_level >= 2 then
671: ec_debug.pl (3, 'x_msg_text', x_msg_text);
672: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
673: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
674: end if;
675: EXCEPTION
668: end if;
669:
670: if ec_debug.G_debug_level >= 2 then
671: ec_debug.pl (3, 'x_msg_text', x_msg_text);
672: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
673: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
674: end if;
675: EXCEPTION
676: WHEN no_row_selected then
669:
670: if ec_debug.G_debug_level >= 2 then
671: ec_debug.pl (3, 'x_msg_text', x_msg_text);
672: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
673: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
674: end if;
675: EXCEPTION
676: WHEN no_row_selected then
677: if (c_test_flag%ISOPEN) then
676: WHEN no_row_selected then
677: if (c_test_flag%ISOPEN) then
678: close c_test_flag;
679: end if;
680: ec_debug.pl (0, 'EC', 'ECE_NO_ROW_SELECTED',
681: 'PROGRESS_LEVEL', xProgress,
682: 'INFO', 'TEST_FLAG',
683: 'TABLE_NAME', 'ECE_TP_DETAILS');
684: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
680: ec_debug.pl (0, 'EC', 'ECE_NO_ROW_SELECTED',
681: 'PROGRESS_LEVEL', xProgress,
682: 'INFO', 'TEST_FLAG',
683: 'TABLE_NAME', 'ECE_TP_DETAILS');
684: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
685: raise fnd_api.g_exc_error;
686:
687: WHEN OTHERS THEN
688: if (c_test_flag%ISOPEN) then
687: WHEN OTHERS THEN
688: if (c_test_flag%ISOPEN) then
689: close c_test_flag;
690: end if;
691: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
692: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
693: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
694: raise fnd_api.g_exc_unexpected_error;
695:
688: if (c_test_flag%ISOPEN) then
689: close c_test_flag;
690: end if;
691: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
692: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
693: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
694: raise fnd_api.g_exc_unexpected_error;
695:
696: END Validate_Test_Prod;
689: close c_test_flag;
690: end if;
691: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
692: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
693: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_TEST_PROD');
694: raise fnd_api.g_exc_unexpected_error;
695:
696: END Validate_Test_Prod;
697:
753: rule_id = p_rule_id and
754: violation_level = l_violation_level; */
755:
756: BEGIN
757: if ec_debug.G_debug_level >= 2 then
758: ec_debug.push ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
759: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
760: ec_debug.pl (3, 'p_stage_id', p_stage_id);
761: ec_debug.pl (3, 'p_document_id', p_document_id);
754: violation_level = l_violation_level; */
755:
756: BEGIN
757: if ec_debug.G_debug_level >= 2 then
758: ec_debug.push ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
759: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
760: ec_debug.pl (3, 'p_stage_id', p_stage_id);
761: ec_debug.pl (3, 'p_document_id', p_document_id);
762: ec_debug.pl (3, 'p_document_number', p_document_number);
755:
756: BEGIN
757: if ec_debug.G_debug_level >= 2 then
758: ec_debug.push ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
759: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
760: ec_debug.pl (3, 'p_stage_id', p_stage_id);
761: ec_debug.pl (3, 'p_document_id', p_document_id);
762: ec_debug.pl (3, 'p_document_number', p_document_number);
763: ec_debug.pl (3, 'p_level', p_level);
756: BEGIN
757: if ec_debug.G_debug_level >= 2 then
758: ec_debug.push ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
759: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
760: ec_debug.pl (3, 'p_stage_id', p_stage_id);
761: ec_debug.pl (3, 'p_document_id', p_document_id);
762: ec_debug.pl (3, 'p_document_number', p_document_number);
763: ec_debug.pl (3, 'p_level', p_level);
764: end if;
757: if ec_debug.G_debug_level >= 2 then
758: ec_debug.push ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
759: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
760: ec_debug.pl (3, 'p_stage_id', p_stage_id);
761: ec_debug.pl (3, 'p_document_id', p_document_id);
762: ec_debug.pl (3, 'p_document_number', p_document_number);
763: ec_debug.pl (3, 'p_level', p_level);
764: end if;
765:
758: ec_debug.push ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
759: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
760: ec_debug.pl (3, 'p_stage_id', p_stage_id);
761: ec_debug.pl (3, 'p_document_id', p_document_id);
762: ec_debug.pl (3, 'p_document_number', p_document_number);
763: ec_debug.pl (3, 'p_level', p_level);
764: end if;
765:
766: -- Standard call to check for call compatibility.
759: ec_debug.pl (3, 'p_transaction_type', p_transaction_type);
760: ec_debug.pl (3, 'p_stage_id', p_stage_id);
761: ec_debug.pl (3, 'p_document_id', p_document_id);
762: ec_debug.pl (3, 'p_document_number', p_document_number);
763: ec_debug.pl (3, 'p_level', p_level);
764: end if;
765:
766: -- Standard call to check for call compatibility.
767: if not fnd_api.compatible_api_call (l_api_version_number,
802: l_interface_column_id := p_staging_tbl(i).interface_column_id;
803: l_interface_column_name := p_staging_tbl(i).interface_column_name;
804: l_interface_column_datatype := p_staging_tbl(i).data_type;
805:
806: if ec_debug.G_debug_level = 3 then
807: ec_debug.pl (3, 'interface_column_id', l_interface_column_id);
808: ec_debug.pl (3, 'interface_column_name', l_interface_column_name);
809: ec_debug.pl (3, 'interface_column_datatype', l_interface_column_datatype);
810: end if;
803: l_interface_column_name := p_staging_tbl(i).interface_column_name;
804: l_interface_column_datatype := p_staging_tbl(i).data_type;
805:
806: if ec_debug.G_debug_level = 3 then
807: ec_debug.pl (3, 'interface_column_id', l_interface_column_id);
808: ec_debug.pl (3, 'interface_column_name', l_interface_column_name);
809: ec_debug.pl (3, 'interface_column_datatype', l_interface_column_datatype);
810: end if;
811:
804: l_interface_column_datatype := p_staging_tbl(i).data_type;
805:
806: if ec_debug.G_debug_level = 3 then
807: ec_debug.pl (3, 'interface_column_id', l_interface_column_id);
808: ec_debug.pl (3, 'interface_column_name', l_interface_column_name);
809: ec_debug.pl (3, 'interface_column_datatype', l_interface_column_datatype);
810: end if;
811:
812: /* Bug 2708573
805:
806: if ec_debug.G_debug_level = 3 then
807: ec_debug.pl (3, 'interface_column_id', l_interface_column_id);
808: ec_debug.pl (3, 'interface_column_name', l_interface_column_name);
809: ec_debug.pl (3, 'interface_column_datatype', l_interface_column_datatype);
810: end if;
811:
812: /* Bug 2708573
813: open c_col_rule_info (l_interface_column_id);
822: l_rule_id :=ec_utils.g_column_rule_tbl(i).column_rule_id;
823: l_rule_type :=ec_utils.g_column_rule_tbl(i).rule_type;
824: l_action_code:=ec_utils.g_column_rule_tbl(i).action_code;
825:
826: if ec_debug.G_debug_level = 3 then
827: ec_debug.pl (3, 'rule_id', l_rule_id);
828: ec_debug.pl (3, 'rule_type', l_rule_type);
829: ec_debug.pl (3, 'action_code', l_action_code);
830: end if;
823: l_rule_type :=ec_utils.g_column_rule_tbl(i).rule_type;
824: l_action_code:=ec_utils.g_column_rule_tbl(i).action_code;
825:
826: if ec_debug.G_debug_level = 3 then
827: ec_debug.pl (3, 'rule_id', l_rule_id);
828: ec_debug.pl (3, 'rule_type', l_rule_type);
829: ec_debug.pl (3, 'action_code', l_action_code);
830: end if;
831:
824: l_action_code:=ec_utils.g_column_rule_tbl(i).action_code;
825:
826: if ec_debug.G_debug_level = 3 then
827: ec_debug.pl (3, 'rule_id', l_rule_id);
828: ec_debug.pl (3, 'rule_type', l_rule_type);
829: ec_debug.pl (3, 'action_code', l_action_code);
830: end if;
831:
832: xProgress := 'ECERULEB-50-1040';
825:
826: if ec_debug.G_debug_level = 3 then
827: ec_debug.pl (3, 'rule_id', l_rule_id);
828: ec_debug.pl (3, 'rule_type', l_rule_type);
829: ec_debug.pl (3, 'action_code', l_action_code);
830: end if;
831:
832: xProgress := 'ECERULEB-50-1040';
833: /* open c_ignore_flag (p_document_id, l_interface_column_id, p_stage_id, l_rule_id);
837: if c_ignore_flag%NOTFOUND then
838: l_ignore_flag := 'N';
839: end if;
840:
841: if ec_debug.G_debug_level = 3 then
842: ec_debug.pl (3, 'ignore_flag', l_ignore_flag);
843: end if; */
844: l_ignore_flag := 'N';
845: for i in 1 .. ece_inbound.g_col_rule_viol_tbl.count
838: l_ignore_flag := 'N';
839: end if;
840:
841: if ec_debug.G_debug_level = 3 then
842: ec_debug.pl (3, 'ignore_flag', l_ignore_flag);
843: end if; */
844: l_ignore_flag := 'N';
845: for i in 1 .. ece_inbound.g_col_rule_viol_tbl.count
846: loop
856:
857:
858: l_interface_column_value := p_staging_tbl(i).value;
859:
860: if ec_debug.G_debug_level = 3 then
861: ec_debug.pl (3, 'interface_column_value', l_interface_column_value);
862: end if;
863:
864: if (l_action_code <> g_disabled and l_ignore_flag = 'N') then
857:
858: l_interface_column_value := p_staging_tbl(i).value;
859:
860: if ec_debug.G_debug_level = 3 then
861: ec_debug.pl (3, 'interface_column_value', l_interface_column_value);
862: end if;
863:
864: if (l_action_code <> g_disabled and l_ignore_flag = 'N') then
865: if (l_rule_type = g_c_value_required) then
916:
917: else
918:
919: xProgress := 'ECERULEB-50-1130';
920: ec_debug.pl(0, 'EC', 'ECE_INVALID_RULE_TYPE',
921: 'RULE_TYPE', l_rule_type);
922: l_existing_rule := 'N';
923: end if;
924:
958: -- Standard call to get message count and if count is 1, get message info.
959: fnd_msg_pub.count_and_get(p_count => x_msg_count,
960: p_data => x_msg_data);
961:
962: if ec_debug.G_debug_level = 3 then
963: ec_debug.pl (3, 'x_return_status', x_return_status);
964: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
965: end if;
966:
959: fnd_msg_pub.count_and_get(p_count => x_msg_count,
960: p_data => x_msg_data);
961:
962: if ec_debug.G_debug_level = 3 then
963: ec_debug.pl (3, 'x_return_status', x_return_status);
964: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
965: end if;
966:
967: EXCEPTION
960: p_data => x_msg_data);
961:
962: if ec_debug.G_debug_level = 3 then
963: ec_debug.pl (3, 'x_return_status', x_return_status);
964: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
965: end if;
966:
967: EXCEPTION
968: WHEN fnd_api.g_exc_error then
976: -- end if;
977: x_return_status := fnd_api.g_ret_sts_error;
978: fnd_msg_pub.count_and_get (p_count => x_msg_count,
979: p_data => x_msg_data);
980: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
981:
982: WHEN fnd_api.g_exc_unexpected_error then
983: /* Bug 2708573
984: if (c_col_rule_info%ISOPEN) then
991: end if; */
992: x_return_status := fnd_api.g_ret_sts_error;
993: fnd_msg_pub.count_and_get (p_count => x_msg_count,
994: p_data => x_msg_data);
995: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
996:
997: WHEN OTHERS THEN
998: /* Bug 2708573
999: if (c_col_rule_info%ISOPEN) then
1003:
1004: /* if (c_ignore_flag%ISOPEN) then
1005: close c_ignore_flag;
1006: end if; */
1007: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1008: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1009: x_return_status := fnd_api.g_ret_sts_unexp_error;
1010: if fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) then
1011: fnd_msg_pub.add_exc_msg(g_file_name, g_pkg_name, l_api_name);
1004: /* if (c_ignore_flag%ISOPEN) then
1005: close c_ignore_flag;
1006: end if; */
1007: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1008: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1009: x_return_status := fnd_api.g_ret_sts_unexp_error;
1010: if fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) then
1011: fnd_msg_pub.add_exc_msg(g_file_name, g_pkg_name, l_api_name);
1012: end if;
1011: fnd_msg_pub.add_exc_msg(g_file_name, g_pkg_name, l_api_name);
1012: end if;
1013: fnd_msg_pub.count_and_get (p_count => x_msg_count,
1014: p_data => x_msg_data);
1015: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_COLUMN_RULES');
1016:
1017: END Validate_Column_Rules;
1018:
1019:
1026:
1027: xProgress VARCHAR2(80);
1028:
1029: BEGIN
1030: if ec_debug.G_debug_level >= 2 then
1031: ec_debug.push ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1032: ec_debug.pl (3, 'p_column_name', p_column_name);
1033: ec_debug.pl (3, 'p_column_value', p_column_value);
1034: end if;
1027: xProgress VARCHAR2(80);
1028:
1029: BEGIN
1030: if ec_debug.G_debug_level >= 2 then
1031: ec_debug.push ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1032: ec_debug.pl (3, 'p_column_name', p_column_name);
1033: ec_debug.pl (3, 'p_column_value', p_column_value);
1034: end if;
1035:
1028:
1029: BEGIN
1030: if ec_debug.G_debug_level >= 2 then
1031: ec_debug.push ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1032: ec_debug.pl (3, 'p_column_name', p_column_name);
1033: ec_debug.pl (3, 'p_column_value', p_column_value);
1034: end if;
1035:
1036: xProgress := 'ECERULEB-60-1000';
1029: BEGIN
1030: if ec_debug.G_debug_level >= 2 then
1031: ec_debug.push ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1032: ec_debug.pl (3, 'p_column_name', p_column_name);
1033: ec_debug.pl (3, 'p_column_value', p_column_value);
1034: end if;
1035:
1036: xProgress := 'ECERULEB-60-1000';
1037: x_msg_text := NULL;
1042: x_valid_rule := 'N';
1043: fnd_message.set_name ('EC', 'ECE_VALUE_REQUIRED');
1044: fnd_message.set_token ('COLUMN_NAME', p_column_name);
1045: x_msg_text := fnd_message.get;
1046: ec_debug.pl (0, x_msg_text);
1047: end if;
1048:
1049: if ec_debug.G_debug_level >= 2 then
1050: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1045: x_msg_text := fnd_message.get;
1046: ec_debug.pl (0, x_msg_text);
1047: end if;
1048:
1049: if ec_debug.G_debug_level >= 2 then
1050: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1051: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1052: ec_debug.pop ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1053: end if;
1046: ec_debug.pl (0, x_msg_text);
1047: end if;
1048:
1049: if ec_debug.G_debug_level >= 2 then
1050: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1051: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1052: ec_debug.pop ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1053: end if;
1054:
1047: end if;
1048:
1049: if ec_debug.G_debug_level >= 2 then
1050: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1051: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1052: ec_debug.pop ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1053: end if;
1054:
1055: EXCEPTION
1048:
1049: if ec_debug.G_debug_level >= 2 then
1050: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1051: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1052: ec_debug.pop ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1053: end if;
1054:
1055: EXCEPTION
1056: WHEN OTHERS THEN
1053: end if;
1054:
1055: EXCEPTION
1056: WHEN OTHERS THEN
1057: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1058: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1059: ec_debug.pop ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1060: raise fnd_api.g_exc_unexpected_error;
1061:
1054:
1055: EXCEPTION
1056: WHEN OTHERS THEN
1057: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1058: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1059: ec_debug.pop ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1060: raise fnd_api.g_exc_unexpected_error;
1061:
1062: END Value_Required_Rule;
1055: EXCEPTION
1056: WHEN OTHERS THEN
1057: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1058: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1059: ec_debug.pop ('ECE_RULES_PKG.VALUE_REQUIRED_RULE');
1060: raise fnd_api.g_exc_unexpected_error;
1061:
1062: END Value_Required_Rule;
1063:
1086: where column_rule_id = p_rule_id;
1087:
1088: BEGIN
1089:
1090: if ec_debug.G_debug_level >= 2 then
1091: ec_debug.push ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1092: ec_debug.pl (3, 'p_column_name', p_column_name);
1093: ec_debug.pl (3, 'p_column_value', p_column_value);
1094: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1087:
1088: BEGIN
1089:
1090: if ec_debug.G_debug_level >= 2 then
1091: ec_debug.push ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1092: ec_debug.pl (3, 'p_column_name', p_column_name);
1093: ec_debug.pl (3, 'p_column_value', p_column_value);
1094: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1095: end if;
1088: BEGIN
1089:
1090: if ec_debug.G_debug_level >= 2 then
1091: ec_debug.push ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1092: ec_debug.pl (3, 'p_column_name', p_column_name);
1093: ec_debug.pl (3, 'p_column_value', p_column_value);
1094: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1095: end if;
1096:
1089:
1090: if ec_debug.G_debug_level >= 2 then
1091: ec_debug.push ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1092: ec_debug.pl (3, 'p_column_name', p_column_name);
1093: ec_debug.pl (3, 'p_column_value', p_column_value);
1094: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1095: end if;
1096:
1097: xProgress := 'ECERULEB-70-1000';
1090: if ec_debug.G_debug_level >= 2 then
1091: ec_debug.push ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1092: ec_debug.pl (3, 'p_column_name', p_column_name);
1093: ec_debug.pl (3, 'p_column_value', p_column_value);
1094: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1095: end if;
1096:
1097: xProgress := 'ECERULEB-70-1000';
1098:
1106: open c_simple_lookup_rule;
1107: fetch c_simple_lookup_rule into l_column, l_table, l_where_clause;
1108: close c_simple_lookup_rule;
1109:
1110: if ec_debug.G_debug_level = 3 then
1111: ec_debug.pl (3, 'lookup_table', l_table);
1112: ec_debug.pl (3, 'lookup_column', l_column);
1113: ec_debug.pl (3, 'lookup_where_clause', l_where_clause);
1114: end if;
1107: fetch c_simple_lookup_rule into l_column, l_table, l_where_clause;
1108: close c_simple_lookup_rule;
1109:
1110: if ec_debug.G_debug_level = 3 then
1111: ec_debug.pl (3, 'lookup_table', l_table);
1112: ec_debug.pl (3, 'lookup_column', l_column);
1113: ec_debug.pl (3, 'lookup_where_clause', l_where_clause);
1114: end if;
1115:
1108: close c_simple_lookup_rule;
1109:
1110: if ec_debug.G_debug_level = 3 then
1111: ec_debug.pl (3, 'lookup_table', l_table);
1112: ec_debug.pl (3, 'lookup_column', l_column);
1113: ec_debug.pl (3, 'lookup_where_clause', l_where_clause);
1114: end if;
1115:
1116: xProgress := 'ECERULEB-70-1020';
1109:
1110: if ec_debug.G_debug_level = 3 then
1111: ec_debug.pl (3, 'lookup_table', l_table);
1112: ec_debug.pl (3, 'lookup_column', l_column);
1113: ec_debug.pl (3, 'lookup_where_clause', l_where_clause);
1114: end if;
1115:
1116: xProgress := 'ECERULEB-70-1020';
1117: l_select := ' SELECT count(*)';
1125:
1126: xProgress := 'ECERULEB-70-1040';
1127: l_select := l_select || l_from || l_where;
1128:
1129: if ec_debug.G_debug_level = 3 then
1130: ec_debug.pl (3, l_select);
1131: end if;
1132:
1133: xProgress := 'ECERULEB-70-1050';
1126: xProgress := 'ECERULEB-70-1040';
1127: l_select := l_select || l_from || l_where;
1128:
1129: if ec_debug.G_debug_level = 3 then
1130: ec_debug.pl (3, l_select);
1131: end if;
1132:
1133: xProgress := 'ECERULEB-70-1050';
1134: l_sel_c := dbms_sql.open_cursor;
1170: fnd_message.set_token ('COLUMN_NAME', p_column_name);
1171: fnd_message.set_token ('COLUMN_VALUE', p_column_value);
1172: fnd_message.set_token ('LOOKUP_SELECT', l_select);
1173: x_msg_text := fnd_message.get;
1174: ec_debug.pl (0, x_msg_text);
1175: end if;
1176:
1177: if ec_debug.G_debug_level >= 2 then
1178: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1173: x_msg_text := fnd_message.get;
1174: ec_debug.pl (0, x_msg_text);
1175: end if;
1176:
1177: if ec_debug.G_debug_level >= 2 then
1178: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1179: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1180: ec_debug.pop ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1181: end if;
1174: ec_debug.pl (0, x_msg_text);
1175: end if;
1176:
1177: if ec_debug.G_debug_level >= 2 then
1178: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1179: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1180: ec_debug.pop ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1181: end if;
1182:
1175: end if;
1176:
1177: if ec_debug.G_debug_level >= 2 then
1178: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1179: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1180: ec_debug.pop ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1181: end if;
1182:
1183: EXCEPTION
1176:
1177: if ec_debug.G_debug_level >= 2 then
1178: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1179: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1180: ec_debug.pop ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1181: end if;
1182:
1183: EXCEPTION
1184: WHEN OTHERS THEN
1187: end if;
1188: if (dbms_sql.is_open(l_sel_c)) then
1189: dbms_sql.close_cursor (l_sel_c);
1190: end if;
1191: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1192: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1193: ec_debug.pop ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1194: raise fnd_api.g_exc_unexpected_error;
1195:
1188: if (dbms_sql.is_open(l_sel_c)) then
1189: dbms_sql.close_cursor (l_sel_c);
1190: end if;
1191: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1192: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1193: ec_debug.pop ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1194: raise fnd_api.g_exc_unexpected_error;
1195:
1196: END Simple_Lookup_Rule;
1189: dbms_sql.close_cursor (l_sel_c);
1190: end if;
1191: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1192: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1193: ec_debug.pop ('ECE_RULES_PKG.SIMPLE_LOOKUP_RULE');
1194: raise fnd_api.g_exc_unexpected_error;
1195:
1196: END Simple_Lookup_Rule;
1197:
1225: from fnd_flex_value_sets
1226: where flex_value_set_name = l_valueset_name;
1227:
1228: BEGIN
1229: if ec_debug.G_debug_level >= 2 then
1230: ec_debug.push ('ECE_RULES_PKG.VALUESET_RULE');
1231: ec_debug.pl (3, 'p_column_name', p_column_name);
1232: ec_debug.pl (3, 'p_column_value', p_column_value);
1233: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1226: where flex_value_set_name = l_valueset_name;
1227:
1228: BEGIN
1229: if ec_debug.G_debug_level >= 2 then
1230: ec_debug.push ('ECE_RULES_PKG.VALUESET_RULE');
1231: ec_debug.pl (3, 'p_column_name', p_column_name);
1232: ec_debug.pl (3, 'p_column_value', p_column_value);
1233: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1234: end if;
1227:
1228: BEGIN
1229: if ec_debug.G_debug_level >= 2 then
1230: ec_debug.push ('ECE_RULES_PKG.VALUESET_RULE');
1231: ec_debug.pl (3, 'p_column_name', p_column_name);
1232: ec_debug.pl (3, 'p_column_value', p_column_value);
1233: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1234: end if;
1235:
1228: BEGIN
1229: if ec_debug.G_debug_level >= 2 then
1230: ec_debug.push ('ECE_RULES_PKG.VALUESET_RULE');
1231: ec_debug.pl (3, 'p_column_name', p_column_name);
1232: ec_debug.pl (3, 'p_column_value', p_column_value);
1233: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1234: end if;
1235:
1236: xProgress := 'ECERULEB-80-1000';
1229: if ec_debug.G_debug_level >= 2 then
1230: ec_debug.push ('ECE_RULES_PKG.VALUESET_RULE');
1231: ec_debug.pl (3, 'p_column_name', p_column_name);
1232: ec_debug.pl (3, 'p_column_value', p_column_value);
1233: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1234: end if;
1235:
1236: xProgress := 'ECERULEB-80-1000';
1237: x_msg_text := NULL;
1240: open c_valueset;
1241: fetch c_valueset into l_valueset_name;
1242: close c_valueset;
1243:
1244: if ec_debug.G_debug_level = 3 then
1245: ec_debug.pl (3, 'valueset_name', l_valueset_name);
1246: end if;
1247:
1248: xProgress := 'ECERULEB-80-1010';
1241: fetch c_valueset into l_valueset_name;
1242: close c_valueset;
1243:
1244: if ec_debug.G_debug_level = 3 then
1245: ec_debug.pl (3, 'valueset_name', l_valueset_name);
1246: end if;
1247:
1248: xProgress := 'ECERULEB-80-1010';
1249: open c_flex_valueset_id;
1249: open c_flex_valueset_id;
1250:
1251: xProgress := 'ECERULEB-80-1020';
1252: fetch c_flex_valueset_id into l_valueset_id;
1253: if ec_debug.G_debug_level = 3 then
1254: ec_debug.pl (3, 'valueset_id', l_valueset_id);
1255: end if;
1256:
1257: if (c_flex_valueset_id%NOTFOUND) then
1250:
1251: xProgress := 'ECERULEB-80-1020';
1252: fetch c_flex_valueset_id into l_valueset_id;
1253: if ec_debug.G_debug_level = 3 then
1254: ec_debug.pl (3, 'valueset_id', l_valueset_id);
1255: end if;
1256:
1257: if (c_flex_valueset_id%NOTFOUND) then
1258: raise no_value_set;
1270: xProgress := 'ECERULEB-80-1060';
1271: fnd_vset.get_value (l_valueset, l_rowcount, found, l_value);
1272:
1273: while (found) loop
1274: if ec_debug.G_debug_level = 3 then
1275: ec_debug.pl (3, 'valueset_value', l_value.value);
1276: end if;
1277:
1278: if (p_column_value = l_value.value) then
1271: fnd_vset.get_value (l_valueset, l_rowcount, found, l_value);
1272:
1273: while (found) loop
1274: if ec_debug.G_debug_level = 3 then
1275: ec_debug.pl (3, 'valueset_value', l_value.value);
1276: end if;
1277:
1278: if (p_column_value = l_value.value) then
1279: xProgress := 'ECERULEB-80-1070';
1287:
1288: xProgress := 'ECERULEB-80-1090';
1289: if (match) then
1290: x_valid_rule := 'Y';
1291: ec_debug.pl (3, 'EC', 'ECE_VALUE_IN_VALUESET');
1292: else
1293: x_valid_rule := 'N';
1294: ec_debug.pl (3, 'EC', 'ECE_VALUE_NOT_IN_VALUESET');
1295: end if;
1290: x_valid_rule := 'Y';
1291: ec_debug.pl (3, 'EC', 'ECE_VALUE_IN_VALUESET');
1292: else
1293: x_valid_rule := 'N';
1294: ec_debug.pl (3, 'EC', 'ECE_VALUE_NOT_IN_VALUESET');
1295: end if;
1296:
1297: xProgress := 'ECERULEB-80-1100';
1298: fnd_vset.get_value_end (l_valueset);
1303: fnd_message.set_token ('COLUMN_NAME', p_column_name);
1304: fnd_message.set_token ('COLUMN_VALUE', p_column_value);
1305: fnd_message.set_token ('VALUESET', l_valueset_name);
1306: x_msg_text := fnd_message.get;
1307: ec_debug.pl (0, x_msg_text);
1308: end if;
1309:
1310: if ec_debug.G_debug_level >= 2 then
1311: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1306: x_msg_text := fnd_message.get;
1307: ec_debug.pl (0, x_msg_text);
1308: end if;
1309:
1310: if ec_debug.G_debug_level >= 2 then
1311: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1312: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1313: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1314: end if;
1307: ec_debug.pl (0, x_msg_text);
1308: end if;
1309:
1310: if ec_debug.G_debug_level >= 2 then
1311: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1312: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1313: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1314: end if;
1315:
1308: end if;
1309:
1310: if ec_debug.G_debug_level >= 2 then
1311: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1312: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1313: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1314: end if;
1315:
1316: EXCEPTION
1309:
1310: if ec_debug.G_debug_level >= 2 then
1311: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1312: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1313: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1314: end if;
1315:
1316: EXCEPTION
1317: WHEN no_value_set then
1320: end if;
1321: if (c_flex_valueset_id%ISOPEN) then
1322: close c_flex_valueset_id;
1323: end if;
1324: ec_debug.pl (0, 'EC', 'ECE_VALUESET_NOT_FOUND',
1325: 'VALUESET', l_valueset_name);
1326: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1327: raise fnd_api.g_exc_error;
1328:
1322: close c_flex_valueset_id;
1323: end if;
1324: ec_debug.pl (0, 'EC', 'ECE_VALUESET_NOT_FOUND',
1325: 'VALUESET', l_valueset_name);
1326: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1327: raise fnd_api.g_exc_error;
1328:
1329: WHEN OTHERS THEN
1330: if (c_valueset%ISOPEN) then
1332: end if;
1333: if (c_flex_valueset_id%ISOPEN) then
1334: close c_flex_valueset_id;
1335: end if;
1336: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1337: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1338: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1339: raise fnd_api.g_exc_unexpected_error;
1340:
1333: if (c_flex_valueset_id%ISOPEN) then
1334: close c_flex_valueset_id;
1335: end if;
1336: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1337: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1338: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1339: raise fnd_api.g_exc_unexpected_error;
1340:
1341: END Valueset_Rule;
1334: close c_flex_valueset_id;
1335: end if;
1336: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1337: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1338: ec_debug.pop ('ECE_RULES_PKG.VALUESET_RULE');
1339: raise fnd_api.g_exc_unexpected_error;
1340:
1341: END Valueset_Rule;
1342:
1371: where null_dependency_rule_id = l_null_rule_id
1372: order by null_dependency_detail_id;
1373:
1374: BEGIN
1375: if ec_debug.G_debug_level >= 2 then
1376: ec_debug.push ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1377: ec_debug.pl (3, 'p_column_name', p_column_name);
1378: ec_debug.pl (3, 'p_column_value', p_column_value);
1379: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1372: order by null_dependency_detail_id;
1373:
1374: BEGIN
1375: if ec_debug.G_debug_level >= 2 then
1376: ec_debug.push ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1377: ec_debug.pl (3, 'p_column_name', p_column_name);
1378: ec_debug.pl (3, 'p_column_value', p_column_value);
1379: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1380: ec_debug.pl (3, 'p_level', p_level);
1373:
1374: BEGIN
1375: if ec_debug.G_debug_level >= 2 then
1376: ec_debug.push ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1377: ec_debug.pl (3, 'p_column_name', p_column_name);
1378: ec_debug.pl (3, 'p_column_value', p_column_value);
1379: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1380: ec_debug.pl (3, 'p_level', p_level);
1381: end if;
1374: BEGIN
1375: if ec_debug.G_debug_level >= 2 then
1376: ec_debug.push ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1377: ec_debug.pl (3, 'p_column_name', p_column_name);
1378: ec_debug.pl (3, 'p_column_value', p_column_value);
1379: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1380: ec_debug.pl (3, 'p_level', p_level);
1381: end if;
1382:
1375: if ec_debug.G_debug_level >= 2 then
1376: ec_debug.push ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1377: ec_debug.pl (3, 'p_column_name', p_column_name);
1378: ec_debug.pl (3, 'p_column_value', p_column_value);
1379: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1380: ec_debug.pl (3, 'p_level', p_level);
1381: end if;
1382:
1383: xProgress := 'ECERULEB-90-1000';
1376: ec_debug.push ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1377: ec_debug.pl (3, 'p_column_name', p_column_name);
1378: ec_debug.pl (3, 'p_column_value', p_column_value);
1379: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1380: ec_debug.pl (3, 'p_level', p_level);
1381: end if;
1382:
1383: xProgress := 'ECERULEB-90-1000';
1384: x_msg_text := NULL;
1387: open c_null_dependency;
1388: fetch c_null_dependency into l_null_rule_id, l_comp_code;
1389: close c_null_dependency;
1390:
1391: if ec_debug.G_debug_level = 3 then
1392: ec_debug.pl (3, 'null_rule_id', l_null_rule_id);
1393: ec_debug.pl (3, 'comparison_code', l_comp_code);
1394: end if;
1395:
1388: fetch c_null_dependency into l_null_rule_id, l_comp_code;
1389: close c_null_dependency;
1390:
1391: if ec_debug.G_debug_level = 3 then
1392: ec_debug.pl (3, 'null_rule_id', l_null_rule_id);
1393: ec_debug.pl (3, 'comparison_code', l_comp_code);
1394: end if;
1395:
1396:
1389: close c_null_dependency;
1390:
1391: if ec_debug.G_debug_level = 3 then
1392: ec_debug.pl (3, 'null_rule_id', l_null_rule_id);
1393: ec_debug.pl (3, 'comparison_code', l_comp_code);
1394: end if;
1395:
1396:
1397: xProgress := 'ECERULEB-90-1010';
1402: fetch c_null_dependency_detail into l_rule_column, l_detail_comp_code,
1403: l_rule_value;
1404: exit when c_null_dependency_detail%NOTFOUND;
1405:
1406: if ec_debug.G_debug_level = 3 then
1407: ec_debug.pl (3, 'rule_column', l_rule_column);
1408: ec_debug.pl (3, 'detail_comparison_code', l_detail_comp_code);
1409: ec_debug.pl (3, 'rule_value', l_rule_value);
1410: end if;
1403: l_rule_value;
1404: exit when c_null_dependency_detail%NOTFOUND;
1405:
1406: if ec_debug.G_debug_level = 3 then
1407: ec_debug.pl (3, 'rule_column', l_rule_column);
1408: ec_debug.pl (3, 'detail_comparison_code', l_detail_comp_code);
1409: ec_debug.pl (3, 'rule_value', l_rule_value);
1410: end if;
1411:
1404: exit when c_null_dependency_detail%NOTFOUND;
1405:
1406: if ec_debug.G_debug_level = 3 then
1407: ec_debug.pl (3, 'rule_column', l_rule_column);
1408: ec_debug.pl (3, 'detail_comparison_code', l_detail_comp_code);
1409: ec_debug.pl (3, 'rule_value', l_rule_value);
1410: end if;
1411:
1412: xProgress := 'ECERULEB-90-1030';
1405:
1406: if ec_debug.G_debug_level = 3 then
1407: ec_debug.pl (3, 'rule_column', l_rule_column);
1408: ec_debug.pl (3, 'detail_comparison_code', l_detail_comp_code);
1409: ec_debug.pl (3, 'rule_value', l_rule_value);
1410: end if;
1411:
1412: xProgress := 'ECERULEB-90-1030';
1413: ec_utils.find_pos (
1418:
1419: xProgress := 'ECERULEB-90-1040';
1420: l_column_value := p_staging_tbl(l_column_pos).value;
1421:
1422: if ec_debug.G_debug_level = 3 then
1423: ec_debug.pl (3, 'column_value', l_column_value);
1424: end if;
1425:
1426: if ((l_detail_comp_code = 'IS_NULL') and (l_column_value is NULL)) then
1419: xProgress := 'ECERULEB-90-1040';
1420: l_column_value := p_staging_tbl(l_column_pos).value;
1421:
1422: if ec_debug.G_debug_level = 3 then
1423: ec_debug.pl (3, 'column_value', l_column_value);
1424: end if;
1425:
1426: if ((l_detail_comp_code = 'IS_NULL') and (l_column_value is NULL)) then
1427: condition := true;
1433: condition := true;
1434: else
1435: condition := false;
1436: end if;
1437: if ec_debug.G_debug_level = 3 then
1438: ec_debug.pl (3, 'condition', condition);
1439: end if;
1440:
1441: else
1434: else
1435: condition := false;
1436: end if;
1437: if ec_debug.G_debug_level = 3 then
1438: ec_debug.pl (3, 'condition', condition);
1439: end if;
1440:
1441: else
1442: xProgress := 'ECERULEB-90-1050';
1446:
1447: xProgress := 'ECERULEB-90-1060';
1448: close c_null_dependency_detail;
1449:
1450: if ec_debug.G_debug_level = 3 then
1451: ec_debug.pl (3, 'meet all conditions', condition);
1452: end if;
1453:
1454: if (condition) then
1447: xProgress := 'ECERULEB-90-1060';
1448: close c_null_dependency_detail;
1449:
1450: if ec_debug.G_debug_level = 3 then
1451: ec_debug.pl (3, 'meet all conditions', condition);
1452: end if;
1453:
1454: if (condition) then
1455:
1469: fnd_message.set_name ('EC', 'ECE_NULL_DEPENDENCY');
1470: fnd_message.set_token ('COLUMN_NAME', p_column_name);
1471: fnd_message.set_token ('COMPARISON_CODE', l_comp_code);
1472: x_msg_text := fnd_message.get;
1473: ec_debug.pl (0, x_msg_text);
1474: end if;
1475:
1476: end if;
1477:
1474: end if;
1475:
1476: end if;
1477:
1478: if ec_debug.G_debug_level >= 2 then
1479: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1480: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1481: ec_debug.pop ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1482: end if;
1475:
1476: end if;
1477:
1478: if ec_debug.G_debug_level >= 2 then
1479: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1480: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1481: ec_debug.pop ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1482: end if;
1483:
1476: end if;
1477:
1478: if ec_debug.G_debug_level >= 2 then
1479: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1480: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1481: ec_debug.pop ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1482: end if;
1483:
1484: EXCEPTION
1477:
1478: if ec_debug.G_debug_level >= 2 then
1479: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1480: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1481: ec_debug.pop ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1482: end if;
1483:
1484: EXCEPTION
1485: WHEN OTHERS THEN
1488: end if;
1489: if (c_null_dependency_detail%ISOPEN) then
1490: close c_null_dependency_detail;
1491: end if;
1492: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1493: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1494: ec_debug.pop ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1495: raise fnd_api.g_exc_unexpected_error;
1496:
1489: if (c_null_dependency_detail%ISOPEN) then
1490: close c_null_dependency_detail;
1491: end if;
1492: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1493: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1494: ec_debug.pop ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1495: raise fnd_api.g_exc_unexpected_error;
1496:
1497: END Null_Dependency_Rule;
1490: close c_null_dependency_detail;
1491: end if;
1492: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1493: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1494: ec_debug.pop ('ECE_RULES_PKG.NULL_DEPENDENCY_RULE');
1495: raise fnd_api.g_exc_unexpected_error;
1496:
1497: END Null_Dependency_Rule;
1498:
1520: where list_rule_id = l_list_rule_id and
1521: value = p_column_value;
1522:
1523: BEGIN
1524: if ec_debug.G_debug_level >= 2 then
1525: ec_debug.push ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1526: ec_debug.pl (3, 'p_column_name', p_column_name);
1527: ec_debug.pl (3, 'p_column_value', p_column_value);
1528: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1521: value = p_column_value;
1522:
1523: BEGIN
1524: if ec_debug.G_debug_level >= 2 then
1525: ec_debug.push ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1526: ec_debug.pl (3, 'p_column_name', p_column_name);
1527: ec_debug.pl (3, 'p_column_value', p_column_value);
1528: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1529: end if;
1522:
1523: BEGIN
1524: if ec_debug.G_debug_level >= 2 then
1525: ec_debug.push ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1526: ec_debug.pl (3, 'p_column_name', p_column_name);
1527: ec_debug.pl (3, 'p_column_value', p_column_value);
1528: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1529: end if;
1530:
1523: BEGIN
1524: if ec_debug.G_debug_level >= 2 then
1525: ec_debug.push ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1526: ec_debug.pl (3, 'p_column_name', p_column_name);
1527: ec_debug.pl (3, 'p_column_value', p_column_value);
1528: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1529: end if;
1530:
1531: xProgress := 'ECERULEB-100-1000';
1524: if ec_debug.G_debug_level >= 2 then
1525: ec_debug.push ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1526: ec_debug.pl (3, 'p_column_name', p_column_name);
1527: ec_debug.pl (3, 'p_column_value', p_column_value);
1528: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1529: end if;
1530:
1531: xProgress := 'ECERULEB-100-1000';
1532: x_msg_text := NULL;
1535: open c_predefined_list;
1536: fetch c_predefined_list into l_list_rule_id, l_comp_code;
1537: close c_predefined_list;
1538:
1539: if ec_debug.G_debug_level = 3 then
1540: ec_debug.pl (3, 'list_rule_id', l_list_rule_id);
1541: ec_debug.pl (3, 'comparison_code', l_comp_code);
1542: end if;
1543:
1536: fetch c_predefined_list into l_list_rule_id, l_comp_code;
1537: close c_predefined_list;
1538:
1539: if ec_debug.G_debug_level = 3 then
1540: ec_debug.pl (3, 'list_rule_id', l_list_rule_id);
1541: ec_debug.pl (3, 'comparison_code', l_comp_code);
1542: end if;
1543:
1544: xProgress := 'ECERULEB-100-1000';
1537: close c_predefined_list;
1538:
1539: if ec_debug.G_debug_level = 3 then
1540: ec_debug.pl (3, 'list_rule_id', l_list_rule_id);
1541: ec_debug.pl (3, 'comparison_code', l_comp_code);
1542: end if;
1543:
1544: xProgress := 'ECERULEB-100-1000';
1545: open c_list_count;
1545: open c_list_count;
1546: fetch c_list_count into l_match;
1547: close c_list_count;
1548:
1549: if ec_debug.G_debug_level = 3 then
1550: ec_debug.pl (3, 'match', l_match);
1551: end if;
1552:
1553: xProgress := 'ECERULEB-100-1010';
1546: fetch c_list_count into l_match;
1547: close c_list_count;
1548:
1549: if ec_debug.G_debug_level = 3 then
1550: ec_debug.pl (3, 'match', l_match);
1551: end if;
1552:
1553: xProgress := 'ECERULEB-100-1010';
1554: if ((l_comp_code = 'MUST_EQUAL') and (l_match > 0)) then
1573: xProgress := 'ECERULEB-100-1040';
1574: fnd_message.set_token ('COMPARISON', 'CANNOT EXISTS');
1575: end if;
1576: x_msg_text := fnd_message.get;
1577: ec_debug.pl (0, x_msg_text);
1578: end if;
1579:
1580: if ec_debug.G_debug_level >= 2 then
1581: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1576: x_msg_text := fnd_message.get;
1577: ec_debug.pl (0, x_msg_text);
1578: end if;
1579:
1580: if ec_debug.G_debug_level >= 2 then
1581: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1582: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1583: ec_debug.pop ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1584: end if;
1577: ec_debug.pl (0, x_msg_text);
1578: end if;
1579:
1580: if ec_debug.G_debug_level >= 2 then
1581: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1582: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1583: ec_debug.pop ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1584: end if;
1585:
1578: end if;
1579:
1580: if ec_debug.G_debug_level >= 2 then
1581: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1582: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1583: ec_debug.pop ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1584: end if;
1585:
1586: EXCEPTION
1579:
1580: if ec_debug.G_debug_level >= 2 then
1581: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1582: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1583: ec_debug.pop ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1584: end if;
1585:
1586: EXCEPTION
1587: WHEN OTHERS THEN
1590: end if;
1591: if (c_list_count%ISOPEN) then
1592: close c_list_count;
1593: end if;
1594: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1595: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1596: ec_debug.pop ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1597: raise fnd_api.g_exc_unexpected_error;
1598:
1591: if (c_list_count%ISOPEN) then
1592: close c_list_count;
1593: end if;
1594: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1595: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1596: ec_debug.pop ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1597: raise fnd_api.g_exc_unexpected_error;
1598:
1599: END Predefined_List_Rule;
1592: close c_list_count;
1593: end if;
1594: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1595: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1596: ec_debug.pop ('ECE_RULES_PKG.PREDEFINED_LIST_RULE');
1597: raise fnd_api.g_exc_unexpected_error;
1598:
1599: END Predefined_List_Rule;
1600:
1621: from ece_rule_null_default
1622: where column_rule_id = p_rule_id;
1623:
1624: BEGIN
1625: if ec_debug.G_debug_level >= 2 then
1626: ec_debug.push ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1627: ec_debug.pl (3, 'p_column_name', p_column_name);
1628: ec_debug.pl (3, 'p_column_value', p_column_value);
1629: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1622: where column_rule_id = p_rule_id;
1623:
1624: BEGIN
1625: if ec_debug.G_debug_level >= 2 then
1626: ec_debug.push ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1627: ec_debug.pl (3, 'p_column_name', p_column_name);
1628: ec_debug.pl (3, 'p_column_value', p_column_value);
1629: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1630: ec_debug.pl (3, 'p_level', p_level);
1623:
1624: BEGIN
1625: if ec_debug.G_debug_level >= 2 then
1626: ec_debug.push ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1627: ec_debug.pl (3, 'p_column_name', p_column_name);
1628: ec_debug.pl (3, 'p_column_value', p_column_value);
1629: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1630: ec_debug.pl (3, 'p_level', p_level);
1631: end if;
1624: BEGIN
1625: if ec_debug.G_debug_level >= 2 then
1626: ec_debug.push ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1627: ec_debug.pl (3, 'p_column_name', p_column_name);
1628: ec_debug.pl (3, 'p_column_value', p_column_value);
1629: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1630: ec_debug.pl (3, 'p_level', p_level);
1631: end if;
1632:
1625: if ec_debug.G_debug_level >= 2 then
1626: ec_debug.push ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1627: ec_debug.pl (3, 'p_column_name', p_column_name);
1628: ec_debug.pl (3, 'p_column_value', p_column_value);
1629: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1630: ec_debug.pl (3, 'p_level', p_level);
1631: end if;
1632:
1633: xProgress := 'ECERULEB-110-1000';
1626: ec_debug.push ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1627: ec_debug.pl (3, 'p_column_name', p_column_name);
1628: ec_debug.pl (3, 'p_column_value', p_column_value);
1629: ec_debug.pl (3, 'p_rule_id', p_rule_id);
1630: ec_debug.pl (3, 'p_level', p_level);
1631: end if;
1632:
1633: xProgress := 'ECERULEB-110-1000';
1634: x_msg_text := NULL;
1640: open c_null_default;
1641: fetch c_null_default into l_type_code, l_value_column_name;
1642: close c_null_default;
1643:
1644: if ec_debug.G_debug_level = 3 then
1645: ec_debug.pl (3, 'type_code', l_type_code);
1646: end if;
1647:
1648: if (l_type_code = 'LITERAL') then
1641: fetch c_null_default into l_type_code, l_value_column_name;
1642: close c_null_default;
1643:
1644: if ec_debug.G_debug_level = 3 then
1645: ec_debug.pl (3, 'type_code', l_type_code);
1646: end if;
1647:
1648: if (l_type_code = 'LITERAL') then
1649: xProgress := 'ECERULEB-110-1020';
1648: if (l_type_code = 'LITERAL') then
1649: xProgress := 'ECERULEB-110-1020';
1650: l_column_value := l_value_column_name;
1651:
1652: if ec_debug.G_debug_level = 3 then
1653: ec_debug.pl (3, 'value', l_column_value);
1654: end if;
1655:
1656: elsif (l_type_code = 'COLUMN') then
1649: xProgress := 'ECERULEB-110-1020';
1650: l_column_value := l_value_column_name;
1651:
1652: if ec_debug.G_debug_level = 3 then
1653: ec_debug.pl (3, 'value', l_column_value);
1654: end if;
1655:
1656: elsif (l_type_code = 'COLUMN') then
1657: xProgress := 'ECERULEB-110-1030';
1661: l_value_column_name,
1662: n_rule_column_pos);
1663: l_column_value := p_staging_tbl(n_rule_column_pos).value;
1664:
1665: ec_debug.pl (3, 'column_name', l_value_column_name);
1666: ec_debug.pl (3, 'column_value', l_column_value);
1667: end if;
1668:
1669: xProgress := 'ECERULEB-110-1040';
1662: n_rule_column_pos);
1663: l_column_value := p_staging_tbl(n_rule_column_pos).value;
1664:
1665: ec_debug.pl (3, 'column_name', l_value_column_name);
1666: ec_debug.pl (3, 'column_value', l_column_value);
1667: end if;
1668:
1669: xProgress := 'ECERULEB-110-1040';
1670: ec_utils.find_pos (
1674:
1675: xProgress := 'ECERULEB-110-1050';
1676: p_staging_tbl(n_column_pos).value := l_column_value;
1677:
1678: if ec_debug.G_debug_level = 3 then
1679: ec_debug.pl (3, 'Column Position', n_column_pos);
1680: ec_debug.pl (3, 'Updated Column Value', p_staging_tbl(n_column_pos).value);
1681: end if;
1682:
1675: xProgress := 'ECERULEB-110-1050';
1676: p_staging_tbl(n_column_pos).value := l_column_value;
1677:
1678: if ec_debug.G_debug_level = 3 then
1679: ec_debug.pl (3, 'Column Position', n_column_pos);
1680: ec_debug.pl (3, 'Updated Column Value', p_staging_tbl(n_column_pos).value);
1681: end if;
1682:
1683: xProgress := 'ECERULEB-110-1060';
1676: p_staging_tbl(n_column_pos).value := l_column_value;
1677:
1678: if ec_debug.G_debug_level = 3 then
1679: ec_debug.pl (3, 'Column Position', n_column_pos);
1680: ec_debug.pl (3, 'Updated Column Value', p_staging_tbl(n_column_pos).value);
1681: end if;
1682:
1683: xProgress := 'ECERULEB-110-1060';
1684: x_valid_rule := 'N';
1685: fnd_message.set_name ('EC', 'ECE_NULL_DEFAULT');
1686: fnd_message.set_token ('COLUMN_NAME', p_column_name);
1687: fnd_message.set_token ('VALUE', l_column_value);
1688: x_msg_text := fnd_message.get;
1689: ec_debug.pl (0, x_msg_text);
1690:
1691: end if;
1692:
1693: if ec_debug.G_debug_level >= 2 then
1689: ec_debug.pl (0, x_msg_text);
1690:
1691: end if;
1692:
1693: if ec_debug.G_debug_level >= 2 then
1694: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1695: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1696: ec_debug.pop ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1697: end if;
1690:
1691: end if;
1692:
1693: if ec_debug.G_debug_level >= 2 then
1694: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1695: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1696: ec_debug.pop ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1697: end if;
1698:
1691: end if;
1692:
1693: if ec_debug.G_debug_level >= 2 then
1694: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1695: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1696: ec_debug.pop ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1697: end if;
1698:
1699: EXCEPTION
1692:
1693: if ec_debug.G_debug_level >= 2 then
1694: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1695: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1696: ec_debug.pop ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1697: end if;
1698:
1699: EXCEPTION
1700: WHEN OTHERS THEN
1700: WHEN OTHERS THEN
1701: if (c_null_default%ISOPEN) then
1702: close c_null_default;
1703: end if;
1704: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1705: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1706: ec_debug.pop ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1707: raise fnd_api.g_exc_unexpected_error;
1708:
1701: if (c_null_default%ISOPEN) then
1702: close c_null_default;
1703: end if;
1704: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1705: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1706: ec_debug.pop ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1707: raise fnd_api.g_exc_unexpected_error;
1708:
1709: END Null_Default_Rule;
1702: close c_null_default;
1703: end if;
1704: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1705: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1706: ec_debug.pop ('ECE_RULES_PKG.NULL_DEFAULT_RULE');
1707: raise fnd_api.g_exc_unexpected_error;
1708:
1709: END Null_Default_Rule;
1710:
1720: l_temp_num NUMBER;
1721: l_temp_date DATE;
1722:
1723: BEGIN
1724: if ec_debug.G_debug_level >= 2 then
1725: ec_debug.push ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1726: ec_debug.pl (3, 'p_column_datatype', p_column_datatype);
1727: ec_debug.pl (3, 'p_column_name', p_column_name);
1728: ec_debug.pl (3, 'p_column_value', p_column_value);
1721: l_temp_date DATE;
1722:
1723: BEGIN
1724: if ec_debug.G_debug_level >= 2 then
1725: ec_debug.push ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1726: ec_debug.pl (3, 'p_column_datatype', p_column_datatype);
1727: ec_debug.pl (3, 'p_column_name', p_column_name);
1728: ec_debug.pl (3, 'p_column_value', p_column_value);
1729: end if;
1722:
1723: BEGIN
1724: if ec_debug.G_debug_level >= 2 then
1725: ec_debug.push ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1726: ec_debug.pl (3, 'p_column_datatype', p_column_datatype);
1727: ec_debug.pl (3, 'p_column_name', p_column_name);
1728: ec_debug.pl (3, 'p_column_value', p_column_value);
1729: end if;
1730:
1723: BEGIN
1724: if ec_debug.G_debug_level >= 2 then
1725: ec_debug.push ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1726: ec_debug.pl (3, 'p_column_datatype', p_column_datatype);
1727: ec_debug.pl (3, 'p_column_name', p_column_name);
1728: ec_debug.pl (3, 'p_column_value', p_column_value);
1729: end if;
1730:
1731: xProgress := 'ECERULEB-120-1000';
1724: if ec_debug.G_debug_level >= 2 then
1725: ec_debug.push ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1726: ec_debug.pl (3, 'p_column_datatype', p_column_datatype);
1727: ec_debug.pl (3, 'p_column_name', p_column_name);
1728: ec_debug.pl (3, 'p_column_value', p_column_value);
1729: end if;
1730:
1731: xProgress := 'ECERULEB-120-1000';
1732: x_msg_text := NULL;
1757: fnd_message.set_token ('COLUMN_NAME', p_column_name);
1758: fnd_message.set_token ('VALUE', p_column_value);
1759: fnd_message.set_token ('DATATYPE', p_column_datatype);
1760: x_msg_text := fnd_message.get;
1761: ec_debug.pl (0, x_msg_text);
1762: end if;
1763:
1764: if ec_debug.G_debug_level >= 2 then
1765: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1760: x_msg_text := fnd_message.get;
1761: ec_debug.pl (0, x_msg_text);
1762: end if;
1763:
1764: if ec_debug.G_debug_level >= 2 then
1765: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1766: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1767: ec_debug.pop ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1768: end if;
1761: ec_debug.pl (0, x_msg_text);
1762: end if;
1763:
1764: if ec_debug.G_debug_level >= 2 then
1765: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1766: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1767: ec_debug.pop ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1768: end if;
1769:
1762: end if;
1763:
1764: if ec_debug.G_debug_level >= 2 then
1765: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1766: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1767: ec_debug.pop ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1768: end if;
1769:
1770: EXCEPTION
1763:
1764: if ec_debug.G_debug_level >= 2 then
1765: ec_debug.pl (3, 'x_valid_rule', x_valid_rule);
1766: ec_debug.pl (3, 'x_msg_text', x_msg_text);
1767: ec_debug.pop ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1768: end if;
1769:
1770: EXCEPTION
1771: WHEN OTHERS THEN
1768: end if;
1769:
1770: EXCEPTION
1771: WHEN OTHERS THEN
1772: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1773: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1774: ec_debug.pop ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1775: raise fnd_api.g_exc_unexpected_error;
1776:
1769:
1770: EXCEPTION
1771: WHEN OTHERS THEN
1772: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1773: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1774: ec_debug.pop ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1775: raise fnd_api.g_exc_unexpected_error;
1776:
1777: END Datatype_Checking_Rule;
1770: EXCEPTION
1771: WHEN OTHERS THEN
1772: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
1773: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
1774: ec_debug.pop ('ECE_RULES_PKG.DATATYPE_CHECKING_RULE');
1775: raise fnd_api.g_exc_unexpected_error;
1776:
1777: END Datatype_Checking_Rule;
1778:
1879: BEGIN
1880: /* Bug 2151462 - commented out the debug messages and code that is not reqd. for
1881: ** Address derivation
1882: */
1883: if ec_debug.G_debug_level >= 2 then
1884: ec_debug.push ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
1885:
1886: xProgress := 'ECERULEB-130-1000';
1887:
1880: /* Bug 2151462 - commented out the debug messages and code that is not reqd. for
1881: ** Address derivation
1882: */
1883: if ec_debug.G_debug_level >= 2 then
1884: ec_debug.push ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
1885:
1886: xProgress := 'ECERULEB-130-1000';
1887:
1888: ec_debug.pl (3,'p_org_id_pos', p_org_id_pos);
1884: ec_debug.push ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
1885:
1886: xProgress := 'ECERULEB-130-1000';
1887:
1888: ec_debug.pl (3,'p_org_id_pos', p_org_id_pos);
1889: ec_debug.pl (3,'p_addr_id_pos', p_addr_id_pos);
1890: ec_debug.pl (3,'p_tp_location_code_pos', p_tp_location_code_pos);
1891: ec_debug.pl (3,'p_tp_translator_code_pos', p_tp_translator_code_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1885:
1886: xProgress := 'ECERULEB-130-1000';
1887:
1888: ec_debug.pl (3,'p_org_id_pos', p_org_id_pos);
1889: ec_debug.pl (3,'p_addr_id_pos', p_addr_id_pos);
1890: ec_debug.pl (3,'p_tp_location_code_pos', p_tp_location_code_pos);
1891: ec_debug.pl (3,'p_tp_translator_code_pos', p_tp_translator_code_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1886: xProgress := 'ECERULEB-130-1000';
1887:
1888: ec_debug.pl (3,'p_org_id_pos', p_org_id_pos);
1889: ec_debug.pl (3,'p_addr_id_pos', p_addr_id_pos);
1890: ec_debug.pl (3,'p_tp_location_code_pos', p_tp_location_code_pos);
1891: ec_debug.pl (3,'p_tp_translator_code_pos', p_tp_translator_code_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1887:
1888: ec_debug.pl (3,'p_org_id_pos', p_org_id_pos);
1889: ec_debug.pl (3,'p_addr_id_pos', p_addr_id_pos);
1890: ec_debug.pl (3,'p_tp_location_code_pos', p_tp_location_code_pos);
1891: ec_debug.pl (3,'p_tp_translator_code_pos', p_tp_translator_code_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1888: ec_debug.pl (3,'p_org_id_pos', p_org_id_pos);
1889: ec_debug.pl (3,'p_addr_id_pos', p_addr_id_pos);
1890: ec_debug.pl (3,'p_tp_location_code_pos', p_tp_location_code_pos);
1891: ec_debug.pl (3,'p_tp_translator_code_pos', p_tp_translator_code_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1889: ec_debug.pl (3,'p_addr_id_pos', p_addr_id_pos);
1890: ec_debug.pl (3,'p_tp_location_code_pos', p_tp_location_code_pos);
1891: ec_debug.pl (3,'p_tp_translator_code_pos', p_tp_translator_code_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1890: ec_debug.pl (3,'p_tp_location_code_pos', p_tp_location_code_pos);
1891: ec_debug.pl (3,'p_tp_translator_code_pos', p_tp_translator_code_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1891: ec_debug.pl (3,'p_tp_translator_code_pos', p_tp_translator_code_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1892: ec_debug.pl (3,'p_tp_location_name_pos', p_tp_location_name_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1893: ec_debug.pl (3,'p_addr1_pos', p_addr1_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1894: ec_debug.pl (3,'p_addr2_pos', p_addr2_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1895: ec_debug.pl (3,'p_addr3_pos', p_addr3_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1903: ec_debug.pl (3,'p_country_pos', p_country_pos);
1896: ec_debug.pl (3,'p_addr4_pos', p_addr4_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1903: ec_debug.pl (3,'p_country_pos', p_country_pos);
1904: ec_debug.pl (3,'p_region1_pos', p_region1_pos);
1897: ec_debug.pl (3,'p_addr_alt_pos', p_addr_alt_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1903: ec_debug.pl (3,'p_country_pos', p_country_pos);
1904: ec_debug.pl (3,'p_region1_pos', p_region1_pos);
1905: ec_debug.pl (3,'p_region2_pos', p_region2_pos);
1898: ec_debug.pl (3,'p_city_pos', p_city_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1903: ec_debug.pl (3,'p_country_pos', p_country_pos);
1904: ec_debug.pl (3,'p_region1_pos', p_region1_pos);
1905: ec_debug.pl (3,'p_region2_pos', p_region2_pos);
1906: ec_debug.pl (3,'p_region3_pos', p_region3_pos);
1899: ec_debug.pl (3,'p_county_pos', p_county_pos);
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1903: ec_debug.pl (3,'p_country_pos', p_country_pos);
1904: ec_debug.pl (3,'p_region1_pos', p_region1_pos);
1905: ec_debug.pl (3,'p_region2_pos', p_region2_pos);
1906: ec_debug.pl (3,'p_region3_pos', p_region3_pos);
1907: end if;
1900: ec_debug.pl (3,'p_state_pos', p_state_pos);
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1903: ec_debug.pl (3,'p_country_pos', p_country_pos);
1904: ec_debug.pl (3,'p_region1_pos', p_region1_pos);
1905: ec_debug.pl (3,'p_region2_pos', p_region2_pos);
1906: ec_debug.pl (3,'p_region3_pos', p_region3_pos);
1907: end if;
1908: ECE_RULES_PKG.G_PARTY_NAME := null;
1901: ec_debug.pl (3,'p_zip_pos', p_zip_pos);
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1903: ec_debug.pl (3,'p_country_pos', p_country_pos);
1904: ec_debug.pl (3,'p_region1_pos', p_region1_pos);
1905: ec_debug.pl (3,'p_region2_pos', p_region2_pos);
1906: ec_debug.pl (3,'p_region3_pos', p_region3_pos);
1907: end if;
1908: ECE_RULES_PKG.G_PARTY_NAME := null;
1909: ECE_RULES_PKG.G_PARTY_NUMBER := null;
1902: ec_debug.pl (3,'p_province_pos', p_province_pos);
1903: ec_debug.pl (3,'p_country_pos', p_country_pos);
1904: ec_debug.pl (3,'p_region1_pos', p_region1_pos);
1905: ec_debug.pl (3,'p_region2_pos', p_region2_pos);
1906: ec_debug.pl (3,'p_region3_pos', p_region3_pos);
1907: end if;
1908: ECE_RULES_PKG.G_PARTY_NAME := null;
1909: ECE_RULES_PKG.G_PARTY_NUMBER := null;
1910: -- get address information if it exists in the pl/sql table.
2015: xProgress := 'ECERULEB-130-1180';
2016: raise stack_variable_not_found;
2017: else
2018: xProgress := 'ECERULEB-130-1190';
2019: ec_debug.pl(3,'Address Type',ec_utils.g_stack(l_stack_pos).variable_value);
2020: select DECODE (ec_utils.g_stack(l_stack_pos).variable_value,
2021: g_bank, ece_trading_partners_pub.g_bank,
2022: g_customer, ece_trading_partners_pub.g_customer,
2023: g_supplier, ece_trading_partners_pub.g_supplier,
2030: l_map_id := ec_utils.g_map_id;
2031:
2032: -- print out the address value before address derivation.
2033: xProgress := 'ECERULEB-130-1210';
2034: if ec_debug.G_debug_level = 3 then
2035: ec_debug.pl (3, 'Input to Address Derivation');
2036: ec_debug.pl (3, 'l_return_status', l_return_status);
2037: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2031:
2032: -- print out the address value before address derivation.
2033: xProgress := 'ECERULEB-130-1210';
2034: if ec_debug.G_debug_level = 3 then
2035: ec_debug.pl (3, 'Input to Address Derivation');
2036: ec_debug.pl (3, 'l_return_status', l_return_status);
2037: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2032: -- print out the address value before address derivation.
2033: xProgress := 'ECERULEB-130-1210';
2034: if ec_debug.G_debug_level = 3 then
2035: ec_debug.pl (3, 'Input to Address Derivation');
2036: ec_debug.pl (3, 'l_return_status', l_return_status);
2037: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2033: xProgress := 'ECERULEB-130-1210';
2034: if ec_debug.G_debug_level = 3 then
2035: ec_debug.pl (3, 'Input to Address Derivation');
2036: ec_debug.pl (3, 'l_return_status', l_return_status);
2037: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2034: if ec_debug.G_debug_level = 3 then
2035: ec_debug.pl (3, 'Input to Address Derivation');
2036: ec_debug.pl (3, 'l_return_status', l_return_status);
2037: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2035: ec_debug.pl (3, 'Input to Address Derivation');
2036: ec_debug.pl (3, 'l_return_status', l_return_status);
2037: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2036: ec_debug.pl (3, 'l_return_status', l_return_status);
2037: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2037: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2038: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2039: ec_debug.pl (3, 'l_status_code', l_status_code);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2040: ec_debug.pl (3, 'l_address_type', l_address_type);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2041: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2042: ec_debug.pl (3, 'l_tp_translator_code', translator_code);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2043: ec_debug.pl (3, 'l_org_id', l_org_id);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2051: ec_debug.pl (3, 'l_city', l_city);
2044: ec_debug.pl (3, 'l_addr_id', l_addr_id);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2051: ec_debug.pl (3, 'l_city', l_city);
2052: ec_debug.pl (3, 'l_zip', l_zip);
2045: ec_debug.pl (3, 'l_tp_location_code', l_tp_location_code);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2051: ec_debug.pl (3, 'l_city', l_city);
2052: ec_debug.pl (3, 'l_zip', l_zip);
2053: ec_debug.pl (3, 'party_name', ece_rules_pkg.g_party_name);
2046: ec_debug.pl (3, 'l_addr1', l_addr1);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2051: ec_debug.pl (3, 'l_city', l_city);
2052: ec_debug.pl (3, 'l_zip', l_zip);
2053: ec_debug.pl (3, 'party_name', ece_rules_pkg.g_party_name);
2054: ec_debug.pl (3, 'party_number', ece_rules_pkg.g_party_number);
2047: ec_debug.pl (3, 'l_addr2', l_addr2);
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2051: ec_debug.pl (3, 'l_city', l_city);
2052: ec_debug.pl (3, 'l_zip', l_zip);
2053: ec_debug.pl (3, 'party_name', ece_rules_pkg.g_party_name);
2054: ec_debug.pl (3, 'party_number', ece_rules_pkg.g_party_number);
2055: end if;
2048: ec_debug.pl (3, 'l_addr3', l_addr3);
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2051: ec_debug.pl (3, 'l_city', l_city);
2052: ec_debug.pl (3, 'l_zip', l_zip);
2053: ec_debug.pl (3, 'party_name', ece_rules_pkg.g_party_name);
2054: ec_debug.pl (3, 'party_number', ece_rules_pkg.g_party_number);
2055: end if;
2056:
2049: ec_debug.pl (3, 'l_addr4', l_addr4);
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2051: ec_debug.pl (3, 'l_city', l_city);
2052: ec_debug.pl (3, 'l_zip', l_zip);
2053: ec_debug.pl (3, 'party_name', ece_rules_pkg.g_party_name);
2054: ec_debug.pl (3, 'party_number', ece_rules_pkg.g_party_number);
2055: end if;
2056:
2057: /* hgandiko1
2050: ec_debug.pl (3, 'l_addr_alt', l_addr_alt);
2051: ec_debug.pl (3, 'l_city', l_city);
2052: ec_debug.pl (3, 'l_zip', l_zip);
2053: ec_debug.pl (3, 'party_name', ece_rules_pkg.g_party_name);
2054: ec_debug.pl (3, 'party_number', ece_rules_pkg.g_party_number);
2055: end if;
2056:
2057: /* hgandiko1
2058: ec_debug.pl (3, 'l_tp_translator_code', l_tp_translator_code);
2054: ec_debug.pl (3, 'party_number', ece_rules_pkg.g_party_number);
2055: end if;
2056:
2057: /* hgandiko1
2058: ec_debug.pl (3, 'l_tp_translator_code', l_tp_translator_code);
2059: ec_debug.pl (3, 'l_tp_location_name', l_tp_location_name);
2060: ec_debug.pl (3, 'l_county', l_county);
2061: ec_debug.pl (3, 'l_state', l_state);
2062: ec_debug.pl (3, 'l_zip', l_zip);
2055: end if;
2056:
2057: /* hgandiko1
2058: ec_debug.pl (3, 'l_tp_translator_code', l_tp_translator_code);
2059: ec_debug.pl (3, 'l_tp_location_name', l_tp_location_name);
2060: ec_debug.pl (3, 'l_county', l_county);
2061: ec_debug.pl (3, 'l_state', l_state);
2062: ec_debug.pl (3, 'l_zip', l_zip);
2063: ec_debug.pl (3, 'l_province', l_province);
2056:
2057: /* hgandiko1
2058: ec_debug.pl (3, 'l_tp_translator_code', l_tp_translator_code);
2059: ec_debug.pl (3, 'l_tp_location_name', l_tp_location_name);
2060: ec_debug.pl (3, 'l_county', l_county);
2061: ec_debug.pl (3, 'l_state', l_state);
2062: ec_debug.pl (3, 'l_zip', l_zip);
2063: ec_debug.pl (3, 'l_province', l_province);
2064: ec_debug.pl (3, 'l_country', l_country);
2057: /* hgandiko1
2058: ec_debug.pl (3, 'l_tp_translator_code', l_tp_translator_code);
2059: ec_debug.pl (3, 'l_tp_location_name', l_tp_location_name);
2060: ec_debug.pl (3, 'l_county', l_county);
2061: ec_debug.pl (3, 'l_state', l_state);
2062: ec_debug.pl (3, 'l_zip', l_zip);
2063: ec_debug.pl (3, 'l_province', l_province);
2064: ec_debug.pl (3, 'l_country', l_country);
2065: ec_debug.pl (3, 'l_region1', l_region1);
2058: ec_debug.pl (3, 'l_tp_translator_code', l_tp_translator_code);
2059: ec_debug.pl (3, 'l_tp_location_name', l_tp_location_name);
2060: ec_debug.pl (3, 'l_county', l_county);
2061: ec_debug.pl (3, 'l_state', l_state);
2062: ec_debug.pl (3, 'l_zip', l_zip);
2063: ec_debug.pl (3, 'l_province', l_province);
2064: ec_debug.pl (3, 'l_country', l_country);
2065: ec_debug.pl (3, 'l_region1', l_region1);
2066: ec_debug.pl (3, 'l_region2', l_region2);
2059: ec_debug.pl (3, 'l_tp_location_name', l_tp_location_name);
2060: ec_debug.pl (3, 'l_county', l_county);
2061: ec_debug.pl (3, 'l_state', l_state);
2062: ec_debug.pl (3, 'l_zip', l_zip);
2063: ec_debug.pl (3, 'l_province', l_province);
2064: ec_debug.pl (3, 'l_country', l_country);
2065: ec_debug.pl (3, 'l_region1', l_region1);
2066: ec_debug.pl (3, 'l_region2', l_region2);
2067: ec_debug.pl (3, 'l_region3', l_region3);
2060: ec_debug.pl (3, 'l_county', l_county);
2061: ec_debug.pl (3, 'l_state', l_state);
2062: ec_debug.pl (3, 'l_zip', l_zip);
2063: ec_debug.pl (3, 'l_province', l_province);
2064: ec_debug.pl (3, 'l_country', l_country);
2065: ec_debug.pl (3, 'l_region1', l_region1);
2066: ec_debug.pl (3, 'l_region2', l_region2);
2067: ec_debug.pl (3, 'l_region3', l_region3);
2068: Bug 2617428
2061: ec_debug.pl (3, 'l_state', l_state);
2062: ec_debug.pl (3, 'l_zip', l_zip);
2063: ec_debug.pl (3, 'l_province', l_province);
2064: ec_debug.pl (3, 'l_country', l_country);
2065: ec_debug.pl (3, 'l_region1', l_region1);
2066: ec_debug.pl (3, 'l_region2', l_region2);
2067: ec_debug.pl (3, 'l_region3', l_region3);
2068: Bug 2617428
2069: */
2062: ec_debug.pl (3, 'l_zip', l_zip);
2063: ec_debug.pl (3, 'l_province', l_province);
2064: ec_debug.pl (3, 'l_country', l_country);
2065: ec_debug.pl (3, 'l_region1', l_region1);
2066: ec_debug.pl (3, 'l_region2', l_region2);
2067: ec_debug.pl (3, 'l_region3', l_region3);
2068: Bug 2617428
2069: */
2070: v_profile_name := 'ECE_' || NVL(LTRIM(RTRIM(UPPER(NVL(l_transaction_type,'NULL VALUE')))),'') || '_ADDRESS_PRECEDENCE';
2063: ec_debug.pl (3, 'l_province', l_province);
2064: ec_debug.pl (3, 'l_country', l_country);
2065: ec_debug.pl (3, 'l_region1', l_region1);
2066: ec_debug.pl (3, 'l_region2', l_region2);
2067: ec_debug.pl (3, 'l_region3', l_region3);
2068: Bug 2617428
2069: */
2070: v_profile_name := 'ECE_' || NVL(LTRIM(RTRIM(UPPER(NVL(l_transaction_type,'NULL VALUE')))),'') || '_ADDRESS_PRECEDENCE';
2071: fnd_profile.get(v_profile_name,v_precedence_code);
2408: fnd_message.set_token ('POSTAL_CODE', l_zip);
2409: fnd_message.set_token ('ORG_ID', l_org_id);
2410: fnd_message.set_token ('LOCATION_CODE', l_tp_location_code);
2411: l_msg_text := fnd_message.get;
2412: ec_debug.pl (0, l_msg_text);
2413: l_valid_rule := 'N';
2414:
2415: elsif (l_status_code = ece_trading_partners_pub.g_multiple_addr_found) then
2416: xProgress := 'ECERULEB-130-1460';
2424: fnd_message.set_token ('POSTAL_CODE', l_zip);
2425: fnd_message.set_token ('ORG_ID', l_org_id);
2426: fnd_message.set_token ('LOCATION_CODE', l_tp_location_code);
2427: l_msg_text := fnd_message.get;
2428: ec_debug.pl (0, l_msg_text);
2429: l_valid_rule := 'N';
2430:
2431: elsif (l_status_code = ece_trading_partners_pub.g_cannot_derive_addr) then
2432: xProgress := 'ECERULEB-130-1470';
2434: fnd_message.set_token ('ADDRESS', p_address);
2435: fnd_message.set_token ('LOCATION_CODE', l_tp_location_code);
2436: fnd_message.set_token ('ORG_ID', l_org_id);
2437: l_msg_text := fnd_message.get;
2438: ec_debug.pl (0, l_msg_text);
2439: l_valid_rule := 'N';
2440:
2441: elsif (l_status_code = ece_trading_partners_pub.g_multiple_loc_found) then
2442: xProgress := 'ECERULEB-130-1480';
2444: fnd_message.set_token ('ADDRESS', p_address);
2445: fnd_message.set_token ('LOCATION_CODE', l_tp_location_code);
2446: fnd_message.set_token ('ORG_ID', l_org_id);
2447: l_msg_text := fnd_message.get;
2448: ec_debug.pl (0, l_msg_text);
2449: l_valid_rule := 'N';
2450:
2451: elsif (l_status_code = ece_trading_partners_pub.g_cannot_derive_addr_id) then
2452: xProgress := 'ECERULEB-130-1490';
2452: xProgress := 'ECERULEB-130-1490';
2453: fnd_message.set_name ('EC', 'ECE_CANNOT_DERIVE_ADDRESS_ID');
2454: fnd_message.set_token ('ADDRESS', p_address);
2455: l_msg_text := fnd_message.get;
2456: ec_debug.pl (0, l_msg_text);
2457: l_valid_rule := 'N';
2458: end if;
2459:
2460: else
2464: fnd_message.set_token ('ADDRESS', p_address);
2465: fnd_message.set_token ('ADDRESS_ID', l_addr_id);
2466: fnd_message.set_token ('ORG_ID', l_org_id);
2467: l_msg_text := fnd_message.get;
2468: ec_debug.pl (0, l_msg_text);
2469: l_valid_rule := 'N';
2470:
2471: elsif (l_status_code = ece_trading_partners_pub.g_invalid_org_id) then
2472: xProgress := 'ECERULEB-130-1510';
2472: xProgress := 'ECERULEB-130-1510';
2473: fnd_message.set_name ('EC', 'ECE_INVALID_ORG_ID');
2474: fnd_message.set_token ('ORG_ID', l_org_id);
2475: l_msg_text := fnd_message.get;
2476: ec_debug.pl (0, l_msg_text);
2477: l_valid_rule := 'N';
2478:
2479: elsif (l_status_code = ece_trading_partners_pub.g_invalid_parameter) then
2480: xProgress := 'ECERULEB-130-1520';
2480: xProgress := 'ECERULEB-130-1520';
2481: fnd_message.set_name ('EC', 'ECE_INVALID_ADDR_PARAMETER');
2482: fnd_message.set_token ('ADDRESS', p_address);
2483: l_msg_text := fnd_message.get;
2484: ec_debug.pl (0, l_msg_text);
2485: l_valid_rule := 'N';
2486:
2487: else
2488: xProgress := 'ECERULEB-130-1530';
2492: end if;
2493:
2494: -- print out the address value after address derivation.
2495: xProgress := 'ECERULEB-130-1540';
2496: if ec_debug.G_debug_level = 3 then
2497: ec_debug.pl (3, 'Output of Address Derivation');
2498: ec_debug.pl (3, 'l_return_status', l_return_status);
2499: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2493:
2494: -- print out the address value after address derivation.
2495: xProgress := 'ECERULEB-130-1540';
2496: if ec_debug.G_debug_level = 3 then
2497: ec_debug.pl (3, 'Output of Address Derivation');
2498: ec_debug.pl (3, 'l_return_status', l_return_status);
2499: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2494: -- print out the address value after address derivation.
2495: xProgress := 'ECERULEB-130-1540';
2496: if ec_debug.G_debug_level = 3 then
2497: ec_debug.pl (3, 'Output of Address Derivation');
2498: ec_debug.pl (3, 'l_return_status', l_return_status);
2499: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2495: xProgress := 'ECERULEB-130-1540';
2496: if ec_debug.G_debug_level = 3 then
2497: ec_debug.pl (3, 'Output of Address Derivation');
2498: ec_debug.pl (3, 'l_return_status', l_return_status);
2499: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2496: if ec_debug.G_debug_level = 3 then
2497: ec_debug.pl (3, 'Output of Address Derivation');
2498: ec_debug.pl (3, 'l_return_status', l_return_status);
2499: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2497: ec_debug.pl (3, 'Output of Address Derivation');
2498: ec_debug.pl (3, 'l_return_status', l_return_status);
2499: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2498: ec_debug.pl (3, 'l_return_status', l_return_status);
2499: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2499: ec_debug.pl (3, 'l_msg_count', l_msg_count);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2500: ec_debug.pl (3, 'l_msg_data', l_msg_data);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2501: ec_debug.pl (3, 'l_status_code', l_status_code);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2502: ec_debug.pl (3, 'l_address_type', l_address_type);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2503: ec_debug.pl (3, 'l_transaction_type', l_transaction_type);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2504: ec_debug.pl (3, 'x_org_id', x_org_id);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2505: ec_debug.pl (3, 'x_addr_id', x_addr_id);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2506: ec_debug.pl (3, 'x_tp_location_code', x_tp_location_code);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2514: ec_debug.pl (3, 'x_city', x_city);
2507: ec_debug.pl (3, 'x_tp_translator_code', x_tp_translator_code);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2514: ec_debug.pl (3, 'x_city', x_city);
2515: ec_debug.pl (3, 'x_county', x_county);
2508: ec_debug.pl (3, 'x_tp_location_name', x_tp_location_name);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2514: ec_debug.pl (3, 'x_city', x_city);
2515: ec_debug.pl (3, 'x_county', x_county);
2516: ec_debug.pl (3, 'x_state', x_state);
2509: ec_debug.pl (3, 'x_addr1', x_addr1);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2514: ec_debug.pl (3, 'x_city', x_city);
2515: ec_debug.pl (3, 'x_county', x_county);
2516: ec_debug.pl (3, 'x_state', x_state);
2517: ec_debug.pl (3, 'x_zip', x_zip);
2510: ec_debug.pl (3, 'x_addr2', x_addr2);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2514: ec_debug.pl (3, 'x_city', x_city);
2515: ec_debug.pl (3, 'x_county', x_county);
2516: ec_debug.pl (3, 'x_state', x_state);
2517: ec_debug.pl (3, 'x_zip', x_zip);
2518: ec_debug.pl (3, 'x_province', x_province);
2511: ec_debug.pl (3, 'x_addr3', x_addr3);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2514: ec_debug.pl (3, 'x_city', x_city);
2515: ec_debug.pl (3, 'x_county', x_county);
2516: ec_debug.pl (3, 'x_state', x_state);
2517: ec_debug.pl (3, 'x_zip', x_zip);
2518: ec_debug.pl (3, 'x_province', x_province);
2519: ec_debug.pl (3, 'x_country', x_country);
2512: ec_debug.pl (3, 'x_addr4', x_addr4);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2514: ec_debug.pl (3, 'x_city', x_city);
2515: ec_debug.pl (3, 'x_county', x_county);
2516: ec_debug.pl (3, 'x_state', x_state);
2517: ec_debug.pl (3, 'x_zip', x_zip);
2518: ec_debug.pl (3, 'x_province', x_province);
2519: ec_debug.pl (3, 'x_country', x_country);
2520: ec_debug.pl (3, 'x_region1', x_region1);
2513: ec_debug.pl (3, 'x_addr_alt', x_addr_alt);
2514: ec_debug.pl (3, 'x_city', x_city);
2515: ec_debug.pl (3, 'x_county', x_county);
2516: ec_debug.pl (3, 'x_state', x_state);
2517: ec_debug.pl (3, 'x_zip', x_zip);
2518: ec_debug.pl (3, 'x_province', x_province);
2519: ec_debug.pl (3, 'x_country', x_country);
2520: ec_debug.pl (3, 'x_region1', x_region1);
2521: ec_debug.pl (3, 'x_region2', x_region2);
2514: ec_debug.pl (3, 'x_city', x_city);
2515: ec_debug.pl (3, 'x_county', x_county);
2516: ec_debug.pl (3, 'x_state', x_state);
2517: ec_debug.pl (3, 'x_zip', x_zip);
2518: ec_debug.pl (3, 'x_province', x_province);
2519: ec_debug.pl (3, 'x_country', x_country);
2520: ec_debug.pl (3, 'x_region1', x_region1);
2521: ec_debug.pl (3, 'x_region2', x_region2);
2522: ec_debug.pl (3, 'x_region3', x_region3);
2515: ec_debug.pl (3, 'x_county', x_county);
2516: ec_debug.pl (3, 'x_state', x_state);
2517: ec_debug.pl (3, 'x_zip', x_zip);
2518: ec_debug.pl (3, 'x_province', x_province);
2519: ec_debug.pl (3, 'x_country', x_country);
2520: ec_debug.pl (3, 'x_region1', x_region1);
2521: ec_debug.pl (3, 'x_region2', x_region2);
2522: ec_debug.pl (3, 'x_region3', x_region3);
2523: ec_debug.pl (3, 'l_valid_rule', l_valid_rule);
2516: ec_debug.pl (3, 'x_state', x_state);
2517: ec_debug.pl (3, 'x_zip', x_zip);
2518: ec_debug.pl (3, 'x_province', x_province);
2519: ec_debug.pl (3, 'x_country', x_country);
2520: ec_debug.pl (3, 'x_region1', x_region1);
2521: ec_debug.pl (3, 'x_region2', x_region2);
2522: ec_debug.pl (3, 'x_region3', x_region3);
2523: ec_debug.pl (3, 'l_valid_rule', l_valid_rule);
2524: end if;
2517: ec_debug.pl (3, 'x_zip', x_zip);
2518: ec_debug.pl (3, 'x_province', x_province);
2519: ec_debug.pl (3, 'x_country', x_country);
2520: ec_debug.pl (3, 'x_region1', x_region1);
2521: ec_debug.pl (3, 'x_region2', x_region2);
2522: ec_debug.pl (3, 'x_region3', x_region3);
2523: ec_debug.pl (3, 'l_valid_rule', l_valid_rule);
2524: end if;
2525: xProgress := 'ECERULEB-130-1550';
2518: ec_debug.pl (3, 'x_province', x_province);
2519: ec_debug.pl (3, 'x_country', x_country);
2520: ec_debug.pl (3, 'x_region1', x_region1);
2521: ec_debug.pl (3, 'x_region2', x_region2);
2522: ec_debug.pl (3, 'x_region3', x_region3);
2523: ec_debug.pl (3, 'l_valid_rule', l_valid_rule);
2524: end if;
2525: xProgress := 'ECERULEB-130-1550';
2526: l_stage_id := ec_utils.g_ext_levels(ec_utils.g_current_level).stage_id;
2519: ec_debug.pl (3, 'x_country', x_country);
2520: ec_debug.pl (3, 'x_region1', x_region1);
2521: ec_debug.pl (3, 'x_region2', x_region2);
2522: ec_debug.pl (3, 'x_region3', x_region3);
2523: ec_debug.pl (3, 'l_valid_rule', l_valid_rule);
2524: end if;
2525: xProgress := 'ECERULEB-130-1550';
2526: l_stage_id := ec_utils.g_ext_levels(ec_utils.g_current_level).stage_id;
2527: l_document_id := ec_utils.g_ext_levels(ec_utils.g_current_level).document_id;
2527: l_document_id := ec_utils.g_ext_levels(ec_utils.g_current_level).document_id;
2528: l_document_number := ec_utils.g_ext_levels(ec_utils.g_current_level).document_number;
2529:
2530: xProgress := 'ECERULEB-130-1560';
2531: if ec_debug.G_debug_level = 3 then
2532: ec_debug.pl (3, 'l_stage_id', l_stage_id);
2533: ec_debug.pl (3, 'l_document_id', l_document_id);
2534: ec_debug.pl (3, 'l_document_number', l_document_number);
2535: end if;
2528: l_document_number := ec_utils.g_ext_levels(ec_utils.g_current_level).document_number;
2529:
2530: xProgress := 'ECERULEB-130-1560';
2531: if ec_debug.G_debug_level = 3 then
2532: ec_debug.pl (3, 'l_stage_id', l_stage_id);
2533: ec_debug.pl (3, 'l_document_id', l_document_id);
2534: ec_debug.pl (3, 'l_document_number', l_document_number);
2535: end if;
2536:
2529:
2530: xProgress := 'ECERULEB-130-1560';
2531: if ec_debug.G_debug_level = 3 then
2532: ec_debug.pl (3, 'l_stage_id', l_stage_id);
2533: ec_debug.pl (3, 'l_document_id', l_document_id);
2534: ec_debug.pl (3, 'l_document_number', l_document_number);
2535: end if;
2536:
2537: -- get the defined process rule 'INVALID_ADDRESS' information.
2530: xProgress := 'ECERULEB-130-1560';
2531: if ec_debug.G_debug_level = 3 then
2532: ec_debug.pl (3, 'l_stage_id', l_stage_id);
2533: ec_debug.pl (3, 'l_document_id', l_document_id);
2534: ec_debug.pl (3, 'l_document_number', l_document_number);
2535: end if;
2536:
2537: -- get the defined process rule 'INVALID_ADDRESS' information.
2538: xProgress := 'ECERULEB-130-1570';
2547: l_action_code, NULL, l_rule_id, l_stage_id, l_document_id,
2548: g_process_rule, l_document_number, l_msg_text);
2549:
2550: xProgress := 'ECERULEB-130-1590';
2551: if ec_debug.G_debug_level >= 2 then
2552: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2553: end if;
2554:
2555: EXCEPTION
2548: g_process_rule, l_document_number, l_msg_text);
2549:
2550: xProgress := 'ECERULEB-130-1590';
2551: if ec_debug.G_debug_level >= 2 then
2552: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2553: end if;
2554:
2555: EXCEPTION
2556: WHEN addr_unexp_error then
2553: end if;
2554:
2555: EXCEPTION
2556: WHEN addr_unexp_error then
2557: ec_debug.pl (0, 'EC', 'ECE_ADDR_UNEXP_ERROR',
2558: 'ADDRESS', p_address);
2559: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2560: raise ec_utils.program_exit;
2561:
2555: EXCEPTION
2556: WHEN addr_unexp_error then
2557: ec_debug.pl (0, 'EC', 'ECE_ADDR_UNEXP_ERROR',
2558: 'ADDRESS', p_address);
2559: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2560: raise ec_utils.program_exit;
2561:
2562: WHEN stack_variable_not_found then
2563: ec_debug.pl (0, 'EC', 'ECE_VARIABLE_NOT_ON_STACK',
2559: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2560: raise ec_utils.program_exit;
2561:
2562: WHEN stack_variable_not_found then
2563: ec_debug.pl (0, 'EC', 'ECE_VARIABLE_NOT_ON_STACK',
2564: 'VARIABLE_NAME', 'I_ADDRESS_TYPE');
2565: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2566: raise ec_utils.program_exit;
2567:
2561:
2562: WHEN stack_variable_not_found then
2563: ec_debug.pl (0, 'EC', 'ECE_VARIABLE_NOT_ON_STACK',
2564: 'VARIABLE_NAME', 'I_ADDRESS_TYPE');
2565: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2566: raise ec_utils.program_exit;
2567:
2568: WHEN no_addr_rule_info then
2569: if (c_addr_rule%ISOPEN) then
2568: WHEN no_addr_rule_info then
2569: if (c_addr_rule%ISOPEN) then
2570: close c_addr_rule;
2571: end if;
2572: ec_debug.pl (0, 'EC', 'ECE_NO_PROCESS_RULE',
2573: 'TRANSACTION_TYPE', l_transaction_type,
2574: 'RULE_TYPE', l_rule_type);
2575: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2576: raise ec_utils.program_exit;
2571: end if;
2572: ec_debug.pl (0, 'EC', 'ECE_NO_PROCESS_RULE',
2573: 'TRANSACTION_TYPE', l_transaction_type,
2574: 'RULE_TYPE', l_rule_type);
2575: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2576: raise ec_utils.program_exit;
2577:
2578: WHEN OTHERS THEN
2579: if (c_addr_rule%ISOPEN) then
2578: WHEN OTHERS THEN
2579: if (c_addr_rule%ISOPEN) then
2580: close c_addr_rule;
2581: end if;
2582: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2583: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2584: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2585: raise ec_utils.program_exit;
2586:
2579: if (c_addr_rule%ISOPEN) then
2580: close c_addr_rule;
2581: end if;
2582: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2583: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2584: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2585: raise ec_utils.program_exit;
2586:
2587: END Validate_Get_Address_Info;
2580: close c_addr_rule;
2581: end if;
2582: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2583: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2584: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_GET_ADDRESS_INFO');
2585: raise ec_utils.program_exit;
2586:
2587: END Validate_Get_Address_Info;
2588:
2616:
2617: BEGIN
2618:
2619: xProgress := 'ECERULEB-140-1000';
2620: if ec_debug.G_debug_level >= 2 then
2621: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2622: end if;
2623: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
2624:
2617: BEGIN
2618:
2619: xProgress := 'ECERULEB-140-1000';
2620: if ec_debug.G_debug_level >= 2 then
2621: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2622: end if;
2623: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
2624:
2625: if (l_action_code <> g_disabled and l_ignore_flag = 'N') then
2746:
2747: end if;
2748:
2749: xProgress := 'ECERULEB-140-1160';
2750: if ec_debug.G_debug_level >= 2 then
2751: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2752: end if;
2753:
2754: EXCEPTION
2747: end if;
2748:
2749: xProgress := 'ECERULEB-140-1160';
2750: if ec_debug.G_debug_level >= 2 then
2751: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2752: end if;
2753:
2754: EXCEPTION
2755: WHEN ec_utils.program_exit then
2752: end if;
2753:
2754: EXCEPTION
2755: WHEN ec_utils.program_exit then
2756: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2757: raise;
2758:
2759: WHEN OTHERS THEN
2760: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2756: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2757: raise;
2758:
2759: WHEN OTHERS THEN
2760: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2761: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2762: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2763: raise ec_utils.program_exit;
2764:
2757: raise;
2758:
2759: WHEN OTHERS THEN
2760: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2761: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2762: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2763: raise ec_utils.program_exit;
2764:
2765: END Validate_Ship_To_Address;
2758:
2759: WHEN OTHERS THEN
2760: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2761: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2762: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_ADDRESS');
2763: raise ec_utils.program_exit;
2764:
2765: END Validate_Ship_To_Address;
2766:
2794:
2795: BEGIN
2796:
2797: xProgress := 'ECERULEB-150-1000';
2798: if ec_debug.G_debug_level >= 2 then
2799: ec_debug.push ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2800: end if;
2801:
2802: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
2795: BEGIN
2796:
2797: xProgress := 'ECERULEB-150-1000';
2798: if ec_debug.G_debug_level >= 2 then
2799: ec_debug.push ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2800: end if;
2801:
2802: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
2803:
2921:
2922: end if;
2923:
2924: xProgress := 'ECERULEB-150-1160';
2925: if ec_debug.G_debug_level >= 2 then
2926: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2927: end if;
2928: EXCEPTION
2929: WHEN ec_utils.program_exit then
2922: end if;
2923:
2924: xProgress := 'ECERULEB-150-1160';
2925: if ec_debug.G_debug_level >= 2 then
2926: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2927: end if;
2928: EXCEPTION
2929: WHEN ec_utils.program_exit then
2930: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2926: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2927: end if;
2928: EXCEPTION
2929: WHEN ec_utils.program_exit then
2930: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2931: raise;
2932:
2933: WHEN OTHERS THEN
2934: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2930: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2931: raise;
2932:
2933: WHEN OTHERS THEN
2934: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2935: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2936: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2937: raise ec_utils.program_exit;
2938:
2931: raise;
2932:
2933: WHEN OTHERS THEN
2934: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2935: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2936: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2937: raise ec_utils.program_exit;
2938:
2939: END Validate_Bill_To_Address;
2932:
2933: WHEN OTHERS THEN
2934: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
2935: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
2936: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_ADDRESS');
2937: raise ec_utils.program_exit;
2938:
2939: END Validate_Bill_To_Address;
2940:
2968:
2969: BEGIN
2970:
2971: xProgress := 'ECERULEB-230-1000';
2972: if ec_debug.G_debug_level >= 2 then
2973: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
2974: end if;
2975:
2976: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
2969: BEGIN
2970:
2971: xProgress := 'ECERULEB-230-1000';
2972: if ec_debug.G_debug_level >= 2 then
2973: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
2974: end if;
2975:
2976: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
2977:
3099:
3100: end if;
3101:
3102: xProgress := 'ECERULEB-230-1160';
3103: if ec_debug.G_debug_level >= 2 then
3104: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
3105: end if;
3106:
3107: EXCEPTION
3100: end if;
3101:
3102: xProgress := 'ECERULEB-230-1160';
3103: if ec_debug.G_debug_level >= 2 then
3104: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
3105: end if;
3106:
3107: EXCEPTION
3108: WHEN ec_utils.program_exit then
3105: end if;
3106:
3107: EXCEPTION
3108: WHEN ec_utils.program_exit then
3109: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
3110: raise;
3111:
3112: WHEN OTHERS THEN
3113: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3109: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
3110: raise;
3111:
3112: WHEN OTHERS THEN
3113: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3114: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3115: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
3116: raise ec_utils.program_exit;
3117:
3110: raise;
3111:
3112: WHEN OTHERS THEN
3113: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3114: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3115: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
3116: raise ec_utils.program_exit;
3117:
3118: END Validate_Sold_To_Address;
3111:
3112: WHEN OTHERS THEN
3113: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3114: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3115: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SOLD_TO_ADDRESS');
3116: raise ec_utils.program_exit;
3117:
3118: END Validate_Sold_To_Address;
3119:
3146:
3147: BEGIN
3148:
3149: xProgress := 'ECERULEB-160-1000';
3150: if ec_debug.G_debug_level >= 2 then
3151: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3152: end if;
3153:
3154: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3147: BEGIN
3148:
3149: xProgress := 'ECERULEB-160-1000';
3150: if ec_debug.G_debug_level >= 2 then
3151: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3152: end if;
3153:
3154: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3155:
3264:
3265: end if;
3266:
3267: xProgress := 'ECERULEB-160-1160';
3268: if ec_debug.G_debug_level >= 2 then
3269: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3270: end if;
3271:
3272: EXCEPTION
3265: end if;
3266:
3267: xProgress := 'ECERULEB-160-1160';
3268: if ec_debug.G_debug_level >= 2 then
3269: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3270: end if;
3271:
3272: EXCEPTION
3273: WHEN ec_utils.program_exit then
3270: end if;
3271:
3272: EXCEPTION
3273: WHEN ec_utils.program_exit then
3274: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3275: raise;
3276:
3277: WHEN OTHERS THEN
3278: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3274: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3275: raise;
3276:
3277: WHEN OTHERS THEN
3278: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3279: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3280: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3281: raise ec_utils.program_exit;
3282:
3275: raise;
3276:
3277: WHEN OTHERS THEN
3278: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3279: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3280: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3281: raise ec_utils.program_exit;
3282:
3283: END Validate_Ship_From_Address;
3276:
3277: WHEN OTHERS THEN
3278: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3279: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3280: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_ADDRESS');
3281: raise ec_utils.program_exit;
3282:
3283: END Validate_Ship_From_Address;
3284:
3312:
3313: BEGIN
3314:
3315: xProgress := 'ECERULEB-170-1000';
3316: if ec_debug.G_debug_level >= 2 then
3317: ec_debug.push ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3318: end if;
3319:
3320: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3313: BEGIN
3314:
3315: xProgress := 'ECERULEB-170-1000';
3316: if ec_debug.G_debug_level >= 2 then
3317: ec_debug.push ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3318: end if;
3319:
3320: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3321:
3430:
3431: end if;
3432:
3433: xProgress := 'ECERULEB-170-1160';
3434: if ec_debug.G_debug_level >= 2 then
3435: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3436: end if;
3437:
3438: EXCEPTION
3431: end if;
3432:
3433: xProgress := 'ECERULEB-170-1160';
3434: if ec_debug.G_debug_level >= 2 then
3435: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3436: end if;
3437:
3438: EXCEPTION
3439: WHEN ec_utils.program_exit then
3436: end if;
3437:
3438: EXCEPTION
3439: WHEN ec_utils.program_exit then
3440: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3441: raise;
3442:
3443: WHEN OTHERS THEN
3444: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3440: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3441: raise;
3442:
3443: WHEN OTHERS THEN
3444: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3445: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3446: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3447: raise ec_utils.program_exit;
3448:
3441: raise;
3442:
3443: WHEN OTHERS THEN
3444: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3445: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3446: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3447: raise ec_utils.program_exit;
3448:
3449: END Validate_Bill_From_Address;
3442:
3443: WHEN OTHERS THEN
3444: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3445: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3446: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_ADDRESS');
3447: raise ec_utils.program_exit;
3448:
3449: END Validate_Bill_From_Address;
3450:
3478:
3479: BEGIN
3480:
3481: xProgress := 'ECERULEB-240-1000';
3482: if ec_debug.G_debug_level >= 2 then
3483: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3484: end if;
3485:
3486: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3479: BEGIN
3480:
3481: xProgress := 'ECERULEB-240-1000';
3482: if ec_debug.G_debug_level >= 2 then
3483: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3484: end if;
3485:
3486: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3487:
3595:
3596: end if;
3597:
3598: xProgress := 'ECERULEB-240-1160';
3599: if ec_debug.G_debug_level >= 2 then
3600: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3601: end if;
3602:
3603: EXCEPTION
3596: end if;
3597:
3598: xProgress := 'ECERULEB-240-1160';
3599: if ec_debug.G_debug_level >= 2 then
3600: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3601: end if;
3602:
3603: EXCEPTION
3604: WHEN ec_utils.program_exit then
3601: end if;
3602:
3603: EXCEPTION
3604: WHEN ec_utils.program_exit then
3605: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3606: raise;
3607:
3608: WHEN OTHERS THEN
3609: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3605: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3606: raise;
3607:
3608: WHEN OTHERS THEN
3609: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3610: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3611: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3612: raise ec_utils.program_exit;
3613:
3606: raise;
3607:
3608: WHEN OTHERS THEN
3609: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3610: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3611: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3612: raise ec_utils.program_exit;
3613:
3614: END Validate_Ship_To_Intrmd_Add;
3607:
3608: WHEN OTHERS THEN
3609: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3610: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3611: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INTRMD_ADD');
3612: raise ec_utils.program_exit;
3613:
3614: END Validate_Ship_To_Intrmd_Add;
3615:
3642:
3643: BEGIN
3644:
3645: xProgress := 'ECERULEB-180-1000';
3646: if ec_debug.G_debug_level >= 2 then
3647: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3648: end if;
3649:
3650: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3643: BEGIN
3644:
3645: xProgress := 'ECERULEB-180-1000';
3646: if ec_debug.G_debug_level >= 2 then
3647: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3648: end if;
3649:
3650: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3651:
3748:
3749: end if;
3750:
3751: xProgress := 'ECERULEB-180-1160';
3752: if ec_debug.G_debug_level >= 2 then
3753: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3754: end if;
3755:
3756: EXCEPTION
3749: end if;
3750:
3751: xProgress := 'ECERULEB-180-1160';
3752: if ec_debug.G_debug_level >= 2 then
3753: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3754: end if;
3755:
3756: EXCEPTION
3757: WHEN ec_utils.program_exit then
3754: end if;
3755:
3756: EXCEPTION
3757: WHEN ec_utils.program_exit then
3758: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3759: raise;
3760:
3761: WHEN OTHERS THEN
3762: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3758: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3759: raise;
3760:
3761: WHEN OTHERS THEN
3762: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3763: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3764: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3765: raise ec_utils.program_exit;
3766:
3759: raise;
3760:
3761: WHEN OTHERS THEN
3762: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3763: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3764: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3765: raise ec_utils.program_exit;
3766:
3767: END Validate_Ship_To_Int_Address;
3760:
3761: WHEN OTHERS THEN
3762: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3763: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3764: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_TO_INT_ADDRESS');
3765: raise ec_utils.program_exit;
3766:
3767: END Validate_Ship_To_Int_Address;
3768:
3796:
3797: BEGIN
3798:
3799: xProgress := 'ECERULEB-190-1000';
3800: if ec_debug.G_debug_level >= 2 then
3801: ec_debug.push ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3802: end if;
3803:
3804: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3797: BEGIN
3798:
3799: xProgress := 'ECERULEB-190-1000';
3800: if ec_debug.G_debug_level >= 2 then
3801: ec_debug.push ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3802: end if;
3803:
3804: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3805:
3902:
3903: end if;
3904:
3905: xProgress := 'ECERULEB-190-1160';
3906: if ec_debug.G_debug_level >= 2 then
3907: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3908: end if;
3909:
3910: EXCEPTION
3903: end if;
3904:
3905: xProgress := 'ECERULEB-190-1160';
3906: if ec_debug.G_debug_level >= 2 then
3907: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3908: end if;
3909:
3910: EXCEPTION
3911: WHEN ec_utils.program_exit then
3908: end if;
3909:
3910: EXCEPTION
3911: WHEN ec_utils.program_exit then
3912: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3913: raise;
3914:
3915: WHEN OTHERS THEN
3916: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3912: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3913: raise;
3914:
3915: WHEN OTHERS THEN
3916: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3917: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3918: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3919: raise ec_utils.program_exit;
3920:
3913: raise;
3914:
3915: WHEN OTHERS THEN
3916: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3917: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3918: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3919: raise ec_utils.program_exit;
3920:
3921: END Validate_Bill_To_Int_Address;
3914:
3915: WHEN OTHERS THEN
3916: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
3917: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
3918: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_TO_INT_ADDRESS');
3919: raise ec_utils.program_exit;
3920:
3921: END Validate_Bill_To_Int_Address;
3922:
3951: BEGIN
3952:
3953: xProgress := 'ECERULEB-200-1000';
3954:
3955: if ec_debug.G_debug_level >= 2 then
3956: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
3957: end if;
3958:
3959: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3952:
3953: xProgress := 'ECERULEB-200-1000';
3954:
3955: if ec_debug.G_debug_level >= 2 then
3956: ec_debug.push ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
3957: end if;
3958:
3959: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
3960:
4068:
4069: end if;
4070:
4071: xProgress := 'ECERULEB-200-1160';
4072: if ec_debug.G_debug_level >= 2 then
4073: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4074: end if;
4075: EXCEPTION
4076: WHEN ec_utils.program_exit then
4069: end if;
4070:
4071: xProgress := 'ECERULEB-200-1160';
4072: if ec_debug.G_debug_level >= 2 then
4073: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4074: end if;
4075: EXCEPTION
4076: WHEN ec_utils.program_exit then
4077: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4073: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4074: end if;
4075: EXCEPTION
4076: WHEN ec_utils.program_exit then
4077: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4078: raise;
4079:
4080: WHEN OTHERS THEN
4081: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4077: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4078: raise;
4079:
4080: WHEN OTHERS THEN
4081: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4082: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4083: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4084: raise ec_utils.program_exit;
4085:
4078: raise;
4079:
4080: WHEN OTHERS THEN
4081: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4082: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4083: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4084: raise ec_utils.program_exit;
4085:
4086: END Validate_Ship_From_Int_Address;
4079:
4080: WHEN OTHERS THEN
4081: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4082: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4083: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_SHIP_FROM_INT_ADDRESS');
4084: raise ec_utils.program_exit;
4085:
4086: END Validate_Ship_From_Int_Address;
4087:
4115:
4116: BEGIN
4117:
4118: xProgress := 'ECERULEB-210-1000';
4119: if ec_debug.G_debug_level >= 2 then
4120: ec_debug.push ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4121: end if;
4122:
4123: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
4116: BEGIN
4117:
4118: xProgress := 'ECERULEB-210-1000';
4119: if ec_debug.G_debug_level >= 2 then
4120: ec_debug.push ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4121: end if;
4122:
4123: Get_Action_Ignore_Flag (l_action_code, l_ignore_flag);
4124:
4222:
4223: end if;
4224:
4225: xProgress := 'ECERULEB-210-1160';
4226: if ec_debug.G_debug_level >= 2 then
4227: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4228: end if;
4229:
4230: EXCEPTION
4223: end if;
4224:
4225: xProgress := 'ECERULEB-210-1160';
4226: if ec_debug.G_debug_level >= 2 then
4227: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4228: end if;
4229:
4230: EXCEPTION
4231: WHEN ec_utils.program_exit then
4228: end if;
4229:
4230: EXCEPTION
4231: WHEN ec_utils.program_exit then
4232: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4233: raise;
4234:
4235: WHEN OTHERS THEN
4236: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4232: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4233: raise;
4234:
4235: WHEN OTHERS THEN
4236: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4237: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4238: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4239: raise ec_utils.program_exit;
4240:
4233: raise;
4234:
4235: WHEN OTHERS THEN
4236: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4237: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4238: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4239: raise ec_utils.program_exit;
4240:
4241: END Validate_Bill_From_Int_Address;
4234:
4235: WHEN OTHERS THEN
4236: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4237: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4238: ec_debug.pop ('ECE_RULES_PKG.VALIDATE_BILL_FROM_INT_ADDRESS');
4239: raise ec_utils.program_exit;
4240:
4241: END Validate_Bill_From_Int_Address;
4242:
4316: rule_id = p_rule_id and
4317: violation_level = l_violation_level;
4318:
4319: BEGIN
4320: if ec_debug.G_debug_level >= 2 then
4321: ec_debug.push ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4322: ec_debug.pl (3, 'g_transaction_type', ec_utils.g_transaction_type);
4323: ec_debug.pl (3, 'g_document_id', ec_utils.g_document_id);
4324: end if;
4317: violation_level = l_violation_level;
4318:
4319: BEGIN
4320: if ec_debug.G_debug_level >= 2 then
4321: ec_debug.push ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4322: ec_debug.pl (3, 'g_transaction_type', ec_utils.g_transaction_type);
4323: ec_debug.pl (3, 'g_document_id', ec_utils.g_document_id);
4324: end if;
4325:
4318:
4319: BEGIN
4320: if ec_debug.G_debug_level >= 2 then
4321: ec_debug.push ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4322: ec_debug.pl (3, 'g_transaction_type', ec_utils.g_transaction_type);
4323: ec_debug.pl (3, 'g_document_id', ec_utils.g_document_id);
4324: end if;
4325:
4326: xProgress := 'ECERULEB-220-1000';
4319: BEGIN
4320: if ec_debug.G_debug_level >= 2 then
4321: ec_debug.push ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4322: ec_debug.pl (3, 'g_transaction_type', ec_utils.g_transaction_type);
4323: ec_debug.pl (3, 'g_document_id', ec_utils.g_document_id);
4324: end if;
4325:
4326: xProgress := 'ECERULEB-220-1000';
4327: x_action_code := g_skip_doc;
4334: raise no_process_rule_info;
4335: end if;
4336: close c_rule_info;
4337:
4338: if ec_debug.G_debug_level = 3 then
4339: ec_debug.pl (3, 'rule_type', l_rule_type);
4340: ec_debug.pl (3, 'action_code', x_action_code);
4341: end if;
4342:
4335: end if;
4336: close c_rule_info;
4337:
4338: if ec_debug.G_debug_level = 3 then
4339: ec_debug.pl (3, 'rule_type', l_rule_type);
4340: ec_debug.pl (3, 'action_code', x_action_code);
4341: end if;
4342:
4343: xProgress := 'ECERULEB-220-1020';
4336: close c_rule_info;
4337:
4338: if ec_debug.G_debug_level = 3 then
4339: ec_debug.pl (3, 'rule_type', l_rule_type);
4340: ec_debug.pl (3, 'action_code', x_action_code);
4341: end if;
4342:
4343: xProgress := 'ECERULEB-220-1020';
4344: open c_ignore_flag (ec_utils.g_document_id, l_rule_id);
4348: x_ignore_flag := 'N';
4349: end if;
4350: close c_ignore_flag;
4351:
4352: if ec_debug.G_debug_level >= 2 then
4353: ec_debug.pl (3, 'ignore_flag', x_ignore_flag);
4354:
4355: ec_debug.pop ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4356: end if;
4349: end if;
4350: close c_ignore_flag;
4351:
4352: if ec_debug.G_debug_level >= 2 then
4353: ec_debug.pl (3, 'ignore_flag', x_ignore_flag);
4354:
4355: ec_debug.pop ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4356: end if;
4357:
4351:
4352: if ec_debug.G_debug_level >= 2 then
4353: ec_debug.pl (3, 'ignore_flag', x_ignore_flag);
4354:
4355: ec_debug.pop ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4356: end if;
4357:
4358: EXCEPTION
4359: WHEN no_process_rule_info then
4359: WHEN no_process_rule_info then
4360: if (c_rule_info%ISOPEN) then
4361: close c_rule_info;
4362: end if;
4363: ec_debug.pl (0, 'EC', 'ECE_NO_PROCESS_RULE',
4364: 'TRANSACTION_TYPE', ec_utils.g_transaction_type,
4365: 'RULE_TYPE', l_rule_type);
4366: ec_debug.pop ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4367: raise ec_utils.program_exit;
4362: end if;
4363: ec_debug.pl (0, 'EC', 'ECE_NO_PROCESS_RULE',
4364: 'TRANSACTION_TYPE', ec_utils.g_transaction_type,
4365: 'RULE_TYPE', l_rule_type);
4366: ec_debug.pop ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4367: raise ec_utils.program_exit;
4368:
4369: WHEN OTHERS THEN
4370: if (c_rule_info%ISOPEN) then
4372: end if;
4373: if (c_ignore_flag%ISOPEN) then
4374: close c_ignore_flag;
4375: end if;
4376: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4377: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4378: ec_debug.pop ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4379: raise ec_utils.program_exit;
4380:
4373: if (c_ignore_flag%ISOPEN) then
4374: close c_ignore_flag;
4375: end if;
4376: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4377: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4378: ec_debug.pop ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4379: raise ec_utils.program_exit;
4380:
4381: END Get_Action_Ignore_Flag;
4374: close c_ignore_flag;
4375: end if;
4376: ec_debug.pl (0, 'EC', 'ECE_PROGRAM_ERROR','PROGRESS_LEVEL', xProgress);
4377: ec_debug.pl (0, 'EC', 'ECE_ERROR_MESSAGE', 'ERROR_MESSAGE', SQLERRM);
4378: ec_debug.pop ('ECE_RULES_PKG.GET_ACTION_IGNORE_FLAG');
4379: raise ec_utils.program_exit;
4380:
4381: END Get_Action_Ignore_Flag;
4382: