17: G_PKG_NAME CONSTANT VARCHAR2(30):= 'AMS_Iba_Plcmnt_PVT';
18: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvplcb.pls';
19:
20: -- Hint: Primary key needs to be returned.
21: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
22: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
23: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
24:
25: PROCEDURE Create_Iba_Plcmnt(
18: G_FILE_NAME CONSTANT VARCHAR2(12) := 'amsvplcb.pls';
19:
20: -- Hint: Primary key needs to be returned.
21: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
22: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
23: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
24:
25: PROCEDURE Create_Iba_Plcmnt(
26: p_api_version_number IN NUMBER,
19:
20: -- Hint: Primary key needs to be returned.
21: AMS_DEBUG_HIGH_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH);
22: AMS_DEBUG_LOW_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW);
23: AMS_DEBUG_MEDIUM_ON constant boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
24:
25: PROCEDURE Create_Iba_Plcmnt(
26: p_api_version_number IN NUMBER,
27: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
85:
86: -- Initialize message list if p_init_msg_list is set to TRUE.
87: IF FND_API.to_Boolean( p_init_msg_list )
88: THEN
89: FND_MSG_PUB.initialize;
90: END IF;
91:
92: -- Debug Message
93: IF (AMS_DEBUG_HIGH_ON) THEN
224: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
225: END IF;
226:
227: -- Standard call to get message count and if count is 1, get message info.
228: FND_MSG_PUB.Count_And_Get
229: (p_count => x_msg_count,
230: p_data => x_msg_data
231: );
232: EXCEPTION
238: WHEN FND_API.G_EXC_ERROR THEN
239: ROLLBACK TO CREATE_Iba_Plcmnt_PVT;
240: x_return_status := FND_API.G_RET_STS_ERROR;
241: -- Standard call to get message count and if count=1, get the message
242: FND_MSG_PUB.Count_And_Get (
243: p_encoded => FND_API.G_FALSE,
244: p_count => x_msg_count,
245: p_data => x_msg_data
246: );
248: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
249: ROLLBACK TO CREATE_Iba_Plcmnt_PVT;
250: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
251: -- Standard call to get message count and if count=1, get the message
252: FND_MSG_PUB.Count_And_Get (
253: p_encoded => FND_API.G_FALSE,
254: p_count => x_msg_count,
255: p_data => x_msg_data
256: );
257:
258: WHEN OTHERS THEN
259: ROLLBACK TO CREATE_Iba_Plcmnt_PVT;
260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
261: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
262: THEN
263: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
264: END IF;
265: -- Standard call to get message count and if count=1, get the message
259: ROLLBACK TO CREATE_Iba_Plcmnt_PVT;
260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
261: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
262: THEN
263: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
264: END IF;
265: -- Standard call to get message count and if count=1, get the message
266: FND_MSG_PUB.Count_And_Get (
267: p_encoded => FND_API.G_FALSE,
262: THEN
263: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
264: END IF;
265: -- Standard call to get message count and if count=1, get the message
266: FND_MSG_PUB.Count_And_Get (
267: p_encoded => FND_API.G_FALSE,
268: p_count => x_msg_count,
269: p_data => x_msg_data
270: );
316:
317: -- Initialize message list if p_init_msg_list is set to TRUE.
318: IF FND_API.to_Boolean( p_init_msg_list )
319: THEN
320: FND_MSG_PUB.initialize;
321: END IF;
322:
323: -- Debug Message
324: IF (AMS_DEBUG_HIGH_ON) THEN
396: END IF;
397:
398:
399: -- Debug Message
400: -- 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;
401:
402: -- Invoke table handler(AMS_IBA_PL_PLACEMENTS_B_PKG.Update_Row)
403: AMS_IBA_PL_PLACEMENTS_B_PKG.Update_Row(
404: p_placement_id => p_iba_plcmnt_rec.placement_id,
442: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
443: END IF;
444:
445: -- Standard call to get message count and if count is 1, get message info.
446: FND_MSG_PUB.Count_And_Get
447: (p_count => x_msg_count,
448: p_data => x_msg_data
449: );
450: EXCEPTION
456: WHEN FND_API.G_EXC_ERROR THEN
457: ROLLBACK TO UPDATE_Iba_Plcmnt_PVT;
458: x_return_status := FND_API.G_RET_STS_ERROR;
459: -- Standard call to get message count and if count=1, get the message
460: FND_MSG_PUB.Count_And_Get (
461: p_encoded => FND_API.G_FALSE,
462: p_count => x_msg_count,
463: p_data => x_msg_data
464: );
466: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
467: ROLLBACK TO UPDATE_Iba_Plcmnt_PVT;
468: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
469: -- Standard call to get message count and if count=1, get the message
470: FND_MSG_PUB.Count_And_Get (
471: p_encoded => FND_API.G_FALSE,
472: p_count => x_msg_count,
473: p_data => x_msg_data
474: );
475:
476: WHEN OTHERS THEN
477: ROLLBACK TO UPDATE_Iba_Plcmnt_PVT;
478: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
479: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
480: THEN
481: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
482: END IF;
483: -- Standard call to get message count and if count=1, get the message
477: ROLLBACK TO UPDATE_Iba_Plcmnt_PVT;
478: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
479: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
480: THEN
481: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
482: END IF;
483: -- Standard call to get message count and if count=1, get the message
484: FND_MSG_PUB.Count_And_Get (
485: p_encoded => FND_API.G_FALSE,
480: THEN
481: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
482: END IF;
483: -- Standard call to get message count and if count=1, get the message
484: FND_MSG_PUB.Count_And_Get (
485: p_encoded => FND_API.G_FALSE,
486: p_count => x_msg_count,
487: p_data => x_msg_data
488: );
521:
522: -- Initialize message list if p_init_msg_list is set to TRUE.
523: IF FND_API.to_Boolean( p_init_msg_list )
524: THEN
525: FND_MSG_PUB.initialize;
526: END IF;
527:
528: -- Debug Message
529: IF (AMS_DEBUG_HIGH_ON) THEN
564: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
565: END IF;
566:
567: -- Standard call to get message count and if count is 1, get message info.
568: FND_MSG_PUB.Count_And_Get
569: (p_count => x_msg_count,
570: p_data => x_msg_data
571: );
572: EXCEPTION
578: WHEN FND_API.G_EXC_ERROR THEN
579: ROLLBACK TO DELETE_Iba_Plcmnt_PVT;
580: x_return_status := FND_API.G_RET_STS_ERROR;
581: -- Standard call to get message count and if count=1, get the message
582: FND_MSG_PUB.Count_And_Get (
583: p_encoded => FND_API.G_FALSE,
584: p_count => x_msg_count,
585: p_data => x_msg_data
586: );
588: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
589: ROLLBACK TO DELETE_Iba_Plcmnt_PVT;
590: x_return_status := FND_API.G_RET_STS_UNEXP_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: );
597:
598: WHEN OTHERS THEN
599: ROLLBACK TO DELETE_Iba_Plcmnt_PVT;
600: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
601: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
602: THEN
603: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
604: END IF;
605: -- Standard call to get message count and if count=1, get the message
599: ROLLBACK TO DELETE_Iba_Plcmnt_PVT;
600: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
601: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
602: THEN
603: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
604: END IF;
605: -- Standard call to get message count and if count=1, get the message
606: FND_MSG_PUB.Count_And_Get (
607: p_encoded => FND_API.G_FALSE,
602: THEN
603: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
604: END IF;
605: -- Standard call to get message count and if count=1, get the message
606: FND_MSG_PUB.Count_And_Get (
607: p_encoded => FND_API.G_FALSE,
608: p_count => x_msg_count,
609: p_data => x_msg_data
610: );
648:
649: -- Initialize message list if p_init_msg_list is set to TRUE.
650: IF FND_API.to_Boolean( p_init_msg_list )
651: THEN
652: FND_MSG_PUB.initialize;
653: END IF;
654:
655: -- Standard call to check for call compatibility.
656: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
680: FETCH c_Iba_Plcmnt INTO l_PLACEMENT_ID;
681:
682: IF (c_Iba_Plcmnt%NOTFOUND) THEN
683: CLOSE c_Iba_Plcmnt;
684: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
685: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
686: FND_MSG_PUB.add;
687: END IF;
688: RAISE FND_API.g_exc_error;
682: IF (c_Iba_Plcmnt%NOTFOUND) THEN
683: CLOSE c_Iba_Plcmnt;
684: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
685: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
686: FND_MSG_PUB.add;
687: END IF;
688: RAISE FND_API.g_exc_error;
689: END IF;
690:
690:
691: CLOSE c_Iba_Plcmnt;
692:
693: -------------------- finish --------------------------
694: FND_MSG_PUB.count_and_get(
695: p_encoded => FND_API.g_false,
696: p_count => x_msg_count,
697: p_data => x_msg_data);
698: IF (AMS_DEBUG_HIGH_ON) THEN
708: WHEN FND_API.G_EXC_ERROR THEN
709: ROLLBACK TO LOCK_Iba_Plcmnt_PVT;
710: x_return_status := FND_API.G_RET_STS_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: );
718: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
719: ROLLBACK TO LOCK_Iba_Plcmnt_PVT;
720: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
721: -- Standard call to get message count and if count=1, get the message
722: FND_MSG_PUB.Count_And_Get (
723: p_encoded => FND_API.G_FALSE,
724: p_count => x_msg_count,
725: p_data => x_msg_data
726: );
727:
728: WHEN OTHERS THEN
729: ROLLBACK TO LOCK_Iba_Plcmnt_PVT;
730: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
731: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
732: THEN
733: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
734: END IF;
735: -- Standard call to get message count and if count=1, get the message
729: ROLLBACK TO LOCK_Iba_Plcmnt_PVT;
730: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
731: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
732: THEN
733: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
734: END IF;
735: -- Standard call to get message count and if count=1, get the message
736: FND_MSG_PUB.Count_And_Get (
737: p_encoded => FND_API.G_FALSE,
732: THEN
733: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
734: END IF;
735: -- Standard call to get message count and if count=1, get the message
736: FND_MSG_PUB.Count_And_Get (
737: p_encoded => FND_API.G_FALSE,
738: p_count => x_msg_count,
739: p_data => x_msg_data
740: );
847:
848: --check if the combination of site, page, location and parameters are unique
849: l_is_unique := check_unique_placement(p_iba_plcmnt_rec,p_validation_mode,l_situation);
850: IF l_is_unique = FND_API.g_false THEN
851: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
852: THEN
853: if l_situation = 1 then -- placement is for istore and shopping_cart page
854: FND_MESSAGE.set_name('AMS','AMS_PLCE_PLCMNT_SHCRT_DUP');
855: elsif l_situation = 2 then -- placement is for istore and non shopping cart page
856: FND_MESSAGE.set_name('AMS','AMS_PLCE_PLCMNT_ISTORE_DUP');
857: else -- placement is for non istore site
858: FND_MESSAGE.set_name('AMS','AMS_PLCE_PLCMNT_DUP');
859: end if;
860: FND_MSG_PUB.add;
861: END IF;
862: x_return_status := FND_API.g_ret_sts_error;
863: RAISE FND_API.g_exc_error;
864: -- AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_PLACEMENT_NAME_DUPLICATE');
881: );
882: END IF;
883:
884: IF l_valid_flag = FND_API.g_false THEN
885: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
886: THEN
887: FND_MESSAGE.set_name('AMS','AMS_PLCE_PLCMNT_NAME_DUP');
888: FND_MSG_PUB.add;
889: END IF;
884: IF l_valid_flag = FND_API.g_false THEN
885: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
886: THEN
887: FND_MESSAGE.set_name('AMS','AMS_PLCE_PLCMNT_NAME_DUP');
888: FND_MSG_PUB.add;
889: END IF;
890: x_return_status := FND_API.g_ret_sts_error;
891: RAISE FND_API.g_exc_error;
892: -- AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_PLACEMENT_NAME_DUPLICATE');
1299:
1300: -- Initialize message list if p_init_msg_list is set to TRUE.
1301: IF FND_API.to_Boolean( p_init_msg_list )
1302: THEN
1303: FND_MSG_PUB.initialize;
1304: END IF;
1305: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN
1306: IF (AMS_DEBUG_HIGH_ON) THEN
1307:
1363: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'end');
1364: END IF;
1365:
1366: -- Standard call to get message count and if count is 1, get message info.
1367: FND_MSG_PUB.Count_And_Get
1368: (p_count => x_msg_count,
1369: p_data => x_msg_data
1370: );
1371: EXCEPTION
1377: WHEN FND_API.G_EXC_ERROR THEN
1378: ROLLBACK TO VALIDATE_Iba_Plcmnt_;
1379: x_return_status := FND_API.G_RET_STS_ERROR;
1380: -- Standard call to get message count and if count=1, get the message
1381: FND_MSG_PUB.Count_And_Get (
1382: p_encoded => FND_API.G_FALSE,
1383: p_count => x_msg_count,
1384: p_data => x_msg_data
1385: );
1391: AMS_UTILITY_PVT.debug_message('In Validate - unexpected err: validation_mode= ' || p_validation_mode);
1392: END IF;
1393: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1394: -- Standard call to get message count and if count=1, get the message
1395: FND_MSG_PUB.Count_And_Get (
1396: p_encoded => FND_API.G_FALSE,
1397: p_count => x_msg_count,
1398: p_data => x_msg_data
1399: );
1404:
1405: AMS_UTILITY_PVT.debug_message('In Validate - others err: validation_mode= ' || p_validation_mode);
1406: END IF;
1407: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1408: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1409: THEN
1410: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1411: END IF;
1412: -- Standard call to get message count and if count=1, get the message
1406: END IF;
1407: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1408: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1409: THEN
1410: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1411: END IF;
1412: -- Standard call to get message count and if count=1, get the message
1413: FND_MSG_PUB.Count_And_Get (
1414: p_encoded => FND_API.G_FALSE,
1409: THEN
1410: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1411: END IF;
1412: -- Standard call to get message count and if count=1, get the message
1413: FND_MSG_PUB.Count_And_Get (
1414: p_encoded => FND_API.G_FALSE,
1415: p_count => x_msg_count,
1416: p_data => x_msg_data
1417: );
1430: BEGIN
1431: -- Initialize message list if p_init_msg_list is set to TRUE.
1432: IF FND_API.to_Boolean( p_init_msg_list )
1433: THEN
1434: FND_MSG_PUB.initialize;
1435: END IF;
1436:
1437: -- Initialize API return status to SUCCESS
1438: x_return_status := FND_API.G_RET_STS_SUCCESS;
1447:
1448: AMS_UTILITY_PVT.debug_message('Private API: Validate_dm_model_rec');
1449: END IF;
1450: -- Standard call to get message count and if count is 1, get message info.
1451: FND_MSG_PUB.Count_And_Get
1452: (p_count => x_msg_count,
1453: p_data => x_msg_data
1454: );
1455: END Validate_iba_plcmnt_Rec;