84: l_loc_id NUMBER;
85:
86: BEGIN
87:
88: --IBE_UTIL.enable_debug();
89:
90: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
91: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.create_address');
92: END IF;
86: BEGIN
87:
88: --IBE_UTIL.enable_debug();
89:
90: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
91: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.create_address');
92: END IF;
93:
94: -- standard start of API savepoint
87:
88: --IBE_UTIL.enable_debug();
89:
90: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
91: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.create_address');
92: END IF;
93:
94: -- standard start of API savepoint
95: SAVEPOINT create_address_pvt;
162: p_count => x_msg_count,
163: p_data => x_msg_data
164: );
165:
166: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
167: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.create_address');
168: END IF;
169:
170: --IBE_UTIL.disable_debug();
163: p_data => x_msg_data
164: );
165:
166: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
167: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.create_address');
168: END IF;
169:
170: --IBE_UTIL.disable_debug();
171:
166: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
167: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.create_address');
168: END IF;
169:
170: --IBE_UTIL.disable_debug();
171:
172: EXCEPTION
173: WHEN FND_API.G_EXC_ERROR THEN
174: --IBE_UTIL.enable_debug();
170: --IBE_UTIL.disable_debug();
171:
172: EXCEPTION
173: WHEN FND_API.G_EXC_ERROR THEN
174: --IBE_UTIL.enable_debug();
175:
176: ROLLBACK TO create_address_pvt;
177: x_return_status := FND_API.G_RET_STS_ERROR;
178: FND_MSG_PUB.count_and_get(
179: p_encoded => FND_API.G_FALSE,
180: p_count => x_msg_count,
181: p_data => x_msg_data
182: );
183: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
184: IBE_UTIL.debug('G_EXC_ERROR exception');
185: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
186: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
187: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
180: p_count => x_msg_count,
181: p_data => x_msg_data
182: );
183: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
184: IBE_UTIL.debug('G_EXC_ERROR exception');
185: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
186: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
187: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
188: IBE_UTIL.debug('error text : '|| SQLERRM);
181: p_data => x_msg_data
182: );
183: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
184: IBE_UTIL.debug('G_EXC_ERROR exception');
185: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
186: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
187: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
188: IBE_UTIL.debug('error text : '|| SQLERRM);
189: END IF;
182: );
183: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
184: IBE_UTIL.debug('G_EXC_ERROR exception');
185: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
186: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
187: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
188: IBE_UTIL.debug('error text : '|| SQLERRM);
189: END IF;
190:
183: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
184: IBE_UTIL.debug('G_EXC_ERROR exception');
185: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
186: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
187: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
188: IBE_UTIL.debug('error text : '|| SQLERRM);
189: END IF;
190:
191: --IBE_UTIL.disable_debug();
184: IBE_UTIL.debug('G_EXC_ERROR exception');
185: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
186: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
187: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
188: IBE_UTIL.debug('error text : '|| SQLERRM);
189: END IF;
190:
191: --IBE_UTIL.disable_debug();
192:
187: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
188: IBE_UTIL.debug('error text : '|| SQLERRM);
189: END IF;
190:
191: --IBE_UTIL.disable_debug();
192:
193: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
194: --IBE_UTIL.enable_debug();
195:
190:
191: --IBE_UTIL.disable_debug();
192:
193: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
194: --IBE_UTIL.enable_debug();
195:
196: ROLLBACK TO create_address_pvt;
197: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
198: FND_MSG_PUB.count_and_get(
199: p_encoded => FND_API.G_FALSE,
200: p_count => x_msg_count,
201: p_data => x_msg_data
202: );
203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
204: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
205: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
206: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
207: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
200: p_count => x_msg_count,
201: p_data => x_msg_data
202: );
203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
204: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
205: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
206: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
207: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
208: IBE_UTIL.debug('error text : '|| SQLERRM);
201: p_data => x_msg_data
202: );
203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
204: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
205: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
206: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
207: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
208: IBE_UTIL.debug('error text : '|| SQLERRM);
209: END IF;
202: );
203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
204: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
205: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
206: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
207: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
208: IBE_UTIL.debug('error text : '|| SQLERRM);
209: END IF;
210:
203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
204: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
205: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
206: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
207: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
208: IBE_UTIL.debug('error text : '|| SQLERRM);
209: END IF;
210:
211: --IBE_UTIL.disable_debug();
204: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
205: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
206: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
207: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
208: IBE_UTIL.debug('error text : '|| SQLERRM);
209: END IF;
210:
211: --IBE_UTIL.disable_debug();
212:
207: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
208: IBE_UTIL.debug('error text : '|| SQLERRM);
209: END IF;
210:
211: --IBE_UTIL.disable_debug();
212:
213: WHEN OTHERS THEN
214: --IBE_UTIL.enable_debug();
215:
210:
211: --IBE_UTIL.disable_debug();
212:
213: WHEN OTHERS THEN
214: --IBE_UTIL.enable_debug();
215:
216: ROLLBACK TO create_address_pvt;
217: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
218: FND_MSG_PUB.count_and_get(
219: p_encoded => FND_API.G_FALSE,
220: p_count => x_msg_count,
221: p_data => x_msg_data
222: );
223: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
224: IBE_UTIL.debug('OTHER exception');
225: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
226: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
227: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
220: p_count => x_msg_count,
221: p_data => x_msg_data
222: );
223: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
224: IBE_UTIL.debug('OTHER exception');
225: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
226: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
227: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
228: IBE_UTIL.debug('error text : '|| SQLERRM);
221: p_data => x_msg_data
222: );
223: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
224: IBE_UTIL.debug('OTHER exception');
225: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
226: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
227: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
228: IBE_UTIL.debug('error text : '|| SQLERRM);
229: END IF;
222: );
223: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
224: IBE_UTIL.debug('OTHER exception');
225: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
226: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
227: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
228: IBE_UTIL.debug('error text : '|| SQLERRM);
229: END IF;
230:
223: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
224: IBE_UTIL.debug('OTHER exception');
225: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
226: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
227: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
228: IBE_UTIL.debug('error text : '|| SQLERRM);
229: END IF;
230:
231: --IBE_UTIL.disable_debug();
224: IBE_UTIL.debug('OTHER exception');
225: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
226: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
227: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
228: IBE_UTIL.debug('error text : '|| SQLERRM);
229: END IF;
230:
231: --IBE_UTIL.disable_debug();
232: END;
227: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
228: IBE_UTIL.debug('error text : '|| SQLERRM);
229: END IF;
230:
231: --IBE_UTIL.disable_debug();
232: END;
233:
234: PROCEDURE update_address(
235: p_api_version IN NUMBER,
280: where location_id = l_location_id;
281:
282: BEGIN
283:
284: --IBE_UTIL.enable_debug();
285:
286: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
287: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.update_address');
288: END IF;
282: BEGIN
283:
284: --IBE_UTIL.enable_debug();
285:
286: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
287: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.update_address');
288: END IF;
289:
290: -- standard start of API savepoint
283:
284: --IBE_UTIL.enable_debug();
285:
286: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
287: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.update_address');
288: END IF;
289:
290: -- standard start of API savepoint
291: SAVEPOINT update_address_pvt;
333: --
334: -- Do nothing
335: --
336:
337: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
338: IBE_UTIL.debug('no need to update anything');
339: END IF;
340:
341: ELSIF l_loc_changed = false then
334: -- Do nothing
335: --
336:
337: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
338: IBE_UTIL.debug('no need to update anything');
339: END IF;
340:
341: ELSIF l_loc_changed = false then
342:
339: END IF;
340:
341: ELSIF l_loc_changed = false then
342:
343: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
344: IBE_UTIL.debug('party_site update status: ' || x_return_status);
345: END IF;
346:
347: --
340:
341: ELSIF l_loc_changed = false then
342:
343: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
344: IBE_UTIL.debug('party_site update status: ' || x_return_status);
345: END IF;
346:
347: --
348: -- Update party_site if it's changed
479: end if;
480:
481: ELSIF l_loc_changed = true and l_ps_changed = false THEN
482:
483: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
484: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.update_address, location changed but no PS change');
485: END IF;
486:
487: Open c_get_location_ovn(p_location.location_id);
480:
481: ELSIF l_loc_changed = true and l_ps_changed = false THEN
482:
483: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
484: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.update_address, location changed but no PS change');
485: END IF;
486:
487: Open c_get_location_ovn(p_location.location_id);
488: FETCH c_get_location_ovn INTO l_loc_object_version_number;
633: --
634: -- delete an existing party site
635: --
636:
637: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
638: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.delete_address(+)');
639: END IF;
640:
641: do_delete_address(
634: -- delete an existing party site
635: --
636:
637: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
638: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.delete_address(+)');
639: END IF;
640:
641: do_delete_address(
642: p_api_version,
657: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
658: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
659: END IF;
660:
661: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
662: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.delete_address(-)');
663: IBE_UTIL.debug('party_site_id: ' || to_char(p_party_site_id) || ' deleted');
664: END IF;
665:
658: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
659: END IF;
660:
661: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
662: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.delete_address(-)');
663: IBE_UTIL.debug('party_site_id: ' || to_char(p_party_site_id) || ' deleted');
664: END IF;
665:
666:
659: END IF;
660:
661: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
662: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.delete_address(-)');
663: IBE_UTIL.debug('party_site_id: ' || to_char(p_party_site_id) || ' deleted');
664: END IF;
665:
666:
667: --
667: --
668: -- create a new location and party site
669: --
670:
671: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
672: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_create_address(+)');
673: END IF;
674: if l_chk_ps.created_by_module is NULL then
675: l_chk_ps.created_by_module := 'USER MANAGEMENT';
668: -- create a new location and party site
669: --
670:
671: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
672: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_create_address(+)');
673: END IF;
674: if l_chk_ps.created_by_module is NULL then
675: l_chk_ps.created_by_module := 'USER MANAGEMENT';
676: end if;
696: x_location_id,
697: x_party_site_id
698: );
699:
700: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
701: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_create_address(-)');
702: IBE_UTIL.debug('location_id = ' || to_char(x_location_id));
703: IBE_UTIL.debug('party_site_id = ' || to_char(x_party_site_id));
704: END IF;
697: x_party_site_id
698: );
699:
700: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
701: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_create_address(-)');
702: IBE_UTIL.debug('location_id = ' || to_char(x_location_id));
703: IBE_UTIL.debug('party_site_id = ' || to_char(x_party_site_id));
704: END IF;
705:
698: );
699:
700: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
701: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_create_address(-)');
702: IBE_UTIL.debug('location_id = ' || to_char(x_location_id));
703: IBE_UTIL.debug('party_site_id = ' || to_char(x_party_site_id));
704: END IF;
705:
706: --
699:
700: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
701: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_create_address(-)');
702: IBE_UTIL.debug('location_id = ' || to_char(x_location_id));
703: IBE_UTIL.debug('party_site_id = ' || to_char(x_party_site_id));
704: END IF;
705:
706: --
707: -- Update one click setting with new party site id
737: p_count => x_msg_count,
738: p_data => x_msg_data
739: );
740:
741: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
742: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.update_address');
743: END IF;
744:
745: --IBE_UTIL.disable_debug();
738: p_data => x_msg_data
739: );
740:
741: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
742: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.update_address');
743: END IF;
744:
745: --IBE_UTIL.disable_debug();
746:
741: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
742: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.update_address');
743: END IF;
744:
745: --IBE_UTIL.disable_debug();
746:
747: EXCEPTION
748: WHEN FND_API.G_EXC_ERROR THEN
749: --IBE_UTIL.enable_debug();
745: --IBE_UTIL.disable_debug();
746:
747: EXCEPTION
748: WHEN FND_API.G_EXC_ERROR THEN
749: --IBE_UTIL.enable_debug();
750:
751: ROLLBACK TO update_address_pvt;
752: x_return_status := FND_API.G_RET_STS_ERROR;
753: FND_MSG_PUB.count_and_get(
754: p_encoded => FND_API.G_FALSE,
755: p_count => x_msg_count,
756: p_data => x_msg_data
757: );
758: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
759: IBE_UTIL.debug('G_EXC_ERROR exception');
760: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
761: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
762: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
755: p_count => x_msg_count,
756: p_data => x_msg_data
757: );
758: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
759: IBE_UTIL.debug('G_EXC_ERROR exception');
760: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
761: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
762: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
763: IBE_UTIL.debug('error text : '|| SQLERRM);
756: p_data => x_msg_data
757: );
758: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
759: IBE_UTIL.debug('G_EXC_ERROR exception');
760: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
761: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
762: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
763: IBE_UTIL.debug('error text : '|| SQLERRM);
764: END IF;
757: );
758: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
759: IBE_UTIL.debug('G_EXC_ERROR exception');
760: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
761: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
762: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
763: IBE_UTIL.debug('error text : '|| SQLERRM);
764: END IF;
765:
758: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
759: IBE_UTIL.debug('G_EXC_ERROR exception');
760: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
761: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
762: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
763: IBE_UTIL.debug('error text : '|| SQLERRM);
764: END IF;
765:
766: --IBE_UTIL.disable_debug();
759: IBE_UTIL.debug('G_EXC_ERROR exception');
760: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
761: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
762: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
763: IBE_UTIL.debug('error text : '|| SQLERRM);
764: END IF;
765:
766: --IBE_UTIL.disable_debug();
767:
762: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
763: IBE_UTIL.debug('error text : '|| SQLERRM);
764: END IF;
765:
766: --IBE_UTIL.disable_debug();
767:
768: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
769: --IBE_UTIL.enable_debug();
770:
765:
766: --IBE_UTIL.disable_debug();
767:
768: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
769: --IBE_UTIL.enable_debug();
770:
771: ROLLBACK TO update_address_pvt;
772: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
773: FND_MSG_PUB.count_and_get(
774: p_encoded => FND_API.G_FALSE,
775: p_count => x_msg_count,
776: p_data => x_msg_data
777: );
778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
779: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
780: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
781: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
782: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
775: p_count => x_msg_count,
776: p_data => x_msg_data
777: );
778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
779: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
780: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
781: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
782: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
783: IBE_UTIL.debug('error text : '|| SQLERRM);
776: p_data => x_msg_data
777: );
778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
779: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
780: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
781: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
782: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
783: IBE_UTIL.debug('error text : '|| SQLERRM);
784: END IF;
777: );
778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
779: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
780: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
781: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
782: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
783: IBE_UTIL.debug('error text : '|| SQLERRM);
784: END IF;
785:
778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
779: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
780: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
781: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
782: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
783: IBE_UTIL.debug('error text : '|| SQLERRM);
784: END IF;
785:
786: --IBE_UTIL.disable_debug();
779: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
780: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
781: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
782: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
783: IBE_UTIL.debug('error text : '|| SQLERRM);
784: END IF;
785:
786: --IBE_UTIL.disable_debug();
787:
782: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
783: IBE_UTIL.debug('error text : '|| SQLERRM);
784: END IF;
785:
786: --IBE_UTIL.disable_debug();
787:
788: WHEN OTHERS THEN
789: --IBE_UTIL.enable_debug();
790:
785:
786: --IBE_UTIL.disable_debug();
787:
788: WHEN OTHERS THEN
789: --IBE_UTIL.enable_debug();
790:
791: ROLLBACK TO update_address_pvt;
792: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
793: FND_MSG_PUB.count_and_get(
794: p_encoded => FND_API.G_FALSE,
795: p_count => x_msg_count,
796: p_data => x_msg_data
797: );
798: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
799: IBE_UTIL.debug('OTHER exception');
800: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
801: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
802: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
795: p_count => x_msg_count,
796: p_data => x_msg_data
797: );
798: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
799: IBE_UTIL.debug('OTHER exception');
800: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
801: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
802: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
803: IBE_UTIL.debug('error text : '|| SQLERRM);
796: p_data => x_msg_data
797: );
798: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
799: IBE_UTIL.debug('OTHER exception');
800: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
801: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
802: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
803: IBE_UTIL.debug('error text : '|| SQLERRM);
804: END IF;
797: );
798: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
799: IBE_UTIL.debug('OTHER exception');
800: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
801: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
802: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
803: IBE_UTIL.debug('error text : '|| SQLERRM);
804: END IF;
805:
798: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
799: IBE_UTIL.debug('OTHER exception');
800: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
801: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
802: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
803: IBE_UTIL.debug('error text : '|| SQLERRM);
804: END IF;
805:
806: --IBE_UTIL.disable_debug();
799: IBE_UTIL.debug('OTHER exception');
800: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
801: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
802: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
803: IBE_UTIL.debug('error text : '|| SQLERRM);
804: END IF;
805:
806: --IBE_UTIL.disable_debug();
807: END;
802: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
803: IBE_UTIL.debug('error text : '|| SQLERRM);
804: END IF;
805:
806: --IBE_UTIL.disable_debug();
807: END;
808:
809:
810: PROCEDURE delete_address(
829: l_ship_object_version_number NUMBER := p_ship_object_version_number;
830:
831: BEGIN
832:
833: --IBE_UTIL.enable_debug();
834:
835: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
836: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.delete_address');
837: END IF;
831: BEGIN
832:
833: --IBE_UTIL.enable_debug();
834:
835: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
836: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.delete_address');
837: END IF;
838:
839: -- standard start of API savepoint
832:
833: --IBE_UTIL.enable_debug();
834:
835: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
836: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.delete_address');
837: END IF;
838:
839: -- standard start of API savepoint
840: SAVEPOINT delete_address_pvt;
856: --
857: -- delete the address
858: --
859:
860: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
861: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.delete_address(+)');
862: END IF;
863:
864: do_delete_address(
857: -- delete the address
858: --
859:
860: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
861: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.delete_address(+)');
862: END IF;
863:
864: do_delete_address(
865: p_api_version,
880: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
881: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
882: END IF;
883:
884: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
885: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_delete_address(-)');
886: IBE_UTIL.debug('party_site_id: ' || to_char(p_party_site_id) || ' deleted');
887: END IF;
888:
881: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
882: END IF;
883:
884: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
885: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_delete_address(-)');
886: IBE_UTIL.debug('party_site_id: ' || to_char(p_party_site_id) || ' deleted');
887: END IF;
888:
889:
882: END IF;
883:
884: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
885: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.do_delete_address(-)');
886: IBE_UTIL.debug('party_site_id: ' || to_char(p_party_site_id) || ' deleted');
887: END IF;
888:
889:
890: --
922: p_count => x_msg_count,
923: p_data => x_msg_data
924: );
925:
926: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
927: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.delete_address');
928: END IF;
929:
930: --IBE_UTIL.disable_debug();
923: p_data => x_msg_data
924: );
925:
926: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
927: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.delete_address');
928: END IF;
929:
930: --IBE_UTIL.disable_debug();
931:
926: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
927: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.delete_address');
928: END IF;
929:
930: --IBE_UTIL.disable_debug();
931:
932: EXCEPTION
933: WHEN FND_API.G_EXC_ERROR THEN
934: --IBE_UTIL.enable_debug();
930: --IBE_UTIL.disable_debug();
931:
932: EXCEPTION
933: WHEN FND_API.G_EXC_ERROR THEN
934: --IBE_UTIL.enable_debug();
935:
936: ROLLBACK TO delete_address_pvt;
937: x_return_status := FND_API.G_RET_STS_ERROR;
938: FND_MSG_PUB.count_and_get(
939: p_encoded => FND_API.G_FALSE,
940: p_count => x_msg_count,
941: p_data => x_msg_data
942: );
943: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
944: IBE_UTIL.debug('G_EXC_ERROR exception');
945: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
946: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
947: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
940: p_count => x_msg_count,
941: p_data => x_msg_data
942: );
943: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
944: IBE_UTIL.debug('G_EXC_ERROR exception');
945: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
946: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
947: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
948: IBE_UTIL.debug('error text : '|| SQLERRM);
941: p_data => x_msg_data
942: );
943: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
944: IBE_UTIL.debug('G_EXC_ERROR exception');
945: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
946: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
947: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
948: IBE_UTIL.debug('error text : '|| SQLERRM);
949: END IF;
942: );
943: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
944: IBE_UTIL.debug('G_EXC_ERROR exception');
945: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
946: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
947: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
948: IBE_UTIL.debug('error text : '|| SQLERRM);
949: END IF;
950:
943: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
944: IBE_UTIL.debug('G_EXC_ERROR exception');
945: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
946: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
947: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
948: IBE_UTIL.debug('error text : '|| SQLERRM);
949: END IF;
950:
951: --IBE_UTIL.disable_debug();
944: IBE_UTIL.debug('G_EXC_ERROR exception');
945: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
946: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
947: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
948: IBE_UTIL.debug('error text : '|| SQLERRM);
949: END IF;
950:
951: --IBE_UTIL.disable_debug();
952:
947: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
948: IBE_UTIL.debug('error text : '|| SQLERRM);
949: END IF;
950:
951: --IBE_UTIL.disable_debug();
952:
953: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
954: --IBE_UTIL.enable_debug();
955:
950:
951: --IBE_UTIL.disable_debug();
952:
953: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
954: --IBE_UTIL.enable_debug();
955:
956: ROLLBACK TO delete_address_pvt;
957: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
958: FND_MSG_PUB.count_and_get(
959: p_encoded => FND_API.G_FALSE,
960: p_count => x_msg_count,
961: p_data => x_msg_data
962: );
963: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
964: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
965: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
966: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
967: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
960: p_count => x_msg_count,
961: p_data => x_msg_data
962: );
963: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
964: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
965: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
966: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
967: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
968: IBE_UTIL.debug('error text : '|| SQLERRM);
961: p_data => x_msg_data
962: );
963: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
964: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
965: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
966: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
967: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
968: IBE_UTIL.debug('error text : '|| SQLERRM);
969: END IF;
962: );
963: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
964: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
965: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
966: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
967: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
968: IBE_UTIL.debug('error text : '|| SQLERRM);
969: END IF;
970:
963: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
964: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
965: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
966: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
967: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
968: IBE_UTIL.debug('error text : '|| SQLERRM);
969: END IF;
970:
971: --IBE_UTIL.disable_debug();
964: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
965: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
966: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
967: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
968: IBE_UTIL.debug('error text : '|| SQLERRM);
969: END IF;
970:
971: --IBE_UTIL.disable_debug();
972:
967: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
968: IBE_UTIL.debug('error text : '|| SQLERRM);
969: END IF;
970:
971: --IBE_UTIL.disable_debug();
972:
973: WHEN OTHERS THEN
974: --IBE_UTIL.enable_debug();
975:
970:
971: --IBE_UTIL.disable_debug();
972:
973: WHEN OTHERS THEN
974: --IBE_UTIL.enable_debug();
975:
976: ROLLBACK TO delete_address_pvt;
977: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
978: FND_MSG_PUB.count_and_get(
979: p_encoded => FND_API.G_FALSE,
980: p_count => x_msg_count,
981: p_data => x_msg_data
982: );
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.debug('OTHER exception');
985: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
986: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
987: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
980: p_count => x_msg_count,
981: p_data => x_msg_data
982: );
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.debug('OTHER exception');
985: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
986: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
987: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
988: IBE_UTIL.debug('error text : '|| SQLERRM);
981: p_data => x_msg_data
982: );
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.debug('OTHER exception');
985: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
986: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
987: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
988: IBE_UTIL.debug('error text : '|| SQLERRM);
989: END IF;
982: );
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.debug('OTHER exception');
985: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
986: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
987: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
988: IBE_UTIL.debug('error text : '|| SQLERRM);
989: END IF;
990:
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.debug('OTHER exception');
985: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
986: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
987: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
988: IBE_UTIL.debug('error text : '|| SQLERRM);
989: END IF;
990:
991: --IBE_UTIL.disable_debug();
984: IBE_UTIL.debug('OTHER exception');
985: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
986: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
987: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
988: IBE_UTIL.debug('error text : '|| SQLERRM);
989: END IF;
990:
991: --IBE_UTIL.disable_debug();
992:
987: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
988: IBE_UTIL.debug('error text : '|| SQLERRM);
989: END IF;
990:
991: --IBE_UTIL.disable_debug();
992:
993: END;
994:
995: PROCEDURE set_address_usage(
1027: WHERE rownum = 1;
1028:
1029: BEGIN
1030:
1031: --IBE_UTIL.enable_debug();
1032:
1033: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1034: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.set_primary_address');
1035: END IF;
1029: BEGIN
1030:
1031: --IBE_UTIL.enable_debug();
1032:
1033: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1034: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.set_primary_address');
1035: END IF;
1036:
1037: -- standard start of API savepoint
1030:
1031: --IBE_UTIL.enable_debug();
1032:
1033: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1034: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.set_primary_address');
1035: END IF;
1036:
1037: -- standard start of API savepoint
1038: SAVEPOINT set_address__usage_pvt;
1130: p_count => x_msg_count,
1131: p_data => x_msg_data
1132: );
1133:
1134: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1135: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.set_primary_address');
1136: END IF;
1137:
1138: --IBE_UTIL.disable_debug();
1131: p_data => x_msg_data
1132: );
1133:
1134: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1135: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.set_primary_address');
1136: END IF;
1137:
1138: --IBE_UTIL.disable_debug();
1139:
1134: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1135: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.set_primary_address');
1136: END IF;
1137:
1138: --IBE_UTIL.disable_debug();
1139:
1140: EXCEPTION
1141: WHEN FND_API.G_EXC_ERROR THEN
1142: --IBE_UTIL.enable_debug();
1138: --IBE_UTIL.disable_debug();
1139:
1140: EXCEPTION
1141: WHEN FND_API.G_EXC_ERROR THEN
1142: --IBE_UTIL.enable_debug();
1143:
1144: ROLLBACK TO set_address__usage_pvt;
1145: x_return_status := FND_API.G_RET_STS_ERROR;
1146: FND_MSG_PUB.count_and_get(
1147: p_encoded => FND_API.G_FALSE,
1148: p_count => x_msg_count,
1149: p_data => x_msg_data
1150: );
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.debug('G_EXC_ERROR exception');
1153: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1154: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1155: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1148: p_count => x_msg_count,
1149: p_data => x_msg_data
1150: );
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.debug('G_EXC_ERROR exception');
1153: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1154: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1155: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1156: IBE_UTIL.debug('error text : '|| SQLERRM);
1149: p_data => x_msg_data
1150: );
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.debug('G_EXC_ERROR exception');
1153: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1154: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1155: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1156: IBE_UTIL.debug('error text : '|| SQLERRM);
1157: END IF;
1150: );
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.debug('G_EXC_ERROR exception');
1153: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1154: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1155: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1156: IBE_UTIL.debug('error text : '|| SQLERRM);
1157: END IF;
1158:
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.debug('G_EXC_ERROR exception');
1153: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1154: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1155: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1156: IBE_UTIL.debug('error text : '|| SQLERRM);
1157: END IF;
1158:
1159: --IBE_UTIL.disable_debug();
1152: IBE_UTIL.debug('G_EXC_ERROR exception');
1153: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1154: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1155: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1156: IBE_UTIL.debug('error text : '|| SQLERRM);
1157: END IF;
1158:
1159: --IBE_UTIL.disable_debug();
1160:
1155: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1156: IBE_UTIL.debug('error text : '|| SQLERRM);
1157: END IF;
1158:
1159: --IBE_UTIL.disable_debug();
1160:
1161: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1162: --IBE_UTIL.enable_debug();
1163:
1158:
1159: --IBE_UTIL.disable_debug();
1160:
1161: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1162: --IBE_UTIL.enable_debug();
1163:
1164: ROLLBACK TO set_address__usage_pvt;
1165: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1166: FND_MSG_PUB.count_and_get(
1167: p_encoded => FND_API.G_FALSE,
1168: p_count => x_msg_count,
1169: p_data => x_msg_data
1170: );
1171: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1172: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
1173: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1174: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1175: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1168: p_count => x_msg_count,
1169: p_data => x_msg_data
1170: );
1171: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1172: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
1173: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1174: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1175: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1176: IBE_UTIL.debug('error text : '|| SQLERRM);
1169: p_data => x_msg_data
1170: );
1171: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1172: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
1173: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1174: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1175: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1176: IBE_UTIL.debug('error text : '|| SQLERRM);
1177: END IF;
1170: );
1171: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1172: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
1173: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1174: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1175: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1176: IBE_UTIL.debug('error text : '|| SQLERRM);
1177: END IF;
1178:
1171: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1172: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
1173: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1174: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1175: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1176: IBE_UTIL.debug('error text : '|| SQLERRM);
1177: END IF;
1178:
1179: --IBE_UTIL.disable_debug();
1172: IBE_UTIL.debug('G_EXC_UNEXPECTED_ERROR exception');
1173: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1174: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1175: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1176: IBE_UTIL.debug('error text : '|| SQLERRM);
1177: END IF;
1178:
1179: --IBE_UTIL.disable_debug();
1180:
1175: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1176: IBE_UTIL.debug('error text : '|| SQLERRM);
1177: END IF;
1178:
1179: --IBE_UTIL.disable_debug();
1180:
1181: WHEN OTHERS THEN
1182: --IBE_UTIL.enable_debug();
1183:
1178:
1179: --IBE_UTIL.disable_debug();
1180:
1181: WHEN OTHERS THEN
1182: --IBE_UTIL.enable_debug();
1183:
1184: ROLLBACK TO set_address__usage_pvt;
1185: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1186: FND_MSG_PUB.count_and_get(
1187: p_encoded => FND_API.G_FALSE,
1188: p_count => x_msg_count,
1189: p_data => x_msg_data
1190: );
1191: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1192: IBE_UTIL.debug('OTHER exception');
1193: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1194: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1195: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1188: p_count => x_msg_count,
1189: p_data => x_msg_data
1190: );
1191: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1192: IBE_UTIL.debug('OTHER exception');
1193: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1194: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1195: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1196: IBE_UTIL.debug('error text : '|| SQLERRM);
1189: p_data => x_msg_data
1190: );
1191: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1192: IBE_UTIL.debug('OTHER exception');
1193: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1194: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1195: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1196: IBE_UTIL.debug('error text : '|| SQLERRM);
1197: END IF;
1190: );
1191: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1192: IBE_UTIL.debug('OTHER exception');
1193: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1194: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1195: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1196: IBE_UTIL.debug('error text : '|| SQLERRM);
1197: END IF;
1198:
1191: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1192: IBE_UTIL.debug('OTHER exception');
1193: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1194: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1195: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1196: IBE_UTIL.debug('error text : '|| SQLERRM);
1197: END IF;
1198:
1199: --IBE_UTIL.disable_debug();
1192: IBE_UTIL.debug('OTHER exception');
1193: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1194: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1195: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1196: IBE_UTIL.debug('error text : '|| SQLERRM);
1197: END IF;
1198:
1199: --IBE_UTIL.disable_debug();
1200: END;
1195: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1196: IBE_UTIL.debug('error text : '|| SQLERRM);
1197: END IF;
1198:
1199: --IBE_UTIL.disable_debug();
1200: END;
1201:
1202: PROCEDURE get_primary_addr_details(
1203: p_api_version IN NUMBER,
1214: x_party_id OUT NOCOPY NUMBER
1215: )
1216: IS
1217: BEGIN
1218: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1219: IBE_UTIL.debug('Starting getPrimary Addr Details ');
1220: END IF;
1221: x_party_id := p_party_id;
1222: get_primary_addr_id
1215: )
1216: IS
1217: BEGIN
1218: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1219: IBE_UTIL.debug('Starting getPrimary Addr Details ');
1220: END IF;
1221: x_party_id := p_party_id;
1222: get_primary_addr_id
1223: (p_api_version => p_api_version,
1229: x_msg_data => x_msg_data,
1230: x_party_site_id => x_party_site_id
1231: );
1232: if(x_party_site_id = FND_API.G_MISS_NUM OR x_party_site_id is null) THEN
1233: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1234: IBE_UTIL.debug(' getPrimary Addr Details of alt PartyId ');
1235: END IF;
1236: x_party_id := p_alt_party_id;
1237: get_primary_addr_id
1230: x_party_site_id => x_party_site_id
1231: );
1232: if(x_party_site_id = FND_API.G_MISS_NUM OR x_party_site_id is null) THEN
1233: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1234: IBE_UTIL.debug(' getPrimary Addr Details of alt PartyId ');
1235: END IF;
1236: x_party_id := p_alt_party_id;
1237: get_primary_addr_id
1238: (p_api_version => p_api_version,
1247: END IF;
1248: if(x_party_Site_id = FND_API.G_MISS_NUM OR x_party_site_id is null) then
1249: x_party_id := null;
1250: end if;
1251: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1252: IBE_UTIL.debug('Ending getPrimary Addr Details with party_site_id '||x_party_site_id);
1253: END IF;
1254: END;
1255:
1248: if(x_party_Site_id = FND_API.G_MISS_NUM OR x_party_site_id is null) then
1249: x_party_id := null;
1250: end if;
1251: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1252: IBE_UTIL.debug('Ending getPrimary Addr Details with party_site_id '||x_party_site_id);
1253: END IF;
1254: END;
1255:
1256: PROCEDURE get_primary_addr_id(
1367: where party_id = l_party_id and subject_type = 'ORGANIZATION';
1368:
1369: BEGIN
1370:
1371: --IBE_UTIL.enable_debug();
1372:
1373: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1374: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.get_primary_addr_id for party_id'||p_party_id);
1375: END IF;
1369: BEGIN
1370:
1371: --IBE_UTIL.enable_debug();
1372:
1373: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1374: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.get_primary_addr_id for party_id'||p_party_id);
1375: END IF;
1376:
1377:
1370:
1371: --IBE_UTIL.enable_debug();
1372:
1373: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1374: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.get_primary_addr_id for party_id'||p_party_id);
1375: END IF;
1376:
1377:
1378:
1393: IF FND_API.to_boolean(p_init_msg_list) THEN
1394: FND_MSG_PUB.initialize;
1395: END IF;
1396:
1397: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1398: IBE_UTIL.debug('p_site_use_type = '||p_site_use_type);
1399: END IF;
1400:
1401:
1394: FND_MSG_PUB.initialize;
1395: END IF;
1396:
1397: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1398: IBE_UTIL.debug('p_site_use_type = '||p_site_use_type);
1399: END IF;
1400:
1401:
1402: IF (p_site_use_type = 'S') THEN
1414: FETCH c_getPrimAddrId_1 INTO x_party_site_id;
1415: CLOSE c_getPrimAddrId_1;
1416:
1417: IF (x_party_site_id IS NULL) THEN
1418: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1419: IBE_UTIL.debug('Accessing the SECOND cursor');
1420: END IF;
1421: OPEN c_getPrimAddrId_2(p_party_id,p_org_id,hr_type,site_type);
1422: FETCH c_getPrimAddrId_2 INTO x_party_site_id;
1415: CLOSE c_getPrimAddrId_1;
1416:
1417: IF (x_party_site_id IS NULL) THEN
1418: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1419: IBE_UTIL.debug('Accessing the SECOND cursor');
1420: END IF;
1421: OPEN c_getPrimAddrId_2(p_party_id,p_org_id,hr_type,site_type);
1422: FETCH c_getPrimAddrId_2 INTO x_party_site_id;
1423: CLOSE c_getPrimAddrId_2;
1421: OPEN c_getPrimAddrId_2(p_party_id,p_org_id,hr_type,site_type);
1422: FETCH c_getPrimAddrId_2 INTO x_party_site_id;
1423: CLOSE c_getPrimAddrId_2;
1424: ELSE
1425: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1426: IBE_UTIL.debug('NOT Accessing the SECOND cursor');
1427: END IF;
1428: END IF;
1429:
1422: FETCH c_getPrimAddrId_2 INTO x_party_site_id;
1423: CLOSE c_getPrimAddrId_2;
1424: ELSE
1425: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1426: IBE_UTIL.debug('NOT Accessing the SECOND cursor');
1427: END IF;
1428: END IF;
1429:
1430:
1430:
1431: /* madesai - 7/10 fixed bug 2608767 */
1432: if x_party_site_id IS NULL then
1433: if FND_API.to_boolean(p_get_org_prim_addr) then
1434: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1435: IBE_UTIL.debug('ContactPrimAddr not found,get Org Primary Addr');
1436: END IF;
1437: OPEN c_getOrgPartyId(p_party_id);
1438: FETCH c_getOrgPartyId INTO l_contact_org_id;
1431: /* madesai - 7/10 fixed bug 2608767 */
1432: if x_party_site_id IS NULL then
1433: if FND_API.to_boolean(p_get_org_prim_addr) then
1434: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1435: IBE_UTIL.debug('ContactPrimAddr not found,get Org Primary Addr');
1436: END IF;
1437: OPEN c_getOrgPartyId(p_party_id);
1438: FETCH c_getOrgPartyId INTO l_contact_org_id;
1439: if c_getOrgPartyId%notfound then
1436: END IF;
1437: OPEN c_getOrgPartyId(p_party_id);
1438: FETCH c_getOrgPartyId INTO l_contact_org_id;
1439: if c_getOrgPartyId%notfound then
1440: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1441: IBE_UTIL.debug('Org Id is not found');
1442: END IF;
1443: x_party_site_id := null;
1444: else
1437: OPEN c_getOrgPartyId(p_party_id);
1438: FETCH c_getOrgPartyId INTO l_contact_org_id;
1439: if c_getOrgPartyId%notfound then
1440: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1441: IBE_UTIL.debug('Org Id is not found');
1442: END IF;
1443: x_party_site_id := null;
1444: else
1445: get_primary_addr_id
1451: x_msg_count => x_msg_count,
1452: x_msg_data => x_msg_data,
1453: x_party_site_id => x_party_site_id
1454: );
1455: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1456: IBE_UTIL.debug('Primary address for orgId'||l_contact_org_id||'is '||x_party_site_id);
1457: END IF;
1458: end if;
1459: else
1452: x_msg_data => x_msg_data,
1453: x_party_site_id => x_party_site_id
1454: );
1455: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1456: IBE_UTIL.debug('Primary address for orgId'||l_contact_org_id||'is '||x_party_site_id);
1457: END IF;
1458: end if;
1459: else
1460: x_party_site_id := null;
1472: p_count => x_msg_count,
1473: p_data => x_msg_data
1474: );
1475:
1476: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1477: IBE_UTIL.debug('Ending getPrimary Addr with party_site_id '||x_party_site_id);
1478: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.get_primary_address');
1479: END IF;
1480:
1473: p_data => x_msg_data
1474: );
1475:
1476: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1477: IBE_UTIL.debug('Ending getPrimary Addr with party_site_id '||x_party_site_id);
1478: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.get_primary_address');
1479: END IF;
1480:
1481: --IBE_UTIL.disable_debug();
1474: );
1475:
1476: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1477: IBE_UTIL.debug('Ending getPrimary Addr with party_site_id '||x_party_site_id);
1478: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.get_primary_address');
1479: END IF;
1480:
1481: --IBE_UTIL.disable_debug();
1482:
1477: IBE_UTIL.debug('Ending getPrimary Addr with party_site_id '||x_party_site_id);
1478: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.get_primary_address');
1479: END IF;
1480:
1481: --IBE_UTIL.disable_debug();
1482:
1483: EXCEPTION
1484: WHEN OTHERS THEN
1485: --IBE_UTIL.enable_debug();
1481: --IBE_UTIL.disable_debug();
1482:
1483: EXCEPTION
1484: WHEN OTHERS THEN
1485: --IBE_UTIL.enable_debug();
1486:
1487: ROLLBACK TO get_primary_addr_id_pvt;
1488: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1489: FND_MSG_PUB.count_and_get(
1490: p_encoded => FND_API.G_FALSE,
1491: p_count => x_msg_count,
1492: p_data => x_msg_data
1493: );
1494: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1495: IBE_UTIL.debug('OTHER exception');
1496: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1497: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1498: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1491: p_count => x_msg_count,
1492: p_data => x_msg_data
1493: );
1494: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1495: IBE_UTIL.debug('OTHER exception');
1496: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1497: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1498: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1499: IBE_UTIL.debug('error text : '|| SQLERRM);
1492: p_data => x_msg_data
1493: );
1494: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1495: IBE_UTIL.debug('OTHER exception');
1496: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1497: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1498: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1499: IBE_UTIL.debug('error text : '|| SQLERRM);
1500: END IF;
1493: );
1494: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1495: IBE_UTIL.debug('OTHER exception');
1496: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1497: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1498: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1499: IBE_UTIL.debug('error text : '|| SQLERRM);
1500: END IF;
1501:
1494: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1495: IBE_UTIL.debug('OTHER exception');
1496: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1497: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1498: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1499: IBE_UTIL.debug('error text : '|| SQLERRM);
1500: END IF;
1501:
1502: --IBE_UTIL.disable_debug();
1495: IBE_UTIL.debug('OTHER exception');
1496: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1497: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1498: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1499: IBE_UTIL.debug('error text : '|| SQLERRM);
1500: END IF;
1501:
1502: --IBE_UTIL.disable_debug();
1503: END;
1498: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1499: IBE_UTIL.debug('error text : '|| SQLERRM);
1500: END IF;
1501:
1502: --IBE_UTIL.disable_debug();
1503: END;
1504:
1505:
1506: PROCEDURE get_primary_address(
1520: l_api_version CONSTANT NUMBER := 1.0;
1521:
1522: BEGIN
1523:
1524: --IBE_UTIL.enable_debug();
1525:
1526: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1527: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.get_primary_address');
1528: END IF;
1522: BEGIN
1523:
1524: --IBE_UTIL.enable_debug();
1525:
1526: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1527: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.get_primary_address');
1528: END IF;
1529:
1530: -- standard start of API savepoint
1523:
1524: --IBE_UTIL.enable_debug();
1525:
1526: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1527: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.get_primary_address');
1528: END IF;
1529:
1530: -- standard start of API savepoint
1531: SAVEPOINT get_primary_address_pvt;
1560: WHEN NO_DATA_FOUND THEN
1561: x_party_site_id := -1;
1562: x_location_id := -1;
1563: WHEN TOO_MANY_ROWS THEN
1564: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1565: IBE_UTIL.debug('TOO_MANY_ROWS exception found');
1566: IBE_UTIL.debug('p_party_id = ' || to_char(p_party_id));
1567: IBE_UTIL.debug('p_site_use_type = ' || p_site_use_type);
1568: END IF;
1561: x_party_site_id := -1;
1562: x_location_id := -1;
1563: WHEN TOO_MANY_ROWS THEN
1564: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1565: IBE_UTIL.debug('TOO_MANY_ROWS exception found');
1566: IBE_UTIL.debug('p_party_id = ' || to_char(p_party_id));
1567: IBE_UTIL.debug('p_site_use_type = ' || p_site_use_type);
1568: END IF;
1569: x_party_site_id := -1;
1562: x_location_id := -1;
1563: WHEN TOO_MANY_ROWS THEN
1564: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1565: IBE_UTIL.debug('TOO_MANY_ROWS exception found');
1566: IBE_UTIL.debug('p_party_id = ' || to_char(p_party_id));
1567: IBE_UTIL.debug('p_site_use_type = ' || p_site_use_type);
1568: END IF;
1569: x_party_site_id := -1;
1570: x_location_id := -1;
1563: WHEN TOO_MANY_ROWS THEN
1564: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1565: IBE_UTIL.debug('TOO_MANY_ROWS exception found');
1566: IBE_UTIL.debug('p_party_id = ' || to_char(p_party_id));
1567: IBE_UTIL.debug('p_site_use_type = ' || p_site_use_type);
1568: END IF;
1569: x_party_site_id := -1;
1570: x_location_id := -1;
1571: END;
1583: p_count => x_msg_count,
1584: p_data => x_msg_data
1585: );
1586:
1587: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1588: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.get_primary_address');
1589: END IF;
1590:
1591: --IBE_UTIL.disable_debug();
1584: p_data => x_msg_data
1585: );
1586:
1587: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1588: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.get_primary_address');
1589: END IF;
1590:
1591: --IBE_UTIL.disable_debug();
1592:
1587: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1588: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.get_primary_address');
1589: END IF;
1590:
1591: --IBE_UTIL.disable_debug();
1592:
1593: EXCEPTION
1594: WHEN OTHERS THEN
1595: --IBE_UTIL.enable_debug();
1591: --IBE_UTIL.disable_debug();
1592:
1593: EXCEPTION
1594: WHEN OTHERS THEN
1595: --IBE_UTIL.enable_debug();
1596:
1597: ROLLBACK TO get_primary_address_pvt;
1598: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1599: FND_MSG_PUB.count_and_get(
1600: p_encoded => FND_API.G_FALSE,
1601: p_count => x_msg_count,
1602: p_data => x_msg_data
1603: );
1604: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1605: IBE_UTIL.debug('OTHER exception');
1606: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1607: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1608: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1601: p_count => x_msg_count,
1602: p_data => x_msg_data
1603: );
1604: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1605: IBE_UTIL.debug('OTHER exception');
1606: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1607: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1608: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1609: IBE_UTIL.debug('error text : '|| SQLERRM);
1602: p_data => x_msg_data
1603: );
1604: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1605: IBE_UTIL.debug('OTHER exception');
1606: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1607: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1608: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1609: IBE_UTIL.debug('error text : '|| SQLERRM);
1610: END IF;
1603: );
1604: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1605: IBE_UTIL.debug('OTHER exception');
1606: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1607: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1608: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1609: IBE_UTIL.debug('error text : '|| SQLERRM);
1610: END IF;
1611:
1604: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1605: IBE_UTIL.debug('OTHER exception');
1606: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1607: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1608: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1609: IBE_UTIL.debug('error text : '|| SQLERRM);
1610: END IF;
1611:
1612: --IBE_UTIL.disable_debug();
1605: IBE_UTIL.debug('OTHER exception');
1606: IBE_UTIL.debug('x_msg_count ' || to_char(x_msg_count));
1607: IBE_UTIL.debug('x_msg_data ' || x_msg_data);
1608: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1609: IBE_UTIL.debug('error text : '|| SQLERRM);
1610: END IF;
1611:
1612: --IBE_UTIL.disable_debug();
1613: END;
1608: IBE_UTIL.debug('error code : '|| to_char(SQLCODE));
1609: IBE_UTIL.debug('error text : '|| SQLERRM);
1610: END IF;
1611:
1612: --IBE_UTIL.disable_debug();
1613: END;
1614:
1615:
1616: PROCEDURE do_create_address(
1650: l_lock_flag VARCHAR2(1) := FND_API.G_FALSE;
1651:
1652: BEGIN
1653:
1654: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1655: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.do_create_address');
1656: END IF;
1657:
1658: --
1651:
1652: BEGIN
1653:
1654: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1655: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.do_create_address');
1656: END IF;
1657:
1658: --
1659: -- create a location
1661:
1662: l_location.location_id := FND_API.G_MISS_NUM;
1663: l_location.address_effective_date := sysdate;
1664:
1665: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1666: IBE_UTIL.debug('hz_location_v2pub.create_location(+)');
1667: END IF;
1668:
1669: --V2
1662: l_location.location_id := FND_API.G_MISS_NUM;
1663: l_location.address_effective_date := sysdate;
1664:
1665: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1666: IBE_UTIL.debug('hz_location_v2pub.create_location(+)');
1667: END IF;
1668:
1669: --V2
1670: /* HZ_location_v2pub.create_location(
1693: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1694: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1695: END IF;
1696:
1697: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1698: IBE_UTIL.debug('hz_location_v2pub.create_location(-)');
1699: IBE_UTIL.debug('locaiton_id = ' || x_location_id);
1700: END IF;
1701:
1694: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1695: END IF;
1696:
1697: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1698: IBE_UTIL.debug('hz_location_v2pub.create_location(-)');
1699: IBE_UTIL.debug('locaiton_id = ' || x_location_id);
1700: END IF;
1701:
1702:
1695: END IF;
1696:
1697: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1698: IBE_UTIL.debug('hz_location_v2pub.create_location(-)');
1699: IBE_UTIL.debug('locaiton_id = ' || x_location_id);
1700: END IF;
1701:
1702:
1703: --
1717: l_gen_party_site_number :=
1718: fnd_profile.value('HZ_GENERATE_PARTY_SITE_NUMBER');
1719:
1720: IF l_gen_party_site_number = 'N' THEN
1721: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1722: IBE_UTIL.debug('HZ_GENERATE_PARTY_SITE_NUMBER is off');
1723: END IF;
1724:
1725: IF l_party_site_number = FND_API.G_MISS_CHAR OR
1718: fnd_profile.value('HZ_GENERATE_PARTY_SITE_NUMBER');
1719:
1720: IF l_gen_party_site_number = 'N' THEN
1721: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1722: IBE_UTIL.debug('HZ_GENERATE_PARTY_SITE_NUMBER is off');
1723: END IF;
1724:
1725: IF l_party_site_number = FND_API.G_MISS_CHAR OR
1726: l_party_site_number IS NULL THEN
1738: WHERE party_site_number = l_party_site_number;
1739:
1740: END LOOP;
1741:
1742: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1743: IBE_UTIL.debug('party_site_number from sequence : ' || l_party_site_number);
1744: END IF;
1745:
1746: l_party_site.party_site_number := l_party_site_number;
1739:
1740: END LOOP;
1741:
1742: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1743: IBE_UTIL.debug('party_site_number from sequence : ' || l_party_site_number);
1744: END IF;
1745:
1746: l_party_site.party_site_number := l_party_site_number;
1747:
1751: --
1752: -- create a party site
1753: --
1754:
1755: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1756: IBE_UTIL.debug('hz_party_v2pub.create_party_site(+)');
1757: END IF;
1758:
1759: --V2
1752: -- create a party site
1753: --
1754:
1755: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1756: IBE_UTIL.debug('hz_party_v2pub.create_party_site(+)');
1757: END IF;
1758:
1759: --V2
1760: /* HZ_PARTY_PUB.create_party_site(
1785: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1786: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1787: END IF;
1788:
1789: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1790: IBE_UTIL.debug('hz_party_site_v2pub.create_party_site(-)');
1791: IBE_UTIL.debug('party_site_id = ' || x_party_site_id);
1792: END IF;
1793:
1786: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1787: END IF;
1788:
1789: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1790: IBE_UTIL.debug('hz_party_site_v2pub.create_party_site(-)');
1791: IBE_UTIL.debug('party_site_id = ' || x_party_site_id);
1792: END IF;
1793:
1794: --
1787: END IF;
1788:
1789: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1790: IBE_UTIL.debug('hz_party_site_v2pub.create_party_site(-)');
1791: IBE_UTIL.debug('party_site_id = ' || x_party_site_id);
1792: END IF;
1793:
1794: --
1795: -- if p_default_primary is true, create a primary address
1799: IF p_default_primary = FND_API.G_TRUE THEN
1800:
1801: -- check primary billing address
1802:
1803: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1804: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(+)');
1805: END IF;
1806:
1807: IBE_ADDRESS_V2PVT.get_primary_address(
1800:
1801: -- check primary billing address
1802:
1803: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1804: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(+)');
1805: END IF;
1806:
1807: IBE_ADDRESS_V2PVT.get_primary_address(
1808: p_api_version,
1822: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1823: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1824: END IF;
1825:
1826: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1827: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(-)');
1828: IBE_UTIL.debug('l_prim_site_id = ' || l_prim_site_id);
1829: END IF;
1830:
1823: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1824: END IF;
1825:
1826: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1827: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(-)');
1828: IBE_UTIL.debug('l_prim_site_id = ' || l_prim_site_id);
1829: END IF;
1830:
1831: IF (l_prim_site_id = -1) THEN
1824: END IF;
1825:
1826: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1827: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(-)');
1828: IBE_UTIL.debug('l_prim_site_id = ' || l_prim_site_id);
1829: END IF;
1830:
1831: IF (l_prim_site_id = -1) THEN
1832: -- no primary billing address
1834: END IF;
1835:
1836: -- check primary shipping address
1837:
1838: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1839: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(+)');
1840: END IF;
1841:
1842: IBE_ADDRESS_V2PVT.get_primary_address(
1835:
1836: -- check primary shipping address
1837:
1838: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1839: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(+)');
1840: END IF;
1841:
1842: IBE_ADDRESS_V2PVT.get_primary_address(
1843: p_api_version,
1857: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1858: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1859: END IF;
1860:
1861: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1862: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(-)');
1863: IBE_UTIL.debug('l_prim_site_id = ' || l_prim_site_id);
1864: END IF;
1865:
1858: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1859: END IF;
1860:
1861: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1862: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(-)');
1863: IBE_UTIL.debug('l_prim_site_id = ' || l_prim_site_id);
1864: END IF;
1865:
1866: IF (l_prim_site_id = -1) THEN
1859: END IF;
1860:
1861: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1862: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.get_primary_address(-)');
1863: IBE_UTIL.debug('l_prim_site_id = ' || l_prim_site_id);
1864: END IF;
1865:
1866: IF (l_prim_site_id = -1) THEN
1867: -- no primary shipping address
1876: --
1877:
1878: IF (l_primary_billto = FND_API.G_TRUE OR p_billto = FND_API.G_TRUE)THEN
1879:
1880: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1881: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_primary_address(+) for BILL_TO');
1882: END IF;
1883: l_createdby := l_location.created_by_module;
1884: IBE_ADDRESS_V2PVT.set_address_usage(
1877:
1878: IF (l_primary_billto = FND_API.G_TRUE OR p_billto = FND_API.G_TRUE)THEN
1879:
1880: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1881: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_primary_address(+) for BILL_TO');
1882: END IF;
1883: l_createdby := l_location.created_by_module;
1884: IBE_ADDRESS_V2PVT.set_address_usage(
1885: p_api_version,
1900: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1901: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1902: END IF;
1903:
1904: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1905: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_primary_address(-)');
1906: IBE_UTIL.debug('party_site_use_id = ' || l_party_site_use_id);
1907: END IF;
1908:
1901: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1902: END IF;
1903:
1904: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1905: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_primary_address(-)');
1906: IBE_UTIL.debug('party_site_use_id = ' || l_party_site_use_id);
1907: END IF;
1908:
1909: END IF;
1902: END IF;
1903:
1904: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1905: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_primary_address(-)');
1906: IBE_UTIL.debug('party_site_use_id = ' || l_party_site_use_id);
1907: END IF;
1908:
1909: END IF;
1910:
1909: END IF;
1910:
1911: IF (l_primary_shipto = FND_API.G_TRUE OR p_shipto = FND_API.G_TRUE) THEN
1912: l_createdby := l_location.created_by_module;
1913: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1914: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_primary_address(+) for SHIP_TO');
1915: END IF;
1916: IBE_ADDRESS_V2PVT.set_address_usage(
1917: p_api_version,
1910:
1911: IF (l_primary_shipto = FND_API.G_TRUE OR p_shipto = FND_API.G_TRUE) THEN
1912: l_createdby := l_location.created_by_module;
1913: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1914: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_primary_address(+) for SHIP_TO');
1915: END IF;
1916: IBE_ADDRESS_V2PVT.set_address_usage(
1917: p_api_version,
1918: p_init_msg_list,
1932: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1933: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1934: END IF;
1935:
1936: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1937: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_address_usage(-)');
1938: IBE_UTIL.debug('party_site_use_id = ' || l_party_site_use_id);
1939: END IF;
1940:
1933: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1934: END IF;
1935:
1936: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1937: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_address_usage(-)');
1938: IBE_UTIL.debug('party_site_use_id = ' || l_party_site_use_id);
1939: END IF;
1940:
1941: END IF;
1934: END IF;
1935:
1936: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1937: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.set_address_usage(-)');
1938: IBE_UTIL.debug('party_site_use_id = ' || l_party_site_use_id);
1939: END IF;
1940:
1941: END IF;
1942:
1945: -- For debug purpose
1946: --
1947: l_org_id := MO_GLOBAL.get_current_org_id();
1948:
1949: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1950: IBE_UTIL.debug('Current user org id = ' || l_org_id);
1951: IBE_UTIL.debug('=== Checking system parameters ===');
1952: --IBE_UTIL.debug('sysparm.org_id = ' || to_char(arp_standard.sysparm.org_id));
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1946: --
1947: l_org_id := MO_GLOBAL.get_current_org_id();
1948:
1949: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1950: IBE_UTIL.debug('Current user org id = ' || l_org_id);
1951: IBE_UTIL.debug('=== Checking system parameters ===');
1952: --IBE_UTIL.debug('sysparm.org_id = ' || to_char(arp_standard.sysparm.org_id));
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1954: IBE_UTIL.debug('country = ' || p_location.country);
1947: l_org_id := MO_GLOBAL.get_current_org_id();
1948:
1949: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1950: IBE_UTIL.debug('Current user org id = ' || l_org_id);
1951: IBE_UTIL.debug('=== Checking system parameters ===');
1952: --IBE_UTIL.debug('sysparm.org_id = ' || to_char(arp_standard.sysparm.org_id));
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1954: IBE_UTIL.debug('country = ' || p_location.country);
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1948:
1949: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1950: IBE_UTIL.debug('Current user org id = ' || l_org_id);
1951: IBE_UTIL.debug('=== Checking system parameters ===');
1952: --IBE_UTIL.debug('sysparm.org_id = ' || to_char(arp_standard.sysparm.org_id));
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1954: IBE_UTIL.debug('country = ' || p_location.country);
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1956: IBE_UTIL.debug('city = ' || p_location.city);
1949: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1950: IBE_UTIL.debug('Current user org id = ' || l_org_id);
1951: IBE_UTIL.debug('=== Checking system parameters ===');
1952: --IBE_UTIL.debug('sysparm.org_id = ' || to_char(arp_standard.sysparm.org_id));
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1954: IBE_UTIL.debug('country = ' || p_location.country);
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1956: IBE_UTIL.debug('city = ' || p_location.city);
1957: IBE_UTIL.debug('county = ' || p_location.county);
1950: IBE_UTIL.debug('Current user org id = ' || l_org_id);
1951: IBE_UTIL.debug('=== Checking system parameters ===');
1952: --IBE_UTIL.debug('sysparm.org_id = ' || to_char(arp_standard.sysparm.org_id));
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1954: IBE_UTIL.debug('country = ' || p_location.country);
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1956: IBE_UTIL.debug('city = ' || p_location.city);
1957: IBE_UTIL.debug('county = ' || p_location.county);
1958: IBE_UTIL.debug('state = ' || p_location.state);
1951: IBE_UTIL.debug('=== Checking system parameters ===');
1952: --IBE_UTIL.debug('sysparm.org_id = ' || to_char(arp_standard.sysparm.org_id));
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1954: IBE_UTIL.debug('country = ' || p_location.country);
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1956: IBE_UTIL.debug('city = ' || p_location.city);
1957: IBE_UTIL.debug('county = ' || p_location.county);
1958: IBE_UTIL.debug('state = ' || p_location.state);
1959: IBE_UTIL.debug('postal_code = ' || p_location.postal_code);
1952: --IBE_UTIL.debug('sysparm.org_id = ' || to_char(arp_standard.sysparm.org_id));
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1954: IBE_UTIL.debug('country = ' || p_location.country);
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1956: IBE_UTIL.debug('city = ' || p_location.city);
1957: IBE_UTIL.debug('county = ' || p_location.county);
1958: IBE_UTIL.debug('state = ' || p_location.state);
1959: IBE_UTIL.debug('postal_code = ' || p_location.postal_code);
1960: END IF;
1953: --IBE_UTIL.debug('sysparm.default_country = ' || arp_standard.sysparm.default_country);
1954: IBE_UTIL.debug('country = ' || p_location.country);
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1956: IBE_UTIL.debug('city = ' || p_location.city);
1957: IBE_UTIL.debug('county = ' || p_location.county);
1958: IBE_UTIL.debug('state = ' || p_location.state);
1959: IBE_UTIL.debug('postal_code = ' || p_location.postal_code);
1960: END IF;
1961: --
1954: IBE_UTIL.debug('country = ' || p_location.country);
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1956: IBE_UTIL.debug('city = ' || p_location.city);
1957: IBE_UTIL.debug('county = ' || p_location.county);
1958: IBE_UTIL.debug('state = ' || p_location.state);
1959: IBE_UTIL.debug('postal_code = ' || p_location.postal_code);
1960: END IF;
1961: --
1962: -- End of debug purpose
1955: IBE_UTIL.debug('address1 = ' || p_location.address1);
1956: IBE_UTIL.debug('city = ' || p_location.city);
1957: IBE_UTIL.debug('county = ' || p_location.county);
1958: IBE_UTIL.debug('state = ' || p_location.state);
1959: IBE_UTIL.debug('postal_code = ' || p_location.postal_code);
1960: END IF;
1961: --
1962: -- End of debug purpose
1963: --
1961: --
1962: -- End of debug purpose
1963: --
1964:
1965: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1966: IBE_UTIL.debug('hz_tax_assignment_pub.create_loc_assignment(+)');
1967: END IF;
1968:
1969: HZ_TAX_ASSIGNMENT_V2PUB.create_loc_assignment(
1962: -- End of debug purpose
1963: --
1964:
1965: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1966: IBE_UTIL.debug('hz_tax_assignment_pub.create_loc_assignment(+)');
1967: END IF;
1968:
1969: HZ_TAX_ASSIGNMENT_V2PUB.create_loc_assignment(
1970: p_init_msg_list,
1995: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1996: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1997: END IF;
1998:
1999: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2000: IBE_UTIL.debug('hz_tax_assignment_pub.create_loc_assignment(-)');
2001: IBE_UTIL.debug('loc_id = ' || to_char(l_loc_id));
2002: END IF;
2003:
1996: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1997: END IF;
1998:
1999: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2000: IBE_UTIL.debug('hz_tax_assignment_pub.create_loc_assignment(-)');
2001: IBE_UTIL.debug('loc_id = ' || to_char(l_loc_id));
2002: END IF;
2003:
2004: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1997: END IF;
1998:
1999: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2000: IBE_UTIL.debug('hz_tax_assignment_pub.create_loc_assignment(-)');
2001: IBE_UTIL.debug('loc_id = ' || to_char(l_loc_id));
2002: END IF;
2003:
2004: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2005: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.do_create_address');
2000: IBE_UTIL.debug('hz_tax_assignment_pub.create_loc_assignment(-)');
2001: IBE_UTIL.debug('loc_id = ' || to_char(l_loc_id));
2002: END IF;
2003:
2004: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2005: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.do_create_address');
2006: END IF;
2007:
2008: END;
2001: IBE_UTIL.debug('loc_id = ' || to_char(l_loc_id));
2002: END IF;
2003:
2004: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2005: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.do_create_address');
2006: END IF;
2007:
2008: END;
2009:
2037: l_psu_object_version_number NUMBER;
2038:
2039: BEGIN
2040:
2041: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2042: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.do_delete_address');
2043: END IF;
2044:
2045: --
2038:
2039: BEGIN
2040:
2041: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2042: IBE_UTIL.debug('enter IBE_ADDRESS_V2PVT.do_delete_address');
2043: END IF;
2044:
2045: --
2046: -- update party site
2051: l_party_site_use.status := 'I';
2052: --fix bug 3382268
2053: l_party_site_use.primary_per_type := 'N';
2054:
2055: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2056: IBE_UTIL.debug('hz_party_v2pub.update_party_site(+)');
2057: END IF;
2058:
2059: HZ_PARTY_SITE_V2PUB.update_party_site (
2052: --fix bug 3382268
2053: l_party_site_use.primary_per_type := 'N';
2054:
2055: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2056: IBE_UTIL.debug('hz_party_v2pub.update_party_site(+)');
2057: END IF;
2058:
2059: HZ_PARTY_SITE_V2PUB.update_party_site (
2060: p_init_msg_list,
2063: x_return_status,
2064: x_msg_count,
2065: x_msg_data);
2066:
2067: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2068: IBE_UTIL.debug('hz_party_v2pub.update_party_site(-)');
2069: IBE_UTIL.debug('hz_party_v2pub.update_party_site_use(+)');
2070: END IF;
2071: --delete all psu for a given party site that's to be deleted
2064: x_msg_count,
2065: x_msg_data);
2066:
2067: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2068: IBE_UTIL.debug('hz_party_v2pub.update_party_site(-)');
2069: IBE_UTIL.debug('hz_party_v2pub.update_party_site_use(+)');
2070: END IF;
2071: --delete all psu for a given party site that's to be deleted
2072: open c_psu;
2065: x_msg_data);
2066:
2067: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2068: IBE_UTIL.debug('hz_party_v2pub.update_party_site(-)');
2069: IBE_UTIL.debug('hz_party_v2pub.update_party_site_use(+)');
2070: END IF;
2071: --delete all psu for a given party site that's to be deleted
2072: open c_psu;
2073: Loop
2090: );
2091: End Loop;
2092: close c_psu;
2093:
2094: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2095: IBE_UTIL.debug('hz_party_v2pub.update_party_site_use(-)');
2096: END IF;
2097:
2098: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2091: End Loop;
2092: close c_psu;
2093:
2094: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2095: IBE_UTIL.debug('hz_party_v2pub.update_party_site_use(-)');
2096: END IF;
2097:
2098: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2099: RAISE FND_API.G_EXC_ERROR;
2100: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2101: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2102: END IF;
2103:
2104: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2105: IBE_UTIL.debug('hz_party_v2pub.update_party_site(-)');
2106: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.do_delete_address');
2107: END IF;
2108:
2101: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2102: END IF;
2103:
2104: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2105: IBE_UTIL.debug('hz_party_v2pub.update_party_site(-)');
2106: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.do_delete_address');
2107: END IF;
2108:
2109: END;
2102: END IF;
2103:
2104: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2105: IBE_UTIL.debug('hz_party_v2pub.update_party_site(-)');
2106: IBE_UTIL.debug('exit IBE_ADDRESS_V2PVT.do_delete_address');
2107: END IF;
2108:
2109: END;
2110:
2121: BEGIN
2122:
2123: l_gmiss := FND_API.G_MISS_CHAR;
2124: -- for debug purpose
2125: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2126: IBE_UTIL.debug('location_id = ' || p_location.location_id || '.');
2127: IBE_UTIL.debug('address1 = ' || p_location.address1 || '.');
2128: IBE_UTIL.debug('address2 = ' || p_location.address2 || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2122:
2123: l_gmiss := FND_API.G_MISS_CHAR;
2124: -- for debug purpose
2125: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2126: IBE_UTIL.debug('location_id = ' || p_location.location_id || '.');
2127: IBE_UTIL.debug('address1 = ' || p_location.address1 || '.');
2128: IBE_UTIL.debug('address2 = ' || p_location.address2 || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2123: l_gmiss := FND_API.G_MISS_CHAR;
2124: -- for debug purpose
2125: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2126: IBE_UTIL.debug('location_id = ' || p_location.location_id || '.');
2127: IBE_UTIL.debug('address1 = ' || p_location.address1 || '.');
2128: IBE_UTIL.debug('address2 = ' || p_location.address2 || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2124: -- for debug purpose
2125: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2126: IBE_UTIL.debug('location_id = ' || p_location.location_id || '.');
2127: IBE_UTIL.debug('address1 = ' || p_location.address1 || '.');
2128: IBE_UTIL.debug('address2 = ' || p_location.address2 || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2125: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2126: IBE_UTIL.debug('location_id = ' || p_location.location_id || '.');
2127: IBE_UTIL.debug('address1 = ' || p_location.address1 || '.');
2128: IBE_UTIL.debug('address2 = ' || p_location.address2 || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2126: IBE_UTIL.debug('location_id = ' || p_location.location_id || '.');
2127: IBE_UTIL.debug('address1 = ' || p_location.address1 || '.');
2128: IBE_UTIL.debug('address2 = ' || p_location.address2 || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2134: IBE_UTIL.debug('state = ' || p_location.state || '.');
2127: IBE_UTIL.debug('address1 = ' || p_location.address1 || '.');
2128: IBE_UTIL.debug('address2 = ' || p_location.address2 || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2134: IBE_UTIL.debug('state = ' || p_location.state || '.');
2135: IBE_UTIL.debug('postal_code = ' || p_location.postal_code || '.');
2128: IBE_UTIL.debug('address2 = ' || p_location.address2 || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2134: IBE_UTIL.debug('state = ' || p_location.state || '.');
2135: IBE_UTIL.debug('postal_code = ' || p_location.postal_code || '.');
2136: IBE_UTIL.debug('country = ' || p_location.country || '.');
2129: IBE_UTIL.debug('address3 = ' || p_location.address3 || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2134: IBE_UTIL.debug('state = ' || p_location.state || '.');
2135: IBE_UTIL.debug('postal_code = ' || p_location.postal_code || '.');
2136: IBE_UTIL.debug('country = ' || p_location.country || '.');
2137: IBE_UTIL.debug('address_lines_phonetic = ' || p_location.address_lines_phonetic || '.');
2130: IBE_UTIL.debug('address4 = ' || p_location.address4 || '.');
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2134: IBE_UTIL.debug('state = ' || p_location.state || '.');
2135: IBE_UTIL.debug('postal_code = ' || p_location.postal_code || '.');
2136: IBE_UTIL.debug('country = ' || p_location.country || '.');
2137: IBE_UTIL.debug('address_lines_phonetic = ' || p_location.address_lines_phonetic || '.');
2138: END IF;
2131: IBE_UTIL.debug('city = ' || p_location.city || '.');
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2134: IBE_UTIL.debug('state = ' || p_location.state || '.');
2135: IBE_UTIL.debug('postal_code = ' || p_location.postal_code || '.');
2136: IBE_UTIL.debug('country = ' || p_location.country || '.');
2137: IBE_UTIL.debug('address_lines_phonetic = ' || p_location.address_lines_phonetic || '.');
2138: END IF;
2139:
2132: IBE_UTIL.debug('county = ' || p_location.county || '.');
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2134: IBE_UTIL.debug('state = ' || p_location.state || '.');
2135: IBE_UTIL.debug('postal_code = ' || p_location.postal_code || '.');
2136: IBE_UTIL.debug('country = ' || p_location.country || '.');
2137: IBE_UTIL.debug('address_lines_phonetic = ' || p_location.address_lines_phonetic || '.');
2138: END IF;
2139:
2140: BEGIN
2133: IBE_UTIL.debug('province = ' || p_location.province || '.');
2134: IBE_UTIL.debug('state = ' || p_location.state || '.');
2135: IBE_UTIL.debug('postal_code = ' || p_location.postal_code || '.');
2136: IBE_UTIL.debug('country = ' || p_location.country || '.');
2137: IBE_UTIL.debug('address_lines_phonetic = ' || p_location.address_lines_phonetic || '.');
2138: END IF;
2139:
2140: BEGIN
2141: SELECT location_id INTO l_dummy
2157: l_changed := true;
2158: END;
2159:
2160: IF l_changed THEN
2161: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2162: IBE_UTIL.debug('location is changed');
2163: END IF;
2164: ELSE
2165: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2158: END;
2159:
2160: IF l_changed THEN
2161: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2162: IBE_UTIL.debug('location is changed');
2163: END IF;
2164: ELSE
2165: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2166: IBE_UTIL.debug('location is not changed');
2161: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2162: IBE_UTIL.debug('location is changed');
2163: END IF;
2164: ELSE
2165: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2166: IBE_UTIL.debug('location is not changed');
2167: END IF;
2168: END IF;
2169:
2162: IBE_UTIL.debug('location is changed');
2163: END IF;
2164: ELSE
2165: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2166: IBE_UTIL.debug('location is not changed');
2167: END IF;
2168: END IF;
2169:
2170: return l_changed;
2184: BEGIN
2185:
2186: l_gmiss := FND_API.G_MISS_CHAR;
2187: -- for debug purpose
2188: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2189: IBE_UTIL.debug('party_site_id = ' || p_party_site.party_site_id || '.');
2190: IBE_UTIL.debug('party_site_name = ' || p_party_site.party_site_name || '.');
2191: IBE_UTIL.debug('addressee = ' || p_party_site.addressee || '.');
2192: END IF;
2185:
2186: l_gmiss := FND_API.G_MISS_CHAR;
2187: -- for debug purpose
2188: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2189: IBE_UTIL.debug('party_site_id = ' || p_party_site.party_site_id || '.');
2190: IBE_UTIL.debug('party_site_name = ' || p_party_site.party_site_name || '.');
2191: IBE_UTIL.debug('addressee = ' || p_party_site.addressee || '.');
2192: END IF;
2193:
2186: l_gmiss := FND_API.G_MISS_CHAR;
2187: -- for debug purpose
2188: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2189: IBE_UTIL.debug('party_site_id = ' || p_party_site.party_site_id || '.');
2190: IBE_UTIL.debug('party_site_name = ' || p_party_site.party_site_name || '.');
2191: IBE_UTIL.debug('addressee = ' || p_party_site.addressee || '.');
2192: END IF;
2193:
2194: BEGIN
2187: -- for debug purpose
2188: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2189: IBE_UTIL.debug('party_site_id = ' || p_party_site.party_site_id || '.');
2190: IBE_UTIL.debug('party_site_name = ' || p_party_site.party_site_name || '.');
2191: IBE_UTIL.debug('addressee = ' || p_party_site.addressee || '.');
2192: END IF;
2193:
2194: BEGIN
2195: SELECT party_site_id INTO l_dummy
2203: l_changed := true;
2204: END;
2205:
2206: IF l_changed THEN
2207: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2208: IBE_UTIL.debug('party_site is changed');
2209: END IF;
2210: ELSE
2211: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2204: END;
2205:
2206: IF l_changed THEN
2207: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2208: IBE_UTIL.debug('party_site is changed');
2209: END IF;
2210: ELSE
2211: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2212: IBE_UTIL.debug('party_site is not changed');
2207: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2208: IBE_UTIL.debug('party_site is changed');
2209: END IF;
2210: ELSE
2211: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2212: IBE_UTIL.debug('party_site is not changed');
2213: END IF;
2214: END IF;
2215:
2208: IBE_UTIL.debug('party_site is changed');
2209: END IF;
2210: ELSE
2211: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2212: IBE_UTIL.debug('party_site is not changed');
2213: END IF;
2214: END IF;
2215:
2216: return l_changed;
2244: ORDER BY status,party_site_use_id desc)
2245: WHERE rownum=1;
2246:
2247: p_party_site_use.party_site_use_id := l_psu_id;
2248: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2249: IBE_UTIL.debug('assign party site use ID: '||p_party_site_use.party_site_use_id);
2250: END IF;
2251: EXCEPTION
2252: WHEN NO_DATA_FOUND THEN
2245: WHERE rownum=1;
2246:
2247: p_party_site_use.party_site_use_id := l_psu_id;
2248: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2249: IBE_UTIL.debug('assign party site use ID: '||p_party_site_use.party_site_use_id);
2250: END IF;
2251: EXCEPTION
2252: WHEN NO_DATA_FOUND THEN
2253: l_status := 'N';
2254: END;
2255:
2256:
2257: IF l_status = 'N' THEN
2258: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2259: IBE_UTIL.debug('party_site_use is not found');
2260: END IF;
2261: ELSE
2262: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2255:
2256:
2257: IF l_status = 'N' THEN
2258: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2259: IBE_UTIL.debug('party_site_use is not found');
2260: END IF;
2261: ELSE
2262: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2263: IBE_UTIL.debug('party_site_use is found');
2258: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2259: IBE_UTIL.debug('party_site_use is not found');
2260: END IF;
2261: ELSE
2262: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2263: IBE_UTIL.debug('party_site_use is found');
2264: END IF;
2265: BEGIN
2266: SELECT distinct party_site_use_id INTO l_psu_id
2259: IBE_UTIL.debug('party_site_use is not found');
2260: END IF;
2261: ELSE
2262: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2263: IBE_UTIL.debug('party_site_use is found');
2264: END IF;
2265: BEGIN
2266: SELECT distinct party_site_use_id INTO l_psu_id
2267: FROM hz_party_site_uses
2270: AND primary_per_type = p_party_site_use.primary_per_type;
2271: EXCEPTION
2272: WHEN NO_DATA_FOUND THEN
2273: l_status := 'T';
2274: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2275: IBE_UTIL.debug('l_status is set to true');
2276: END IF;
2277: END;
2278: END IF;
2271: EXCEPTION
2272: WHEN NO_DATA_FOUND THEN
2273: l_status := 'T';
2274: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2275: IBE_UTIL.debug('l_status is set to true');
2276: END IF;
2277: END;
2278: END IF;
2279:
2276: END IF;
2277: END;
2278: END IF;
2279:
2280: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2281: IBE_UTIL.debug('l_status is: '||l_status);
2282: END IF;
2283: return l_status;
2284: END;
2277: END;
2278: END IF;
2279:
2280: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2281: IBE_UTIL.debug('l_status is: '||l_status);
2282: END IF;
2283: return l_status;
2284: END;
2285:
2315: AND org_information_context = l_c_usage_code;
2316:
2317: BEGIN
2318:
2319: --IBE_UTIL.enable_debug();
2320:
2321: -- Standard call to check for call compatibility.
2322: IF NOT FND_API.Compatible_API_Call(l_api_version,
2323: p_api_version,
2417: END IF; -- end if BILL_TO_COUNTRY
2418:
2419: END LOOP; -- end for i
2420:
2421: --IBE_UTIL.disable_debug();
2422:
2423: EXCEPTION
2424:
2425: WHEN FND_API.G_EXC_ERROR THEN
2471: l_api_name CONSTANT VARCHAR2(30) := 'copy_party_site';
2472:
2473: BEGIN
2474:
2475: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2476: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Begin ');
2477: END IF;
2478: /*PROCEDURE create_party_site (
2479: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2472:
2473: BEGIN
2474:
2475: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2476: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Begin ');
2477: END IF;
2478: /*PROCEDURE create_party_site (
2479: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2480: p_party_site_rec IN PARTY_SITE_REC_TYPE,
2495: x_msg_count => x_msg_count,
2496: x_msg_data => x_msg_data );
2497:
2498: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2499: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2500: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Expected error ');
2501: END IF;
2502:
2503: RAISE FND_API.G_EXC_ERROR;
2496: x_msg_data => x_msg_data );
2497:
2498: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2499: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2500: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Expected error ');
2501: END IF;
2502:
2503: RAISE FND_API.G_EXC_ERROR;
2504: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2501: END IF;
2502:
2503: RAISE FND_API.G_EXC_ERROR;
2504: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2505: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2506: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Unexpected error ');
2507: END IF;
2508: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2509: END IF;
2502:
2503: RAISE FND_API.G_EXC_ERROR;
2504: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2505: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2506: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Unexpected error ');
2507: END IF;
2508: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2509: END IF;
2510:
2507: END IF;
2508: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2509: END IF;
2510:
2511: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2512: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Done ');
2513: IBE_UTIL.debug('party_site_id = ' || x_party_site_id);
2514: END IF;
2515:
2508: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2509: END IF;
2510:
2511: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2512: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Done ');
2513: IBE_UTIL.debug('party_site_id = ' || x_party_site_id);
2514: END IF;
2515:
2516: x_party_site_id := l_party_site_id;
2509: END IF;
2510:
2511: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2512: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:Done ');
2513: IBE_UTIL.debug('party_site_id = ' || x_party_site_id);
2514: END IF;
2515:
2516: x_party_site_id := l_party_site_id;
2517:
2517:
2518: EXCEPTION
2519:
2520: WHEN FND_API.G_EXC_ERROR THEN
2521: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2522: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:In the expected exception block ');
2523: END IF;
2524:
2525: x_return_status := FND_API.G_RET_STS_ERROR;
2518: EXCEPTION
2519:
2520: WHEN FND_API.G_EXC_ERROR THEN
2521: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2522: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:In the expected exception block ');
2523: END IF;
2524:
2525: x_return_status := FND_API.G_RET_STS_ERROR;
2526: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
2530: for k in 1 .. x_msg_count loop
2531: lx_msg_data := fnd_msg_pub.get( p_msg_index => k,
2532: p_encoded => 'F');
2533:
2534: IBE_UTIL.debug('Error msg: '||substr(lx_msg_data,1,240));
2535: end loop;
2536:
2537:
2538: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2535: end loop;
2536:
2537:
2538: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2539: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2540: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:In the unexpected exception block ');
2541: END IF;
2542:
2543: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2536:
2537:
2538: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2539: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2540: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:In the unexpected exception block ');
2541: END IF;
2542:
2543: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2544: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count,
2548: for k in 1 .. x_msg_count loop
2549: lx_msg_data := fnd_msg_pub.get( p_msg_index => k,
2550: p_encoded => 'F');
2551:
2552: IBE_UTIL.debug('Error msg: '||substr(lx_msg_data,1,240));
2553: end loop;
2554:
2555:
2556: WHEN OTHERS THEN
2553: end loop;
2554:
2555:
2556: WHEN OTHERS THEN
2557: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2558: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:In the others exception block ');
2559: END IF;
2560:
2561: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2554:
2555:
2556: WHEN OTHERS THEN
2557: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2558: IBE_UTIL.debug('IBE_ADDRESS_V2PVT.copy_pary_site:In the others exception block ');
2559: END IF;
2560:
2561: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2562:
2571: for k in 1 .. x_msg_count loop
2572: lx_msg_data := fnd_msg_pub.get( p_msg_index => k,
2573: p_encoded => 'F');
2574:
2575: IBE_UTIL.debug('Error msg: '||substr(lx_msg_data,1,240));
2576: end loop;
2577:
2578:
2579: END;