122:
123: -------------------- put required items here ---------------------
124:
125: --IF p_act_attachment_rec.xxx IS NULL THEN
126: -- IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
127: -- FND_MESSAGE.set_name('JTF', 'JTF_AMV_API_RECORD_NOT_FOUND');
128: -- FND_MSG_PUB.add;
129: -- END IF;
130:
124:
125: --IF p_act_attachment_rec.xxx IS NULL THEN
126: -- IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
127: -- FND_MESSAGE.set_name('JTF', 'JTF_AMV_API_RECORD_NOT_FOUND');
128: -- FND_MSG_PUB.add;
129: -- END IF;
130:
131: -- x_return_status := FND_API.g_ret_sts_error;
132: -- RETURN;
160: IF check_uniqueness(
161: 'jtf_amv_attachments',
162: 'attachment_id = ' || p_act_attachment_rec.attachment_id
163: ) = FND_API.g_false THEN
164: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
165: FND_MESSAGE.set_name('JTF', 'JTF_AMV_ACT_ATTACH_DUPL_ID');
166: FND_MSG_PUB.add;
167: END IF;
168: x_return_status := FND_API.g_ret_sts_error;
162: 'attachment_id = ' || p_act_attachment_rec.attachment_id
163: ) = FND_API.g_false THEN
164: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
165: FND_MESSAGE.set_name('JTF', 'JTF_AMV_ACT_ATTACH_DUPL_ID');
166: FND_MSG_PUB.add;
167: END IF;
168: x_return_status := FND_API.g_ret_sts_error;
169: RETURN;
170: END IF;
198: 'status_code',
199: 'p_act_attachment_rec.xxx'
200: ) = FND_API.g_false
201: THEN
202: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
203: THEN
204: FND_MESSAGE.set_name('JTF', 'JTF_AMV_ACT_ATTACH_BAD_XXX');
205: FND_MSG_PUB.add;
206: END IF;
201: THEN
202: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
203: THEN
204: FND_MESSAGE.set_name('JTF', 'JTF_AMV_ACT_ATTACH_BAD_XXX');
205: FND_MSG_PUB.add;
206: END IF;
207:
208: x_return_status := FND_API.g_ret_sts_error;
209: RETURN;
258: IF p_act_attachment_rec.enabled_flag <> FND_API.g_miss_char
259: AND p_act_attachment_rec.enabled_flag IS NOT NULL
260: THEN
261: IF is_Y_or_N(p_act_attachment_rec.enabled_flag) = FND_API.g_false THEN
262: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
263: THEN
264: FND_MESSAGE.set_name('JTF', 'JTF_AMV_ACT_ATTACH_BAD_FLAG');
265: FND_MSG_PUB.add;
266: END IF;
261: IF is_Y_or_N(p_act_attachment_rec.enabled_flag) = FND_API.g_false THEN
262: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
263: THEN
264: FND_MESSAGE.set_name('JTF', 'JTF_AMV_ACT_ATTACH_BAD_FLAG');
265: FND_MSG_PUB.add;
266: END IF;
267: x_return_status := FND_API.g_ret_sts_error;
268: RETURN;
269: END IF;
274: AND p_act_attachment_rec.can_fulfill_electronic_flag IS NOT NULL
275: THEN
276: IF is_Y_or_N(p_act_attachment_rec.can_fulfill_electronic_flag)
277: = FND_API.g_false THEN
278: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
279: FND_MESSAGE.set_name('JTF', 'JTF_AMV_BAD_CAN_FUL_ELEC');
280: FND_MSG_PUB.add;
281: END IF;
282: x_return_status := FND_API.g_ret_sts_error;
276: IF is_Y_or_N(p_act_attachment_rec.can_fulfill_electronic_flag)
277: = FND_API.g_false THEN
278: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
279: FND_MESSAGE.set_name('JTF', 'JTF_AMV_BAD_CAN_FUL_ELEC');
280: FND_MSG_PUB.add;
281: END IF;
282: x_return_status := FND_API.g_ret_sts_error;
283: RETURN;
284: END IF;
336: BEGIN
337: --------------------- initialize -----------------------
338: SAVEPOINT create_act_attachment;
339: IF FND_API.to_boolean(p_init_msg_list) THEN
340: FND_MSG_PUB.initialize;
341: END IF;
342: IF NOT FND_API.compatible_api_call
343: (
344: l_api_version,
385: OPEN c_get_deli_type_code(l_act_attachment_rec.attachment_used_by_id);
386: FETCH c_get_deli_type_code INTO l_deli_type_code;
387: IF (c_get_deli_type_code%NOTFOUND) THEN
388: CLOSE c_get_deli_type_code;
389: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
390: FND_MESSAGE.Set_name('JTF','JTF_AMV_ITEM_RECORD_MISSING');
391: FND_MESSAGE.Set_Token('ID',
392: to_char(nvl(l_act_attachment_rec.attachment_used_by_id,-1)));
393: FND_MSG_PUB.Add;
389: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
390: FND_MESSAGE.Set_name('JTF','JTF_AMV_ITEM_RECORD_MISSING');
391: FND_MESSAGE.Set_Token('ID',
392: to_char(nvl(l_act_attachment_rec.attachment_used_by_id,-1)));
393: FND_MSG_PUB.Add;
394: END IF;
395: RAISE FND_API.G_EXC_ERROR;
396: END IF;
397: CLOSE c_get_deli_type_code;
398: END IF;
399: -- Istore specific stuff.
400: IF (l_act_attachment_rec.application_id = G_ISTORE_APPL_ID) THEN
401: IF l_act_attachment_rec.file_name is null THEN
402: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
403: FND_MESSAGE.Set_name('JTF','JTF_AMV_FILENAME_NULL');
404: FND_MSG_PUB.Add;
405: END IF;
406: RAISE FND_API.G_EXC_ERROR;
400: IF (l_act_attachment_rec.application_id = G_ISTORE_APPL_ID) THEN
401: IF l_act_attachment_rec.file_name is null THEN
402: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
403: FND_MESSAGE.Set_name('JTF','JTF_AMV_FILENAME_NULL');
404: FND_MSG_PUB.Add;
405: END IF;
406: RAISE FND_API.G_EXC_ERROR;
407: END IF;
408: IF (l_act_attachment_rec.attachment_used_by = G_USED_BY_ITEM AND
407: END IF;
408: IF (l_act_attachment_rec.attachment_used_by = G_USED_BY_ITEM AND
409: l_act_attachment_rec.display_url is null AND
410: l_deli_type_code = 'MEDIA') THEN
411: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
412: FND_MESSAGE.Set_name('JTF','JTF_AMV_DISPLAY_RUL_NULL');
413: FND_MSG_PUB.Add;
414: END IF;
415: RAISE FND_API.G_EXC_ERROR;
409: l_act_attachment_rec.display_url is null AND
410: l_deli_type_code = 'MEDIA') THEN
411: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
412: FND_MESSAGE.Set_name('JTF','JTF_AMV_DISPLAY_RUL_NULL');
413: FND_MSG_PUB.Add;
414: END IF;
415: RAISE FND_API.G_EXC_ERROR;
416: END IF;
417: END IF;
535: x_act_attachment_id := l_act_attachment_rec.attachment_id;
536: IF FND_API.to_boolean(p_commit) THEN
537: COMMIT;
538: END IF;
539: FND_MSG_PUB.count_and_get
540: (
541: p_encoded => FND_API.g_false,
542: p_count => x_msg_count,
543: p_data => x_msg_data
545: EXCEPTION
546: WHEN FND_API.g_exc_error THEN
547: ROLLBACK TO create_act_attachment;
548: x_return_status := FND_API.g_ret_sts_error;
549: FND_MSG_PUB.count_and_get(
550: p_encoded => FND_API.g_false,
551: p_count => x_msg_count,
552: p_data => x_msg_data
553: );
554:
555: WHEN FND_API.g_exc_unexpected_error THEN
556: ROLLBACK TO create_act_attachment;
557: x_return_status := FND_API.g_ret_sts_unexp_error ;
558: FND_MSG_PUB.count_and_get(
559: p_encoded => FND_API.g_false,
560: p_count => x_msg_count,
561: p_data => x_msg_data
562: );
563:
564: WHEN OTHERS THEN
565: ROLLBACK TO create_act_attachment;
566: x_return_status := FND_API.g_ret_sts_unexp_error ;
567: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
568: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
569: END IF;
570: FND_MSG_PUB.count_and_get(
571: p_encoded => FND_API.g_false,
564: WHEN OTHERS THEN
565: ROLLBACK TO create_act_attachment;
566: x_return_status := FND_API.g_ret_sts_unexp_error ;
567: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
568: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
569: END IF;
570: FND_MSG_PUB.count_and_get(
571: p_encoded => FND_API.g_false,
572: p_count => x_msg_count,
566: x_return_status := FND_API.g_ret_sts_unexp_error ;
567: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
568: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
569: END IF;
570: FND_MSG_PUB.count_and_get(
571: p_encoded => FND_API.g_false,
572: p_count => x_msg_count,
573: p_data => x_msg_data
574: );
598:
599: --------------------- initialize -----------------------
600: SAVEPOINT delete_act_attachment;
601: IF FND_API.to_boolean(p_init_msg_list) THEN
602: FND_MSG_PUB.initialize;
603: END IF;
604: IF NOT FND_API.compatible_api_call(
605: l_api_version,
606: p_api_version,
616: WHERE attachment_id = p_act_attachment_id
617: AND object_version_number = p_object_version;
618:
619: IF (SQL%NOTFOUND) THEN
620: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
621: FND_MESSAGE.set_name('JTF', 'JTF_AMV_API_RECORD_NOT_FOUND');
622: FND_MSG_PUB.add;
623: END IF;
624: RAISE FND_API.g_exc_error;
618:
619: IF (SQL%NOTFOUND) THEN
620: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
621: FND_MESSAGE.set_name('JTF', 'JTF_AMV_API_RECORD_NOT_FOUND');
622: FND_MSG_PUB.add;
623: END IF;
624: RAISE FND_API.g_exc_error;
625: END IF;
626:
627: -------------------- finish --------------------------
628: IF FND_API.to_boolean(p_commit) THEN
629: COMMIT;
630: END IF;
631: FND_MSG_PUB.count_and_get(
632: p_encoded => FND_API.g_false,
633: p_count => x_msg_count,
634: p_data => x_msg_data
635: );
638:
639: WHEN FND_API.g_exc_error THEN
640: ROLLBACK TO delete_act_attachment;
641: x_return_status := FND_API.g_ret_sts_error;
642: FND_MSG_PUB.count_and_get(
643: p_encoded => FND_API.g_false,
644: p_count => x_msg_count,
645: p_data => x_msg_data
646: );
647:
648: WHEN FND_API.g_exc_unexpected_error THEN
649: ROLLBACK TO delete_act_attachment;
650: x_return_status := FND_API.g_ret_sts_unexp_error ;
651: FND_MSG_PUB.count_and_get(
652: p_encoded => FND_API.g_false,
653: p_count => x_msg_count,
654: p_data => x_msg_data
655: );
657: WHEN OTHERS THEN
658: ROLLBACK TO delete_act_attachment;
659: x_return_status := FND_API.g_ret_sts_unexp_error ;
660:
661: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
662: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
663: END IF;
664:
665: FND_MSG_PUB.count_and_get(
658: ROLLBACK TO delete_act_attachment;
659: x_return_status := FND_API.g_ret_sts_unexp_error ;
660:
661: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
662: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
663: END IF;
664:
665: FND_MSG_PUB.count_and_get(
666: p_encoded => FND_API.g_false,
661: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
662: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
663: END IF;
664:
665: FND_MSG_PUB.count_and_get(
666: p_encoded => FND_API.g_false,
667: p_count => x_msg_count,
668: p_data => x_msg_data
669: );
705: BEGIN
706: -------------------- initialize -------------------------
707: SAVEPOINT update_act_attachment;
708: IF FND_API.to_boolean(p_init_msg_list) THEN
709: FND_MSG_PUB.initialize;
710: END IF;
711: IF NOT FND_API.compatible_api_call
712: (
713: l_api_version,
756: OPEN c_get_deli_type_code(l_act_attachment_rec.attachment_used_by_id);
757: FETCH c_get_deli_type_code INTO l_deli_type_code;
758: IF (c_get_deli_type_code%NOTFOUND) THEN
759: CLOSE c_get_deli_type_code;
760: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
761: FND_MESSAGE.Set_name('JTF','JTF_AMV_ITEM_RECORD_MISSING');
762: FND_MESSAGE.Set_Token('ID',
763: to_char(nvl(l_act_attachment_rec.attachment_used_by_id,-1)));
764: FND_MSG_PUB.Add;
760: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
761: FND_MESSAGE.Set_name('JTF','JTF_AMV_ITEM_RECORD_MISSING');
762: FND_MESSAGE.Set_Token('ID',
763: to_char(nvl(l_act_attachment_rec.attachment_used_by_id,-1)));
764: FND_MSG_PUB.Add;
765: END IF;
766: RAISE FND_API.G_EXC_ERROR;
767: END IF;
768: CLOSE c_get_deli_type_code;
768: CLOSE c_get_deli_type_code;
769: END IF;
770: IF (l_act_attachment_rec.application_id = G_ISTORE_APPL_ID) THEN
771: IF l_act_attachment_rec.file_name is null THEN
772: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
773: FND_MESSAGE.Set_name('JTF','JTF_AMV_FILENAME_NULL');
774: FND_MSG_PUB.Add;
775: END IF;
776: RAISE FND_API.G_EXC_ERROR;
770: IF (l_act_attachment_rec.application_id = G_ISTORE_APPL_ID) THEN
771: IF l_act_attachment_rec.file_name is null THEN
772: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
773: FND_MESSAGE.Set_name('JTF','JTF_AMV_FILENAME_NULL');
774: FND_MSG_PUB.Add;
775: END IF;
776: RAISE FND_API.G_EXC_ERROR;
777: END IF;
778: IF (l_act_attachment_rec.attachment_used_by = G_USED_BY_ITEM AND
777: END IF;
778: IF (l_act_attachment_rec.attachment_used_by = G_USED_BY_ITEM AND
779: l_act_attachment_rec.display_url is null AND
780: l_deli_type_code = 'MEDIA') THEN
781: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
782: FND_MESSAGE.Set_name('JTF','JTF_AMV_DISPLAY_RUL_NULL');
783: FND_MSG_PUB.Add;
784: END IF;
785: RAISE FND_API.G_EXC_ERROR;
779: l_act_attachment_rec.display_url is null AND
780: l_deli_type_code = 'MEDIA') THEN
781: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
782: FND_MESSAGE.Set_name('JTF','JTF_AMV_DISPLAY_RUL_NULL');
783: FND_MSG_PUB.Add;
784: END IF;
785: RAISE FND_API.G_EXC_ERROR;
786: END IF;
787: END IF;
840: WHERE attachment_id = l_act_attachment_rec.attachment_id
841: AND object_version_number = l_act_attachment_rec.object_version_number;
842:
843: IF (SQL%NOTFOUND) THEN
844: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
845: FND_MESSAGE.set_name('AMS', 'JTF_AMV_API_RECORD_NOT_FOUND');
846: FND_MSG_PUB.add;
847: END IF;
848: RAISE FND_API.g_exc_error;
842:
843: IF (SQL%NOTFOUND) THEN
844: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
845: FND_MESSAGE.set_name('AMS', 'JTF_AMV_API_RECORD_NOT_FOUND');
846: FND_MSG_PUB.add;
847: END IF;
848: RAISE FND_API.g_exc_error;
849: END IF;
850:
859: IF FND_API.to_boolean(p_commit) THEN
860: COMMIT;
861: END IF;
862:
863: FND_MSG_PUB.count_and_get
864: (
865: p_encoded => FND_API.g_false,
866: p_count => x_msg_count,
867: p_data => x_msg_data
871:
872: WHEN FND_API.g_exc_error THEN
873: ROLLBACK TO update_act_attachment;
874: x_return_status := FND_API.g_ret_sts_error;
875: FND_MSG_PUB.count_and_get
876: (
877: p_encoded => FND_API.g_false,
878: p_count => x_msg_count,
879: p_data => x_msg_data
881:
882: WHEN FND_API.g_exc_unexpected_error THEN
883: ROLLBACK TO update_act_attachment;
884: x_return_status := FND_API.g_ret_sts_unexp_error ;
885: FND_MSG_PUB.count_and_get
886: (
887: p_encoded => FND_API.g_false,
888: p_count => x_msg_count,
889: p_data => x_msg_data
891:
892: WHEN OTHERS THEN
893: ROLLBACK TO update_act_attachment;
894: x_return_status := FND_API.g_ret_sts_unexp_error ;
895: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
896: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
897: END IF;
898: FND_MSG_PUB.count_and_get
899: (
892: WHEN OTHERS THEN
893: ROLLBACK TO update_act_attachment;
894: x_return_status := FND_API.g_ret_sts_unexp_error ;
895: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
896: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
897: END IF;
898: FND_MSG_PUB.count_and_get
899: (
900: p_encoded => FND_API.g_false,
894: x_return_status := FND_API.g_ret_sts_unexp_error ;
895: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
896: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
897: END IF;
898: FND_MSG_PUB.count_and_get
899: (
900: p_encoded => FND_API.g_false,
901: p_count => x_msg_count,
902: p_data => x_msg_data
935:
936: BEGIN
937: -------------------- initialize ------------------------
938: IF FND_API.to_boolean(p_init_msg_list) THEN
939: FND_MSG_PUB.initialize;
940: END IF;
941:
942: IF NOT FND_API.compatible_api_call(
943: l_api_version,
954: OPEN c_act_attachment;
955: FETCH c_act_attachment INTO l_act_attachment_id;
956: IF (c_act_attachment%NOTFOUND) THEN
957: CLOSE c_act_attachment;
958: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
959: FND_MESSAGE.set_name('AMS', 'JTF_AMV_API_RECORD_NOT_FOUND');
960: FND_MSG_PUB.add;
961: END IF;
962: RAISE FND_API.g_exc_error;
956: IF (c_act_attachment%NOTFOUND) THEN
957: CLOSE c_act_attachment;
958: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
959: FND_MESSAGE.set_name('AMS', 'JTF_AMV_API_RECORD_NOT_FOUND');
960: FND_MSG_PUB.add;
961: END IF;
962: RAISE FND_API.g_exc_error;
963: END IF;
964: CLOSE c_act_attachment;
963: END IF;
964: CLOSE c_act_attachment;
965:
966: -------------------- finish --------------------------
967: FND_MSG_PUB.count_and_get
968: (
969: p_encoded => FND_API.g_false,
970: p_count => x_msg_count,
971: p_data => x_msg_data
973:
974: EXCEPTION
975: WHEN FND_API.g_exc_unexpected_error THEN
976: x_return_status := FND_API.g_ret_sts_unexp_error ;
977: FND_MSG_PUB.count_and_get(
978: p_encoded => FND_API.g_false,
979: p_count => x_msg_count,
980: p_data => x_msg_data
981: );
981: );
982:
983: WHEN OTHERS THEN
984: x_return_status := FND_API.g_ret_sts_unexp_error ;
985: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
986: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
987: END IF;
988:
989: FND_MSG_PUB.count_and_get(
982:
983: WHEN OTHERS THEN
984: x_return_status := FND_API.g_ret_sts_unexp_error ;
985: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
986: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
987: END IF;
988:
989: FND_MSG_PUB.count_and_get(
990: p_encoded => FND_API.g_false,
985: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
986: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
987: END IF;
988:
989: FND_MSG_PUB.count_and_get(
990: p_encoded => FND_API.g_false,
991: p_count => x_msg_count,
992: p_data => x_msg_data
993: );
1018:
1019: BEGIN
1020: ----------------------- initialize --------------------
1021: IF FND_API.to_boolean(p_init_msg_list) THEN
1022: FND_MSG_PUB.initialize;
1023: END IF;
1024: IF NOT FND_API.compatible_api_call(
1025: l_api_version,
1026: p_api_version,
1061: END IF;
1062: END IF;
1063:
1064: -------------------- finish --------------------------
1065: FND_MSG_PUB.count_and_get
1066: (
1067: p_encoded => FND_API.g_false,
1068: p_count => x_msg_count,
1069: p_data => x_msg_data
1072: EXCEPTION
1073:
1074: WHEN FND_API.g_exc_error THEN
1075: x_return_status := FND_API.g_ret_sts_error;
1076: FND_MSG_PUB.count_and_get(
1077: p_encoded => FND_API.g_false,
1078: p_count => x_msg_count,
1079: p_data => x_msg_data
1080: );
1080: );
1081:
1082: WHEN FND_API.g_exc_unexpected_error THEN
1083: x_return_status := FND_API.g_ret_sts_unexp_error ;
1084: FND_MSG_PUB.count_and_get(
1085: p_encoded => FND_API.g_false,
1086: p_count => x_msg_count,
1087: p_data => x_msg_data
1088: );
1088: );
1089:
1090: WHEN OTHERS THEN
1091: x_return_status := FND_API.g_ret_sts_unexp_error;
1092: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1093: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
1094: END IF;
1095:
1096: FND_MSG_PUB.count_and_get(
1089:
1090: WHEN OTHERS THEN
1091: x_return_status := FND_API.g_ret_sts_unexp_error;
1092: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1093: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
1094: END IF;
1095:
1096: FND_MSG_PUB.count_and_get(
1097: p_encoded => FND_API.g_false,
1092: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
1093: FND_MSG_PUB.add_exc_msg(g_pkg_name, l_api_name);
1094: END IF;
1095:
1096: FND_MSG_PUB.count_and_get(
1097: p_encoded => FND_API.g_false,
1098: p_count => x_msg_count,
1099: p_data => x_msg_data
1100: );
1289: OPEN c_act_attachment;
1290: FETCH c_act_attachment INTO l_act_attachment_rec;
1291: IF c_act_attachment%NOTFOUND THEN
1292: CLOSE c_act_attachment;
1293: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
1294: FND_MESSAGE.set_name('JTF', 'JTF_AMV_API_RECORD_NOT_FOUND');
1295: FND_MSG_PUB.add;
1296: END IF;
1297: RAISE FND_API.g_exc_error;
1291: IF c_act_attachment%NOTFOUND THEN
1292: CLOSE c_act_attachment;
1293: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
1294: FND_MESSAGE.set_name('JTF', 'JTF_AMV_API_RECORD_NOT_FOUND');
1295: FND_MSG_PUB.add;
1296: END IF;
1297: RAISE FND_API.g_exc_error;
1298: END IF;
1299: CLOSE c_act_attachment;