DBA Data[Home] [Help]

APPS.AMS_DM_SCORE_PVT dependencies on FND_API

Line 250: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

246:
247: -- Hint: Primary key needs to be returned.
248: PROCEDURE Lock_Score(
249: p_api_version IN NUMBER,
250: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
251: x_return_status OUT NOCOPY VARCHAR2,
252: x_msg_count OUT NOCOPY NUMBER,
253: x_msg_data OUT NOCOPY VARCHAR2,
254: p_score_id IN NUMBER,

Line 286: IF FND_API.to_Boolean( p_init_msg_list )

282: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || 'start');
283: END IF;
284:
285: -- Initialize message list if p_init_msg_list is set to TRUE.
286: IF FND_API.to_Boolean( p_init_msg_list )
287: THEN
288: FND_MSG_PUB.initialize;
289: END IF;
290:

Line 292: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

288: FND_MSG_PUB.initialize;
289: END IF;
290:
291: -- Standard call to check for call compatibility.
292: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
293: p_api_version,
294: l_api_name,
295: G_PKG_NAME)
296: THEN

Line 297: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

293: p_api_version,
294: l_api_name,
295: G_PKG_NAME)
296: THEN
297: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
298: END IF;
299:
300:
301: -- Initialize API return status to SUCCESS

Line 302: x_return_status := FND_API.G_RET_STS_SUCCESS;

298: END IF;
299:
300:
301: -- Initialize API return status to SUCCESS
302: x_return_status := FND_API.G_RET_STS_SUCCESS;
303:
304:
305: ------------------------ lock -------------------------
306:

Line 322: RAISE FND_API.g_exc_error;

318: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
319: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
320: FND_MSG_PUB.add;
321: END IF;
322: RAISE FND_API.g_exc_error;
323: END IF;
324:
325: CLOSE c_Score_b;
326:

Line 329: p_encoded => FND_API.g_false,

325: CLOSE c_Score_b;
326:
327: -------------------- finish --------------------------
328: FND_MSG_PUB.count_and_get(
329: p_encoded => FND_API.g_false,
330: p_count => x_msg_count,
331: p_data => x_msg_data);
332: IF (AMS_DEBUG_HIGH_ON) THEN
333:

Line 339: x_return_status := FND_API.g_ret_sts_error;

335: END IF;
336: EXCEPTION
337:
338: WHEN AMS_Utility_PVT.resource_locked THEN
339: x_return_status := FND_API.g_ret_sts_error;
340: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
341: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
342: FND_MSG_PUB.add;
343: END IF;

Line 345: WHEN FND_API.G_EXC_ERROR THEN

341: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
342: FND_MSG_PUB.add;
343: END IF;
344:
345: WHEN FND_API.G_EXC_ERROR THEN
346: ROLLBACK TO LOCK_Score_PVT;
347: x_return_status := FND_API.G_RET_STS_ERROR;
348: -- Standard call to get message count and if count=1, get the message
349: FND_MSG_PUB.Count_And_Get (

Line 347: x_return_status := FND_API.G_RET_STS_ERROR;

343: END IF;
344:
345: WHEN FND_API.G_EXC_ERROR THEN
346: ROLLBACK TO LOCK_Score_PVT;
347: x_return_status := FND_API.G_RET_STS_ERROR;
348: -- Standard call to get message count and if count=1, get the message
349: FND_MSG_PUB.Count_And_Get (
350: p_encoded => FND_API.G_FALSE,
351: p_count => x_msg_count,

Line 350: p_encoded => FND_API.G_FALSE,

346: ROLLBACK TO LOCK_Score_PVT;
347: x_return_status := FND_API.G_RET_STS_ERROR;
348: -- Standard call to get message count and if count=1, get the message
349: FND_MSG_PUB.Count_And_Get (
350: p_encoded => FND_API.G_FALSE,
351: p_count => x_msg_count,
352: p_data => x_msg_data
353: );
354:

Line 355: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

351: p_count => x_msg_count,
352: p_data => x_msg_data
353: );
354:
355: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
356: ROLLBACK TO LOCK_Score_PVT;
357: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
358: -- Standard call to get message count and if count=1, get the message
359: FND_MSG_PUB.Count_And_Get (

Line 357: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

353: );
354:
355: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
356: ROLLBACK TO LOCK_Score_PVT;
357: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
358: -- Standard call to get message count and if count=1, get the message
359: FND_MSG_PUB.Count_And_Get (
360: p_encoded => FND_API.G_FALSE,
361: p_count => x_msg_count,

Line 360: p_encoded => FND_API.G_FALSE,

356: ROLLBACK TO LOCK_Score_PVT;
357: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
358: -- Standard call to get message count and if count=1, get the message
359: FND_MSG_PUB.Count_And_Get (
360: p_encoded => FND_API.G_FALSE,
361: p_count => x_msg_count,
362: p_data => x_msg_data
363: );
364:

Line 367: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

363: );
364:
365: WHEN OTHERS THEN
366: ROLLBACK TO LOCK_Score_PVT;
367: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
368: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
369: THEN
370: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
371: END IF;

Line 374: p_encoded => FND_API.G_FALSE,

370: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
371: END IF;
372: -- Standard call to get message count and if count=1, get the message
373: FND_MSG_PUB.Count_And_Get (
374: p_encoded => FND_API.G_FALSE,
375: p_count => x_msg_count,
376: p_data => x_msg_data
377: );
378: End Lock_Score;

Line 385: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

381:
382: -- Hint: Primary key needs to be returned.
383: PROCEDURE Create_Score(
384: p_api_version IN NUMBER,
385: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
386: p_commit IN VARCHAR2 := FND_API.G_FALSE,
387: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
388: x_return_status OUT NOCOPY VARCHAR2,
389: x_msg_count OUT NOCOPY NUMBER,

Line 386: p_commit IN VARCHAR2 := FND_API.G_FALSE,

382: -- Hint: Primary key needs to be returned.
383: PROCEDURE Create_Score(
384: p_api_version IN NUMBER,
385: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
386: p_commit IN VARCHAR2 := FND_API.G_FALSE,
387: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
388: x_return_status OUT NOCOPY VARCHAR2,
389: x_msg_count OUT NOCOPY NUMBER,
390: x_msg_data OUT NOCOPY VARCHAR2,

Line 387: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

383: PROCEDURE Create_Score(
384: p_api_version IN NUMBER,
385: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
386: p_commit IN VARCHAR2 := FND_API.G_FALSE,
387: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
388: x_return_status OUT NOCOPY VARCHAR2,
389: x_msg_count OUT NOCOPY NUMBER,
390: x_msg_data OUT NOCOPY VARCHAR2,
391: p_Score_rec IN Score_Rec_Type := G_MISS_Score_REC,

Line 454: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

450: -- Standard Start of API savepoint
451: SAVEPOINT CREATE_SCORE_PVT;
452:
453: -- Standard call to check for call compatibility.
454: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
455: p_api_version,
456: l_api_name,
457: G_PKG_NAME)
458: THEN

Line 459: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

455: p_api_version,
456: l_api_name,
457: G_PKG_NAME)
458: THEN
459: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
460: END IF;
461:
462: -- Initialize message list if p_init_msg_list is set to TRUE.
463: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 463: IF FND_API.to_Boolean( p_init_msg_list ) THEN

459: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
460: END IF;
461:
462: -- Initialize message list if p_init_msg_list is set to TRUE.
463: IF FND_API.to_Boolean( p_init_msg_list ) THEN
464: FND_MSG_PUB.initialize;
465: END IF;
466:
467: -- Debug Message

Line 475: x_return_status := FND_API.G_RET_STS_SUCCESS;

471: END IF;
472:
473:
474: -- Initialize API return status to SUCCESS
475: x_return_status := FND_API.G_RET_STS_SUCCESS;
476:
477: -- ******************************************************************
478: -- Validate Environment
479: -- ******************************************************************

Line 485: RAISE FND_API.G_EXC_ERROR;

481: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
482: FND_MESSAGE.Set_Name('AMS', 'USER_PROFILE_MISSING');
483: FND_MSG_PUB.ADD;
484: END IF;
485: RAISE FND_API.G_EXC_ERROR;
486: END IF;
487:
488:
489: IF l_score_rec.score_id IS NULL OR l_score_rec.score_id = FND_API.g_miss_num THEN

Line 489: IF l_score_rec.score_id IS NULL OR l_score_rec.score_id = FND_API.g_miss_num THEN

485: RAISE FND_API.G_EXC_ERROR;
486: END IF;
487:
488:
489: IF l_score_rec.score_id IS NULL OR l_score_rec.score_id = FND_API.g_miss_num THEN
490: LOOP
491: l_dummy := NULL;
492: OPEN c_id;
493: FETCH c_id INTO l_score_rec.score_id;

Line 503: IF NVL (l_score_rec.user_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND NVL (l_score_rec.status_code, FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN

499: EXIT WHEN l_dummy IS NULL;
500: END LOOP;
501: END IF;
502:
503: IF NVL (l_score_rec.user_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND NVL (l_score_rec.status_code, FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
504: OPEN c_user_status_id (G_STATUS_TYPE_SCORE, G_DEFAULT_STATUS);
505: FETCH c_user_status_id INTO l_score_rec.user_status_id;
506: CLOSE c_user_status_id;
507: ELSIF NVL (l_score_rec.user_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN

Line 507: ELSIF NVL (l_score_rec.user_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN

503: IF NVL (l_score_rec.user_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM AND NVL (l_score_rec.status_code, FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
504: OPEN c_user_status_id (G_STATUS_TYPE_SCORE, G_DEFAULT_STATUS);
505: FETCH c_user_status_id INTO l_score_rec.user_status_id;
506: CLOSE c_user_status_id;
507: ELSIF NVL (l_score_rec.user_status_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM THEN
508: OPEN c_user_status_id (G_STATUS_TYPE_SCORE, l_score_rec.status_code);
509: FETCH c_user_status_id INTO l_score_rec.user_status_id;
510: CLOSE c_user_status_id;
511: END IF;

Line 545: IF NVL (l_score_rec.row_selection_type, FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN

541: END IF;
542:
543:
544: -- default row_selection_type
545: IF NVL (l_score_rec.row_selection_type, FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR THEN
546: l_score_rec.row_selection_type := 'STANDARD';
547: END IF;
548:
549: -- Validation Section

Line 550: IF ( p_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN

546: l_score_rec.row_selection_type := 'STANDARD';
547: END IF;
548:
549: -- Validation Section
550: IF ( p_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
551: -- Debug message
552: IF (AMS_DEBUG_HIGH_ON) THEN
553:
554: AMS_UTILITY_PVT.debug_message('Private API: Validate_Score');

Line 560: p_init_msg_list => FND_API.G_FALSE,

556:
557: -- Invoke validation procedures
558: Validate_Score (
559: p_api_version => 1.0,
560: p_init_msg_list => FND_API.G_FALSE,
561: p_validation_level => p_validation_level,
562: P_Score_Rec => l_score_rec,
563: p_validation_mode => JTF_PLSQL_API.g_create,
564: x_return_status => x_return_status,

Line 570: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

566: x_msg_data => x_msg_data
567: );
568: END IF;
569:
570: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
571: RAISE FND_API.G_EXC_ERROR;
572: END IF;
573:
574:

Line 571: RAISE FND_API.G_EXC_ERROR;

567: );
568: END IF;
569:
570: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
571: RAISE FND_API.G_EXC_ERROR;
572: END IF;
573:
574:
575: -- Debug Message

Line 645: p_init_msg_list => FND_API.G_FALSE,

641: l_access_rec.delete_flag := 'N';
642:
643: AMS_Access_PVT.create_access (
644: p_api_version => 1.0,
645: p_init_msg_list => FND_API.G_FALSE,
646: p_commit => FND_API.G_FALSE,
647: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
648: x_return_status => x_return_status,
649: x_msg_count => x_msg_count,

Line 646: p_commit => FND_API.G_FALSE,

642:
643: AMS_Access_PVT.create_access (
644: p_api_version => 1.0,
645: p_init_msg_list => FND_API.G_FALSE,
646: p_commit => FND_API.G_FALSE,
647: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
648: x_return_status => x_return_status,
649: x_msg_count => x_msg_count,
650: x_msg_data => x_msg_data,

Line 647: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

643: AMS_Access_PVT.create_access (
644: p_api_version => 1.0,
645: p_init_msg_list => FND_API.G_FALSE,
646: p_commit => FND_API.G_FALSE,
647: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
648: x_return_status => x_return_status,
649: x_msg_count => x_msg_count,
650: x_msg_data => x_msg_data,
651: p_access_rec => l_access_rec,

Line 659: IF FND_API.to_Boolean( p_commit ) THEN

655: -- End of API body
656: --
657:
658: -- Standard check for p_commit
659: IF FND_API.to_Boolean( p_commit ) THEN
660: COMMIT WORK;
661: END IF;
662:
663:

Line 678: x_return_status := FND_API.g_ret_sts_error;

674: );
675: EXCEPTION
676:
677: WHEN AMS_Utility_PVT.resource_locked THEN
678: x_return_status := FND_API.g_ret_sts_error;
679: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
680: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
681: FND_MSG_PUB.add;
682: END IF;

Line 684: WHEN FND_API.G_EXC_ERROR THEN

680: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
681: FND_MSG_PUB.add;
682: END IF;
683:
684: WHEN FND_API.G_EXC_ERROR THEN
685: ROLLBACK TO CREATE_Score_PVT;
686: x_return_status := FND_API.G_RET_STS_ERROR;
687: -- Standard call to get message count and if count=1, get the message
688: FND_MSG_PUB.Count_And_Get (

Line 686: x_return_status := FND_API.G_RET_STS_ERROR;

682: END IF;
683:
684: WHEN FND_API.G_EXC_ERROR THEN
685: ROLLBACK TO CREATE_Score_PVT;
686: x_return_status := FND_API.G_RET_STS_ERROR;
687: -- Standard call to get message count and if count=1, get the message
688: FND_MSG_PUB.Count_And_Get (
689: p_encoded => FND_API.G_FALSE,
690: p_count => x_msg_count,

Line 689: p_encoded => FND_API.G_FALSE,

685: ROLLBACK TO CREATE_Score_PVT;
686: x_return_status := FND_API.G_RET_STS_ERROR;
687: -- Standard call to get message count and if count=1, get the message
688: FND_MSG_PUB.Count_And_Get (
689: p_encoded => FND_API.G_FALSE,
690: p_count => x_msg_count,
691: p_data => x_msg_data
692: );
693:

Line 694: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

690: p_count => x_msg_count,
691: p_data => x_msg_data
692: );
693:
694: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
695: ROLLBACK TO CREATE_Score_PVT;
696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
697: -- Standard call to get message count and if count=1, get the message
698: FND_MSG_PUB.Count_And_Get (

Line 696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

692: );
693:
694: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
695: ROLLBACK TO CREATE_Score_PVT;
696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
697: -- Standard call to get message count and if count=1, get the message
698: FND_MSG_PUB.Count_And_Get (
699: p_encoded => FND_API.G_FALSE,
700: p_count => x_msg_count,

Line 699: p_encoded => FND_API.G_FALSE,

695: ROLLBACK TO CREATE_Score_PVT;
696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
697: -- Standard call to get message count and if count=1, get the message
698: FND_MSG_PUB.Count_And_Get (
699: p_encoded => FND_API.G_FALSE,
700: p_count => x_msg_count,
701: p_data => x_msg_data
702: );
703:

Line 706: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

702: );
703:
704: WHEN OTHERS THEN
705: ROLLBACK TO CREATE_Score_PVT;
706: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
707: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
708: THEN
709: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
710: END IF;

Line 713: p_encoded => FND_API.G_FALSE,

709: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
710: END IF;
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: End Create_Score;

Line 722: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

718:
719:
720: PROCEDURE Update_Score(
721: p_api_version IN NUMBER,
722: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
723: p_commit IN VARCHAR2 := FND_API.G_FALSE,
724: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
725: x_return_status OUT NOCOPY VARCHAR2,
726: x_msg_count OUT NOCOPY NUMBER,

Line 723: p_commit IN VARCHAR2 := FND_API.G_FALSE,

719:
720: PROCEDURE Update_Score(
721: p_api_version IN NUMBER,
722: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
723: p_commit IN VARCHAR2 := FND_API.G_FALSE,
724: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
725: x_return_status OUT NOCOPY VARCHAR2,
726: x_msg_count OUT NOCOPY NUMBER,
727: x_msg_data OUT NOCOPY VARCHAR2,

Line 724: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

720: PROCEDURE Update_Score(
721: p_api_version IN NUMBER,
722: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
723: p_commit IN VARCHAR2 := FND_API.G_FALSE,
724: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
725: x_return_status OUT NOCOPY VARCHAR2,
726: x_msg_count OUT NOCOPY NUMBER,
727: x_msg_data OUT NOCOPY VARCHAR2,
728: p_score_rec IN Score_Rec_Type,

Line 774: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

770: -- Standard Start of API savepoint
771: SAVEPOINT UPDATE_SCORE_PVT;
772:
773: -- Standard call to check for call compatibility.
774: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
775: p_api_version,
776: l_api_name,
777: G_PKG_NAME)
778: THEN

Line 779: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

775: p_api_version,
776: l_api_name,
777: G_PKG_NAME)
778: THEN
779: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
780: END IF;
781:
782: -- Initialize message list if p_init_msg_list is set to TRUE.
783: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 783: IF FND_API.to_Boolean( p_init_msg_list ) THEN

779: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
780: END IF;
781:
782: -- Initialize message list if p_init_msg_list is set to TRUE.
783: IF FND_API.to_Boolean( p_init_msg_list ) THEN
784: FND_MSG_PUB.initialize;
785: END IF;
786:
787: -- Debug Message

Line 794: x_return_status := FND_API.G_RET_STS_SUCCESS;

790: END IF;
791:
792:
793: -- Initialize API return status to SUCCESS
794: x_return_status := FND_API.G_RET_STS_SUCCESS;
795:
796: -- Initialize run process flag to 'N'
797: l_run_started := 'N';
798:

Line 818: RAISE FND_API.G_EXC_ERROR;

814: FND_MESSAGE.Set_Name('AMS', 'API_MISSING_UPDATE_TARGET');
815: FND_MESSAGE.Set_Token ('INFO', 'dm_score', FALSE);
816: FND_MSG_PUB.Add;
817: END IF;
818: RAISE FND_API.G_EXC_ERROR;
819: END IF;
820:
821: -- Debug Message
822: IF (AMS_DEBUG_HIGH_ON) THEN

Line 836: RAISE FND_API.G_EXC_ERROR;

832: -- Check if the user is resubmitting the update request (via browser refresh button
833: -- or by pressing the "update" button again) before re-loading the record.
834: IF (p_score_rec.object_version_number <> l_reference_rec.object_version_number) THEN
835: AMS_Utility_PVT.error_message ('AMS_API_RECORD_NOT_FOUND');
836: RAISE FND_API.G_EXC_ERROR;
837: END IF;
838:
839: l_tar_score_rec.country_id := FND_PROFILE.value ('AMS_SRCGEN_USER_CITY');
840:

Line 843: l_reference_rec.status_code = G_STATUS_FAILED) AND p_score_rec.scheduled_date <> FND_API.G_MISS_DATE THEN

839: l_tar_score_rec.country_id := FND_PROFILE.value ('AMS_SRCGEN_USER_CITY');
840:
841: IF (l_reference_rec.status_code = G_DEFAULT_STATUS OR -- DRAFT
842: l_reference_rec.status_code = G_STATUS_INVALID OR
843: l_reference_rec.status_code = G_STATUS_FAILED) AND p_score_rec.scheduled_date <> FND_API.G_MISS_DATE THEN
844:
845: -- First check that Model is still AVAILABLE
846: wf_checkModelStatus ( p_score_id => l_tar_score_rec.score_id,
847: x_return_status => l_return_status,

Line 851: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN

847: x_return_status => l_return_status,
848: x_model_status => l_model_status
849: );
850:
851: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
852: -- First check that the target is enabled
853: AMS_DM_TARGET_PVT.is_target_enabled(
854: p_target_id => l_target_id,
855: x_is_enabled => l_is_enabled

Line 890: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

886: p_orig_status_id => l_reference_rec.user_status_id,
887: x_tar_score_rec => l_tar_score_rec,
888: x_return_status => x_return_status
889: );
890: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
891: x_return_status := 'W';
892: RETURN;
893: END IF;
894: -- Construct the URL that could be used to monitor the WF process. This will be returned to the caller

Line 905: RAISE FND_API.G_EXC_ERROR;

901: ELSE
902: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_MODEL_NOT_AVAILABLE',
903: p_token_name => 'STATUS',
904: p_token_value => l_model_status) ;
905: RAISE FND_API.G_EXC_ERROR;
906: END IF;
907:
908: ELSIF l_reference_rec.status_code = G_STATUS_SCHEDULED AND l_reference_rec.scheduled_date <> l_tar_score_rec.scheduled_date THEN
909:

Line 916: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN

912: x_return_status => l_return_status,
913: x_model_status => l_model_status
914: );
915:
916: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
917: -- First check that the target is enabled
918: AMS_DM_TARGET_PVT.is_target_enabled(
919: p_target_id => l_target_id,
920: x_is_enabled => l_is_enabled

Line 938: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN

934: p_scheduled_timezone_id => l_tar_score_rec.scheduled_timezone_id,
935: x_new_itemkey => l_tar_score_rec.wf_itemkey,
936: x_return_status => x_return_status
937: );
938: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
939: -- if we cannot change the schedule, may be the process has been purged,
940: -- then we go ahead and submit a new process and get a new wf_itemkey
941: IF (AMS_DEBUG_HIGH_ON) THEN
942: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' Change schedule failed' );

Line 979: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

975: p_orig_status_id => l_reference_rec.user_status_id,
976: x_tar_score_rec => l_tar_score_rec,
977: x_return_status => x_return_status
978: );
979: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
980: x_return_status := 'W';
981: RETURN;
982: END IF;
983: IF (AMS_DEBUG_HIGH_ON) THEN

Line 1000: RAISE FND_API.G_EXC_ERROR;

996: ELSE
997: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_MODEL_NOT_AVAILABLE',
998: p_token_name => 'STATUS',
999: p_token_value => l_model_status) ;
1000: RAISE FND_API.G_EXC_ERROR;
1001: END IF;
1002: ELSIF l_reference_rec.status_code = G_STATUS_COMPLETED AND l_reference_rec.scheduled_date <> l_tar_score_rec.scheduled_date THEN
1003: -- First check that Model is still AVAILABLE
1004: wf_checkModelStatus ( p_score_id => l_tar_score_rec.score_id,

Line 1009: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN

1005: x_return_status => l_return_status,
1006: x_model_status => l_model_status
1007: );
1008:
1009: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1010: -- First check that the target is enabled
1011: AMS_DM_TARGET_PVT.is_target_enabled(
1012: p_target_id => l_target_id,
1013: x_is_enabled => l_is_enabled

Line 1049: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1045: p_orig_status_id => l_reference_rec.user_status_id,
1046: x_tar_score_rec => l_tar_score_rec,
1047: x_return_status => x_return_status
1048: );
1049: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1050: x_return_status := 'W';
1051: RETURN;
1052: END IF;
1053:

Line 1065: RAISE FND_API.G_EXC_ERROR;

1061: ELSE
1062: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_MODEL_NOT_AVAILABLE',
1063: p_token_name => 'STATUS',
1064: p_token_value => l_model_status) ;
1065: RAISE FND_API.G_EXC_ERROR;
1066: END IF;
1067:
1068: ELSIF l_reference_rec.status_code = G_STATUS_PREVIEWING AND l_reference_rec.scheduled_date <> FND_API.G_MISS_DATE THEN
1069:

Line 1068: ELSIF l_reference_rec.status_code = G_STATUS_PREVIEWING AND l_reference_rec.scheduled_date <> FND_API.G_MISS_DATE THEN

1064: p_token_value => l_model_status) ;
1065: RAISE FND_API.G_EXC_ERROR;
1066: END IF;
1067:
1068: ELSIF l_reference_rec.status_code = G_STATUS_PREVIEWING AND l_reference_rec.scheduled_date <> FND_API.G_MISS_DATE THEN
1069:
1070: -- if the Scoring Run is PREVIEWING, then cancel the preview process first and set the Scoring Run status to DRAFT
1071: IF (AMS_DEBUG_HIGH_ON) THEN
1072: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' Scoring Run is currently previewing');

Line 1082: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN

1078: x_return_status => l_return_status,
1079: x_model_status => l_model_status
1080: );
1081:
1082: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1083:
1084: -- First check that the target is enabled
1085: AMS_DM_TARGET_PVT.is_target_enabled(
1086: p_target_id => l_target_id,

Line 1138: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1134: p_orig_status_id => l_user_status_id,
1135: x_tar_score_rec => l_tar_score_rec,
1136: x_return_status => x_return_status
1137: );
1138: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1139: x_return_status := 'W';
1140: RETURN;
1141: END IF;
1142: IF (AMS_DEBUG_HIGH_ON) THEN

Line 1158: RAISE FND_API.G_EXC_ERROR;

1154: ELSE
1155: AMS_Utility_PVT.Error_Message(p_message_name => 'AMS_MODEL_NOT_AVAILABLE',
1156: p_token_name => 'STATUS',
1157: p_token_value => l_model_status) ;
1158: RAISE FND_API.G_EXC_ERROR;
1159: END IF;
1160:
1161: END IF; -- flipped to scheduled
1162:

Line 1199: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1195: x_return_status => x_return_status,
1196: x_msg_count => x_msg_count,
1197: x_msg_data => x_msg_data
1198: );
1199: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1200: RAISE FND_API.G_EXC_ERROR;
1201: END IF;
1202: END IF;
1203:

Line 1200: RAISE FND_API.G_EXC_ERROR;

1196: x_msg_count => x_msg_count,
1197: x_msg_data => x_msg_data
1198: );
1199: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1200: RAISE FND_API.G_EXC_ERROR;
1201: END IF;
1202: END IF;
1203:
1204: IF ( p_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN

Line 1204: IF ( p_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN

1200: RAISE FND_API.G_EXC_ERROR;
1201: END IF;
1202: END IF;
1203:
1204: IF ( p_validation_level >= FND_API.G_VALID_LEVEL_FULL) THEN
1205: -- Debug message
1206: IF (AMS_DEBUG_HIGH_ON) THEN
1207:
1208: AMS_UTILITY_PVT.debug_message('Private API: Validate_Score');

Line 1214: p_init_msg_list => FND_API.G_FALSE,

1210:
1211: -- Invoke validation procedures
1212: Validate_Score (
1213: p_api_version => 1.0,
1214: p_init_msg_list => FND_API.G_FALSE,
1215: p_validation_level => p_validation_level,
1216: p_validation_mode => JTF_PLSQL_API.g_update,
1217: p_score_rec => l_tar_score_rec,
1218: x_return_status => x_return_status,

Line 1224: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN

1220: x_msg_data => x_msg_data
1221: );
1222: END IF;
1223:
1224: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
1225: RAISE FND_API.G_EXC_ERROR;
1226: END IF;
1227:
1228: -- Debug Message

Line 1225: RAISE FND_API.G_EXC_ERROR;

1221: );
1222: END IF;
1223:
1224: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
1225: RAISE FND_API.G_EXC_ERROR;
1226: END IF;
1227:
1228: -- Debug Message
1229: IF (AMS_DEBUG_LOW_ON) THEN

Line 1285: RAISE FND_API.G_EXC_ERROR;

1281: );
1282: EXCEPTION
1283: WHEN NO_DATA_FOUND THEN
1284: AMS_Utility_PVT.error_message ('AMS_API_RECORD_NOT_FOUND');
1285: RAISE FND_API.G_EXC_ERROR;
1286: END;
1287:
1288: x_object_version_number := p_score_rec.object_version_number + 1;
1289:

Line 1295: IF FND_API.to_Boolean( p_commit ) THEN

1291: -- End of API body.
1292: --
1293:
1294: -- Standard check for p_commit
1295: IF FND_API.to_Boolean( p_commit ) THEN
1296: COMMIT WORK;
1297: END IF;
1298:
1299:

Line 1320: x_return_status := FND_API.g_ret_sts_error;

1316:
1317: EXCEPTION
1318:
1319: WHEN AMS_Utility_PVT.resource_locked THEN
1320: x_return_status := FND_API.g_ret_sts_error;
1321: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
1322: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
1323: FND_MSG_PUB.add;
1324: END IF;

Line 1326: WHEN FND_API.G_EXC_ERROR THEN

1322: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
1323: FND_MSG_PUB.add;
1324: END IF;
1325:
1326: WHEN FND_API.G_EXC_ERROR THEN
1327: ROLLBACK TO UPDATE_Score_PVT;
1328: x_return_status := FND_API.G_RET_STS_ERROR;
1329: -- Standard call to get message count and if count=1, get the message
1330: FND_MSG_PUB.Count_And_Get (

Line 1328: x_return_status := FND_API.G_RET_STS_ERROR;

1324: END IF;
1325:
1326: WHEN FND_API.G_EXC_ERROR THEN
1327: ROLLBACK TO UPDATE_Score_PVT;
1328: x_return_status := FND_API.G_RET_STS_ERROR;
1329: -- Standard call to get message count and if count=1, get the message
1330: FND_MSG_PUB.Count_And_Get (
1331: p_encoded => FND_API.G_FALSE,
1332: p_count => x_msg_count,

Line 1331: p_encoded => FND_API.G_FALSE,

1327: ROLLBACK TO UPDATE_Score_PVT;
1328: x_return_status := FND_API.G_RET_STS_ERROR;
1329: -- Standard call to get message count and if count=1, get the message
1330: FND_MSG_PUB.Count_And_Get (
1331: p_encoded => FND_API.G_FALSE,
1332: p_count => x_msg_count,
1333: p_data => x_msg_data
1334: );
1335:

Line 1336: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1332: p_count => x_msg_count,
1333: p_data => x_msg_data
1334: );
1335:
1336: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1337: ROLLBACK TO UPDATE_Score_PVT;
1338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1339: -- Standard call to get message count and if count=1, get the message
1340: FND_MSG_PUB.Count_And_Get (

Line 1338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1334: );
1335:
1336: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1337: ROLLBACK TO UPDATE_Score_PVT;
1338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1339: -- Standard call to get message count and if count=1, get the message
1340: FND_MSG_PUB.Count_And_Get (
1341: p_encoded => FND_API.G_FALSE,
1342: p_count => x_msg_count,

Line 1341: p_encoded => FND_API.G_FALSE,

1337: ROLLBACK TO UPDATE_Score_PVT;
1338: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1339: -- Standard call to get message count and if count=1, get the message
1340: FND_MSG_PUB.Count_And_Get (
1341: p_encoded => FND_API.G_FALSE,
1342: p_count => x_msg_count,
1343: p_data => x_msg_data
1344: );
1345:

Line 1348: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1344: );
1345:
1346: WHEN OTHERS THEN
1347: ROLLBACK TO UPDATE_Score_PVT;
1348: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1349: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1350: THEN
1351: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1352: END IF;

Line 1355: p_encoded => FND_API.G_FALSE,

1351: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1352: END IF;
1353: -- Standard call to get message count and if count=1, get the message
1354: FND_MSG_PUB.Count_And_Get (
1355: p_encoded => FND_API.G_FALSE,
1356: p_count => x_msg_count,
1357: p_data => x_msg_data
1358: );
1359: End Update_Score;

Line 1364: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

1360:
1361:
1362: PROCEDURE Delete_Score(
1363: p_api_version IN NUMBER,
1364: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1365: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1366: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1367: x_return_status OUT NOCOPY VARCHAR2,
1368: x_msg_count OUT NOCOPY NUMBER,

Line 1365: p_commit IN VARCHAR2 := FND_API.G_FALSE,

1361:
1362: PROCEDURE Delete_Score(
1363: p_api_version IN NUMBER,
1364: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1365: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1366: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1367: x_return_status OUT NOCOPY VARCHAR2,
1368: x_msg_count OUT NOCOPY NUMBER,
1369: x_msg_data OUT NOCOPY VARCHAR2,

Line 1366: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

1362: PROCEDURE Delete_Score(
1363: p_api_version IN NUMBER,
1364: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1365: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1366: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1367: x_return_status OUT NOCOPY VARCHAR2,
1368: x_msg_count OUT NOCOPY NUMBER,
1369: x_msg_data OUT NOCOPY VARCHAR2,
1370: p_score_id IN NUMBER,

Line 1390: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

1386: -- Standard Start of API savepoint
1387: SAVEPOINT DELETE_Score_PVT;
1388:
1389: -- Standard call to check for call compatibility.
1390: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
1391: p_api_version,
1392: l_api_name,
1393: G_PKG_NAME)
1394: THEN

Line 1395: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1391: p_api_version,
1392: l_api_name,
1393: G_PKG_NAME)
1394: THEN
1395: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1396: END IF;
1397:
1398: -- Initialize message list if p_init_msg_list is set to TRUE.
1399: IF FND_API.to_Boolean( p_init_msg_list )

Line 1399: IF FND_API.to_Boolean( p_init_msg_list )

1395: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1396: END IF;
1397:
1398: -- Initialize message list if p_init_msg_list is set to TRUE.
1399: IF FND_API.to_Boolean( p_init_msg_list )
1400: THEN
1401: FND_MSG_PUB.initialize;
1402: END IF;
1403:

Line 1412: x_return_status := FND_API.G_RET_STS_SUCCESS;

1408: END IF;
1409:
1410:
1411: -- Initialize API return status to SUCCESS
1412: x_return_status := FND_API.G_RET_STS_SUCCESS;
1413:
1414: IF (AMS_DEBUG_HIGH_ON) THEN
1415:
1416:

Line 1433: raise FND_API.G_EXC_ERROR;

1429: FND_MESSAGE.Set_Name('AMS', 'API_MISSING_DELETE_TARGET');
1430: FND_MESSAGE.Set_Token ('INFO', 'dm_scores', FALSE);
1431: FND_MSG_PUB.Add;
1432: END IF;
1433: raise FND_API.G_EXC_ERROR;
1434: END IF;
1435: -- Debug Message
1436: IF (AMS_DEBUG_HIGH_ON) THEN
1437:

Line 1451: raise FND_API.G_EXC_ERROR;

1447: FND_MESSAGE.Set_Name('AMS', 'API_RECORD_CHANGED');
1448: FND_MESSAGE.Set_Token('INFO', 'dm_score', FALSE);
1449: FND_MSG_PUB.ADD;
1450: END IF;
1451: raise FND_API.G_EXC_ERROR;
1452: END IF;
1453:
1454: IF (AMS_DEBUG_HIGH_ON) THEN
1455:

Line 1470: IF FND_API.to_Boolean( p_commit )

1466: -- End of API body
1467: --
1468:
1469: -- Standard check for p_commit
1470: IF FND_API.to_Boolean( p_commit )
1471: THEN
1472: COMMIT WORK;
1473: END IF;
1474:

Line 1491: x_return_status := FND_API.g_ret_sts_error;

1487:
1488: EXCEPTION
1489:
1490: WHEN AMS_Utility_PVT.resource_locked THEN
1491: x_return_status := FND_API.g_ret_sts_error;
1492: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
1493: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
1494: FND_MSG_PUB.add;
1495: END IF;

Line 1497: WHEN FND_API.G_EXC_ERROR THEN

1493: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
1494: FND_MSG_PUB.add;
1495: END IF;
1496:
1497: WHEN FND_API.G_EXC_ERROR THEN
1498: ROLLBACK TO DELETE_Score_PVT;
1499: x_return_status := FND_API.G_RET_STS_ERROR;
1500: -- Standard call to get message count and if count=1, get the message
1501: FND_MSG_PUB.Count_And_Get (

Line 1499: x_return_status := FND_API.G_RET_STS_ERROR;

1495: END IF;
1496:
1497: WHEN FND_API.G_EXC_ERROR THEN
1498: ROLLBACK TO DELETE_Score_PVT;
1499: x_return_status := FND_API.G_RET_STS_ERROR;
1500: -- Standard call to get message count and if count=1, get the message
1501: FND_MSG_PUB.Count_And_Get (
1502: p_encoded => FND_API.G_FALSE,
1503: p_count => x_msg_count,

Line 1502: p_encoded => FND_API.G_FALSE,

1498: ROLLBACK TO DELETE_Score_PVT;
1499: x_return_status := FND_API.G_RET_STS_ERROR;
1500: -- Standard call to get message count and if count=1, get the message
1501: FND_MSG_PUB.Count_And_Get (
1502: p_encoded => FND_API.G_FALSE,
1503: p_count => x_msg_count,
1504: p_data => x_msg_data
1505: );
1506:

Line 1507: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1503: p_count => x_msg_count,
1504: p_data => x_msg_data
1505: );
1506:
1507: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1508: ROLLBACK TO DELETE_Score_PVT;
1509: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1510: -- Standard call to get message count and if count=1, get the message
1511: FND_MSG_PUB.Count_And_Get (

Line 1509: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1505: );
1506:
1507: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1508: ROLLBACK TO DELETE_Score_PVT;
1509: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1510: -- Standard call to get message count and if count=1, get the message
1511: FND_MSG_PUB.Count_And_Get (
1512: p_encoded => FND_API.G_FALSE,
1513: p_count => x_msg_count,

Line 1512: p_encoded => FND_API.G_FALSE,

1508: ROLLBACK TO DELETE_Score_PVT;
1509: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1510: -- Standard call to get message count and if count=1, get the message
1511: FND_MSG_PUB.Count_And_Get (
1512: p_encoded => FND_API.G_FALSE,
1513: p_count => x_msg_count,
1514: p_data => x_msg_data
1515: );
1516:

Line 1519: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1515: );
1516:
1517: WHEN OTHERS THEN
1518: ROLLBACK TO DELETE_Score_PVT;
1519: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1520: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1521: THEN
1522: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1523: END IF;

Line 1526: p_encoded => FND_API.G_FALSE,

1522: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1523: END IF;
1524: -- Standard call to get message count and if count=1, get the message
1525: FND_MSG_PUB.Count_And_Get (
1526: p_encoded => FND_API.G_FALSE,
1527: p_count => x_msg_count,
1528: p_data => x_msg_data
1529: );
1530: End Delete_Score;

Line 1561: x_return_status := FND_API.g_ret_sts_success;

1557:
1558: AMS_UTILITY_PVT.debug_message('Private API:check_Score_uk_items');
1559: END IF;
1560:
1561: x_return_status := FND_API.g_ret_sts_success;
1562: IF p_validation_mode = JTF_PLSQL_API.g_create THEN
1563: l_valid_flag := AMS_Utility_PVT.check_uniqueness(
1564: 'AMS_DM_SCORES_ALL_B',
1565: 'SCORE_ID = ''' || p_score_rec.score_id ||''''

Line 1575: IF l_valid_flag = FND_API.g_false THEN

1571: ''' AND score_ID <> ' || p_score_rec.score_id
1572: );
1573: END IF;
1574:
1575: IF l_valid_flag = FND_API.g_false THEN
1576: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1577: THEN
1578: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_DUP_ID');
1579: FND_MSG_PUB.add;

Line 1581: x_return_status := FND_API.g_ret_sts_error;

1577: THEN
1578: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_DUP_ID');
1579: FND_MSG_PUB.add;
1580: END IF;
1581: x_return_status := FND_API.g_ret_sts_error;
1582: RETURN;
1583: END IF;
1584:
1585: --Validate unique score_name

Line 1601: x_return_status := FND_API.g_ret_sts_error;

1597: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
1598: FND_MESSAGE.set_name('AMS', 'AMS_SCORE_DUPLICATE_NAME');
1599: FND_MSG_PUB.add;
1600: END IF;
1601: x_return_status := FND_API.g_ret_sts_error;
1602: RETURN;
1603: END IF;
1604:
1605: END check_Score_uk_items;

Line 1619: x_return_status := FND_API.g_ret_sts_success;

1615: IF (AMS_DEBUG_HIGH_ON) THEN
1616:
1617: AMS_UTILITY_PVT.debug_message('Private API:check_Score_req_items');
1618: END IF;
1619: x_return_status := FND_API.g_ret_sts_success;
1620: IF (AMS_DEBUG_HIGH_ON) THEN
1621:
1622: AMS_UTILITY_PVT.debug_message('Private API:mode ' || p_validation_mode);
1623: END IF;

Line 1630: IF p_score_rec.model_id = FND_API.g_miss_num

1626: IF (AMS_DEBUG_HIGH_ON) THEN
1627:
1628: AMS_UTILITY_PVT.debug_message('Private API: id ' || p_score_rec.score_id);
1629: END IF;
1630: IF p_score_rec.model_id = FND_API.g_miss_num
1631: OR p_score_rec.model_id IS NULL THEN
1632: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1633: THEN
1634: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_MOD_ID');

Line 1637: x_return_status := FND_API.g_ret_sts_error;

1633: THEN
1634: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_MOD_ID');
1635: FND_MSG_PUB.add;
1636: END IF;
1637: x_return_status := FND_API.g_ret_sts_error;
1638: END IF;
1639:
1640:
1641: IF p_score_rec.user_status_id = FND_API.g_miss_num

Line 1641: IF p_score_rec.user_status_id = FND_API.g_miss_num

1637: x_return_status := FND_API.g_ret_sts_error;
1638: END IF;
1639:
1640:
1641: IF p_score_rec.user_status_id = FND_API.g_miss_num
1642: OR p_score_rec.user_status_id IS NULL THEN
1643: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1644: THEN
1645: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_USR_STAT_ID');

Line 1648: x_return_status := FND_API.g_ret_sts_error;

1644: THEN
1645: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_USR_STAT_ID');
1646: FND_MSG_PUB.add;
1647: END IF;
1648: x_return_status := FND_API.g_ret_sts_error;
1649: END IF;
1650:
1651: IF p_score_rec.owner_user_id = FND_API.g_miss_num
1652: OR p_score_rec.owner_user_id IS NULL THEN

Line 1651: IF p_score_rec.owner_user_id = FND_API.g_miss_num

1647: END IF;
1648: x_return_status := FND_API.g_ret_sts_error;
1649: END IF;
1650:
1651: IF p_score_rec.owner_user_id = FND_API.g_miss_num
1652: OR p_score_rec.owner_user_id IS NULL THEN
1653: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1654: THEN
1655: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_OWNER_USR_ID');

Line 1658: x_return_status := FND_API.g_ret_sts_error;

1654: THEN
1655: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_OWNER_USR_ID');
1656: FND_MSG_PUB.add;
1657: END IF;
1658: x_return_status := FND_API.g_ret_sts_error;
1659: END IF;
1660:
1661: IF p_score_rec.score_name = FND_API.g_miss_char
1662: OR p_score_rec.score_name IS NULL THEN

Line 1661: IF p_score_rec.score_name = FND_API.g_miss_char

1657: END IF;
1658: x_return_status := FND_API.g_ret_sts_error;
1659: END IF;
1660:
1661: IF p_score_rec.score_name = FND_API.g_miss_char
1662: OR p_score_rec.score_name IS NULL THEN
1663: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1664: THEN
1665: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_NAME');

Line 1668: x_return_status := FND_API.g_ret_sts_error;

1664: THEN
1665: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_NAME');
1666: FND_MSG_PUB.add;
1667: END IF;
1668: x_return_status := FND_API.g_ret_sts_error;
1669: END IF;
1670:
1671: ELSE -- update operation
1672: IF p_score_rec.score_id IS NULL THEN

Line 1678: x_return_status := FND_API.g_ret_sts_error;

1674: THEN
1675: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_ID');
1676: FND_MSG_PUB.add;
1677: END IF;
1678: x_return_status := FND_API.g_ret_sts_error;
1679: END IF;
1680:
1681: IF p_score_rec.object_version_number IS NULL OR p_score_rec.object_version_number = FND_API.G_MISS_NUM THEN
1682: AMS_Utility_PVT.error_message ('AMS_SCORE_NO_OBJECT_VERSION');

Line 1681: IF p_score_rec.object_version_number IS NULL OR p_score_rec.object_version_number = FND_API.G_MISS_NUM THEN

1677: END IF;
1678: x_return_status := FND_API.g_ret_sts_error;
1679: END IF;
1680:
1681: IF p_score_rec.object_version_number IS NULL OR p_score_rec.object_version_number = FND_API.G_MISS_NUM THEN
1682: AMS_Utility_PVT.error_message ('AMS_SCORE_NO_OBJECT_VERSION');
1683: x_return_status := FND_API.g_ret_sts_error;
1684: END IF;
1685:

Line 1683: x_return_status := FND_API.g_ret_sts_error;

1679: END IF;
1680:
1681: IF p_score_rec.object_version_number IS NULL OR p_score_rec.object_version_number = FND_API.G_MISS_NUM THEN
1682: AMS_Utility_PVT.error_message ('AMS_SCORE_NO_OBJECT_VERSION');
1683: x_return_status := FND_API.g_ret_sts_error;
1684: END IF;
1685:
1686: IF p_score_rec.model_id IS NULL THEN
1687: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)

Line 1692: x_return_status := FND_API.g_ret_sts_error;

1688: THEN
1689: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_MOD_ID');
1690: FND_MSG_PUB.add;
1691: END IF;
1692: x_return_status := FND_API.g_ret_sts_error;
1693: END IF;
1694:
1695:
1696: IF p_score_rec.user_status_id IS NULL THEN

Line 1702: x_return_status := FND_API.g_ret_sts_error;

1698: THEN
1699: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_USR_STAT_ID');
1700: FND_MSG_PUB.add;
1701: END IF;
1702: x_return_status := FND_API.g_ret_sts_error;
1703: END IF;
1704:
1705: IF p_score_rec.owner_user_id IS NULL THEN
1706: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)

Line 1711: x_return_status := FND_API.g_ret_sts_error;

1707: THEN
1708: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_NO_OWNER_USR_ID');
1709: FND_MSG_PUB.add;
1710: END IF;
1711: x_return_status := FND_API.g_ret_sts_error;
1712: END IF;
1713: END IF;
1714: END check_Score_req_items;
1715:

Line 1726: x_return_status := FND_API.g_ret_sts_success;

1722: IF (AMS_DEBUG_HIGH_ON) THEN
1723:
1724: AMS_UTILITY_PVT.debug_message('Private API:check_Score_fk_items');
1725: END IF;
1726: x_return_status := FND_API.g_ret_sts_success;
1727:
1728: --------------------model_id---------------------------
1729: IF p_score_rec.model_id <> FND_API.g_miss_num THEN
1730: IF AMS_Utility_PVT.check_fk_exists(

Line 1729: IF p_score_rec.model_id <> FND_API.g_miss_num THEN

1725: END IF;
1726: x_return_status := FND_API.g_ret_sts_success;
1727:
1728: --------------------model_id---------------------------
1729: IF p_score_rec.model_id <> FND_API.g_miss_num THEN
1730: IF AMS_Utility_PVT.check_fk_exists(
1731: 'AMS_DM_MODELS_ALL_B',
1732: 'MODEL_ID',
1733: p_score_rec.model_id

Line 1734: ) = FND_API.g_false

1730: IF AMS_Utility_PVT.check_fk_exists(
1731: 'AMS_DM_MODELS_ALL_B',
1732: 'MODEL_ID',
1733: p_score_rec.model_id
1734: ) = FND_API.g_false
1735: THEN
1736: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1737: THEN
1738: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_BAD_MOD_ID');

Line 1741: x_return_status := FND_API.g_ret_sts_error;

1737: THEN
1738: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_BAD_MOD_ID');
1739: FND_MSG_PUB.add;
1740: END IF;
1741: x_return_status := FND_API.g_ret_sts_error;
1742: END IF;
1743: END IF;
1744:
1745: --------------------- user_status_id ------------------------

Line 1746: IF p_score_rec.user_status_id <> FND_API.g_miss_num THEN

1742: END IF;
1743: END IF;
1744:
1745: --------------------- user_status_id ------------------------
1746: IF p_score_rec.user_status_id <> FND_API.g_miss_num THEN
1747: IF AMS_Utility_PVT.check_fk_exists(
1748: 'AMS_USER_STATUSES_B',
1749: 'USER_STATUS_ID',
1750: p_score_rec.user_status_id

Line 1751: ) = FND_API.g_false

1747: IF AMS_Utility_PVT.check_fk_exists(
1748: 'AMS_USER_STATUSES_B',
1749: 'USER_STATUS_ID',
1750: p_score_rec.user_status_id
1751: ) = FND_API.g_false
1752: THEN
1753: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1754: THEN
1755: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_BAD_USR_STAT_ID');

Line 1758: x_return_status := FND_API.g_ret_sts_error;

1754: THEN
1755: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_BAD_USR_STAT_ID');
1756: FND_MSG_PUB.add;
1757: END IF;
1758: x_return_status := FND_API.g_ret_sts_error;
1759: END IF;
1760: END IF;
1761: END check_Score_FK_items;
1762:

Line 1773: x_return_status := FND_API.g_ret_sts_success;

1769: IF (AMS_DEBUG_HIGH_ON) THEN
1770:
1771: AMS_UTILITY_PVT.debug_message('Private API:check_Score_lookup_items');
1772: END IF;
1773: x_return_status := FND_API.g_ret_sts_success;
1774:
1775: ------------------ status_code ----------------------------------
1776: IF p_score_rec.status_code <> FND_API.g_miss_char THEN
1777: IF AMS_Utility_PVT.check_lookup_exists(

Line 1776: IF p_score_rec.status_code <> FND_API.g_miss_char THEN

1772: END IF;
1773: x_return_status := FND_API.g_ret_sts_success;
1774:
1775: ------------------ status_code ----------------------------------
1776: IF p_score_rec.status_code <> FND_API.g_miss_char THEN
1777: IF AMS_Utility_PVT.check_lookup_exists(
1778: p_lookup_type => G_STATUS_TYPE_SCORE,
1779: p_lookup_code => p_score_rec.status_code
1780: ) = FND_API.g_false

Line 1780: ) = FND_API.g_false

1776: IF p_score_rec.status_code <> FND_API.g_miss_char THEN
1777: IF AMS_Utility_PVT.check_lookup_exists(
1778: p_lookup_type => G_STATUS_TYPE_SCORE,
1779: p_lookup_code => p_score_rec.status_code
1780: ) = FND_API.g_false
1781: THEN
1782: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
1783: THEN
1784: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_BAD_STAT_CODE');

Line 1788: x_return_status := FND_API.g_ret_sts_error;

1784: FND_MESSAGE.set_name('AMS', 'AMS_DM_SCORE_BAD_STAT_CODE');
1785: FND_MSG_PUB.add;
1786: END IF;
1787:
1788: x_return_status := FND_API.g_ret_sts_error;
1789: END IF;
1790: END IF;
1791:
1792: END check_dm_mdl_scr_Lookup_items;

Line 1808: IF x_return_status <> FND_API.g_ret_sts_success THEN

1804: check_Score_uk_items(
1805: p_score_rec => p_score_rec,
1806: p_validation_mode => p_validation_mode,
1807: x_return_status => x_return_status);
1808: IF x_return_status <> FND_API.g_ret_sts_success THEN
1809: RETURN;
1810: END IF;
1811:
1812: -- Check Items Required/NOT NULL API calls

Line 1818: IF x_return_status <> FND_API.g_ret_sts_success THEN

1814: check_Score_req_items(
1815: p_score_rec => p_score_rec,
1816: p_validation_mode => p_validation_mode,
1817: x_return_status => x_return_status);
1818: IF x_return_status <> FND_API.g_ret_sts_success THEN
1819: RETURN;
1820: END IF;
1821: -- Check Items Foreign Keys API calls
1822:

Line 1826: IF x_return_status <> FND_API.g_ret_sts_success THEN

1822:
1823: check_Score_FK_items(
1824: p_score_rec => p_score_rec,
1825: x_return_status => x_return_status);
1826: IF x_return_status <> FND_API.g_ret_sts_success THEN
1827: RETURN;
1828: END IF;
1829:
1830: -- Check Items Lookups

Line 1835: IF x_return_status <> FND_API.g_ret_sts_success THEN

1831:
1832: check_dm_mdl_scr_Lookup_items(
1833: p_score_rec => p_score_rec,
1834: x_return_status => x_return_status);
1835: IF x_return_status <> FND_API.g_ret_sts_success THEN
1836: RETURN;
1837: END IF;
1838:
1839: -- Start add rosharma 28-Nov-2002

Line 1842: p_score_rec.min_records <> FND_API.g_miss_num THEN

1838:
1839: -- Start add rosharma 28-Nov-2002
1840: -- Min records should be number and more than 0, if entered
1841: IF p_score_rec.min_records IS NOT NULL AND
1842: p_score_rec.min_records <> FND_API.g_miss_num THEN
1843: DECLARE
1844: l_min_rec NUMBER;
1845: BEGIN
1846: l_min_rec := TO_NUMBER (p_score_rec.min_records);

Line 1849: x_return_status := FND_API.G_RET_STS_ERROR;

1845: BEGIN
1846: l_min_rec := TO_NUMBER (p_score_rec.min_records);
1847: IF l_min_rec < 0 THEN
1848: AMS_Utility_PVT.error_message ('AMS_DM_NEGATIVE_NUMBER' , 'FIELD' , 'MIN_RECORDS');
1849: x_return_status := FND_API.G_RET_STS_ERROR;
1850: RETURN;
1851: END IF;
1852: EXCEPTION
1853: WHEN VALUE_ERROR THEN

Line 1855: x_return_status := FND_API.G_RET_STS_ERROR;

1851: END IF;
1852: EXCEPTION
1853: WHEN VALUE_ERROR THEN
1854: AMS_Utility_PVT.error_message ('AMS_DM_NOT_NUMBER' , 'FIELD' , 'MIN_RECORDS');
1855: x_return_status := FND_API.G_RET_STS_ERROR;
1856: RETURN;
1857: END;
1858: END IF;
1859:

Line 1862: p_score_rec.max_records <> FND_API.g_miss_num THEN

1858: END IF;
1859:
1860: -- Max records should be number and more than 0, if entered
1861: IF p_score_rec.max_records IS NOT NULL AND
1862: p_score_rec.max_records <> FND_API.g_miss_num THEN
1863: DECLARE
1864: l_max_rec NUMBER;
1865: BEGIN
1866: l_max_rec := TO_NUMBER (p_score_rec.max_records);

Line 1869: x_return_status := FND_API.G_RET_STS_ERROR;

1865: BEGIN
1866: l_max_rec := TO_NUMBER (p_score_rec.max_records);
1867: IF l_max_rec < 0 THEN
1868: AMS_Utility_PVT.error_message ('AMS_DM_NEGATIVE_NUMBER' , 'FIELD' , 'MAX_RECORDS');
1869: x_return_status := FND_API.G_RET_STS_ERROR;
1870: RETURN;
1871: END IF;
1872: EXCEPTION
1873: WHEN VALUE_ERROR THEN

Line 1875: x_return_status := FND_API.G_RET_STS_ERROR;

1871: END IF;
1872: EXCEPTION
1873: WHEN VALUE_ERROR THEN
1874: AMS_Utility_PVT.error_message ('AMS_DM_NOT_NUMBER' , 'FIELD' , 'MAX_RECORDS');
1875: x_return_status := FND_API.G_RET_STS_ERROR;
1876: RETURN;
1877: END;
1878: END IF;
1879: -- End add rosharma 28-Nov-2002

Line 1905: IF p_score_rec.score_id = FND_API.g_miss_num THEN

1901: FETCH c_complete INTO l_score_rec;
1902: CLOSE c_complete;
1903:
1904: -- score_id
1905: IF p_score_rec.score_id = FND_API.g_miss_num THEN
1906: x_complete_rec.score_id := l_score_rec.score_id;
1907: END IF;
1908:
1909: -- org_id

Line 1910: IF p_score_rec.org_id = FND_API.g_miss_num THEN

1906: x_complete_rec.score_id := l_score_rec.score_id;
1907: END IF;
1908:
1909: -- org_id
1910: IF p_score_rec.org_id = FND_API.g_miss_num THEN
1911: x_complete_rec.org_id := l_score_rec.org_id;
1912: END IF;
1913:
1914: -- model_id

Line 1915: IF p_score_rec.model_id = FND_API.g_miss_num THEN

1911: x_complete_rec.org_id := l_score_rec.org_id;
1912: END IF;
1913:
1914: -- model_id
1915: IF p_score_rec.model_id = FND_API.g_miss_num THEN
1916: x_complete_rec.model_id := l_score_rec.model_id;
1917: END IF;
1918:
1919: -- user_status_id

Line 1920: IF p_score_rec.user_status_id = FND_API.g_miss_num THEN

1916: x_complete_rec.model_id := l_score_rec.model_id;
1917: END IF;
1918:
1919: -- user_status_id
1920: IF p_score_rec.user_status_id = FND_API.g_miss_num THEN
1921: x_complete_rec.user_status_id := l_score_rec.user_status_id;
1922: END IF;
1923:
1924: -- status_code

Line 1925: IF p_score_rec.status_code = FND_API.g_miss_char THEN

1921: x_complete_rec.user_status_id := l_score_rec.user_status_id;
1922: END IF;
1923:
1924: -- status_code
1925: IF p_score_rec.status_code = FND_API.g_miss_char THEN
1926: x_complete_rec.status_code := l_score_rec.status_code;
1927: END IF;
1928:
1929: -- status_date

Line 1930: IF p_score_rec.status_date = FND_API.g_miss_date THEN

1926: x_complete_rec.status_code := l_score_rec.status_code;
1927: END IF;
1928:
1929: -- status_date
1930: IF p_score_rec.status_date = FND_API.g_miss_date THEN
1931: x_complete_rec.status_date := l_score_rec.status_date;
1932: END IF;
1933:
1934: -- owner_user_id

Line 1935: IF p_score_rec.owner_user_id = FND_API.g_miss_num THEN

1931: x_complete_rec.status_date := l_score_rec.status_date;
1932: END IF;
1933:
1934: -- owner_user_id
1935: IF p_score_rec.owner_user_id = FND_API.g_miss_num THEN
1936: x_complete_rec.owner_user_id := l_score_rec.owner_user_id;
1937: END IF;
1938:
1939: -- results_flag

Line 1940: IF p_score_rec.results_flag = FND_API.g_miss_char THEN

1936: x_complete_rec.owner_user_id := l_score_rec.owner_user_id;
1937: END IF;
1938:
1939: -- results_flag
1940: IF p_score_rec.results_flag = FND_API.g_miss_char THEN
1941: x_complete_rec.results_flag := l_score_rec.results_flag;
1942: END IF;
1943:
1944: -- logs_flag

Line 1945: IF p_score_rec.logs_flag = FND_API.g_miss_char THEN

1941: x_complete_rec.results_flag := l_score_rec.results_flag;
1942: END IF;
1943:
1944: -- logs_flag
1945: IF p_score_rec.logs_flag = FND_API.g_miss_char THEN
1946: x_complete_rec.logs_flag := l_score_rec.logs_flag;
1947: END IF;
1948:
1949: -- scheduled_date

Line 1950: IF p_score_rec.scheduled_date = FND_API.g_miss_date THEN

1946: x_complete_rec.logs_flag := l_score_rec.logs_flag;
1947: END IF;
1948:
1949: -- scheduled_date
1950: IF p_score_rec.scheduled_date = FND_API.g_miss_date THEN
1951: x_complete_rec.scheduled_date := l_score_rec.scheduled_date;
1952: END IF;
1953:
1954: -- scheduled_timezone_id

Line 1955: IF p_score_rec.scheduled_timezone_id = FND_API.g_miss_num THEN

1951: x_complete_rec.scheduled_date := l_score_rec.scheduled_date;
1952: END IF;
1953:
1954: -- scheduled_timezone_id
1955: IF p_score_rec.scheduled_timezone_id = FND_API.g_miss_num THEN
1956: x_complete_rec.scheduled_timezone_id := l_score_rec.scheduled_timezone_id;
1957: END IF;
1958:
1959: -- score_date

Line 1960: IF p_score_rec.score_date = FND_API.g_miss_date THEN

1956: x_complete_rec.scheduled_timezone_id := l_score_rec.scheduled_timezone_id;
1957: END IF;
1958:
1959: -- score_date
1960: IF p_score_rec.score_date = FND_API.g_miss_date THEN
1961: x_complete_rec.score_date := l_score_rec.score_date;
1962: END IF;
1963:
1964: -- expiration_date

Line 1965: IF p_score_rec.expiration_date = FND_API.g_miss_date THEN

1961: x_complete_rec.score_date := l_score_rec.score_date;
1962: END IF;
1963:
1964: -- expiration_date
1965: IF p_score_rec.expiration_date = FND_API.g_miss_date THEN
1966: x_complete_rec.expiration_date := l_score_rec.expiration_date;
1967: END IF;
1968:
1969: -- total_records

Line 1970: IF p_score_rec.total_records = FND_API.g_miss_num THEN

1966: x_complete_rec.expiration_date := l_score_rec.expiration_date;
1967: END IF;
1968:
1969: -- total_records
1970: IF p_score_rec.total_records = FND_API.g_miss_num THEN
1971: x_complete_rec.total_records := l_score_rec.total_records;
1972: END IF;
1973:
1974: -- total_positives

Line 1975: IF p_score_rec.total_positives = FND_API.g_miss_num THEN

1971: x_complete_rec.total_records := l_score_rec.total_records;
1972: END IF;
1973:
1974: -- total_positives
1975: IF p_score_rec.total_positives = FND_API.g_miss_num THEN
1976: x_complete_rec.total_positives := l_score_rec.total_positives;
1977: END IF;
1978:
1979: -- min_records

Line 1980: IF p_score_rec.min_records = FND_API.g_miss_num THEN

1976: x_complete_rec.total_positives := l_score_rec.total_positives;
1977: END IF;
1978:
1979: -- min_records
1980: IF p_score_rec.min_records = FND_API.g_miss_num THEN
1981: x_complete_rec.min_records := l_score_rec.min_records;
1982: END IF;
1983:
1984: -- max_records

Line 1985: IF p_score_rec.max_records = FND_API.g_miss_num THEN

1981: x_complete_rec.min_records := l_score_rec.min_records;
1982: END IF;
1983:
1984: -- max_records
1985: IF p_score_rec.max_records = FND_API.g_miss_num THEN
1986: x_complete_rec.max_records := l_score_rec.max_records;
1987: END IF;
1988:
1989: -- row_selection_type

Line 1990: IF p_score_rec.row_selection_type = FND_API.g_miss_char THEN

1986: x_complete_rec.max_records := l_score_rec.max_records;
1987: END IF;
1988:
1989: -- row_selection_type
1990: IF p_score_rec.row_selection_type = FND_API.g_miss_char THEN
1991: x_complete_rec.row_selection_type := l_score_rec.row_selection_type;
1992: END IF;
1993:
1994: -- every_nth_row

Line 1995: IF p_score_rec.every_nth_row = FND_API.g_miss_num THEN

1991: x_complete_rec.row_selection_type := l_score_rec.row_selection_type;
1992: END IF;
1993:
1994: -- every_nth_row
1995: IF p_score_rec.every_nth_row = FND_API.g_miss_num THEN
1996: x_complete_rec.every_nth_row := l_score_rec.every_nth_row;
1997: END IF;
1998:
1999: -- pct_random

Line 2000: IF p_score_rec.pct_random = FND_API.g_miss_num THEN

1996: x_complete_rec.every_nth_row := l_score_rec.every_nth_row;
1997: END IF;
1998:
1999: -- pct_random
2000: IF p_score_rec.pct_random = FND_API.g_miss_num THEN
2001: x_complete_rec.pct_random := l_score_rec.pct_random;
2002: END IF;
2003:
2004: -- custom_setup_id

Line 2005: IF p_score_rec.custom_setup_id = FND_API.g_miss_num THEN

2001: x_complete_rec.pct_random := l_score_rec.pct_random;
2002: END IF;
2003:
2004: -- custom_setup_id
2005: IF p_score_rec.custom_setup_id = FND_API.g_miss_num THEN
2006: x_complete_rec.custom_setup_id := l_score_rec.custom_setup_id;
2007: END IF;
2008:
2009: -- country_id

Line 2010: IF p_score_rec.country_id = FND_API.g_miss_num THEN

2006: x_complete_rec.custom_setup_id := l_score_rec.custom_setup_id;
2007: END IF;
2008:
2009: -- country_id
2010: IF p_score_rec.country_id = FND_API.g_miss_num THEN
2011: x_complete_rec.country_id := l_score_rec.country_id;
2012: END IF;
2013:
2014: -- attribute_category

Line 2015: IF p_score_rec.attribute_category = FND_API.g_miss_char THEN

2011: x_complete_rec.country_id := l_score_rec.country_id;
2012: END IF;
2013:
2014: -- attribute_category
2015: IF p_score_rec.attribute_category = FND_API.g_miss_char THEN
2016: x_complete_rec.attribute_category := l_score_rec.attribute_category;
2017: END IF;
2018:
2019: -- score_name

Line 2020: IF p_score_rec.score_name = FND_API.g_miss_char THEN

2016: x_complete_rec.attribute_category := l_score_rec.attribute_category;
2017: END IF;
2018:
2019: -- score_name
2020: IF p_score_rec.score_name = FND_API.g_miss_char THEN
2021: x_complete_rec.score_name := l_score_rec.score_name;
2022: END IF;
2023:
2024: -- description

Line 2025: IF p_score_rec.description = FND_API.g_miss_char THEN

2021: x_complete_rec.score_name := l_score_rec.score_name;
2022: END IF;
2023:
2024: -- description
2025: IF p_score_rec.description = FND_API.g_miss_char THEN
2026: x_complete_rec.description := l_score_rec.description;
2027: END IF;
2028:
2029: -- attribute1

Line 2030: IF p_score_rec.attribute1 = FND_API.g_miss_char THEN

2026: x_complete_rec.description := l_score_rec.description;
2027: END IF;
2028:
2029: -- attribute1
2030: IF p_score_rec.attribute1 = FND_API.g_miss_char THEN
2031: x_complete_rec.attribute1 := l_score_rec.attribute1;
2032: END IF;
2033:
2034: -- attribute2

Line 2035: IF p_score_rec.attribute2 = FND_API.g_miss_char THEN

2031: x_complete_rec.attribute1 := l_score_rec.attribute1;
2032: END IF;
2033:
2034: -- attribute2
2035: IF p_score_rec.attribute2 = FND_API.g_miss_char THEN
2036: x_complete_rec.attribute2 := l_score_rec.attribute2;
2037: END IF;
2038:
2039: -- attribute3

Line 2040: IF p_score_rec.attribute3 = FND_API.g_miss_char THEN

2036: x_complete_rec.attribute2 := l_score_rec.attribute2;
2037: END IF;
2038:
2039: -- attribute3
2040: IF p_score_rec.attribute3 = FND_API.g_miss_char THEN
2041: x_complete_rec.attribute3 := l_score_rec.attribute3;
2042: END IF;
2043:
2044: -- attribute4

Line 2045: IF p_score_rec.attribute4 = FND_API.g_miss_char THEN

2041: x_complete_rec.attribute3 := l_score_rec.attribute3;
2042: END IF;
2043:
2044: -- attribute4
2045: IF p_score_rec.attribute4 = FND_API.g_miss_char THEN
2046: x_complete_rec.attribute4 := l_score_rec.attribute4;
2047: END IF;
2048:
2049: -- attribute5

Line 2050: IF p_score_rec.attribute5 = FND_API.g_miss_char THEN

2046: x_complete_rec.attribute4 := l_score_rec.attribute4;
2047: END IF;
2048:
2049: -- attribute5
2050: IF p_score_rec.attribute5 = FND_API.g_miss_char THEN
2051: x_complete_rec.attribute5 := l_score_rec.attribute5;
2052: END IF;
2053:
2054: -- attribute6

Line 2055: IF p_score_rec.attribute6 = FND_API.g_miss_char THEN

2051: x_complete_rec.attribute5 := l_score_rec.attribute5;
2052: END IF;
2053:
2054: -- attribute6
2055: IF p_score_rec.attribute6 = FND_API.g_miss_char THEN
2056: x_complete_rec.attribute6 := l_score_rec.attribute6;
2057: END IF;
2058:
2059: -- attribute7

Line 2060: IF p_score_rec.attribute7 = FND_API.g_miss_char THEN

2056: x_complete_rec.attribute6 := l_score_rec.attribute6;
2057: END IF;
2058:
2059: -- attribute7
2060: IF p_score_rec.attribute7 = FND_API.g_miss_char THEN
2061: x_complete_rec.attribute7 := l_score_rec.attribute7;
2062: END IF;
2063:
2064: -- attribute8

Line 2065: IF p_score_rec.attribute8 = FND_API.g_miss_char THEN

2061: x_complete_rec.attribute7 := l_score_rec.attribute7;
2062: END IF;
2063:
2064: -- attribute8
2065: IF p_score_rec.attribute8 = FND_API.g_miss_char THEN
2066: x_complete_rec.attribute8 := l_score_rec.attribute8;
2067: END IF;
2068:
2069: -- attribute9

Line 2070: IF p_score_rec.attribute9 = FND_API.g_miss_char THEN

2066: x_complete_rec.attribute8 := l_score_rec.attribute8;
2067: END IF;
2068:
2069: -- attribute9
2070: IF p_score_rec.attribute9 = FND_API.g_miss_char THEN
2071: x_complete_rec.attribute9 := l_score_rec.attribute9;
2072: END IF;
2073:
2074: -- attribute10

Line 2075: IF p_score_rec.attribute10 = FND_API.g_miss_char THEN

2071: x_complete_rec.attribute9 := l_score_rec.attribute9;
2072: END IF;
2073:
2074: -- attribute10
2075: IF p_score_rec.attribute10 = FND_API.g_miss_char THEN
2076: x_complete_rec.attribute10 := l_score_rec.attribute10;
2077: END IF;
2078:
2079: -- attribute11

Line 2080: IF p_score_rec.attribute11 = FND_API.g_miss_char THEN

2076: x_complete_rec.attribute10 := l_score_rec.attribute10;
2077: END IF;
2078:
2079: -- attribute11
2080: IF p_score_rec.attribute11 = FND_API.g_miss_char THEN
2081: x_complete_rec.attribute11 := l_score_rec.attribute11;
2082: END IF;
2083:
2084: -- attribute12

Line 2085: IF p_score_rec.attribute12 = FND_API.g_miss_char THEN

2081: x_complete_rec.attribute11 := l_score_rec.attribute11;
2082: END IF;
2083:
2084: -- attribute12
2085: IF p_score_rec.attribute12 = FND_API.g_miss_char THEN
2086: x_complete_rec.attribute12 := l_score_rec.attribute12;
2087: END IF;
2088:
2089: -- attribute13

Line 2090: IF p_score_rec.attribute13 = FND_API.g_miss_char THEN

2086: x_complete_rec.attribute12 := l_score_rec.attribute12;
2087: END IF;
2088:
2089: -- attribute13
2090: IF p_score_rec.attribute13 = FND_API.g_miss_char THEN
2091: x_complete_rec.attribute13 := l_score_rec.attribute13;
2092: END IF;
2093:
2094: -- attribute14

Line 2095: IF p_score_rec.attribute14 = FND_API.g_miss_char THEN

2091: x_complete_rec.attribute13 := l_score_rec.attribute13;
2092: END IF;
2093:
2094: -- attribute14
2095: IF p_score_rec.attribute14 = FND_API.g_miss_char THEN
2096: x_complete_rec.attribute14 := l_score_rec.attribute14;
2097: END IF;
2098:
2099: -- attribute15

Line 2100: IF p_score_rec.attribute15 = FND_API.g_miss_char THEN

2096: x_complete_rec.attribute14 := l_score_rec.attribute14;
2097: END IF;
2098:
2099: -- attribute15
2100: IF p_score_rec.attribute15 = FND_API.g_miss_char THEN
2101: x_complete_rec.attribute15 := l_score_rec.attribute15;
2102: END IF;
2103:
2104: -- wf_itemkey

Line 2105: IF p_score_rec.wf_itemkey = FND_API.g_miss_char THEN

2101: x_complete_rec.attribute15 := l_score_rec.attribute15;
2102: END IF;
2103:
2104: -- wf_itemkey
2105: IF p_score_rec.wf_itemkey = FND_API.g_miss_char THEN
2106: x_complete_rec.wf_itemkey := l_score_rec.wf_itemkey;
2107: END IF;
2108: END Complete_Score_Rec;
2109:

Line 2112: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2108: END Complete_Score_Rec;
2109:
2110: PROCEDURE Validate_Score (
2111: p_api_version IN NUMBER,
2112: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2113: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2114: p_validation_mode IN VARCHAR2,
2115: p_score_rec IN Score_Rec_Type,
2116: x_return_status OUT NOCOPY VARCHAR2,

Line 2113: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

2109:
2110: PROCEDURE Validate_Score (
2111: p_api_version IN NUMBER,
2112: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2113: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2114: p_validation_mode IN VARCHAR2,
2115: p_score_rec IN Score_Rec_Type,
2116: x_return_status OUT NOCOPY VARCHAR2,
2117: x_msg_count OUT NOCOPY NUMBER,

Line 2134: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

2130: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' start');
2131: END IF;
2132:
2133: -- Standard call to check for call compatibility.
2134: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2135: p_api_version,
2136: l_api_name,
2137: G_PKG_NAME)
2138: THEN

Line 2139: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2135: p_api_version,
2136: l_api_name,
2137: G_PKG_NAME)
2138: THEN
2139: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2140: END IF;
2141:
2142: -- Initialize message list if p_init_msg_list is set to TRUE.
2143: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 2143: IF FND_API.to_Boolean( p_init_msg_list ) THEN

2139: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2140: END IF;
2141:
2142: -- Initialize message list if p_init_msg_list is set to TRUE.
2143: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2144: FND_MSG_PUB.initialize;
2145: END IF;
2146:
2147: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_item THEN

Line 2153: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2149: p_score_rec => p_score_rec,
2150: p_validation_mode => p_validation_mode,
2151: x_return_status => x_return_status
2152: );
2153: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2154: RAISE FND_API.G_EXC_ERROR;
2155: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2156: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2157: END IF;

Line 2154: RAISE FND_API.G_EXC_ERROR;

2150: p_validation_mode => p_validation_mode,
2151: x_return_status => x_return_status
2152: );
2153: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2154: RAISE FND_API.G_EXC_ERROR;
2155: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2156: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2157: END IF;
2158: END IF;

Line 2155: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

2151: x_return_status => x_return_status
2152: );
2153: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2154: RAISE FND_API.G_EXC_ERROR;
2155: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2156: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2157: END IF;
2158: END IF;
2159:

Line 2156: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2152: );
2153: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2154: RAISE FND_API.G_EXC_ERROR;
2155: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2156: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2157: END IF;
2158: END IF;
2159:
2160: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_record THEN

Line 2163: p_init_msg_list => FND_API.G_FALSE,

2159:
2160: IF p_validation_level >= JTF_PLSQL_API.g_valid_level_record THEN
2161: Validate_Score_Rec(
2162: p_api_version => 1.0,
2163: p_init_msg_list => FND_API.G_FALSE,
2164: p_validation_mode => p_validation_mode,
2165: x_return_status => x_return_status,
2166: x_msg_count => x_msg_count,
2167: x_msg_data => x_msg_data,

Line 2170: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2166: x_msg_count => x_msg_count,
2167: x_msg_data => x_msg_data,
2168: p_score_rec => p_score_rec
2169: );
2170: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2171: RAISE FND_API.G_EXC_ERROR;
2172: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2174: END IF;

Line 2171: RAISE FND_API.G_EXC_ERROR;

2167: x_msg_data => x_msg_data,
2168: p_score_rec => p_score_rec
2169: );
2170: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2171: RAISE FND_API.G_EXC_ERROR;
2172: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2174: END IF;
2175: END IF;

Line 2172: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

2168: p_score_rec => p_score_rec
2169: );
2170: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2171: RAISE FND_API.G_EXC_ERROR;
2172: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2174: END IF;
2175: END IF;
2176:

Line 2173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2169: );
2170: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2171: RAISE FND_API.G_EXC_ERROR;
2172: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2174: END IF;
2175: END IF;
2176:
2177: -- Initialize API return status to SUCCESS

Line 2178: x_return_status := FND_API.G_RET_STS_SUCCESS;

2174: END IF;
2175: END IF;
2176:
2177: -- Initialize API return status to SUCCESS
2178: x_return_status := FND_API.G_RET_STS_SUCCESS;
2179:
2180:
2181: -- Debug Message
2182: IF (AMS_DEBUG_HIGH_ON) THEN

Line 2195: x_return_status := FND_API.g_ret_sts_error;

2191: );
2192: EXCEPTION
2193:
2194: WHEN AMS_Utility_PVT.resource_locked THEN
2195: x_return_status := FND_API.g_ret_sts_error;
2196: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
2197: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
2198: FND_MSG_PUB.add;
2199: END IF;

Line 2201: WHEN FND_API.G_EXC_ERROR THEN

2197: FND_MESSAGE.set_name('AMS', 'AMS_API_RESOURCE_LOCKED');
2198: FND_MSG_PUB.add;
2199: END IF;
2200:
2201: WHEN FND_API.G_EXC_ERROR THEN
2202: ROLLBACK TO VALIDATE_Score_;
2203: x_return_status := FND_API.G_RET_STS_ERROR;
2204: -- Standard call to get message count and if count=1, get the message
2205: FND_MSG_PUB.Count_And_Get (

Line 2203: x_return_status := FND_API.G_RET_STS_ERROR;

2199: END IF;
2200:
2201: WHEN FND_API.G_EXC_ERROR THEN
2202: ROLLBACK TO VALIDATE_Score_;
2203: x_return_status := FND_API.G_RET_STS_ERROR;
2204: -- Standard call to get message count and if count=1, get the message
2205: FND_MSG_PUB.Count_And_Get (
2206: p_encoded => FND_API.G_FALSE,
2207: p_count => x_msg_count,

Line 2206: p_encoded => FND_API.G_FALSE,

2202: ROLLBACK TO VALIDATE_Score_;
2203: x_return_status := FND_API.G_RET_STS_ERROR;
2204: -- Standard call to get message count and if count=1, get the message
2205: FND_MSG_PUB.Count_And_Get (
2206: p_encoded => FND_API.G_FALSE,
2207: p_count => x_msg_count,
2208: p_data => x_msg_data
2209: );
2210:

Line 2211: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2207: p_count => x_msg_count,
2208: p_data => x_msg_data
2209: );
2210:
2211: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2212: ROLLBACK TO VALIDATE_Score_;
2213: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2214: -- Standard call to get message count and if count=1, get the message
2215: FND_MSG_PUB.Count_And_Get (

Line 2213: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2209: );
2210:
2211: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2212: ROLLBACK TO VALIDATE_Score_;
2213: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2214: -- Standard call to get message count and if count=1, get the message
2215: FND_MSG_PUB.Count_And_Get (
2216: p_encoded => FND_API.G_FALSE,
2217: p_count => x_msg_count,

Line 2216: p_encoded => FND_API.G_FALSE,

2212: ROLLBACK TO VALIDATE_Score_;
2213: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2214: -- Standard call to get message count and if count=1, get the message
2215: FND_MSG_PUB.Count_And_Get (
2216: p_encoded => FND_API.G_FALSE,
2217: p_count => x_msg_count,
2218: p_data => x_msg_data
2219: );
2220:

Line 2223: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2219: );
2220:
2221: WHEN OTHERS THEN
2222: ROLLBACK TO VALIDATE_Score_;
2223: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2224: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2225: THEN
2226: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2227: END IF;

Line 2230: p_encoded => FND_API.G_FALSE,

2226: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
2227: END IF;
2228: -- Standard call to get message count and if count=1, get the message
2229: FND_MSG_PUB.Count_And_Get (
2230: p_encoded => FND_API.G_FALSE,
2231: p_count => x_msg_count,
2232: p_data => x_msg_data
2233: );
2234: End Validate_Score;

Line 2239: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2235:
2236:
2237: PROCEDURE Validate_Score_rec (
2238: p_api_version IN NUMBER,
2239: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2240: p_validation_mode IN VARCHAR2,
2241: x_return_status OUT NOCOPY VARCHAR2,
2242: x_msg_count OUT NOCOPY NUMBER,
2243: x_msg_data OUT NOCOPY VARCHAR2,

Line 2258: IF FND_API.to_Boolean( p_init_msg_list )

2254: WHERE score_id = p_score_id;
2255: l_reference_rec c_reference%ROWTYPE;
2256: BEGIN
2257: -- Initialize message list if p_init_msg_list is set to TRUE.
2258: IF FND_API.to_Boolean( p_init_msg_list )
2259: THEN
2260: FND_MSG_PUB.initialize;
2261: END IF;
2262:

Line 2264: x_return_status := FND_API.G_RET_STS_SUCCESS;

2260: FND_MSG_PUB.initialize;
2261: END IF;
2262:
2263: -- Initialize API return status to SUCCESS
2264: x_return_status := FND_API.G_RET_STS_SUCCESS;
2265:
2266: -- Debug Message
2267: IF (AMS_DEBUG_HIGH_ON) THEN
2268:

Line 2297: x_return_status := FND_API.G_RET_STS_ERROR;

2293: );
2294:
2295: IF l_is_owner = 'N' AND NOT AMS_Access_PVT.Check_Admin_Access(l_context_resource_id) THEN
2296: AMS_Utility_PVT.error_message ('AMS_PRIC_UPDT_OWNER_PERM');
2297: x_return_status := FND_API.G_RET_STS_ERROR;
2298: END IF;
2299: END IF;
2300: END IF;
2301:

Line 2305: p_score_rec.min_records <> FND_API.g_miss_num AND

2301:
2302: -- Start add rosharma 28-Nov-2002
2303: -- Max records must be more than Min records, if both are entered
2304: IF p_score_rec.min_records IS NOT NULL AND
2305: p_score_rec.min_records <> FND_API.g_miss_num AND
2306: p_score_rec.max_records IS NOT NULL AND
2307: p_score_rec.max_records <> FND_API.g_miss_num THEN
2308: DECLARE
2309: l_min_rec NUMBER;

Line 2307: p_score_rec.max_records <> FND_API.g_miss_num THEN

2303: -- Max records must be more than Min records, if both are entered
2304: IF p_score_rec.min_records IS NOT NULL AND
2305: p_score_rec.min_records <> FND_API.g_miss_num AND
2306: p_score_rec.max_records IS NOT NULL AND
2307: p_score_rec.max_records <> FND_API.g_miss_num THEN
2308: DECLARE
2309: l_min_rec NUMBER;
2310: l_max_rec NUMBER;
2311: BEGIN

Line 2316: x_return_status := FND_API.G_RET_STS_ERROR;

2312: l_min_rec := TO_NUMBER (p_score_rec.min_records);
2313: l_max_rec := TO_NUMBER (p_score_rec.max_records);
2314: IF l_max_rec < l_min_rec THEN
2315: AMS_Utility_PVT.error_message ('AMS_DM_MIN_MORE_THAN_MAX');
2316: x_return_status := FND_API.G_RET_STS_ERROR;
2317: RETURN;
2318: END IF;
2319: END;
2320: END IF;

Line 2326: p_score_rec.every_nth_row = FND_API.g_miss_num THEN

2322: -- If selection is every Nth row, there must be a value in number of rows
2323: -- and it must be greater than 0
2324: IF p_score_rec.row_selection_type = 'NTH_RECORD' THEN
2325: IF p_score_rec.every_nth_row IS NULL OR
2326: p_score_rec.every_nth_row = FND_API.g_miss_num THEN
2327: AMS_Utility_PVT.error_message ('AMS_DM_NO_NTH_RECORD');
2328: x_return_status := FND_API.G_RET_STS_ERROR;
2329: RETURN;
2330: END IF;

Line 2328: x_return_status := FND_API.G_RET_STS_ERROR;

2324: IF p_score_rec.row_selection_type = 'NTH_RECORD' THEN
2325: IF p_score_rec.every_nth_row IS NULL OR
2326: p_score_rec.every_nth_row = FND_API.g_miss_num THEN
2327: AMS_Utility_PVT.error_message ('AMS_DM_NO_NTH_RECORD');
2328: x_return_status := FND_API.G_RET_STS_ERROR;
2329: RETURN;
2330: END IF;
2331: --check for valid number
2332: DECLARE

Line 2338: x_return_status := FND_API.G_RET_STS_ERROR;

2334: BEGIN
2335: l_nth_row := ROUND(TO_NUMBER (p_score_rec.every_nth_row));
2336: IF l_nth_row <= 0 THEN
2337: AMS_Utility_PVT.error_message ('AMS_DM_INVALID_NTH_ROW');
2338: x_return_status := FND_API.G_RET_STS_ERROR;
2339: RETURN;
2340: END IF;
2341: EXCEPTION
2342: WHEN VALUE_ERROR THEN

Line 2344: x_return_status := FND_API.G_RET_STS_ERROR;

2340: END IF;
2341: EXCEPTION
2342: WHEN VALUE_ERROR THEN
2343: AMS_Utility_PVT.error_message ('AMS_DM_NOT_NUMBER' , 'FIELD' , 'EVERY_NTH_ROW');
2344: x_return_status := FND_API.G_RET_STS_ERROR;
2345: RETURN;
2346: END;
2347: END IF;
2348:

Line 2353: p_score_rec.pct_random = FND_API.g_miss_num THEN

2349: -- If selection is random, there must be a value in random percentage
2350: -- and it must be between 0 and 100
2351: IF p_score_rec.row_selection_type = 'RANDOM' THEN
2352: IF p_score_rec.pct_random IS NULL OR
2353: p_score_rec.pct_random = FND_API.g_miss_num THEN
2354: AMS_Utility_PVT.error_message ('AMS_DM_NO_PCT_RANDOM');
2355: x_return_status := FND_API.G_RET_STS_ERROR;
2356: RETURN;
2357: END IF;

Line 2355: x_return_status := FND_API.G_RET_STS_ERROR;

2351: IF p_score_rec.row_selection_type = 'RANDOM' THEN
2352: IF p_score_rec.pct_random IS NULL OR
2353: p_score_rec.pct_random = FND_API.g_miss_num THEN
2354: AMS_Utility_PVT.error_message ('AMS_DM_NO_PCT_RANDOM');
2355: x_return_status := FND_API.G_RET_STS_ERROR;
2356: RETURN;
2357: END IF;
2358: --check for valid number
2359: DECLARE

Line 2365: x_return_status := FND_API.G_RET_STS_ERROR;

2361: BEGIN
2362: l_pct_random := TO_NUMBER (p_score_rec.pct_random);
2363: IF l_pct_random <= 0 OR l_pct_random > 100 THEN
2364: AMS_Utility_PVT.error_message ('AMS_DM_INVALID_PCT_RANDOM');
2365: x_return_status := FND_API.G_RET_STS_ERROR;
2366: RETURN;
2367: END IF;
2368: EXCEPTION
2369: WHEN VALUE_ERROR THEN

Line 2371: x_return_status := FND_API.G_RET_STS_ERROR;

2367: END IF;
2368: EXCEPTION
2369: WHEN VALUE_ERROR THEN
2370: AMS_Utility_PVT.error_message ('AMS_DM_NOT_NUMBER' , 'FIELD' , 'PCT_RANDOM');
2371: x_return_status := FND_API.G_RET_STS_ERROR;
2372: RETURN;
2373: END;
2374: END IF;
2375: -- End add rosharma 28-Nov-2002

Line 2392: x_return_status := FND_API.G_RET_STS_SUCCESS;

2388: IS
2389: L_ACCESS_TYPE_USER CONSTANT VARCHAR2(30) := 'USER';
2390: BEGIN
2391: -- Initialize API return status to SUCCESS
2392: x_return_status := FND_API.G_RET_STS_SUCCESS;
2393:
2394: IF (AMS_DEBUG_HIGH_ON) THEN
2395:
2396:

Line 2408: x_return_status := FND_API.G_RET_STS_ERROR;

2404: p_object_type => G_OBJECT_TYPE_SCORE,
2405: p_user_or_role_id => AMS_Utility_PVT.get_resource_id (FND_GLOBAL.user_id),
2406: p_user_or_role_type => L_ACCESS_TYPE_USER) = 'N' THEN
2407: AMS_Utility_PVT.error_message ('AMS_SCOR_NO_UPDATE_ACCESS');
2408: x_return_status := FND_API.G_RET_STS_ERROR;
2409: END IF;
2410: END check_access;
2411:
2412:

Line 2430: x_return_status := FND_API.G_RET_STS_SUCCESS;

2426: ;
2427: l_score_rec c_score%ROWTYPE;
2428: BEGIN
2429: -- Initialize API return status to SUCCESS
2430: x_return_status := FND_API.G_RET_STS_SUCCESS;
2431:
2432: OPEN c_score (p_score_id);
2433: FETCH c_score INTO l_score_rec;
2434: CLOSE c_score;

Line 2442: IF model_used_for_scoring (l_score_rec.model_id, p_score_id) = FND_API.G_FALSE THEN

2438: -- to scoring when scoring began
2439: --
2440: -- first check that the model isn't used by other
2441: -- scoring instances for scoring.
2442: IF model_used_for_scoring (l_score_rec.model_id, p_score_id) = FND_API.G_FALSE THEN
2443: OPEN c_user_status_id (G_STATUS_TYPE_MODEL, G_STATUS_AVAILABLE);
2444: FETCH c_user_status_id INTO l_model_status_id;
2445: CLOSE c_user_status_id;
2446:

Line 2492: x_return_status := FND_API.G_RET_STS_SUCCESS;

2488: ;
2489: l_score_rec c_score%ROWTYPE;
2490: BEGIN
2491: -- Initialize API return status to SUCCESS
2492: x_return_status := FND_API.G_RET_STS_SUCCESS;
2493:
2494: OPEN c_score (p_score_id);
2495: FETCH c_score INTO l_score_rec;
2496: CLOSE c_score;

Line 2504: IF model_used_for_scoring (l_score_rec.model_id, p_score_id) = FND_API.G_FALSE THEN

2500: -- to scoring when scoring began
2501: --
2502: -- first check that the model isn't used by other
2503: -- scoring instances for scoring.
2504: IF model_used_for_scoring (l_score_rec.model_id, p_score_id) = FND_API.G_FALSE THEN
2505: OPEN c_user_status_id (G_STATUS_TYPE_MODEL, G_STATUS_AVAILABLE);
2506: FETCH c_user_status_id INTO l_model_status_id;
2507: CLOSE c_user_status_id;
2508:

Line 2585: x_return_status := FND_API.G_RET_STS_SUCCESS;

2581: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' Start');
2582: END IF;
2583:
2584: -- Initialize API return status to SUCCESS
2585: x_return_status := FND_API.G_RET_STS_SUCCESS;
2586:
2587: -- Load the scoring run record to get the original status
2588: OPEN c_ref_score (p_score_id);
2589: FETCH c_ref_score INTO l_ref_score_rec;

Line 2630: x_return_status := FND_API.G_RET_STS_ERROR;

2626: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' Cannot Proceed with Preview');
2627: END IF;
2628: -- Set x_return_status to expected error. This will results in a different message
2629: -- displayed to the user
2630: x_return_status := FND_API.G_RET_STS_ERROR;
2631: RETURN;
2632: END IF;
2633:
2634: dataToPreview (p_score_id, l_data_exists_flag);

Line 2653: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2649: x_tar_score_rec => l_tar_score_rec,
2650: x_return_status => x_return_status
2651: );
2652:
2653: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2654: IF (AMS_DEBUG_HIGH_ON) THEN
2655:
2656: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' Error from wf_startPreviewProcess');
2657: END IF;

Line 2660: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2656: AMS_UTILITY_PVT.debug_message('Private API: ' || l_api_name || ' Error from wf_startPreviewProcess');
2657: END IF;
2658: -- Set x_return_status to unexpected error. This will results in a different message
2659: -- displayed to the user
2660: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2661: RAISE FND_API.G_EXC_ERROR;
2662: END IF;
2663:
2664: -- Construct the URL that could be used to monitor the WF process. This will be returned to the caller

Line 2661: RAISE FND_API.G_EXC_ERROR;

2657: END IF;
2658: -- Set x_return_status to unexpected error. This will results in a different message
2659: -- displayed to the user
2660: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2661: RAISE FND_API.G_EXC_ERROR;
2662: END IF;
2663:
2664: -- Construct the URL that could be used to monitor the WF process. This will be returned to the caller
2665: -- to be displayed on a custom confirmation message.

Line 2736: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

2732: -- in get_column_value call-out.
2733:
2734: PROCEDURE copy_score (
2735: p_api_version IN NUMBER,
2736: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2737: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2738: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2739: x_return_status OUT NOCOPY VARCHAR2,
2740: x_msg_count OUT NOCOPY NUMBER,

Line 2737: p_commit IN VARCHAR2 := FND_API.G_FALSE,

2733:
2734: PROCEDURE copy_score (
2735: p_api_version IN NUMBER,
2736: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2737: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2738: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2739: x_return_status OUT NOCOPY VARCHAR2,
2740: x_msg_count OUT NOCOPY NUMBER,
2741: x_msg_data OUT NOCOPY VARCHAR2,

Line 2738: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

2734: PROCEDURE copy_score (
2735: p_api_version IN NUMBER,
2736: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2737: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2738: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2739: x_return_status OUT NOCOPY VARCHAR2,
2740: x_msg_count OUT NOCOPY NUMBER,
2741: x_msg_data OUT NOCOPY VARCHAR2,
2742: p_source_object_id IN NUMBER,

Line 2783: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

2779: -- Standard Start of API savepoint
2780: SAVEPOINT ams_score_pvt_copy_score;
2781:
2782: -- Standard call to check for call compatibility.
2783: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2784: p_api_version,
2785: l_api_name,
2786: G_PKG_NAME)
2787: THEN

Line 2788: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2784: p_api_version,
2785: l_api_name,
2786: G_PKG_NAME)
2787: THEN
2788: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2789: END IF;
2790:
2791: -- Initialize message list if p_init_msg_list is set to TRUE.
2792: IF FND_API.to_Boolean( p_init_msg_list )THEN

Line 2792: IF FND_API.to_Boolean( p_init_msg_list )THEN

2788: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2789: END IF;
2790:
2791: -- Initialize message list if p_init_msg_list is set to TRUE.
2792: IF FND_API.to_Boolean( p_init_msg_list )THEN
2793: FND_MSG_PUB.initialize;
2794: END IF;
2795:
2796: IF (AMS_DEBUG_HIGH_ON) THEN

Line 2805: x_return_status := FND_API.G_RET_STS_SUCCESS;

2801:
2802: END IF;
2803:
2804: -- Initialize API return status to SUCCESS
2805: x_return_status := FND_API.G_RET_STS_SUCCESS;
2806:
2807: --
2808: -- Start of API body.
2809: --

Line 2879: p_init_msg_list => FND_API.G_FALSE,

2875: --end comment rosharma 04-sep-2003 bug # 3127555
2876:
2877: AMS_DM_Score_PVT.create_score (
2878: p_api_version => 1.0,
2879: p_init_msg_list => FND_API.G_FALSE,
2880: p_commit => FND_API.G_FALSE,
2881: p_validation_level => p_validation_level,
2882: x_return_status => x_return_status,
2883: x_msg_count => x_msg_count,

Line 2880: p_commit => FND_API.G_FALSE,

2876:
2877: AMS_DM_Score_PVT.create_score (
2878: p_api_version => 1.0,
2879: p_init_msg_list => FND_API.G_FALSE,
2880: p_commit => FND_API.G_FALSE,
2881: p_validation_level => p_validation_level,
2882: x_return_status => x_return_status,
2883: x_msg_count => x_msg_count,
2884: x_msg_data => x_msg_data,

Line 2889: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2885: p_score_rec => l_score_rec,
2886: x_custom_setup_id => x_custom_setup_id,
2887: x_score_id => l_new_score_id
2888: );
2889: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2890: RAISE FND_API.G_EXC_ERROR;
2891: END IF;
2892:
2893: -- copy data selections

Line 2890: RAISE FND_API.G_EXC_ERROR;

2886: x_custom_setup_id => x_custom_setup_id,
2887: x_score_id => l_new_score_id
2888: );
2889: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2890: RAISE FND_API.G_EXC_ERROR;
2891: END IF;
2892:
2893: -- copy data selections
2894:

Line 2897: IF AMS_CpyUtility_PVT.is_copy_attribute (AMS_CopyElements_PVT.G_ATTRIBUTE_SELC, p_attributes_table) = FND_API.G_TRUE THEN

2893: -- copy data selections
2894:
2895: -- 01-May-2003 nyostos Fixed copying of Data Selections Bug 2934000
2896: -- Used G_ATTRIBUTE_SELC instead of G_ATTRIBUTE_TRNG
2897: IF AMS_CpyUtility_PVT.is_copy_attribute (AMS_CopyElements_PVT.G_ATTRIBUTE_SELC, p_attributes_table) = FND_API.G_TRUE THEN
2898: --start changes rosharma 20-aug-2003 bug 3104201
2899: OPEN c_data_source (l_reference_rec.model_id);
2900: FETCH c_data_source INTO l_ds_id , l_target_id;
2901: CLOSE c_data_source;

Line 2905: p_init_msg_list => FND_API.G_FALSE,

2901: CLOSE c_data_source;
2902: -- Fix for bug 4357993. Workbook has to be copied for Custom score also.
2903: AMS_CopyElements_PVT.copy_list_select_actions (
2904: p_api_version => 1.0,
2905: p_init_msg_list => FND_API.G_FALSE,
2906: p_commit => FND_API.G_FALSE,
2907: x_return_status => x_return_status,
2908: x_msg_count => x_msg_count,
2909: x_msg_data => x_msg_data,

Line 2906: p_commit => FND_API.G_FALSE,

2902: -- Fix for bug 4357993. Workbook has to be copied for Custom score also.
2903: AMS_CopyElements_PVT.copy_list_select_actions (
2904: p_api_version => 1.0,
2905: p_init_msg_list => FND_API.G_FALSE,
2906: p_commit => FND_API.G_FALSE,
2907: x_return_status => x_return_status,
2908: x_msg_count => x_msg_count,
2909: x_msg_data => x_msg_data,
2910: p_object_type => G_OBJECT_TYPE_SCORE,

Line 2918: p_init_msg_list => FND_API.G_FALSE,

2914:
2915: IF l_target_id >= G_SEEDED_ID_THRESHOLD THEN
2916: AMS_Adv_Filter_PVT.copy_filter_data (
2917: p_api_version => 1.0,
2918: p_init_msg_list => FND_API.G_FALSE,
2919: p_commit => FND_API.G_FALSE,
2920: p_validation_level => p_validation_level,
2921: p_objType => G_OBJECT_TYPE_SCORE,
2922: p_old_objectId => p_source_object_id,

Line 2919: p_commit => FND_API.G_FALSE,

2915: IF l_target_id >= G_SEEDED_ID_THRESHOLD THEN
2916: AMS_Adv_Filter_PVT.copy_filter_data (
2917: p_api_version => 1.0,
2918: p_init_msg_list => FND_API.G_FALSE,
2919: p_commit => FND_API.G_FALSE,
2920: p_validation_level => p_validation_level,
2921: p_objType => G_OBJECT_TYPE_SCORE,
2922: p_old_objectId => p_source_object_id,
2923: p_new_objectId => l_new_score_id,

Line 2932: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2928: );
2929: --end changes rosharma 20-aug-2003 bug 3104201
2930: END IF;
2931:
2932: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2933: RAISE FND_API.G_EXC_ERROR;
2934: END IF;
2935: END IF;
2936:

Line 2933: RAISE FND_API.G_EXC_ERROR;

2929: --end changes rosharma 20-aug-2003 bug 3104201
2930: END IF;
2931:
2932: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2933: RAISE FND_API.G_EXC_ERROR;
2934: END IF;
2935: END IF;
2936:
2937: -- copy team

Line 2938: IF AMS_CpyUtility_PVT.is_copy_attribute (AMS_CopyElements_PVT.G_ATTRIBUTE_TEAM, p_attributes_table) = FND_API.G_TRUE THEN

2934: END IF;
2935: END IF;
2936:
2937: -- copy team
2938: IF AMS_CpyUtility_PVT.is_copy_attribute (AMS_CopyElements_PVT.G_ATTRIBUTE_TEAM, p_attributes_table) = FND_API.G_TRUE THEN
2939: AMS_CopyElements_PVT.copy_act_access (
2940: p_src_act_type => G_OBJECT_TYPE_SCORE,
2941: p_new_act_type => G_OBJECT_TYPE_SCORE,
2942: p_src_act_id => p_source_object_id,

Line 2963: IF FND_API.to_Boolean( p_commit ) THEN

2959: -- End of API body.
2960: --
2961:
2962: -- Standard check for p_commit
2963: IF FND_API.to_Boolean( p_commit ) THEN
2964: COMMIT WORK;
2965: END IF;
2966:
2967:

Line 2980: WHEN FND_API.G_EXC_ERROR THEN

2976: p_count => x_msg_count,
2977: p_data => x_msg_data
2978: );
2979: EXCEPTION
2980: WHEN FND_API.G_EXC_ERROR THEN
2981: ROLLBACK TO ams_score_pvt_copy_score;
2982: x_return_status := FND_API.G_RET_STS_ERROR;
2983: -- Standard call to get message count and if count=1, get the message
2984: FND_MSG_PUB.Count_And_Get (

Line 2982: x_return_status := FND_API.G_RET_STS_ERROR;

2978: );
2979: EXCEPTION
2980: WHEN FND_API.G_EXC_ERROR THEN
2981: ROLLBACK TO ams_score_pvt_copy_score;
2982: x_return_status := FND_API.G_RET_STS_ERROR;
2983: -- Standard call to get message count and if count=1, get the message
2984: FND_MSG_PUB.Count_And_Get (
2985: p_encoded => FND_API.G_FALSE,
2986: p_count => x_msg_count,

Line 2985: p_encoded => FND_API.G_FALSE,

2981: ROLLBACK TO ams_score_pvt_copy_score;
2982: x_return_status := FND_API.G_RET_STS_ERROR;
2983: -- Standard call to get message count and if count=1, get the message
2984: FND_MSG_PUB.Count_And_Get (
2985: p_encoded => FND_API.G_FALSE,
2986: p_count => x_msg_count,
2987: p_data => x_msg_data
2988: );
2989: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 2989: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2985: p_encoded => FND_API.G_FALSE,
2986: p_count => x_msg_count,
2987: p_data => x_msg_data
2988: );
2989: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2990: ROLLBACK TO ams_score_pvt_copy_score;
2991: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2992: -- Standard call to get message count and if count=1, get the message
2993: FND_MSG_PUB.Count_And_Get (

Line 2991: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2987: p_data => x_msg_data
2988: );
2989: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2990: ROLLBACK TO ams_score_pvt_copy_score;
2991: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2992: -- Standard call to get message count and if count=1, get the message
2993: FND_MSG_PUB.Count_And_Get (
2994: p_encoded => FND_API.G_FALSE,
2995: p_count => x_msg_count,

Line 2994: p_encoded => FND_API.G_FALSE,

2990: ROLLBACK TO ams_score_pvt_copy_score;
2991: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2992: -- Standard call to get message count and if count=1, get the message
2993: FND_MSG_PUB.Count_And_Get (
2994: p_encoded => FND_API.G_FALSE,
2995: p_count => x_msg_count,
2996: p_data => x_msg_data
2997: );
2998: WHEN OTHERS THEN

Line 3000: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

2996: p_data => x_msg_data
2997: );
2998: WHEN OTHERS THEN
2999: ROLLBACK TO ams_score_pvt_copy_score;
3000: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3001: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
3002: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3003: END IF;
3004: -- Standard call to get message count and if count=1, get the message

Line 3006: p_encoded => FND_API.G_FALSE,

3002: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
3003: END IF;
3004: -- Standard call to get message count and if count=1, get the message
3005: FND_MSG_PUB.Count_And_Get (
3006: p_encoded => FND_API.G_FALSE,
3007: p_count => x_msg_count,
3008: p_data => x_msg_data
3009: );
3010: END copy_score;

Line 3035: x_return_status := FND_API.G_RET_STS_SUCCESS;

3031: WHERE score_id = p_score_id;
3032: l_score_rec c_score%ROWTYPE;
3033: BEGIN
3034: -- Initialize API return status to SUCCESS
3035: x_return_status := FND_API.G_RET_STS_SUCCESS;
3036:
3037: OPEN c_score (p_score_id);
3038: FETCH c_score INTO l_score_rec;
3039: CLOSE c_score;

Line 3049: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3045: -- if the model is not AVAILABLE or being used in SCORING, then
3046: -- it cannot be used for scoring.
3047: IF l_model_rec.status_code NOT IN (G_STATUS_AVAILABLE, G_STATUS_SCORING) THEN
3048: x_status_code := G_DEFAULT_STATUS; -- draft
3049: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3050: RETURN;
3051: END IF;
3052: x_status_code := G_STATUS_SCORING;
3053:

Line 3118: RETURN FND_API.G_TRUE;

3114: FETCH c_scoring_model INTO l_dummy;
3115: CLOSE c_scoring_model;
3116:
3117: IF l_dummy = 1 THEN
3118: RETURN FND_API.G_TRUE;
3119: END IF;
3120:
3121: RETURN FND_API.G_FALSE;
3122: END model_used_for_scoring;

Line 3121: RETURN FND_API.G_FALSE;

3117: IF l_dummy = 1 THEN
3118: RETURN FND_API.G_TRUE;
3119: END IF;
3120:
3121: RETURN FND_API.G_FALSE;
3122: END model_used_for_scoring;
3123:
3124:
3125: PROCEDURE wf_startprocess (

Line 3143: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3139: x_return_status => x_return_status,
3140: x_user_time_id => x_tar_score_rec.scheduled_timezone_id,
3141: x_user_time_name => l_user_timezone_name
3142: );
3143: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3144: RAISE FND_API.G_EXC_ERROR;
3145: END IF;
3146: ELSE
3147: x_tar_score_rec.scheduled_timezone_id := p_scheduled_timezone_id;

Line 3144: RAISE FND_API.G_EXC_ERROR;

3140: x_user_time_id => x_tar_score_rec.scheduled_timezone_id,
3141: x_user_time_name => l_user_timezone_name
3142: );
3143: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3144: RAISE FND_API.G_EXC_ERROR;
3145: END IF;
3146: ELSE
3147: x_tar_score_rec.scheduled_timezone_id := p_scheduled_timezone_id;
3148: END IF;

Line 3168: x_return_status := FND_API.g_ret_sts_error;

3164: x_itemkey => x_tar_score_rec.wf_itemkey
3165: );
3166:
3167: IF x_tar_score_rec.wf_itemkey IS NULL THEN
3168: x_return_status := FND_API.g_ret_sts_error;
3169: END IF;
3170:
3171: END wf_startprocess;
3172:

Line 3218: x_return_status := FND_API.G_RET_STS_SUCCESS;

3214: p_msg_data => L_API_NAME || ': Begin'
3215: );
3216:
3217: -- Initialize API return status to SUCCESS
3218: x_return_status := FND_API.G_RET_STS_SUCCESS;
3219:
3220: -- Load the score record to get the original status and wf_itemkey
3221: OPEN c_ref_score (p_score_id);
3222: FETCH c_ref_score INTO l_ref_score_rec;

Line 3243: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN

3239: p_itemkey => l_ref_score_rec.wf_itemkey,
3240: x_return_status => x_return_status
3241: );
3242:
3243: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
3244: -- x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3245: -- Report that an error occurred, but ifgnore it and proceed with re-setting
3246: -- the Scoring Run status.
3247: AMS_Utility_PVT.create_log (

Line 3244: -- x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3240: x_return_status => x_return_status
3241: );
3242:
3243: IF x_return_status<>FND_API.G_RET_STS_SUCCESS THEN
3244: -- x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3245: -- Report that an error occurred, but ifgnore it and proceed with re-setting
3246: -- the Scoring Run status.
3247: AMS_Utility_PVT.create_log (
3248: x_return_status => l_return_status,

Line 3253: --RAISE FND_API.G_EXC_ERROR;

3249: p_arc_log_used_by => G_OBJECT_TYPE_SCORE,
3250: p_log_used_by_id => p_score_id,
3251: p_msg_data => L_API_NAME || ': Error while canceling Scoring Run process'
3252: );
3253: --RAISE FND_API.G_EXC_ERROR;
3254: ELSE
3255: AMS_Utility_PVT.create_log (
3256: x_return_status => l_return_status,
3257: p_arc_log_used_by => G_OBJECT_TYPE_SCORE,

Line 3325: x_return_status := FND_API.G_RET_STS_ERROR;

3321: ELSE
3322: -- No Run Request/Process to cancel
3323: -- Set x_return_status to expected error. This will results in a different message
3324: -- displayed to the user
3325: x_return_status := FND_API.G_RET_STS_ERROR;
3326:
3327: AMS_Utility_PVT.create_log (
3328: x_return_status => l_return_status,
3329: p_arc_log_used_by => G_OBJECT_TYPE_SCORE,

Line 3338: x_return_status := FND_API.G_RET_STS_ERROR;

3334: ELSE
3335: -- No Run Request/Process to cancel
3336: -- Set x_return_status to expected error. This will results in a different message
3337: -- displayed to the user
3338: x_return_status := FND_API.G_RET_STS_ERROR;
3339:
3340: AMS_Utility_PVT.create_log (
3341: x_return_status => l_return_status,
3342: p_arc_log_used_by => G_OBJECT_TYPE_SCORE,

Line 3389: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3385: x_return_status => x_return_status,
3386: x_sys_time_id => x_tar_score_rec.scheduled_timezone_id,
3387: x_sys_time_name => l_user_timezone_name
3388: );
3389: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3390: RAISE FND_API.G_EXC_ERROR;
3391: END IF;
3392:
3393: -- When we submit a Preview request, we clean up all the previous

Line 3390: RAISE FND_API.G_EXC_ERROR;

3386: x_sys_time_id => x_tar_score_rec.scheduled_timezone_id,
3387: x_sys_time_name => l_user_timezone_name
3388: );
3389: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3390: RAISE FND_API.G_EXC_ERROR;
3391: END IF;
3392:
3393: -- When we submit a Preview request, we clean up all the previous
3394: -- Scoring Run results since we assume that the data selections may have

Line 3751: x_return_status := FND_API.G_RET_STS_SUCCESS;

3747: WHERE score_id = p_score_id;
3748: l_score_rec c_score%ROWTYPE;
3749: BEGIN
3750: -- Initialize API return status to SUCCESS
3751: x_return_status := FND_API.G_RET_STS_SUCCESS;
3752:
3753: OPEN c_score (p_score_id);
3754: FETCH c_score INTO l_score_rec;
3755: CLOSE c_score;

Line 3765: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3761: -- if the model is not AVAILABLE or being used in SCORING, then
3762: -- it cannot be used for scoring.
3763: x_model_status := l_model_rec.status_code;
3764: IF l_model_rec.status_code NOT IN (G_STATUS_AVAILABLE, G_STATUS_SCORING) THEN
3765: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3766: END IF;
3767:
3768: END wf_checkModelStatus;
3769: