128:
129: -- Initialize message list if p_init_msg_list is set to TRUE.
130: IF FND_API.to_Boolean( p_init_msg_list )
131: THEN
132: FND_MSG_PUB.initialize;
133: END IF;
134:
135: -- Initialize API return status to SUCCESS
136: x_return_status := FND_API.G_RET_STS_SUCCESS;
352: COMMIT WORK;
353: END IF;
354:
355: -- Standard call to get message count and if count is 1, get message info.
356: FND_MSG_PUB.Count_And_Get
357: (p_count => x_msg_count,
358: p_data => x_msg_data
359: );
360: EXCEPTION
366: WHEN FND_API.G_EXC_ERROR THEN
367: ROLLBACK TO CREATE_Offers_PVT;
368: x_return_status := FND_API.G_RET_STS_ERROR;
369: -- Standard call to get message count and if count=1, get the message
370: FND_MSG_PUB.Count_And_Get (
371: p_encoded => FND_API.G_FALSE,
372: p_count => x_msg_count,
373: p_data => x_msg_data
374: );
376: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
377: ROLLBACK TO CREATE_Offers_PVT;
378: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
379: -- Standard call to get message count and if count=1, get the message
380: FND_MSG_PUB.Count_And_Get (
381: p_encoded => FND_API.G_FALSE,
382: p_count => x_msg_count,
383: p_data => x_msg_data
384: );
385:
386: WHEN OTHERS THEN
387: ROLLBACK TO CREATE_Offers_PVT;
388: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
389: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
390: THEN
391: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
392: END IF;
393: -- Standard call to get message count and if count=1, get the message
387: ROLLBACK TO CREATE_Offers_PVT;
388: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
389: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
390: THEN
391: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
392: END IF;
393: -- Standard call to get message count and if count=1, get the message
394: FND_MSG_PUB.Count_And_Get (
395: p_encoded => FND_API.G_FALSE,
390: THEN
391: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
392: END IF;
393: -- Standard call to get message count and if count=1, get the message
394: FND_MSG_PUB.Count_And_Get (
395: p_encoded => FND_API.G_FALSE,
396: p_count => x_msg_count,
397: p_data => x_msg_data
398: );
747:
748: -- Initialize message list if p_init_msg_list is set to TRUE.
749: IF FND_API.to_Boolean( p_init_msg_list )
750: THEN
751: FND_MSG_PUB.initialize;
752: END IF;
753:
754: -- Initialize API return status to SUCCESS
755: x_return_status := FND_API.G_RET_STS_SUCCESS;
921: COMMIT WORK;
922: END IF;
923:
924: -- Standard call to get message count and if count is 1, get message info.
925: FND_MSG_PUB.Count_And_Get
926: (p_count => x_msg_count,
927: p_data => x_msg_data,
928: p_encoded => FND_API.G_FALSE
929: );
936: WHEN FND_API.G_EXC_ERROR THEN
937: ROLLBACK TO UPDATE_Offers_PVT;
938: x_return_status := FND_API.G_RET_STS_ERROR;
939: -- Standard call to get message count and if count=1, get the message
940: FND_MSG_PUB.Count_And_Get (
941: p_encoded => FND_API.G_FALSE,
942: p_count => x_msg_count,
943: p_data => x_msg_data
944: );
946: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
947: ROLLBACK TO UPDATE_Offers_PVT;
948: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
949: -- Standard call to get message count and if count=1, get the message
950: FND_MSG_PUB.Count_And_Get (
951: p_encoded => FND_API.G_FALSE,
952: p_count => x_msg_count,
953: p_data => x_msg_data
954: );
955: /*
956: WHEN OTHERS THEN
957: ROLLBACK TO UPDATE_Offers_PVT;
958: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
959: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
960: THEN
961: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
962: END IF;
963: -- Standard call to get message count and if count=1, get the message
957: ROLLBACK TO UPDATE_Offers_PVT;
958: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
959: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
960: THEN
961: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
962: END IF;
963: -- Standard call to get message count and if count=1, get the message
964: FND_MSG_PUB.Count_And_Get (
965: p_encoded => FND_API.G_FALSE,
960: THEN
961: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
962: END IF;
963: -- Standard call to get message count and if count=1, get the message
964: FND_MSG_PUB.Count_And_Get (
965: p_encoded => FND_API.G_FALSE,
966: p_count => x_msg_count,
967: p_data => x_msg_data
968: );
1002:
1003: -- Initialize message list if p_init_msg_list is set to TRUE.
1004: IF FND_API.to_Boolean( p_init_msg_list )
1005: THEN
1006: FND_MSG_PUB.initialize;
1007: END IF;
1008:
1009: -- Initialize API return status to SUCCESS
1010: x_return_status := FND_API.G_RET_STS_SUCCESS;
1026: COMMIT WORK;
1027: END IF;
1028:
1029: -- Standard call to get message count and if count is 1, get message info.
1030: FND_MSG_PUB.Count_And_Get
1031: (p_count => x_msg_count,
1032: p_data => x_msg_data
1033: );
1034: EXCEPTION
1040: WHEN FND_API.G_EXC_ERROR THEN
1041: ROLLBACK TO DELETE_Offers_PVT;
1042: x_return_status := FND_API.G_RET_STS_ERROR;
1043: -- Standard call to get message count and if count=1, get the message
1044: FND_MSG_PUB.Count_And_Get (
1045: p_encoded => FND_API.G_FALSE,
1046: p_count => x_msg_count,
1047: p_data => x_msg_data
1048: );
1050: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1051: ROLLBACK TO DELETE_Offers_PVT;
1052: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1053: -- Standard call to get message count and if count=1, get the message
1054: FND_MSG_PUB.Count_And_Get (
1055: p_encoded => FND_API.G_FALSE,
1056: p_count => x_msg_count,
1057: p_data => x_msg_data
1058: );
1059:
1060: WHEN OTHERS THEN
1061: ROLLBACK TO DELETE_Offers_PVT;
1062: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1063: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1064: THEN
1065: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1066: END IF;
1067: -- Standard call to get message count and if count=1, get the message
1061: ROLLBACK TO DELETE_Offers_PVT;
1062: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1063: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1064: THEN
1065: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1066: END IF;
1067: -- Standard call to get message count and if count=1, get the message
1068: FND_MSG_PUB.Count_And_Get (
1069: p_encoded => FND_API.G_FALSE,
1064: THEN
1065: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1066: END IF;
1067: -- Standard call to get message count and if count=1, get the message
1068: FND_MSG_PUB.Count_And_Get (
1069: p_encoded => FND_API.G_FALSE,
1070: p_count => x_msg_count,
1071: p_data => x_msg_data
1072: );
1104:
1105: -- Initialize message list if p_init_msg_list is set to TRUE.
1106: IF FND_API.to_Boolean( p_init_msg_list )
1107: THEN
1108: FND_MSG_PUB.initialize;
1109: END IF;
1110:
1111: -- Standard call to check for call compatibility.
1112: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
1129: FETCH c_Offers INTO l_OFFER_ID;
1130:
1131: IF (c_Offers%NOTFOUND) THEN
1132: CLOSE c_Offers;
1133: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
1134: FND_MESSAGE.set_name('OZF', 'OZF_API_RECORD_NOT_FOUND');
1135: FND_MSG_PUB.add;
1136: END IF;
1137: RAISE FND_API.g_exc_error;
1131: IF (c_Offers%NOTFOUND) THEN
1132: CLOSE c_Offers;
1133: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
1134: FND_MESSAGE.set_name('OZF', 'OZF_API_RECORD_NOT_FOUND');
1135: FND_MSG_PUB.add;
1136: END IF;
1137: RAISE FND_API.g_exc_error;
1138: END IF;
1139:
1139:
1140: CLOSE c_Offers;
1141:
1142: -------------------- finish --------------------------
1143: FND_MSG_PUB.count_and_get(
1144: p_encoded => FND_API.g_false,
1145: p_count => x_msg_count,
1146: p_data => x_msg_data);
1147:
1154: WHEN FND_API.G_EXC_ERROR THEN
1155: ROLLBACK TO LOCK_Offers_PVT;
1156: x_return_status := FND_API.G_RET_STS_ERROR;
1157: -- Standard call to get message count and if count=1, get the message
1158: FND_MSG_PUB.Count_And_Get (
1159: p_encoded => FND_API.G_FALSE,
1160: p_count => x_msg_count,
1161: p_data => x_msg_data
1162: );
1164: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1165: ROLLBACK TO LOCK_Offers_PVT;
1166: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1167: -- Standard call to get message count and if count=1, get the message
1168: FND_MSG_PUB.Count_And_Get (
1169: p_encoded => FND_API.G_FALSE,
1170: p_count => x_msg_count,
1171: p_data => x_msg_data
1172: );
1173:
1174: WHEN OTHERS THEN
1175: ROLLBACK TO LOCK_Offers_PVT;
1176: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1177: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1178: THEN
1179: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1180: END IF;
1181: -- Standard call to get message count and if count=1, get the message
1175: ROLLBACK TO LOCK_Offers_PVT;
1176: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1177: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1178: THEN
1179: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1180: END IF;
1181: -- Standard call to get message count and if count=1, get the message
1182: FND_MSG_PUB.Count_And_Get (
1183: p_encoded => FND_API.G_FALSE,
1178: THEN
1179: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1180: END IF;
1181: -- Standard call to get message count and if count=1, get the message
1182: FND_MSG_PUB.Count_And_Get (
1183: p_encoded => FND_API.G_FALSE,
1184: p_count => x_msg_count,
1185: p_data => x_msg_data
1186: );
1520: ,p_lookup_code => p_offers_rec.modifier_level_code
1521: ) = FND_API.g_false
1522: THEN
1523: --OZF_Utility_PVT.Error_Message('OZF_OFR_BAD_MODIFIER_LEVEL_CODE') ;
1524: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1525: THEN
1526: FND_MESSAGE.set_name('OZF', 'OZF_OFR_BAD_MODIFIER_LEVEL_COD');
1527: FND_MSG_PUB.add;
1528: END IF;
1523: --OZF_Utility_PVT.Error_Message('OZF_OFR_BAD_MODIFIER_LEVEL_CODE') ;
1524: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1525: THEN
1526: FND_MESSAGE.set_name('OZF', 'OZF_OFR_BAD_MODIFIER_LEVEL_COD');
1527: FND_MSG_PUB.add;
1528: END IF;
1529: x_return_status := FND_API.g_ret_sts_error;
1530: RETURN;
1531: END IF;
1613: ,p_lookup_code => p_offers_rec.autopay_method
1614: ) = FND_API.g_false
1615: THEN
1616: --OZF_Utility_PVT.Error_Message('OZF_OFR_BAD_MODIFIER_LEVEL_CODE') ;
1617: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1618: THEN
1619: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_BAD_PAYMENT_METHOD');
1620: FND_MSG_PUB.add;
1621: END IF;
1616: --OZF_Utility_PVT.Error_Message('OZF_OFR_BAD_MODIFIER_LEVEL_CODE') ;
1617: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1618: THEN
1619: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_BAD_PAYMENT_METHOD');
1620: FND_MSG_PUB.add;
1621: END IF;
1622: x_return_status := FND_API.g_ret_sts_error;
1623: RETURN;
1624: END IF;
1633: ,p_lookup_code => p_offers_rec.autopay_party_attr
1634: ) = FND_API.g_false
1635: THEN
1636: --OZF_Utility_PVT.Error_Message('OZF_OFR_BAD_MODIFIER_LEVEL_CODE') ;
1637: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1638: THEN
1639: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_BAD_AUTOPAY_CUSTTYPE');
1640: FND_MSG_PUB.add;
1641: END IF;
1636: --OZF_Utility_PVT.Error_Message('OZF_OFR_BAD_MODIFIER_LEVEL_CODE') ;
1637: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1638: THEN
1639: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_BAD_AUTOPAY_CUSTTYPE');
1640: FND_MSG_PUB.add;
1641: END IF;
1642: x_return_status := FND_API.g_ret_sts_error;
1643: RETURN;
1644: END IF;
1692: THEN
1693: l_start_date := p_offers_rec.perf_date_from;
1694: l_end_date := p_offers_rec.perf_date_to;
1695: IF l_start_date > l_end_date THEN
1696: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1697: THEN
1698: FND_MESSAGE.set_name('OZF', 'OZF_OFR_SHIP_START_AFTER_END');
1699: FND_MSG_PUB.add;
1700: END IF;
1695: IF l_start_date > l_end_date THEN
1696: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1697: THEN
1698: FND_MESSAGE.set_name('OZF', 'OZF_OFR_SHIP_START_AFTER_END');
1699: FND_MSG_PUB.add;
1700: END IF;
1701: x_return_status := FND_API.g_ret_sts_error;
1702: END IF;
1703: END IF;
1802:
1803: -- Initialize message list if p_init_msg_list is set to TRUE.
1804: IF FND_API.to_Boolean( p_init_msg_list )
1805: THEN
1806: FND_MSG_PUB.initialize;
1807: END IF;
1808:
1809: x_return_status := FND_API.g_ret_sts_success;
1810:
1846: -- Initialize API return status to SUCCESS
1847: x_return_status := FND_API.G_RET_STS_SUCCESS;
1848:
1849: -- Standard call to get message count and if count is 1, get message info.
1850: FND_MSG_PUB.Count_And_Get
1851: (p_count => x_msg_count,
1852: p_data => x_msg_data
1853: );
1854:
1861: WHEN FND_API.G_EXC_ERROR THEN
1862: ROLLBACK TO VALIDATE_Offers_;
1863: x_return_status := FND_API.G_RET_STS_ERROR;
1864: -- Standard call to get message count and if count=1, get the message
1865: FND_MSG_PUB.Count_And_Get (
1866: p_encoded => FND_API.G_FALSE,
1867: p_count => x_msg_count,
1868: p_data => x_msg_data
1869: );
1871: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1872: ROLLBACK TO VALIDATE_Offers_;
1873: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1874: -- Standard call to get message count and if count=1, get the message
1875: FND_MSG_PUB.Count_And_Get (
1876: p_encoded => FND_API.G_FALSE,
1877: p_count => x_msg_count,
1878: p_data => x_msg_data
1879: );
1880:
1881: WHEN OTHERS THEN
1882: ROLLBACK TO VALIDATE_Offers_;
1883: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1884: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1885: THEN
1886: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1887: END IF;
1888: -- Standard call to get message count and if count=1, get the message
1882: ROLLBACK TO VALIDATE_Offers_;
1883: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1884: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1885: THEN
1886: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1887: END IF;
1888: -- Standard call to get message count and if count=1, get the message
1889: FND_MSG_PUB.Count_And_Get (
1890: p_encoded => FND_API.G_FALSE,
1885: THEN
1886: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1887: END IF;
1888: -- Standard call to get message count and if count=1, get the message
1889: FND_MSG_PUB.Count_And_Get (
1890: p_encoded => FND_API.G_FALSE,
1891: p_count => x_msg_count,
1892: p_data => x_msg_data
1893: );
1908: BEGIN
1909: -- Initialize message list if p_init_msg_list is set to TRUE.
1910: IF FND_API.to_Boolean( p_init_msg_list )
1911: THEN
1912: FND_MSG_PUB.initialize;
1913: END IF;
1914:
1915: -- Initialize API return status to SUCCESS
1916: x_return_status := FND_API.G_RET_STS_SUCCESS;
1920: -- THEN
1921: -- x_return_status := FND_API.G_RET_STS_ERROR;
1922:
1923: -- Standard call to get message count and if count is 1, get message info.
1924: FND_MSG_PUB.Count_And_Get
1925: (p_count => x_msg_count,
1926: p_data => x_msg_data
1927: );
1928: END Validate_offers_Rec;