18: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvptrb.pls';
19:
20:
21: -- Hint: Primary key needs to be returned.
22: AMS_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
23: AMS_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
24: AMS_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
25:
26: PROCEDURE Create_template_res(
19:
20:
21: -- Hint: Primary key needs to be returned.
22: AMS_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
23: AMS_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
24: AMS_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
25:
26: PROCEDURE Create_template_res(
27: p_api_version_number IN NUMBER,
20:
21: -- Hint: Primary key needs to be returned.
22: AMS_DEBUG_HIGH_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
23: AMS_DEBUG_LOW_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
24: AMS_DEBUG_MEDIUM_ON boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
25:
26: PROCEDURE Create_template_res(
27: p_api_version_number IN NUMBER,
28: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
70:
71: -- Initialize message list if p_init_msg_list is set to TRUE.
72: IF FND_API.to_Boolean( p_init_msg_list )
73: THEN
74: FND_MSG_PUB.initialize;
75: END IF;
76:
77: -- Debug Message
78: IF (AMS_DEBUG_HIGH_ON) THEN
177: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
178: END IF;
179:
180: -- Standard call to get message count and if count is 1, get message info.
181: FND_MSG_PUB.Count_And_Get
182: (p_count => x_msg_count,
183: p_data => x_msg_data
184: );
185: EXCEPTION
191: WHEN FND_API.G_EXC_ERROR THEN
192: ROLLBACK TO CREATE_template_res_PVT;
193: x_return_status := FND_API.G_RET_STS_ERROR;
194: -- Standard call to get message count and if count=1, get the message
195: FND_MSG_PUB.Count_And_Get (
196: p_encoded => FND_API.G_FALSE,
197: p_count => x_msg_count,
198: p_data => x_msg_data
199: );
201: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
202: ROLLBACK TO CREATE_template_res_PVT;
203: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
204: -- Standard call to get message count and if count=1, get the message
205: FND_MSG_PUB.Count_And_Get (
206: p_encoded => FND_API.G_FALSE,
207: p_count => x_msg_count,
208: p_data => x_msg_data
209: );
210:
211: WHEN OTHERS THEN
212: ROLLBACK TO CREATE_template_res_PVT;
213: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
214: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
215: THEN
216: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
217: END IF;
218: -- Standard call to get message count and if count=1, get the message
212: ROLLBACK TO CREATE_template_res_PVT;
213: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
214: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
215: THEN
216: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
217: END IF;
218: -- Standard call to get message count and if count=1, get the message
219: FND_MSG_PUB.Count_And_Get (
220: p_encoded => FND_API.G_FALSE,
215: THEN
216: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
217: END IF;
218: -- Standard call to get message count and if count=1, get the message
219: FND_MSG_PUB.Count_And_Get (
220: p_encoded => FND_API.G_FALSE,
221: p_count => x_msg_count,
222: p_data => x_msg_data
223: );
269:
270: -- Initialize message list if p_init_msg_list is set to TRUE.
271: IF FND_API.to_Boolean( p_init_msg_list )
272: THEN
273: FND_MSG_PUB.initialize;
274: END IF;
275:
276: -- Debug Message
277: IF (AMS_DEBUG_HIGH_ON) THEN
379: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
380: END IF;
381:
382: -- Standard call to get message count and if count is 1, get message info.
383: FND_MSG_PUB.Count_And_Get
384: (p_count => x_msg_count,
385: p_data => x_msg_data
386: );
387: EXCEPTION
393: WHEN FND_API.G_EXC_ERROR THEN
394: ROLLBACK TO UPDATE_template_res_PVT;
395: x_return_status := FND_API.G_RET_STS_ERROR;
396: -- Standard call to get message count and if count=1, get the message
397: FND_MSG_PUB.Count_And_Get (
398: p_encoded => FND_API.G_FALSE,
399: p_count => x_msg_count,
400: p_data => x_msg_data
401: );
403: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
404: ROLLBACK TO UPDATE_template_res_PVT;
405: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
406: -- Standard call to get message count and if count=1, get the message
407: FND_MSG_PUB.Count_And_Get (
408: p_encoded => FND_API.G_FALSE,
409: p_count => x_msg_count,
410: p_data => x_msg_data
411: );
412:
413: WHEN OTHERS THEN
414: ROLLBACK TO UPDATE_template_res_PVT;
415: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
416: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
417: THEN
418: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
419: END IF;
420: -- Standard call to get message count and if count=1, get the message
414: ROLLBACK TO UPDATE_template_res_PVT;
415: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
416: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
417: THEN
418: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
419: END IF;
420: -- Standard call to get message count and if count=1, get the message
421: FND_MSG_PUB.Count_And_Get (
422: p_encoded => FND_API.G_FALSE,
417: THEN
418: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
419: END IF;
420: -- Standard call to get message count and if count=1, get the message
421: FND_MSG_PUB.Count_And_Get (
422: p_encoded => FND_API.G_FALSE,
423: p_count => x_msg_count,
424: p_data => x_msg_data
425: );
458:
459: -- Initialize message list if p_init_msg_list is set to TRUE.
460: IF FND_API.to_Boolean( p_init_msg_list )
461: THEN
462: FND_MSG_PUB.initialize;
463: END IF;
464:
465: -- Debug Message
466: IF (AMS_DEBUG_HIGH_ON) THEN
492: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
493: END IF;
494:
495: -- Standard call to get message count and if count is 1, get message info.
496: FND_MSG_PUB.Count_And_Get
497: (p_count => x_msg_count,
498: p_data => x_msg_data
499: );
500: EXCEPTION
506: WHEN FND_API.G_EXC_ERROR THEN
507: ROLLBACK TO DELETE_template_res_PVT;
508: x_return_status := FND_API.G_RET_STS_ERROR;
509: -- Standard call to get message count and if count=1, get the message
510: FND_MSG_PUB.Count_And_Get (
511: p_encoded => FND_API.G_FALSE,
512: p_count => x_msg_count,
513: p_data => x_msg_data
514: );
516: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
517: ROLLBACK TO DELETE_template_res_PVT;
518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
519: -- Standard call to get message count and if count=1, get the message
520: FND_MSG_PUB.Count_And_Get (
521: p_encoded => FND_API.G_FALSE,
522: p_count => x_msg_count,
523: p_data => x_msg_data
524: );
525:
526: WHEN OTHERS THEN
527: ROLLBACK TO DELETE_template_res_PVT;
528: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
529: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
530: THEN
531: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
532: END IF;
533: -- Standard call to get message count and if count=1, get the message
527: ROLLBACK TO DELETE_template_res_PVT;
528: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
529: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
530: THEN
531: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
532: END IF;
533: -- Standard call to get message count and if count=1, get the message
534: FND_MSG_PUB.Count_And_Get (
535: p_encoded => FND_API.G_FALSE,
530: THEN
531: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
532: END IF;
533: -- Standard call to get message count and if count=1, get the message
534: FND_MSG_PUB.Count_And_Get (
535: p_encoded => FND_API.G_FALSE,
536: p_count => x_msg_count,
537: p_data => x_msg_data
538: );
576:
577: -- Initialize message list if p_init_msg_list is set to TRUE.
578: IF FND_API.to_Boolean( p_init_msg_list )
579: THEN
580: FND_MSG_PUB.initialize;
581: END IF;
582:
583: -- Standard call to check for call compatibility.
584: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
608: FETCH c_template_res INTO l_TEMPL_RESPONSIBILITY_ID;
609:
610: IF (c_template_res%NOTFOUND) THEN
611: CLOSE c_template_res;
612: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
613: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
614: FND_MSG_PUB.add;
615: END IF;
616: RAISE FND_API.g_exc_error;
610: IF (c_template_res%NOTFOUND) THEN
611: CLOSE c_template_res;
612: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
613: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
614: FND_MSG_PUB.add;
615: END IF;
616: RAISE FND_API.g_exc_error;
617: END IF;
618:
618:
619: CLOSE c_template_res;
620:
621: -------------------- finish --------------------------
622: FND_MSG_PUB.count_and_get(
623: p_encoded => FND_API.g_false,
624: p_count => x_msg_count,
625: p_data => x_msg_data);
626: IF (AMS_DEBUG_HIGH_ON) THEN
636: WHEN FND_API.G_EXC_ERROR THEN
637: ROLLBACK TO LOCK_template_res_PVT;
638: x_return_status := FND_API.G_RET_STS_ERROR;
639: -- Standard call to get message count and if count=1, get the message
640: FND_MSG_PUB.Count_And_Get (
641: p_encoded => FND_API.G_FALSE,
642: p_count => x_msg_count,
643: p_data => x_msg_data
644: );
646: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
647: ROLLBACK TO LOCK_template_res_PVT;
648: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
649: -- Standard call to get message count and if count=1, get the message
650: FND_MSG_PUB.Count_And_Get (
651: p_encoded => FND_API.G_FALSE,
652: p_count => x_msg_count,
653: p_data => x_msg_data
654: );
655:
656: WHEN OTHERS THEN
657: ROLLBACK TO LOCK_template_res_PVT;
658: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
659: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
660: THEN
661: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
662: END IF;
663: -- Standard call to get message count and if count=1, get the message
657: ROLLBACK TO LOCK_template_res_PVT;
658: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
659: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
660: THEN
661: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
662: END IF;
663: -- Standard call to get message count and if count=1, get the message
664: FND_MSG_PUB.Count_And_Get (
665: p_encoded => FND_API.G_FALSE,
660: THEN
661: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
662: END IF;
663: -- Standard call to get message count and if count=1, get the message
664: FND_MSG_PUB.Count_And_Get (
665: p_encoded => FND_API.G_FALSE,
666: p_count => x_msg_count,
667: p_data => x_msg_data
668: );
928:
929: -- Initialize message list if p_init_msg_list is set to TRUE.
930: IF FND_API.to_Boolean( p_init_msg_list )
931: THEN
932: FND_MSG_PUB.initialize;
933: END IF;
934: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
935: Check_template_res_Items(
936: p_template_res_rec => p_template_res_rec,
984: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
985: END IF;
986:
987: -- Standard call to get message count and if count is 1, get message info.
988: FND_MSG_PUB.Count_And_Get
989: (p_count => x_msg_count,
990: p_data => x_msg_data
991: );
992: EXCEPTION
998: WHEN FND_API.G_EXC_ERROR THEN
999: ROLLBACK TO VALIDATE_template_res_;
1000: x_return_status := FND_API.G_RET_STS_ERROR;
1001: -- Standard call to get message count and if count=1, get the message
1002: FND_MSG_PUB.Count_And_Get (
1003: p_encoded => FND_API.G_FALSE,
1004: p_count => x_msg_count,
1005: p_data => x_msg_data
1006: );
1008: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1009: ROLLBACK TO VALIDATE_template_res_;
1010: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1011: -- Standard call to get message count and if count=1, get the message
1012: FND_MSG_PUB.Count_And_Get (
1013: p_encoded => FND_API.G_FALSE,
1014: p_count => x_msg_count,
1015: p_data => x_msg_data
1016: );
1017:
1018: WHEN OTHERS THEN
1019: ROLLBACK TO VALIDATE_template_res_;
1020: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1021: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1022: THEN
1023: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1024: END IF;
1025: -- Standard call to get message count and if count=1, get the message
1019: ROLLBACK TO VALIDATE_template_res_;
1020: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1021: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1022: THEN
1023: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1024: END IF;
1025: -- Standard call to get message count and if count=1, get the message
1026: FND_MSG_PUB.Count_And_Get (
1027: p_encoded => FND_API.G_FALSE,
1022: THEN
1023: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1024: END IF;
1025: -- Standard call to get message count and if count=1, get the message
1026: FND_MSG_PUB.Count_And_Get (
1027: p_encoded => FND_API.G_FALSE,
1028: p_count => x_msg_count,
1029: p_data => x_msg_data
1030: );
1043: BEGIN
1044: -- Initialize message list if p_init_msg_list is set to TRUE.
1045: IF FND_API.to_Boolean( p_init_msg_list )
1046: THEN
1047: FND_MSG_PUB.initialize;
1048: END IF;
1049:
1050: -- Initialize API return status to SUCCESS
1051: x_return_status := FND_API.G_RET_STS_SUCCESS;
1060:
1061: AMS_UTILITY_PVT.debug_message('Private API: Validate_dm_model_rec');
1062: END IF;
1063: -- Standard call to get message count and if count is 1, get message info.
1064: FND_MSG_PUB.Count_And_Get
1065: (p_count => x_msg_count,
1066: p_data => x_msg_data
1067: );
1068: END Validate_template_res_Rec;