19:
20: G_PKG_NAME CONSTANT VARCHAR2(30):= 'AMS_Met_Tpl_Assoc_PVT';
21: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvmtab.pls';
22:
23: AMS_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
24: AMS_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
25: AMS_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
26:
27: PROCEDURE Complete_met_tpl_assoc_Rec (
20: G_PKG_NAME CONSTANT VARCHAR2(30):= 'AMS_Met_Tpl_Assoc_PVT';
21: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvmtab.pls';
22:
23: AMS_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
24: AMS_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
25: AMS_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
26:
27: PROCEDURE Complete_met_tpl_assoc_Rec (
28: p_ref_met_tpl_assoc_rec IN met_tpl_assoc_rec_type,
21: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvmtab.pls';
22:
23: AMS_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
24: AMS_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
25: AMS_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
26:
27: PROCEDURE Complete_met_tpl_assoc_Rec (
28: p_ref_met_tpl_assoc_rec IN met_tpl_assoc_rec_type,
29: x_tar_met_tpl_assoc_rec OUT NOCOPY met_tpl_assoc_rec_type);
76:
77: -- Initialize message list if p_init_msg_list is set to TRUE.
78: IF FND_API.to_Boolean( p_init_msg_list )
79: THEN
80: FND_MSG_PUB.initialize;
81: END IF;
82:
83: -- Debug Message
84: IF (AMS_DEBUG_HIGH_ON) THEN
89:
90: --sunkumar 30/01/2003
91: --check if we are trying to create associations for a seeded metric template
92: /*IF p_met_tpl_assoc_rec.metric_tpl_header_id < 10000 THEN
93: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
94: THEN
95: Ams_Utility_Pvt.Error_Message(p_message_name => 'AMS_METR_TPL_SEEDED');
96: END IF;
97:
198: Ams_Utility_Pvt.debug_message('Private API: ' || l_api_name || 'end');
199: END IF;
200:
201: -- Standard call to get message count and if count is 1, get message info.
202: FND_MSG_PUB.Count_And_Get
203: (p_count => x_msg_count,
204: p_data => x_msg_data
205: );
206: EXCEPTION
212: WHEN FND_API.G_EXC_ERROR THEN
213: ROLLBACK TO CREATE_Met_Tpl_Assoc_PVT;
214: x_return_status := FND_API.G_RET_STS_ERROR;
215: -- Standard call to get message count and if count=1, get the message
216: FND_MSG_PUB.Count_And_Get (
217: p_encoded => FND_API.G_FALSE,
218: p_count => x_msg_count,
219: p_data => x_msg_data
220: );
222: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
223: ROLLBACK TO CREATE_Met_Tpl_Assoc_PVT;
224: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
225: -- Standard call to get message count and if count=1, get the message
226: FND_MSG_PUB.Count_And_Get (
227: p_encoded => FND_API.G_FALSE,
228: p_count => x_msg_count,
229: p_data => x_msg_data
230: );
231:
232: WHEN OTHERS THEN
233: ROLLBACK TO CREATE_Met_Tpl_Assoc_PVT;
234: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
235: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
236: THEN
237: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
238: END IF;
239: -- Standard call to get message count and if count=1, get the message
233: ROLLBACK TO CREATE_Met_Tpl_Assoc_PVT;
234: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
235: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
236: THEN
237: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
238: END IF;
239: -- Standard call to get message count and if count=1, get the message
240: FND_MSG_PUB.Count_And_Get (
241: p_encoded => FND_API.G_FALSE,
236: THEN
237: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
238: END IF;
239: -- Standard call to get message count and if count=1, get the message
240: FND_MSG_PUB.Count_And_Get (
241: p_encoded => FND_API.G_FALSE,
242: p_count => x_msg_count,
243: p_data => x_msg_data
244: );
302:
303: -- Initialize message list if p_init_msg_list is set to TRUE.
304: IF FND_API.to_Boolean( p_init_msg_list )
305: THEN
306: FND_MSG_PUB.initialize;
307: END IF;
308:
309: -- Debug Message
310: IF (AMS_DEBUG_HIGH_ON) THEN
366: IF (( (l_tar_met_tpl_assoc_rec.association_type <>l_ref_met_tpl_assoc_rec.association_type )
367: OR (l_tar_met_tpl_assoc_rec.used_by_id <>l_ref_met_tpl_assoc_rec.used_by_id)
368: OR (l_tar_met_tpl_assoc_rec.metric_tpl_header_id <>l_ref_met_tpl_assoc_rec.metric_tpl_header_id))
369: AND (l_tar_met_tpl_assoc_rec.enabled_flag=l_ref_met_tpl_assoc_rec.enabled_flag)) THEN
370: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
371: THEN
372: Ams_Utility_Pvt.Error_Message(p_message_name => 'AMS_METR_TPL_SEEDED_MOD');
373: END IF;
374:
440: Ams_Utility_Pvt.debug_message('Private API: ' || l_api_name || ': end');
441: END IF;
442:
443: -- Standard call to get message count and if count is 1, get message info.
444: FND_MSG_PUB.Count_And_Get
445: (p_count => x_msg_count,
446: p_data => x_msg_data
447: );
448: EXCEPTION
454: WHEN FND_API.G_EXC_ERROR THEN
455: ROLLBACK TO UPDATE_Met_Tpl_Assoc_PVT;
456: x_return_status := FND_API.G_RET_STS_ERROR;
457: -- Standard call to get message count and if count=1, get the message
458: FND_MSG_PUB.Count_And_Get (
459: p_encoded => FND_API.G_FALSE,
460: p_count => x_msg_count,
461: p_data => x_msg_data
462: );
464: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
465: ROLLBACK TO UPDATE_Met_Tpl_Assoc_PVT;
466: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
467: -- Standard call to get message count and if count=1, get the message
468: FND_MSG_PUB.Count_And_Get (
469: p_encoded => FND_API.G_FALSE,
470: p_count => x_msg_count,
471: p_data => x_msg_data
472: );
473:
474: WHEN OTHERS THEN
475: ROLLBACK TO UPDATE_Met_Tpl_Assoc_PVT;
476: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
477: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
478: THEN
479: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
480: END IF;
481: -- Standard call to get message count and if count=1, get the message
475: ROLLBACK TO UPDATE_Met_Tpl_Assoc_PVT;
476: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
477: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
478: THEN
479: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
480: END IF;
481: -- Standard call to get message count and if count=1, get the message
482: FND_MSG_PUB.Count_And_Get (
483: p_encoded => FND_API.G_FALSE,
478: THEN
479: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
480: END IF;
481: -- Standard call to get message count and if count=1, get the message
482: FND_MSG_PUB.Count_And_Get (
483: p_encoded => FND_API.G_FALSE,
484: p_count => x_msg_count,
485: p_data => x_msg_data
486: );
519:
520: -- Initialize message list if p_init_msg_list is set to TRUE.
521: IF FND_API.to_Boolean( p_init_msg_list )
522: THEN
523: FND_MSG_PUB.initialize;
524: END IF;
525:
526: -- Debug Message
527: IF (AMS_DEBUG_HIGH_ON) THEN
531:
532: --sunkumar 30/01/2003
533: --check if we are trying to delete associations for a seeded metric template
534: IF p_METRIC_TPL_ASSOC_ID < 10000 THEN
535: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
536: THEN
537: Ams_Utility_Pvt.Error_Message(p_message_name => 'AMS_METR_TPL_SEEDED');
538: END IF;
539:
574: Ams_Utility_Pvt.debug_message('Private API: ' || l_api_name || 'end');
575: END IF;
576:
577: -- Standard call to get message count and if count is 1, get message info.
578: FND_MSG_PUB.Count_And_Get
579: (p_count => x_msg_count,
580: p_data => x_msg_data
581: );
582: EXCEPTION
588: WHEN FND_API.G_EXC_ERROR THEN
589: ROLLBACK TO DELETE_Met_Tpl_Assoc_PVT;
590: x_return_status := FND_API.G_RET_STS_ERROR;
591: -- Standard call to get message count and if count=1, get the message
592: FND_MSG_PUB.Count_And_Get (
593: p_encoded => FND_API.G_FALSE,
594: p_count => x_msg_count,
595: p_data => x_msg_data
596: );
598: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
599: ROLLBACK TO DELETE_Met_Tpl_Assoc_PVT;
600: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
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: );
607:
608: WHEN OTHERS THEN
609: ROLLBACK TO DELETE_Met_Tpl_Assoc_PVT;
610: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
611: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
612: THEN
613: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
614: END IF;
615: -- Standard call to get message count and if count=1, get the message
609: ROLLBACK TO DELETE_Met_Tpl_Assoc_PVT;
610: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
611: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
612: THEN
613: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
614: END IF;
615: -- Standard call to get message count and if count=1, get the message
616: FND_MSG_PUB.Count_And_Get (
617: p_encoded => FND_API.G_FALSE,
612: THEN
613: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
614: END IF;
615: -- Standard call to get message count and if count=1, get the message
616: FND_MSG_PUB.Count_And_Get (
617: p_encoded => FND_API.G_FALSE,
618: p_count => x_msg_count,
619: p_data => x_msg_data
620: );
657:
658: -- Initialize message list if p_init_msg_list is set to TRUE.
659: IF FND_API.to_Boolean( p_init_msg_list )
660: THEN
661: FND_MSG_PUB.initialize;
662: END IF;
663:
664: -- Standard call to check for call compatibility.
665: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
689: FETCH c_Met_Tpl_Assoc INTO l_METRIC_TPL_ASSOC_ID;
690:
691: IF (c_Met_Tpl_Assoc%NOTFOUND) THEN
692: CLOSE c_Met_Tpl_Assoc;
693: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
694: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
695: FND_MSG_PUB.ADD;
696: END IF;
697: RAISE FND_API.g_exc_error;
691: IF (c_Met_Tpl_Assoc%NOTFOUND) THEN
692: CLOSE c_Met_Tpl_Assoc;
693: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
694: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
695: FND_MSG_PUB.ADD;
696: END IF;
697: RAISE FND_API.g_exc_error;
698: END IF;
699:
699:
700: CLOSE c_Met_Tpl_Assoc;
701:
702: -------------------- finish --------------------------
703: FND_MSG_PUB.count_and_get(
704: p_encoded => FND_API.g_false,
705: p_count => x_msg_count,
706: p_data => x_msg_data);
707: IF (AMS_DEBUG_HIGH_ON) THEN
717: WHEN FND_API.G_EXC_ERROR THEN
718: ROLLBACK TO LOCK_Met_Tpl_Assoc_PVT;
719: x_return_status := FND_API.G_RET_STS_ERROR;
720: -- Standard call to get message count and if count=1, get the message
721: FND_MSG_PUB.Count_And_Get (
722: p_encoded => FND_API.G_FALSE,
723: p_count => x_msg_count,
724: p_data => x_msg_data
725: );
727: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
728: ROLLBACK TO LOCK_Met_Tpl_Assoc_PVT;
729: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
730: -- Standard call to get message count and if count=1, get the message
731: FND_MSG_PUB.Count_And_Get (
732: p_encoded => FND_API.G_FALSE,
733: p_count => x_msg_count,
734: p_data => x_msg_data
735: );
736:
737: WHEN OTHERS THEN
738: ROLLBACK TO LOCK_Met_Tpl_Assoc_PVT;
739: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
740: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
741: THEN
742: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
743: END IF;
744: -- Standard call to get message count and if count=1, get the message
738: ROLLBACK TO LOCK_Met_Tpl_Assoc_PVT;
739: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
740: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
741: THEN
742: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
743: END IF;
744: -- Standard call to get message count and if count=1, get the message
745: FND_MSG_PUB.Count_And_Get (
746: p_encoded => FND_API.G_FALSE,
741: THEN
742: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
743: END IF;
744: -- Standard call to get message count and if count=1, get the message
745: FND_MSG_PUB.Count_And_Get (
746: p_encoded => FND_API.G_FALSE,
747: p_count => x_msg_count,
748: p_data => x_msg_data
749: );
1171:
1172: -- Initialize message list if p_init_msg_list is set to TRUE.
1173: IF FND_API.to_Boolean( p_init_msg_list )
1174: THEN
1175: FND_MSG_PUB.initialize;
1176: END IF;
1177: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
1178: Check_met_tpl_assoc_Items(
1179: p_met_tpl_assoc_rec => p_met_tpl_assoc_rec,
1224: Ams_Utility_Pvt.debug_message('PRIVATE API: ' || l_api_name || 'END');
1225: END IF;
1226:
1227: -- Standard call to get message count and if count is 1, get message info.
1228: FND_MSG_PUB.Count_And_Get
1229: (p_count => x_msg_count,
1230: p_data => x_msg_data
1231: );
1232: EXCEPTION
1238: WHEN FND_API.G_EXC_ERROR THEN
1239: ROLLBACK TO VALIDATE_Met_Tpl_Assoc_;
1240: x_return_status := FND_API.G_RET_STS_ERROR;
1241: -- Standard call to get message count and if count=1, get the message
1242: FND_MSG_PUB.Count_And_Get (
1243: p_encoded => FND_API.G_FALSE,
1244: p_count => x_msg_count,
1245: p_data => x_msg_data
1246: );
1248: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1249: ROLLBACK TO VALIDATE_Met_Tpl_Assoc_;
1250: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1251: -- Standard call to get message count and if count=1, get the message
1252: FND_MSG_PUB.Count_And_Get (
1253: p_encoded => FND_API.G_FALSE,
1254: p_count => x_msg_count,
1255: p_data => x_msg_data
1256: );
1257:
1258: WHEN OTHERS THEN
1259: ROLLBACK TO VALIDATE_Met_Tpl_Assoc_;
1260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1261: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1262: THEN
1263: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1264: END IF;
1265: -- Standard call to get message count and if count=1, get the message
1259: ROLLBACK TO VALIDATE_Met_Tpl_Assoc_;
1260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1261: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1262: THEN
1263: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1264: END IF;
1265: -- Standard call to get message count and if count=1, get the message
1266: FND_MSG_PUB.Count_And_Get (
1267: p_encoded => FND_API.G_FALSE,
1262: THEN
1263: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1264: END IF;
1265: -- Standard call to get message count and if count=1, get the message
1266: FND_MSG_PUB.Count_And_Get (
1267: p_encoded => FND_API.G_FALSE,
1268: p_count => x_msg_count,
1269: p_data => x_msg_data
1270: );
1283: BEGIN
1284: -- Initialize message list if p_init_msg_list is set to TRUE.
1285: IF FND_API.to_Boolean( p_init_msg_list )
1286: THEN
1287: FND_MSG_PUB.initialize;
1288: END IF;
1289:
1290: -- Initialize API return status to SUCCESS
1291: x_return_status := FND_API.G_RET_STS_SUCCESS;
1300:
1301: Ams_Utility_Pvt.debug_message('PRIVATE API: Validate_met_tpl_assoc_rec');
1302: END IF;
1303: -- Standard call to get message count and if count is 1, get message info.
1304: FND_MSG_PUB.Count_And_Get
1305: (p_count => x_msg_count,
1306: p_data => x_msg_data
1307: );
1308: END Validate_met_tpl_assoc_Rec;