72: END IF;
73:
74: -- Initialize message list if p_init_msg_list is set to TRUE
75: IF FND_API.to_boolean(p_init_msg_list) THEN
76: FND_MSG_PUB.initialize;
77: END IF;
78:
79: -- Initialize API rturn status to success
80: x_return_status := FND_API.g_ret_sts_success;
90: OR (p_start_id = -1 AND p_batch_size = 0) THEN
91: FND_MESSAGE.set_name('IBE', 'IBE_DSP_QUERY_INVLD');
92: FND_MESSAGE.set_token('0', p_start_id);
93: FND_MESSAGE.set_token('1', p_batch_size);
94: FND_MSG_PUB.add;
95: RAISE FND_API.g_exc_unexpected_error;
96: END IF;
97:
98: IF p_deliverable_id IS NOT NULL THEN
117: FETCH l_ath_cv INTO x_row_count;
118: CLOSE l_ath_cv;
119:
120: IF x_row_count = 0 THEN
121: FND_MSG_PUB.count_and_get(
122: p_encoded => FND_API.g_false,
123: p_count => x_msg_count,
124: p_data => x_msg_data
125: );
140:
141: -- Get matchined rows
142: IF p_start_id > -1 THEN
143: IF p_start_id >= x_row_count THEN
144: FND_MSG_PUB.count_and_get(
145: p_encoded => FND_API.g_false,
146: p_count => x_msg_count,
147: p_data => x_msg_data
148: );
250: END LOOP;
251: END IF;
252:
253: -- Standard call to get message count and if count is 1, get message info
254: FND_MSG_PUB.count_and_get(
255: p_encoded => FND_API.g_false,
256: p_count => x_msg_count,
257: p_data => x_msg_data
258: );
262: EXCEPTION
263:
264: WHEN FND_API.g_exc_unexpected_error THEN
265: x_return_status := FND_API.g_ret_sts_unexp_error ;
266: FND_MSG_PUB.count_and_get(
267: p_encoded => FND_API.g_false,
268: p_count => x_msg_count,
269: p_data => x_msg_data
270: );
271:
272: WHEN OTHERS THEN
273: x_return_status := FND_API.g_ret_sts_unexp_error ;
274:
275: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
276: END IF;
277:
278: FND_MSG_PUB.count_and_get(
279: p_encoded => FND_API.g_false,
274:
275: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
276: END IF;
277:
278: FND_MSG_PUB.count_and_get(
279: p_encoded => FND_API.g_false,
280: p_count => x_msg_count,
281: p_data => x_msg_data
282: );
334: END IF;
335:
336: -- Initialize message list if p_init_msg_list is set to TRUE
337: IF FND_API.to_boolean(p_init_msg_list) THEN
338: FND_MSG_PUB.initialize;
339: END IF;
340:
341: -- Initialize API rturn status to success
342: x_return_status := FND_API.g_ret_sts_success;
531: COMMIT;
532: END IF;
533:
534: -- Standard call to get message count and if count is 1, get message info
535: FND_MSG_PUB.count_and_get(
536: p_encoded => FND_API.g_false,
537: p_count => x_msg_count,
538: p_data => x_msg_data
539: );
543: WHEN FND_API.g_exc_error THEN
544: ROLLBACK TO save_attachment_grp;
545: x_return_status := FND_API.g_ret_sts_error;
546: p_attachment_rec.x_action_status := FND_API.g_ret_sts_error;
547: FND_MSG_PUB.count_and_get(
548: p_encoded => FND_API.g_false,
549: p_count => x_msg_count,
550: p_data => x_msg_data
551: );
553: WHEN FND_API.g_exc_unexpected_error THEN
554: ROLLBACK TO save_attachment_grp;
555: x_return_status := FND_API.g_ret_sts_unexp_error ;
556: p_attachment_rec.x_action_status := FND_API.g_ret_sts_unexp_error;
557: FND_MSG_PUB.count_and_get(
558: p_encoded => FND_API.g_false,
559: p_count => x_msg_count,
560: p_data => x_msg_data
561: );
564: ROLLBACK TO save_attachment_grp;
565: x_return_status := FND_API.g_ret_sts_unexp_error ;
566: p_attachment_rec.x_action_status := FND_API.g_ret_sts_unexp_error;
567:
568: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
569: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
570: END IF;
571:
572: FND_MSG_PUB.count_and_get(
565: x_return_status := FND_API.g_ret_sts_unexp_error ;
566: p_attachment_rec.x_action_status := FND_API.g_ret_sts_unexp_error;
567:
568: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
569: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
570: END IF;
571:
572: FND_MSG_PUB.count_and_get(
573: p_encoded => FND_API.g_false,
568: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
569: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
570: END IF;
571:
572: FND_MSG_PUB.count_and_get(
573: p_encoded => FND_API.g_false,
574: p_count => x_msg_count,
575: p_data => x_msg_data
576: );
628: END IF;
629:
630: -- Initialize message list if p_init_msg_list is set to TRUE
631: IF FND_API.to_boolean(p_init_msg_list) THEN
632: FND_MSG_PUB.initialize;
633: END IF;
634:
635: -- Initialize API rturn status to success
636: x_return_status := FND_API.g_ret_sts_success;
665: COMMIT;
666: END IF;
667:
668: -- Standard call to get message count and if count is 1, get message info
669: FND_MSG_PUB.count_and_get(
670: p_encoded => FND_API.g_false,
671: p_count => x_msg_count,
672: p_data => x_msg_data
673: );
677:
678: WHEN FND_API.g_exc_error THEN
679: ROLLBACK TO save_attachment_grp;
680: x_return_status := FND_API.g_ret_sts_error;
681: FND_MSG_PUB.count_and_get(
682: p_encoded => FND_API.g_false,
683: p_count => x_msg_count,
684: p_data => x_msg_data
685: );
686:
687: WHEN FND_API.g_exc_unexpected_error THEN
688: ROLLBACK TO save_attachment_grp;
689: x_return_status := FND_API.g_ret_sts_unexp_error ;
690: FND_MSG_PUB.count_and_get(
691: p_encoded => FND_API.g_false,
692: p_count => x_msg_count,
693: p_data => x_msg_data
694: );
695:
696: WHEN OTHERS THEN
697: ROLLBACK TO save_attachment_grp;
698: x_return_status := FND_API.g_ret_sts_unexp_error ;
699: FND_MSG_PUB.count_and_get(
700: p_encoded => FND_API.g_false,
701: p_count => x_msg_count,
702: p_data => x_msg_data
703: );
703: );
704:
705: x_return_status := FND_API.g_ret_sts_unexp_error ;
706:
707: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
708: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
709: END IF;
710:
711: FND_MSG_PUB.count_and_get(
704:
705: x_return_status := FND_API.g_ret_sts_unexp_error ;
706:
707: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
708: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
709: END IF;
710:
711: FND_MSG_PUB.count_and_get(
712: p_encoded => FND_API.g_false,
707: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
708: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
709: END IF;
710:
711: FND_MSG_PUB.count_and_get(
712: p_encoded => FND_API.g_false,
713: p_count => x_msg_count,
714: p_data => x_msg_data
715: );
769: END IF;
770:
771: -- Initialize message list if p_init_msg_list is set to TRUE
772: IF FND_API.to_boolean(p_init_msg_list) THEN
773: FND_MSG_PUB.initialize;
774: END IF;
775:
776: -- Initialize API rturn status to success
777: x_return_status := FND_API.g_ret_sts_success;
858: ROLLBACK TO delete_one_attachment_grp;
859: x_return_status := FND_API.g_ret_sts_unexp_error ;
860: p_ath_id_ver_tbl(l_index).x_action_status
861: := FND_API.g_ret_sts_unexp_error ;
862: IF FND_MSG_PUB.check_msg_level(
863: FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
864: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
865: END IF;
866:
859: x_return_status := FND_API.g_ret_sts_unexp_error ;
860: p_ath_id_ver_tbl(l_index).x_action_status
861: := FND_API.g_ret_sts_unexp_error ;
862: IF FND_MSG_PUB.check_msg_level(
863: FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
864: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
865: END IF;
866:
867: END;
860: p_ath_id_ver_tbl(l_index).x_action_status
861: := FND_API.g_ret_sts_unexp_error ;
862: IF FND_MSG_PUB.check_msg_level(
863: FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
864: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
865: END IF;
866:
867: END;
868: END LOOP;
874: COMMIT;
875: END IF;
876:
877: -- Standard call to get message count and if count is 1, get message info
878: FND_MSG_PUB.count_and_get(
879: p_encoded => FND_API.g_false,
880: p_count => x_msg_count,
881: p_data => x_msg_data
882: );
879: p_encoded => FND_API.g_false,
880: p_count => x_msg_count,
881: p_data => x_msg_data
882: );
883: -- x_msg_count := FND_MSG_PUB.count_msg();
884: -- x_msg_data := FND_MSG_PUB.get(FND_MSG_PUB.g_last, FND_API.g_false);
885:
886: EXCEPTION
887:
880: p_count => x_msg_count,
881: p_data => x_msg_data
882: );
883: -- x_msg_count := FND_MSG_PUB.count_msg();
884: -- x_msg_data := FND_MSG_PUB.get(FND_MSG_PUB.g_last, FND_API.g_false);
885:
886: EXCEPTION
887:
888: WHEN FND_API.g_exc_error THEN
887:
888: WHEN FND_API.g_exc_error THEN
889: ROLLBACK TO delete_attachment_grp;
890: x_return_status := FND_API.g_ret_sts_error;
891: FND_MSG_PUB.count_and_get(
892: p_encoded => FND_API.g_false,
893: p_count => x_msg_count,
894: p_data => x_msg_data
895: );
896:
897: WHEN FND_API.g_exc_unexpected_error THEN
898: ROLLBACK TO delete_attachment_grp;
899: x_return_status := FND_API.g_ret_sts_unexp_error ;
900: FND_MSG_PUB.count_and_get(
901: p_encoded => FND_API.g_false,
902: p_count => x_msg_count,
903: p_data => x_msg_data
904: );
906: WHEN OTHERS THEN
907: ROLLBACK TO delete_attachment_grp;
908: x_return_status := FND_API.g_ret_sts_unexp_error ;
909:
910: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
911: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
912: END IF;
913:
914: FND_MSG_PUB.count_and_get(
907: ROLLBACK TO delete_attachment_grp;
908: x_return_status := FND_API.g_ret_sts_unexp_error ;
909:
910: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
911: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
912: END IF;
913:
914: FND_MSG_PUB.count_and_get(
915: p_encoded => FND_API.g_false,
910: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
911: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
912: END IF;
913:
914: FND_MSG_PUB.count_and_get(
915: p_encoded => FND_API.g_false,
916: p_count => x_msg_count,
917: p_data => x_msg_data
918: );