257: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
258: END IF;
259: -- Initialize message list if p_init_msg_list is set to TRUE.
260: IF FND_API.to_Boolean( p_init_msg_list ) THEN
261: FND_MSG_PUB.initialize;
262: END IF ;
263: -- For Test/Debug
264: IF FND_API.to_Boolean( p_debug ) THEN
265: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
412: -- commit;
413:
414: -- Standard ending code ------------------------------------------------
415:
416: FND_MSG_PUB.Count_And_Get
417: ( p_count => x_msg_count,
418: p_data => x_msg_data );
419:
420: IF g_debug_flag THEN
426: EXCEPTION
427: WHEN FND_API.G_EXC_ERROR THEN
428: ROLLBACK TO Update_Attachment_Status;
429: x_return_status := FND_API.G_RET_STS_ERROR;
430: FND_MSG_PUB.Count_And_Get
431: ( p_count => x_msg_count
432: ,p_data => x_msg_data );
433: IF g_debug_flag THEN
434: Write_Debug('Msg Data' || x_msg_data);
437: END IF ;
438: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
439: ROLLBACK TO Update_Attachment_Status;
440: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
441: FND_MSG_PUB.Count_And_Get
442: ( p_count => x_msg_count
443: ,p_data => x_msg_data );
444: IF g_debug_flag THEN
445: Write_Debug('Msg Data' || x_msg_data);
448: END IF ;
449: WHEN OTHERS THEN
450: ROLLBACK TO Update_Attachment_Status;
451: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
452: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
453: THEN
454: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
455: END IF;
456: FND_MSG_PUB.Count_And_Get
450: ROLLBACK TO Update_Attachment_Status;
451: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
452: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
453: THEN
454: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
455: END IF;
456: FND_MSG_PUB.Count_And_Get
457: ( p_count => x_msg_count
458: ,p_data => x_msg_data );
452: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
453: THEN
454: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
455: END IF;
456: FND_MSG_PUB.Count_And_Get
457: ( p_count => x_msg_count
458: ,p_data => x_msg_data );
459: IF g_debug_flag THEN
460: Write_Debug('Msg Data' || x_msg_data);
792: END IF;
793:
794: -- Initialize message list if p_init_msg_list is set to TRUE.
795: IF FND_API.to_Boolean( p_init_msg_list ) THEN
796: FND_MSG_PUB.initialize;
797: END IF ;
798: -- For Test/Debug
799: IF FND_API.to_Boolean( p_debug ) THEN
800: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
870: IF l_document_id IS NULL THEN
871: l_message := 'ENG_DETACH_IMP_ERROR';
872: FND_MESSAGE.Set_Name('ENG', l_message);
873: FND_MESSAGE.Set_Token('FILE_NAME', l_file_name);
874: FND_MSG_PUB.Add;
875: x_return_status := FND_API.G_RET_STS_ERROR;
876: END IF;
877:
878:
962: end loop;
963: close C;
964:
965: -- Standard ending code ------------------------------------------------
966: FND_MSG_PUB.Count_And_Get
967: ( p_count => x_msg_count,
968: p_data => x_msg_data );
969:
970: IF g_debug_flag THEN
975: EXCEPTION
976: WHEN FND_API.G_EXC_ERROR THEN
977: ROLLBACK TO Implement_Attachment_Change;
978: x_return_status := FND_API.G_RET_STS_ERROR;
979: FND_MSG_PUB.Count_And_Get
980: ( p_count => x_msg_count
981: ,p_data => x_msg_data );
982: IF g_debug_flag THEN
983: Write_Debug('Rollback and Finish with expected error.') ;
985: END IF ;
986: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
987: ROLLBACK TO Implement_Attachment_Change;
988: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
989: FND_MSG_PUB.Count_And_Get
990: ( p_count => x_msg_count
991: ,p_data => x_msg_data );
992: IF g_debug_flag THEN
993: Write_Debug('Rollback and Finish with unexpected error.') ;
995: END IF ;
996: WHEN OTHERS THEN
997: ROLLBACK TO Implement_Attachment_Change;
998: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
999: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1000: THEN
1001: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1002: END IF;
1003: FND_MSG_PUB.Count_And_Get
997: ROLLBACK TO Implement_Attachment_Change;
998: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
999: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1000: THEN
1001: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1002: END IF;
1003: FND_MSG_PUB.Count_And_Get
1004: ( p_count => x_msg_count
1005: ,p_data => x_msg_data );
999: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1000: THEN
1001: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1002: END IF;
1003: FND_MSG_PUB.Count_And_Get
1004: ( p_count => x_msg_count
1005: ,p_data => x_msg_data );
1006: IF g_debug_flag THEN
1007: Write_Debug('Rollback and Finish with other error.') ;
1074: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1075: END IF;
1076: -- Initialize message list if p_init_msg_list is set to TRUE.
1077: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1078: FND_MSG_PUB.initialize;
1079: END IF ;
1080: -- For Test/Debug
1081: IF FND_API.to_Boolean( p_debug ) THEN
1082: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
1160: update fnd_documents set dm_node = l_dm_node, dm_folder_path = l_dm_folder_path, dm_type = l_dm_type, dm_document_id = l_dm_document_id, dm_version_number = l_dm_version_number where document_id = l_doc_id;
1161: x_new_attachment_id := l_attached_doc_id;
1162:
1163: -- Standard ending code ------------------------------------------------
1164: FND_MSG_PUB.Count_And_Get
1165: ( p_count => x_msg_count,
1166: p_data => x_msg_data );
1167:
1168: IF g_debug_flag THEN
1173: EXCEPTION
1174: WHEN FND_API.G_EXC_ERROR THEN
1175: ROLLBACK TO Copy_Attachment;
1176: x_return_status := FND_API.G_RET_STS_ERROR;
1177: FND_MSG_PUB.Count_And_Get
1178: ( p_count => x_msg_count
1179: ,p_data => x_msg_data );
1180: IF g_debug_flag THEN
1181: Write_Debug('Rollback and Finish with expected error.') ;
1183: END IF ;
1184: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1185: ROLLBACK TO Copy_Attachment;
1186: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1187: FND_MSG_PUB.Count_And_Get
1188: ( p_count => x_msg_count
1189: ,p_data => x_msg_data );
1190: IF g_debug_flag THEN
1191: Write_Debug('Rollback and Finish with unexpected error.') ;
1193: END IF ;
1194: WHEN OTHERS THEN
1195: ROLLBACK TO Copy_Attachment;
1196: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1197: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1198: THEN
1199: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1200: END IF;
1201: FND_MSG_PUB.Count_And_Get
1195: ROLLBACK TO Copy_Attachment;
1196: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1197: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1198: THEN
1199: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1200: END IF;
1201: FND_MSG_PUB.Count_And_Get
1202: ( p_count => x_msg_count
1203: ,p_data => x_msg_data );
1197: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1198: THEN
1199: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1200: END IF;
1201: FND_MSG_PUB.Count_And_Get
1202: ( p_count => x_msg_count
1203: ,p_data => x_msg_data );
1204: IF g_debug_flag THEN
1205: Write_Debug('Rollback and Finish with other error.') ;
1298: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1299: END IF;
1300: -- Initialize message list if p_init_msg_list is set to TRUE.
1301: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1302: FND_MSG_PUB.initialize;
1303: END IF ;
1304: -- For Test/Debug
1305: IF FND_API.to_Boolean( p_debug ) THEN
1306: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
1338: end loop;
1339: close C;
1340:
1341: -- Standard ending code ------------------------------------------------
1342: FND_MSG_PUB.Count_And_Get
1343: ( p_count => x_msg_count,
1344: p_data => x_msg_data );
1345:
1346: IF g_debug_flag THEN
1351: EXCEPTION
1352: WHEN FND_API.G_EXC_ERROR THEN
1353: ROLLBACK TO Complete_Attachment_Approval;
1354: x_return_status := FND_API.G_RET_STS_ERROR;
1355: FND_MSG_PUB.Count_And_Get
1356: ( p_count => x_msg_count
1357: ,p_data => x_msg_data );
1358: IF g_debug_flag THEN
1359: Write_Debug('Rollback and Finish with expected error.') ;
1361: END IF ;
1362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1363: ROLLBACK TO Complete_Attachment_Approval;
1364: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1365: FND_MSG_PUB.Count_And_Get
1366: ( p_count => x_msg_count
1367: ,p_data => x_msg_data );
1368: IF g_debug_flag THEN
1369: Write_Debug('Rollback and Finish with unexpected error.') ;
1371: END IF ;
1372: WHEN OTHERS THEN
1373: ROLLBACK TO Complete_Attachment_Approval;
1374: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1375: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1376: THEN
1377: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1378: END IF;
1379: FND_MSG_PUB.Count_And_Get
1373: ROLLBACK TO Complete_Attachment_Approval;
1374: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1375: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1376: THEN
1377: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1378: END IF;
1379: FND_MSG_PUB.Count_And_Get
1380: ( p_count => x_msg_count
1381: ,p_data => x_msg_data );
1375: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1376: THEN
1377: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1378: END IF;
1379: FND_MSG_PUB.Count_And_Get
1380: ( p_count => x_msg_count
1381: ,p_data => x_msg_data );
1382: IF g_debug_flag THEN
1383: Write_Debug('Rollback and Finish with other error.') ;
1436: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1437: END IF;
1438: -- Initialize message list if p_init_msg_list is set to TRUE.
1439: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1440: FND_MSG_PUB.initialize;
1441: END IF ;
1442: -- For Test/Debug
1443: IF FND_API.to_Boolean( p_debug ) THEN
1444: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
1536: END IF ;
1537: COMMIT WORK;
1538: END IF;
1539: -- Standard ending code ------------------------------------------------
1540: FND_MSG_PUB.Count_And_Get
1541: ( p_count => x_msg_count,
1542: p_data => x_msg_data );
1543:
1544: IF g_debug_flag THEN
1549: EXCEPTION
1550: WHEN FND_API.G_EXC_ERROR THEN
1551: ROLLBACK TO Copy_Attachments_And_Changes;
1552: x_return_status := FND_API.G_RET_STS_ERROR;
1553: FND_MSG_PUB.Count_And_Get
1554: ( p_count => x_msg_count
1555: ,p_data => x_msg_data );
1556: IF g_debug_flag THEN
1557: Write_Debug('Rollback and Finish with expected error.') ;
1559: END IF ;
1560: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1561: ROLLBACK TO Copy_Attachments_And_Changes;
1562: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1563: FND_MSG_PUB.Count_And_Get
1564: ( p_count => x_msg_count
1565: ,p_data => x_msg_data );
1566: IF g_debug_flag THEN
1567: Write_Debug('Rollback and Finish with unexpected error.') ;
1569: END IF ;
1570: WHEN OTHERS THEN
1571: ROLLBACK TO Copy_Attachments_And_Changes;
1572: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1573: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1574: THEN
1575: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1576: END IF;
1577: FND_MSG_PUB.Count_And_Get
1571: ROLLBACK TO Copy_Attachments_And_Changes;
1572: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1573: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1574: THEN
1575: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1576: END IF;
1577: FND_MSG_PUB.Count_And_Get
1578: ( p_count => x_msg_count
1579: ,p_data => x_msg_data );
1573: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1574: THEN
1575: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1576: END IF;
1577: FND_MSG_PUB.Count_And_Get
1578: ( p_count => x_msg_count
1579: ,p_data => x_msg_data );
1580: IF g_debug_flag THEN
1581: Write_Debug('Rollback and Finish with other error.') ;
1632: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1633: END IF;
1634: -- Initialize message list if p_init_msg_list is set to TRUE.
1635: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1636: FND_MSG_PUB.initialize;
1637: END IF ;
1638: -- For Test/Debug
1639: IF FND_API.to_Boolean( p_debug ) THEN
1640: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
1741: END IF ;
1742: COMMIT WORK;
1743: END IF;
1744: -- Standard ending code ------------------------------------------------
1745: FND_MSG_PUB.Count_And_Get
1746: ( p_count => x_msg_count,
1747: p_data => x_msg_data );
1748:
1749: IF g_debug_flag THEN
1754: EXCEPTION
1755: WHEN FND_API.G_EXC_ERROR THEN
1756: ROLLBACK TO Migrate_Attachment_And_Change;
1757: x_return_status := FND_API.G_RET_STS_ERROR;
1758: FND_MSG_PUB.Count_And_Get
1759: ( p_count => x_msg_count
1760: ,p_data => x_msg_data );
1761: IF g_debug_flag THEN
1762: Write_Debug('Rollback and Finish with expected error.') ;
1764: END IF ;
1765: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1766: ROLLBACK TO Migrate_Attachment_And_Change;
1767: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1768: FND_MSG_PUB.Count_And_Get
1769: ( p_count => x_msg_count
1770: ,p_data => x_msg_data );
1771: IF g_debug_flag THEN
1772: Write_Debug('Rollback and Finish with unexpected error.') ;
1774: END IF ;
1775: WHEN OTHERS THEN
1776: ROLLBACK TO Migrate_Attachment_And_Change;
1777: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1778: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1779: THEN
1780: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1781: END IF;
1782: FND_MSG_PUB.Count_And_Get
1776: ROLLBACK TO Migrate_Attachment_And_Change;
1777: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1778: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1779: THEN
1780: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1781: END IF;
1782: FND_MSG_PUB.Count_And_Get
1783: ( p_count => x_msg_count
1784: ,p_data => x_msg_data );
1778: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1779: THEN
1780: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1781: END IF;
1782: FND_MSG_PUB.Count_And_Get
1783: ( p_count => x_msg_count
1784: ,p_data => x_msg_data );
1785: IF g_debug_flag THEN
1786: Write_Debug('Rollback and Finish with other error.') ;
1846: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1847: END IF;
1848: -- Initialize message list if p_init_msg_list is set to TRUE.
1849: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1850: FND_MSG_PUB.initialize;
1851: END IF ;
1852: -- For Test/Debug
1853: IF FND_API.to_Boolean( p_debug ) THEN
1854: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
1881: delete from eng_attachment_changes
1882: where change_id = p_change_id
1883: and revised_item_sequence_id = p_rev_item_seq_id;
1884: -- Standard ending code ------------------------------------------------
1885: FND_MSG_PUB.Count_And_Get
1886: ( p_count => x_msg_count,
1887: p_data => x_msg_data );
1888:
1889: IF g_debug_flag THEN
1894: EXCEPTION
1895: WHEN FND_API.G_EXC_ERROR THEN
1896: ROLLBACK TO Delete_Attachments_And_Changes;
1897: x_return_status := FND_API.G_RET_STS_ERROR;
1898: FND_MSG_PUB.Count_And_Get
1899: ( p_count => x_msg_count
1900: ,p_data => x_msg_data );
1901: IF g_debug_flag THEN
1902: Write_Debug('Rollback and Finish with expected error.') ;
1904: END IF ;
1905: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1906: ROLLBACK TO Delete_Attachments_And_Changes;
1907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1908: FND_MSG_PUB.Count_And_Get
1909: ( p_count => x_msg_count
1910: ,p_data => x_msg_data );
1911: IF g_debug_flag THEN
1912: Write_Debug('Rollback and Finish with unexpected error.') ;
1914: END IF ;
1915: WHEN OTHERS THEN
1916: ROLLBACK TO Delete_Attachments_And_Changes;
1917: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1918: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1919: THEN
1920: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1921: END IF;
1922: FND_MSG_PUB.Count_And_Get
1916: ROLLBACK TO Delete_Attachments_And_Changes;
1917: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1918: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1919: THEN
1920: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1921: END IF;
1922: FND_MSG_PUB.Count_And_Get
1923: ( p_count => x_msg_count
1924: ,p_data => x_msg_data );
1918: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1919: THEN
1920: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
1921: END IF;
1922: FND_MSG_PUB.Count_And_Get
1923: ( p_count => x_msg_count
1924: ,p_data => x_msg_data );
1925: IF g_debug_flag THEN
1926: Write_Debug('Rollback and Finish with other error.') ;
1971: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1972: END IF;
1973: -- Initialize message list if p_init_msg_list is set to TRUE.
1974: IF FND_API.to_Boolean( p_init_msg_list ) THEN
1975: FND_MSG_PUB.initialize;
1976: END IF ;
1977: -- For Test/Debug
1978: IF FND_API.to_Boolean( p_debug ) THEN
1979: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
2019: end loop;
2020: close C;
2021:
2022: -- Standard ending code ------------------------------------------------
2023: FND_MSG_PUB.Count_And_Get
2024: ( p_count => x_msg_count,
2025: p_data => x_msg_data );
2026:
2027: IF g_debug_flag THEN
2032: EXCEPTION
2033: WHEN FND_API.G_EXC_ERROR THEN
2034: ROLLBACK TO Delete_Attachments_For_Curr_CO;
2035: x_return_status := FND_API.G_RET_STS_ERROR;
2036: FND_MSG_PUB.Count_And_Get
2037: ( p_count => x_msg_count
2038: ,p_data => x_msg_data );
2039: IF g_debug_flag THEN
2040: Write_Debug('Rollback and Finish with expected error.') ;
2042: END IF ;
2043: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2044: ROLLBACK TO Delete_Attachments_For_Curr_CO;
2045: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2046: FND_MSG_PUB.Count_And_Get
2047: ( p_count => x_msg_count
2048: ,p_data => x_msg_data );
2049: IF g_debug_flag THEN
2050: Write_Debug('Rollback and Finish with unexpected error.') ;
2052: END IF ;
2053: WHEN OTHERS THEN
2054: ROLLBACK TO Delete_Attachments_For_Curr_CO;
2055: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2056: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2057: THEN
2058: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2059: END IF;
2060: FND_MSG_PUB.Count_And_Get
2054: ROLLBACK TO Delete_Attachments_For_Curr_CO;
2055: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2056: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2057: THEN
2058: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2059: END IF;
2060: FND_MSG_PUB.Count_And_Get
2061: ( p_count => x_msg_count
2062: ,p_data => x_msg_data );
2056: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2057: THEN
2058: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2059: END IF;
2060: FND_MSG_PUB.Count_And_Get
2061: ( p_count => x_msg_count
2062: ,p_data => x_msg_data );
2063: IF g_debug_flag THEN
2064: Write_Debug('Rollback and Finish with other error.') ;
2109: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2110: END IF;
2111: -- Initialize message list if p_init_msg_list is set to TRUE.
2112: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2113: FND_MSG_PUB.initialize;
2114: END IF ;
2115: -- For Test/Debug
2116: IF FND_API.to_Boolean( p_debug ) THEN
2117: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
2139: fnd_documents_pkg.delete_row(l_document_id, l_datatype_id, 'Y');
2140: end loop;
2141: close C;
2142: -- Standard ending code ------------------------------------------------
2143: FND_MSG_PUB.Count_And_Get
2144: ( p_count => x_msg_count,
2145: p_data => x_msg_data );
2146:
2147: IF g_debug_flag THEN
2152: EXCEPTION
2153: WHEN FND_API.G_EXC_ERROR THEN
2154: ROLLBACK TO Delete_Attachments;
2155: x_return_status := FND_API.G_RET_STS_ERROR;
2156: FND_MSG_PUB.Count_And_Get
2157: ( p_count => x_msg_count
2158: ,p_data => x_msg_data );
2159: IF g_debug_flag THEN
2160: Write_Debug('Rollback and Finish with expected error.') ;
2162: END IF ;
2163: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2164: ROLLBACK TO Delete_Attachments;
2165: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2166: FND_MSG_PUB.Count_And_Get
2167: ( p_count => x_msg_count
2168: ,p_data => x_msg_data );
2169: IF g_debug_flag THEN
2170: Write_Debug('Rollback and Finish with unexpected error.') ;
2172: END IF ;
2173: WHEN OTHERS THEN
2174: ROLLBACK TO Delete_Attachments;
2175: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2176: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2177: THEN
2178: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2179: END IF;
2180: FND_MSG_PUB.Count_And_Get
2174: ROLLBACK TO Delete_Attachments;
2175: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2176: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2177: THEN
2178: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2179: END IF;
2180: FND_MSG_PUB.Count_And_Get
2181: ( p_count => x_msg_count
2182: ,p_data => x_msg_data );
2176: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2177: THEN
2178: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2179: END IF;
2180: FND_MSG_PUB.Count_And_Get
2181: ( p_count => x_msg_count
2182: ,p_data => x_msg_data );
2183: IF g_debug_flag THEN
2184: Write_Debug('Rollback and Finish with other error.') ;
2219: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2220: END IF;
2221: -- Initialize message list if p_init_msg_list is set to TRUE.
2222: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2223: FND_MSG_PUB.initialize;
2224: END IF ;
2225: -- For Test/Debug
2226: IF FND_API.to_Boolean( p_debug ) THEN
2227: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
2251: when NO_DATA_FOUND then
2252: return;
2253: end;
2254: -- Standard ending code ------------------------------------------------
2255: FND_MSG_PUB.Count_And_Get
2256: ( p_count => x_msg_count,
2257: p_data => x_msg_data );
2258:
2259: IF g_debug_flag THEN
2264: EXCEPTION
2265: WHEN FND_API.G_EXC_ERROR THEN
2266: ROLLBACK TO Delete_Attachment;
2267: x_return_status := FND_API.G_RET_STS_ERROR;
2268: FND_MSG_PUB.Count_And_Get
2269: ( p_count => x_msg_count
2270: ,p_data => x_msg_data );
2271: IF g_debug_flag THEN
2272: Write_Debug('Rollback and Finish with expected error.') ;
2274: END IF ;
2275: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2276: ROLLBACK TO Delete_Attachment;
2277: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2278: FND_MSG_PUB.Count_And_Get
2279: ( p_count => x_msg_count
2280: ,p_data => x_msg_data );
2281: IF g_debug_flag THEN
2282: Write_Debug('Rollback and Finish with unexpected error.') ;
2284: END IF ;
2285: WHEN OTHERS THEN
2286: ROLLBACK TO Delete_Attachment;
2287: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2288: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2289: THEN
2290: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2291: END IF;
2292: FND_MSG_PUB.Count_And_Get
2286: ROLLBACK TO Delete_Attachment;
2287: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2288: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2289: THEN
2290: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2291: END IF;
2292: FND_MSG_PUB.Count_And_Get
2293: ( p_count => x_msg_count
2294: ,p_data => x_msg_data );
2288: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2289: THEN
2290: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2291: END IF;
2292: FND_MSG_PUB.Count_And_Get
2293: ( p_count => x_msg_count
2294: ,p_data => x_msg_data );
2295: IF g_debug_flag THEN
2296: Write_Debug('Rollback and Finish with other error.') ;
2330: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2331: END IF;
2332: -- Initialize message list if p_init_msg_list is set to TRUE.
2333: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2334: FND_MSG_PUB.initialize;
2335: END IF ;
2336: -- For Test/Debug
2337: IF FND_API.to_Boolean( p_debug ) THEN
2338: Open_Debug_Session(p_output_dir, p_debug_filename ) ;
2354: delete from eng_attachment_changes
2355: where change_id = p_change_id
2356: and revised_item_sequence_id = p_rev_item_seq_id;
2357: -- Standard ending code ------------------------------------------------
2358: FND_MSG_PUB.Count_And_Get
2359: ( p_count => x_msg_count,
2360: p_data => x_msg_data );
2361:
2362: IF g_debug_flag THEN
2367: EXCEPTION
2368: WHEN FND_API.G_EXC_ERROR THEN
2369: ROLLBACK TO Delete_Changes;
2370: x_return_status := FND_API.G_RET_STS_ERROR;
2371: FND_MSG_PUB.Count_And_Get
2372: ( p_count => x_msg_count
2373: ,p_data => x_msg_data );
2374: IF g_debug_flag THEN
2375: Write_Debug('Rollback and Finish with expected error.') ;
2377: END IF ;
2378: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2379: ROLLBACK TO Delete_Changes;
2380: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2381: FND_MSG_PUB.Count_And_Get
2382: ( p_count => x_msg_count
2383: ,p_data => x_msg_data );
2384: IF g_debug_flag THEN
2385: Write_Debug('Rollback and Finish with unexpected error.') ;
2387: END IF ;
2388: WHEN OTHERS THEN
2389: ROLLBACK TO Delete_Changes;
2390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2391: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2392: THEN
2393: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2394: END IF;
2395: FND_MSG_PUB.Count_And_Get
2389: ROLLBACK TO Delete_Changes;
2390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2391: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2392: THEN
2393: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2394: END IF;
2395: FND_MSG_PUB.Count_And_Get
2396: ( p_count => x_msg_count
2397: ,p_data => x_msg_data );
2391: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2392: THEN
2393: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2394: END IF;
2395: FND_MSG_PUB.Count_And_Get
2396: ( p_count => x_msg_count
2397: ,p_data => x_msg_data );
2398: IF g_debug_flag THEN
2399: Write_Debug('Rollback and Finish with other error.') ;
2505: x_msg_count := 1;
2506: x_msg_data := 'Error: This Change Order has floating version attachments that are under change required change policy. Such CO cannot be implemented';
2507: RAISE FND_API.G_EXC_ERROR;
2508: WHEN OTHERS THEN
2509: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2510: THEN
2511: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2512: END IF;
2513: FND_MSG_PUB.Count_And_Get
2507: RAISE FND_API.G_EXC_ERROR;
2508: WHEN OTHERS THEN
2509: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2510: THEN
2511: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2512: END IF;
2513: FND_MSG_PUB.Count_And_Get
2514: ( p_count => x_msg_count
2515: ,p_data => x_msg_data );
2509: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
2510: THEN
2511: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, l_api_name );
2512: END IF;
2513: FND_MSG_PUB.Count_And_Get
2514: ( p_count => x_msg_count
2515: ,p_data => x_msg_data );
2516:
2517: END Validate_floating_version;