331: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
332: END IF;
333: --Initialize message list if p_init_msg_list is TRUE.
334: IF FND_API.To_Boolean (p_init_msg_list) THEN
335: FND_MSG_PUB.initialize;
336: END IF;
337: -- Initialize API return status to success
338: x_return_status := FND_API.G_RET_STS_SUCCESS;
339: -- Get the current (login) user id.
346: IF (p_check_login_user = FND_API.G_TRUE) THEN
347: -- Check if user is login and has the required privilege.
348: IF (l_current_login_id = FND_API.G_MISS_NUM) THEN
349: -- User is not login.
350: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
351: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_LOGIN');
352: FND_MSG_PUB.Add;
353: END IF;
354: RAISE FND_API.G_EXC_ERROR;
348: IF (l_current_login_id = FND_API.G_MISS_NUM) THEN
349: -- User is not login.
350: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
351: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_LOGIN');
352: FND_MSG_PUB.Add;
353: END IF;
354: RAISE FND_API.G_EXC_ERROR;
355: END IF;
356: AMV_USER_PVT.Is_Administrator
364: x_result_flag => l_admin_flag
365: );
366: IF (l_admin_flag <> FND_API.G_TRUE) THEN
367: -- User is not an administrator.
368: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
369: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_HAVE_PRIVILEGE');
370: FND_MSG_PUB.Add;
371: END IF;
372: RAISE FND_API.G_EXC_ERROR;
366: IF (l_admin_flag <> FND_API.G_TRUE) THEN
367: -- User is not an administrator.
368: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
369: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_HAVE_PRIVILEGE');
370: FND_MSG_PUB.Add;
371: END IF;
372: RAISE FND_API.G_EXC_ERROR;
373: END IF;
374: END IF;
383: IF FND_API.To_Boolean ( p_commit ) THEN
384: COMMIT WORK;
385: END IF;
386: --Standard call to get message count and if count=1, get the message
387: FND_MSG_PUB.Count_And_Get (
388: p_count => x_msg_count,
389: p_data => x_msg_data
390: );
391: EXCEPTION
392: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
393: ROLLBACK TO Add_Queue_Pvt;
394: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
395: -- Standard call to get message count and if count=1, get the message
396: FND_MSG_PUB.Count_And_Get (
397: p_count => x_msg_count,
398: p_data => x_msg_data
399: );
400: WHEN FND_API.G_EXC_ERROR THEN
400: WHEN FND_API.G_EXC_ERROR THEN
401: ROLLBACK TO Add_Queue_Pvt;
402: x_return_status := FND_API.G_RET_STS_ERROR;
403: -- Standard call to get message count and if count=1, get the message
404: FND_MSG_PUB.Count_And_Get (
405: p_count => x_msg_count,
406: p_data => x_msg_data
407: );
408: WHEN OTHERS THEN
407: );
408: WHEN OTHERS THEN
409: ROLLBACK TO Add_Queue_Pvt;
410: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
411: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
412: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
413: END IF;
414: -- Standard call to get message count and if count=1, get the message
415: FND_MSG_PUB.Count_And_Get (
408: WHEN OTHERS THEN
409: ROLLBACK TO Add_Queue_Pvt;
410: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
411: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
412: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
413: END IF;
414: -- Standard call to get message count and if count=1, get the message
415: FND_MSG_PUB.Count_And_Get (
416: p_count => x_msg_count,
411: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
412: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
413: END IF;
414: -- Standard call to get message count and if count=1, get the message
415: FND_MSG_PUB.Count_And_Get (
416: p_count => x_msg_count,
417: p_data => x_msg_data
418: );
419: END Add_Queue;
450: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
451: END IF;
452: --Initialize message list if p_init_msg_list is TRUE.
453: IF FND_API.To_Boolean (p_init_msg_list) THEN
454: FND_MSG_PUB.initialize;
455: END IF;
456: -- Initialize API return status to success
457: x_return_status := FND_API.G_RET_STS_SUCCESS;
458: -- Get the current (login) user id.
465: IF (p_check_login_user = FND_API.G_TRUE) THEN
466: -- Check if user is login and has the required privilege.
467: IF (l_current_login_id = FND_API.G_MISS_NUM) THEN
468: -- User is not login.
469: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
470: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_LOGIN');
471: FND_MSG_PUB.Add;
472: END IF;
473: RAISE FND_API.G_EXC_ERROR;
467: IF (l_current_login_id = FND_API.G_MISS_NUM) THEN
468: -- User is not login.
469: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
470: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_LOGIN');
471: FND_MSG_PUB.Add;
472: END IF;
473: RAISE FND_API.G_EXC_ERROR;
474: END IF;
475: AMV_USER_PVT.Is_Administrator
483: x_result_flag => l_admin_flag
484: );
485: IF (l_admin_flag <> FND_API.G_TRUE) THEN
486: -- User is not an administrator.
487: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
488: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_HAVE_PRIVILEGE');
489: FND_MSG_PUB.Add;
490: END IF;
491: RAISE FND_API.G_EXC_ERROR;
485: IF (l_admin_flag <> FND_API.G_TRUE) THEN
486: -- User is not an administrator.
487: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
488: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_HAVE_PRIVILEGE');
489: FND_MSG_PUB.Add;
490: END IF;
491: RAISE FND_API.G_EXC_ERROR;
492: END IF;
493: END IF;
501: IF FND_API.To_Boolean ( p_commit ) THEN
502: COMMIT WORK;
503: END IF;
504: --Standard call to get message count and if count=1, get the message
505: FND_MSG_PUB.Count_And_Get (
506: p_count => x_msg_count,
507: p_data => x_msg_data
508: );
509: EXCEPTION
510: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
511: ROLLBACK TO Delete_Queue_Pvt;
512: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
513: -- Standard call to get message count and if count=1, get the message
514: FND_MSG_PUB.Count_And_Get (
515: p_count => x_msg_count,
516: p_data => x_msg_data
517: );
518: WHEN FND_API.G_EXC_ERROR THEN
518: WHEN FND_API.G_EXC_ERROR THEN
519: ROLLBACK TO Delete_Queue_Pvt;
520: x_return_status := FND_API.G_RET_STS_ERROR;
521: -- Standard call to get message count and if count=1, get the message
522: FND_MSG_PUB.Count_And_Get (
523: p_count => x_msg_count,
524: p_data => x_msg_data
525: );
526: WHEN OTHERS THEN
525: );
526: WHEN OTHERS THEN
527: ROLLBACK TO Delete_Queue_Pvt;
528: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
529: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
530: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
531: END IF;
532: -- Standard call to get message count and if count=1, get the message
533: FND_MSG_PUB.Count_And_Get (
526: WHEN OTHERS THEN
527: ROLLBACK TO Delete_Queue_Pvt;
528: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
529: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
530: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
531: END IF;
532: -- Standard call to get message count and if count=1, get the message
533: FND_MSG_PUB.Count_And_Get (
534: p_count => x_msg_count,
529: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
530: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
531: END IF;
532: -- Standard call to get message count and if count=1, get the message
533: FND_MSG_PUB.Count_And_Get (
534: p_count => x_msg_count,
535: p_data => x_msg_data
536: );
537: END Delete_Queue;
567: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
568: END IF;
569: --Initialize message list if p_init_msg_list is TRUE.
570: IF FND_API.To_Boolean (p_init_msg_list) THEN
571: FND_MSG_PUB.initialize;
572: END IF;
573: -- Initialize API return status to success
574: x_return_status := FND_API.G_RET_STS_SUCCESS;
575: -- Get the current (login) user id.
582: IF (p_check_login_user = FND_API.G_TRUE) THEN
583: -- Check if user is login and has the required privilege.
584: IF (l_current_login_id = FND_API.G_MISS_NUM) THEN
585: -- User is not login.
586: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
587: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_LOGIN');
588: FND_MSG_PUB.Add;
589: END IF;
590: RAISE FND_API.G_EXC_ERROR;
584: IF (l_current_login_id = FND_API.G_MISS_NUM) THEN
585: -- User is not login.
586: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
587: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_LOGIN');
588: FND_MSG_PUB.Add;
589: END IF;
590: RAISE FND_API.G_EXC_ERROR;
591: END IF;
592: AMV_USER_PVT.Is_Administrator
600: x_result_flag => l_admin_flag
601: );
602: IF (l_admin_flag <> FND_API.G_TRUE) THEN
603: -- User is not an administrator.
604: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
605: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_HAVE_PRIVILEGE');
606: FND_MSG_PUB.Add;
607: END IF;
608: RAISE FND_API.G_EXC_ERROR;
602: IF (l_admin_flag <> FND_API.G_TRUE) THEN
603: -- User is not an administrator.
604: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
605: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_HAVE_PRIVILEGE');
606: FND_MSG_PUB.Add;
607: END IF;
608: RAISE FND_API.G_EXC_ERROR;
609: END IF;
610: END IF;
617: IF FND_API.To_Boolean ( p_commit ) THEN
618: COMMIT WORK;
619: END IF;
620: --Standard call to get message count and if count=1, get the message
621: FND_MSG_PUB.Count_And_Get (
622: p_count => x_msg_count,
623: p_data => x_msg_data
624: );
625: EXCEPTION
626: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
627: ROLLBACK TO Enqueue_Message_Pvt;
628: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
629: -- Standard call to get message count and if count=1, get the message
630: FND_MSG_PUB.Count_And_Get (
631: p_count => x_msg_count,
632: p_data => x_msg_data
633: );
634: WHEN FND_API.G_EXC_ERROR THEN
634: WHEN FND_API.G_EXC_ERROR THEN
635: ROLLBACK TO Enqueue_Message_Pvt;
636: x_return_status := FND_API.G_RET_STS_ERROR;
637: -- Standard call to get message count and if count=1, get the message
638: FND_MSG_PUB.Count_And_Get (
639: p_count => x_msg_count,
640: p_data => x_msg_data
641: );
642: WHEN OTHERS THEN
641: );
642: WHEN OTHERS THEN
643: ROLLBACK TO Enqueue_Message_Pvt;
644: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
645: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
646: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
647: END IF;
648: -- Standard call to get message count and if count=1, get the message
649: FND_MSG_PUB.Count_And_Get (
642: WHEN OTHERS THEN
643: ROLLBACK TO Enqueue_Message_Pvt;
644: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
645: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
646: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
647: END IF;
648: -- Standard call to get message count and if count=1, get the message
649: FND_MSG_PUB.Count_And_Get (
650: p_count => x_msg_count,
645: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
646: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
647: END IF;
648: -- Standard call to get message count and if count=1, get the message
649: FND_MSG_PUB.Count_And_Get (
650: p_count => x_msg_count,
651: p_data => x_msg_data
652: );
653: END Enqueue_Message;
684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
685: END IF;
686: --Initialize message list if p_init_msg_list is TRUE.
687: IF FND_API.To_Boolean (p_init_msg_list) THEN
688: FND_MSG_PUB.initialize;
689: END IF;
690: -- Initialize API return status to success
691: x_return_status := FND_API.G_RET_STS_SUCCESS;
692: -- Get the current (login) user id.
699: IF (p_check_login_user = FND_API.G_TRUE) THEN
700: -- Check if user is login and has the required privilege.
701: IF (l_current_login_id = FND_API.G_MISS_NUM) THEN
702: -- User is not login.
703: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
704: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_LOGIN');
705: FND_MSG_PUB.Add;
706: END IF;
707: RAISE FND_API.G_EXC_ERROR;
701: IF (l_current_login_id = FND_API.G_MISS_NUM) THEN
702: -- User is not login.
703: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
704: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_LOGIN');
705: FND_MSG_PUB.Add;
706: END IF;
707: RAISE FND_API.G_EXC_ERROR;
708: END IF;
709: AMV_USER_PVT.Is_Administrator
717: x_result_flag => l_admin_flag
718: );
719: IF (l_admin_flag <> FND_API.G_TRUE) THEN
720: -- User is not an administrator.
721: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
722: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_HAVE_PRIVILEGE');
723: FND_MSG_PUB.Add;
724: END IF;
725: RAISE FND_API.G_EXC_ERROR;
719: IF (l_admin_flag <> FND_API.G_TRUE) THEN
720: -- User is not an administrator.
721: IF FND_MSG_PUB.Check_Msg_level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
722: FND_MESSAGE.Set_name('AMV','AMV_USER_NOT_HAVE_PRIVILEGE');
723: FND_MSG_PUB.Add;
724: END IF;
725: RAISE FND_API.G_EXC_ERROR;
726: END IF;
727: END IF;
735: IF FND_API.To_Boolean ( p_commit ) THEN
736: COMMIT WORK;
737: END IF;
738: --Standard call to get message count and if count=1, get the message
739: FND_MSG_PUB.Count_And_Get (
740: p_count => x_msg_count,
741: p_data => x_msg_data
742: );
743: EXCEPTION
744: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
745: ROLLBACK TO Delete_Queue_Pvt;
746: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
747: -- Standard call to get message count and if count=1, get the message
748: FND_MSG_PUB.Count_And_Get (
749: p_count => x_msg_count,
750: p_data => x_msg_data
751: );
752: WHEN FND_API.G_EXC_ERROR THEN
752: WHEN FND_API.G_EXC_ERROR THEN
753: ROLLBACK TO Delete_Queue_Pvt;
754: x_return_status := FND_API.G_RET_STS_ERROR;
755: -- Standard call to get message count and if count=1, get the message
756: FND_MSG_PUB.Count_And_Get (
757: p_count => x_msg_count,
758: p_data => x_msg_data
759: );
760: WHEN OTHERS THEN
759: );
760: WHEN OTHERS THEN
761: ROLLBACK TO Delete_Queue_Pvt;
762: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
763: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
764: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
765: END IF;
766: -- Standard call to get message count and if count=1, get the message
767: FND_MSG_PUB.Count_And_Get (
760: WHEN OTHERS THEN
761: ROLLBACK TO Delete_Queue_Pvt;
762: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
763: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
764: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
765: END IF;
766: -- Standard call to get message count and if count=1, get the message
767: FND_MSG_PUB.Count_And_Get (
768: p_count => x_msg_count,
763: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
764: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
765: END IF;
766: -- Standard call to get message count and if count=1, get the message
767: FND_MSG_PUB.Count_And_Get (
768: p_count => x_msg_count,
769: p_data => x_msg_data
770: );
771: END Dequeue_Message;