470:
471: -- Initialize message list if p_init_msg_list is set to TRUE.
472: IF fnd_api.to_boolean (p_init_msg_list)
473: THEN
474: fnd_msg_pub.initialize;
475: END IF;
476:
477: -- Debug Message
478: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
474: fnd_msg_pub.initialize;
475: END IF;
476:
477: -- Debug Message
478: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
479: THEN
480: fnd_message.set_name ('JTF', 'JTF_TERR_START_MSG');
481: fnd_message.set_name ('PROC_NAME', l_api_name);
482: fnd_msg_pub.add;
478: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
479: THEN
480: fnd_message.set_name ('JTF', 'JTF_TERR_START_MSG');
481: fnd_message.set_name ('PROC_NAME', l_api_name);
482: fnd_msg_pub.add;
483: END IF;
484:
485: -- Initialize API return status to success
486: x_return_status := fnd_api.g_ret_sts_success;
543: x_terrtypequal_tbl => x_terrtypequal_out_tbl
544: );
545:
546: -- Debug Message
547: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
548: THEN
549: fnd_message.set_name ('JTF', 'JTF_TERR_END_MSG');
550: fnd_message.set_name ('PROC_NAME', l_api_name);
551: fnd_msg_pub.add;
547: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
548: THEN
549: fnd_message.set_name ('JTF', 'JTF_TERR_END_MSG');
550: fnd_message.set_name ('PROC_NAME', l_api_name);
551: fnd_msg_pub.add;
552: END IF;
553:
554: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
555:
550: fnd_message.set_name ('PROC_NAME', l_api_name);
551: fnd_msg_pub.add;
552: END IF;
553:
554: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
555:
556: -- Standard check for p_commit
557: IF fnd_api.to_boolean (p_commit)
558: THEN
566: THEN
567: --dbms_output.put_line('Create_terrtype PUB: FND_API.G_EXC_ERROR');
568: ROLLBACK TO create_terrtype_pub;
569: x_return_status := fnd_api.g_ret_sts_error;
570: fnd_msg_pub.count_and_get (
571: p_count => x_msg_count,
572: p_data => x_msg_data
573: );
574: WHEN fnd_api.g_exc_unexpected_error
575: THEN
576: --dbms_output.put_line('Create_terrtype PUB: FND_API.G_EXC_UNEXPECTED_ERROR');
577: ROLLBACK TO create_terrtype_pub;
578: x_return_status := fnd_api.g_ret_sts_unexp_error;
579: fnd_msg_pub.count_and_get (
580: p_count => x_msg_count,
581: p_data => x_msg_data
582: );
583: WHEN OTHERS
585: --dbms_output.put_line('Create_terrtype PUB: OTHERS - ' || SQLERRM);
586: ROLLBACK TO create_terrtype_pub;
587: x_return_status := fnd_api.g_ret_sts_unexp_error;
588:
589: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
590: THEN
591: fnd_msg_pub.add_exc_msg (
592: 'Others exception in Create_TerrType PUB' || SQLERRM
593: );
587: x_return_status := fnd_api.g_ret_sts_unexp_error;
588:
589: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
590: THEN
591: fnd_msg_pub.add_exc_msg (
592: 'Others exception in Create_TerrType PUB' || SQLERRM
593: );
594: END IF;
595:
592: 'Others exception in Create_TerrType PUB' || SQLERRM
593: );
594: END IF;
595:
596: fnd_msg_pub.count_and_get (
597: p_count => x_msg_count,
598: p_data => x_msg_data
599: );
600: --
689:
690: -- Initialize message list if p_init_msg_list is set to TRUE.
691: IF fnd_api.to_boolean (p_init_msg_list)
692: THEN
693: fnd_msg_pub.initialize;
694: END IF;
695:
696: -- Debug Message
697: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
693: fnd_msg_pub.initialize;
694: END IF;
695:
696: -- Debug Message
697: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
698: THEN
699: fnd_message.set_name ('JTF', 'JTF_TERR_START_MSG');
700: fnd_message.set_name ('PROC_NAME', l_api_name);
701: fnd_msg_pub.add;
697: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
698: THEN
699: fnd_message.set_name ('JTF', 'JTF_TERR_START_MSG');
700: fnd_message.set_name ('PROC_NAME', l_api_name);
701: fnd_msg_pub.add;
702: END IF;
703:
704: -- Initialize API return status to success
705: x_return_status := fnd_api.g_ret_sts_success;
767: x_terrtypequal_tbl => x_terrtypequal_out_tbl
768: );
769:
770: -- Debug Message
771: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
772: THEN
773: fnd_message.set_name ('JTF', 'JTF_TERR_END_MSG');
774: fnd_message.set_name ('PROC_NAME', l_api_name);
775: fnd_msg_pub.add;
771: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
772: THEN
773: fnd_message.set_name ('JTF', 'JTF_TERR_END_MSG');
774: fnd_message.set_name ('PROC_NAME', l_api_name);
775: fnd_msg_pub.add;
776: END IF;
777:
778: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
779:
774: fnd_message.set_name ('PROC_NAME', l_api_name);
775: fnd_msg_pub.add;
776: END IF;
777:
778: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
779:
780: -- Standard check for p_commit
781: IF fnd_api.to_boolean (p_commit)
782: THEN
792: THEN
793: --dbms_output.put_line('Update_terrtype PUB: FND_API.G_EXC_ERROR');
794: ROLLBACK TO update_terrtype_pub;
795: x_return_status := fnd_api.g_ret_sts_error;
796: fnd_msg_pub.count_and_get (
797: p_count => x_msg_count,
798: p_data => x_msg_data
799: );
800: WHEN fnd_api.g_exc_unexpected_error
801: THEN
802: --dbms_output.put_line('Update_terrtype PUB: FND_API.G_EXC_UNEXPECTED_ERROR');
803: ROLLBACK TO update_terrtype_pub;
804: x_return_status := fnd_api.g_ret_sts_unexp_error;
805: fnd_msg_pub.count_and_get (
806: p_count => x_msg_count,
807: p_data => x_msg_data
808: );
809: WHEN OTHERS
811: --dbms_output.put_line('Update_terrtype PUB: OTHERS - ' || SQLERRM);
812: ROLLBACK TO update_terrtype_pub;
813: x_return_status := fnd_api.g_ret_sts_unexp_error;
814:
815: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
816: THEN
817: fnd_msg_pub.add_exc_msg (
818: 'Others exception in Update_TerrType PUB' || SQLERRM
819: );
813: x_return_status := fnd_api.g_ret_sts_unexp_error;
814:
815: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
816: THEN
817: fnd_msg_pub.add_exc_msg (
818: 'Others exception in Update_TerrType PUB' || SQLERRM
819: );
820: END IF;
821:
818: 'Others exception in Update_TerrType PUB' || SQLERRM
819: );
820: END IF;
821:
822: fnd_msg_pub.count_and_get (
823: p_count => x_msg_count,
824: p_data => x_msg_data
825: );
826: --
888:
889: -- Initialize message list if p_init_msg_list is set to TRUE.
890: IF fnd_api.to_boolean (p_init_msg_list)
891: THEN
892: fnd_msg_pub.initialize;
893: END IF;
894:
895: -- Debug Message
896: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
892: fnd_msg_pub.initialize;
893: END IF;
894:
895: -- Debug Message
896: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
897: THEN
898: fnd_message.set_name ('JTF', 'JTF_TERR_START_MSG');
899: fnd_message.set_name ('PROC_NAME', l_api_name);
900: fnd_msg_pub.add;
896: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
897: THEN
898: fnd_message.set_name ('JTF', 'JTF_TERR_START_MSG');
899: fnd_message.set_name ('PROC_NAME', l_api_name);
900: fnd_msg_pub.add;
901: END IF;
902:
903: -- Initialize API return status to success
904: x_return_status := fnd_api.g_ret_sts_success;
932: COMMIT WORK;
933: END IF;
934:
935: -- Debug Message
936: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
937: THEN
938: fnd_message.set_name ('JTF', 'JTF_TERR_END_MSG');
939: fnd_message.set_name ('PROC_NAME', l_api_name);
940: fnd_msg_pub.add;
936: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
937: THEN
938: fnd_message.set_name ('JTF', 'JTF_TERR_END_MSG');
939: fnd_message.set_name ('PROC_NAME', l_api_name);
940: fnd_msg_pub.add;
941: END IF;
942:
943: -- Standard call to get message count and if count is 1, get message info.
944: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
940: fnd_msg_pub.add;
941: END IF;
942:
943: -- Standard call to get message count and if count is 1, get message info.
944: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
945: --dbms_output.put_line('Delete_terrtype PUB: Exiting API');
946: EXCEPTION
947: WHEN fnd_api.g_exc_error
948: THEN
948: THEN
949: --dbms_output.put_line('Delete__terrtype PUB: FND_API.G_EXC_ERROR');
950: ROLLBACK TO delete_terrtype_pub;
951: x_return_status := fnd_api.g_ret_sts_error;
952: fnd_msg_pub.count_and_get (
953: p_count => x_msg_count,
954: p_data => x_msg_data
955: );
956: WHEN fnd_api.g_exc_unexpected_error
957: THEN
958: --dbms_output.put_line('Delete__terrtype PUB: FND_API.G_EXC_UNEXPECTED_ERROR');
959: ROLLBACK TO delete_terrtype_pub;
960: x_return_status := fnd_api.g_ret_sts_unexp_error;
961: fnd_msg_pub.count_and_get (
962: p_count => x_msg_count,
963: p_data => x_msg_data
964: );
965: WHEN OTHERS
967: --dbms_output.put_line('Delete__terrtype PUB: OTHERS - ' || SQLERRM);
968: ROLLBACK TO delete_terrtype_pub;
969: x_return_status := fnd_api.g_ret_sts_unexp_error;
970:
971: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
972: THEN
973: fnd_msg_pub.add_exc_msg (
974: 'Others exception in Delete_TerrType PUB' || SQLERRM
975: );
969: x_return_status := fnd_api.g_ret_sts_unexp_error;
970:
971: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
972: THEN
973: fnd_msg_pub.add_exc_msg (
974: 'Others exception in Delete_TerrType PUB' || SQLERRM
975: );
976: END IF;
977:
974: 'Others exception in Delete_TerrType PUB' || SQLERRM
975: );
976: END IF;
977:
978: fnd_msg_pub.count_and_get (
979: p_count => x_msg_count,
980: p_data => x_msg_data
981: );
982: --
1042:
1043: -- Initialize message list if p_init_msg_list is set to TRUE.
1044: IF fnd_api.to_boolean (p_init_msg_list)
1045: THEN
1046: fnd_msg_pub.initialize;
1047: END IF;
1048:
1049: -- Debug Message
1050: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
1046: fnd_msg_pub.initialize;
1047: END IF;
1048:
1049: -- Debug Message
1050: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
1051: THEN
1052: fnd_message.set_name ('JTF', 'JTF_TERR_START_MSG');
1053: fnd_message.set_name ('PROC_NAME', l_api_name);
1054: fnd_msg_pub.add;
1050: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
1051: THEN
1052: fnd_message.set_name ('JTF', 'JTF_TERR_START_MSG');
1053: fnd_message.set_name ('PROC_NAME', l_api_name);
1054: fnd_msg_pub.add;
1055: END IF;
1056:
1057: -- Initialize API return status to success
1058: x_return_status := fnd_api.g_ret_sts_success;
1086: COMMIT WORK;
1087: END IF;
1088:
1089: -- Debug Message
1090: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
1091: THEN
1092: fnd_message.set_name ('JTF', 'JTF_TERR_END_MSG');
1093: fnd_message.set_name ('PROC_NAME', l_api_name);
1094: fnd_msg_pub.add;
1090: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_debug_low)
1091: THEN
1092: fnd_message.set_name ('JTF', 'JTF_TERR_END_MSG');
1093: fnd_message.set_name ('PROC_NAME', l_api_name);
1094: fnd_msg_pub.add;
1095: END IF;
1096:
1097: -- Standard call to get message count and if count is 1, get message info.
1098: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1094: fnd_msg_pub.add;
1095: END IF;
1096:
1097: -- Standard call to get message count and if count is 1, get message info.
1098: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
1099: --dbms_output.put_line('De-Activate_terrtype PUB: Exiting API');
1100: EXCEPTION
1101: WHEN fnd_api.g_exc_error
1102: THEN
1102: THEN
1103: --dbms_output.put_line('De-Activate_terrtype PUB: FND_API.G_EXC_ERROR');
1104: ROLLBACK TO deactivate_terrtype_pub;
1105: x_return_status := fnd_api.g_ret_sts_error;
1106: fnd_msg_pub.count_and_get (
1107: p_count => x_msg_count,
1108: p_data => x_msg_data
1109: );
1110: WHEN fnd_api.g_exc_unexpected_error
1111: THEN
1112: --dbms_output.put_line('De-Activate_terrtype PUB: FND_API.G_EXC_UNEXPECTED_ERROR');
1113: ROLLBACK TO deactivate_terrtype_pub;
1114: x_return_status := fnd_api.g_ret_sts_unexp_error;
1115: fnd_msg_pub.count_and_get (
1116: p_count => x_msg_count,
1117: p_data => x_msg_data
1118: );
1119: WHEN OTHERS
1121: --dbms_output.put_line('De-Activate_terrtype PUB: OTHERS - ' || SQLERRM);
1122: ROLLBACK TO deactivate_terrtype_pub;
1123: x_return_status := fnd_api.g_ret_sts_unexp_error;
1124:
1125: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1126: THEN
1127: fnd_msg_pub.add_exc_msg (
1128: 'Others exception in Deactivate_TerrType PUB' || SQLERRM
1129: );
1123: x_return_status := fnd_api.g_ret_sts_unexp_error;
1124:
1125: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1126: THEN
1127: fnd_msg_pub.add_exc_msg (
1128: 'Others exception in Deactivate_TerrType PUB' || SQLERRM
1129: );
1130: END IF;
1131:
1128: 'Others exception in Deactivate_TerrType PUB' || SQLERRM
1129: );
1130: END IF;
1131:
1132: fnd_msg_pub.count_and_get (
1133: p_count => x_msg_count,
1134: p_data => x_msg_data
1135: );
1136: --