15:
16: G_PKG_NAME CONSTANT VARCHAR2(30):= 'AMS_Ps_Cndclses_PVT';
17: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvcclb.pls';
18:
19: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
20: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
21: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
22:
23: -- Hint: Primary key needs to be returned.
16: G_PKG_NAME CONSTANT VARCHAR2(30):= 'AMS_Ps_Cndclses_PVT';
17: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvcclb.pls';
18:
19: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
20: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
21: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
22:
23: -- Hint: Primary key needs to be returned.
24: PROCEDURE Create_Ps_Cndclses(
17: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvcclb.pls';
18:
19: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
20: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
21: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
22:
23: -- Hint: Primary key needs to be returned.
24: PROCEDURE Create_Ps_Cndclses(
25: p_api_version_number IN NUMBER,
74:
75: -- Initialize message list if p_init_msg_list is set to TRUE.
76: IF FND_API.to_Boolean( p_init_msg_list )
77: THEN
78: FND_MSG_PUB.initialize;
79: END IF;
80:
81: -- Debug Message
82: IF (AMS_DEBUG_HIGH_ON) THEN
203: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
204: END IF;
205:
206: -- Standard call to get message count and if count is 1, get message info.
207: FND_MSG_PUB.Count_And_Get
208: (p_count => x_msg_count,
209: p_data => x_msg_data
210: );
211: EXCEPTION
217: WHEN FND_API.G_EXC_ERROR THEN
218: ROLLBACK TO CREATE_Ps_Cndclses_PVT;
219: x_return_status := FND_API.G_RET_STS_ERROR;
220: -- Standard call to get message count and if count=1, get the message
221: FND_MSG_PUB.Count_And_Get (
222: p_encoded => FND_API.G_FALSE,
223: p_count => x_msg_count,
224: p_data => x_msg_data
225: );
227: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
228: ROLLBACK TO CREATE_Ps_Cndclses_PVT;
229: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
230: -- Standard call to get message count and if count=1, get the message
231: FND_MSG_PUB.Count_And_Get (
232: p_encoded => FND_API.G_FALSE,
233: p_count => x_msg_count,
234: p_data => x_msg_data
235: );
236:
237: WHEN OTHERS THEN
238: ROLLBACK TO CREATE_Ps_Cndclses_PVT;
239: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
240: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
241: THEN
242: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
243: END IF;
244: -- Standard call to get message count and if count=1, get the message
238: ROLLBACK TO CREATE_Ps_Cndclses_PVT;
239: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
240: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
241: THEN
242: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
243: END IF;
244: -- Standard call to get message count and if count=1, get the message
245: FND_MSG_PUB.Count_And_Get (
246: p_encoded => FND_API.G_FALSE,
241: THEN
242: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
243: END IF;
244: -- Standard call to get message count and if count=1, get the message
245: FND_MSG_PUB.Count_And_Get (
246: p_encoded => FND_API.G_FALSE,
247: p_count => x_msg_count,
248: p_data => x_msg_data
249: );
296:
297: -- Initialize message list if p_init_msg_list is set to TRUE.
298: IF FND_API.to_Boolean( p_init_msg_list )
299: THEN
300: FND_MSG_PUB.initialize;
301: END IF;
302:
303: -- Debug Message
304: IF (AMS_DEBUG_HIGH_ON) THEN
373: END IF;
374:
375:
376: -- Debug Message
377: -- IF (AMS_DEBUG_HIGH_ON) THEN AMS_UTILITY_PVT.debug_message(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW, 'Private API: Calling update table handler'); END IF;
378:
379: -- Invoke table handler(AMS_IBA_PS_CNDCLSES_B_PKG.Update_Row)
380: AMS_IBA_PS_CNDCLSES_B_PKG.Update_Row(
381: p_created_by => FND_GLOBAL.USER_ID,
409: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
410: END IF;
411:
412: -- Standard call to get message count and if count is 1, get message info.
413: FND_MSG_PUB.Count_And_Get
414: (p_count => x_msg_count,
415: p_data => x_msg_data
416: );
417: EXCEPTION
423: WHEN FND_API.G_EXC_ERROR THEN
424: ROLLBACK TO UPDATE_Ps_Cndclses_PVT;
425: x_return_status := FND_API.G_RET_STS_ERROR;
426: -- Standard call to get message count and if count=1, get the message
427: FND_MSG_PUB.Count_And_Get (
428: p_encoded => FND_API.G_FALSE,
429: p_count => x_msg_count,
430: p_data => x_msg_data
431: );
433: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
434: ROLLBACK TO UPDATE_Ps_Cndclses_PVT;
435: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
436: -- Standard call to get message count and if count=1, get the message
437: FND_MSG_PUB.Count_And_Get (
438: p_encoded => FND_API.G_FALSE,
439: p_count => x_msg_count,
440: p_data => x_msg_data
441: );
442:
443: WHEN OTHERS THEN
444: ROLLBACK TO UPDATE_Ps_Cndclses_PVT;
445: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
446: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
447: THEN
448: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
449: END IF;
450: -- Standard call to get message count and if count=1, get the message
444: ROLLBACK TO UPDATE_Ps_Cndclses_PVT;
445: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
446: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
447: THEN
448: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
449: END IF;
450: -- Standard call to get message count and if count=1, get the message
451: FND_MSG_PUB.Count_And_Get (
452: p_encoded => FND_API.G_FALSE,
447: THEN
448: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
449: END IF;
450: -- Standard call to get message count and if count=1, get the message
451: FND_MSG_PUB.Count_And_Get (
452: p_encoded => FND_API.G_FALSE,
453: p_count => x_msg_count,
454: p_data => x_msg_data
455: );
492:
493: -- Initialize message list if p_init_msg_list is set to TRUE.
494: IF FND_API.to_Boolean( p_init_msg_list )
495: THEN
496: FND_MSG_PUB.initialize;
497: END IF;
498:
499: -- Debug Message
500: IF (AMS_DEBUG_HIGH_ON) THEN
520: l_query := 'select count(*) from ams_iba_ps_rules where ';
521: execute immediate l_query || l_wclause || ' = ''Y''' into l_count;
522:
523: if l_count > 0 then
524: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
525: THEN
526: FND_MESSAGE.set_name('AMS','AMS_POST_COND_IN_USE');
527: FND_MSG_PUB.add;
528: END IF;
523: if l_count > 0 then
524: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
525: THEN
526: FND_MESSAGE.set_name('AMS','AMS_POST_COND_IN_USE');
527: FND_MSG_PUB.add;
528: END IF;
529: RAISE FND_API.g_exc_error;
530: end if;
531:
559: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
560: END IF;
561:
562: -- Standard call to get message count and if count is 1, get message info.
563: FND_MSG_PUB.Count_And_Get
564: (p_count => x_msg_count,
565: p_data => x_msg_data
566: );
567:
574: WHEN FND_API.G_EXC_ERROR THEN
575: ROLLBACK TO DELETE_Ps_Cndclses_PVT;
576: x_return_status := FND_API.G_RET_STS_ERROR;
577: -- Standard call to get message count and if count=1, get the message
578: FND_MSG_PUB.Count_And_Get (
579: p_encoded => FND_API.G_FALSE,
580: p_count => x_msg_count,
581: p_data => x_msg_data
582: );
584: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
585: ROLLBACK TO DELETE_Ps_Cndclses_PVT;
586: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
587: -- Standard call to get message count and if count=1, get the message
588: FND_MSG_PUB.Count_And_Get (
589: p_encoded => FND_API.G_FALSE,
590: p_count => x_msg_count,
591: p_data => x_msg_data
592: );
593:
594: WHEN OTHERS THEN
595: ROLLBACK TO DELETE_Ps_Cndclses_PVT;
596: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
597: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
598: THEN
599: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
600: END IF;
601: -- Standard call to get message count and if count=1, get the message
595: ROLLBACK TO DELETE_Ps_Cndclses_PVT;
596: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
597: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
598: THEN
599: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
600: END IF;
601: -- Standard call to get message count and if count=1, get the message
602: FND_MSG_PUB.Count_And_Get (
603: p_encoded => FND_API.G_FALSE,
598: THEN
599: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
600: END IF;
601: -- Standard call to get message count and if count=1, get the message
602: FND_MSG_PUB.Count_And_Get (
603: p_encoded => FND_API.G_FALSE,
604: p_count => x_msg_count,
605: p_data => x_msg_data
606: );
642:
643: -- Initialize message list if p_init_msg_list is set to TRUE.
644: IF FND_API.to_Boolean( p_init_msg_list )
645: THEN
646: FND_MSG_PUB.initialize;
647: END IF;
648:
649: -- Standard call to check for call compatibility.
650: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
669: FETCH c_Ps_Cndclses INTO l_CND_CLAUSE_ID;
670:
671: IF (c_Ps_Cndclses%NOTFOUND) THEN
672: CLOSE c_Ps_Cndclses;
673: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
674: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
675: FND_MSG_PUB.add;
676: END IF;
677: RAISE FND_API.g_exc_error;
671: IF (c_Ps_Cndclses%NOTFOUND) THEN
672: CLOSE c_Ps_Cndclses;
673: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
674: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
675: FND_MSG_PUB.add;
676: END IF;
677: RAISE FND_API.g_exc_error;
678: END IF;
679:
679:
680: CLOSE c_Ps_Cndclses;
681:
682: -------------------- finish --------------------------
683: FND_MSG_PUB.count_and_get(
684: p_encoded => FND_API.g_false,
685: p_count => x_msg_count,
686: p_data => x_msg_data);
687: IF (AMS_DEBUG_HIGH_ON) THEN
697: WHEN FND_API.G_EXC_ERROR THEN
698: ROLLBACK TO LOCK_Ps_Cndclses_PVT;
699: x_return_status := FND_API.G_RET_STS_ERROR;
700: -- Standard call to get message count and if count=1, get the message
701: FND_MSG_PUB.Count_And_Get (
702: p_encoded => FND_API.G_FALSE,
703: p_count => x_msg_count,
704: p_data => x_msg_data
705: );
707: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
708: ROLLBACK TO LOCK_Ps_Cndclses_PVT;
709: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
710: -- Standard call to get message count and if count=1, get the message
711: FND_MSG_PUB.Count_And_Get (
712: p_encoded => FND_API.G_FALSE,
713: p_count => x_msg_count,
714: p_data => x_msg_data
715: );
716:
717: WHEN OTHERS THEN
718: ROLLBACK TO LOCK_Ps_Cndclses_PVT;
719: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
720: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
721: THEN
722: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
723: END IF;
724: -- Standard call to get message count and if count=1, get the message
718: ROLLBACK TO LOCK_Ps_Cndclses_PVT;
719: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
720: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
721: THEN
722: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
723: END IF;
724: -- Standard call to get message count and if count=1, get the message
725: FND_MSG_PUB.Count_And_Get (
726: p_encoded => FND_API.G_FALSE,
721: THEN
722: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
723: END IF;
724: -- Standard call to get message count and if count=1, get the message
725: FND_MSG_PUB.Count_And_Get (
726: p_encoded => FND_API.G_FALSE,
727: p_count => x_msg_count,
728: p_data => x_msg_data
729: );
1028:
1029: -- Initialize message list if p_init_msg_list is set to TRUE.
1030: IF FND_API.to_Boolean( p_init_msg_list )
1031: THEN
1032: FND_MSG_PUB.initialize;
1033: END IF;
1034: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
1035: Check_ps_cndclses_Items(
1036: p_ps_cndclses_rec => p_ps_cndclses_rec,
1080: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
1081: END IF;
1082:
1083: -- Standard call to get message count and if count is 1, get message info.
1084: FND_MSG_PUB.Count_And_Get
1085: (p_count => x_msg_count,
1086: p_data => x_msg_data
1087: );
1088: EXCEPTION
1094: WHEN FND_API.G_EXC_ERROR THEN
1095: ROLLBACK TO VALIDATE_Ps_Cndclses_;
1096: x_return_status := FND_API.G_RET_STS_ERROR;
1097: -- Standard call to get message count and if count=1, get the message
1098: FND_MSG_PUB.Count_And_Get (
1099: p_encoded => FND_API.G_FALSE,
1100: p_count => x_msg_count,
1101: p_data => x_msg_data
1102: );
1104: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1105: ROLLBACK TO VALIDATE_Ps_Cndclses_;
1106: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1107: -- Standard call to get message count and if count=1, get the message
1108: FND_MSG_PUB.Count_And_Get (
1109: p_encoded => FND_API.G_FALSE,
1110: p_count => x_msg_count,
1111: p_data => x_msg_data
1112: );
1113:
1114: WHEN OTHERS THEN
1115: ROLLBACK TO VALIDATE_Ps_Cndclses_;
1116: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1117: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1118: THEN
1119: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1120: END IF;
1121: -- Standard call to get message count and if count=1, get the message
1115: ROLLBACK TO VALIDATE_Ps_Cndclses_;
1116: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1117: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1118: THEN
1119: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1120: END IF;
1121: -- Standard call to get message count and if count=1, get the message
1122: FND_MSG_PUB.Count_And_Get (
1123: p_encoded => FND_API.G_FALSE,
1118: THEN
1119: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1120: END IF;
1121: -- Standard call to get message count and if count=1, get the message
1122: FND_MSG_PUB.Count_And_Get (
1123: p_encoded => FND_API.G_FALSE,
1124: p_count => x_msg_count,
1125: p_data => x_msg_data
1126: );
1139: BEGIN
1140: -- Initialize message list if p_init_msg_list is set to TRUE.
1141: IF FND_API.to_Boolean( p_init_msg_list )
1142: THEN
1143: FND_MSG_PUB.initialize;
1144: END IF;
1145:
1146: -- Initialize API return status to SUCCESS
1147: x_return_status := FND_API.G_RET_STS_SUCCESS;
1156:
1157: AMS_UTILITY_PVT.debug_message('Private API: Validate_dm_model_rec');
1158: END IF;
1159: -- Standard call to get message count and if count is 1, get message info.
1160: FND_MSG_PUB.Count_And_Get
1161: (p_count => x_msg_count,
1162: p_data => x_msg_data
1163: );
1164: END Validate_ps_cndclses_Rec;