662:
663: -- initialize message list if p_init_msg_list is set to true.
664: IF fnd_api.to_boolean( p_init_msg_list )
665: THEN
666: fnd_msg_pub.initialize;
667: END IF;
668:
669:
670: -- initialize api return status to success
719: AND ((p_txnfind_rec.transaction_status_code IS NULL) OR (p_txnfind_rec.transaction_status_code = fnd_api.g_miss_char))
720:
721: ) THEN
722: fnd_message.set_name('CSI', 'CSI_INVALID_PARAMETERS');
723: fnd_msg_pub.add;
724: x_return_status := fnd_api.g_ret_sts_error;
725: RAISE fnd_api.g_exc_error;
726: END IF;
727: x_tot_rec_count:=l_tot_rec_count;
827: --
828: dbms_sql.close_cursor(l_cur_get_transactions);
829:
830: -- standard call to get message count and if count is 1, get message info.
831: fnd_msg_pub.count_and_get
832: ( p_count => x_msg_count,
833: p_data => x_msg_data
834: );
835: EXCEPTION
838: THEN
839: ROLLBACK TO get_transactions_pvt;
840: END IF;
841: x_return_status := fnd_api.g_ret_sts_error ;
842: fnd_msg_pub.count_and_get
843: (p_count => x_msg_count ,
844: p_data => x_msg_data
845: );
846:
849: THEN
850: ROLLBACK TO get_transactions_pvt;
851: END IF;
852: x_return_status := fnd_api.g_ret_sts_unexp_error ;
853: fnd_msg_pub.count_and_get
854: (p_count => x_msg_count ,
855: p_data => x_msg_data
856: );
857:
860: THEN
861: ROLLBACK TO get_transactions_pvt;
862: END IF;
863: x_return_status := fnd_api.g_ret_sts_unexp_error ;
864: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
865: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
866: END IF;
867: fnd_msg_pub.count_and_get
868: ( p_count => x_msg_count ,
861: ROLLBACK TO get_transactions_pvt;
862: END IF;
863: x_return_status := fnd_api.g_ret_sts_unexp_error ;
864: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
865: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
866: END IF;
867: fnd_msg_pub.count_and_get
868: ( p_count => x_msg_count ,
869: p_data => x_msg_data
863: x_return_status := fnd_api.g_ret_sts_unexp_error ;
864: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
865: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
866: END IF;
867: fnd_msg_pub.count_and_get
868: ( p_count => x_msg_count ,
869: p_data => x_msg_data
870: );
871: END get_transactions;
1019:
1020: -- initialize message list if p_init_msg_list is set to true.
1021: IF fnd_api.to_boolean( p_init_msg_list )
1022: THEN
1023: fnd_msg_pub.initialize;
1024: END IF;
1025:
1026:
1027: -- initialize api return status to success
1102:
1103: IF SQL%FOUND THEN
1104: fnd_message.set_name('CSI', 'CSI_TXN_ID_ALREADY_EXISTS');
1105: fnd_message.set_token('transaction_id',p_transaction_rec.transaction_id);
1106: fnd_msg_pub.add;
1107: x_return_status := fnd_api.g_ret_sts_error;
1108: END IF;
1109:
1110: EXCEPTION WHEN no_data_found THEN
1157: IF p_transaction_rec.gl_interface_status_code NOT IN (1,2,3)
1158: THEN
1159: FND_MESSAGE.SET_NAME('CSI','CSI_INVALID_GL_STATUS');
1160: FND_MESSAGE.SET_TOKEN('STATUS_CODE',p_transaction_rec.gl_interface_status_code);
1161: FND_MSG_PUB.Add;
1162: RAISE fnd_api.g_exc_error;
1163: END IF;
1164: END IF;
1165:
1234: END IF;
1235:
1236:
1237: -- standard call to get message count and if count is 1, get message info.
1238: fnd_msg_pub.count_and_get
1239: ( p_count => x_msg_count,
1240: p_data => x_msg_data
1241: );
1242:
1246: THEN
1247: ROLLBACK TO create_transactions_pvt;
1248: END IF;
1249: x_return_status := fnd_api.g_ret_sts_error ;
1250: fnd_msg_pub.count_and_get
1251: (p_count => x_msg_count ,
1252: p_data => x_msg_data
1253: );
1254:
1257: THEN
1258: ROLLBACK TO create_transactions_pvt;
1259: END IF;
1260: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1261: fnd_msg_pub.count_and_get
1262: (p_count => x_msg_count ,
1263: p_data => x_msg_data
1264: );
1265:
1268: THEN
1269: ROLLBACK TO create_transactions_pvt;
1270: END IF;
1271: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1272: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1273: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1274: END IF;
1275: fnd_msg_pub.count_and_get
1276: (p_count => x_msg_count ,
1269: ROLLBACK TO create_transactions_pvt;
1270: END IF;
1271: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1272: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1273: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1274: END IF;
1275: fnd_msg_pub.count_and_get
1276: (p_count => x_msg_count ,
1277: p_data => x_msg_data
1271: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1272: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1273: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1274: END IF;
1275: fnd_msg_pub.count_and_get
1276: (p_count => x_msg_count ,
1277: p_data => x_msg_data
1278: );
1279:
1335:
1336: -- initialize message list if p_init_msg_list is set to true.
1337: IF fnd_api.to_boolean( p_init_msg_list )
1338: THEN
1339: fnd_msg_pub.initialize;
1340: END IF;
1341: -- initialize api return status to success
1342: x_return_status := fnd_api.g_ret_sts_success;
1343:
1364: FETCH lock_csr INTO l_object_version_number;
1365: IF ( (l_object_version_number<>p_transaction_rec.object_version_number)
1366: AND (p_transaction_rec.object_version_number <> fnd_api.g_miss_num) ) THEN
1367: fnd_message.set_name('CSI', 'CSI_RECORD_CHANGED');
1368: fnd_msg_pub.add;
1369: RAISE fnd_api.g_exc_error;
1370: END IF;
1371:
1372: IF lock_csr%NOTFOUND THEN
1370: END IF;
1371:
1372: IF lock_csr%NOTFOUND THEN
1373: fnd_message.set_name('CSI', 'CSI_RECORD_LOCKED');
1374: fnd_msg_pub.add;
1375: RAISE fnd_api.g_exc_error;
1376: END IF;
1377:
1378: CLOSE lock_csr;
1406: p_transaction_rec.gl_interface_status_code NOT IN (1,2,3)
1407: THEN
1408: FND_MESSAGE.SET_NAME('CSI','CSI_INVALID_GL_STATUS');
1409: FND_MESSAGE.SET_TOKEN('STATUS_CODE',p_transaction_rec.gl_interface_status_code);
1410: FND_MSG_PUB.Add;
1411: RAISE fnd_api.g_exc_error;
1412: END IF;
1413:
1414: -- invoke table handler(csi_transactions_pkg.update_row)
1441:
1442:
1443:
1444: -- standard call to get message count and if count is 1, get message info.
1445: fnd_msg_pub.count_and_get
1446: ( p_count => x_msg_count,
1447: p_data => x_msg_data
1448: );
1449:
1453: THEN
1454: ROLLBACK TO update_transactions_pvt;
1455: END IF;
1456: x_return_status := fnd_api.g_ret_sts_error ;
1457: fnd_msg_pub.count_and_get
1458: (p_count => x_msg_count ,
1459: p_data => x_msg_data
1460: );
1461:
1464: THEN
1465: ROLLBACK TO update_transactions_pvt;
1466: END IF;
1467: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1468: fnd_msg_pub.count_and_get
1469: (p_count => x_msg_count ,
1470: p_data => x_msg_data
1471: );
1472:
1475: THEN
1476: ROLLBACK TO update_transactions_pvt;
1477: END IF;
1478: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1479: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1480: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1481: END IF;
1482: fnd_msg_pub.count_and_get
1483: (p_count => x_msg_count ,
1476: ROLLBACK TO update_transactions_pvt;
1477: END IF;
1478: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1479: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1480: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1481: END IF;
1482: fnd_msg_pub.count_and_get
1483: (p_count => x_msg_count ,
1484: p_data => x_msg_data
1478: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1479: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1480: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1481: END IF;
1482: fnd_msg_pub.count_and_get
1483: (p_count => x_msg_count ,
1484: p_data => x_msg_data
1485: );
1486:
1526:
1527: -- initialize message list if p_init_msg_list is set to true.
1528: IF fnd_api.to_boolean( p_init_msg_list )
1529: THEN
1530: fnd_msg_pub.initialize;
1531: END IF;
1532:
1533: -- initialize api return status TO success
1534: x_return_status := fnd_api.g_ret_sts_success;
1614: COMMIT WORK;
1615: END IF;
1616:
1617: -- standard call to get message count and if count is 1, get message info.
1618: fnd_msg_pub.count_and_get
1619: ( p_count => x_msg_count,
1620: p_data => x_msg_data
1621: );
1622:
1626: THEN
1627: ROLLBACK TO create_txn_error_pvt;
1628: END IF;
1629: x_return_status := fnd_api.g_ret_sts_error ;
1630: fnd_msg_pub.count_and_get
1631: (p_count => x_msg_count ,
1632: p_data => x_msg_data
1633: );
1634:
1637: THEN
1638: ROLLBACK TO create_txn_error_pvt;
1639: END IF;
1640: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1641: fnd_msg_pub.count_and_get
1642: (p_count => x_msg_count ,
1643: p_data => x_msg_data
1644: );
1645:
1648: THEN
1649: ROLLBACK TO create_txn_error_pvt;
1650: END IF;
1651: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1652: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1653: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1654: END IF;
1655: fnd_msg_pub.count_and_get
1656: (p_count => x_msg_count ,
1649: ROLLBACK TO create_txn_error_pvt;
1650: END IF;
1651: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1652: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1653: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1654: END IF;
1655: fnd_msg_pub.count_and_get
1656: (p_count => x_msg_count ,
1657: p_data => x_msg_data
1651: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1652: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1653: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
1654: END IF;
1655: fnd_msg_pub.count_and_get
1656: (p_count => x_msg_count ,
1657: p_data => x_msg_data
1658: );
1659:
1681: BEGIN
1682: -- initialize message list if p_init_msg_list is set to true.
1683: IF fnd_api.to_boolean( p_init_msg_list )
1684: THEN
1685: fnd_msg_pub.initialize;
1686: END IF;
1687:
1688:
1689: -- initialize api return status TO success
1695: x_return_status := fnd_api.g_ret_sts_success;
1696: ELSIF(p_validation_mode = 'UPDATE') THEN
1697: IF ( (p_transaction_id IS NULL) OR (p_transaction_id = fnd_api.g_miss_num) ) THEN
1698: fnd_message.set_name('CSI', 'CSI_TXN_ID_NOT_PASSED');
1699: fnd_msg_pub.add;
1700: x_return_status := fnd_api.g_ret_sts_error;
1701: ELSE
1702: BEGIN
1703: SELECT 'x'
1707: EXCEPTION
1708: WHEN no_data_found THEN
1709: fnd_message.set_name('CSI', 'CSI_INVALID_TXN_ID');
1710: fnd_message.set_token('transaction_id',p_transaction_id);
1711: fnd_msg_pub.add;
1712: x_return_status := fnd_api.g_ret_sts_error;
1713: END;
1714: END IF;
1715: END IF;
1714: END IF;
1715: END IF;
1716:
1717: -- standard call to get message count and if count is 1, get message info.
1718: fnd_msg_pub.count_and_get
1719: ( p_count => x_msg_count,
1720: p_data => x_msg_data
1721: );
1722:
1739: BEGIN
1740: -- initialize message list if p_init_msg_list is set to true.
1741: IF fnd_api.to_boolean( p_init_msg_list )
1742: THEN
1743: fnd_msg_pub.initialize;
1744: END IF;
1745:
1746:
1747: -- initialize api return status to success
1749:
1750: -- validate not null column
1751: IF ( (p_source_transaction_date IS NULL) OR (p_source_transaction_date = fnd_api.g_miss_date) ) THEN
1752: fnd_message.set_name('CSI', 'CSI_NO_TXN_DATE');
1753: fnd_msg_pub.add;
1754: x_return_status := fnd_api.g_ret_sts_error;
1755: END IF;
1756:
1757: -- standard call to get message count and if count is 1, get message info.
1754: x_return_status := fnd_api.g_ret_sts_error;
1755: END IF;
1756:
1757: -- standard call to get message count and if count is 1, get message info.
1758: fnd_msg_pub.count_and_get
1759: ( p_count => x_msg_count,
1760: p_data => x_msg_data
1761: );
1762:
1781: BEGIN
1782: -- initialize message list if p_init_msg_list is set to true.
1783: IF fnd_api.to_boolean( p_init_msg_list )
1784: THEN
1785: fnd_msg_pub.initialize;
1786: END IF;
1787:
1788:
1789: -- initialize api return status to success
1792: -- validate not null column
1793:
1794: IF ( (p_transaction_type_id IS NULL) OR (p_transaction_type_id = fnd_api.g_miss_num) ) THEN
1795: fnd_message.set_name('CSI', 'CSI_NO_TXN_TYPE_ID');
1796: fnd_msg_pub.add;
1797: x_return_status := fnd_api.g_ret_sts_error;
1798: ELSE
1799: BEGIN
1800: SELECT 'x'
1804:
1805: EXCEPTION
1806: WHEN no_data_found THEN
1807: fnd_message.set_name('CSI', 'CSI_INVALID_TXN_TYPE_ID');
1808: fnd_msg_pub.add;
1809: x_return_status := fnd_api.g_ret_sts_error;
1810: END;
1811: END IF;
1812: -- standard call to get message count and if count is 1, get message info.
1809: x_return_status := fnd_api.g_ret_sts_error;
1810: END;
1811: END IF;
1812: -- standard call to get message count and if count is 1, get message info.
1813: fnd_msg_pub.count_and_get
1814: ( p_count => x_msg_count,
1815: p_data => x_msg_data
1816: );
1817: END validate_transaction_type_id;
1855: BEGIN
1856: -- initialize message list if p_init_msg_list is set to true.
1857: IF fnd_api.to_boolean( p_init_msg_list )
1858: THEN
1859: fnd_msg_pub.initialize;
1860: END IF;
1861:
1862:
1863: -- initialize api return status to success
1886:
1887: IF c_ref_csr%notfound
1888: THEN
1889: fnd_message.set_name ('CSI', 'CSI_INVALID_OBJECT_CODE');
1890: fnd_msg_pub.add;
1891: x_return_status := fnd_api.g_ret_sts_error;
1892: END IF;
1893:
1894: IF x_return_status <> fnd_api.g_ret_sts_error THEN
1918: END IF;
1919: EXCEPTION
1920: WHEN no_data_found THEN
1921: fnd_message.set_name('CSI', 'CSI_REF_NOT_FOUND');
1922: fnd_msg_pub.add;
1923: x_return_status := fnd_api.g_ret_sts_error;
1924:
1925: END;
1926: END;
1925: END;
1926: END;
1927:
1928: -- standard call to get message count and if count is 1, get message info.
1929: fnd_msg_pub.count_and_get
1930: ( p_count => x_msg_count,
1931: p_data => x_msg_data
1932: );
1933: END validate_source_object;
1954: BEGIN
1955: -- initialize message list if p_init_msg_list is set to true.
1956: IF fnd_api.to_boolean( p_init_msg_list )
1957: THEN
1958: fnd_msg_pub.initialize;
1959: END IF;
1960:
1961:
1962: -- initialize api return status to success
1964:
1965: IF(p_validation_mode = 'UPDATE') THEN
1966: IF ( (p_object_version_number IS NULL) OR (p_object_version_number = fnd_api.g_miss_num) ) THEN
1967: fnd_message.set_name('CSI', 'CSI_MISSING_OBJ_VER_NUM');
1968: fnd_msg_pub.add;
1969: x_return_status := fnd_api.g_ret_sts_error;
1970: END IF;
1971: END IF;
1972:
1970: END IF;
1971: END IF;
1972:
1973: -- standard call to get message count and if count is 1, get message info.
1974: fnd_msg_pub.count_and_get
1975: ( p_count => x_msg_count,
1976: p_data => x_msg_data
1977: );
1978:
1995: BEGIN
1996: -- initialize message list if p_init_msg_list is set to true.
1997: IF fnd_api.to_boolean( p_init_msg_list )
1998: THEN
1999: fnd_msg_pub.initialize;
2000: END IF;
2001:
2002:
2003: -- initialize api return status to success
2014: AND lookup_code=p_split_reason_code;
2015: EXCEPTION
2016: WHEN no_data_found THEN
2017: fnd_message.set_name('CSI', 'CSI_INVALID_REASON_CODE');
2018: fnd_msg_pub.add;
2019: x_return_status := fnd_api.g_ret_sts_error;
2020: END;
2021: END IF;
2022: -- standard call to get message count and if count is 1, get message info.
2019: x_return_status := fnd_api.g_ret_sts_error;
2020: END;
2021: END IF;
2022: -- standard call to get message count and if count is 1, get message info.
2023: fnd_msg_pub.count_and_get
2024: ( p_count => x_msg_count,
2025: p_data => x_msg_data
2026: );
2027: END validate_split_code;