37: end if;
38: end get_id;
39:
40: PROCEDURE get_cont_per_profile_bo(
41: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
42: p_person_id IN NUMBER,
43: p_action_type IN VARCHAR2 := NULL,
44: x_person_profile_obj OUT NOCOPY HZ_PERSON_PROFILE_OBJ,
45: x_return_status OUT NOCOPY VARCHAR2,
183: BEGIN
184:
185:
186: -- initialize API return status to success.
187: x_return_status := FND_API.G_RET_STS_SUCCESS;
188:
189: -- Initialize message list if p_init_msg_list is set to TRUE
190: IF FND_API.to_Boolean(p_init_msg_list) THEN
191: FND_MSG_PUB.initialize;
186: -- initialize API return status to success.
187: x_return_status := FND_API.G_RET_STS_SUCCESS;
188:
189: -- Initialize message list if p_init_msg_list is set to TRUE
190: IF FND_API.to_Boolean(p_init_msg_list) THEN
191: FND_MSG_PUB.initialize;
192: END IF;
193:
194:
220:
221:
222: EXCEPTION
223:
224: WHEN fnd_api.g_exc_error THEN
225: x_return_status := fnd_api.g_ret_sts_error;
226:
227: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
228: p_count => x_msg_count,
221:
222: EXCEPTION
223:
224: WHEN fnd_api.g_exc_error THEN
225: x_return_status := fnd_api.g_ret_sts_error;
226:
227: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
228: p_count => x_msg_count,
229: p_data => x_msg_data);
223:
224: WHEN fnd_api.g_exc_error THEN
225: x_return_status := fnd_api.g_ret_sts_error;
226:
227: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
228: p_count => x_msg_count,
229: p_data => x_msg_data);
230:
231: -- Debug info.
239: hz_utility_v2pub.debug(p_message=>'get_cont_per_profile_bo (-)',
240: p_prefix=>l_debug_prefix,
241: p_msg_level=>fnd_log.level_procedure);
242: END IF;
243: WHEN fnd_api.g_exc_unexpected_error THEN
244: x_return_status := fnd_api.g_ret_sts_unexp_error;
245:
246: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
247: p_count => x_msg_count,
240: p_prefix=>l_debug_prefix,
241: p_msg_level=>fnd_log.level_procedure);
242: END IF;
243: WHEN fnd_api.g_exc_unexpected_error THEN
244: x_return_status := fnd_api.g_ret_sts_unexp_error;
245:
246: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
247: p_count => x_msg_count,
248: p_data => x_msg_data);
242: END IF;
243: WHEN fnd_api.g_exc_unexpected_error THEN
244: x_return_status := fnd_api.g_ret_sts_unexp_error;
245:
246: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
247: p_count => x_msg_count,
248: p_data => x_msg_data);
249:
250: -- Debug info.
259: p_prefix=>l_debug_prefix,
260: p_msg_level=>fnd_log.level_procedure);
261: END IF;
262: WHEN OTHERS THEN
263: x_return_status := fnd_api.g_ret_sts_unexp_error;
264:
265: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
266: fnd_message.set_token('ERROR' ,SQLERRM);
267: fnd_msg_pub.add;
265: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
266: fnd_message.set_token('ERROR' ,SQLERRM);
267: fnd_msg_pub.add;
268:
269: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
270: p_count => x_msg_count,
271: p_data => x_msg_data);
272:
273: -- Debug info.
285:
286: end;
287:
288: PROCEDURE get_org_contact_role_bos(
289: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
290: p_org_cont_id IN NUMBER,
291: p_action_type IN VARCHAR2 := NULL,
292: x_org_cont_role_objs OUT NOCOPY HZ_ORG_CONTACT_ROLE_OBJ_TBL,
293: x_return_status OUT NOCOPY VARCHAR2,
367: BEGIN
368:
369:
370: -- initialize API return status to success.
371: x_return_status := FND_API.G_RET_STS_SUCCESS;
372:
373: -- Initialize message list if p_init_msg_list is set to TRUE
374: IF FND_API.to_Boolean(p_init_msg_list) THEN
375: FND_MSG_PUB.initialize;
370: -- initialize API return status to success.
371: x_return_status := FND_API.G_RET_STS_SUCCESS;
372:
373: -- Initialize message list if p_init_msg_list is set to TRUE
374: IF FND_API.to_Boolean(p_init_msg_list) THEN
375: FND_MSG_PUB.initialize;
376: END IF;
377:
378:
405:
406:
407: EXCEPTION
408:
409: WHEN fnd_api.g_exc_error THEN
410: x_return_status := fnd_api.g_ret_sts_error;
411:
412: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
413: p_count => x_msg_count,
406:
407: EXCEPTION
408:
409: WHEN fnd_api.g_exc_error THEN
410: x_return_status := fnd_api.g_ret_sts_error;
411:
412: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
413: p_count => x_msg_count,
414: p_data => x_msg_data);
408:
409: WHEN fnd_api.g_exc_error THEN
410: x_return_status := fnd_api.g_ret_sts_error;
411:
412: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
413: p_count => x_msg_count,
414: p_data => x_msg_data);
415:
416: -- Debug info.
424: hz_utility_v2pub.debug(p_message=>'get_org_contact_role_bos (-)',
425: p_prefix=>l_debug_prefix,
426: p_msg_level=>fnd_log.level_procedure);
427: END IF;
428: WHEN fnd_api.g_exc_unexpected_error THEN
429: x_return_status := fnd_api.g_ret_sts_unexp_error;
430:
431: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
432: p_count => x_msg_count,
425: p_prefix=>l_debug_prefix,
426: p_msg_level=>fnd_log.level_procedure);
427: END IF;
428: WHEN fnd_api.g_exc_unexpected_error THEN
429: x_return_status := fnd_api.g_ret_sts_unexp_error;
430:
431: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
432: p_count => x_msg_count,
433: p_data => x_msg_data);
427: END IF;
428: WHEN fnd_api.g_exc_unexpected_error THEN
429: x_return_status := fnd_api.g_ret_sts_unexp_error;
430:
431: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
432: p_count => x_msg_count,
433: p_data => x_msg_data);
434:
435: -- Debug info.
444: p_prefix=>l_debug_prefix,
445: p_msg_level=>fnd_log.level_procedure);
446: END IF;
447: WHEN OTHERS THEN
448: x_return_status := fnd_api.g_ret_sts_unexp_error;
449:
450: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
451: fnd_message.set_token('ERROR' ,SQLERRM);
452: fnd_msg_pub.add;
450: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
451: fnd_message.set_token('ERROR' ,SQLERRM);
452: fnd_msg_pub.add;
453:
454: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
455: p_count => x_msg_count,
456: p_data => x_msg_data);
457:
458: -- Debug info.
482: -- EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
483: --
484: -- ARGUMENTS
485: -- IN:
486: -- p_init_msg_list Initialize message stack if it is set to FND_API.G_TRUE. Default is FND_API.G_FALSE.
487: -- p_organization_id Org Contact Org id.
488: --
489: -- OUT:
490: -- x_org contact_objs Table of org contact objects.
488: --
489: -- OUT:
490: -- x_org contact_objs Table of org contact objects.
491: -- x_return_status Return status after the call. The status can
492: -- be fnd_api.g_ret_sts_success (success),
493: -- fnd_api.g_ret_sts_error (error),
494: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
495: -- x_msg_count Number of messages in message stack.
496: -- x_msg_data Message text if x_msg_count is 1.
489: -- OUT:
490: -- x_org contact_objs Table of org contact objects.
491: -- x_return_status Return status after the call. The status can
492: -- be fnd_api.g_ret_sts_success (success),
493: -- fnd_api.g_ret_sts_error (error),
494: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
495: -- x_msg_count Number of messages in message stack.
496: -- x_msg_data Message text if x_msg_count is 1.
497: --
490: -- x_org contact_objs Table of org contact objects.
491: -- x_return_status Return status after the call. The status can
492: -- be fnd_api.g_ret_sts_success (success),
493: -- fnd_api.g_ret_sts_error (error),
494: -- FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
495: -- x_msg_count Number of messages in message stack.
496: -- x_msg_data Message text if x_msg_count is 1.
497: --
498: -- NOTES
505:
506:
507:
508: PROCEDURE get_org_contact_bos(
509: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
510: p_organization_id IN NUMBER,
511: p_org_contact_id IN NUMBER := NULL,
512: p_action_type IN VARCHAR2 := NULL,
513: x_org_contact_objs OUT NOCOPY HZ_ORG_CONTACT_BO_TBL,
595: BEGIN
596:
597:
598: -- initialize API return status to success.
599: x_return_status := FND_API.G_RET_STS_SUCCESS;
600:
601: -- Initialize message list if p_init_msg_list is set to TRUE
602: IF FND_API.to_Boolean(p_init_msg_list) THEN
603: FND_MSG_PUB.initialize;
598: -- initialize API return status to success.
599: x_return_status := FND_API.G_RET_STS_SUCCESS;
600:
601: -- Initialize message list if p_init_msg_list is set to TRUE
602: IF FND_API.to_Boolean(p_init_msg_list) THEN
603: FND_MSG_PUB.initialize;
604: END IF;
605:
606:
619:
620: for i in 1..x_org_contact_objs.count loop
621:
622: get_cont_per_profile_bo(
623: p_init_msg_list => fnd_api.g_false,
624: p_person_id => get_id(x_org_contact_objs(i).org_contact_id,'PERSON'),
625: p_action_type => p_action_type,
626: x_person_profile_obj => x_org_contact_objs(i).person_profile_obj,
627: x_return_status => x_return_status,
627: x_return_status => x_return_status,
628: x_msg_count => x_msg_count,
629: x_msg_data => x_msg_data);
630:
631: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
632: RAISE FND_API.G_EXC_ERROR;
633: END IF;
634:
635: get_org_contact_role_bos(
628: x_msg_count => x_msg_count,
629: x_msg_data => x_msg_data);
630:
631: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
632: RAISE FND_API.G_EXC_ERROR;
633: END IF;
634:
635: get_org_contact_role_bos(
636: p_init_msg_list => fnd_api.g_false,
632: RAISE FND_API.G_EXC_ERROR;
633: END IF;
634:
635: get_org_contact_role_bos(
636: p_init_msg_list => fnd_api.g_false,
637: p_org_cont_id => x_org_contact_objs(i).org_contact_id,
638: p_action_type => p_action_type,
639: x_org_cont_role_objs => x_org_contact_objs(i).org_contact_role_objs,
640: x_return_status => x_return_status,
640: x_return_status => x_return_status,
641: x_msg_count => x_msg_count,
642: x_msg_data => x_msg_data);
643:
644: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
645: RAISE FND_API.G_EXC_ERROR;
646: END IF;
647:
648: HZ_EXTRACT_ORIG_SYS_REF_BO_PVT.get_orig_sys_ref_bos
641: x_msg_count => x_msg_count,
642: x_msg_data => x_msg_data);
643:
644: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
645: RAISE FND_API.G_EXC_ERROR;
646: END IF;
647:
648: HZ_EXTRACT_ORIG_SYS_REF_BO_PVT.get_orig_sys_ref_bos
649: (p_init_msg_list => fnd_api.g_false,
645: RAISE FND_API.G_EXC_ERROR;
646: END IF;
647:
648: HZ_EXTRACT_ORIG_SYS_REF_BO_PVT.get_orig_sys_ref_bos
649: (p_init_msg_list => fnd_api.g_false,
650: p_owner_table_id => x_org_contact_objs(i).org_contact_id,
651: p_owner_table_name => 'HZ_ORG_CONTACTS',
652: p_action_type => NULL, --p_action_type,
653: x_orig_sys_ref_objs => x_org_contact_objs(i).orig_sys_objs,
654: x_return_status => x_return_status,
655: x_msg_count => x_msg_count,
656: x_msg_data => x_msg_data);
657:
658: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
659: RAISE FND_API.G_EXC_ERROR;
660: END IF;
661:
662: l_rel_party_id := get_id(x_org_contact_objs(i).org_contact_id,'REL_PARTY');
655: x_msg_count => x_msg_count,
656: x_msg_data => x_msg_data);
657:
658: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
659: RAISE FND_API.G_EXC_ERROR;
660: END IF;
661:
662: l_rel_party_id := get_id(x_org_contact_objs(i).org_contact_id,'REL_PARTY');
663:
661:
662: l_rel_party_id := get_id(x_org_contact_objs(i).org_contact_id,'REL_PARTY');
663:
664: HZ_EXTRACT_PARTY_SITE_BO_PVT.get_party_site_bos
665: (p_init_msg_list => fnd_api.g_false,
666: p_party_id => l_rel_party_id,
667: p_party_site_id => NULL,
668: p_action_type => p_action_type,
669: x_party_site_objs => x_org_contact_objs(i).party_site_objs,
670: x_return_status => x_return_status,
671: x_msg_count => x_msg_count,
672: x_msg_data => x_msg_data);
673:
674: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
675: RAISE FND_API.G_EXC_ERROR;
676: END IF;
677:
678:
671: x_msg_count => x_msg_count,
672: x_msg_data => x_msg_data);
673:
674: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
675: RAISE FND_API.G_EXC_ERROR;
676: END IF;
677:
678:
679: hz_extract_cont_point_bo_pvt.get_phone_bos
676: END IF;
677:
678:
679: hz_extract_cont_point_bo_pvt.get_phone_bos
680: (p_init_msg_list => fnd_api.g_false,
681: p_phone_id => null,
682: p_parent_id => l_rel_party_id,
683: p_parent_table_name => 'HZ_PARTIES',
684: p_action_type => p_action_type,
686: x_return_status => x_return_status,
687: x_msg_count => x_msg_count,
688: x_msg_data => x_msg_data);
689:
690: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
691: RAISE FND_API.G_EXC_ERROR;
692: END IF;
693:
694:
687: x_msg_count => x_msg_count,
688: x_msg_data => x_msg_data);
689:
690: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
691: RAISE FND_API.G_EXC_ERROR;
692: END IF;
693:
694:
695: hz_extract_cont_point_bo_pvt.get_email_bos
692: END IF;
693:
694:
695: hz_extract_cont_point_bo_pvt.get_email_bos
696: (p_init_msg_list => fnd_api.g_false,
697: p_email_id => null,
698: p_parent_id => l_rel_party_id,
699: p_parent_table_name => 'HZ_PARTIES',
700: p_action_type => p_action_type,
702: x_return_status => x_return_status,
703: x_msg_count => x_msg_count,
704: x_msg_data => x_msg_data);
705:
706: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
707: RAISE FND_API.G_EXC_ERROR;
708: END IF;
709:
710:
703: x_msg_count => x_msg_count,
704: x_msg_data => x_msg_data);
705:
706: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
707: RAISE FND_API.G_EXC_ERROR;
708: END IF;
709:
710:
711: hz_extract_cont_point_bo_pvt.get_telex_bos
708: END IF;
709:
710:
711: hz_extract_cont_point_bo_pvt.get_telex_bos
712: (p_init_msg_list => fnd_api.g_false,
713: p_telex_id => null,
714: p_parent_id => l_rel_party_id,
715: p_parent_table_name => 'HZ_PARTIES',
716: x_telex_objs => x_org_contact_objs(i).telex_objs,
717: x_return_status => x_return_status,
718: x_msg_count => x_msg_count,
719: x_msg_data => x_msg_data);
720:
721: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
722: RAISE FND_API.G_EXC_ERROR;
723: END IF;
724:
725:
718: x_msg_count => x_msg_count,
719: x_msg_data => x_msg_data);
720:
721: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
722: RAISE FND_API.G_EXC_ERROR;
723: END IF;
724:
725:
726: hz_extract_cont_point_bo_pvt.get_web_bos
723: END IF;
724:
725:
726: hz_extract_cont_point_bo_pvt.get_web_bos
727: (p_init_msg_list => fnd_api.g_false,
728: p_web_id => null,
729: p_parent_id => l_rel_party_id,
730: p_parent_table_name => 'HZ_PARTIES',
731: p_action_type => p_action_type,
733: x_return_status => x_return_status,
734: x_msg_count => x_msg_count,
735: x_msg_data => x_msg_data);
736:
737: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
738: RAISE FND_API.G_EXC_ERROR;
739: END IF;
740:
741:
734: x_msg_count => x_msg_count,
735: x_msg_data => x_msg_data);
736:
737: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
738: RAISE FND_API.G_EXC_ERROR;
739: END IF;
740:
741:
742: hz_extract_cont_point_bo_pvt.get_sms_bos
739: END IF;
740:
741:
742: hz_extract_cont_point_bo_pvt.get_sms_bos
743: (p_init_msg_list => fnd_api.g_false,
744: p_sms_id => null,
745: p_parent_id => l_rel_party_id,
746: p_parent_table_name => 'HZ_PARTIES',
747: p_action_type => p_action_type,
749: x_return_status => x_return_status,
750: x_msg_count => x_msg_count,
751: x_msg_data => x_msg_data);
752:
753: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
754: RAISE FND_API.G_EXC_ERROR;
755: END IF;
756:
757:
750: x_msg_count => x_msg_count,
751: x_msg_data => x_msg_data);
752:
753: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
754: RAISE FND_API.G_EXC_ERROR;
755: END IF;
756:
757:
758: hz_extract_cont_point_bo_pvt.get_cont_pref_objs
755: END IF;
756:
757:
758: hz_extract_cont_point_bo_pvt.get_cont_pref_objs
759: (p_init_msg_list => fnd_api.g_false,
760: p_cont_level_table_id => l_rel_party_id,
761: p_cont_level_table => 'HZ_PARTIES',
762: p_contact_type => NULL,
763: p_action_type => p_action_type,
765: x_return_status => x_return_status,
766: x_msg_count => x_msg_count,
767: x_msg_data => x_msg_data);
768:
769: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
770: RAISE FND_API.G_EXC_ERROR;
771: END IF;
772:
773:
766: x_msg_count => x_msg_count,
767: x_msg_data => x_msg_data);
768:
769: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
770: RAISE FND_API.G_EXC_ERROR;
771: END IF;
772:
773:
774: end loop;
790:
791:
792: EXCEPTION
793:
794: WHEN fnd_api.g_exc_error THEN
795: x_return_status := fnd_api.g_ret_sts_error;
796:
797: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
798: p_count => x_msg_count,
791:
792: EXCEPTION
793:
794: WHEN fnd_api.g_exc_error THEN
795: x_return_status := fnd_api.g_ret_sts_error;
796:
797: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
798: p_count => x_msg_count,
799: p_data => x_msg_data);
793:
794: WHEN fnd_api.g_exc_error THEN
795: x_return_status := fnd_api.g_ret_sts_error;
796:
797: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
798: p_count => x_msg_count,
799: p_data => x_msg_data);
800:
801: -- Debug info.
809: hz_utility_v2pub.debug(p_message=>'get_org_contact_bos (-)',
810: p_prefix=>l_debug_prefix,
811: p_msg_level=>fnd_log.level_procedure);
812: END IF;
813: WHEN fnd_api.g_exc_unexpected_error THEN
814: x_return_status := fnd_api.g_ret_sts_unexp_error;
815:
816: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
817: p_count => x_msg_count,
810: p_prefix=>l_debug_prefix,
811: p_msg_level=>fnd_log.level_procedure);
812: END IF;
813: WHEN fnd_api.g_exc_unexpected_error THEN
814: x_return_status := fnd_api.g_ret_sts_unexp_error;
815:
816: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
817: p_count => x_msg_count,
818: p_data => x_msg_data);
812: END IF;
813: WHEN fnd_api.g_exc_unexpected_error THEN
814: x_return_status := fnd_api.g_ret_sts_unexp_error;
815:
816: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
817: p_count => x_msg_count,
818: p_data => x_msg_data);
819:
820: -- Debug info.
829: p_prefix=>l_debug_prefix,
830: p_msg_level=>fnd_log.level_procedure);
831: END IF;
832: WHEN OTHERS THEN
833: x_return_status := fnd_api.g_ret_sts_unexp_error;
834:
835: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
836: fnd_message.set_token('ERROR' ,SQLERRM);
837: fnd_msg_pub.add;
835: fnd_message.set_name('AR', 'HZ_API_OTHERS_EXCEP');
836: fnd_message.set_token('ERROR' ,SQLERRM);
837: fnd_msg_pub.add;
838:
839: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
840: p_count => x_msg_count,
841: p_data => x_msg_data);
842:
843: -- Debug info.