66: --
67: -- End of Comments
68: -- ==============================================================================
69:
70: PV_DEBUG_HIGH_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
71: PV_DEBUG_LOW_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
72: PV_DEBUG_MEDIUM_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
73:
74: PROCEDURE Create_Pec_Rules(
67: -- End of Comments
68: -- ==============================================================================
69:
70: PV_DEBUG_HIGH_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
71: PV_DEBUG_LOW_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
72: PV_DEBUG_MEDIUM_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
73:
74: PROCEDURE Create_Pec_Rules(
75: p_api_version_number IN NUMBER,
68: -- ==============================================================================
69:
70: PV_DEBUG_HIGH_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
71: PV_DEBUG_LOW_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
72: PV_DEBUG_MEDIUM_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
73:
74: PROCEDURE Create_Pec_Rules(
75: p_api_version_number IN NUMBER,
76: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
167:
168: -- Initialize message list if p_init_msg_list is set to TRUE.
169: IF FND_API.to_Boolean( p_init_msg_list )
170: THEN
171: FND_MSG_PUB.initialize;
172: END IF;
173:
174:
175: -- Debug Message
190: IF c_program_id_exists%FOUND THEN
191: CLOSE c_program_id_exists;
192: IF l_pec_rules_rec.change_direction_code='UPGRADE' THEN
193: FND_MESSAGE.set_name('PV', 'PV_DENY_CREATE_UPGRADE_RULE');
194: FND_MSG_PUB.add;
195: --x_return_status := FND_API.G_RET_STS_ERROR;
196: ELSIF l_pec_rules_rec.change_direction_code='PREREQUISITE' THEN
197: FND_MESSAGE.set_name('PV', 'PV_DENY_CREATE_PREREQ_RULE');
198: FND_MSG_PUB.add;
194: FND_MSG_PUB.add;
195: --x_return_status := FND_API.G_RET_STS_ERROR;
196: ELSIF l_pec_rules_rec.change_direction_code='PREREQUISITE' THEN
197: FND_MESSAGE.set_name('PV', 'PV_DENY_CREATE_PREREQ_RULE');
198: FND_MSG_PUB.add;
199: END IF;
200: RAISE FND_API.G_EXC_ERROR;
201: ELSE
202: CLOSE c_program_id_exists;
208: IF c_program_id_exists%FOUND THEN
209: CLOSE c_program_id_exists;
210: IF l_pec_rules_rec.change_direction_code='UPGRADE' THEN
211: FND_MESSAGE.set_name('PV', 'PV_DENY_CREATE_UPGRADE_RULE');
212: FND_MSG_PUB.add;
213: ELSIF l_pec_rules_rec.change_direction_code='PREREQUISITE' THEN
214: FND_MESSAGE.set_name('PV', 'PV_UPGRADE_EXISTS');
215: FND_MSG_PUB.add;
216: END IF;
211: FND_MESSAGE.set_name('PV', 'PV_DENY_CREATE_UPGRADE_RULE');
212: FND_MSG_PUB.add;
213: ELSIF l_pec_rules_rec.change_direction_code='PREREQUISITE' THEN
214: FND_MESSAGE.set_name('PV', 'PV_UPGRADE_EXISTS');
215: FND_MSG_PUB.add;
216: END IF;
217: RAISE FND_API.G_EXC_ERROR;
218: ELSE
219: CLOSE c_program_id_exists;
224: IF c_program_id_exists%FOUND THEN
225: CLOSE c_program_id_exists;
226: IF l_pec_rules_rec.change_direction_code='UPGRADE' THEN
227: FND_MESSAGE.set_name('PV', 'PV_PREREQ_EXISTS');
228: FND_MSG_PUB.add;
229: ELSIF l_pec_rules_rec.change_direction_code='PREREQUISITE' THEN
230: FND_MESSAGE.set_name('PV', 'PV_DENY_CREATE_PREREQ_RULE');
231: FND_MSG_PUB.add;
232: END IF;
227: FND_MESSAGE.set_name('PV', 'PV_PREREQ_EXISTS');
228: FND_MSG_PUB.add;
229: ELSIF l_pec_rules_rec.change_direction_code='PREREQUISITE' THEN
230: FND_MESSAGE.set_name('PV', 'PV_DENY_CREATE_PREREQ_RULE');
231: FND_MSG_PUB.add;
232: END IF;
233: RAISE FND_API.G_EXC_ERROR;
234: ELSE
235: CLOSE c_program_id_exists;
396: END IF;
397:
398:
399: -- Standard call to get message count and if count is 1, get message info.
400: FND_MSG_PUB.Count_And_Get
401: (p_count => x_msg_count,
402: p_data => x_msg_data
403: );
404:
412: WHEN FND_API.G_EXC_ERROR THEN
413: ROLLBACK TO CREATE_Pec_Rules_PVT;
414: x_return_status := FND_API.G_RET_STS_ERROR;
415: -- Standard call to get message count and if count=1, get the message
416: FND_MSG_PUB.Count_And_Get (
417: p_encoded => FND_API.G_FALSE,
418: p_count => x_msg_count,
419: p_data => x_msg_data
420: );
422: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
423: ROLLBACK TO CREATE_Pec_Rules_PVT;
424: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
425: -- Standard call to get message count and if count=1, get the message
426: FND_MSG_PUB.Count_And_Get (
427: p_encoded => FND_API.G_FALSE,
428: p_count => x_msg_count,
429: p_data => x_msg_data
430: );
431:
432: WHEN OTHERS THEN
433: ROLLBACK TO CREATE_Pec_Rules_PVT;
434: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
435: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
436: THEN
437: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
438: END IF;
439: -- Standard call to get message count and if count=1, get the message
433: ROLLBACK TO CREATE_Pec_Rules_PVT;
434: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
435: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
436: THEN
437: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
438: END IF;
439: -- Standard call to get message count and if count=1, get the message
440: FND_MSG_PUB.Count_And_Get (
441: p_encoded => FND_API.G_FALSE,
436: THEN
437: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
438: END IF;
439: -- Standard call to get message count and if count=1, get the message
440: FND_MSG_PUB.Count_And_Get (
441: p_encoded => FND_API.G_FALSE,
442: p_count => x_msg_count,
443: p_data => x_msg_data
444: );
540:
541: -- Initialize message list if p_init_msg_list is set to TRUE.
542: IF FND_API.to_Boolean( p_init_msg_list )
543: THEN
544: FND_MSG_PUB.initialize;
545: END IF;
546:
547:
548:
624: END IF;
625:
626:
627: -- Debug Message
628: --IF (PV_DEBUG_HIGH_ON) THENPVX_UTILITY_PVT.debug_message(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW, 'Private API: Calling update table handler');END IF;
629:
630: l_object_version_number := p_pec_rules_rec.object_version_number;
631:
632: -- Invoke table handler(Pv_Pec_Rules_Pkg.Update_Row)
684: END IF;
685:
686:
687: -- Standard call to get message count and if count is 1, get message info.
688: FND_MSG_PUB.Count_And_Get
689: (p_count => x_msg_count,
690: p_data => x_msg_data
691: );
692: EXCEPTION
698: WHEN FND_API.G_EXC_ERROR THEN
699: ROLLBACK TO UPDATE_Pec_Rules_PVT;
700: x_return_status := FND_API.G_RET_STS_ERROR;
701: -- Standard call to get message count and if count=1, get the message
702: FND_MSG_PUB.Count_And_Get (
703: p_encoded => FND_API.G_FALSE,
704: p_count => x_msg_count,
705: p_data => x_msg_data
706: );
708: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
709: ROLLBACK TO UPDATE_Pec_Rules_PVT;
710: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
711: -- Standard call to get message count and if count=1, get the message
712: FND_MSG_PUB.Count_And_Get (
713: p_encoded => FND_API.G_FALSE,
714: p_count => x_msg_count,
715: p_data => x_msg_data
716: );
717:
718: WHEN OTHERS THEN
719: ROLLBACK TO UPDATE_Pec_Rules_PVT;
720: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
721: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
722: THEN
723: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
724: END IF;
725: -- Standard call to get message count and if count=1, get the message
719: ROLLBACK TO UPDATE_Pec_Rules_PVT;
720: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
721: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
722: THEN
723: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
724: END IF;
725: -- Standard call to get message count and if count=1, get the message
726: FND_MSG_PUB.Count_And_Get (
727: p_encoded => FND_API.G_FALSE,
722: THEN
723: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
724: END IF;
725: -- Standard call to get message count and if count=1, get the message
726: FND_MSG_PUB.Count_And_Get (
727: p_encoded => FND_API.G_FALSE,
728: p_count => x_msg_count,
729: p_data => x_msg_data
730: );
817:
818: -- Initialize message list if p_init_msg_list is set to TRUE.
819: IF FND_API.to_Boolean( p_init_msg_list )
820: THEN
821: FND_MSG_PUB.initialize;
822: END IF;
823:
824:
825:
920: --p_token_value => 'Pec_Rules') ;
921: FND_MESSAGE.set_name('PV', 'PV_MISC_ERROR_GROUP_CREATE');
922: FND_MESSAGE.set_token('ID',to_char(from_id_rev));
923: FND_MESSAGE.set_token('ID',to_char(to_id_rev));
924: FND_MSG_PUB.add;
925: RAISE FND_API.G_EXC_ERROR;
926: END IF;
927: -- Debug Message
928: IF (PV_DEBUG_HIGH_ON) THEN
962: END IF;
963:
964:
965: -- Standard call to get message count and if count is 1, get message info.
966: FND_MSG_PUB.Count_And_Get
967: (p_count => x_msg_count,
968: p_data => x_msg_data
969: );
970: EXCEPTION
976: WHEN FND_API.G_EXC_ERROR THEN
977: ROLLBACK TO DELETE_Pec_Rules_PVT;
978: x_return_status := FND_API.G_RET_STS_ERROR;
979: -- Standard call to get message count and if count=1, get the message
980: FND_MSG_PUB.Count_And_Get (
981: p_encoded => FND_API.G_FALSE,
982: p_count => x_msg_count,
983: p_data => x_msg_data
984: );
986: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
987: ROLLBACK TO DELETE_Pec_Rules_PVT;
988: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
989: -- Standard call to get message count and if count=1, get the message
990: FND_MSG_PUB.Count_And_Get (
991: p_encoded => FND_API.G_FALSE,
992: p_count => x_msg_count,
993: p_data => x_msg_data
994: );
995:
996: WHEN OTHERS THEN
997: ROLLBACK TO DELETE_Pec_Rules_PVT;
998: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
999: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1000: THEN
1001: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1002: END IF;
1003: -- Standard call to get message count and if count=1, get the message
997: ROLLBACK TO DELETE_Pec_Rules_PVT;
998: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
999: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1000: THEN
1001: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1002: END IF;
1003: -- Standard call to get message count and if count=1, get the message
1004: FND_MSG_PUB.Count_And_Get (
1005: p_encoded => FND_API.G_FALSE,
1000: THEN
1001: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1002: END IF;
1003: -- Standard call to get message count and if count=1, get the message
1004: FND_MSG_PUB.Count_And_Get (
1005: p_encoded => FND_API.G_FALSE,
1006: p_count => x_msg_count,
1007: p_data => x_msg_data
1008: );
1073:
1074: -- Initialize message list if p_init_msg_list is set to TRUE.
1075: IF FND_API.to_Boolean( p_init_msg_list )
1076: THEN
1077: FND_MSG_PUB.initialize;
1078: END IF;
1079:
1080:
1081:
1098: Pv_Pec_Rules_Pkg.Lock_Row(l_enrl_change_rule_id,p_object_version);
1099:
1100:
1101: -------------------- finish --------------------------
1102: FND_MSG_PUB.count_and_get(
1103: p_encoded => FND_API.g_false,
1104: p_count => x_msg_count,
1105: p_data => x_msg_data);
1106: IF (PV_DEBUG_HIGH_ON) THEN
1116: WHEN FND_API.G_EXC_ERROR THEN
1117: ROLLBACK TO LOCK_Pec_Rules_PVT;
1118: x_return_status := FND_API.G_RET_STS_ERROR;
1119: -- Standard call to get message count and if count=1, get the message
1120: FND_MSG_PUB.Count_And_Get (
1121: p_encoded => FND_API.G_FALSE,
1122: p_count => x_msg_count,
1123: p_data => x_msg_data
1124: );
1126: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1127: ROLLBACK TO LOCK_Pec_Rules_PVT;
1128: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1129: -- Standard call to get message count and if count=1, get the message
1130: FND_MSG_PUB.Count_And_Get (
1131: p_encoded => FND_API.G_FALSE,
1132: p_count => x_msg_count,
1133: p_data => x_msg_data
1134: );
1135:
1136: WHEN OTHERS THEN
1137: ROLLBACK TO LOCK_Pec_Rules_PVT;
1138: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1139: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1140: THEN
1141: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1142: END IF;
1143: -- Standard call to get message count and if count=1, get the message
1137: ROLLBACK TO LOCK_Pec_Rules_PVT;
1138: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1139: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1140: THEN
1141: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1142: END IF;
1143: -- Standard call to get message count and if count=1, get the message
1144: FND_MSG_PUB.Count_And_Get (
1145: p_encoded => FND_API.G_FALSE,
1140: THEN
1141: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1142: END IF;
1143: -- Standard call to get message count and if count=1, get the message
1144: FND_MSG_PUB.Count_And_Get (
1145: p_encoded => FND_API.G_FALSE,
1146: p_count => x_msg_count,
1147: p_data => x_msg_data
1148: );
1574:
1575: -- Initialize message list if p_init_msg_list is set to TRUE.
1576: IF FND_API.to_Boolean( p_init_msg_list )
1577: THEN
1578: FND_MSG_PUB.initialize;
1579: END IF;
1580:
1581: IF (PV_DEBUG_HIGH_ON) THEN
1582:
1688: END IF;
1689:
1690:
1691: -- Standard call to get message count and if count is 1, get message info.
1692: FND_MSG_PUB.Count_And_Get
1693: (p_count => x_msg_count,
1694: p_data => x_msg_data
1695: );
1696: EXCEPTION
1702: WHEN FND_API.G_EXC_ERROR THEN
1703: ROLLBACK TO VALIDATE_Pec_Rules_;
1704: x_return_status := FND_API.G_RET_STS_ERROR;
1705: -- Standard call to get message count and if count=1, get the message
1706: FND_MSG_PUB.Count_And_Get (
1707: p_encoded => FND_API.G_FALSE,
1708: p_count => x_msg_count,
1709: p_data => x_msg_data
1710: );
1712: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1713: ROLLBACK TO VALIDATE_Pec_Rules_;
1714: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1715: -- Standard call to get message count and if count=1, get the message
1716: FND_MSG_PUB.Count_And_Get (
1717: p_encoded => FND_API.G_FALSE,
1718: p_count => x_msg_count,
1719: p_data => x_msg_data
1720: );
1721:
1722: WHEN OTHERS THEN
1723: ROLLBACK TO VALIDATE_Pec_Rules_;
1724: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1725: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1726: THEN
1727: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1728: END IF;
1729: -- Standard call to get message count and if count=1, get the message
1723: ROLLBACK TO VALIDATE_Pec_Rules_;
1724: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1725: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1726: THEN
1727: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1728: END IF;
1729: -- Standard call to get message count and if count=1, get the message
1730: FND_MSG_PUB.Count_And_Get (
1731: p_encoded => FND_API.G_FALSE,
1726: THEN
1727: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1728: END IF;
1729: -- Standard call to get message count and if count=1, get the message
1730: FND_MSG_PUB.Count_And_Get (
1731: p_encoded => FND_API.G_FALSE,
1732: p_count => x_msg_count,
1733: p_data => x_msg_data
1734: );
1747: BEGIN
1748: -- Initialize message list if p_init_msg_list is set to TRUE.
1749: IF FND_API.to_Boolean( p_init_msg_list )
1750: THEN
1751: FND_MSG_PUB.initialize;
1752: END IF;
1753:
1754:
1755:
1766:
1767: PVX_UTILITY_PVT.debug_message('Private API: Validate_dm_model_rec');
1768: END IF;
1769: -- Standard call to get message count and if count is 1, get message info.
1770: FND_MSG_PUB.Count_And_Get
1771: (p_count => x_msg_count,
1772: p_data => x_msg_data
1773: );
1774: END Validate_pec_rules_Rec;