62: AMS_DEBUG_MEDIUM_ON CONSTANT boolean := FND_MSG_PUB.CHECK_MSG_LEVEL(FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM);
63:
64: PROCEDURE Create_thldchk
65: ( p_api_version IN NUMBER,
66: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
67: p_commit IN VARCHAR2 := FND_API.G_False,
68: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
69: x_return_status OUT NOCOPY VARCHAR2,
70: x_msg_count OUT NOCOPY NUMBER,
63:
64: PROCEDURE Create_thldchk
65: ( p_api_version IN NUMBER,
66: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
67: p_commit IN VARCHAR2 := FND_API.G_False,
68: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
69: x_return_status OUT NOCOPY VARCHAR2,
70: x_msg_count OUT NOCOPY NUMBER,
71: x_msg_data OUT NOCOPY VARCHAR2,
64: PROCEDURE Create_thldchk
65: ( p_api_version IN NUMBER,
66: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
67: p_commit IN VARCHAR2 := FND_API.G_False,
68: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
69: x_return_status OUT NOCOPY VARCHAR2,
70: x_msg_count OUT NOCOPY NUMBER,
71: x_msg_data OUT NOCOPY VARCHAR2,
72:
109:
110: --
111: -- Initialize message list IF p_init_msg_list is set to TRUE.
112: --
113: IF FND_API.to_Boolean( p_init_msg_list ) THEN
114: FND_MSG_PUB.initialize;
115: END IF;
116:
117: --
116:
117: --
118: -- Standard call to check for call compatibility.
119: --
120: IF NOT FND_API.Compatible_API_Call ( l_api_version,
121: p_api_version,
122: l_api_name,
123: G_PKG_NAME)
124: THEN
121: p_api_version,
122: l_api_name,
123: G_PKG_NAME)
124: THEN
125: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
126: END IF;
127:
128: --
129: -- Initialize API return status to success
127:
128: --
129: -- Initialize API return status to success
130: --
131: x_return_status := FND_API.G_RET_STS_SUCCESS;
132:
133: --
134: -- API body
135: --
151: ,p_thldchk_rec => l_thldchk_rec
152: );
153: -- dbms_output.put_line('Status After Validation : '||l_return_status);
154: -- If any errors happen abort API.
155: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
156: RAISE FND_API.G_EXC_ERROR;
157: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
158: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
159: END IF;
152: );
153: -- dbms_output.put_line('Status After Validation : '||l_return_status);
154: -- If any errors happen abort API.
155: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
156: RAISE FND_API.G_EXC_ERROR;
157: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
158: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
159: END IF;
160:
153: -- dbms_output.put_line('Status After Validation : '||l_return_status);
154: -- If any errors happen abort API.
155: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
156: RAISE FND_API.G_EXC_ERROR;
157: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
158: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
159: END IF;
160:
161: --
154: -- If any errors happen abort API.
155: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
156: RAISE FND_API.G_EXC_ERROR;
157: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
158: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
159: END IF;
160:
161: --
162: -- Insert the Record in Trigger Checks table
267:
268: --
269: -- Standard check of p_commit.
270: --
271: IF FND_API.To_Boolean ( p_commit )
272: THEN
273: COMMIT WORK;
274: END IF;
275:
278: --
279: FND_MSG_PUB.Count_AND_Get
280: ( p_count => x_msg_count,
281: p_data => x_msg_data,
282: p_encoded => FND_API.G_FALSE
283: );
284:
285: IF (AMS_DEBUG_HIGH_ON) THEN
286:
291: END IF;
292:
293:
294: EXCEPTION
295: WHEN FND_API.G_EXC_ERROR THEN
296: ROLLBACK TO Create_Thldchk_PVT;
297: x_return_status := FND_API.G_RET_STS_ERROR ;
298:
299: FND_MSG_PUB.Count_AND_Get
293:
294: EXCEPTION
295: WHEN FND_API.G_EXC_ERROR THEN
296: ROLLBACK TO Create_Thldchk_PVT;
297: x_return_status := FND_API.G_RET_STS_ERROR ;
298:
299: FND_MSG_PUB.Count_AND_Get
300: ( p_count => x_msg_count,
301: p_data => x_msg_data,
298:
299: FND_MSG_PUB.Count_AND_Get
300: ( p_count => x_msg_count,
301: p_data => x_msg_data,
302: p_encoded => FND_API.G_FALSE
303: );
304:
305: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
306: ROLLBACK TO Create_Thldchk_PVT;
301: p_data => x_msg_data,
302: p_encoded => FND_API.G_FALSE
303: );
304:
305: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
306: ROLLBACK TO Create_Thldchk_PVT;
307: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
308:
309: FND_MSG_PUB.Count_AND_Get
303: );
304:
305: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
306: ROLLBACK TO Create_Thldchk_PVT;
307: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
308:
309: FND_MSG_PUB.Count_AND_Get
310: ( p_count => x_msg_count,
311: p_data => x_msg_data,
308:
309: FND_MSG_PUB.Count_AND_Get
310: ( p_count => x_msg_count,
311: p_data => x_msg_data,
312: p_encoded => FND_API.G_FALSE
313: );
314:
315: WHEN OTHERS THEN
316: ROLLBACK TO Create_Thldchk_PVT;
313: );
314:
315: WHEN OTHERS THEN
316: ROLLBACK TO Create_Thldchk_PVT;
317: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
318:
319: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
320: THEN
321: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
323:
324: FND_MSG_PUB.Count_AND_Get
325: ( p_count => x_msg_count,
326: p_data => x_msg_data,
327: p_encoded => FND_API.G_FALSE
328: );
329:
330: END Create_Thldchk;
331:
348: -- End of Comments
349:
350: PROCEDURE Delete_Thldchk
351: ( p_api_version IN NUMBER,
352: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
353: p_commit IN VARCHAR2 := FND_API.G_False,
354:
355: x_return_status OUT NOCOPY VARCHAR2,
356: x_msg_count OUT NOCOPY NUMBER,
349:
350: PROCEDURE Delete_Thldchk
351: ( p_api_version IN NUMBER,
352: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
353: p_commit IN VARCHAR2 := FND_API.G_False,
354:
355: x_return_status OUT NOCOPY VARCHAR2,
356: x_msg_count OUT NOCOPY NUMBER,
357: x_msg_data OUT NOCOPY VARCHAR2,
381:
382: --
383: -- Initialize message list IF p_init_msg_list is set to TRUE.
384: --
385: IF FND_API.to_Boolean( p_init_msg_list ) THEN
386: FND_MSG_PUB.initialize;
387: END IF;
388:
389: --
388:
389: --
390: -- Standard call to check for call compatibility.
391: --
392: IF NOT FND_API.Compatible_API_Call (l_api_version,
393: p_api_version,
394: l_api_name,
395: G_PKG_NAME)
396: THEN
393: p_api_version,
394: l_api_name,
395: G_PKG_NAME)
396: THEN
397: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
398: END IF;
399:
400: -- Initialize API return status to success
401: x_return_status := FND_API.G_RET_STS_SUCCESS;
397: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
398: END IF;
399:
400: -- Initialize API return status to success
401: x_return_status := FND_API.G_RET_STS_SUCCESS;
402:
403: --
404: -- API body
405: --
430: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
431: FND_MSG_PUB.Add;
432: END IF;
433:
434: RAISE FND_API.G_EXC_ERROR;
435: END IF;
436:
437: --
438: -- END of API body.
439: --
440: --
441: -- Standard check of p_commit.
442: --
443: IF FND_API.To_Boolean ( p_commit )
444: THEN
445: COMMIT WORK;
446: END IF;
447:
450: --
451: FND_MSG_PUB.Count_AND_Get
452: ( p_count => x_msg_count,
453: p_data => x_msg_data,
454: p_encoded => FND_API.G_FALSE
455: );
456:
457: EXCEPTION
458: WHEN FND_API.G_EXC_ERROR THEN
454: p_encoded => FND_API.G_FALSE
455: );
456:
457: EXCEPTION
458: WHEN FND_API.G_EXC_ERROR THEN
459: ROLLBACK TO Delete_Thldchk_PVT;
460: x_return_status := FND_API.G_RET_STS_ERROR ;
461:
462: FND_MSG_PUB.Count_AND_Get
456:
457: EXCEPTION
458: WHEN FND_API.G_EXC_ERROR THEN
459: ROLLBACK TO Delete_Thldchk_PVT;
460: x_return_status := FND_API.G_RET_STS_ERROR ;
461:
462: FND_MSG_PUB.Count_AND_Get
463: ( p_count => x_msg_count,
464: p_data => x_msg_data,
461:
462: FND_MSG_PUB.Count_AND_Get
463: ( p_count => x_msg_count,
464: p_data => x_msg_data,
465: p_encoded => FND_API.G_FALSE
466: );
467: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
468:
469: ROLLBACK TO Delete_Thldchk_PVT;
463: ( p_count => x_msg_count,
464: p_data => x_msg_data,
465: p_encoded => FND_API.G_FALSE
466: );
467: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
468:
469: ROLLBACK TO Delete_Thldchk_PVT;
470: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
471:
466: );
467: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
468:
469: ROLLBACK TO Delete_Thldchk_PVT;
470: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
471:
472: FND_MSG_PUB.Count_AND_Get
473: ( p_count => x_msg_count,
474: p_data => x_msg_data,
471:
472: FND_MSG_PUB.Count_AND_Get
473: ( p_count => x_msg_count,
474: p_data => x_msg_data,
475: p_encoded => FND_API.G_FALSE
476: );
477: WHEN OTHERS THEN
478:
479: ROLLBACK TO Delete_Thldchk_PVT;
476: );
477: WHEN OTHERS THEN
478:
479: ROLLBACK TO Delete_Thldchk_PVT;
480: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
481:
482: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
483: THEN
484: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
486:
487: FND_MSG_PUB.Count_AND_Get
488: ( p_count => x_msg_count,
489: p_data => x_msg_data,
490: p_encoded => FND_API.G_FALSE
491: );
492: END Delete_Thldchk;
493:
494: -- Start of Comments
508: -- End of Comments
509:
510: PROCEDURE Lock_Thldchk
511: ( p_api_version IN NUMBER,
512: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
513:
514: x_return_status OUT NOCOPY VARCHAR2,
515: x_msg_count OUT NOCOPY NUMBER,
516: x_msg_data OUT NOCOPY VARCHAR2,
546:
547: --
548: -- Initialize message list if p_init_msg_list is set to TRUE.
549: --
550: IF FND_API.to_boolean(p_init_msg_list) THEN
551: FND_MSG_PUB.initialize;
552: END IF;
553:
554: --
553:
554: --
555: -- Standard call to check for call compatibility.
556: --
557: IF NOT FND_API.Compatible_API_Call ( l_api_version,
558: p_api_version,
559: l_api_name,
560: G_PKG_NAME)
561: THEN
558: p_api_version,
559: l_api_name,
560: G_PKG_NAME)
561: THEN
562: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
563: END IF;
564:
565: -- Initialize API return status to success
566: x_return_status := FND_API.G_RET_STS_SUCCESS;
562: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
563: END IF;
564:
565: -- Initialize API return status to success
566: x_return_status := FND_API.G_RET_STS_SUCCESS;
567:
568: --
569: -- API body
570: --
589: FND_MESSAGE.Set_Name('FND', 'AMS_API_RECORD_NOT_FOUND');
590: FND_MSG_PUB.Add;
591: END IF;
592:
593: RAISE FND_API.G_EXC_ERROR;
594: END IF;
595:
596: CLOSE C_ams_trigger_checks;
597:
604: --
605: FND_MSG_PUB.Count_AND_Get
606: ( p_count => x_msg_count,
607: p_data => x_msg_data,
608: p_encoded => FND_API.G_FALSE
609: );
610: --
611: -- Debug Message
612: --
615: AMS_Utility_PVT.debug_message(l_full_name ||': end');
616: END IF;
617:
618: EXCEPTION
619: WHEN FND_API.G_EXC_ERROR THEN
620: x_return_status := FND_API.G_RET_STS_ERROR ;
621:
622: FND_MSG_PUB.Count_AND_Get
623: ( p_count => x_msg_count,
616: END IF;
617:
618: EXCEPTION
619: WHEN FND_API.G_EXC_ERROR THEN
620: x_return_status := FND_API.G_RET_STS_ERROR ;
621:
622: FND_MSG_PUB.Count_AND_Get
623: ( p_count => x_msg_count,
624: p_data => x_msg_data,
621:
622: FND_MSG_PUB.Count_AND_Get
623: ( p_count => x_msg_count,
624: p_data => x_msg_data,
625: p_encoded => FND_API.G_FALSE
626: );
627:
628: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
629: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
624: p_data => x_msg_data,
625: p_encoded => FND_API.G_FALSE
626: );
627:
628: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
629: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
630:
631: FND_MSG_PUB.Count_AND_Get
632: ( p_count => x_msg_count,
625: p_encoded => FND_API.G_FALSE
626: );
627:
628: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
629: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
630:
631: FND_MSG_PUB.Count_AND_Get
632: ( p_count => x_msg_count,
633: p_data => x_msg_data,
630:
631: FND_MSG_PUB.Count_AND_Get
632: ( p_count => x_msg_count,
633: p_data => x_msg_data,
634: p_encoded => FND_API.G_FALSE
635: );
636:
637: WHEN AMS_UTILITY_PVT.RESOURCE_LOCKED THEN
638: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
634: p_encoded => FND_API.G_FALSE
635: );
636:
637: WHEN AMS_UTILITY_PVT.RESOURCE_LOCKED THEN
638: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
639:
640: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
641: THEN -- MMSG
642: FND_MESSAGE.SET_NAME('AMS','AMS_API_RESOURCE_LOCKED');
645:
646: FND_MSG_PUB.Count_AND_Get
647: ( p_count => x_msg_count,
648: p_data => x_msg_data,
649: p_encoded => FND_API.G_FALSE
650: );
651:
652: WHEN OTHERS THEN
653: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
649: p_encoded => FND_API.G_FALSE
650: );
651:
652: WHEN OTHERS THEN
653: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
654:
655: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
656: THEN
657: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
659:
660: FND_MSG_PUB.Count_AND_Get
661: ( p_count => x_msg_count,
662: p_data => x_msg_data,
663: p_encoded => FND_API.G_FALSE
664: );
665:
666: END Lock_Thldchk;
667:
682: -- End of Comments
683:
684: PROCEDURE Update_Thldchk
685: ( p_api_version IN NUMBER,
686: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
687: p_commit IN VARCHAR2 := FND_API.G_False,
688: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
689:
690: x_return_status OUT NOCOPY VARCHAR2,
683:
684: PROCEDURE Update_Thldchk
685: ( p_api_version IN NUMBER,
686: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
687: p_commit IN VARCHAR2 := FND_API.G_False,
688: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
689:
690: x_return_status OUT NOCOPY VARCHAR2,
691: x_msg_count OUT NOCOPY NUMBER,
684: PROCEDURE Update_Thldchk
685: ( p_api_version IN NUMBER,
686: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
687: p_commit IN VARCHAR2 := FND_API.G_False,
688: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
689:
690: x_return_status OUT NOCOPY VARCHAR2,
691: x_msg_count OUT NOCOPY NUMBER,
692: x_msg_data OUT NOCOPY VARCHAR2,
720:
721: --
722: -- Initialize message list IF p_init_msg_list is set to TRUE.
723: --
724: IF FND_API.to_Boolean( p_init_msg_list ) THEN
725: FND_MSG_PUB.initialize;
726: END IF;
727:
728: --
727:
728: --
729: -- Standard call to check for call compatibility.
730: --
731: IF NOT FND_API.Compatible_API_Call ( l_api_version,
732: p_api_version,
733: l_api_name,
734: G_PKG_NAME)
735: THEN
732: p_api_version,
733: l_api_name,
734: G_PKG_NAME)
735: THEN
736: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
737: END IF;
738:
739: --
740: -- Initialize API return status to success
738:
739: --
740: -- Initialize API return status to success
741: --
742: x_return_status := FND_API.G_RET_STS_SUCCESS;
743:
744: --
745: -- API body
746: --
759: p_validation_mode => JTF_PLSQL_API.g_update,
760: x_return_status => l_return_status
761: );
762:
763: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
764: RAISE FND_API.g_exc_unexpected_error;
765: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
766: RAISE FND_API.g_exc_error;
767: END IF;
760: x_return_status => l_return_status
761: );
762:
763: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
764: RAISE FND_API.g_exc_unexpected_error;
765: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
766: RAISE FND_API.g_exc_error;
767: END IF;
768: END IF;
761: );
762:
763: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
764: RAISE FND_API.g_exc_unexpected_error;
765: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
766: RAISE FND_API.g_exc_error;
767: END IF;
768: END IF;
769:
762:
763: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
764: RAISE FND_API.g_exc_unexpected_error;
765: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
766: RAISE FND_API.g_exc_error;
767: END IF;
768: END IF;
769:
770: -- replace g_miss_char/num/date with current column values
776: p_complete_rec => l_thldchk_rec,
777: x_return_status => l_return_status
778: );
779: -- dbms_output.put_line('Status after Validation : '||l_return_status);
780: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
781: RAISE FND_API.g_exc_unexpected_error;
782: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
783: RAISE FND_API.g_exc_error;
784: END IF;
777: x_return_status => l_return_status
778: );
779: -- dbms_output.put_line('Status after Validation : '||l_return_status);
780: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
781: RAISE FND_API.g_exc_unexpected_error;
782: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
783: RAISE FND_API.g_exc_error;
784: END IF;
785: END IF;
778: );
779: -- dbms_output.put_line('Status after Validation : '||l_return_status);
780: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
781: RAISE FND_API.g_exc_unexpected_error;
782: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
783: RAISE FND_API.g_exc_error;
784: END IF;
785: END IF;
786:
779: -- dbms_output.put_line('Status after Validation : '||l_return_status);
780: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
781: RAISE FND_API.g_exc_unexpected_error;
782: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
783: RAISE FND_API.g_exc_error;
784: END IF;
785: END IF;
786:
787:
825: THEN -- MMSG
826: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
827: FND_MSG_PUB.Add;
828: END IF;
829: RAISE FND_API.G_EXC_ERROR;
830: END IF;
831:
832: --
833: -- END of API body.
833: -- END of API body.
834: --
835:
836: -- Standard check of p_commit.
837: IF FND_API.To_Boolean ( p_commit )
838: THEN
839: COMMIT WORK;
840: END IF;
841:
844: --
845: FND_MSG_PUB.Count_AND_Get
846: ( p_count => x_msg_count,
847: p_data => x_msg_data,
848: p_encoded => FND_API.G_FALSE
849: );
850:
851: --
852: -- Debug Message
856: AMS_Utility_PVT.debug_message(l_full_name ||': end');
857: END IF;
858:
859: EXCEPTION
860: WHEN FND_API.G_EXC_ERROR THEN
861: ROLLBACK TO Update_Thldchk_PVT;
862: x_return_status := FND_API.G_RET_STS_ERROR ;
863:
864: FND_MSG_PUB.Count_AND_Get
858:
859: EXCEPTION
860: WHEN FND_API.G_EXC_ERROR THEN
861: ROLLBACK TO Update_Thldchk_PVT;
862: x_return_status := FND_API.G_RET_STS_ERROR ;
863:
864: FND_MSG_PUB.Count_AND_Get
865: ( p_count => x_msg_count,
866: p_data => x_msg_data,
863:
864: FND_MSG_PUB.Count_AND_Get
865: ( p_count => x_msg_count,
866: p_data => x_msg_data,
867: p_encoded => FND_API.G_FALSE
868: );
869:
870: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
871: ROLLBACK TO Update_Thldchk_PVT;
866: p_data => x_msg_data,
867: p_encoded => FND_API.G_FALSE
868: );
869:
870: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
871: ROLLBACK TO Update_Thldchk_PVT;
872: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
873:
874: FND_MSG_PUB.Count_AND_Get
868: );
869:
870: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
871: ROLLBACK TO Update_Thldchk_PVT;
872: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
873:
874: FND_MSG_PUB.Count_AND_Get
875: ( p_count => x_msg_count,
876: p_data => x_msg_data,
873:
874: FND_MSG_PUB.Count_AND_Get
875: ( p_count => x_msg_count,
876: p_data => x_msg_data,
877: p_encoded => FND_API.G_FALSE
878: );
879:
880: WHEN OTHERS THEN
881: ROLLBACK TO Update_Thldchk_PVT;
878: );
879:
880: WHEN OTHERS THEN
881: ROLLBACK TO Update_Thldchk_PVT;
882: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
883:
884: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
885: THEN
886: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
888:
889: FND_MSG_PUB.Count_AND_Get
890: ( p_count => x_msg_count,
891: p_data => x_msg_data,
892: p_encoded => FND_API.G_FALSE
893: );
894: END Update_Thldchk;
895:
896: -- Start of Comments
910: -- End of Comments
911:
912: PROCEDURE Validate_Thldchk
913: ( p_api_version IN NUMBER,
914: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
915: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
916: x_return_status OUT NOCOPY VARCHAR2,
917: x_msg_count OUT NOCOPY NUMBER,
918: x_msg_data OUT NOCOPY VARCHAR2,
911:
912: PROCEDURE Validate_Thldchk
913: ( p_api_version IN NUMBER,
914: p_init_msg_list IN VARCHAR2 := FND_API.G_False,
915: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
916: x_return_status OUT NOCOPY VARCHAR2,
917: x_msg_count OUT NOCOPY NUMBER,
918: x_msg_data OUT NOCOPY VARCHAR2,
919:
939: AMS_Utility_PVT.debug_message(l_full_name||': start');
940: END IF;
941:
942: -- Initialize message list if p_init_msg_list is set to TRUE.
943: IF FND_API.to_Boolean( p_init_msg_list ) THEN
944: FND_MSG_PUB.initialize;
945: END IF;
946:
947: -- Standard call to check for call compatibility.
944: FND_MSG_PUB.initialize;
945: END IF;
946:
947: -- Standard call to check for call compatibility.
948: IF NOT FND_API.Compatible_API_Call ( l_api_version,
949: p_api_version,
950: l_api_name,
951: G_PKG_NAME)
952: THEN
949: p_api_version,
950: l_api_name,
951: G_PKG_NAME)
952: THEN
953: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
954: END IF;
955:
956: --
957: -- Initialize API return status to success
955:
956: --
957: -- Initialize API return status to success
958: --
959: x_return_status := FND_API.G_RET_STS_SUCCESS;
960:
961: --
962: -- API body
963: --
967: p_validation_mode => JTF_PLSQL_API.g_create,
968: x_return_status => l_return_status
969: );
970:
971: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
972: RAISE FND_API.g_exc_unexpected_error;
973: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
974: RAISE FND_API.g_exc_error;
975: END IF;
968: x_return_status => l_return_status
969: );
970:
971: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
972: RAISE FND_API.g_exc_unexpected_error;
973: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
974: RAISE FND_API.g_exc_error;
975: END IF;
976: END IF;
969: );
970:
971: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
972: RAISE FND_API.g_exc_unexpected_error;
973: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
974: RAISE FND_API.g_exc_error;
975: END IF;
976: END IF;
977:
970:
971: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
972: RAISE FND_API.g_exc_unexpected_error;
973: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
974: RAISE FND_API.g_exc_error;
975: END IF;
976: END IF;
977:
978: --
988: p_thldchk_rec => p_thldchk_rec,
989: p_complete_rec => NULL,
990: x_return_status => l_return_status
991: );
992: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
993: RAISE FND_API.g_exc_unexpected_error;
994: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
995: RAISE FND_API.g_exc_error;
996: END IF;
989: p_complete_rec => NULL,
990: x_return_status => l_return_status
991: );
992: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
993: RAISE FND_API.g_exc_unexpected_error;
994: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
995: RAISE FND_API.g_exc_error;
996: END IF;
997: END IF;
990: x_return_status => l_return_status
991: );
992: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
993: RAISE FND_API.g_exc_unexpected_error;
994: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
995: RAISE FND_API.g_exc_error;
996: END IF;
997: END IF;
998:
991: );
992: IF l_return_status = FND_API.g_ret_sts_unexp_error THEN
993: RAISE FND_API.g_exc_unexpected_error;
994: ELSIF l_return_status = FND_API.g_ret_sts_error THEN
995: RAISE FND_API.g_exc_error;
996: END IF;
997: END IF;
998:
999: --
1001: --
1002: FND_MSG_PUB.Count_AND_Get
1003: ( p_count => x_msg_count,
1004: p_data => x_msg_data,
1005: p_encoded => FND_API.G_FALSE
1006: );
1007:
1008: --
1009: -- Debug Message
1014: END IF;
1015:
1016: EXCEPTION
1017:
1018: WHEN FND_API.G_EXC_ERROR THEN
1019: x_return_status := FND_API.G_RET_STS_ERROR ;
1020: FND_MSG_PUB.Count_AND_Get
1021: ( p_count => x_msg_count,
1022: p_data => x_msg_data,
1015:
1016: EXCEPTION
1017:
1018: WHEN FND_API.G_EXC_ERROR THEN
1019: x_return_status := FND_API.G_RET_STS_ERROR ;
1020: FND_MSG_PUB.Count_AND_Get
1021: ( p_count => x_msg_count,
1022: p_data => x_msg_data,
1023: p_encoded => FND_API.G_FALSE
1019: x_return_status := FND_API.G_RET_STS_ERROR ;
1020: FND_MSG_PUB.Count_AND_Get
1021: ( p_count => x_msg_count,
1022: p_data => x_msg_data,
1023: p_encoded => FND_API.G_FALSE
1024: );
1025:
1026: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1027: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1022: p_data => x_msg_data,
1023: p_encoded => FND_API.G_FALSE
1024: );
1025:
1026: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1027: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1028: FND_MSG_PUB.Count_AND_Get
1029: ( p_count => x_msg_count,
1030: p_data => x_msg_data,
1023: p_encoded => FND_API.G_FALSE
1024: );
1025:
1026: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1027: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1028: FND_MSG_PUB.Count_AND_Get
1029: ( p_count => x_msg_count,
1030: p_data => x_msg_data,
1031: p_encoded => FND_API.G_FALSE
1027: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1028: FND_MSG_PUB.Count_AND_Get
1029: ( p_count => x_msg_count,
1030: p_data => x_msg_data,
1031: p_encoded => FND_API.G_FALSE
1032: );
1033:
1034: WHEN OTHERS THEN
1035: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1031: p_encoded => FND_API.G_FALSE
1032: );
1033:
1034: WHEN OTHERS THEN
1035: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1036: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR )
1037: THEN
1038: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
1039: END IF;
1040:
1041: FND_MSG_PUB.Count_AND_Get
1042: ( p_count => x_msg_count,
1043: p_data => x_msg_data,
1044: p_encoded => FND_API.G_FALSE
1045: );
1046:
1047: END Validate_thldChk;
1048:
1070: IS
1071:
1072: BEGIN
1073: -- Initialize API/Procedure return status to success
1074: x_return_status := FND_API.G_Ret_Sts_Success;
1075:
1076: --
1077: -- Trigger ID
1078: --
1078: --
1079: IF p_thldchk_rec.trigger_id IS NULL
1080: THEN
1081: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_TRIG_ID');
1082: x_return_status := FND_API.G_RET_STS_ERROR;
1083: RETURN;
1084: END IF;
1085:
1086: --
1088: --
1089: IF p_thldchk_rec.chk1_type IS NULL
1090: THEN
1091: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_CHK1_TYPE');
1092: x_return_status := FND_API.G_RET_STS_ERROR;
1093: RETURN;
1094: END IF;
1095:
1096: --
1098: --
1099: IF p_thldchk_rec.chk2_type IS NULL
1100: THEN
1101: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_CHK2_TYPE');
1102: x_return_status := FND_API.G_RET_STS_ERROR;
1103: RETURN;
1104: END IF;
1105:
1106: --
1108: --
1109: IF p_thldchk_rec.chk1_to_chk2_operator_type IS NULL
1110: THEN
1111: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_OPERATOR');
1112: x_return_status := FND_API.G_RET_STS_ERROR;
1113: -- If any errors happen abort API/Procedure.
1114: RETURN;
1115: END IF;
1116:
1119: --
1120: IF p_thldchk_rec.chk1_source_code_metric_id IS NULL
1121: THEN
1122: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_MET');
1123: x_return_status := FND_API.G_RET_STS_ERROR;
1124: RETURN;
1125: END IF;
1126:
1127: IF p_thldchk_rec.chk1_act_object_id IS NULL
1126:
1127: IF p_thldchk_rec.chk1_act_object_id IS NULL
1128: THEN
1129: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_CHK1_OBJ');
1130: x_return_status := FND_API.G_RET_STS_ERROR;
1131: RETURN;
1132: END IF;
1133:
1134: --
1136: --
1137: IF p_thldchk_rec.chk1_source_code_metric_type IS NULL
1138: THEN
1139: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_MET_TYPE');
1140: x_return_status := FND_API.G_RET_STS_ERROR;
1141: -- If any errors happen abort API/Procedure.
1142: RETURN;
1143: END IF;
1144:
1171: l_valid_flag VARCHAR2(1);
1172: l_where_clause VARCHAR2(500);
1173: BEGIN
1174:
1175: x_return_status := FND_API.g_ret_sts_success;
1176:
1177: -- For create_thldchk, when trigger_check_id is passed in, we need to
1178: -- check if this trigger_check_id is unique.
1179: IF p_validation_mode = JTF_PLSQL_API.g_create
1181: THEN
1182: IF AMS_Utility_PVT.check_uniqueness(
1183: 'ams_trigger_checks',
1184: 'trigger_check_id = ' || p_thldchk_rec.trigger_check_id
1185: ) = FND_API.g_false
1186: THEN
1187: AMS_Utility_PVT.Error_Message('AMS_TRIG_DUPLICATE_CHECK');
1188: x_return_status := FND_API.g_ret_sts_error;
1189: RETURN;
1184: 'trigger_check_id = ' || p_thldchk_rec.trigger_check_id
1185: ) = FND_API.g_false
1186: THEN
1187: AMS_Utility_PVT.Error_Message('AMS_TRIG_DUPLICATE_CHECK');
1188: x_return_status := FND_API.g_ret_sts_error;
1189: RETURN;
1190: END IF;
1191: END IF;
1192: -- check other unique items
1203:
1204: IF AMS_Utility_PVT.Check_Uniqueness(
1205: p_table_name => 'ams_trigger_checks',
1206: p_where_clause => l_where_clause
1207: ) = FND_API.g_false
1208: THEN
1209: AMS_Utility_PVT.Error_Message('AMS_TRIG_DUP_TRIG_ID');
1210: x_return_status := FND_API.g_ret_sts_error;
1211: RETURN;
1206: p_where_clause => l_where_clause
1207: ) = FND_API.g_false
1208: THEN
1209: AMS_Utility_PVT.Error_Message('AMS_TRIG_DUP_TRIG_ID');
1210: x_return_status := FND_API.g_ret_sts_error;
1211: RETURN;
1212: END IF;
1213:
1214: END Check_Thldchk_Uk_Items;
1241: BEGIN
1242: --
1243: -- Initialize API/Procedure return status to success
1244: --
1245: x_return_status := FND_API.g_ret_sts_success;
1246:
1247: --
1248: -- Trigger ID
1249: --
1246:
1247: --
1248: -- Trigger ID
1249: --
1250: IF p_thldchk_rec.trigger_id <> FND_API.G_MISS_NUM
1251: THEN
1252: l_table_name := 'AMS_TRIGGERS' ;
1253: l_pk_name := 'trigger_id' ;
1254: l_pk_value := p_thldchk_rec.trigger_id;
1260: ,p_PK_name => l_pk_name
1261: ,p_PK_value => l_pk_value
1262: ,p_pk_data_type => l_pk_data_type
1263: ,p_additional_where_clause => l_additional_where_clause
1264: ) = FND_API.G_FALSE THEN
1265: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_TRIGGER_ID');
1266: x_return_status := FND_API.G_RET_STS_ERROR;
1267: -- If any errors happen abort API/Procedure.
1268: RETURN;
1262: ,p_pk_data_type => l_pk_data_type
1263: ,p_additional_where_clause => l_additional_where_clause
1264: ) = FND_API.G_FALSE THEN
1265: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_TRIGGER_ID');
1266: x_return_status := FND_API.G_RET_STS_ERROR;
1267: -- If any errors happen abort API/Procedure.
1268: RETURN;
1269: END IF;
1270:
1300: BEGIN
1301: --
1302: -- Initialize API/Procedure return status to success
1303: --
1304: x_return_status := FND_API.g_ret_sts_success;
1305:
1306: --
1307: -- Trigger ID
1308: --
1306: --
1307: -- Trigger ID
1308: --
1309: -- Check Chk2_type
1310: IF p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1311: THEN
1312: IF AMS_Utility_PVT.Check_Lookup_Exists
1313: ( p_lookup_table_name => 'AMS_LOOKUPS'
1314: ,p_lookup_type => 'AMS_TRIGGER_CHK_TYPE'
1312: IF AMS_Utility_PVT.Check_Lookup_Exists
1313: ( p_lookup_table_name => 'AMS_LOOKUPS'
1314: ,p_lookup_type => 'AMS_TRIGGER_CHK_TYPE'
1315: ,p_lookup_code => p_thldchk_rec.chk2_type
1316: ) = FND_API.G_FALSE
1317: THEN
1318: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_CHECK_TYPE');
1319: x_return_status := FND_API.G_RET_STS_ERROR;
1320: RETURN;
1315: ,p_lookup_code => p_thldchk_rec.chk2_type
1316: ) = FND_API.G_FALSE
1317: THEN
1318: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_CHECK_TYPE');
1319: x_return_status := FND_API.G_RET_STS_ERROR;
1320: RETURN;
1321: END IF;
1322: END IF;
1323:
1323:
1324: --
1325: -- Check CHK1_SOURCE_CODE_METRIC_TYPE
1326: --
1327: IF p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1328: THEN
1329: IF AMS_Utility_PVT.Check_Lookup_Exists
1330: ( p_lookup_table_name => 'AMS_LOOKUPS'
1331: ,p_lookup_type => 'AMS_MONITOR_CHK_METRIC_TYPE'
1329: IF AMS_Utility_PVT.Check_Lookup_Exists
1330: ( p_lookup_table_name => 'AMS_LOOKUPS'
1331: ,p_lookup_type => 'AMS_MONITOR_CHK_METRIC_TYPE'
1332: ,p_lookup_code => p_thldchk_rec.chk1_source_code_metric_type
1333: ) = FND_API.G_FALSE
1334: THEN
1335: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_METRIC_TYPE');
1336: x_return_status := FND_API.G_RET_STS_ERROR;
1337: RETURN;
1332: ,p_lookup_code => p_thldchk_rec.chk1_source_code_metric_type
1333: ) = FND_API.G_FALSE
1334: THEN
1335: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_METRIC_TYPE');
1336: x_return_status := FND_API.G_RET_STS_ERROR;
1337: RETURN;
1338: END IF;
1339: END IF;
1340:
1367: p_thldchk_rec => p_thldchk_rec,
1368: x_return_status => x_return_status
1369: );
1370: -- dbms_output.put_line('Status After REQ Test : '||x_return_status);
1371: IF x_return_status <> FND_API.g_ret_sts_success THEN
1372: RETURN;
1373: END IF;
1374:
1375: Check_Thldchk_Uk_Items(
1377: p_validation_mode => p_validation_mode,
1378: x_return_status => x_return_status
1379: );
1380: -- dbms_output.put_line('Status After UK Test : '||x_return_status);
1381: IF x_return_status <> FND_API.g_ret_sts_success THEN
1382: RETURN;
1383: END IF;
1384:
1385: Check_Thldchk_Fk_Items(
1386: p_thldchk_rec => p_thldchk_rec,
1387: x_return_status => x_return_status
1388: );
1389: -- dbms_output.put_line('Status After FK Test : '||x_return_status);
1390: IF x_return_status <> FND_API.g_ret_sts_success THEN
1391: RETURN;
1392: END IF;
1393:
1394: Check_Thldchk_Lookup_Items(
1395: p_thldchk_rec => p_thldchk_rec,
1396: x_return_status => x_return_status
1397: );
1398: -- dbms_output.put_line('Status After LOOKUP Test : '||x_return_status);
1399: IF x_return_status <> FND_API.g_ret_sts_success THEN
1400: RETURN;
1401: END IF;
1402:
1403: END Check_Thldchk_Items;
1470: BEGIN
1471: --
1472: -- Initialize the Out Variable
1473: --
1474: x_return_status := FND_API.g_ret_sts_success;
1475:
1476: -- Check start date time
1477: IF p_thldchk_rec.chk1_arc_source_code_from <> FND_API.G_MISS_CHAR
1478: OR p_thldchk_rec.chk1_act_object_id <> FND_API.G_MISS_NUM
1473: --
1474: x_return_status := FND_API.g_ret_sts_success;
1475:
1476: -- Check start date time
1477: IF p_thldchk_rec.chk1_arc_source_code_from <> FND_API.G_MISS_CHAR
1478: OR p_thldchk_rec.chk1_act_object_id <> FND_API.G_MISS_NUM
1479: OR p_thldchk_rec.chk1_source_code_metric_id <> FND_API.G_MISS_NUM
1480: OR p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1474: x_return_status := FND_API.g_ret_sts_success;
1475:
1476: -- Check start date time
1477: IF p_thldchk_rec.chk1_arc_source_code_from <> FND_API.G_MISS_CHAR
1478: OR p_thldchk_rec.chk1_act_object_id <> FND_API.G_MISS_NUM
1479: OR p_thldchk_rec.chk1_source_code_metric_id <> FND_API.G_MISS_NUM
1480: OR p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1475:
1476: -- Check start date time
1477: IF p_thldchk_rec.chk1_arc_source_code_from <> FND_API.G_MISS_CHAR
1478: OR p_thldchk_rec.chk1_act_object_id <> FND_API.G_MISS_NUM
1479: OR p_thldchk_rec.chk1_source_code_metric_id <> FND_API.G_MISS_NUM
1480: OR p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1476: -- Check start date time
1477: IF p_thldchk_rec.chk1_arc_source_code_from <> FND_API.G_MISS_CHAR
1478: OR p_thldchk_rec.chk1_act_object_id <> FND_API.G_MISS_NUM
1479: OR p_thldchk_rec.chk1_source_code_metric_id <> FND_API.G_MISS_NUM
1480: OR p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1477: IF p_thldchk_rec.chk1_arc_source_code_from <> FND_API.G_MISS_CHAR
1478: OR p_thldchk_rec.chk1_act_object_id <> FND_API.G_MISS_NUM
1479: OR p_thldchk_rec.chk1_source_code_metric_id <> FND_API.G_MISS_NUM
1480: OR p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1478: OR p_thldchk_rec.chk1_act_object_id <> FND_API.G_MISS_NUM
1479: OR p_thldchk_rec.chk1_source_code_metric_id <> FND_API.G_MISS_NUM
1480: OR p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1479: OR p_thldchk_rec.chk1_source_code_metric_id <> FND_API.G_MISS_NUM
1480: OR p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1480: OR p_thldchk_rec.chk1_source_code_metric_type <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1481: OR p_thldchk_rec.chk1_to_chk2_operator_type <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1482: OR p_thldchk_rec.chk2_type <> FND_API.G_MISS_CHAR
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1490: OR p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM
1483: OR p_thldchk_rec.chk2_value <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1490: OR p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM
1491: OR p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM
1484: OR p_thldchk_rec.chk2_low_value <> FND_API.G_MISS_NUM
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1490: OR p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM
1491: OR p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM
1492: OR p_thldchk_rec.chk2_source_code_metric_type <> FND_API.G_MISS_CHAR
1485: OR p_thldchk_rec.chk2_high_value <> FND_API.G_MISS_NUM
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1490: OR p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM
1491: OR p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM
1492: OR p_thldchk_rec.chk2_source_code_metric_type <> FND_API.G_MISS_CHAR
1493: OR p_thldchk_rec.chk2_workbook_name <> FND_API.G_MISS_CHAR
1486: --OR p_thldchk_rec.chk2_uom_code <> FND_API.G_MISS_CHAR
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1490: OR p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM
1491: OR p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM
1492: OR p_thldchk_rec.chk2_source_code_metric_type <> FND_API.G_MISS_CHAR
1493: OR p_thldchk_rec.chk2_workbook_name <> FND_API.G_MISS_CHAR
1494: THEN
1487: --OR p_thldchk_rec.chk2_currency_code <> FND_API.G_MISS_CHAR
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1490: OR p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM
1491: OR p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM
1492: OR p_thldchk_rec.chk2_source_code_metric_type <> FND_API.G_MISS_CHAR
1493: OR p_thldchk_rec.chk2_workbook_name <> FND_API.G_MISS_CHAR
1494: THEN
1495:
1488: --OR p_thldchk_rec.chk2_source_code <> FND_API.G_MISS_CHAR
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1490: OR p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM
1491: OR p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM
1492: OR p_thldchk_rec.chk2_source_code_metric_type <> FND_API.G_MISS_CHAR
1493: OR p_thldchk_rec.chk2_workbook_name <> FND_API.G_MISS_CHAR
1494: THEN
1495:
1496: IF p_thldchk_rec.chk1_arc_source_code_from = FND_API.G_MISS_CHAR THEN
1489: OR p_thldchk_rec.chk2_arc_source_code_from <> FND_API.G_MISS_CHAR
1490: OR p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM
1491: OR p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM
1492: OR p_thldchk_rec.chk2_source_code_metric_type <> FND_API.G_MISS_CHAR
1493: OR p_thldchk_rec.chk2_workbook_name <> FND_API.G_MISS_CHAR
1494: THEN
1495:
1496: IF p_thldchk_rec.chk1_arc_source_code_from = FND_API.G_MISS_CHAR THEN
1497: l_thldchk_rec.chk1_arc_source_code_from := p_complete_rec.chk1_arc_source_code_from ;
1492: OR p_thldchk_rec.chk2_source_code_metric_type <> FND_API.G_MISS_CHAR
1493: OR p_thldchk_rec.chk2_workbook_name <> FND_API.G_MISS_CHAR
1494: THEN
1495:
1496: IF p_thldchk_rec.chk1_arc_source_code_from = FND_API.G_MISS_CHAR THEN
1497: l_thldchk_rec.chk1_arc_source_code_from := p_complete_rec.chk1_arc_source_code_from ;
1498: END IF;
1499:
1500: IF p_thldchk_rec.chk1_act_object_id = FND_API.G_MISS_NUM THEN
1496: IF p_thldchk_rec.chk1_arc_source_code_from = FND_API.G_MISS_CHAR THEN
1497: l_thldchk_rec.chk1_arc_source_code_from := p_complete_rec.chk1_arc_source_code_from ;
1498: END IF;
1499:
1500: IF p_thldchk_rec.chk1_act_object_id = FND_API.G_MISS_NUM THEN
1501: l_thldchk_rec.chk1_act_object_id := p_complete_rec.chk1_act_object_id ;
1502: END IF;
1503:
1504: --IF p_thldchk_rec.chk1_source_code = FND_API.G_MISS_CHAR THEN
1500: IF p_thldchk_rec.chk1_act_object_id = FND_API.G_MISS_NUM THEN
1501: l_thldchk_rec.chk1_act_object_id := p_complete_rec.chk1_act_object_id ;
1502: END IF;
1503:
1504: --IF p_thldchk_rec.chk1_source_code = FND_API.G_MISS_CHAR THEN
1505: -- l_thldchk_rec.chk1_source_code := p_complete_rec.chk1_source_code ;
1506: --END IF;
1507:
1508: IF p_thldchk_rec.chk1_source_code_metric_id = FND_API.G_MISS_NUM THEN
1504: --IF p_thldchk_rec.chk1_source_code = FND_API.G_MISS_CHAR THEN
1505: -- l_thldchk_rec.chk1_source_code := p_complete_rec.chk1_source_code ;
1506: --END IF;
1507:
1508: IF p_thldchk_rec.chk1_source_code_metric_id = FND_API.G_MISS_NUM THEN
1509: l_thldchk_rec.chk1_source_code_metric_id := p_complete_rec.chk1_source_code_metric_id ;
1510: END IF;
1511:
1512: IF p_thldchk_rec.chk1_source_code_metric_type = FND_API.G_MISS_CHAR THEN
1508: IF p_thldchk_rec.chk1_source_code_metric_id = FND_API.G_MISS_NUM THEN
1509: l_thldchk_rec.chk1_source_code_metric_id := p_complete_rec.chk1_source_code_metric_id ;
1510: END IF;
1511:
1512: IF p_thldchk_rec.chk1_source_code_metric_type = FND_API.G_MISS_CHAR THEN
1513: l_thldchk_rec.chk1_source_code_metric_type := p_complete_rec.chk1_source_code_metric_type ;
1514: END IF;
1515:
1516: IF p_thldchk_rec.chk1_to_chk2_operator_type = FND_API.G_MISS_CHAR THEN
1512: IF p_thldchk_rec.chk1_source_code_metric_type = FND_API.G_MISS_CHAR THEN
1513: l_thldchk_rec.chk1_source_code_metric_type := p_complete_rec.chk1_source_code_metric_type ;
1514: END IF;
1515:
1516: IF p_thldchk_rec.chk1_to_chk2_operator_type = FND_API.G_MISS_CHAR THEN
1517: l_thldchk_rec.chk1_to_chk2_operator_type := p_complete_rec.chk1_to_chk2_operator_type ;
1518: END IF;
1519:
1520: IF p_thldchk_rec.chk2_type = FND_API.G_MISS_CHAR THEN
1516: IF p_thldchk_rec.chk1_to_chk2_operator_type = FND_API.G_MISS_CHAR THEN
1517: l_thldchk_rec.chk1_to_chk2_operator_type := p_complete_rec.chk1_to_chk2_operator_type ;
1518: END IF;
1519:
1520: IF p_thldchk_rec.chk2_type = FND_API.G_MISS_CHAR THEN
1521: l_thldchk_rec.chk2_type := p_complete_rec.chk2_type ;
1522: END IF;
1523:
1524: IF p_thldchk_rec.chk2_value = FND_API.G_MISS_NUM THEN
1520: IF p_thldchk_rec.chk2_type = FND_API.G_MISS_CHAR THEN
1521: l_thldchk_rec.chk2_type := p_complete_rec.chk2_type ;
1522: END IF;
1523:
1524: IF p_thldchk_rec.chk2_value = FND_API.G_MISS_NUM THEN
1525: l_thldchk_rec.chk2_value := p_complete_rec.chk2_value ;
1526: END IF;
1527:
1528: IF p_thldchk_rec.chk2_low_value = FND_API.G_MISS_NUM THEN
1524: IF p_thldchk_rec.chk2_value = FND_API.G_MISS_NUM THEN
1525: l_thldchk_rec.chk2_value := p_complete_rec.chk2_value ;
1526: END IF;
1527:
1528: IF p_thldchk_rec.chk2_low_value = FND_API.G_MISS_NUM THEN
1529: l_thldchk_rec.chk2_low_value := p_complete_rec.chk2_low_value ;
1530: END IF;
1531:
1532: IF p_thldchk_rec.chk2_high_value = FND_API.G_MISS_NUM THEN
1528: IF p_thldchk_rec.chk2_low_value = FND_API.G_MISS_NUM THEN
1529: l_thldchk_rec.chk2_low_value := p_complete_rec.chk2_low_value ;
1530: END IF;
1531:
1532: IF p_thldchk_rec.chk2_high_value = FND_API.G_MISS_NUM THEN
1533: l_thldchk_rec.chk2_high_value := p_complete_rec.chk2_high_value ;
1534: END IF;
1535:
1536: IF p_thldchk_rec.chk2_uom_code = FND_API.G_MISS_CHAR THEN
1532: IF p_thldchk_rec.chk2_high_value = FND_API.G_MISS_NUM THEN
1533: l_thldchk_rec.chk2_high_value := p_complete_rec.chk2_high_value ;
1534: END IF;
1535:
1536: IF p_thldchk_rec.chk2_uom_code = FND_API.G_MISS_CHAR THEN
1537: l_thldchk_rec.chk2_uom_code := p_complete_rec.chk2_uom_code ;
1538: END IF;
1539:
1540: IF p_thldchk_rec.chk2_currency_code = FND_API.G_MISS_CHAR THEN
1536: IF p_thldchk_rec.chk2_uom_code = FND_API.G_MISS_CHAR THEN
1537: l_thldchk_rec.chk2_uom_code := p_complete_rec.chk2_uom_code ;
1538: END IF;
1539:
1540: IF p_thldchk_rec.chk2_currency_code = FND_API.G_MISS_CHAR THEN
1541: l_thldchk_rec.chk2_currency_code := p_complete_rec.chk2_currency_code ;
1542: END IF;
1543:
1544: --IF p_thldchk_rec.chk2_source_code = FND_API.G_MISS_CHAR THEN
1540: IF p_thldchk_rec.chk2_currency_code = FND_API.G_MISS_CHAR THEN
1541: l_thldchk_rec.chk2_currency_code := p_complete_rec.chk2_currency_code ;
1542: END IF;
1543:
1544: --IF p_thldchk_rec.chk2_source_code = FND_API.G_MISS_CHAR THEN
1545: -- l_thldchk_rec.chk2_source_code := p_complete_rec.chk2_source_code ;
1546: --END IF;
1547:
1548: IF p_thldchk_rec.chk2_arc_source_code_from = FND_API.G_MISS_CHAR THEN
1544: --IF p_thldchk_rec.chk2_source_code = FND_API.G_MISS_CHAR THEN
1545: -- l_thldchk_rec.chk2_source_code := p_complete_rec.chk2_source_code ;
1546: --END IF;
1547:
1548: IF p_thldchk_rec.chk2_arc_source_code_from = FND_API.G_MISS_CHAR THEN
1549: l_thldchk_rec.chk2_arc_source_code_from := p_complete_rec.chk2_arc_source_code_from ;
1550: END IF;
1551:
1552: IF p_thldchk_rec.chk2_act_object_id = FND_API.G_MISS_NUM THEN
1548: IF p_thldchk_rec.chk2_arc_source_code_from = FND_API.G_MISS_CHAR THEN
1549: l_thldchk_rec.chk2_arc_source_code_from := p_complete_rec.chk2_arc_source_code_from ;
1550: END IF;
1551:
1552: IF p_thldchk_rec.chk2_act_object_id = FND_API.G_MISS_NUM THEN
1553: l_thldchk_rec.chk2_act_object_id := p_complete_rec.chk2_act_object_id ;
1554: END IF;
1555:
1556: IF p_thldchk_rec.chk2_source_code_metric_id = FND_API.G_MISS_NUM THEN
1552: IF p_thldchk_rec.chk2_act_object_id = FND_API.G_MISS_NUM THEN
1553: l_thldchk_rec.chk2_act_object_id := p_complete_rec.chk2_act_object_id ;
1554: END IF;
1555:
1556: IF p_thldchk_rec.chk2_source_code_metric_id = FND_API.G_MISS_NUM THEN
1557: l_thldchk_rec.chk2_source_code_metric_id := p_complete_rec.chk2_source_code_metric_id ;
1558: END IF;
1559:
1560: IF p_thldchk_rec.chk2_source_code_metric_type = FND_API.G_MISS_CHAR THEN
1556: IF p_thldchk_rec.chk2_source_code_metric_id = FND_API.G_MISS_NUM THEN
1557: l_thldchk_rec.chk2_source_code_metric_id := p_complete_rec.chk2_source_code_metric_id ;
1558: END IF;
1559:
1560: IF p_thldchk_rec.chk2_source_code_metric_type = FND_API.G_MISS_CHAR THEN
1561: l_thldchk_rec.chk2_source_code_metric_type := p_complete_rec.chk2_source_code_metric_type ;
1562: END IF;
1563:
1564: IF p_thldchk_rec.chk2_workbook_name = FND_API.G_MISS_CHAR THEN
1560: IF p_thldchk_rec.chk2_source_code_metric_type = FND_API.G_MISS_CHAR THEN
1561: l_thldchk_rec.chk2_source_code_metric_type := p_complete_rec.chk2_source_code_metric_type ;
1562: END IF;
1563:
1564: IF p_thldchk_rec.chk2_workbook_name = FND_API.G_MISS_CHAR THEN
1565: l_thldchk_rec.chk2_workbook_name := p_complete_rec.chk2_workbook_name ;
1566: END IF;
1567:
1568:
1602: ,p_pk_name => l_pk_name
1603: ,p_pk_value => l_pk_value
1604: ,p_pk_data_type => l_pk_data_type
1605: ,p_additional_where_clause => l_additional_where_clause
1606: ) = FND_API.G_FALSE
1607: THEN
1608: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_CREATED_FOR');
1609: x_return_status := FND_API.G_RET_STS_ERROR;
1610: RETURN;
1605: ,p_additional_where_clause => l_additional_where_clause
1606: ) = FND_API.G_FALSE
1607: THEN
1608: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_CREATED_FOR');
1609: x_return_status := FND_API.G_RET_STS_ERROR;
1610: RETURN;
1611: END IF;
1612: */
1613: IF (AMS_DEBUG_HIGH_ON) THEN
1626: l_thldchk_rec.chk2_arc_source_code_from IS NULL OR
1627: l_thldchk_rec.chk2_act_object_id IS NULL )
1628: THEN
1629: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_CHK2_OBJ');
1630: x_return_status := FND_API.G_RET_STS_ERROR;
1631: RETURN;
1632: ELSIF l_thldchk_rec.chk2_source_code_metric_type IS NULL
1633: THEN
1634: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_MET_TYPE');
1631: RETURN;
1632: ELSIF l_thldchk_rec.chk2_source_code_metric_type IS NULL
1633: THEN
1634: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_MET_TYPE');
1635: x_return_status := FND_API.G_RET_STS_ERROR;
1636: RETURN;
1637: END IF ;
1638:
1639: IF (AMS_DEBUG_HIGH_ON) THEN
1647: --
1648: -- Chk2_source code_metric_id
1649: --
1650: IF (p_thldchk_rec.chk2_source_code_metric_id IS NOT NULL AND
1651: p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM ) OR
1652: (p_thldchk_rec.chk2_act_object_id IS NOT NULL AND
1653: p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM )
1654: THEN
1655: -- Added By ptendulk on Dec30-1999 as
1649: --
1650: IF (p_thldchk_rec.chk2_source_code_metric_id IS NOT NULL AND
1651: p_thldchk_rec.chk2_source_code_metric_id <> FND_API.G_MISS_NUM ) OR
1652: (p_thldchk_rec.chk2_act_object_id IS NOT NULL AND
1653: p_thldchk_rec.chk2_act_object_id <> FND_API.G_MISS_NUM )
1654: THEN
1655: -- Added By ptendulk on Dec30-1999 as
1656: -- Check2 can be coming from Events
1657: -- commented by ptendulk on 15-Feb-2001 as not required for the hornet
1689: ,p_pk_name => l_pk_name
1690: ,p_pk_value => l_pk_value
1691: ,p_pk_data_type => l_pk_data_type
1692: ,p_additional_where_clause => l_additional_where_clause
1693: ) = FND_API.G_FALSE
1694: THEN
1695: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_CHK2_MET');
1696: x_return_status := FND_API.G_RET_STS_ERROR;
1697: RETURN;
1692: ,p_additional_where_clause => l_additional_where_clause
1693: ) = FND_API.G_FALSE
1694: THEN
1695: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_CHK2_MET');
1696: x_return_status := FND_API.G_RET_STS_ERROR;
1697: RETURN;
1698: END IF;
1699: END IF;
1700:
1703: IF l_thldchk_rec.chk2_type = 'DIWB' THEN
1704: IF l_thldchk_rec.chk2_workbook_name IS NULL
1705: THEN
1706: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_WB_NAME');
1707: x_return_status := FND_API.G_RET_STS_ERROR;
1708: RETURN;
1709: ELSE
1710: --
1711: -- Chk2_workbook_name
1719:
1720: END IF;
1721:
1722: IF (p_thldchk_rec.chk2_workbook_name IS NOT NULL AND
1723: p_thldchk_rec.chk2_workbook_name <> FND_API.G_MISS_CHAR )
1724: THEN
1725: l_table_name := 'ams_discoverer_sql' ;
1726: l_pk_name := 'workbook_name' ;
1727: -- modified by soagrawa on 23-aug-2002 for bug# 2528692
1743: -- modified by soagrawa on 23-aug-2002 for bug# 2528692
1744: ,p_pk_value => l_pk_wb_value
1745: ,p_pk_data_type => l_pk_data_type
1746: ,p_additional_where_clause => l_additional_where_clause
1747: ) = FND_API.G_FALSE
1748: THEN
1749: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_WB_NAME');
1750: x_return_status := FND_API.G_RET_STS_ERROR;
1751: RETURN;
1746: ,p_additional_where_clause => l_additional_where_clause
1747: ) = FND_API.G_FALSE
1748: THEN
1749: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_WB_NAME');
1750: x_return_status := FND_API.G_RET_STS_ERROR;
1751: RETURN;
1752: END IF;
1753: END IF;
1754: END IF;
1762: IF l_thldchk_rec.chk2_low_value IS NULL OR
1763: l_thldchk_rec.chk2_high_value IS NULL
1764: THEN
1765: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_CHK2_RANGE');
1766: x_return_status := FND_API.G_RET_STS_ERROR;
1767: RETURN;
1768: ELSE
1769: IF l_thldchk_rec.chk2_low_value > l_thldchk_rec.chk2_high_value
1770: THEN
1768: ELSE
1769: IF l_thldchk_rec.chk2_low_value > l_thldchk_rec.chk2_high_value
1770: THEN
1771: AMS_Utility_PVT.Error_Message('AMS_TRIG_INVALID_CHK2_RANGE');
1772: x_return_status := FND_API.G_RET_STS_ERROR;
1773: RETURN;
1774: END IF;
1775: END IF ;
1776: ELSE
1775: END IF ;
1776: ELSE
1777: IF l_thldchk_rec.chk2_value IS NULL THEN
1778: AMS_Utility_PVT.Error_Message('AMS_TRIG_MISSING_VALUE');
1779: x_return_status := FND_API.G_RET_STS_ERROR ;
1780: RETURN ;
1781: END IF ;
1782: END IF;
1783:
1806: -- THEN
1807: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_UOM_NULL');
1808: -- FND_MSG_PUB.Add;
1809: -- END IF;
1810: -- x_return_status := FND_API.G_RET_STS_ERROR;
1811: -- RETURN;
1812: -- ELSE
1813: -- --
1814: -- --If the RHS of the Check is Static Value Check UOM Entered is Valid
1824: -- ,p_pk_name => l_pk_name
1825: -- ,p_pk_value => l_pk_value
1826: -- ,p_pk_data_type => l_pk_data_type
1827: -- ,p_additional_where_clause => l_additional_where_clause
1828: -- ) = FND_API.G_FALSE
1829: -- THEN
1830: -- IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
1831: -- THEN
1832: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_UOM');
1832: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_UOM');
1833: -- FND_MSG_PUB.Add;
1834: -- END IF;
1835:
1836: -- x_return_status := FND_API.G_RET_STS_ERROR;
1837: -- RETURN;
1838: -- END IF; -- Check_FK_Exists--
1839: -- END IF;
1840: -- ELSE
1844: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_UOM_NULL');
1845: -- FND_MSG_PUB.Add;
1846: -- END IF;
1847:
1848: -- x_return_status := FND_API.G_RET_STS_ERROR;
1849: -- RETURN;
1850: -- END IF ;
1851: --END IF;
1852:
1858: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_CURR_NULL');
1859: -- FND_MSG_PUB.Add;
1860: -- END IF;
1861:
1862: -- x_return_status := FND_API.G_RET_STS_ERROR;
1863: -- RETURN;
1864: -- ELSE
1865: -- --
1866: -- -- If the RHS of the Check is Static Value Check Currency Entered is Valid
1876: -- ,p_pk_name => l_pk_name
1877: -- ,p_pk_value => l_pk_value
1878: -- ,p_pk_data_type => l_pk_data_type
1879: -- ,p_additional_where_clause => l_additional_where_clause
1880: -- ) = FND_API.G_FALSE
1881: -- THEN
1882: -- IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
1883: -- THEN
1884: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_CURR');
1884: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_CURR');
1885: -- FND_MSG_PUB.Add;
1886: -- END IF;
1887:
1888: -- x_return_status := FND_API.G_RET_STS_ERROR;
1889: -- RETURN;
1890: -- END IF; -- Check_FK_Exists
1891: -- END IF;
1892: -- ELSE
1896: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_CURR_NULL');
1897: -- FND_MSG_PUB.Add;
1898: --END IF;
1899:
1900: --x_return_status := FND_API.G_RET_STS_ERROR;
1901: -- RETURN;
1902: -- END IF ;
1903: -- END IF;
1904: --END IF;
1925: -- FND_MESSAGE.Set_Name('AMS', 'AMS_TRIG_INVALID_UOM_CURR');
1926: -- FND_MSG_PUB.Add;
1927: -- END IF;
1928:
1929: -- x_return_status := FND_API.G_RET_STS_ERROR;
1930: -- RETURN;
1931:
1932: -- END IF ;
1933: --END IF;
1954: x_thldchk_rec OUT NOCOPY thldchk_rec_type
1955: )
1956: IS
1957: BEGIN
1958: x_thldchk_rec.trigger_check_id := FND_API.G_MISS_NUM ;
1959: x_thldchk_rec.last_update_date := FND_API.G_MISS_DATE ;
1960: x_thldchk_rec.last_updated_by := FND_API.G_MISS_NUM ;
1961: x_thldchk_rec.creation_date := FND_API.G_MISS_DATE ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1955: )
1956: IS
1957: BEGIN
1958: x_thldchk_rec.trigger_check_id := FND_API.G_MISS_NUM ;
1959: x_thldchk_rec.last_update_date := FND_API.G_MISS_DATE ;
1960: x_thldchk_rec.last_updated_by := FND_API.G_MISS_NUM ;
1961: x_thldchk_rec.creation_date := FND_API.G_MISS_DATE ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1956: IS
1957: BEGIN
1958: x_thldchk_rec.trigger_check_id := FND_API.G_MISS_NUM ;
1959: x_thldchk_rec.last_update_date := FND_API.G_MISS_DATE ;
1960: x_thldchk_rec.last_updated_by := FND_API.G_MISS_NUM ;
1961: x_thldchk_rec.creation_date := FND_API.G_MISS_DATE ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1957: BEGIN
1958: x_thldchk_rec.trigger_check_id := FND_API.G_MISS_NUM ;
1959: x_thldchk_rec.last_update_date := FND_API.G_MISS_DATE ;
1960: x_thldchk_rec.last_updated_by := FND_API.G_MISS_NUM ;
1961: x_thldchk_rec.creation_date := FND_API.G_MISS_DATE ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1958: x_thldchk_rec.trigger_check_id := FND_API.G_MISS_NUM ;
1959: x_thldchk_rec.last_update_date := FND_API.G_MISS_DATE ;
1960: x_thldchk_rec.last_updated_by := FND_API.G_MISS_NUM ;
1961: x_thldchk_rec.creation_date := FND_API.G_MISS_DATE ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1959: x_thldchk_rec.last_update_date := FND_API.G_MISS_DATE ;
1960: x_thldchk_rec.last_updated_by := FND_API.G_MISS_NUM ;
1961: x_thldchk_rec.creation_date := FND_API.G_MISS_DATE ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1960: x_thldchk_rec.last_updated_by := FND_API.G_MISS_NUM ;
1961: x_thldchk_rec.creation_date := FND_API.G_MISS_DATE ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1961: x_thldchk_rec.creation_date := FND_API.G_MISS_DATE ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1962: x_thldchk_rec.created_by := FND_API.G_MISS_NUM ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1963: x_thldchk_rec.last_update_login := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1964: x_thldchk_rec.object_version_number := FND_API.G_MISS_NUM ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1965: x_thldchk_rec.trigger_id := FND_API.G_MISS_NUM ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1966: x_thldchk_rec.order_number := FND_API.G_MISS_NUM ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1967: x_thldchk_rec.chk1_type := FND_API.G_MISS_CHAR ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1968: x_thldchk_rec.chk1_arc_source_code_from := FND_API.G_MISS_CHAR ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1969: x_thldchk_rec.chk1_act_object_id := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1970: x_thldchk_rec.chk1_source_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1971: x_thldchk_rec.chk1_source_code_metric_id := FND_API.G_MISS_NUM ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1972: x_thldchk_rec.chk1_source_code_metric_type := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1973: x_thldchk_rec.chk1_to_chk2_operator_type := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1974: x_thldchk_rec.chk2_type := FND_API.G_MISS_CHAR ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1975: x_thldchk_rec.chk2_value := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1976: x_thldchk_rec.chk2_low_value := FND_API.G_MISS_NUM ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1984: x_thldchk_rec.chk2_source_code_metric_type := FND_API.G_MISS_CHAR ;
1977: x_thldchk_rec.chk2_high_value := FND_API.G_MISS_NUM ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1984: x_thldchk_rec.chk2_source_code_metric_type := FND_API.G_MISS_CHAR ;
1985: x_thldchk_rec.chk2_workbook_name := FND_API.G_MISS_CHAR ;
1978: x_thldchk_rec.chk2_uom_code := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1984: x_thldchk_rec.chk2_source_code_metric_type := FND_API.G_MISS_CHAR ;
1985: x_thldchk_rec.chk2_workbook_name := FND_API.G_MISS_CHAR ;
1986: x_thldchk_rec.chk2_workbook_owner := FND_API.G_MISS_CHAR ;
1979: x_thldchk_rec.chk2_currency_code := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1984: x_thldchk_rec.chk2_source_code_metric_type := FND_API.G_MISS_CHAR ;
1985: x_thldchk_rec.chk2_workbook_name := FND_API.G_MISS_CHAR ;
1986: x_thldchk_rec.chk2_workbook_owner := FND_API.G_MISS_CHAR ;
1987: x_thldchk_rec.chk2_worksheet_name := FND_API.G_MISS_CHAR ;
1980: x_thldchk_rec.chk2_source_code := FND_API.G_MISS_CHAR ;
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1984: x_thldchk_rec.chk2_source_code_metric_type := FND_API.G_MISS_CHAR ;
1985: x_thldchk_rec.chk2_workbook_name := FND_API.G_MISS_CHAR ;
1986: x_thldchk_rec.chk2_workbook_owner := FND_API.G_MISS_CHAR ;
1987: x_thldchk_rec.chk2_worksheet_name := FND_API.G_MISS_CHAR ;
1988:
1981: x_thldchk_rec.chk2_arc_source_code_from := FND_API.G_MISS_CHAR ;
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1984: x_thldchk_rec.chk2_source_code_metric_type := FND_API.G_MISS_CHAR ;
1985: x_thldchk_rec.chk2_workbook_name := FND_API.G_MISS_CHAR ;
1986: x_thldchk_rec.chk2_workbook_owner := FND_API.G_MISS_CHAR ;
1987: x_thldchk_rec.chk2_worksheet_name := FND_API.G_MISS_CHAR ;
1988:
1989:
1982: x_thldchk_rec.chk2_act_object_id := FND_API.G_MISS_NUM ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1984: x_thldchk_rec.chk2_source_code_metric_type := FND_API.G_MISS_CHAR ;
1985: x_thldchk_rec.chk2_workbook_name := FND_API.G_MISS_CHAR ;
1986: x_thldchk_rec.chk2_workbook_owner := FND_API.G_MISS_CHAR ;
1987: x_thldchk_rec.chk2_worksheet_name := FND_API.G_MISS_CHAR ;
1988:
1989:
1990: END Init_Thldchk_Rec ;
1983: x_thldchk_rec.chk2_source_code_metric_id := FND_API.G_MISS_NUM ;
1984: x_thldchk_rec.chk2_source_code_metric_type := FND_API.G_MISS_CHAR ;
1985: x_thldchk_rec.chk2_workbook_name := FND_API.G_MISS_CHAR ;
1986: x_thldchk_rec.chk2_workbook_owner := FND_API.G_MISS_CHAR ;
1987: x_thldchk_rec.chk2_worksheet_name := FND_API.G_MISS_CHAR ;
1988:
1989:
1990: END Init_Thldchk_Rec ;
1991:
2028: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
2029: FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
2030: FND_MSG_PUB.add;
2031: END IF;
2032: RAISE FND_API.g_exc_error;
2033: END IF;
2034: CLOSE c_thldchk;
2035:
2036: IF p_thldchk_rec.trigger_id = FND_API.g_miss_num THEN
2032: RAISE FND_API.g_exc_error;
2033: END IF;
2034: CLOSE c_thldchk;
2035:
2036: IF p_thldchk_rec.trigger_id = FND_API.g_miss_num THEN
2037: x_complete_rec.trigger_id := l_thldchk_rec.trigger_id;
2038: END IF;
2039:
2040: IF p_thldchk_rec.order_number = FND_API.g_miss_num THEN
2036: IF p_thldchk_rec.trigger_id = FND_API.g_miss_num THEN
2037: x_complete_rec.trigger_id := l_thldchk_rec.trigger_id;
2038: END IF;
2039:
2040: IF p_thldchk_rec.order_number = FND_API.g_miss_num THEN
2041: x_complete_rec.order_number := l_thldchk_rec.order_number;
2042: END IF;
2043:
2044: IF p_thldchk_rec.chk1_type = FND_API.g_miss_char THEN
2040: IF p_thldchk_rec.order_number = FND_API.g_miss_num THEN
2041: x_complete_rec.order_number := l_thldchk_rec.order_number;
2042: END IF;
2043:
2044: IF p_thldchk_rec.chk1_type = FND_API.g_miss_char THEN
2045: x_complete_rec.chk1_type := l_thldchk_rec.chk1_type;
2046: END IF;
2047:
2048: IF p_thldchk_rec.chk1_arc_source_code_from = FND_API.g_miss_char THEN
2044: IF p_thldchk_rec.chk1_type = FND_API.g_miss_char THEN
2045: x_complete_rec.chk1_type := l_thldchk_rec.chk1_type;
2046: END IF;
2047:
2048: IF p_thldchk_rec.chk1_arc_source_code_from = FND_API.g_miss_char THEN
2049: x_complete_rec.chk1_arc_source_code_from := l_thldchk_rec.chk1_arc_source_code_from;
2050: END IF;
2051:
2052: IF p_thldchk_rec.chk1_act_object_id = FND_API.g_miss_num THEN
2048: IF p_thldchk_rec.chk1_arc_source_code_from = FND_API.g_miss_char THEN
2049: x_complete_rec.chk1_arc_source_code_from := l_thldchk_rec.chk1_arc_source_code_from;
2050: END IF;
2051:
2052: IF p_thldchk_rec.chk1_act_object_id = FND_API.g_miss_num THEN
2053: x_complete_rec.chk1_act_object_id := l_thldchk_rec.chk1_act_object_id;
2054: END IF;
2055:
2056: IF p_thldchk_rec.chk1_source_code = FND_API.g_miss_char THEN
2052: IF p_thldchk_rec.chk1_act_object_id = FND_API.g_miss_num THEN
2053: x_complete_rec.chk1_act_object_id := l_thldchk_rec.chk1_act_object_id;
2054: END IF;
2055:
2056: IF p_thldchk_rec.chk1_source_code = FND_API.g_miss_char THEN
2057: x_complete_rec.chk1_source_code := l_thldchk_rec.chk1_source_code;
2058: END IF;
2059:
2060: IF p_thldchk_rec.chk1_source_code_metric_id = FND_API.g_miss_num THEN
2056: IF p_thldchk_rec.chk1_source_code = FND_API.g_miss_char THEN
2057: x_complete_rec.chk1_source_code := l_thldchk_rec.chk1_source_code;
2058: END IF;
2059:
2060: IF p_thldchk_rec.chk1_source_code_metric_id = FND_API.g_miss_num THEN
2061: x_complete_rec.chk1_source_code_metric_id := l_thldchk_rec.chk1_source_code_metric_id;
2062: END IF;
2063:
2064: IF p_thldchk_rec.chk1_source_code_metric_type = FND_API.g_miss_char THEN
2060: IF p_thldchk_rec.chk1_source_code_metric_id = FND_API.g_miss_num THEN
2061: x_complete_rec.chk1_source_code_metric_id := l_thldchk_rec.chk1_source_code_metric_id;
2062: END IF;
2063:
2064: IF p_thldchk_rec.chk1_source_code_metric_type = FND_API.g_miss_char THEN
2065: x_complete_rec.chk1_source_code_metric_type := l_thldchk_rec.chk1_source_code_metric_type;
2066: END IF;
2067:
2068: IF p_thldchk_rec.chk1_to_chk2_operator_type = FND_API.g_miss_char THEN
2064: IF p_thldchk_rec.chk1_source_code_metric_type = FND_API.g_miss_char THEN
2065: x_complete_rec.chk1_source_code_metric_type := l_thldchk_rec.chk1_source_code_metric_type;
2066: END IF;
2067:
2068: IF p_thldchk_rec.chk1_to_chk2_operator_type = FND_API.g_miss_char THEN
2069: x_complete_rec.chk1_to_chk2_operator_type := l_thldchk_rec.chk1_to_chk2_operator_type;
2070: END IF;
2071:
2072: IF p_thldchk_rec.chk2_type = FND_API.g_miss_char THEN
2068: IF p_thldchk_rec.chk1_to_chk2_operator_type = FND_API.g_miss_char THEN
2069: x_complete_rec.chk1_to_chk2_operator_type := l_thldchk_rec.chk1_to_chk2_operator_type;
2070: END IF;
2071:
2072: IF p_thldchk_rec.chk2_type = FND_API.g_miss_char THEN
2073: x_complete_rec.chk2_type := l_thldchk_rec.chk2_type ;
2074: END IF;
2075:
2076: IF p_thldchk_rec.chk2_value = FND_API.g_miss_num THEN
2072: IF p_thldchk_rec.chk2_type = FND_API.g_miss_char THEN
2073: x_complete_rec.chk2_type := l_thldchk_rec.chk2_type ;
2074: END IF;
2075:
2076: IF p_thldchk_rec.chk2_value = FND_API.g_miss_num THEN
2077: x_complete_rec.chk2_value := l_thldchk_rec.chk2_value;
2078: END IF;
2079:
2080: IF p_thldchk_rec.chk2_low_value = FND_API.g_miss_num THEN
2076: IF p_thldchk_rec.chk2_value = FND_API.g_miss_num THEN
2077: x_complete_rec.chk2_value := l_thldchk_rec.chk2_value;
2078: END IF;
2079:
2080: IF p_thldchk_rec.chk2_low_value = FND_API.g_miss_num THEN
2081: x_complete_rec.chk2_low_value := l_thldchk_rec.chk2_low_value;
2082: END IF;
2083:
2084: IF p_thldchk_rec.chk2_high_value = FND_API.g_miss_num THEN
2080: IF p_thldchk_rec.chk2_low_value = FND_API.g_miss_num THEN
2081: x_complete_rec.chk2_low_value := l_thldchk_rec.chk2_low_value;
2082: END IF;
2083:
2084: IF p_thldchk_rec.chk2_high_value = FND_API.g_miss_num THEN
2085: x_complete_rec.chk2_high_value:= l_thldchk_rec.chk2_high_value;
2086: END IF;
2087:
2088: IF p_thldchk_rec.chk2_uom_code = FND_API.g_miss_char THEN
2084: IF p_thldchk_rec.chk2_high_value = FND_API.g_miss_num THEN
2085: x_complete_rec.chk2_high_value:= l_thldchk_rec.chk2_high_value;
2086: END IF;
2087:
2088: IF p_thldchk_rec.chk2_uom_code = FND_API.g_miss_char THEN
2089: x_complete_rec.chk2_uom_code := l_thldchk_rec.chk2_uom_code;
2090: END IF;
2091:
2092: IF p_thldchk_rec.chk2_currency_code = FND_API.g_miss_char THEN
2088: IF p_thldchk_rec.chk2_uom_code = FND_API.g_miss_char THEN
2089: x_complete_rec.chk2_uom_code := l_thldchk_rec.chk2_uom_code;
2090: END IF;
2091:
2092: IF p_thldchk_rec.chk2_currency_code = FND_API.g_miss_char THEN
2093: x_complete_rec.chk2_currency_code:= l_thldchk_rec.chk2_currency_code;
2094: END IF;
2095:
2096: IF p_thldchk_rec.chk2_source_code = FND_API.g_miss_char THEN
2092: IF p_thldchk_rec.chk2_currency_code = FND_API.g_miss_char THEN
2093: x_complete_rec.chk2_currency_code:= l_thldchk_rec.chk2_currency_code;
2094: END IF;
2095:
2096: IF p_thldchk_rec.chk2_source_code = FND_API.g_miss_char THEN
2097: x_complete_rec.chk2_source_code := l_thldchk_rec.chk2_source_code;
2098: END IF;
2099:
2100: IF p_thldchk_rec.chk2_arc_source_code_from = FND_API.g_miss_char THEN
2096: IF p_thldchk_rec.chk2_source_code = FND_API.g_miss_char THEN
2097: x_complete_rec.chk2_source_code := l_thldchk_rec.chk2_source_code;
2098: END IF;
2099:
2100: IF p_thldchk_rec.chk2_arc_source_code_from = FND_API.g_miss_char THEN
2101: x_complete_rec.chk2_arc_source_code_from := l_thldchk_rec.chk2_arc_source_code_from;
2102: END IF;
2103:
2104: IF p_thldchk_rec.chk2_act_object_id = FND_API.g_miss_num THEN
2100: IF p_thldchk_rec.chk2_arc_source_code_from = FND_API.g_miss_char THEN
2101: x_complete_rec.chk2_arc_source_code_from := l_thldchk_rec.chk2_arc_source_code_from;
2102: END IF;
2103:
2104: IF p_thldchk_rec.chk2_act_object_id = FND_API.g_miss_num THEN
2105: x_complete_rec.chk2_act_object_id := l_thldchk_rec.chk2_act_object_id;
2106: END IF;
2107:
2108: IF p_thldchk_rec.chk2_source_code_metric_id = FND_API.g_miss_num THEN
2104: IF p_thldchk_rec.chk2_act_object_id = FND_API.g_miss_num THEN
2105: x_complete_rec.chk2_act_object_id := l_thldchk_rec.chk2_act_object_id;
2106: END IF;
2107:
2108: IF p_thldchk_rec.chk2_source_code_metric_id = FND_API.g_miss_num THEN
2109: x_complete_rec.chk2_source_code_metric_id := l_thldchk_rec.chk2_source_code_metric_id;
2110: END IF;
2111:
2112: IF p_thldchk_rec.chk2_source_code_metric_type = FND_API.g_miss_char THEN
2108: IF p_thldchk_rec.chk2_source_code_metric_id = FND_API.g_miss_num THEN
2109: x_complete_rec.chk2_source_code_metric_id := l_thldchk_rec.chk2_source_code_metric_id;
2110: END IF;
2111:
2112: IF p_thldchk_rec.chk2_source_code_metric_type = FND_API.g_miss_char THEN
2113: x_complete_rec.chk2_source_code_metric_type := l_thldchk_rec.chk2_source_code_metric_type ;
2114: END IF;
2115:
2116: IF p_thldchk_rec.chk2_workbook_name = FND_API.g_miss_char THEN
2112: IF p_thldchk_rec.chk2_source_code_metric_type = FND_API.g_miss_char THEN
2113: x_complete_rec.chk2_source_code_metric_type := l_thldchk_rec.chk2_source_code_metric_type ;
2114: END IF;
2115:
2116: IF p_thldchk_rec.chk2_workbook_name = FND_API.g_miss_char THEN
2117: x_complete_rec.chk2_workbook_name := l_thldchk_rec.chk2_workbook_name ;
2118: END IF;
2119:
2120: IF p_thldchk_rec.chk2_workbook_owner = FND_API.g_miss_char THEN
2116: IF p_thldchk_rec.chk2_workbook_name = FND_API.g_miss_char THEN
2117: x_complete_rec.chk2_workbook_name := l_thldchk_rec.chk2_workbook_name ;
2118: END IF;
2119:
2120: IF p_thldchk_rec.chk2_workbook_owner = FND_API.g_miss_char THEN
2121: x_complete_rec.chk2_workbook_owner := l_thldchk_rec.chk2_workbook_owner ;
2122: END IF;
2123:
2124: IF p_thldchk_rec.chk2_worksheet_name = FND_API.g_miss_char THEN
2120: IF p_thldchk_rec.chk2_workbook_owner = FND_API.g_miss_char THEN
2121: x_complete_rec.chk2_workbook_owner := l_thldchk_rec.chk2_workbook_owner ;
2122: END IF;
2123:
2124: IF p_thldchk_rec.chk2_worksheet_name = FND_API.g_miss_char THEN
2125: x_complete_rec.chk2_worksheet_name := l_thldchk_rec.chk2_worksheet_name ;
2126: END IF;
2127: END Complete_Thldchk_rec ;
2128: