16: G_PKG_NAME CONSTANT VARCHAR2(30):= 'AMS_Ps_Strats_PVT';
17: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvstrb.pls';
18:
19: -- Hint: Primary key needs to be returned.
20: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
21: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
22: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
23:
24: PROCEDURE Create_Ps_Strats(
17: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvstrb.pls';
18:
19: -- Hint: Primary key needs to be returned.
20: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
21: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
22: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
23:
24: PROCEDURE Create_Ps_Strats(
25: p_api_version_number IN NUMBER,
18:
19: -- Hint: Primary key needs to be returned.
20: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
21: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
22: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
23:
24: PROCEDURE Create_Ps_Strats(
25: p_api_version_number IN NUMBER,
26: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
67:
68: -- Initialize message list if p_init_msg_list is set to TRUE.
69: IF FND_API.to_Boolean( p_init_msg_list )
70: THEN
71: FND_MSG_PUB.initialize;
72: END IF;
73:
74: -- Debug Message
75: IF (AMS_DEBUG_HIGH_ON) THEN
173: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
174: END IF;
175:
176: -- Standard call to get message count and if count is 1, get message info.
177: FND_MSG_PUB.Count_And_Get
178: (p_count => x_msg_count,
179: p_data => x_msg_data
180: );
181: EXCEPTION
187: WHEN FND_API.G_EXC_ERROR THEN
188: ROLLBACK TO CREATE_Ps_Strats_PVT;
189: x_return_status := FND_API.G_RET_STS_ERROR;
190: -- Standard call to get message count and if count=1, get the message
191: FND_MSG_PUB.Count_And_Get (
192: p_encoded => FND_API.G_FALSE,
193: p_count => x_msg_count,
194: p_data => x_msg_data
195: );
197: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
198: ROLLBACK TO CREATE_Ps_Strats_PVT;
199: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
200: -- Standard call to get message count and if count=1, get the message
201: FND_MSG_PUB.Count_And_Get (
202: p_encoded => FND_API.G_FALSE,
203: p_count => x_msg_count,
204: p_data => x_msg_data
205: );
206:
207: WHEN OTHERS THEN
208: ROLLBACK TO CREATE_Ps_Strats_PVT;
209: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
210: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
211: THEN
212: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
213: END IF;
214: -- Standard call to get message count and if count=1, get the message
208: ROLLBACK TO CREATE_Ps_Strats_PVT;
209: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
210: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
211: THEN
212: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
213: END IF;
214: -- Standard call to get message count and if count=1, get the message
215: FND_MSG_PUB.Count_And_Get (
216: p_encoded => FND_API.G_FALSE,
211: THEN
212: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
213: END IF;
214: -- Standard call to get message count and if count=1, get the message
215: FND_MSG_PUB.Count_And_Get (
216: p_encoded => FND_API.G_FALSE,
217: p_count => x_msg_count,
218: p_data => x_msg_data
219: );
270:
271: -- Initialize message list if p_init_msg_list is set to TRUE.
272: IF FND_API.to_Boolean( p_init_msg_list )
273: THEN
274: FND_MSG_PUB.initialize;
275: END IF;
276:
277: -- Debug Message
278: IF (AMS_DEBUG_HIGH_ON) THEN
360: RAISE FND_API.G_EXC_ERROR;
361: END IF;
362:
363: -- Debug Message
364: -- 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;
365:
366: -- Invoke table handler(AMS_IBA_PS_STRATS_B_PKG.Update_Row)
367: AMS_IBA_PS_STRATS_B_PKG.Update_Row(
368: p_created_by => FND_GLOBAL.USER_ID,
396: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
397: END IF;
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: EXCEPTION
410: WHEN FND_API.G_EXC_ERROR THEN
411: ROLLBACK TO UPDATE_Ps_Strats_PVT;
412: x_return_status := FND_API.G_RET_STS_ERROR;
413: -- Standard call to get message count and if count=1, get the message
414: FND_MSG_PUB.Count_And_Get (
415: p_encoded => FND_API.G_FALSE,
416: p_count => x_msg_count,
417: p_data => x_msg_data
418: );
420: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
421: ROLLBACK TO UPDATE_Ps_Strats_PVT;
422: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
423: -- Standard call to get message count and if count=1, get the message
424: FND_MSG_PUB.Count_And_Get (
425: p_encoded => FND_API.G_FALSE,
426: p_count => x_msg_count,
427: p_data => x_msg_data
428: );
429:
430: WHEN OTHERS THEN
431: ROLLBACK TO UPDATE_Ps_Strats_PVT;
432: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
433: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
434: THEN
435: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
436: END IF;
437: -- Standard call to get message count and if count=1, get the message
431: ROLLBACK TO UPDATE_Ps_Strats_PVT;
432: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
433: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
434: THEN
435: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
436: END IF;
437: -- Standard call to get message count and if count=1, get the message
438: FND_MSG_PUB.Count_And_Get (
439: p_encoded => FND_API.G_FALSE,
434: THEN
435: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
436: END IF;
437: -- Standard call to get message count and if count=1, get the message
438: FND_MSG_PUB.Count_And_Get (
439: p_encoded => FND_API.G_FALSE,
440: p_count => x_msg_count,
441: p_data => x_msg_data
442: );
514:
515: -- Initialize message list if p_init_msg_list is set to TRUE.
516: IF FND_API.to_Boolean( p_init_msg_list )
517: THEN
518: FND_MSG_PUB.initialize;
519: END IF;
520:
521: -- Debug Message
522: IF (AMS_DEBUG_HIGH_ON) THEN
556: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
557: END IF;
558:
559: -- Standard call to get message count and if count is 1, get message info.
560: FND_MSG_PUB.Count_And_Get
561: (p_count => x_msg_count,
562: p_data => x_msg_data
563: );
564: EXCEPTION
570: WHEN FND_API.G_EXC_ERROR THEN
571: ROLLBACK TO DELETE_Ps_Strats_PVT;
572: x_return_status := FND_API.G_RET_STS_ERROR;
573: -- Standard call to get message count and if count=1, get the message
574: FND_MSG_PUB.Count_And_Get (
575: p_encoded => FND_API.G_FALSE,
576: p_count => x_msg_count,
577: p_data => x_msg_data
578: );
580: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
581: ROLLBACK TO DELETE_Ps_Strats_PVT;
582: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
583: -- Standard call to get message count and if count=1, get the message
584: FND_MSG_PUB.Count_And_Get (
585: p_encoded => FND_API.G_FALSE,
586: p_count => x_msg_count,
587: p_data => x_msg_data
588: );
589:
590: WHEN OTHERS THEN
591: ROLLBACK TO DELETE_Ps_Strats_PVT;
592: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
593: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
594: THEN
595: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
596: END IF;
597: -- Standard call to get message count and if count=1, get the message
591: ROLLBACK TO DELETE_Ps_Strats_PVT;
592: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
593: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
594: THEN
595: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
596: END IF;
597: -- Standard call to get message count and if count=1, get the message
598: FND_MSG_PUB.Count_And_Get (
599: p_encoded => FND_API.G_FALSE,
594: THEN
595: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
596: END IF;
597: -- Standard call to get message count and if count=1, get the message
598: FND_MSG_PUB.Count_And_Get (
599: p_encoded => FND_API.G_FALSE,
600: p_count => x_msg_count,
601: p_data => x_msg_data
602: );
638:
639: -- Initialize message list if p_init_msg_list is set to TRUE.
640: IF FND_API.to_Boolean( p_init_msg_list )
641: THEN
642: FND_MSG_PUB.initialize;
643: END IF;
644:
645: -- Standard call to check for call compatibility.
646: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
670: FETCH c_Ps_Strats INTO l_STRATEGY_ID;
671:
672: IF (c_Ps_Strats%NOTFOUND) THEN
673: CLOSE c_Ps_Strats;
674: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
675: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
676: FND_MSG_PUB.add;
677: END IF;
678: RAISE FND_API.g_exc_error;
672: IF (c_Ps_Strats%NOTFOUND) THEN
673: CLOSE c_Ps_Strats;
674: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
675: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
676: FND_MSG_PUB.add;
677: END IF;
678: RAISE FND_API.g_exc_error;
679: END IF;
680:
680:
681: CLOSE c_Ps_Strats;
682:
683: -------------------- finish --------------------------
684: FND_MSG_PUB.count_and_get(
685: p_encoded => FND_API.g_false,
686: p_count => x_msg_count,
687: p_data => x_msg_data);
688: IF (AMS_DEBUG_HIGH_ON) THEN
698: WHEN FND_API.G_EXC_ERROR THEN
699: ROLLBACK TO LOCK_Ps_Strats_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 LOCK_Ps_Strats_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 LOCK_Ps_Strats_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 LOCK_Ps_Strats_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: );
1048:
1049: -- Initialize message list if p_init_msg_list is set to TRUE.
1050: IF FND_API.to_Boolean( p_init_msg_list )
1051: THEN
1052: FND_MSG_PUB.initialize;
1053: END IF;
1054: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
1055: Check_ps_strats_Items(
1056: p_ps_strats_rec => p_ps_strats_rec,
1110: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
1111: END IF;
1112:
1113: -- Standard call to get message count and if count is 1, get message info.
1114: FND_MSG_PUB.Count_And_Get
1115: (p_count => x_msg_count,
1116: p_data => x_msg_data
1117: );
1118: EXCEPTION
1124: WHEN FND_API.G_EXC_ERROR THEN
1125: ROLLBACK TO VALIDATE_Ps_Strats_;
1126: x_return_status := FND_API.G_RET_STS_ERROR;
1127: -- Standard call to get message count and if count=1, get the message
1128: FND_MSG_PUB.Count_And_Get (
1129: p_encoded => FND_API.G_FALSE,
1130: p_count => x_msg_count,
1131: p_data => x_msg_data
1132: );
1134: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1135: ROLLBACK TO VALIDATE_Ps_Strats_;
1136: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1137: -- Standard call to get message count and if count=1, get the message
1138: FND_MSG_PUB.Count_And_Get (
1139: p_encoded => FND_API.G_FALSE,
1140: p_count => x_msg_count,
1141: p_data => x_msg_data
1142: );
1143:
1144: WHEN OTHERS THEN
1145: ROLLBACK TO VALIDATE_Ps_Strats_;
1146: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1147: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1148: THEN
1149: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1150: END IF;
1151: -- Standard call to get message count and if count=1, get the message
1145: ROLLBACK TO VALIDATE_Ps_Strats_;
1146: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1147: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1148: THEN
1149: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1150: END IF;
1151: -- Standard call to get message count and if count=1, get the message
1152: FND_MSG_PUB.Count_And_Get (
1153: p_encoded => FND_API.G_FALSE,
1148: THEN
1149: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1150: END IF;
1151: -- Standard call to get message count and if count=1, get the message
1152: FND_MSG_PUB.Count_And_Get (
1153: p_encoded => FND_API.G_FALSE,
1154: p_count => x_msg_count,
1155: p_data => x_msg_data
1156: );
1169: BEGIN
1170: -- Initialize message list if p_init_msg_list is set to TRUE.
1171: IF FND_API.to_Boolean( p_init_msg_list )
1172: THEN
1173: FND_MSG_PUB.initialize;
1174: END IF;
1175:
1176: -- Initialize API return status to SUCCESS
1177: x_return_status := FND_API.G_RET_STS_SUCCESS;
1186:
1187: AMS_UTILITY_PVT.debug_message('Private API: Validate_dm_model_rec');
1188: END IF;
1189: -- Standard call to get message count and if count is 1, get message info.
1190: FND_MSG_PUB.Count_And_Get
1191: (p_count => x_msg_count,
1192: p_data => x_msg_data
1193: );
1194: END Validate_ps_strats_Rec;