211: g_pkg_name CONSTANT VARCHAR2(30):= 'OZF_Offer_Pvt';
212: g_file_name CONSTANT VARCHAR2(15) := 'ozfvofrb.pls';
213: g_sd_offer VARCHAR2(15) := 'N';
214:
215: OZF_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
216: OZF_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
217: OZF_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
218:
219:
212: g_file_name CONSTANT VARCHAR2(15) := 'ozfvofrb.pls';
213: g_sd_offer VARCHAR2(15) := 'N';
214:
215: OZF_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
216: OZF_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
217: OZF_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
218:
219:
220: PROCEDURE debug_message(p_message IN VARCHAR2)
213: g_sd_offer VARCHAR2(15) := 'N';
214:
215: OZF_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
216: OZF_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
217: OZF_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
218:
219:
220: PROCEDURE debug_message(p_message IN VARCHAR2)
221: IS
553: l_msg_data := Oe_Msg_Pub.get( p_msg_index => i,
554: p_encoded => 'F' );
555: Fnd_Message.SET_NAME('OZF','OZF_QP_ERROR');
556: Fnd_Message.SET_TOKEN('ERROR_MSG',l_msg_data);
557: Fnd_Msg_Pub.ADD;
558: END LOOP;
559: END add_message;
560:
561: FUNCTION find_territories( aso_party_id IN NUMBER,oe_sold_to_org IN NUMBER)
655:
656: SAVEPOINT process_adv_options;
657:
658: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
659: Fnd_Msg_Pub.initialize;
660: END IF;
661:
662: IF NOT Fnd_Api.compatible_api_call
663: (
762: p_offers_rec => l_promotional_offers_rec,
763: x_object_version_number => l_object_version_number
764: );
765:
766: Fnd_Msg_Pub.Count_AND_Get
767: ( p_count => x_msg_count,
768: p_data => x_msg_data,
769: p_encoded => Fnd_Api.G_FALSE
770: );
775: EXCEPTION
776: WHEN Fnd_Api.G_EXC_ERROR THEN
777: x_return_status := Fnd_Api.g_ret_sts_error ;
778: ROLLBACK TO process_adv_options;
779: Fnd_Msg_Pub.Count_AND_Get
780: ( p_count => x_msg_count,
781: p_data => x_msg_data,
782: p_encoded => Fnd_Api.G_FALSE
783: );
783: );
784: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
785: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
786: ROLLBACK TO process_adv_options;
787: Fnd_Msg_Pub.Count_AND_Get
788: ( p_count => x_msg_count,
789: p_data => x_msg_data,
790: p_encoded => Fnd_Api.G_FALSE
791: );
791: );
792: WHEN OTHERS THEN
793: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
794: ROLLBACK TO process_adv_options;
795: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
796: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
797: END IF;
798: Fnd_Msg_Pub.Count_AND_Get
799: ( p_count => x_msg_count,
792: WHEN OTHERS THEN
793: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
794: ROLLBACK TO process_adv_options;
795: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
796: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
797: END IF;
798: Fnd_Msg_Pub.Count_AND_Get
799: ( p_count => x_msg_count,
800: p_data => x_msg_data,
794: ROLLBACK TO process_adv_options;
795: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
796: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
797: END IF;
798: Fnd_Msg_Pub.Count_AND_Get
799: ( p_count => x_msg_count,
800: p_data => x_msg_data,
801: p_encoded => Fnd_Api.G_FALSE
802: );
874:
875: SAVEPOINT create_offer_tiers;
876:
877: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
878: Fnd_Msg_Pub.initialize;
879: END IF;
880:
881: IF NOT Fnd_Api.compatible_api_call
882: (
1019:
1020: -- x_modifiers_tbl := v_modifiers_tbl;
1021: -- x_pricing_attr_tbl := v_pricing_attr_tbl;
1022:
1023: Fnd_Msg_Pub.Count_AND_Get
1024: ( p_count => x_msg_count,
1025: p_data => x_msg_data,
1026: p_encoded => Fnd_Api.G_FALSE
1027: );
1032: EXCEPTION
1033: WHEN Fnd_Api.G_EXC_ERROR THEN
1034: x_return_status := Fnd_Api.g_ret_sts_error ;
1035: ROLLBACK TO create_offer_tiers;
1036: Fnd_Msg_Pub.Count_AND_Get
1037: ( p_count => x_msg_count,
1038: p_data => x_msg_data,
1039: p_encoded => Fnd_Api.G_FALSE
1040: );
1040: );
1041: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1042: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
1043: ROLLBACK TO create_offer_tiers;
1044: Fnd_Msg_Pub.Count_AND_Get
1045: ( p_count => x_msg_count,
1046: p_data => x_msg_data,
1047: p_encoded => Fnd_Api.G_FALSE
1048: );
1048: );
1049: WHEN OTHERS THEN
1050: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1051: ROLLBACK TO create_offer_tiers;
1052: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1053: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1054: END IF;
1055: Fnd_Msg_Pub.Count_AND_Get
1056: ( p_count => x_msg_count,
1049: WHEN OTHERS THEN
1050: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1051: ROLLBACK TO create_offer_tiers;
1052: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1053: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1054: END IF;
1055: Fnd_Msg_Pub.Count_AND_Get
1056: ( p_count => x_msg_count,
1057: p_data => x_msg_data,
1051: ROLLBACK TO create_offer_tiers;
1052: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1053: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1054: END IF;
1055: Fnd_Msg_Pub.Count_AND_Get
1056: ( p_count => x_msg_count,
1057: p_data => x_msg_data,
1058: p_encoded => Fnd_Api.G_FALSE
1059: );
1142: BEGIN
1143: SAVEPOINT process_exlusions;
1144:
1145: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
1146: Fnd_Msg_Pub.initialize;
1147: END IF;
1148:
1149: IF NOT Fnd_Api.compatible_api_call
1150: (
1233: EXCEPTION
1234: WHEN Fnd_Api.G_EXC_ERROR THEN
1235: x_return_status := Fnd_Api.g_ret_sts_error ;
1236: ROLLBACK TO process_exlusions;
1237: Fnd_Msg_Pub.Count_AND_Get
1238: ( p_count => x_msg_count,
1239: p_data => x_msg_data,
1240: p_encoded => Fnd_Api.G_FALSE
1241: );
1241: );
1242: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1243: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
1244: ROLLBACK TO process_exlusions;
1245: Fnd_Msg_Pub.Count_AND_Get
1246: ( p_count => x_msg_count,
1247: p_data => x_msg_data,
1248: p_encoded => Fnd_Api.G_FALSE
1249: );
1249: );
1250: WHEN OTHERS THEN
1251: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1252: ROLLBACK TO process_exlusions;
1253: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1254: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1255: END IF;
1256: Fnd_Msg_Pub.Count_AND_Get
1257: ( p_count => x_msg_count,
1250: WHEN OTHERS THEN
1251: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1252: ROLLBACK TO process_exlusions;
1253: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1254: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1255: END IF;
1256: Fnd_Msg_Pub.Count_AND_Get
1257: ( p_count => x_msg_count,
1258: p_data => x_msg_data,
1252: ROLLBACK TO process_exlusions;
1253: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1254: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1255: END IF;
1256: Fnd_Msg_Pub.Count_AND_Get
1257: ( p_count => x_msg_count,
1258: p_data => x_msg_data,
1259: p_encoded => Fnd_Api.G_FALSE
1260: );
1337: END IF;
1338: EXCEPTION
1339: WHEN Fnd_Api.G_EXC_ERROR THEN
1340: x_return_status := Fnd_Api.g_ret_sts_error ;
1341: Fnd_Msg_Pub.Count_AND_Get
1342: ( p_count => x_msg_count,
1343: p_data => x_msg_data,
1344: p_encoded => Fnd_Api.G_FALSE
1345: );
1344: p_encoded => Fnd_Api.G_FALSE
1345: );
1346: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1347: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
1348: Fnd_Msg_Pub.Count_AND_Get
1349: ( p_count => x_msg_count,
1350: p_data => x_msg_data,
1351: p_encoded => Fnd_Api.G_FALSE
1352: );
1351: p_encoded => Fnd_Api.G_FALSE
1352: );
1353: WHEN OTHERS THEN
1354: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1355: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1356: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'process_exclusions');
1357: END IF;
1358: Fnd_Msg_Pub.Count_AND_Get
1359: ( p_count => x_msg_count,
1352: );
1353: WHEN OTHERS THEN
1354: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1355: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1356: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'process_exclusions');
1357: END IF;
1358: Fnd_Msg_Pub.Count_AND_Get
1359: ( p_count => x_msg_count,
1360: p_data => x_msg_data,
1354: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1355: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1356: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'process_exclusions');
1357: END IF;
1358: Fnd_Msg_Pub.Count_AND_Get
1359: ( p_count => x_msg_count,
1360: p_data => x_msg_data,
1361: p_encoded => Fnd_Api.G_FALSE
1362: );
1429: BEGIN
1430: SAVEPOINT process_rltd_modifier_qual;
1431:
1432: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
1433: Fnd_Msg_Pub.initialize;
1434: END IF;
1435:
1436: x_return_status := Fnd_Api.g_ret_sts_success;
1437:
1512: EXCEPTION
1513: WHEN Fnd_Api.G_EXC_ERROR THEN
1514: x_return_status := Fnd_Api.g_ret_sts_error ;
1515: ROLLBACK TO process_rltd_modifier_qual;
1516: Fnd_Msg_Pub.Count_AND_Get
1517: ( p_count => x_msg_count,
1518: p_data => x_msg_data,
1519: p_encoded => Fnd_Api.G_FALSE
1520: );
1520: );
1521: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1522: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
1523: ROLLBACK TO process_rltd_modifier_qual;
1524: Fnd_Msg_Pub.Count_AND_Get
1525: ( p_count => x_msg_count,
1526: p_data => x_msg_data,
1527: p_encoded => Fnd_Api.G_FALSE
1528: );
1528: );
1529: WHEN OTHERS THEN
1530: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1531: ROLLBACK TO process_rltd_modifier_qual;
1532: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1533: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1534: END IF;
1535: Fnd_Msg_Pub.Count_AND_Get
1536: ( p_count => x_msg_count,
1529: WHEN OTHERS THEN
1530: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1531: ROLLBACK TO process_rltd_modifier_qual;
1532: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1533: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1534: END IF;
1535: Fnd_Msg_Pub.Count_AND_Get
1536: ( p_count => x_msg_count,
1537: p_data => x_msg_data,
1531: ROLLBACK TO process_rltd_modifier_qual;
1532: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1533: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1534: END IF;
1535: Fnd_Msg_Pub.Count_AND_Get
1536: ( p_count => x_msg_count,
1537: p_data => x_msg_data,
1538: p_encoded => Fnd_Api.G_FALSE
1539: );
1576: BEGIN
1577: SAVEPOINT process_market_qualifiers;
1578:
1579: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
1580: Fnd_Msg_Pub.initialize;
1581: END IF;
1582:
1583: IF NOT Fnd_Api.compatible_api_call
1584: (
1707: SET qualifier_deleted = 'Y'
1708: WHERE qp_list_header_id = l_qp_list_header_id;
1709: END IF;
1710:
1711: Fnd_Msg_Pub.Count_AND_Get
1712: ( p_count => x_msg_count,
1713: p_data => x_msg_data,
1714: p_encoded => Fnd_Api.G_FALSE
1715: );
1721: EXCEPTION
1722: WHEN Fnd_Api.G_EXC_ERROR THEN
1723: x_return_status := Fnd_Api.g_ret_sts_error ;
1724: ROLLBACK TO process_market_qualifiers;
1725: Fnd_Msg_Pub.Count_AND_Get
1726: ( p_count => x_msg_count,
1727: p_data => x_msg_data,
1728: p_encoded => Fnd_Api.G_FALSE
1729: );
1729: );
1730: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1731: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
1732: ROLLBACK TO process_market_qualifiers;
1733: Fnd_Msg_Pub.Count_AND_Get
1734: ( p_count => x_msg_count,
1735: p_data => x_msg_data,
1736: p_encoded => Fnd_Api.G_FALSE
1737: );
1737: );
1738: WHEN OTHERS THEN
1739: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1740: ROLLBACK TO process_market_qualifiers;
1741: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1742: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1743: END IF;
1744: Fnd_Msg_Pub.Count_AND_Get
1745: ( p_count => x_msg_count,
1738: WHEN OTHERS THEN
1739: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1740: ROLLBACK TO process_market_qualifiers;
1741: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1742: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1743: END IF;
1744: Fnd_Msg_Pub.Count_AND_Get
1745: ( p_count => x_msg_count,
1746: p_data => x_msg_data,
1740: ROLLBACK TO process_market_qualifiers;
1741: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1742: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1743: END IF;
1744: Fnd_Msg_Pub.Count_AND_Get
1745: ( p_count => x_msg_count,
1746: p_data => x_msg_data,
1747: p_encoded => Fnd_Api.G_FALSE
1748: );
1778: BEGIN
1779: SAVEPOINT process_market_qualifiers;
1780:
1781: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
1782: Fnd_Msg_Pub.initialize;
1783: END IF;
1784:
1785: IF NOT Fnd_Api.compatible_api_call
1786: (
1890: SET qualifier_deleted = 'Y'
1891: WHERE qp_list_header_id = l_qp_list_header_id;
1892: END IF;
1893:
1894: Fnd_Msg_Pub.Count_AND_Get
1895: ( p_count => x_msg_count,
1896: p_data => x_msg_data,
1897: p_encoded => Fnd_Api.G_FALSE
1898: );
1903: EXCEPTION
1904: WHEN Fnd_Api.G_EXC_ERROR THEN
1905: x_return_status := Fnd_Api.g_ret_sts_error ;
1906: ROLLBACK TO process_market_qualifiers;
1907: Fnd_Msg_Pub.Count_AND_Get
1908: ( p_count => x_msg_count,
1909: p_data => x_msg_data,
1910: p_encoded => Fnd_Api.G_FALSE
1911: );
1911: );
1912: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
1913: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
1914: ROLLBACK TO process_market_qualifiers;
1915: Fnd_Msg_Pub.Count_AND_Get
1916: ( p_count => x_msg_count,
1917: p_data => x_msg_data,
1918: p_encoded => Fnd_Api.G_FALSE
1919: );
1919: );
1920: WHEN OTHERS THEN
1921: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1922: ROLLBACK TO process_market_qualifiers;
1923: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1924: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1925: END IF;
1926: Fnd_Msg_Pub.Count_AND_Get
1927: ( p_count => x_msg_count,
1920: WHEN OTHERS THEN
1921: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
1922: ROLLBACK TO process_market_qualifiers;
1923: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1924: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1925: END IF;
1926: Fnd_Msg_Pub.Count_AND_Get
1927: ( p_count => x_msg_count,
1928: p_data => x_msg_data,
1922: ROLLBACK TO process_market_qualifiers;
1923: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
1924: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1925: END IF;
1926: Fnd_Msg_Pub.Count_AND_Get
1927: ( p_count => x_msg_count,
1928: p_data => x_msg_data,
1929: p_encoded => Fnd_Api.G_FALSE
1930: );
2020: RAISE Fnd_Api.g_exc_unexpected_error;
2021: END IF;
2022: END IF;
2023:
2024: Fnd_Msg_Pub.Count_AND_Get
2025: ( p_count => x_msg_count,
2026: p_data => x_msg_data,
2027: p_encoded => Fnd_Api.G_FALSE
2028: );
2030: EXCEPTION
2031: WHEN Fnd_Api.G_EXC_ERROR THEN
2032: x_return_status := Fnd_Api.g_ret_sts_error ;
2033: ROLLBACK TO offer_budget;
2034: Fnd_Msg_Pub.Count_AND_Get
2035: ( p_count => x_msg_count,
2036: p_data => x_msg_data,
2037: p_encoded => Fnd_Api.G_FALSE
2038: );
2038: );
2039: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2040: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
2041: ROLLBACK TO offer_budget;
2042: Fnd_Msg_Pub.Count_AND_Get
2043: ( p_count => x_msg_count,
2044: p_data => x_msg_data,
2045: p_encoded => Fnd_Api.G_FALSE
2046: );
2046: );
2047: WHEN OTHERS THEN
2048: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2049: ROLLBACK TO offer_budget;
2050: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2051: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2052: END IF;
2053: Fnd_Msg_Pub.Count_AND_Get
2054: ( p_count => x_msg_count,
2047: WHEN OTHERS THEN
2048: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2049: ROLLBACK TO offer_budget;
2050: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2051: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2052: END IF;
2053: Fnd_Msg_Pub.Count_AND_Get
2054: ( p_count => x_msg_count,
2055: p_data => x_msg_data,
2049: ROLLBACK TO offer_budget;
2050: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2051: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2052: END IF;
2053: Fnd_Msg_Pub.Count_AND_Get
2054: ( p_count => x_msg_count,
2055: p_data => x_msg_data,
2056: p_encoded => Fnd_Api.G_FALSE
2057: );
2104: ELSIF x_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
2105: RAISE Fnd_Api.g_exc_unexpected_error;
2106: END IF;
2107:
2108: Fnd_Msg_Pub.Count_AND_Get
2109: ( p_count => x_msg_count,
2110: p_data => x_msg_data,
2111: p_encoded => Fnd_Api.G_FALSE
2112: );
2114: EXCEPTION
2115: WHEN Fnd_Api.G_EXC_ERROR THEN
2116: x_return_status := Fnd_Api.g_ret_sts_error ;
2117: ROLLBACK TO offer_object_usage;
2118: Fnd_Msg_Pub.Count_AND_Get
2119: ( p_count => x_msg_count,
2120: p_data => x_msg_data,
2121: p_encoded => Fnd_Api.G_FALSE
2122: );
2122: );
2123: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2124: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
2125: ROLLBACK TO offer_object_usage;
2126: Fnd_Msg_Pub.Count_AND_Get
2127: ( p_count => x_msg_count,
2128: p_data => x_msg_data,
2129: p_encoded => Fnd_Api.G_FALSE
2130: );
2130: );
2131: WHEN OTHERS THEN
2132: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2133: ROLLBACK TO offer_object_usage;
2134: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2135: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2136: END IF;
2137: Fnd_Msg_Pub.Count_AND_Get
2138: ( p_count => x_msg_count,
2131: WHEN OTHERS THEN
2132: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2133: ROLLBACK TO offer_object_usage;
2134: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2135: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2136: END IF;
2137: Fnd_Msg_Pub.Count_AND_Get
2138: ( p_count => x_msg_count,
2139: p_data => x_msg_data,
2133: ROLLBACK TO offer_object_usage;
2134: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2135: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2136: END IF;
2137: Fnd_Msg_Pub.Count_AND_Get
2138: ( p_count => x_msg_count,
2139: p_data => x_msg_data,
2140: p_encoded => Fnd_Api.G_FALSE
2141: );
2457: RAISE Fnd_Api.g_exc_unexpected_error;
2458: END IF;
2459: END IF;
2460:
2461: Fnd_Msg_Pub.Count_AND_Get
2462: ( p_count => x_msg_count,
2463: p_data => x_msg_data,
2464: p_encoded => Fnd_Api.G_FALSE
2465: );
2467: EXCEPTION
2468: WHEN Fnd_Api.G_EXC_ERROR THEN
2469: x_return_status := Fnd_Api.g_ret_sts_error ;
2470: ROLLBACK TO offer_qualifier;
2471: Fnd_Msg_Pub.Count_AND_Get
2472: ( p_count => x_msg_count,
2473: p_data => x_msg_data,
2474: p_encoded => Fnd_Api.G_FALSE
2475: );
2475: );
2476: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2477: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
2478: ROLLBACK TO offer_qualifier;
2479: Fnd_Msg_Pub.Count_AND_Get
2480: ( p_count => x_msg_count,
2481: p_data => x_msg_data,
2482: p_encoded => Fnd_Api.G_FALSE
2483: );
2483: );
2484: WHEN OTHERS THEN
2485: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2486: ROLLBACK TO offer_qualifier;
2487: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2488: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2489: END IF;
2490: Fnd_Msg_Pub.Count_AND_Get
2491: ( p_count => x_msg_count,
2484: WHEN OTHERS THEN
2485: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2486: ROLLBACK TO offer_qualifier;
2487: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2488: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2489: END IF;
2490: Fnd_Msg_Pub.Count_AND_Get
2491: ( p_count => x_msg_count,
2492: p_data => x_msg_data,
2486: ROLLBACK TO offer_qualifier;
2487: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2488: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2489: END IF;
2490: Fnd_Msg_Pub.Count_AND_Get
2491: ( p_count => x_msg_count,
2492: p_data => x_msg_data,
2493: p_encoded => Fnd_Api.G_FALSE
2494: );
2633: RAISE Fnd_Api.g_exc_unexpected_error;
2634: END IF;
2635:
2636:
2637: Fnd_Msg_Pub.Count_AND_Get
2638: ( p_count => x_msg_count,
2639: p_data => x_msg_data,
2640: p_encoded => Fnd_Api.G_FALSE
2641: );
2643: EXCEPTION
2644: WHEN Fnd_Api.G_EXC_ERROR THEN
2645: x_return_status := Fnd_Api.g_ret_sts_error ;
2646: ROLLBACK TO vo_qualifier_pvt;
2647: Fnd_Msg_Pub.Count_AND_Get
2648: ( p_count => x_msg_count,
2649: p_data => x_msg_data,
2650: p_encoded => Fnd_Api.G_FALSE
2651: );
2651: );
2652: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2653: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
2654: ROLLBACK TO vo_qualifier_pvt;
2655: Fnd_Msg_Pub.Count_AND_Get
2656: ( p_count => x_msg_count,
2657: p_data => x_msg_data,
2658: p_encoded => Fnd_Api.G_FALSE
2659: );
2659: );
2660: WHEN OTHERS THEN
2661: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2662: ROLLBACK TO vo_qualifier_pvt;
2663: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2664: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2665: END IF;
2666: Fnd_Msg_Pub.Count_AND_Get
2667: ( p_count => x_msg_count,
2660: WHEN OTHERS THEN
2661: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2662: ROLLBACK TO vo_qualifier_pvt;
2663: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2664: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2665: END IF;
2666: Fnd_Msg_Pub.Count_AND_Get
2667: ( p_count => x_msg_count,
2668: p_data => x_msg_data,
2662: ROLLBACK TO vo_qualifier_pvt;
2663: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2664: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2665: END IF;
2666: Fnd_Msg_Pub.Count_AND_Get
2667: ( p_count => x_msg_count,
2668: p_data => x_msg_data,
2669: p_encoded => Fnd_Api.G_FALSE
2670: );
2835: ELSIF x_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
2836: add_message(x_msg_count);
2837: RAISE Fnd_Api.g_exc_unexpected_error;
2838: END IF;
2839: Fnd_Msg_Pub.Count_AND_Get
2840: ( p_count => x_msg_count,
2841: p_data => x_msg_data,
2842: p_encoded => Fnd_Api.G_FALSE
2843: );
2844:
2845: EXCEPTION
2846: WHEN Fnd_Api.G_EXC_ERROR THEN
2847: x_return_status := Fnd_Api.g_ret_sts_error ;
2848: Fnd_Msg_Pub.Count_AND_Get
2849: ( p_count => x_msg_count,
2850: p_data => x_msg_data,
2851: p_encoded => Fnd_Api.G_FALSE
2852: );
2851: p_encoded => Fnd_Api.G_FALSE
2852: );
2853: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
2854: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
2855: Fnd_Msg_Pub.Count_AND_Get
2856: ( p_count => x_msg_count,
2857: p_data => x_msg_data,
2858: p_encoded => Fnd_Api.G_FALSE
2859: );
2858: p_encoded => Fnd_Api.G_FALSE
2859: );
2860: WHEN OTHERS THEN
2861: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2862: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2863: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2864: END IF;
2865: Fnd_Msg_Pub.Count_AND_Get
2866: ( p_count => x_msg_count,
2859: );
2860: WHEN OTHERS THEN
2861: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2862: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2863: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2864: END IF;
2865: Fnd_Msg_Pub.Count_AND_Get
2866: ( p_count => x_msg_count,
2867: p_data => x_msg_data,
2861: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
2862: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
2863: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2864: END IF;
2865: Fnd_Msg_Pub.Count_AND_Get
2866: ( p_count => x_msg_count,
2867: p_data => x_msg_data,
2868: p_encoded => Fnd_Api.G_FALSE
2869: );
2932: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2933: END IF;
2934:
2935: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2936: FND_MSG_PUB.initialize;
2937: END IF;
2938:
2939: x_return_status := FND_API.G_RET_STS_SUCCESS;
2940:
2974: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2975: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2976: END IF;
2977:
2978: FND_MSG_PUB.Count_And_Get
2979: (
2980: p_count => x_msg_count,
2981: p_data => x_msg_data,
2982: p_encoded => FND_API.G_FALSE
2985: EXCEPTION
2986: WHEN FND_API.G_EXC_ERROR THEN
2987: x_return_status := FND_API.g_ret_sts_error ;
2988: ROLLBACK TO post_lumpsum_offer;
2989: FND_MSG_PUB.Count_AND_Get
2990: ( p_count => l_msg_count,
2991: p_data => l_msg_data,
2992: p_encoded => FND_API.G_FALSE
2993: );
2993: );
2994: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2995: x_return_status := FND_API.g_ret_sts_unexp_error ;
2996: ROLLBACK TO post_lumpsum_offer;
2997: FND_MSG_PUB.Count_AND_Get
2998: ( p_count => l_msg_count,
2999: p_data => l_msg_data,
3000: p_encoded => FND_API.G_FALSE
3001: );
3001: );
3002: WHEN OTHERS THEN
3003: x_return_status := FND_API.g_ret_sts_unexp_error ;
3004: ROLLBACK TO post_lumpsum_offer;
3005: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3006: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3007: END IF;
3008: FND_MSG_PUB.Count_AND_Get
3009: ( p_count => l_msg_count,
3002: WHEN OTHERS THEN
3003: x_return_status := FND_API.g_ret_sts_unexp_error ;
3004: ROLLBACK TO post_lumpsum_offer;
3005: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3006: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3007: END IF;
3008: FND_MSG_PUB.Count_AND_Get
3009: ( p_count => l_msg_count,
3010: p_data => l_msg_data,
3004: ROLLBACK TO post_lumpsum_offer;
3005: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3006: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3007: END IF;
3008: FND_MSG_PUB.Count_AND_Get
3009: ( p_count => l_msg_count,
3010: p_data => l_msg_data,
3011: p_encoded => FND_API.G_FALSE
3012: );
3076: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3077: END IF;
3078:
3079: IF FND_API.to_Boolean( p_init_msg_list ) THEN
3080: FND_MSG_PUB.initialize;
3081: END IF;
3082:
3083: x_return_status := FND_API.G_RET_STS_SUCCESS;
3084:
3118: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3119: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3120: END IF;
3121:
3122: FND_MSG_PUB.Count_And_Get
3123: (
3124: p_count => x_msg_count,
3125: p_data => x_msg_data,
3126: p_encoded => FND_API.G_FALSE
3129: EXCEPTION
3130: WHEN FND_API.G_EXC_ERROR THEN
3131: x_return_status := FND_API.g_ret_sts_error ;
3132: ROLLBACK TO post_scan_data_offer;
3133: FND_MSG_PUB.Count_AND_Get
3134: ( p_count => l_msg_count,
3135: p_data => l_msg_data,
3136: p_encoded => FND_API.G_FALSE
3137: );
3137: );
3138: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3139: x_return_status := FND_API.g_ret_sts_unexp_error ;
3140: ROLLBACK TO post_scan_data_offer;
3141: FND_MSG_PUB.Count_AND_Get
3142: ( p_count => l_msg_count,
3143: p_data => l_msg_data,
3144: p_encoded => FND_API.G_FALSE
3145: );
3145: );
3146: WHEN OTHERS THEN
3147: x_return_status := FND_API.g_ret_sts_unexp_error ;
3148: ROLLBACK TO post_scan_data_offer;
3149: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3150: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3151: END IF;
3152: FND_MSG_PUB.Count_AND_Get
3153: ( p_count => l_msg_count,
3146: WHEN OTHERS THEN
3147: x_return_status := FND_API.g_ret_sts_unexp_error ;
3148: ROLLBACK TO post_scan_data_offer;
3149: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3150: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3151: END IF;
3152: FND_MSG_PUB.Count_AND_Get
3153: ( p_count => l_msg_count,
3154: p_data => l_msg_data,
3148: ROLLBACK TO post_scan_data_offer;
3149: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3150: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3151: END IF;
3152: FND_MSG_PUB.Count_AND_Get
3153: ( p_count => l_msg_count,
3154: p_data => l_msg_data,
3155: p_encoded => FND_API.G_FALSE
3156: );
3214: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3215: END IF;
3216:
3217: IF FND_API.to_Boolean( p_init_msg_list ) THEN
3218: FND_MSG_PUB.initialize;
3219: END IF;
3220:
3221: x_return_status := FND_API.G_RET_STS_SUCCESS;
3222: /*
3225: IF p_offer_rec.offer_operation = 'CREATE' THEN
3226: IF p_offer_rec.start_date_active < TRUNC(SYSDATE) THEN
3227: IF p_offer_rec.offer_type <> 'NET_ACCRUAL' AND p_offer_rec.custom_setup_id <> 117 THEN
3228: Fnd_Message.SET_NAME('OZF','OZF_OFFR_STARTDATE_LT_SYSDATE');
3229: Fnd_Msg_Pub.ADD;
3230: RAISE FND_API.G_EXC_ERROR;
3231: END IF;
3232: END IF;
3233: ELSIF p_offer_rec.offer_operation = 'UPDATE' THEN
3236: CLOSE c_creation_date;
3237: IF p_offer_rec.start_date_active < l_creation_date THEN
3238: IF p_offer_rec.offer_type <> 'NET_ACCRUAL' AND p_offer_rec.custom_setup_id <> 117 THEN
3239: Fnd_Message.SET_NAME('OZF','OZF_OFFR_STARTDATE_LT_CREDATE');
3240: Fnd_Msg_Pub.ADD;
3241: RAISE FND_API.G_EXC_ERROR;
3242: END IF;
3243: END IF;
3244: END IF;
3249: IF p_offer_rec.offer_operation = 'CREATE' THEN
3250: IF p_offer_rec.end_date_active < TRUNC(SYSDATE) THEN
3251: IF p_offer_rec.offer_type <> 'NET_ACCRUAL' AND p_offer_rec.custom_setup_id <> 117 THEN
3252: Fnd_Message.SET_NAME('OZF','OZF_OFFR_ENDDATE_LT_SYSDATE');
3253: Fnd_Msg_Pub.ADD;
3254: RAISE FND_API.G_EXC_ERROR;
3255: END IF;
3256: END IF;
3257: ELSIF p_offer_rec.offer_operation = 'UPDATE' THEN
3260: CLOSE c_creation_date;
3261: IF p_offer_rec.end_date_active < l_creation_date THEN
3262: IF p_offer_rec.offer_type <> 'NET_ACCRUAL' AND p_offer_rec.custom_setup_id <> 117 THEN
3263: Fnd_Message.SET_NAME('OZF','OZF_OFFR_ENDDATE_LT_CREDATE');
3264: Fnd_Msg_Pub.ADD;
3265: RAISE FND_API.G_EXC_ERROR;
3266: END IF;
3267: END IF;
3268: END IF;
3279:
3280: EXCEPTION
3281: WHEN FND_API.G_EXC_ERROR THEN
3282: x_return_status := FND_API.g_ret_sts_error ;
3283: FND_MSG_PUB.Count_AND_Get
3284: ( p_count => l_msg_count,
3285: p_data => l_msg_data,
3286: p_encoded => FND_API.G_FALSE
3287: );
3286: p_encoded => FND_API.G_FALSE
3287: );
3288: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3289: x_return_status := FND_API.g_ret_sts_unexp_error ;
3290: FND_MSG_PUB.Count_AND_Get
3291: ( p_count => l_msg_count,
3292: p_data => l_msg_data,
3293: p_encoded => FND_API.G_FALSE
3294: );
3293: p_encoded => FND_API.G_FALSE
3294: );
3295: WHEN OTHERS THEN
3296: x_return_status := FND_API.g_ret_sts_unexp_error ;
3297: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3298: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3299: END IF;
3300: FND_MSG_PUB.Count_AND_Get
3301: ( p_count => l_msg_count,
3294: );
3295: WHEN OTHERS THEN
3296: x_return_status := FND_API.g_ret_sts_unexp_error ;
3297: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3298: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3299: END IF;
3300: FND_MSG_PUB.Count_AND_Get
3301: ( p_count => l_msg_count,
3302: p_data => l_msg_data,
3296: x_return_status := FND_API.g_ret_sts_unexp_error ;
3297: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3298: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3299: END IF;
3300: FND_MSG_PUB.Count_AND_Get
3301: ( p_count => l_msg_count,
3302: p_data => l_msg_data,
3303: p_encoded => FND_API.G_FALSE
3304: );
3385: END IF;
3386:
3387: -- Initialize message list if p_init_msg_list is set to TRUE.
3388: IF FND_API.to_Boolean( p_init_msg_list ) THEN
3389: FND_MSG_PUB.initialize;
3390: END IF;
3391:
3392: -- Initialize API return status to SUCCESS
3393: x_return_status := FND_API.G_RET_STS_SUCCESS;
3440: END IF;
3441: END IF;
3442: END IF;
3443:
3444: FND_MSG_PUB.Count_And_Get
3445: (
3446: p_count => x_msg_count,
3447: p_data => x_msg_data,
3448: p_encoded => FND_API.G_FALSE
3450:
3451: EXCEPTION
3452: WHEN FND_API.G_EXC_ERROR THEN
3453: x_return_status := FND_API.g_ret_sts_error ;
3454: FND_MSG_PUB.Count_AND_Get
3455: ( p_count => l_msg_count,
3456: p_data => l_msg_data,
3457: p_encoded => FND_API.G_FALSE
3458: );
3457: p_encoded => FND_API.G_FALSE
3458: );
3459: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3460: x_return_status := FND_API.g_ret_sts_unexp_error ;
3461: FND_MSG_PUB.Count_AND_Get
3462: ( p_count => l_msg_count,
3463: p_data => l_msg_data,
3464: p_encoded => FND_API.G_FALSE
3465: );
3464: p_encoded => FND_API.G_FALSE
3465: );
3466: WHEN OTHERS THEN
3467: x_return_status := FND_API.g_ret_sts_unexp_error ;
3468: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3469: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3470: END IF;
3471: FND_MSG_PUB.Count_AND_Get
3472: ( p_count => l_msg_count,
3465: );
3466: WHEN OTHERS THEN
3467: x_return_status := FND_API.g_ret_sts_unexp_error ;
3468: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3469: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3470: END IF;
3471: FND_MSG_PUB.Count_AND_Get
3472: ( p_count => l_msg_count,
3473: p_data => l_msg_data,
3467: x_return_status := FND_API.g_ret_sts_unexp_error ;
3468: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3469: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3470: END IF;
3471: FND_MSG_PUB.Count_AND_Get
3472: ( p_count => l_msg_count,
3473: p_data => l_msg_data,
3474: p_encoded => FND_API.G_FALSE
3475: );
3515: END IF;
3516:
3517: -- Initialize message list if p_init_msg_list is set to TRUE.
3518: IF FND_API.to_Boolean( p_init_msg_list ) THEN
3519: FND_MSG_PUB.initialize;
3520: END IF;
3521:
3522: -- Initialize API return status to SUCCESS
3523: x_return_status := FND_API.G_RET_STS_SUCCESS;
3539: OZF_Utility_PVT.Error_Message('OZF_OFFR_REQAMT_LT_OFFAMT');
3540: RAISE FND_API.G_EXC_ERROR;
3541: END IF;
3542:
3543: FND_MSG_PUB.Count_And_Get
3544: (p_count => x_msg_count,
3545: p_data => x_msg_data,
3546: p_encoded => FND_API.G_FALSE);
3547:
3547:
3548: EXCEPTION
3549: WHEN FND_API.G_EXC_ERROR THEN
3550: x_return_status := FND_API.g_ret_sts_error ;
3551: FND_MSG_PUB.Count_AND_Get
3552: ( p_count => l_msg_count,
3553: p_data => l_msg_data,
3554: p_encoded => FND_API.G_FALSE
3555: );
3554: p_encoded => FND_API.G_FALSE
3555: );
3556: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3557: x_return_status := FND_API.g_ret_sts_unexp_error ;
3558: FND_MSG_PUB.Count_AND_Get
3559: ( p_count => l_msg_count,
3560: p_data => l_msg_data,
3561: p_encoded => FND_API.G_FALSE
3562: );
3561: p_encoded => FND_API.G_FALSE
3562: );
3563: WHEN OTHERS THEN
3564: x_return_status := FND_API.g_ret_sts_unexp_error ;
3565: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3566: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3567: END IF;
3568: FND_MSG_PUB.Count_AND_Get
3569: ( p_count => l_msg_count,
3562: );
3563: WHEN OTHERS THEN
3564: x_return_status := FND_API.g_ret_sts_unexp_error ;
3565: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3566: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3567: END IF;
3568: FND_MSG_PUB.Count_AND_Get
3569: ( p_count => l_msg_count,
3570: p_data => l_msg_data,
3564: x_return_status := FND_API.g_ret_sts_unexp_error ;
3565: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
3566: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3567: END IF;
3568: FND_MSG_PUB.Count_AND_Get
3569: ( p_count => l_msg_count,
3570: p_data => l_msg_data,
3571: p_encoded => FND_API.G_FALSE
3572: );
3655:
3656: -- Initialize message list if p_init_msg_list is set to TRUE.
3657: IF FND_API.to_Boolean( p_init_msg_list )
3658: THEN
3659: FND_MSG_PUB.initialize;
3660: END IF;
3661:
3662: -- Initialize API return status to SUCCESS
3663: x_return_status := FND_API.G_RET_STS_SUCCESS;
3716: END IF;
3717:
3718: END IF;
3719:
3720: FND_MSG_PUB.Count_And_Get
3721: ( p_count => x_msg_count,
3722: p_data => x_msg_data,
3723: p_encoded => FND_API.G_FALSE
3724: );
3726: EXCEPTION
3727: WHEN FND_API.G_EXC_ERROR THEN
3728: x_return_status := FND_API.g_ret_sts_error ;
3729: ROLLBACK TO Push_Target_group;
3730: FND_MSG_PUB.Count_AND_Get
3731: ( p_count => l_msg_count,
3732: p_data => l_msg_data,
3733: p_encoded => FND_API.G_FALSE
3734: );
3734: );
3735: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3736: x_return_status := FND_API.g_ret_sts_unexp_error ;
3737: ROLLBACK TO Push_Target_group;
3738: FND_MSG_PUB.Count_AND_Get
3739: ( p_count => l_msg_count,
3740: p_data => l_msg_data,
3741: p_encoded => FND_API.G_FALSE
3742: );
3742: );
3743: WHEN OTHERS THEN
3744: x_return_status := FND_API.g_ret_sts_unexp_error ;
3745: ROLLBACK TO Push_Target_group;
3746: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
3747: THEN
3748: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3749: END IF;
3750: FND_MSG_PUB.Count_AND_Get
3744: x_return_status := FND_API.g_ret_sts_unexp_error ;
3745: ROLLBACK TO Push_Target_group;
3746: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
3747: THEN
3748: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3749: END IF;
3750: FND_MSG_PUB.Count_AND_Get
3751: ( p_count => l_msg_count,
3752: p_data => l_msg_data,
3746: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
3747: THEN
3748: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3749: END IF;
3750: FND_MSG_PUB.Count_AND_Get
3751: ( p_count => l_msg_count,
3752: p_data => l_msg_data,
3753: p_encoded => FND_API.G_FALSE
3754: );
3776: l_api_name VARCHAR2 (60) := 'update_request_status';
3777: l_full_name VARCHAR2 (100) := g_pkg_name||'.'||l_api_name;
3778: l_api_version NUMBER := 1;
3779: BEGIN
3780: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_debug_high) THEN
3781: debug_message(l_full_name||' : '||'begin');
3782: END IF;
3783:
3784: OPEN c_req_header_rec(p_qp_list_header_id);
3791: object_version_number = l_obj_ver_num + 1
3792: WHERE request_header_id = l_req_header_id;
3793: END IF;
3794:
3795: fnd_msg_pub.count_and_get (p_count=> x_msg_count,
3796: p_data=> x_msg_data,
3797: p_encoded=> fnd_api.g_false);
3798:
3799: EXCEPTION
3798:
3799: EXCEPTION
3800: WHEN fnd_api.g_exc_error THEN
3801: x_return_status := fnd_api.g_ret_sts_error;
3802: fnd_msg_pub.count_and_get (p_count=> x_msg_count,
3803: p_data=> x_msg_data,
3804: p_encoded=> fnd_api.g_false);
3805: WHEN fnd_api.g_exc_unexpected_error THEN
3806: x_return_status := fnd_api.g_ret_sts_unexp_error;
3803: p_data=> x_msg_data,
3804: p_encoded=> fnd_api.g_false);
3805: WHEN fnd_api.g_exc_unexpected_error THEN
3806: x_return_status := fnd_api.g_ret_sts_unexp_error;
3807: fnd_msg_pub.count_and_get (p_count=> x_msg_count,
3808: p_data=> x_msg_data,
3809: p_encoded=> fnd_api.g_false);
3810: WHEN OTHERS THEN
3811: x_return_status := fnd_api.g_ret_sts_unexp_error;
3809: p_encoded=> fnd_api.g_false);
3810: WHEN OTHERS THEN
3811: x_return_status := fnd_api.g_ret_sts_unexp_error;
3812:
3813: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3814: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3815: END IF;
3816:
3817: fnd_msg_pub.count_and_get (p_count=> x_msg_count,
3810: WHEN OTHERS THEN
3811: x_return_status := fnd_api.g_ret_sts_unexp_error;
3812:
3813: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3814: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3815: END IF;
3816:
3817: fnd_msg_pub.count_and_get (p_count=> x_msg_count,
3818: p_data=> x_msg_data,
3813: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3814: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3815: END IF;
3816:
3817: fnd_msg_pub.count_and_get (p_count=> x_msg_count,
3818: p_data=> x_msg_data,
3819: p_encoded=> fnd_api.g_false);
3820: END update_request_status;
3821:
3922:
3923: -- Initialize message list if p_init_msg_list is set to TRUE.
3924: IF FND_API.to_Boolean( p_init_msg_list )
3925: THEN
3926: FND_MSG_PUB.initialize;
3927: END IF;
3928:
3929: -- Initialize API return status to SUCCESS
3930: x_return_status := FND_API.G_RET_STS_SUCCESS;
4184: IF l_status_code = 'ACTIVE' THEN
4185: raise_offer_event(p_offer_id => p_offer_rec.qp_list_header_id );
4186: END IF;
4187:
4188: FND_MSG_PUB.Count_And_Get
4189: (p_count => x_msg_count,
4190: p_data => x_msg_data,
4191: p_encoded => FND_API.G_FALSE
4192: );
4194: EXCEPTION
4195: WHEN FND_API.G_EXC_ERROR THEN
4196: x_return_status := FND_API.g_ret_sts_error ;
4197: ROLLBACK TO activate_offer_over;
4198: FND_MSG_PUB.Count_AND_Get
4199: ( p_count => l_msg_count,
4200: p_data => l_msg_data,
4201: p_encoded => FND_API.G_FALSE
4202: );
4202: );
4203: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4204: x_return_status := FND_API.g_ret_sts_unexp_error ;
4205: ROLLBACK TO activate_offer_over;
4206: FND_MSG_PUB.Count_AND_Get
4207: ( p_count => l_msg_count,
4208: p_data => l_msg_data,
4209: p_encoded => FND_API.G_FALSE
4210: );
4210: );
4211: WHEN OTHERS THEN
4212: x_return_status := FND_API.g_ret_sts_unexp_error ;
4213: ROLLBACK TO activate_offer_over;
4214: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
4215: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4216: END IF;
4217: FND_MSG_PUB.Count_AND_Get
4218: ( p_count => l_msg_count,
4211: WHEN OTHERS THEN
4212: x_return_status := FND_API.g_ret_sts_unexp_error ;
4213: ROLLBACK TO activate_offer_over;
4214: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
4215: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4216: END IF;
4217: FND_MSG_PUB.Count_AND_Get
4218: ( p_count => l_msg_count,
4219: p_data => l_msg_data,
4213: ROLLBACK TO activate_offer_over;
4214: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR ) THEN
4215: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4216: END IF;
4217: FND_MSG_PUB.Count_AND_Get
4218: ( p_count => l_msg_count,
4219: p_data => l_msg_data,
4220: p_encoded => FND_API.G_FALSE
4221: );
4384: ELSIF x_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
4385: RAISE Fnd_Api.g_exc_unexpected_error;
4386: END IF;
4387:
4388: Fnd_Msg_Pub.Count_AND_Get
4389: ( p_count => x_msg_count,
4390: p_data => x_msg_data,
4391: p_encoded => Fnd_Api.G_FALSE
4392: );
4394: EXCEPTION
4395: WHEN Fnd_Api.G_EXC_ERROR THEN
4396: x_return_status := Fnd_Api.g_ret_sts_error ;
4397: ROLLBACK TO offer_dates;
4398: Fnd_Msg_Pub.Count_AND_Get
4399: ( p_count => x_msg_count,
4400: p_data => x_msg_data,
4401: p_encoded => Fnd_Api.G_FALSE
4402: );
4402: );
4403: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4404: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
4405: ROLLBACK TO offer_dates;
4406: Fnd_Msg_Pub.Count_AND_Get
4407: ( p_count => x_msg_count,
4408: p_data => x_msg_data,
4409: p_encoded => Fnd_Api.G_FALSE
4410: );
4410: );
4411: WHEN OTHERS THEN
4412: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
4413: ROLLBACK TO offer_dates;
4414: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
4415: THEN
4416: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4417: END IF;
4418: Fnd_Msg_Pub.Count_AND_Get
4412: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
4413: ROLLBACK TO offer_dates;
4414: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
4415: THEN
4416: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4417: END IF;
4418: Fnd_Msg_Pub.Count_AND_Get
4419: ( p_count => x_msg_count,
4420: p_data => x_msg_data,
4414: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
4415: THEN
4416: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4417: END IF;
4418: Fnd_Msg_Pub.Count_AND_Get
4419: ( p_count => x_msg_count,
4420: p_data => x_msg_data,
4421: p_encoded => Fnd_Api.G_FALSE
4422: );
4612: CLOSE c_check_uniqeness_create;
4613:
4614:
4615: IF l_uk_flag = 1 THEN --Fnd_Api.g_false THEN
4616: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
4617: Fnd_Message.set_name('OZF', 'OZF_ACT_OFFER_DUP_OFFER_CODE');
4618: Fnd_Msg_Pub.ADD;
4619: END IF;
4620: END IF;
4614:
4615: IF l_uk_flag = 1 THEN --Fnd_Api.g_false THEN
4616: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
4617: Fnd_Message.set_name('OZF', 'OZF_ACT_OFFER_DUP_OFFER_CODE');
4618: Fnd_Msg_Pub.ADD;
4619: END IF;
4620: END IF;
4621: END IF;
4622: END IF;
4947: END IF;
4948:
4949: END IF;
4950:
4951: Fnd_Msg_Pub.Count_AND_Get
4952: ( p_count => x_msg_count,
4953: p_data => x_msg_data,
4954: p_encoded => Fnd_Api.G_FALSE
4955: );
4956: EXCEPTION
4957: WHEN Fnd_Api.G_EXC_ERROR THEN
4958: x_return_status := Fnd_Api.g_ret_sts_error ;
4959: ROLLBACK TO process_qp_list_header;
4960: Fnd_Msg_Pub.Count_AND_Get
4961: ( p_count => x_msg_count,
4962: p_data => x_msg_data,
4963: p_encoded => Fnd_Api.G_FALSE
4964: );
4964: );
4965: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
4966: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
4967: ROLLBACK TO process_qp_list_header;
4968: Fnd_Msg_Pub.Count_AND_Get
4969: ( p_count => x_msg_count,
4970: p_data => x_msg_data,
4971: p_encoded => Fnd_Api.G_FALSE
4972: );
4972: );
4973: WHEN OTHERS THEN
4974: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
4975: ROLLBACK TO process_qp_list_header;
4976: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
4977: THEN
4978: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4979: END IF;
4980: Fnd_Msg_Pub.Count_AND_Get
4974: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
4975: ROLLBACK TO process_qp_list_header;
4976: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
4977: THEN
4978: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4979: END IF;
4980: Fnd_Msg_Pub.Count_AND_Get
4981: ( p_count => x_msg_count,
4982: p_data => x_msg_data,
4976: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
4977: THEN
4978: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
4979: END IF;
4980: Fnd_Msg_Pub.Count_AND_Get
4981: ( p_count => x_msg_count,
4982: p_data => x_msg_data,
4983: p_encoded => Fnd_Api.G_FALSE
4984: );
5076: IF p_modifier_list_rec.budget_amount_tc >= l_scan_value THEN
5077: l_promotional_offers_rec.budget_amount_tc := p_modifier_list_rec.budget_amount_tc;
5078: ELSE
5079: FND_MESSAGE.SET_NAME('OZF','OZF_OFFR_IEB_LT_SCANVALUE');
5080: Fnd_Msg_Pub.ADD;
5081: RAISE FND_API.G_EXC_ERROR;
5082: END IF;
5083: END IF;
5084: ELSE -- called by offer detail
5109: END IF;
5110:
5111: IF l_promotional_offers_rec.budget_amount_tc < 0 THEN
5112: FND_MESSAGE.SET_NAME('OZF','OZF_OFFR_IEB_NEG');
5113: Fnd_Msg_Pub.ADD;
5114: RAISE FND_API.G_EXC_ERROR;
5115: END IF;
5116:
5117: l_promotional_offers_rec.qp_list_header_id := p_modifier_list_rec.qp_list_header_id;
5232: ELSIF x_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
5233: RAISE Fnd_Api.g_exc_unexpected_error;
5234: END IF;
5235:
5236: Fnd_Msg_Pub.Count_AND_Get
5237: ( p_count => x_msg_count,
5238: p_data => x_msg_data,
5239: p_encoded => Fnd_Api.G_FALSE
5240: );
5241: EXCEPTION
5242: WHEN Fnd_Api.G_EXC_ERROR THEN
5243: x_return_status := Fnd_Api.g_ret_sts_error ;
5244: ROLLBACK TO process_ozf_offer;
5245: Fnd_Msg_Pub.Count_AND_Get
5246: ( p_count => x_msg_count,
5247: p_data => x_msg_data,
5248: p_encoded => Fnd_Api.G_FALSE
5249: );
5249: );
5250: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5251: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
5252: ROLLBACK TO process_ozf_offer;
5253: Fnd_Msg_Pub.Count_AND_Get
5254: ( p_count => x_msg_count,
5255: p_data => x_msg_data,
5256: p_encoded => Fnd_Api.G_FALSE
5257: );
5257: );
5258: WHEN OTHERS THEN
5259: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
5260: ROLLBACK TO process_ozf_offer;
5261: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
5262: THEN
5263: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
5264: END IF;
5265: Fnd_Msg_Pub.Count_AND_Get
5259: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
5260: ROLLBACK TO process_ozf_offer;
5261: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
5262: THEN
5263: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
5264: END IF;
5265: Fnd_Msg_Pub.Count_AND_Get
5266: ( p_count => x_msg_count,
5267: p_data => x_msg_data,
5261: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
5262: THEN
5263: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
5264: END IF;
5265: Fnd_Msg_Pub.Count_AND_Get
5266: ( p_count => x_msg_count,
5267: p_data => x_msg_data,
5268: p_encoded => Fnd_Api.G_FALSE
5269: );
5902:
5903: EXCEPTION
5904: WHEN Fnd_Api.G_EXC_ERROR THEN
5905: x_return_status := Fnd_Api.g_ret_sts_error ;
5906: Fnd_Msg_Pub.Count_AND_Get
5907: ( p_count => x_msg_count,
5908: p_data => x_msg_data,
5909: p_encoded => Fnd_Api.G_FALSE
5910: );
5909: p_encoded => Fnd_Api.G_FALSE
5910: );
5911: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
5912: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
5913: Fnd_Msg_Pub.Count_AND_Get
5914: ( p_count => x_msg_count,
5915: p_data => x_msg_data,
5916: p_encoded => Fnd_Api.G_FALSE
5917: );
5916: p_encoded => Fnd_Api.G_FALSE
5917: );
5918: WHEN OTHERS THEN
5919: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
5920: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
5921: THEN
5922: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
5923: END IF;
5924: Fnd_Msg_Pub.Count_AND_Get
5918: WHEN OTHERS THEN
5919: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
5920: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
5921: THEN
5922: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
5923: END IF;
5924: Fnd_Msg_Pub.Count_AND_Get
5925: ( p_count => x_msg_count,
5926: p_data => x_msg_data,
5920: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
5921: THEN
5922: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
5923: END IF;
5924: Fnd_Msg_Pub.Count_AND_Get
5925: ( p_count => x_msg_count,
5926: p_data => x_msg_data,
5927: p_encoded => Fnd_Api.G_FALSE
5928: );
5976: /*IF (p_modifier_line_rec.product_attr_val IS NULL OR p_modifier_line_rec.product_attr_val = FND_API.G_MISS_CHAR)
5977: THEN
5978: FND_MESSAGE.SET_NAME('QP','QP_ATTRIBUTE_REQUIRED');
5979: FND_MESSAGE.SET_TOKEN('ATTRIBUTE',OZF_UTILITY_PVT.getAttributeName(p_attributeCode => 'OZF_NAME'));
5980: FND_MSG_PUB.Add;
5981: x_return_status := FND_API.g_ret_sts_error;
5982: END IF;
5983: IF (p_modifier_line_rec.product_attr IS NULL OR p_modifier_line_rec.product_attr = FND_API.G_MISS_CHAR)
5984: THEN
5983: IF (p_modifier_line_rec.product_attr IS NULL OR p_modifier_line_rec.product_attr = FND_API.G_MISS_CHAR)
5984: THEN
5985: FND_MESSAGE.SET_NAME('QP','QP_ATTRIBUTE_REQUIRED');
5986: FND_MESSAGE.SET_TOKEN('ATTRIBUTE',OZF_UTILITY_PVT.getAttributeName(p_attributeCode => 'OZF_LEVEL'));
5987: FND_MSG_PUB.Add;
5988: x_return_status := FND_API.g_ret_sts_error;
5989: END IF;*/
5990: --end of fix for bug 11694790
5991: IF (p_modifier_line_rec.list_line_type_code IS NULL OR p_modifier_line_rec.list_line_type_code = FND_API.G_MISS_CHAR)
5991: IF (p_modifier_line_rec.list_line_type_code IS NULL OR p_modifier_line_rec.list_line_type_code = FND_API.G_MISS_CHAR)
5992: THEN
5993: FND_MESSAGE.SET_NAME('QP','QP_ATTRIBUTE_REQUIRED');
5994: FND_MESSAGE.SET_TOKEN('ATTRIBUTE',OZF_UTILITY_PVT.getAttributeName(p_attributeCode => 'OZF_TIER_TYPE'));
5995: FND_MSG_PUB.Add;
5996: x_return_status := FND_API.g_ret_sts_error;
5997: END IF;
5998: ELSIF p_modifier_line_rec.operation = 'UPDATE' THEN
5999: IF (p_modifier_line_rec.product_attr IS NULL )
5999: IF (p_modifier_line_rec.product_attr IS NULL )
6000: THEN
6001: FND_MESSAGE.SET_NAME('QP','QP_ATTRIBUTE_REQUIRED');
6002: FND_MESSAGE.SET_TOKEN('ATTRIBUTE',OZF_UTILITY_PVT.getAttributeName(p_attributeCode => 'OZF_LEVEL'));
6003: FND_MSG_PUB.Add;
6004: x_return_status := FND_API.g_ret_sts_error;
6005: END IF;
6006: IF (p_modifier_line_rec.product_attr_val IS NULL )
6007: THEN
6006: IF (p_modifier_line_rec.product_attr_val IS NULL )
6007: THEN
6008: FND_MESSAGE.SET_NAME('QP','QP_ATTRIBUTE_REQUIRED');
6009: FND_MESSAGE.SET_TOKEN('ATTRIBUTE',OZF_UTILITY_PVT.getAttributeName(p_attributeCode => 'OZF_NAME'));
6010: FND_MSG_PUB.Add;
6011: x_return_status := FND_API.g_ret_sts_error;
6012: END IF;
6013: END IF;
6014: IF (p_modifier_line_rec.list_line_type_code IS NULL )
6014: IF (p_modifier_line_rec.list_line_type_code IS NULL )
6015: THEN
6016: FND_MESSAGE.SET_NAME('QP','QP_ATTRIBUTE_REQUIRED');
6017: FND_MESSAGE.SET_TOKEN('ATTRIBUTE',OZF_UTILITY_PVT.getAttributeName(p_attributeCode => 'OZF_TIER_TYPE'));
6018: FND_MSG_PUB.Add;
6019: x_return_status := FND_API.g_ret_sts_error;
6020: END IF;
6021: END checkRequiredItems;
6022:
6349: AND p_modifier_line_tbl(j).pricing_attr <> FND_API.g_miss_char))
6350: THEN
6351: FND_MESSAGE.SET_NAME('OZF','OZF_UOM_QTY_REQD');
6352:
6353: Fnd_Msg_Pub.ADD;
6354: RAISE FND_API.G_EXC_ERROR;
6355: END IF;
6356: ELSE -- volume type is amount
6357: l_pricing_attr_tbl(i).product_uom_code := p_modifier_line_tbl(j).product_uom_code;
6702: END IF;
6703:
6704: END IF;
6705:
6706: Fnd_Msg_Pub.Count_AND_Get
6707: ( p_count => x_msg_count,
6708: p_data => x_msg_data,
6709: p_encoded => Fnd_Api.G_FALSE
6710: );
6711:
6712: EXCEPTION
6713: WHEN Fnd_Api.G_EXC_ERROR THEN
6714: x_return_status := Fnd_Api.g_ret_sts_error ;
6715: Fnd_Msg_Pub.Count_AND_Get
6716: ( p_count => x_msg_count,
6717: p_data => x_msg_data,
6718: p_encoded => Fnd_Api.G_FALSE
6719: );
6718: p_encoded => Fnd_Api.G_FALSE
6719: );
6720: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6721: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
6722: Fnd_Msg_Pub.Count_AND_Get
6723: ( p_count => x_msg_count,
6724: p_data => x_msg_data,
6725: p_encoded => Fnd_Api.G_FALSE
6726: );
6725: p_encoded => Fnd_Api.G_FALSE
6726: );
6727: WHEN OTHERS THEN
6728: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
6729: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
6730: THEN
6731: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
6732: END IF;
6733: Fnd_Msg_Pub.Count_AND_Get
6727: WHEN OTHERS THEN
6728: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
6729: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
6730: THEN
6731: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
6732: END IF;
6733: Fnd_Msg_Pub.Count_AND_Get
6734: ( p_count => x_msg_count,
6735: p_data => x_msg_data,
6729: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
6730: THEN
6731: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
6732: END IF;
6733: Fnd_Msg_Pub.Count_AND_Get
6734: ( p_count => x_msg_count,
6735: p_data => x_msg_data,
6736: p_encoded => Fnd_Api.G_FALSE
6737: );
6937: EXCEPTION
6938: WHEN Fnd_Api.G_EXC_ERROR THEN
6939: x_return_status := Fnd_Api.g_ret_sts_error ;
6940: ROLLBACK TO activate_offer_api;
6941: Fnd_Msg_Pub.Count_AND_Get
6942: ( p_count => x_msg_count,
6943: p_data => x_msg_data,
6944: p_encoded => Fnd_Api.G_FALSE
6945: );
6945: );
6946: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
6947: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
6948: ROLLBACK TO activate_offer_api;
6949: Fnd_Msg_Pub.Count_AND_Get
6950: ( p_count => x_msg_count,
6951: p_data => x_msg_data,
6952: p_encoded => Fnd_Api.G_FALSE
6953: );
6953: );
6954: WHEN OTHERS THEN
6955: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
6956: ROLLBACK TO activate_offer_api;
6957: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
6958: THEN
6959: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
6960: END IF;
6961: Fnd_Msg_Pub.Count_AND_Get
6955: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
6956: ROLLBACK TO activate_offer_api;
6957: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
6958: THEN
6959: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
6960: END IF;
6961: Fnd_Msg_Pub.Count_AND_Get
6962: ( p_count => x_msg_count,
6963: p_data => x_msg_data,
6957: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
6958: THEN
6959: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
6960: END IF;
6961: Fnd_Msg_Pub.Count_AND_Get
6962: ( p_count => x_msg_count,
6963: p_data => x_msg_data,
6964: p_encoded => Fnd_Api.G_FALSE
6965: );
7341:
7342: END IF;
7343: END LOOP; */
7344:
7345: Fnd_Msg_Pub.Count_AND_Get
7346: ( p_count => x_msg_count,
7347: p_data => x_msg_data,
7348: p_encoded => Fnd_Api.G_FALSE
7349: );
7350:
7351: EXCEPTION
7352: WHEN Fnd_Api.G_EXC_ERROR THEN
7353: x_return_status := Fnd_Api.g_ret_sts_error ;
7354: Fnd_Msg_Pub.Count_AND_Get
7355: ( p_count => x_msg_count,
7356: p_data => x_msg_data,
7357: p_encoded => Fnd_Api.G_FALSE
7358: );
7357: p_encoded => Fnd_Api.G_FALSE
7358: );
7359: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7360: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
7361: Fnd_Msg_Pub.Count_AND_Get
7362: ( p_count => x_msg_count,
7363: p_data => x_msg_data,
7364: p_encoded => Fnd_Api.G_FALSE
7365: );
7364: p_encoded => Fnd_Api.G_FALSE
7365: );
7366: WHEN OTHERS THEN
7367: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
7368: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
7369: THEN
7370: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
7371: END IF;
7372: Fnd_Msg_Pub.Count_AND_Get
7366: WHEN OTHERS THEN
7367: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
7368: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
7369: THEN
7370: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
7371: END IF;
7372: Fnd_Msg_Pub.Count_AND_Get
7373: ( p_count => x_msg_count,
7374: p_data => x_msg_data,
7368: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
7369: THEN
7370: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
7371: END IF;
7372: Fnd_Msg_Pub.Count_AND_Get
7373: ( p_count => x_msg_count,
7374: p_data => x_msg_data,
7375: p_encoded => Fnd_Api.G_FALSE
7376: );
7420: IF l_lumpsum_offer.STATUS_CODE = 'PENDING' OR l_lumpsum_offer.STATUS_CODE = 'ACTIVE' THEN
7421:
7422: IF l_total_distribution <> l_lumpsum_offer.lumpsum_amount THEN
7423: FND_MESSAGE.SET_NAME('OZF','OZF_INVALID_DISTR_ACTIVE');
7424: Fnd_Msg_Pub.ADD;
7425: RAISE FND_API.G_EXC_ERROR;
7426: END IF;
7427:
7428: ELSE
7428: ELSE
7429:
7430: IF l_total_distribution > l_lumpsum_offer.lumpsum_amount THEN
7431: FND_MESSAGE.SET_NAME('OZF','OZF_INVALID_DISTRIBUTION');
7432: Fnd_Msg_Pub.ADD;
7433: RAISE FND_API.G_EXC_ERROR;
7434: END IF;
7435:
7436: END IF;
7440: IF l_lumpsum_offer.STATUS_CODE = 'PENDING' OR l_lumpsum_offer.STATUS_CODE = 'ACTIVE' THEN
7441:
7442: IF l_total_distribution <> 100 THEN
7443: FND_MESSAGE.SET_NAME('OZF','OZF_INVALID_DISTR_ACTIVE');
7444: Fnd_Msg_Pub.ADD;
7445: RAISE FND_API.G_EXC_ERROR;
7446: END IF;
7447:
7448:
7449: ELSE
7450:
7451: IF l_total_distribution > 100 THEN
7452: FND_MESSAGE.SET_NAME('OZF','OZF_INVALID_DISTRIBUTION');
7453: Fnd_Msg_Pub.ADD;
7454: RAISE FND_API.G_EXC_ERROR;
7455: END IF;
7456:
7457: END IF;
7457: END IF;
7458:
7459: END IF;
7460:
7461: Fnd_Msg_Pub.Count_AND_Get
7462: ( p_count => x_msg_count,
7463: p_data => x_msg_data,
7464: p_encoded => Fnd_Api.G_FALSE
7465: );
7466:
7467: EXCEPTION
7468: WHEN Fnd_Api.G_EXC_ERROR THEN
7469: x_return_status := Fnd_Api.g_ret_sts_error ;
7470: Fnd_Msg_Pub.Count_AND_Get
7471: ( p_count => x_msg_count,
7472: p_data => x_msg_data,
7473: p_encoded => Fnd_Api.G_FALSE
7474: );
7473: p_encoded => Fnd_Api.G_FALSE
7474: );
7475: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7476: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
7477: Fnd_Msg_Pub.Count_AND_Get
7478: ( p_count => x_msg_count,
7479: p_data => x_msg_data,
7480: p_encoded => Fnd_Api.G_FALSE
7481: );
7480: p_encoded => Fnd_Api.G_FALSE
7481: );
7482: WHEN OTHERS THEN
7483: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
7484: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
7485: THEN
7486: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
7487: END IF;
7488: Fnd_Msg_Pub.Count_AND_Get
7482: WHEN OTHERS THEN
7483: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
7484: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
7485: THEN
7486: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
7487: END IF;
7488: Fnd_Msg_Pub.Count_AND_Get
7489: ( p_count => x_msg_count,
7490: p_data => x_msg_data,
7484: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
7485: THEN
7486: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
7487: END IF;
7488: Fnd_Msg_Pub.Count_AND_Get
7489: ( p_count => x_msg_count,
7490: p_data => x_msg_data,
7491: p_encoded => Fnd_Api.G_FALSE
7492: );
7803: AND p_modifier_line_tbl(i).pricing_attr <> FND_API.g_miss_char))
7804: THEN
7805: FND_MESSAGE.SET_NAME('OZF','OZF_UOM_QTY_REQD');
7806:
7807: Fnd_Msg_Pub.ADD;
7808: RAISE FND_API.G_EXC_ERROR;
7809: END IF;
7810: ELSE -- volume type is amount
7811: l_pricing_attr_tbl(i).product_uom_code := p_modifier_line_tbl(i).product_uom_code;
7979:
7980: END IF;
7981: END LOOP;
7982:
7983: Fnd_Msg_Pub.Count_AND_Get
7984: ( p_count => x_msg_count,
7985: p_data => x_msg_data,
7986: p_encoded => Fnd_Api.G_FALSE
7987: );
7988:
7989: EXCEPTION
7990: WHEN Fnd_Api.G_EXC_ERROR THEN
7991: x_return_status := Fnd_Api.g_ret_sts_error ;
7992: Fnd_Msg_Pub.Count_AND_Get
7993: ( p_count => x_msg_count,
7994: p_data => x_msg_data,
7995: p_encoded => Fnd_Api.G_FALSE
7996: );
7995: p_encoded => Fnd_Api.G_FALSE
7996: );
7997: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7998: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
7999: Fnd_Msg_Pub.Count_AND_Get
8000: ( p_count => x_msg_count,
8001: p_data => x_msg_data,
8002: p_encoded => Fnd_Api.G_FALSE
8003: );
8002: p_encoded => Fnd_Api.G_FALSE
8003: );
8004: WHEN OTHERS THEN
8005: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8006: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8007: THEN
8008: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8009: END IF;
8010: Fnd_Msg_Pub.Count_AND_Get
8004: WHEN OTHERS THEN
8005: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8006: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8007: THEN
8008: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8009: END IF;
8010: Fnd_Msg_Pub.Count_AND_Get
8011: ( p_count => x_msg_count,
8012: p_data => x_msg_data,
8006: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8007: THEN
8008: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8009: END IF;
8010: Fnd_Msg_Pub.Count_AND_Get
8011: ( p_count => x_msg_count,
8012: p_data => x_msg_data,
8013: p_encoded => Fnd_Api.G_FALSE
8014: );
8087: IF p_modifier_line_tbl.exists(i) THEN
8088: IF p_modifier_line_tbl(i).max_amount_per_rule IS NOT NULL
8089: AND p_modifier_line_tbl(i).max_amount_per_rule <> FND_API.G_MISS_NUM
8090: AND p_modifier_line_tbl(i).max_amount_per_rule <= 0 THEN
8091: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8092: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NEG_AMT');
8093: Fnd_Msg_Pub.ADD;
8094: END IF;
8095: RAISE Fnd_Api.g_exc_error;
8089: AND p_modifier_line_tbl(i).max_amount_per_rule <> FND_API.G_MISS_NUM
8090: AND p_modifier_line_tbl(i).max_amount_per_rule <= 0 THEN
8091: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8092: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NEG_AMT');
8093: Fnd_Msg_Pub.ADD;
8094: END IF;
8095: RAISE Fnd_Api.g_exc_error;
8096: END IF;
8097:
8097:
8098: IF p_modifier_line_tbl(i).max_qty_per_rule IS NOT NULL
8099: AND p_modifier_line_tbl(i).max_qty_per_rule <> FND_API.G_MISS_NUM
8100: AND p_modifier_line_tbl(i).max_qty_per_rule <= 0 THEN
8101: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8102: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NEG_QTY');
8103: Fnd_Msg_Pub.ADD;
8104: END IF;
8105: RAISE Fnd_Api.g_exc_error;
8099: AND p_modifier_line_tbl(i).max_qty_per_rule <> FND_API.G_MISS_NUM
8100: AND p_modifier_line_tbl(i).max_qty_per_rule <= 0 THEN
8101: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8102: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NEG_QTY');
8103: Fnd_Msg_Pub.ADD;
8104: END IF;
8105: RAISE Fnd_Api.g_exc_error;
8106: END IF;
8107: END IF;
8115: IF ((p_modifier_line_tbl(i).operand IS NULL OR p_modifier_line_tbl(i).operand = FND_API.g_miss_num)
8116: OR (p_modifier_line_tbl(i).arithmetic_operator IS NULL OR p_modifier_line_tbl(i).arithmetic_operator = FND_API.g_miss_char))
8117: AND ((p_modifier_line_tbl(i).qd_operand IS NULL OR p_modifier_line_tbl(i).qd_operand = FND_API.g_miss_num)
8118: OR (p_modifier_line_tbl(i).qd_arithmetic_operator IS NULL OR p_modifier_line_tbl(i).qd_arithmetic_operator = FND_API.g_miss_char)) THEN
8119: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8120: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NO_OPERAND');
8121: Fnd_Msg_Pub.ADD;
8122: END IF;
8123: RAISE Fnd_Api.g_exc_error;
8117: AND ((p_modifier_line_tbl(i).qd_operand IS NULL OR p_modifier_line_tbl(i).qd_operand = FND_API.g_miss_num)
8118: OR (p_modifier_line_tbl(i).qd_arithmetic_operator IS NULL OR p_modifier_line_tbl(i).qd_arithmetic_operator = FND_API.g_miss_char)) THEN
8119: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8120: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NO_OPERAND');
8121: Fnd_Msg_Pub.ADD;
8122: END IF;
8123: RAISE Fnd_Api.g_exc_error;
8124:
8125: ELSIF ((p_modifier_line_tbl(i).operand IS NOT NULL AND p_modifier_line_tbl(i).operand <> FND_API.g_miss_num)
8164: FETCH c_modifier_id INTO l_modifier_id,l_related_modifier_id;
8165: CLOSE c_modifier_id;
8166:
8167: IF l_related_modifier_id IS NOT NULL THEN
8168: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8169: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NO_ACC_OPERAND');
8170: Fnd_Msg_Pub.ADD;
8171: x_error_location := i;
8172: END IF;
8166:
8167: IF l_related_modifier_id IS NOT NULL THEN
8168: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8169: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NO_ACC_OPERAND');
8170: Fnd_Msg_Pub.ADD;
8171: x_error_location := i;
8172: END IF;
8173: RAISE Fnd_Api.g_exc_error;
8174: END IF;
8195: FETCH c_modifier_id INTO l_modifier_id,l_related_modifier_id;
8196: CLOSE c_modifier_id;
8197:
8198: IF l_modifier_id IS NOT NULL AND l_related_modifier_id IS NOT NULL THEN
8199: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8200: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NO_OFF_OPERAND');
8201: Fnd_Msg_Pub.ADD;
8202: x_error_location := i;
8203: END IF;
8197:
8198: IF l_modifier_id IS NOT NULL AND l_related_modifier_id IS NOT NULL THEN
8199: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8200: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NO_OFF_OPERAND');
8201: Fnd_Msg_Pub.ADD;
8202: x_error_location := i;
8203: END IF;
8204: RAISE Fnd_Api.g_exc_error;
8205: END IF;
8421: IF l_modifier_line_tbl(i).operation <> FND_API.g_miss_char THEN
8422:
8423: IF (l_modifier_line_tbl(i).max_qty_per_rule IS NULL OR l_modifier_line_tbl(i).max_qty_per_rule = FND_API.G_MISS_NUM)
8424: AND l_modifier_line_tbl(i).qd_estimated_qty_is_max = 'Y' THEN
8425: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8426: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NO_QTY');
8427: Fnd_Msg_Pub.ADD;
8428: END IF;
8429: RAISE Fnd_Api.g_exc_error;
8423: IF (l_modifier_line_tbl(i).max_qty_per_rule IS NULL OR l_modifier_line_tbl(i).max_qty_per_rule = FND_API.G_MISS_NUM)
8424: AND l_modifier_line_tbl(i).qd_estimated_qty_is_max = 'Y' THEN
8425: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8426: Fnd_Message.SET_NAME('OZF','OZF_TRD_DEAL_NO_QTY');
8427: Fnd_Msg_Pub.ADD;
8428: END IF;
8429: RAISE Fnd_Api.g_exc_error;
8430: END IF;
8431:
8430: END IF;
8431:
8432: IF (l_modifier_line_tbl(i).max_amount_per_rule IS NULL OR l_modifier_line_tbl(i).max_amount_per_rule = FND_API.G_MISS_NUM)
8433: AND l_modifier_line_tbl(i).qd_estimated_amount_is_max = 'Y' THEN
8434: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8435: Fnd_Message.SET_NAME('OZF', 'OZF_TRD_DEAL_NO_AMT');
8436: Fnd_Msg_Pub.ADD;
8437: END IF;
8438: RAISE Fnd_Api.g_exc_error;
8432: IF (l_modifier_line_tbl(i).max_amount_per_rule IS NULL OR l_modifier_line_tbl(i).max_amount_per_rule = FND_API.G_MISS_NUM)
8433: AND l_modifier_line_tbl(i).qd_estimated_amount_is_max = 'Y' THEN
8434: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
8435: Fnd_Message.SET_NAME('OZF', 'OZF_TRD_DEAL_NO_AMT');
8436: Fnd_Msg_Pub.ADD;
8437: END IF;
8438: RAISE Fnd_Api.g_exc_error;
8439: END IF;
8440:
8628:
8629: EXCEPTION
8630: WHEN Fnd_Api.G_EXC_ERROR THEN
8631: x_return_status := Fnd_Api.g_ret_sts_error ;
8632: Fnd_Msg_Pub.Count_AND_Get
8633: ( p_count => x_msg_count,
8634: p_data => x_msg_data,
8635: p_encoded => Fnd_Api.G_FALSE
8636: );
8635: p_encoded => Fnd_Api.G_FALSE
8636: );
8637: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
8638: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
8639: Fnd_Msg_Pub.Count_AND_Get
8640: ( p_count => x_msg_count,
8641: p_data => x_msg_data,
8642: p_encoded => Fnd_Api.G_FALSE
8643: );
8642: p_encoded => Fnd_Api.G_FALSE
8643: );
8644: WHEN OTHERS THEN
8645: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8646: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8647: THEN
8648: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8649: END IF;
8650: Fnd_Msg_Pub.Count_AND_Get
8644: WHEN OTHERS THEN
8645: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8646: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8647: THEN
8648: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8649: END IF;
8650: Fnd_Msg_Pub.Count_AND_Get
8651: ( p_count => x_msg_count,
8652: p_data => x_msg_data,
8646: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8647: THEN
8648: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8649: END IF;
8650: Fnd_Msg_Pub.Count_AND_Get
8651: ( p_count => x_msg_count,
8652: p_data => x_msg_data,
8653: p_encoded => Fnd_Api.G_FALSE
8654: );
8832: EXCEPTION
8833: WHEN Fnd_Api.G_EXC_ERROR THEN
8834: x_return_status := Fnd_Api.g_ret_sts_error ;
8835: ROLLBACK TO process_qp_list_lines;
8836: Fnd_Msg_Pub.Count_AND_Get
8837: ( p_count => x_msg_count,
8838: p_data => x_msg_data,
8839: p_encoded => Fnd_Api.G_FALSE
8840: );
8840: );
8841: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
8842: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
8843: ROLLBACK TO process_qp_list_lines;
8844: Fnd_Msg_Pub.Count_AND_Get
8845: ( p_count => x_msg_count,
8846: p_data => x_msg_data,
8847: p_encoded => Fnd_Api.G_FALSE
8848: );
8848: );
8849: WHEN OTHERS THEN
8850: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8851: ROLLBACK TO process_qp_list_lines;
8852: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8853: THEN
8854: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8855: END IF;
8856: Fnd_Msg_Pub.Count_AND_Get
8850: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8851: ROLLBACK TO process_qp_list_lines;
8852: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8853: THEN
8854: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8855: END IF;
8856: Fnd_Msg_Pub.Count_AND_Get
8857: ( p_count => x_msg_count,
8858: p_data => x_msg_data,
8852: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8853: THEN
8854: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8855: END IF;
8856: Fnd_Msg_Pub.Count_AND_Get
8857: ( p_count => x_msg_count,
8858: p_data => x_msg_data,
8859: p_encoded => Fnd_Api.G_FALSE
8860: );
8917: END IF;
8918:
8919: END IF;
8920:
8921: Fnd_Msg_Pub.Count_AND_Get
8922: ( p_count => x_msg_count,
8923: p_data => x_msg_data,
8924: p_encoded => Fnd_Api.G_FALSE
8925: );
8926:
8927: EXCEPTION
8928: WHEN Fnd_Api.G_EXC_ERROR THEN
8929: x_return_status := Fnd_Api.g_ret_sts_error ;
8930: Fnd_Msg_Pub.Count_AND_Get
8931: ( p_count => x_msg_count,
8932: p_data => x_msg_data,
8933: p_encoded => Fnd_Api.G_FALSE
8934: );
8933: p_encoded => Fnd_Api.G_FALSE
8934: );
8935: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
8936: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
8937: Fnd_Msg_Pub.Count_AND_Get
8938: ( p_count => x_msg_count,
8939: p_data => x_msg_data,
8940: p_encoded => Fnd_Api.G_FALSE
8941: );
8940: p_encoded => Fnd_Api.G_FALSE
8941: );
8942: WHEN OTHERS THEN
8943: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8944: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8945: THEN
8946: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8947: END IF;
8948: Fnd_Msg_Pub.Count_AND_Get
8942: WHEN OTHERS THEN
8943: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
8944: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8945: THEN
8946: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8947: END IF;
8948: Fnd_Msg_Pub.Count_AND_Get
8949: ( p_count => x_msg_count,
8950: p_data => x_msg_data,
8944: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
8945: THEN
8946: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
8947: END IF;
8948: Fnd_Msg_Pub.Count_AND_Get
8949: ( p_count => x_msg_count,
8950: p_data => x_msg_data,
8951: p_encoded => Fnd_Api.G_FALSE
8952: );
9135: EXCEPTION
9136: WHEN OTHERS THEN
9137: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
9138: ROLLBACK TO update_offer_status;
9139: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
9140: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
9141: END IF;
9142: Fnd_Msg_Pub.Count_AND_Get(p_count => x_msg_count,
9143: p_data => x_msg_data,
9136: WHEN OTHERS THEN
9137: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
9138: ROLLBACK TO update_offer_status;
9139: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
9140: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
9141: END IF;
9142: Fnd_Msg_Pub.Count_AND_Get(p_count => x_msg_count,
9143: p_data => x_msg_data,
9144: p_encoded => Fnd_Api.G_FALSE);
9138: ROLLBACK TO update_offer_status;
9139: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR ) THEN
9140: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
9141: END IF;
9142: Fnd_Msg_Pub.Count_AND_Get(p_count => x_msg_count,
9143: p_data => x_msg_data,
9144: p_encoded => Fnd_Api.G_FALSE);
9145: END update_offer_status;
9146:
9344: BEGIN
9345: SAVEPOINT process_modifiers;
9346: --dbms_output.put_line('calling qp procedure');
9347: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
9348: Fnd_Msg_Pub.initialize;
9349: END IF;
9350:
9351: IF NOT Fnd_Api.compatible_api_call
9352: (
9363:
9364: -- added by julou 14-DEC-2001 check default profile values before going any further
9365: IF FND_PROFILE.value('OZF_PRICING_PHASE_LINEGROUP') IS NULL THEN
9366: FND_MESSAGE.set_name('OZF','OZF_NO_PRICING_PHASE_LINEGROUP');
9367: FND_MSG_PUB.add;
9368: RAISE FND_API.g_exc_unexpected_error;
9369: END IF;
9370:
9371: IF FND_PROFILE.value('OZF_PRICING_PHASE_LINE') IS NULL THEN
9369: END IF;
9370:
9371: IF FND_PROFILE.value('OZF_PRICING_PHASE_LINE') IS NULL THEN
9372: FND_MESSAGE.set_name('OZF','OZF_NO_PRICING_PHASE_LINE');
9373: FND_MSG_PUB.add;
9374: RAISE FND_API.g_exc_unexpected_error;
9375: END IF;
9376:
9377: IF FND_PROFILE.value('OZF_PRICING_PHASE_ORDER') IS NULL THEN
9375: END IF;
9376:
9377: IF FND_PROFILE.value('OZF_PRICING_PHASE_ORDER') IS NULL THEN
9378: FND_MESSAGE.set_name('OZF','OZF_NO_PRICING_PHASE_ORDER');
9379: FND_MSG_PUB.add;
9380: RAISE FND_API.g_exc_unexpected_error;
9381: END IF;
9382:
9383: IF FND_PROFILE.value('OZF_PRICING_GROUP_SEQUENCE') IS NULL THEN
9381: END IF;
9382:
9383: IF FND_PROFILE.value('OZF_PRICING_GROUP_SEQUENCE') IS NULL THEN
9384: FND_MESSAGE.set_name('OZF','OZF_NO_PRICING_GROUP_SEQUENCE');
9385: FND_MSG_PUB.add;
9386: RAISE FND_API.g_exc_unexpected_error;
9387: END IF;
9388:
9389: IF FND_PROFILE.value('OZF_PRINT_ON_INVOICE') IS NULL THEN
9387: END IF;
9388:
9389: IF FND_PROFILE.value('OZF_PRINT_ON_INVOICE') IS NULL THEN
9390: FND_MESSAGE.set_name('OZF','OZF_NO_PRINT_ON_INVOICE');
9391: FND_MSG_PUB.add;
9392: RAISE FND_API.g_exc_unexpected_error;
9393: END IF;
9394: /* julou bug 3498759 - comment OUT NOCOPY as these profiles are not mandatory
9395: IF FND_PROFILE.value('OZF_INCOMPATIBILITY_GROUP') IS NULL THEN
9393: END IF;
9394: /* julou bug 3498759 - comment OUT NOCOPY as these profiles are not mandatory
9395: IF FND_PROFILE.value('OZF_INCOMPATIBILITY_GROUP') IS NULL THEN
9396: FND_MESSAGE.set_name('OZF','OZF_NO_INCOMPATIBILITY_GROUP');
9397: FND_MSG_PUB.add;
9398: RAISE FND_API.g_exc_unexpected_error;
9399: END IF;
9400: */
9401: IF FND_PROFILE.value('OZF_PRODUCT_PRECEDENCE') IS NULL THEN
9399: END IF;
9400: */
9401: IF FND_PROFILE.value('OZF_PRODUCT_PRECEDENCE') IS NULL THEN
9402: FND_MESSAGE.set_name('OZF','OZF_NO_PRODUCT_PRECEDENCE');
9403: FND_MSG_PUB.add;
9404: RAISE FND_API.g_exc_unexpected_error;
9405: END IF;
9406:
9407: --//Fix for bug 14158729
9436: IF get_budget_source_count(p_modifier_list_rec.qp_list_header_id) > 0 THEN
9437: --if currency is changed
9438: IF p_modifier_list_rec.transaction_currency_code <> FND_API.g_miss_char AND p_modifier_list_rec.transaction_currency_code IS NOT NULL AND l_old_fund_req_curr_code <> p_modifier_list_rec.transaction_currency_code THEN
9439: FND_MESSAGE.set_name('OZF','OZF_REM_ASSO_BUDGET');
9440: FND_MSG_PUB.add;
9441: RAISE FND_API.g_exc_unexpected_error;
9442: END IF;
9443: --if currency is changed to no currency
9444: IF l_old_transaction_curr_code IS NOT NULL AND p_modifier_list_rec.transaction_currency_code IS NULL AND l_old_transaction_curr_code <> FND_PROFILE.VALUE('JTF_PROFILE_DEFAULT_CURRENCY') THEN
9442: END IF;
9443: --if currency is changed to no currency
9444: IF l_old_transaction_curr_code IS NOT NULL AND p_modifier_list_rec.transaction_currency_code IS NULL AND l_old_transaction_curr_code <> FND_PROFILE.VALUE('JTF_PROFILE_DEFAULT_CURRENCY') THEN
9445: FND_MESSAGE.set_name('OZF','OZF_REM_ASSO_BUDGET');
9446: FND_MSG_PUB.add;
9447: RAISE FND_API.g_exc_unexpected_error;
9448: END IF;
9449: END IF;
9450: --end Bug 14138664
9552:
9553: IF p_modifier_list_rec.global_flag = 'Y' THEN
9554: IF p_modifier_list_rec.orig_org_id IS NOT NULL AND p_modifier_list_rec.orig_org_id <> fnd_api.g_miss_num THEN
9555: FND_MESSAGE.set_name('OZF', 'OZF_CLEAR_OU');
9556: FND_MSG_PUB.add;
9557: RAISE FND_API.g_exc_error;
9558: END IF;
9559: END IF;
9560:
9588: )
9589: THEN
9590: FND_MESSAGE.SET_NAME('QP','QP_ATTRIBUTE_REQUIRED');
9591: FND_MESSAGE.SET_TOKEN('ATTRIBUTE','ORG_ID');
9592: FND_MSG_PUB.add;
9593: RAISE FND_API.g_exc_error;
9594: END IF;
9595: END IF;
9596:
9835: debug_message('l_lines_count :'||l_lines_count);
9836:
9837: IF l_lines_count = 0 THEN
9838: IF p_modifier_list_rec.custom_setup_id <> 110 THEN
9839: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
9840: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_NO_DISC_LINES');
9841: FND_MSG_PUB.add;
9842: END IF;
9843: RAISE FND_API.g_exc_error;
9837: IF l_lines_count = 0 THEN
9838: IF p_modifier_list_rec.custom_setup_id <> 110 THEN
9839: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
9840: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_NO_DISC_LINES');
9841: FND_MSG_PUB.add;
9842: END IF;
9843: RAISE FND_API.g_exc_error;
9844: END IF;
9845: END IF;
9846: -- julou end bug 2122722
9847: -- julou BREQ
9848: IF l_emptyDiscStruct = '1' THEN
9849: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_EMPTY_DISC_STRUCT');
9850: FND_MSG_PUB.add;
9851: RAISE FND_API.g_exc_error;
9852: END IF;
9853:
9854:
9853:
9854:
9855: IF l_budget_required = 'Y' THEN
9856: IF get_budget_source_count(p_modifier_list_rec.qp_list_header_id) = 0 THEN
9857: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
9858: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_NO_BUDGET_REQUEST');
9859: FND_MSG_PUB.add;
9860: END IF;
9861: RAISE FND_API.g_exc_error;
9855: IF l_budget_required = 'Y' THEN
9856: IF get_budget_source_count(p_modifier_list_rec.qp_list_header_id) = 0 THEN
9857: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
9858: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_NO_BUDGET_REQUEST');
9859: FND_MSG_PUB.add;
9860: END IF;
9861: RAISE FND_API.g_exc_error;
9862: END IF;
9863: END IF;
10221:
10222: END IF;
10223: END IF;
10224:
10225: Fnd_Msg_Pub.Count_AND_Get
10226: ( p_count => x_msg_count,
10227: p_data => x_msg_data,
10228: p_encoded => Fnd_Api.G_FALSE
10229: );
10233: EXCEPTION
10234: WHEN Fnd_Api.G_EXC_ERROR THEN
10235: x_return_status := Fnd_Api.g_ret_sts_error ;
10236: ROLLBACK TO process_modifiers;
10237: Fnd_Msg_Pub.Count_AND_Get
10238: ( p_count => x_msg_count,
10239: p_data => x_msg_data,
10240: p_encoded => Fnd_Api.G_FALSE
10241: );
10241: );
10242: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
10243: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
10244: ROLLBACK TO process_modifiers;
10245: Fnd_Msg_Pub.Count_AND_Get
10246: ( p_count => x_msg_count,
10247: p_data => x_msg_data,
10248: p_encoded => Fnd_Api.G_FALSE
10249: );
10249: );
10250: WHEN OTHERS THEN
10251: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
10252: ROLLBACK TO process_modifiers;
10253: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
10254: THEN
10255: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
10256: END IF;
10257: Fnd_Msg_Pub.Count_AND_Get
10251: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
10252: ROLLBACK TO process_modifiers;
10253: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
10254: THEN
10255: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
10256: END IF;
10257: Fnd_Msg_Pub.Count_AND_Get
10258: ( p_count => x_msg_count,
10259: p_data => x_msg_data,
10253: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
10254: THEN
10255: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
10256: END IF;
10257: Fnd_Msg_Pub.Count_AND_Get
10258: ( p_count => x_msg_count,
10259: p_data => x_msg_data,
10260: p_encoded => Fnd_Api.G_FALSE
10261: );
11074: EXCEPTION
11075: WHEN Fnd_Api.G_EXC_ERROR THEN
11076: x_return_status := Fnd_Api.g_ret_sts_error ;
11077: ROLLBACK TO push_disc_rules;
11078: Fnd_Msg_Pub.Count_AND_Get
11079: ( p_count => x_msg_count,
11080: p_data => x_msg_data,
11081: p_encoded => Fnd_Api.G_FALSE
11082: );
11082: );
11083: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
11084: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
11085: ROLLBACK TO push_disc_rules;
11086: Fnd_Msg_Pub.Count_AND_Get
11087: ( p_count => x_msg_count,
11088: p_data => x_msg_data,
11089: p_encoded => Fnd_Api.G_FALSE
11090: );
11090: );
11091: WHEN OTHERS THEN
11092: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
11093: ROLLBACK TO push_disc_rules;
11094: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11095: THEN
11096: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
11097: END IF;
11098: Fnd_Msg_Pub.Count_AND_Get
11092: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
11093: ROLLBACK TO push_disc_rules;
11094: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11095: THEN
11096: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
11097: END IF;
11098: Fnd_Msg_Pub.Count_AND_Get
11099: ( p_count => x_msg_count,
11100: p_data => x_msg_data,
11094: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11095: THEN
11096: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
11097: END IF;
11098: Fnd_Msg_Pub.Count_AND_Get
11099: ( p_count => x_msg_count,
11100: p_data => x_msg_data,
11101: p_encoded => Fnd_Api.G_FALSE
11102: );
11306: EXCEPTION
11307: WHEN Fnd_Api.G_EXC_ERROR THEN
11308: x_return_status := Fnd_Api.g_ret_sts_error ;
11309: ROLLBACK TO populateSDHeaderRec;
11310: Fnd_Msg_Pub.Count_AND_Get
11311: ( p_count => x_msg_count,
11312: p_data => x_msg_data,
11313: p_encoded => Fnd_Api.G_FALSE
11314: );
11314: );
11315: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
11316: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
11317: ROLLBACK TO populateSDHeaderRec;
11318: Fnd_Msg_Pub.Count_AND_Get
11319: ( p_count => x_msg_count,
11320: p_data => x_msg_data,
11321: p_encoded => Fnd_Api.G_FALSE
11322: );
11322: );
11323: WHEN OTHERS THEN
11324: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
11325: ROLLBACK TO populateSDHeaderRec;
11326: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11327: THEN
11328: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDHeaderRec');
11329: END IF;
11330: Fnd_Msg_Pub.Count_AND_Get
11324: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
11325: ROLLBACK TO populateSDHeaderRec;
11326: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11327: THEN
11328: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDHeaderRec');
11329: END IF;
11330: Fnd_Msg_Pub.Count_AND_Get
11331: ( p_count => x_msg_count,
11332: p_data => x_msg_data,
11326: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11327: THEN
11328: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDHeaderRec');
11329: END IF;
11330: Fnd_Msg_Pub.Count_AND_Get
11331: ( p_count => x_msg_count,
11332: p_data => x_msg_data,
11333: p_encoded => Fnd_Api.G_FALSE
11334: );
11576: EXCEPTION
11577: WHEN Fnd_Api.G_EXC_ERROR THEN
11578: x_return_status := Fnd_Api.g_ret_sts_error ;
11579: ROLLBACK TO populateSDDiscountRulesRec;
11580: Fnd_Msg_Pub.Count_AND_Get
11581: ( p_count => x_msg_count,
11582: p_data => x_msg_data,
11583: p_encoded => Fnd_Api.G_FALSE
11584: );
11584: );
11585: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
11586: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
11587: ROLLBACK TO populateSDDiscountRulesRec;
11588: Fnd_Msg_Pub.Count_AND_Get
11589: ( p_count => x_msg_count,
11590: p_data => x_msg_data,
11591: p_encoded => Fnd_Api.G_FALSE
11592: );
11592: );
11593: WHEN OTHERS THEN
11594: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
11595: ROLLBACK TO populateSDDiscountRulesRec;
11596: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11597: THEN
11598: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDDiscountRulesRec');
11599: END IF;
11600: Fnd_Msg_Pub.Count_AND_Get
11594: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
11595: ROLLBACK TO populateSDDiscountRulesRec;
11596: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11597: THEN
11598: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDDiscountRulesRec');
11599: END IF;
11600: Fnd_Msg_Pub.Count_AND_Get
11601: ( p_count => x_msg_count,
11602: p_data => x_msg_data,
11596: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
11597: THEN
11598: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDDiscountRulesRec');
11599: END IF;
11600: Fnd_Msg_Pub.Count_AND_Get
11601: ( p_count => x_msg_count,
11602: p_data => x_msg_data,
11603: p_encoded => Fnd_Api.G_FALSE
11604: );
12079: EXCEPTION
12080: WHEN Fnd_Api.G_EXC_ERROR THEN
12081: x_return_status := Fnd_Api.g_ret_sts_error ;
12082: ROLLBACK TO populateSDQualifiers;
12083: Fnd_Msg_Pub.Count_AND_Get
12084: ( p_count => x_msg_count,
12085: p_data => x_msg_data,
12086: p_encoded => Fnd_Api.G_FALSE
12087: );
12087: );
12088: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
12089: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
12090: ROLLBACK TO populateSDQualifiers;
12091: Fnd_Msg_Pub.Count_AND_Get
12092: ( p_count => x_msg_count,
12093: p_data => x_msg_data,
12094: p_encoded => Fnd_Api.G_FALSE
12095: );
12095: );
12096: WHEN OTHERS THEN
12097: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
12098: ROLLBACK TO populateSDQualifiers;
12099: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
12100: THEN
12101: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDQualifiers');
12102: END IF;
12103: Fnd_Msg_Pub.Count_AND_Get
12097: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
12098: ROLLBACK TO populateSDQualifiers;
12099: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
12100: THEN
12101: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDQualifiers');
12102: END IF;
12103: Fnd_Msg_Pub.Count_AND_Get
12104: ( p_count => x_msg_count,
12105: p_data => x_msg_data,
12099: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
12100: THEN
12101: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,'populateSDQualifiers');
12102: END IF;
12103: Fnd_Msg_Pub.Count_AND_Get
12104: ( p_count => x_msg_count,
12105: p_data => x_msg_data,
12106: p_encoded => Fnd_Api.G_FALSE
12107: );
12244: BEGIN
12245:
12246: SAVEPOINT process_sd_modifiers;
12247: IF Fnd_Api.to_boolean(p_init_msg_list) THEN
12248: Fnd_Msg_Pub.initialize;
12249: END IF;
12250:
12251: IF NOT Fnd_Api.compatible_api_call(l_api_version,
12252: p_api_version,
12262:
12263: debug_message('N: qp_list_header_id' || x_qp_list_header_id);
12264:
12265: IF FND_PROFILE.VALUE('OZF_SD_DEFAULT_BUDGET') IS NULL THEN
12266: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
12267: FND_MESSAGE.set_name('OZF', 'OZF_SD_OFFR_NO_BUDGET_REQUEST');
12268: FND_MSG_PUB.add;
12269: END IF;
12270: RAISE Fnd_Api.g_exc_unexpected_error;
12264:
12265: IF FND_PROFILE.VALUE('OZF_SD_DEFAULT_BUDGET') IS NULL THEN
12266: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
12267: FND_MESSAGE.set_name('OZF', 'OZF_SD_OFFR_NO_BUDGET_REQUEST');
12268: FND_MSG_PUB.add;
12269: END IF;
12270: RAISE Fnd_Api.g_exc_unexpected_error;
12271: END IF;
12272:
12429: ,x_error_location => x_error_location);
12430:
12431: ELSE
12432:
12433: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
12434: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_NO_DISC_LINES');
12435: FND_MSG_PUB.add;
12436: END IF;
12437: RAISE FND_API.g_exc_error;
12431: ELSE
12432:
12433: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
12434: FND_MESSAGE.set_name('OZF', 'OZF_OFFR_NO_DISC_LINES');
12435: FND_MSG_PUB.add;
12436: END IF;
12437: RAISE FND_API.g_exc_error;
12438: END IF;
12439:
12720: EXCEPTION
12721: WHEN Fnd_Api.G_EXC_ERROR THEN
12722: x_return_status := Fnd_Api.g_ret_sts_error ;
12723: ROLLBACK TO process_sd_modifiers;
12724: Fnd_Msg_Pub.Count_AND_Get
12725: ( p_count => x_msg_count,
12726: p_data => x_msg_data,
12727: p_encoded => Fnd_Api.G_FALSE
12728: );
12728: );
12729: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
12730: x_return_status := Fnd_Api.g_ret_sts_unexp_error ;
12731: ROLLBACK TO process_sd_modifiers;
12732: Fnd_Msg_Pub.Count_AND_Get
12733: ( p_count => x_msg_count,
12734: p_data => x_msg_data,
12735: p_encoded => Fnd_Api.G_FALSE
12736: );
12736: );
12737: WHEN OTHERS THEN
12738: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
12739: ROLLBACK TO process_sd_modifiers;
12740: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
12741: THEN
12742: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
12743: END IF;
12744: Fnd_Msg_Pub.Count_AND_Get
12738: x_return_status := Fnd_Api.g_ret_sts_unexp_erroR ;
12739: ROLLBACK TO process_sd_modifiers;
12740: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
12741: THEN
12742: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
12743: END IF;
12744: Fnd_Msg_Pub.Count_AND_Get
12745: ( p_count => x_msg_count,
12746: p_data => x_msg_data,
12740: IF Fnd_Msg_Pub.Check_Msg_Level ( Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR )
12741: THEN
12742: Fnd_Msg_Pub.Add_Exc_Msg( G_PKG_NAME,l_api_name);
12743: END IF;
12744: Fnd_Msg_Pub.Count_AND_Get
12745: ( p_count => x_msg_count,
12746: p_data => x_msg_data,
12747: p_encoded => Fnd_Api.G_FALSE
12748: );