69: and hcp.contact_point_type = 'EDI';
70:
71: BEGIN
72:
73: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address');
74: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
75: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
76: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
77: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
70:
71: BEGIN
72:
73: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address');
74: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
75: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
76: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
77: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
78: EC_DEBUG.PL(3, 'p_translator_code: ',p_translator_code);
71: BEGIN
72:
73: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address');
74: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
75: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
76: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
77: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
78: EC_DEBUG.PL(3, 'p_translator_code: ',p_translator_code);
79: EC_DEBUG.PL(3, 'p_location_code_ext: ',p_location_code_ext);
72:
73: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address');
74: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
75: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
76: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
77: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
78: EC_DEBUG.PL(3, 'p_translator_code: ',p_translator_code);
79: EC_DEBUG.PL(3, 'p_location_code_ext: ',p_location_code_ext);
80: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
73: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address');
74: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
75: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
76: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
77: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
78: EC_DEBUG.PL(3, 'p_translator_code: ',p_translator_code);
79: EC_DEBUG.PL(3, 'p_location_code_ext: ',p_location_code_ext);
80: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
81:
74: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
75: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
76: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
77: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
78: EC_DEBUG.PL(3, 'p_translator_code: ',p_translator_code);
79: EC_DEBUG.PL(3, 'p_location_code_ext: ',p_location_code_ext);
80: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
81:
82:
75: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
76: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
77: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
78: EC_DEBUG.PL(3, 'p_translator_code: ',p_translator_code);
79: EC_DEBUG.PL(3, 'p_location_code_ext: ',p_location_code_ext);
80: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
81:
82:
83: -- Standard Start of API savepoint
76: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
77: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
78: EC_DEBUG.PL(3, 'p_translator_code: ',p_translator_code);
79: EC_DEBUG.PL(3, 'p_location_code_ext: ',p_location_code_ext);
80: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
81:
82:
83: -- Standard Start of API savepoint
84:
113: then
114: for addr in ra_add
115: loop
116: l_entity_id := addr.cust_account_id;
117: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
118: l_entity_address_id := addr.cust_acct_site_id;
119: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
120: end loop;
121:
115: loop
116: l_entity_id := addr.cust_account_id;
117: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
118: l_entity_address_id := addr.cust_acct_site_id;
119: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
120: end loop;
121:
122: elsif (p_info_type = EC_Trading_Partner_PVT.G_SUPPLIER)
123: then
123: then
124: for site in po_site
125: loop
126: l_entity_id := site.vendor_id;
127: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
128: l_entity_address_id := site.vendor_site_id;
129: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
130: end loop;
131:
125: loop
126: l_entity_id := site.vendor_id;
127: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
128: l_entity_address_id := site.vendor_site_id;
129: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
130: end loop;
131:
132: elsif (p_info_type = EC_Trading_Partner_PVT.G_BANK)
133: then
133: then
134: for bank in ap_bank
135: loop
136: l_entity_id := -1;
137: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
138: l_entity_address_id := bank.branch_party_id;
139: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
140: end loop;
141: else
135: loop
136: l_entity_id := -1;
137: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
138: l_entity_address_id := bank.branch_party_id;
139: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
140: end loop;
141: else
142: raise FND_API.G_EXC_UNEXPECTED_ERROR;
143: end if;
149: fnd_message.set_name('EC','ECE_TP_NOT_FOUND');
150: p_msg_data := fnd_message.get;
151: else
152: p_entity_id := l_entity_id;
153: EC_DEBUG.PL(3, 'p_entity_id: ',p_entity_id);
154: p_entity_address_id := l_entity_address_id;
155: EC_DEBUG.PL(3, 'p_entity_address_id: ',p_entity_address_id);
156: end if;
157:
151: else
152: p_entity_id := l_entity_id;
153: EC_DEBUG.PL(3, 'p_entity_id: ',p_entity_id);
154: p_entity_address_id := l_entity_address_id;
155: EC_DEBUG.PL(3, 'p_entity_address_id: ',p_entity_address_id);
156: end if;
157:
158:
159: -- Both G_EXC_ERROR and G_EXC_UNEXPECTED_ERROR are handled in
192: p_count => p_msg_count,
193: p_data => p_msg_data
194: );
195:
196: EC_DEBUG.POP('EC_Trading_Partner_PVT.Get_TP_Address');
197: EXCEPTION
198:
199: WHEN FND_API.G_EXC_ERROR THEN
200:
218: p_data => p_msg_data
219: );
220:
221: WHEN OTHERS THEN
222: EC_DEBUG.PL(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
223: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
224: Rollback to Get_TP_Address_PVT;
225: p_return_status := FND_API.G_RET_STS_ERROR;
226:
219: );
220:
221: WHEN OTHERS THEN
222: EC_DEBUG.PL(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
223: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
224: Rollback to Get_TP_Address_PVT;
225: p_return_status := FND_API.G_RET_STS_ERROR;
226:
227: if FND_MSG_PUB.Check_Msg_Level( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
312: and hcp.contact_point_type = 'EDI';
313:
314: BEGIN
315:
316: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address_Ref');
317: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
318: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
319: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
313:
314: BEGIN
315:
316: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address_Ref');
317: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
318: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
319: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
321: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
314: BEGIN
315:
316: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address_Ref');
317: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
318: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
319: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
321: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
322: EC_DEBUG.PL(3, 'p_reference_ext1: ',p_reference_ext1);
315:
316: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address_Ref');
317: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
318: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
319: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
321: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
322: EC_DEBUG.PL(3, 'p_reference_ext1: ',p_reference_ext1);
323: EC_DEBUG.PL(3, 'p_reference_ext2: ',p_reference_ext2);
316: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Address_Ref');
317: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
318: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
319: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
321: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
322: EC_DEBUG.PL(3, 'p_reference_ext1: ',p_reference_ext1);
323: EC_DEBUG.PL(3, 'p_reference_ext2: ',p_reference_ext2);
324: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
317: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
318: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
319: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
321: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
322: EC_DEBUG.PL(3, 'p_reference_ext1: ',p_reference_ext1);
323: EC_DEBUG.PL(3, 'p_reference_ext2: ',p_reference_ext2);
324: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
325:
318: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
319: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
321: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
322: EC_DEBUG.PL(3, 'p_reference_ext1: ',p_reference_ext1);
323: EC_DEBUG.PL(3, 'p_reference_ext2: ',p_reference_ext2);
324: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
325:
326: -- Standard Start of API savepoint
319: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
321: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
322: EC_DEBUG.PL(3, 'p_reference_ext1: ',p_reference_ext1);
323: EC_DEBUG.PL(3, 'p_reference_ext2: ',p_reference_ext2);
324: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
325:
326: -- Standard Start of API savepoint
327:
320: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
321: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
322: EC_DEBUG.PL(3, 'p_reference_ext1: ',p_reference_ext1);
323: EC_DEBUG.PL(3, 'p_reference_ext2: ',p_reference_ext2);
324: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
325:
326: -- Standard Start of API savepoint
327:
328: SAVEPOINT Get_TP_Address_Ref_PVT;
357: for addr in ra_add
358: loop
359: l_entity_id := addr.cust_account_id;
360: l_entity_address_id := addr.cust_acct_site_id;
361: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
362: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
363: end loop;
364:
365: elsif (p_info_type = EC_Trading_Partner_PVT.G_SUPPLIER)
358: loop
359: l_entity_id := addr.cust_account_id;
360: l_entity_address_id := addr.cust_acct_site_id;
361: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
362: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
363: end loop;
364:
365: elsif (p_info_type = EC_Trading_Partner_PVT.G_SUPPLIER)
366: then
367: for site in po_site
368: loop
369: l_entity_id := site.vendor_id;
370: l_entity_address_id := site.vendor_site_id;
371: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
372: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
373: end loop;
374:
375: elsif (p_info_type = EC_Trading_Partner_PVT.G_BANK)
368: loop
369: l_entity_id := site.vendor_id;
370: l_entity_address_id := site.vendor_site_id;
371: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
372: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
373: end loop;
374:
375: elsif (p_info_type = EC_Trading_Partner_PVT.G_BANK)
376: then
377: for bank in ap_bank
378: loop
379: l_entity_id := -1;
380: l_entity_address_id := bank.branch_party_id;
381: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
382: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
383: end loop;
384: else
385: raise FND_API.G_EXC_UNEXPECTED_ERROR;
378: loop
379: l_entity_id := -1;
380: l_entity_address_id := bank.branch_party_id;
381: EC_DEBUG.PL(3, 'l_entity_id: ',l_entity_id);
382: EC_DEBUG.PL(3, 'l_entity_address_id: ',l_entity_address_id);
383: end loop;
384: else
385: raise FND_API.G_EXC_UNEXPECTED_ERROR;
386: end if;
432: p_count => p_msg_count,
433: p_data => p_msg_data
434: );
435:
436: EC_DEBUG.POP('EC_Trading_Partner_PVT.Get_TP_Address_Ref');
437: EXCEPTION
438:
439: WHEN FND_API.G_EXC_ERROR THEN
440:
459: );
460:
461: WHEN OTHERS THEN
462:
463: EC_DEBUG.PL(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
464: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
465: Rollback to Get_TP_Address_Ref_PVT;
466: p_return_status := FND_API.G_RET_STS_ERROR;
467:
460:
461: WHEN OTHERS THEN
462:
463: EC_DEBUG.PL(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
464: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
465: Rollback to Get_TP_Address_Ref_PVT;
466: p_return_status := FND_API.G_RET_STS_ERROR;
467:
468: if FND_MSG_PUB.Check_Msg_Level( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
544: and hcp.contact_point_type = 'EDI';
545:
546: BEGIN
547:
548: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Location_Code');
549: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
550: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
551: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
552: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
545:
546: BEGIN
547:
548: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Location_Code');
549: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
550: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
551: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
552: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
553: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
546: BEGIN
547:
548: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Location_Code');
549: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
550: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
551: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
552: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
553: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
554: EC_DEBUG.PL(3, 'p_entity_address_id: ',p_entity_address_id);
547:
548: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Location_Code');
549: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
550: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
551: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
552: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
553: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
554: EC_DEBUG.PL(3, 'p_entity_address_id: ',p_entity_address_id);
555: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
548: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.Get_TP_Location_Code');
549: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
550: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
551: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
552: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
553: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
554: EC_DEBUG.PL(3, 'p_entity_address_id: ',p_entity_address_id);
555: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
556: -- Standard Start of API savepoint
549: EC_DEBUG.PL(3, 'API version : ',p_api_version_number);
550: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
551: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
552: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
553: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
554: EC_DEBUG.PL(3, 'p_entity_address_id: ',p_entity_address_id);
555: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
556: -- Standard Start of API savepoint
557:
550: EC_DEBUG.PL(3, 'p_init_msg_list: ',p_init_msg_list);
551: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
552: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
553: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
554: EC_DEBUG.PL(3, 'p_entity_address_id: ',p_entity_address_id);
555: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
556: -- Standard Start of API savepoint
557:
558: SAVEPOINT Get_TP_Location_Code_PVT;
551: EC_DEBUG.PL(3, 'p_simulate: ',p_simulate);
552: EC_DEBUG.PL(3, 'p_commit: ',p_commit);
553: EC_DEBUG.PL(3, 'p_validation_level: ',p_validation_level);
554: EC_DEBUG.PL(3, 'p_entity_address_id: ',p_entity_address_id);
555: EC_DEBUG.PL(3, 'p_info_type: ',p_info_type);
556: -- Standard Start of API savepoint
557:
558: SAVEPOINT Get_TP_Location_Code_PVT;
559:
587: for addr in ra_add loop
588: l_location_code_ext := addr.ece_tp_location_code;
589: p_reference_ext1 := addr.tp_reference_ext1;
590: p_reference_ext2 := addr.tp_reference_ext2;
591: EC_DEBUG.PL(3, 'l_location_code_ext: ',l_location_code_ext);
592: EC_DEBUG.PL(3, 'addr.tp_reference_ext1',addr.tp_reference_ext1);
593: EC_DEBUG.PL(3, 'addr.tp_reference_ext2',addr.tp_reference_ext2);
594: end loop;
595:
588: l_location_code_ext := addr.ece_tp_location_code;
589: p_reference_ext1 := addr.tp_reference_ext1;
590: p_reference_ext2 := addr.tp_reference_ext2;
591: EC_DEBUG.PL(3, 'l_location_code_ext: ',l_location_code_ext);
592: EC_DEBUG.PL(3, 'addr.tp_reference_ext1',addr.tp_reference_ext1);
593: EC_DEBUG.PL(3, 'addr.tp_reference_ext2',addr.tp_reference_ext2);
594: end loop;
595:
596:
589: p_reference_ext1 := addr.tp_reference_ext1;
590: p_reference_ext2 := addr.tp_reference_ext2;
591: EC_DEBUG.PL(3, 'l_location_code_ext: ',l_location_code_ext);
592: EC_DEBUG.PL(3, 'addr.tp_reference_ext1',addr.tp_reference_ext1);
593: EC_DEBUG.PL(3, 'addr.tp_reference_ext2',addr.tp_reference_ext2);
594: end loop;
595:
596:
597: elsif (p_info_type = EC_Trading_Partner_PVT.G_SUPPLIER)
599: for site in po_site loop
600: l_location_code_ext := site.ece_tp_location_code;
601: p_reference_ext1 := site.tp_reference_ext1;
602: p_reference_ext2 := site.tp_reference_ext2;
603: EC_DEBUG.PL(3, 'site.tp_reference_ext1',site.tp_reference_ext1);
604: EC_DEBUG.PL(3, 'site.tp_reference_ext2',site.tp_reference_ext2);
605: end loop;
606:
607: elsif (p_info_type = EC_Trading_Partner_PVT.G_BANK)
600: l_location_code_ext := site.ece_tp_location_code;
601: p_reference_ext1 := site.tp_reference_ext1;
602: p_reference_ext2 := site.tp_reference_ext2;
603: EC_DEBUG.PL(3, 'site.tp_reference_ext1',site.tp_reference_ext1);
604: EC_DEBUG.PL(3, 'site.tp_reference_ext2',site.tp_reference_ext2);
605: end loop;
606:
607: elsif (p_info_type = EC_Trading_Partner_PVT.G_BANK)
608: then
609: for bank in ap_bank loop
610: l_location_code_ext := bank.edi_ece_tp_location_code;
611: p_reference_ext1 := bank.tp_reference_ext1;
612: p_reference_ext2 := bank.tp_reference_ext2;
613: EC_DEBUG.PL(3, 'bank.tp_reference_ext1',bank.tp_reference_ext1);
614: EC_DEBUG.PL(3, 'bank.tp_reference_ext2',bank.tp_reference_ext2);
615: end loop;
616: else
617: raise FND_API.G_EXC_UNEXPECTED_ERROR;
610: l_location_code_ext := bank.edi_ece_tp_location_code;
611: p_reference_ext1 := bank.tp_reference_ext1;
612: p_reference_ext2 := bank.tp_reference_ext2;
613: EC_DEBUG.PL(3, 'bank.tp_reference_ext1',bank.tp_reference_ext1);
614: EC_DEBUG.PL(3, 'bank.tp_reference_ext2',bank.tp_reference_ext2);
615: end loop;
616: else
617: raise FND_API.G_EXC_UNEXPECTED_ERROR;
618: end if;
621: then
622: p_return_status := EC_Trading_Partner_PVT.G_TP_NOT_FOUND;
623: fnd_message.set_name('EC','ECE_TP_NOT_FOUND');
624: p_msg_data := fnd_message.get;
625: EC_DEBUG.PL(3, 'p_msg_data',p_msg_data);
626: else
627: p_location_code_ext := l_location_code_ext;
628: EC_DEBUG.PL(3, 'l_location_code_ext',l_location_code_ext);
629: end if;
624: p_msg_data := fnd_message.get;
625: EC_DEBUG.PL(3, 'p_msg_data',p_msg_data);
626: else
627: p_location_code_ext := l_location_code_ext;
628: EC_DEBUG.PL(3, 'l_location_code_ext',l_location_code_ext);
629: end if;
630:
631: -- Both G_EXC_ERROR and G_EXC_UNEXPECTED_ERROR are handled in
632: -- the API exception handler.
664: p_count => p_msg_count,
665: p_data => p_msg_data
666: );
667:
668: EC_DEBUG.POP('EC_Trading_Partner_PVT.Get_TP_Location_Code');
669: EXCEPTION
670:
671: WHEN FND_API.G_EXC_ERROR THEN
672:
690: p_data => p_msg_data
691: );
692:
693: WHEN OTHERS THEN
694: EC_DEBUG.PL(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
695: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
696:
697: Rollback to Get_TP_Location_Code_PVT;
698: p_return_status := FND_API.G_RET_STS_ERROR;
691: );
692:
693: WHEN OTHERS THEN
694: EC_DEBUG.PL(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
695: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
696:
697: Rollback to Get_TP_Location_Code_PVT;
698: p_return_status := FND_API.G_RET_STS_ERROR;
699:
775: and hrl.location_id = p_entity_id;
776:
777: BEGIN
778:
779: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.IS_ENTITY_ENABLED');
780: EC_DEBUG.PL(3, 'p_transaction_type: ',p_transaction_type);
781: EC_DEBUG.PL(3, 'p_transaction_subtype: ',p_transaction_subtype);
782: EC_DEBUG.PL(3, 'p_entity_type: ',p_entity_type);
783: EC_DEBUG.PL(3, 'p_entity_id: ',p_entity_id);
776:
777: BEGIN
778:
779: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.IS_ENTITY_ENABLED');
780: EC_DEBUG.PL(3, 'p_transaction_type: ',p_transaction_type);
781: EC_DEBUG.PL(3, 'p_transaction_subtype: ',p_transaction_subtype);
782: EC_DEBUG.PL(3, 'p_entity_type: ',p_entity_type);
783: EC_DEBUG.PL(3, 'p_entity_id: ',p_entity_id);
784:
777: BEGIN
778:
779: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.IS_ENTITY_ENABLED');
780: EC_DEBUG.PL(3, 'p_transaction_type: ',p_transaction_type);
781: EC_DEBUG.PL(3, 'p_transaction_subtype: ',p_transaction_subtype);
782: EC_DEBUG.PL(3, 'p_entity_type: ',p_entity_type);
783: EC_DEBUG.PL(3, 'p_entity_id: ',p_entity_id);
784:
785: SAVEPOINT Get_TP_Location_Code_PVT;
778:
779: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.IS_ENTITY_ENABLED');
780: EC_DEBUG.PL(3, 'p_transaction_type: ',p_transaction_type);
781: EC_DEBUG.PL(3, 'p_transaction_subtype: ',p_transaction_subtype);
782: EC_DEBUG.PL(3, 'p_entity_type: ',p_entity_type);
783: EC_DEBUG.PL(3, 'p_entity_id: ',p_entity_id);
784:
785: SAVEPOINT Get_TP_Location_Code_PVT;
786:
779: EC_DEBUG.PUSH('EC_Trading_Partner_PVT.IS_ENTITY_ENABLED');
780: EC_DEBUG.PL(3, 'p_transaction_type: ',p_transaction_type);
781: EC_DEBUG.PL(3, 'p_transaction_subtype: ',p_transaction_subtype);
782: EC_DEBUG.PL(3, 'p_entity_type: ',p_entity_type);
783: EC_DEBUG.PL(3, 'p_entity_id: ',p_entity_id);
784:
785: SAVEPOINT Get_TP_Location_Code_PVT;
786:
787: -- Standard call to check for call compatibility.
812: if ( p_entity_type = EC_Trading_Partner_PVT.G_CUSTOMER)
813: then
814: for addr in type_customer loop
815: x_tp_detail_id := addr.tp_detail_id;
816: EC_DEBUG.PL(3, 'x_tp_detail_id: ',x_tp_detail_id);
817: end loop;
818: elsif (p_entity_type = EC_Trading_Partner_PVT.G_SUPPLIER)
819: then
820: for addr in type_supplier loop
818: elsif (p_entity_type = EC_Trading_Partner_PVT.G_SUPPLIER)
819: then
820: for addr in type_supplier loop
821: x_tp_detail_id := addr.tp_detail_id;
822: EC_DEBUG.PL(3, 'x_tp_detail_id: ',x_tp_detail_id);
823: end loop;
824: elsif (p_entity_type = EC_Trading_Partner_PVT.G_BANK)
825: then
826: for addr in type_bank loop
824: elsif (p_entity_type = EC_Trading_Partner_PVT.G_BANK)
825: then
826: for addr in type_bank loop
827: x_tp_detail_id := addr.tp_detail_id;
828: EC_DEBUG.PL(3, 'x_tp_detail_id: ',x_tp_detail_id);
829: end loop;
830: elsif (p_entity_type = EC_Trading_Partner_PVT.G_LOCATION)
831: then
832: for addr in type_location loop
830: elsif (p_entity_type = EC_Trading_Partner_PVT.G_LOCATION)
831: then
832: for addr in type_location loop
833: x_tp_detail_id := addr.tp_detail_id;
834: EC_DEBUG.PL(3, 'x_tp_detail_id: ',x_tp_detail_id);
835: end loop;
836: else
837: raise FND_API.G_EXC_UNEXPECTED_ERROR;
838: end if;
861: p_count => p_msg_count,
862: p_data => p_msg_data
863: );
864:
865: EC_DEBUG.POP('EC_Trading_Partner_PVT.IS_ENTITY_ENABLED');
866: EXCEPTION
867: WHEN FND_API.G_EXC_ERROR THEN
868:
869: Rollback to Get_TP_Location_Code_PVT;
886: p_data => p_msg_data
887: );
888:
889: WHEN OTHERS THEN
890: EC_DEBUG.PL(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
891: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
892:
893: Rollback to Get_TP_Location_Code_PVT;
894: p_return_status := FND_API.G_RET_STS_ERROR;
887: );
888:
889: WHEN OTHERS THEN
890: EC_DEBUG.PL(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
891: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
892:
893: Rollback to Get_TP_Location_Code_PVT;
894: p_return_status := FND_API.G_RET_STS_ERROR;
895: