446: BEGIN
447:
448: x_msg_count := 0;
449: x_return_status := FND_API.G_RET_STS_SUCCESS;
450: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
451:
452:
453: IF l_debug_mode = 'Y' THEN
454: --Moved here for bug 4252182
451:
452:
453: IF l_debug_mode = 'Y' THEN
454: --Moved here for bug 4252182
455: pa_debug.set_curr_function( p_function => 'Get_Last_Upd_Working_Wp_Ver',
456: p_debug_mode => l_debug_mode );
457:
458: pa_debug.g_err_stage:= 'Validating input parameters';
459: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
454: --Moved here for bug 4252182
455: pa_debug.set_curr_function( p_function => 'Get_Last_Upd_Working_Wp_Ver',
456: p_debug_mode => l_debug_mode );
457:
458: pa_debug.g_err_stage:= 'Validating input parameters';
459: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
460: END IF;
461:
462: IF (p_project_id IS NULL) THEN
455: pa_debug.set_curr_function( p_function => 'Get_Last_Upd_Working_Wp_Ver',
456: p_debug_mode => l_debug_mode );
457:
458: pa_debug.g_err_stage:= 'Validating input parameters';
459: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
460: END IF;
461:
462: IF (p_project_id IS NULL) THEN
463: IF l_debug_mode = 'Y' THEN
460: END IF;
461:
462: IF (p_project_id IS NULL) THEN
463: IF l_debug_mode = 'Y' THEN
464: pa_debug.g_err_stage:= 'Value of input parameter = '|| p_project_id;
465: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level5);
466: END IF;
467: PA_UTILS.ADD_MESSAGE
468: (p_app_short_name => 'PA',
461:
462: IF (p_project_id IS NULL) THEN
463: IF l_debug_mode = 'Y' THEN
464: pa_debug.g_err_stage:= 'Value of input parameter = '|| p_project_id;
465: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level5);
466: END IF;
467: PA_UTILS.ADD_MESSAGE
468: (p_app_short_name => 'PA',
469: p_msg_name => 'PA_FP_INV_PARAM_PASSED');
539: */
540:
541: IF l_debug_mode = 'Y' THEN --For bug 4252182
542:
543: pa_debug.reset_curr_function;
544:
545: END IF;
546:
547: EXCEPTION
570:
571: END IF;
572:
573: IF l_debug_mode = 'Y' THEN --For bug 4252182
574: pa_debug.reset_curr_function;
575: END IF;
576:
577: RETURN;
578:
599: ,p_procedure_name => 'Get_Last_Upd_Working_Wp_Ver'
600: ,p_error_text => x_msg_data);
601:
602: IF l_debug_mode = 'Y' THEN
603: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
604: pa_debug.write(l_module_name,pa_debug.g_err_stage,
605: l_debug_level5);
606: pa_debug.reset_curr_function; --For bug 4252182
607: END IF;
600: ,p_error_text => x_msg_data);
601:
602: IF l_debug_mode = 'Y' THEN
603: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
604: pa_debug.write(l_module_name,pa_debug.g_err_stage,
605: l_debug_level5);
606: pa_debug.reset_curr_function; --For bug 4252182
607: END IF;
608: RAISE;
602: IF l_debug_mode = 'Y' THEN
603: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
604: pa_debug.write(l_module_name,pa_debug.g_err_stage,
605: l_debug_level5);
606: pa_debug.reset_curr_function; --For bug 4252182
607: END IF;
608: RAISE;
609: END Get_Last_Upd_Working_Wp_Ver;
610:
3613: l_debug_level5 CONSTANT NUMBER := 5;
3614:
3615: BEGIN
3616: IF l_debug_mode = 'Y' THEN
3617: pa_debug.g_err_stage:= 'Entering GET_STRUCTURE_INFO';
3618: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3619: l_debug_level2);
3620: END IF;
3621:
3614:
3615: BEGIN
3616: IF l_debug_mode = 'Y' THEN
3617: pa_debug.g_err_stage:= 'Entering GET_STRUCTURE_INFO';
3618: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3619: l_debug_level2);
3620: END IF;
3621:
3622: x_msg_count := 0;
3620: END IF;
3621:
3622: x_msg_count := 0;
3623: x_return_status := FND_API.G_RET_STS_SUCCESS;
3624: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
3625:
3626: IF l_debug_mode = 'Y' THEN --For bug 4252182
3627:
3628: pa_debug.set_curr_function( p_function => 'GET_STRUCTURE_INFO',
3624: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
3625:
3626: IF l_debug_mode = 'Y' THEN --For bug 4252182
3627:
3628: pa_debug.set_curr_function( p_function => 'GET_STRUCTURE_INFO',
3629: p_debug_mode => l_debug_mode );
3630: END IF;
3631:
3632: -- Check for business rules violations
3632: -- Check for business rules violations
3633:
3634: IF l_debug_mode = 'Y' THEN
3635:
3636: pa_debug.g_err_stage:= 'Input parameter List :';
3637: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3638: l_debug_level3);
3639:
3640: pa_debug.g_err_stage:= 'p_project_id : ' || p_project_id;
3633:
3634: IF l_debug_mode = 'Y' THEN
3635:
3636: pa_debug.g_err_stage:= 'Input parameter List :';
3637: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3638: l_debug_level3);
3639:
3640: pa_debug.g_err_stage:= 'p_project_id : ' || p_project_id;
3641: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3636: pa_debug.g_err_stage:= 'Input parameter List :';
3637: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3638: l_debug_level3);
3639:
3640: pa_debug.g_err_stage:= 'p_project_id : ' || p_project_id;
3641: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3642: l_debug_level3);
3643:
3644:
3637: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3638: l_debug_level3);
3639:
3640: pa_debug.g_err_stage:= 'p_project_id : ' || p_project_id;
3641: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3642: l_debug_level3);
3643:
3644:
3645: pa_debug.g_err_stage:= 'p_structure_type : ' || p_structure_type;
3641: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3642: l_debug_level3);
3643:
3644:
3645: pa_debug.g_err_stage:= 'p_structure_type : ' || p_structure_type;
3646: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3647: l_debug_level3);
3648:
3649: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3642: l_debug_level3);
3643:
3644:
3645: pa_debug.g_err_stage:= 'p_structure_type : ' || p_structure_type;
3646: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3647: l_debug_level3);
3648:
3649: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3650: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3645: pa_debug.g_err_stage:= 'p_structure_type : ' || p_structure_type;
3646: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3647: l_debug_level3);
3648:
3649: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3650: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3651: l_debug_level3);
3652:
3653: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3646: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3647: l_debug_level3);
3648:
3649: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3650: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3651: l_debug_level3);
3652:
3653: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3654: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3649: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3650: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3651: l_debug_level3);
3652:
3653: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3654: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3655: l_debug_level3);
3656:
3657: pa_debug.g_err_stage:= 'p_is_wp_versioning_enabled :' || p_is_wp_versioning_enabled;
3650: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3651: l_debug_level3);
3652:
3653: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3654: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3655: l_debug_level3);
3656:
3657: pa_debug.g_err_stage:= 'p_is_wp_versioning_enabled :' || p_is_wp_versioning_enabled;
3658: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3653: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3654: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3655: l_debug_level3);
3656:
3657: pa_debug.g_err_stage:= 'p_is_wp_versioning_enabled :' || p_is_wp_versioning_enabled;
3658: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3659: l_debug_level3);
3660: END IF;
3661:
3654: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3655: l_debug_level3);
3656:
3657: pa_debug.g_err_stage:= 'p_is_wp_versioning_enabled :' || p_is_wp_versioning_enabled;
3658: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3659: l_debug_level3);
3660: END IF;
3661:
3662:
3705: END IF;
3706: END IF;
3707:
3708: IF l_debug_mode = 'Y' THEN
3709: pa_debug.g_err_stage:= 'Obtained structure version id : '||x_structure_version_id;
3710: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3711: l_debug_level3);
3712: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3713: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3706: END IF;
3707:
3708: IF l_debug_mode = 'Y' THEN
3709: pa_debug.g_err_stage:= 'Obtained structure version id : '||x_structure_version_id;
3710: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3711: l_debug_level3);
3712: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3713: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3714: l_debug_level3);
3708: IF l_debug_mode = 'Y' THEN
3709: pa_debug.g_err_stage:= 'Obtained structure version id : '||x_structure_version_id;
3710: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3711: l_debug_level3);
3712: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3713: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3714: l_debug_level3);
3715: pa_debug.g_err_stage:= 'Exiting GET_STRUCTURE_INFO';
3716: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3709: pa_debug.g_err_stage:= 'Obtained structure version id : '||x_structure_version_id;
3710: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3711: l_debug_level3);
3712: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3713: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3714: l_debug_level3);
3715: pa_debug.g_err_stage:= 'Exiting GET_STRUCTURE_INFO';
3716: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3717: l_debug_level2);
3711: l_debug_level3);
3712: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3713: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3714: l_debug_level3);
3715: pa_debug.g_err_stage:= 'Exiting GET_STRUCTURE_INFO';
3716: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3717: l_debug_level2);
3718: END IF;
3719:
3712: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3713: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3714: l_debug_level3);
3715: pa_debug.g_err_stage:= 'Exiting GET_STRUCTURE_INFO';
3716: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3717: l_debug_level2);
3718: END IF;
3719:
3720: IF l_debug_mode = 'Y' THEN --For bug 4252182
3717: l_debug_level2);
3718: END IF;
3719:
3720: IF l_debug_mode = 'Y' THEN --For bug 4252182
3721: pa_debug.reset_curr_function;
3722: End IF;
3723: EXCEPTION
3724:
3725: WHEN Invalid_Arg_Exc_WP THEN
3754: x_msg_count := l_msg_count;
3755: END IF;
3756:
3757: IF l_debug_mode = 'Y' THEN --For bug 4252182
3758: pa_debug.reset_curr_function;
3759: End IF;
3760: RETURN;
3761:
3762: WHEN others THEN
3783: ,p_procedure_name => 'GET_STRUCTURE_INFO'
3784: ,p_error_text => x_msg_data);
3785:
3786: IF l_debug_mode = 'Y' THEN
3787: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
3788: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3789: l_debug_level5);
3790: pa_debug.reset_curr_function;
3791: END IF;
3784: ,p_error_text => x_msg_data);
3785:
3786: IF l_debug_mode = 'Y' THEN
3787: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
3788: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3789: l_debug_level5);
3790: pa_debug.reset_curr_function;
3791: END IF;
3792: RAISE;
3786: IF l_debug_mode = 'Y' THEN
3787: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
3788: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3789: l_debug_level5);
3790: pa_debug.reset_curr_function;
3791: END IF;
3792: RAISE;
3793: END GET_STRUCTURE_INFO;
3794:
3855: BEGIN
3856: x_msg_count := 0;
3857: x_return_status := FND_API.G_RET_STS_SUCCESS;
3858: --Bug 3735089 - instead of fnd_profile.value use fnd_profile.value_specific
3859: --l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
3860: l_user_id := fnd_global.user_id;
3861: l_login_id := fnd_global.login_id;
3862: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
3863:
3858: --Bug 3735089 - instead of fnd_profile.value use fnd_profile.value_specific
3859: --l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
3860: l_user_id := fnd_global.user_id;
3861: l_login_id := fnd_global.login_id;
3862: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
3863:
3864: IF l_debug_mode = 'Y' THEN
3865: PA_DEBUG.set_curr_function( p_function =>'CHECK_TASK_HAS_TRANSACTION' , p_debug_mode => l_debug_mode );
3866: END IF;
3861: l_login_id := fnd_global.login_id;
3862: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
3863:
3864: IF l_debug_mode = 'Y' THEN
3865: PA_DEBUG.set_curr_function( p_function =>'CHECK_TASK_HAS_TRANSACTION' , p_debug_mode => l_debug_mode );
3866: END IF;
3867:
3868: IF l_debug_mode = 'Y' THEN
3869: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Printing Input parameters';
3865: PA_DEBUG.set_curr_function( p_function =>'CHECK_TASK_HAS_TRANSACTION' , p_debug_mode => l_debug_mode );
3866: END IF;
3867:
3868: IF l_debug_mode = 'Y' THEN
3869: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Printing Input parameters';
3870: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3871: Pa_Debug.WRITE(g_module_name , 'p_task_id'||':'||p_task_id , l_debug_level3);
3872: END IF;
3873:
3866: END IF;
3867:
3868: IF l_debug_mode = 'Y' THEN
3869: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Printing Input parameters';
3870: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3871: Pa_Debug.WRITE(g_module_name , 'p_task_id'||':'||p_task_id , l_debug_level3);
3872: END IF;
3873:
3874:
3867:
3868: IF l_debug_mode = 'Y' THEN
3869: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Printing Input parameters';
3870: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3871: Pa_Debug.WRITE(g_module_name , 'p_task_id'||':'||p_task_id , l_debug_level3);
3872: END IF;
3873:
3874:
3875: IF l_debug_mode = 'Y' THEN
3872: END IF;
3873:
3874:
3875: IF l_debug_mode = 'Y' THEN
3876: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Validating Input Paramater';
3877: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3878: END IF;
3879:
3880: -- Validating for Input parameter
3873:
3874:
3875: IF l_debug_mode = 'Y' THEN
3876: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Validating Input Paramater';
3877: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3878: END IF;
3879:
3880: -- Validating for Input parameter
3881: IF ( p_task_id IS NOT NULL ) THEN
3881: IF ( p_task_id IS NOT NULL ) THEN
3882:
3883: --Commented to be reviewed once more with set financial task
3884: --IF l_debug_mode = 'Y' THEN
3885: -- Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Checking for financial type';
3886: -- Pa_Debug.WRITE ( g_module_name , Pa_Debug.g_err_stage , l_debug_level3 );
3887: --END IF;
3888:
3889: --Select the parent structure version id for the passed task id
3882:
3883: --Commented to be reviewed once more with set financial task
3884: --IF l_debug_mode = 'Y' THEN
3885: -- Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Checking for financial type';
3886: -- Pa_Debug.WRITE ( g_module_name , Pa_Debug.g_err_stage , l_debug_level3 );
3887: --END IF;
3888:
3889: --Select the parent structure version id for the passed task id
3890: --OPEN c_get_parent_str_ver_id ( p_task_id );
3903:
3904: -- Commenting code for 4903460 and replacing this wth new code
3905: --Check if task has expenditure item
3906: /* IF l_debug_mode = 'Y' THEN
3907: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check expenditure item for '|| p_task_id;
3908: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3909: END IF;
3910: l_status_code :=
3911: pa_proj_tsk_utils.check_exp_item_exists(null, p_task_id);
3904: -- Commenting code for 4903460 and replacing this wth new code
3905: --Check if task has expenditure item
3906: /* IF l_debug_mode = 'Y' THEN
3907: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check expenditure item for '|| p_task_id;
3908: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3909: END IF;
3910: l_status_code :=
3911: pa_proj_tsk_utils.check_exp_item_exists(null, p_task_id);
3912: IF ( l_status_code = 1 ) THEN
3919: END IF;
3920:
3921: --Check if task has purchase order distribution
3922: IF l_debug_mode = 'Y' THEN
3923: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check purchase order for '|| p_task_id;
3924: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3925: l_debug_level3);
3926: END IF;
3927: l_status_code :=
3920:
3921: --Check if task has purchase order distribution
3922: IF l_debug_mode = 'Y' THEN
3923: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check purchase order for '|| p_task_id;
3924: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3925: l_debug_level3);
3926: END IF;
3927: l_status_code :=
3928: pa_proj_tsk_utils.check_po_dist_exists(NULL, p_task_id);
3936: END IF;
3937:
3938: -- Check if task has purchase order requisition
3939: IF l_debug_mode = 'Y' THEN
3940: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check purchase order requisition for '|| p_task_id;
3941: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3942: l_debug_level3);
3943: END IF;
3944:
3937:
3938: -- Check if task has purchase order requisition
3939: IF l_debug_mode = 'Y' THEN
3940: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check purchase order requisition for '|| p_task_id;
3941: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3942: l_debug_level3);
3943: END IF;
3944:
3945: l_status_code :=
3954: END IF;
3955:
3956: -- Check if task has supplier invoices
3957: IF l_debug_mode = 'Y' THEN
3958: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check supplier invoice for '|| p_task_id;
3959: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3960: l_debug_level3);
3961: END IF;
3962:
3955:
3956: -- Check if task has supplier invoices
3957: IF l_debug_mode = 'Y' THEN
3958: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check supplier invoice for '|| p_task_id;
3959: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3960: l_debug_level3);
3961: END IF;
3962:
3963: l_status_code :=
3972: END IF;
3973:
3974: -- Check if task has supplier invoice distribution
3975: IF l_debug_mode = 'Y' THEN
3976: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check supplier inv distribution for '|| p_task_id;
3977: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3978: l_debug_level3);
3979: END IF;
3980:
3973:
3974: -- Check if task has supplier invoice distribution
3975: IF l_debug_mode = 'Y' THEN
3976: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check supplier inv distribution for '|| p_task_id;
3977: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3978: l_debug_level3);
3979: END IF;
3980:
3981: l_status_code :=
3990: END IF;
3991:
3992: -- Check if task has commitment transaction
3993: IF l_debug_mode = 'Y' THEN
3994: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check commitment transaction for '|| p_task_id;
3995: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3996: l_debug_level3);
3997: END IF;
3998: l_status_code :=
3991:
3992: -- Check if task has commitment transaction
3993: IF l_debug_mode = 'Y' THEN
3994: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check commitment transaction for '|| p_task_id;
3995: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
3996: l_debug_level3);
3997: END IF;
3998: l_status_code :=
3999: pa_proj_tsk_utils.check_commitment_txn_exists(null, p_task_id);
4007: END IF;
4008:
4009: -- Check if task has compensation rule set
4010: IF l_debug_mode = 'Y' THEN
4011: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check compensation rule set for '|| p_task_id;
4012: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4013: l_debug_level3);
4014: END IF;
4015:
4008:
4009: -- Check if task has compensation rule set
4010: IF l_debug_mode = 'Y' THEN
4011: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check compensation rule set for '|| p_task_id;
4012: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4013: l_debug_level3);
4014: END IF;
4015:
4016: l_status_code :=
4025: END IF; */
4026: -- End of Commenting for 4903460
4027: -- Check if task is in use in an external system
4028: IF l_debug_mode = 'Y' THEN
4029: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check for task used in external system for'|| p_task_id;
4030: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4031: l_debug_level3);
4032: END IF;
4033:
4026: -- End of Commenting for 4903460
4027: -- Check if task is in use in an external system
4028: IF l_debug_mode = 'Y' THEN
4029: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check for task used in external system for'|| p_task_id;
4030: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4031: l_debug_level3);
4032: END IF;
4033:
4034: l_status_code :=
4053: END IF;
4054:
4055: -- Check if task is used in allocations
4056: IF l_debug_mode = 'Y' THEN
4057: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check if project allocations uses task '|| p_task_id;
4058: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4059: l_debug_level3);
4060: END IF;
4061:
4054:
4055: -- Check if task is used in allocations
4056: IF l_debug_mode = 'Y' THEN
4057: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check if project allocations uses task '|| p_task_id;
4058: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4059: l_debug_level3);
4060: END IF;
4061:
4062: l_return_val :=
4070: -- Commenting for Performance fix 4903460
4071: /*
4072: -- Check if task has draft invoices
4073: IF l_debug_mode = 'Y' THEN
4074: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check draft invoice for '|| p_task_id;
4075: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4076: l_debug_level3);
4077: END IF;
4078:
4071: /*
4072: -- Check if task has draft invoices
4073: IF l_debug_mode = 'Y' THEN
4074: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check draft invoice for '|| p_task_id;
4075: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4076: l_debug_level3);
4077: END IF;
4078:
4079: l_status_code :=
4088: END IF;
4089:
4090: -- Check if task has Project_customers
4091: IF l_debug_mode = 'Y' THEN
4092: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check Project Customers for '|| p_task_id;
4093: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4094: l_debug_level3);
4095: END IF;
4096:
4089:
4090: -- Check if task has Project_customers
4091: IF l_debug_mode = 'Y' THEN
4092: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check Project Customers for '|| p_task_id;
4093: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4094: l_debug_level3);
4095: END IF;
4096:
4097:
4123:
4124: -- Check if project contract is installed
4125: IF (pa_install.is_product_installed('OKE')) THEN
4126: IF l_debug_mode = 'Y' THEN
4127: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Check contract association for task '|| p_task_id;
4128: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4129: l_debug_level3);
4130: END IF;
4131:
4124: -- Check if project contract is installed
4125: IF (pa_install.is_product_installed('OKE')) THEN
4126: IF l_debug_mode = 'Y' THEN
4127: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Check contract association for task '|| p_task_id;
4128: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4129: l_debug_level3);
4130: END IF;
4131:
4132: IF (PA_PROJ_STRUCTURE_PUB.CHECK_TASK_CONTRACT_ASSO(p_task_id) <>
4153: --end of OTL check.
4154: Is_IEX_Installed := pa_install.is_product_installed('IEX');
4155: If Is_IEX_Installed then
4156: IF l_debug_mode = 'Y' THEN
4157: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check if task '|| p_task_id || ' is charged in iexpense';
4158: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4159: l_debug_level3);
4160: END IF;
4161:
4154: Is_IEX_Installed := pa_install.is_product_installed('IEX');
4155: If Is_IEX_Installed then
4156: IF l_debug_mode = 'Y' THEN
4157: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check if task '|| p_task_id || ' is charged in iexpense';
4158: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4159: l_debug_level3);
4160: END IF;
4161:
4162: l_status_code := pa_proj_tsk_utils.check_iex_task_charged(p_task_id);
4170: END IF;
4171: END IF;
4172: --BEGIN
4173: IF l_debug_mode = 'Y' THEN
4174: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK'|| p_task_id;
4175: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4176: l_debug_level3);
4177: END IF;
4178:
4171: END IF;
4172: --BEGIN
4173: IF l_debug_mode = 'Y' THEN
4174: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK'|| p_task_id;
4175: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4176: l_debug_level3);
4177: END IF;
4178:
4179: PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK(
4189: return;
4190: END IF;
4191: --EXCEPTION WHEN OTHERS THEN
4192: -- IF l_debug_mode = 'Y' THEN
4193: -- Pa_Debug.g_err_stage:= 'API PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK FAILED';
4194: -- Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4195: -- l_debug_level3);
4196: -- END IF;
4197: --END;
4190: END IF;
4191: --EXCEPTION WHEN OTHERS THEN
4192: -- IF l_debug_mode = 'Y' THEN
4193: -- Pa_Debug.g_err_stage:= 'API PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK FAILED';
4194: -- Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4195: -- l_debug_level3);
4196: -- END IF;
4197: --END;
4198:
4202:
4203: -- Bug 3735089 : using reset_curr_function too, just using set_curr_function may overflow it after several recursive calls
4204: -- and it gives ORA 06512 numeric or value error
4205: IF l_debug_mode = 'Y' THEN
4206: Pa_Debug.reset_curr_function;
4207: END IF;
4208:
4209:
4210: EXCEPTION
4224: ,p_procedure_name => 'CHECK_TASK_HAS_TRANSACTION'
4225: ,p_error_text => x_msg_data);
4226:
4227: IF l_debug_mode = 'Y' THEN
4228: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
4229: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4230: l_debug_level5);
4231:
4232: Pa_Debug.reset_curr_function;
4225: ,p_error_text => x_msg_data);
4226:
4227: IF l_debug_mode = 'Y' THEN
4228: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
4229: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4230: l_debug_level5);
4231:
4232: Pa_Debug.reset_curr_function;
4233: END IF;
4228: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
4229: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4230: l_debug_level5);
4231:
4232: Pa_Debug.reset_curr_function;
4233: END IF;
4234: RAISE;
4235:
4236: END CHECK_TASK_HAS_TRANSACTION;
5323: x_error_msg_code := NULL ;
5324:
5325: l_user_id := fnd_global.user_id;
5326: l_login_id := fnd_global.login_id;
5327: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
5328:
5329: IF l_debug_mode = 'Y' THEN
5330: PA_DEBUG.set_curr_function( p_function =>'PERFORM_TASK_VALIDATIONS' , p_debug_mode => l_debug_mode );
5331: END IF;
5326: l_login_id := fnd_global.login_id;
5327: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
5328:
5329: IF l_debug_mode = 'Y' THEN
5330: PA_DEBUG.set_curr_function( p_function =>'PERFORM_TASK_VALIDATIONS' , p_debug_mode => l_debug_mode );
5331: END IF;
5332:
5333: IF l_debug_mode = 'Y' THEN
5334: Pa_Debug.g_err_stage:= 'TASK_VALIDATIONS : Printing Input parameters';
5330: PA_DEBUG.set_curr_function( p_function =>'PERFORM_TASK_VALIDATIONS' , p_debug_mode => l_debug_mode );
5331: END IF;
5332:
5333: IF l_debug_mode = 'Y' THEN
5334: Pa_Debug.g_err_stage:= 'TASK_VALIDATIONS : Printing Input parameters';
5335: Pa_Debug.WRITE('pa_proj_tsk_utils', Pa_Debug.g_err_stage ,l_debug_level3 );
5336: Pa_Debug.WRITE('pa_proj_tsk_utils', 'p_task_id'||':'||p_task_id , l_debug_level3);
5337: END IF;
5338:
5331: END IF;
5332:
5333: IF l_debug_mode = 'Y' THEN
5334: Pa_Debug.g_err_stage:= 'TASK_VALIDATIONS : Printing Input parameters';
5335: Pa_Debug.WRITE('pa_proj_tsk_utils', Pa_Debug.g_err_stage ,l_debug_level3 );
5336: Pa_Debug.WRITE('pa_proj_tsk_utils', 'p_task_id'||':'||p_task_id , l_debug_level3);
5337: END IF;
5338:
5339: /*OPEN c_tasks_in_hierarchy; -- Commented this for Bug#4964992
5332:
5333: IF l_debug_mode = 'Y' THEN
5334: Pa_Debug.g_err_stage:= 'TASK_VALIDATIONS : Printing Input parameters';
5335: Pa_Debug.WRITE('pa_proj_tsk_utils', Pa_Debug.g_err_stage ,l_debug_level3 );
5336: Pa_Debug.WRITE('pa_proj_tsk_utils', 'p_task_id'||':'||p_task_id , l_debug_level3);
5337: END IF;
5338:
5339: /*OPEN c_tasks_in_hierarchy; -- Commented this for Bug#4964992
5340: FETCH c_tasks_in_hierarchy BULK COLLECT INTO l_task_id_tbl;
5367: END IF;
5368:
5369: EXCEPTION
5370: WHEN NO_DATA_FOUND THEN
5371: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS : No Expenditure Items exist in the entire task hierarchy';
5372: IF l_debug_mode = 'Y' THEN
5373: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5374: END IF;
5375: WHEN OTHERS THEN
5369: EXCEPTION
5370: WHEN NO_DATA_FOUND THEN
5371: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS : No Expenditure Items exist in the entire task hierarchy';
5372: IF l_debug_mode = 'Y' THEN
5373: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5374: END IF;
5375: WHEN OTHERS THEN
5376: x_error_code := SQLCODE;
5377: x_error_msg_code := substrb(SQLERRM,1,120);
5374: END IF;
5375: WHEN OTHERS THEN
5376: x_error_code := SQLCODE;
5377: x_error_msg_code := substrb(SQLERRM,1,120);
5378: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking Expenditure Items';
5379:
5380: IF l_debug_mode = 'Y' THEN
5381: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5382: END IF;
5377: x_error_msg_code := substrb(SQLERRM,1,120);
5378: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking Expenditure Items';
5379:
5380: IF l_debug_mode = 'Y' THEN
5381: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5382: END IF;
5383: return;
5384: END;
5385:
5403: END IF;
5404:
5405: EXCEPTION
5406: WHEN NO_DATA_FOUND THEN
5407: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No purchase order distribution exist in the entire task hierarchy';
5408: IF l_debug_mode = 'Y' THEN
5409: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5410: END IF;
5411: WHEN OTHERS THEN
5405: EXCEPTION
5406: WHEN NO_DATA_FOUND THEN
5407: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No purchase order distribution exist in the entire task hierarchy';
5408: IF l_debug_mode = 'Y' THEN
5409: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5410: END IF;
5411: WHEN OTHERS THEN
5412: x_error_code := SQLCODE;
5413: x_error_msg_code := substrb(SQLERRM,1,120);
5410: END IF;
5411: WHEN OTHERS THEN
5412: x_error_code := SQLCODE;
5413: x_error_msg_code := substrb(SQLERRM,1,120);
5414: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking purchase order distribution';
5415:
5416: IF l_debug_mode = 'Y' THEN
5417: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5418: END IF;
5413: x_error_msg_code := substrb(SQLERRM,1,120);
5414: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking purchase order distribution';
5415:
5416: IF l_debug_mode = 'Y' THEN
5417: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5418: END IF;
5419:
5420: return;
5421: END;
5440: END IF;
5441:
5442: EXCEPTION
5443: WHEN NO_DATA_FOUND THEN
5444: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No purchase order requisition exist in the entire task hierarchy';
5445: IF l_debug_mode = 'Y' THEN
5446: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5447: END IF;
5448: WHEN OTHERS THEN
5442: EXCEPTION
5443: WHEN NO_DATA_FOUND THEN
5444: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No purchase order requisition exist in the entire task hierarchy';
5445: IF l_debug_mode = 'Y' THEN
5446: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5447: END IF;
5448: WHEN OTHERS THEN
5449: x_error_code := SQLCODE;
5450: x_error_msg_code := substrb(SQLERRM,1,120);
5447: END IF;
5448: WHEN OTHERS THEN
5449: x_error_code := SQLCODE;
5450: x_error_msg_code := substrb(SQLERRM,1,120);
5451: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking purchase order requisition';
5452:
5453: IF l_debug_mode = 'Y' THEN
5454: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5455: END IF;
5450: x_error_msg_code := substrb(SQLERRM,1,120);
5451: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking purchase order requisition';
5452:
5453: IF l_debug_mode = 'Y' THEN
5454: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5455: END IF;
5456:
5457: return;
5458: END;
5477: END IF;
5478:
5479: EXCEPTION
5480: WHEN NO_DATA_FOUND THEN
5481: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No supplier invoices exist in the entire task hierarchy' ;
5482: IF l_debug_mode = 'Y' THEN
5483: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5484: END IF;
5485: WHEN OTHERS THEN
5479: EXCEPTION
5480: WHEN NO_DATA_FOUND THEN
5481: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No supplier invoices exist in the entire task hierarchy' ;
5482: IF l_debug_mode = 'Y' THEN
5483: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5484: END IF;
5485: WHEN OTHERS THEN
5486: x_error_code := SQLCODE;
5487: x_error_msg_code := substrb(SQLERRM,1,120);
5484: END IF;
5485: WHEN OTHERS THEN
5486: x_error_code := SQLCODE;
5487: x_error_msg_code := substrb(SQLERRM,1,120);
5488: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking supplier invoices';
5489:
5490: IF l_debug_mode = 'Y' THEN
5491: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5492: END IF;
5487: x_error_msg_code := substrb(SQLERRM,1,120);
5488: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking supplier invoices';
5489:
5490: IF l_debug_mode = 'Y' THEN
5491: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5492: END IF;
5493: return;
5494: END;
5495:
5513: END IF;
5514:
5515: EXCEPTION
5516: WHEN NO_DATA_FOUND THEN
5517: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No supplier invoice distribution exist';
5518: IF l_debug_mode = 'Y' THEN
5519: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5520: END IF;
5521: WHEN OTHERS THEN
5515: EXCEPTION
5516: WHEN NO_DATA_FOUND THEN
5517: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No supplier invoice distribution exist';
5518: IF l_debug_mode = 'Y' THEN
5519: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5520: END IF;
5521: WHEN OTHERS THEN
5522: x_error_code := SQLCODE;
5523: x_error_msg_code := substrb(SQLERRM,1,120);
5520: END IF;
5521: WHEN OTHERS THEN
5522: x_error_code := SQLCODE;
5523: x_error_msg_code := substrb(SQLERRM,1,120);
5524: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking supplier invoice distribution' ;
5525:
5526: IF l_debug_mode = 'Y' THEN
5527: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5528: END IF;
5523: x_error_msg_code := substrb(SQLERRM,1,120);
5524: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking supplier invoice distribution' ;
5525:
5526: IF l_debug_mode = 'Y' THEN
5527: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5528: END IF;
5529: return;
5530: END;
5531:
5549: END IF;
5550:
5551: EXCEPTION
5552: WHEN NO_DATA_FOUND THEN
5553: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No commitment transaction exist';
5554: IF l_debug_mode = 'Y' THEN
5555: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5556: END IF;
5557: WHEN OTHERS THEN
5551: EXCEPTION
5552: WHEN NO_DATA_FOUND THEN
5553: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No commitment transaction exist';
5554: IF l_debug_mode = 'Y' THEN
5555: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5556: END IF;
5557: WHEN OTHERS THEN
5558: x_error_code := SQLCODE;
5559: x_error_msg_code := substrb(SQLERRM,1,120);
5556: END IF;
5557: WHEN OTHERS THEN
5558: x_error_code := SQLCODE;
5559: x_error_msg_code := substrb(SQLERRM,1,120);
5560: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking commitment transaction';
5561:
5562: IF l_debug_mode = 'Y' THEN
5563: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5564: END IF;
5559: x_error_msg_code := substrb(SQLERRM,1,120);
5560: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking commitment transaction';
5561:
5562: IF l_debug_mode = 'Y' THEN
5563: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5564: END IF;
5565: return;
5566: END;
5567:
5589: END IF;
5590:
5591: EXCEPTION
5592: WHEN NO_DATA_FOUND THEN
5593: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No compensation rule set exist';
5594: IF l_debug_mode = 'Y' THEN
5595: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5596: END IF;
5597: WHEN OTHERS THEN
5591: EXCEPTION
5592: WHEN NO_DATA_FOUND THEN
5593: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No compensation rule set exist';
5594: IF l_debug_mode = 'Y' THEN
5595: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5596: END IF;
5597: WHEN OTHERS THEN
5598: x_error_code := SQLCODE;
5599: x_error_msg_code := substrb(SQLERRM,1,120);
5596: END IF;
5597: WHEN OTHERS THEN
5598: x_error_code := SQLCODE;
5599: x_error_msg_code := substrb(SQLERRM,1,120);
5600: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking compensation rule set';
5601:
5602: IF l_debug_mode = 'Y' THEN
5603: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5604: END IF;
5599: x_error_msg_code := substrb(SQLERRM,1,120);
5600: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking compensation rule set';
5601:
5602: IF l_debug_mode = 'Y' THEN
5603: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5604: END IF;
5605: return;
5606: END;
5607:
5624: END IF;
5625:
5626: EXCEPTION
5627: WHEN NO_DATA_FOUND THEN
5628: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No draft invoice exist';
5629: IF l_debug_mode = 'Y' THEN
5630: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5631: END IF;
5632: WHEN OTHERS THEN
5626: EXCEPTION
5627: WHEN NO_DATA_FOUND THEN
5628: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No draft invoice exist';
5629: IF l_debug_mode = 'Y' THEN
5630: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5631: END IF;
5632: WHEN OTHERS THEN
5633: x_error_code := SQLCODE;
5634: x_error_msg_code := substrb(SQLERRM,1,120);
5631: END IF;
5632: WHEN OTHERS THEN
5633: x_error_code := SQLCODE;
5634: x_error_msg_code := substrb(SQLERRM,1,120);
5635: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking draft invoices';
5636:
5637: IF l_debug_mode = 'Y' THEN
5638: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5639: END IF;
5634: x_error_msg_code := substrb(SQLERRM,1,120);
5635: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking draft invoices';
5636:
5637: IF l_debug_mode = 'Y' THEN
5638: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5639: END IF;
5640: return;
5641: END;
5642:
5660: END IF;
5661:
5662: EXCEPTION
5663: WHEN NO_DATA_FOUND THEN
5664: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No Project_customers exist';
5665: IF l_debug_mode = 'Y' THEN
5666: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5667: END IF;
5668: WHEN OTHERS THEN
5662: EXCEPTION
5663: WHEN NO_DATA_FOUND THEN
5664: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No Project_customers exist';
5665: IF l_debug_mode = 'Y' THEN
5666: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5667: END IF;
5668: WHEN OTHERS THEN
5669: x_error_code := SQLCODE;
5670: x_error_msg_code := substrb(SQLERRM,1,120);
5667: END IF;
5668: WHEN OTHERS THEN
5669: x_error_code := SQLCODE;
5670: x_error_msg_code := substrb(SQLERRM,1,120);
5671: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking project customers';
5672:
5673: IF l_debug_mode = 'Y' THEN
5674: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5675: END IF;
5670: x_error_msg_code := substrb(SQLERRM,1,120);
5671: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking project customers';
5672:
5673: IF l_debug_mode = 'Y' THEN
5674: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5675: END IF;
5676: return;
5677: END;
5678:
5697: END IF;
5698:
5699: EXCEPTION
5700: WHEN NO_DATA_FOUND THEN
5701: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No IExpenses exist in the entire task hierarchy';
5702: IF l_debug_mode = 'Y' THEN
5703: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5704: END IF;
5705: WHEN OTHERS THEN
5699: EXCEPTION
5700: WHEN NO_DATA_FOUND THEN
5701: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No IExpenses exist in the entire task hierarchy';
5702: IF l_debug_mode = 'Y' THEN
5703: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5704: END IF;
5705: WHEN OTHERS THEN
5706: x_error_code := SQLCODE;
5707: x_error_msg_code := substrb(SQLERRM,1,120);
5704: END IF;
5705: WHEN OTHERS THEN
5706: x_error_code := SQLCODE;
5707: x_error_msg_code := substrb(SQLERRM,1,120);
5708: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking IExpense Records';
5709:
5710: IF l_debug_mode = 'Y' THEN
5711: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5712: END IF;
5707: x_error_msg_code := substrb(SQLERRM,1,120);
5708: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking IExpense Records';
5709:
5710: IF l_debug_mode = 'Y' THEN
5711: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5712: END IF;
5713:
5714: return;
5715: END;
5734: END IF;
5735:
5736: EXCEPTION
5737: WHEN NO_DATA_FOUND THEN
5738: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No Inventory transactions exist in the entire task hierarchy';
5739: IF l_debug_mode = 'Y' THEN
5740: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5741: END IF;
5742: WHEN OTHERS THEN
5736: EXCEPTION
5737: WHEN NO_DATA_FOUND THEN
5738: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No Inventory transactions exist in the entire task hierarchy';
5739: IF l_debug_mode = 'Y' THEN
5740: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5741: END IF;
5742: WHEN OTHERS THEN
5743: x_error_code := SQLCODE;
5744: x_error_msg_code := substrb(SQLERRM,1,120);
5741: END IF;
5742: WHEN OTHERS THEN
5743: x_error_code := SQLCODE;
5744: x_error_msg_code := substrb(SQLERRM,1,120);
5745: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking Inventory Records';
5746:
5747: IF l_debug_mode = 'Y' THEN
5748: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5749: END IF;
5744: x_error_msg_code := substrb(SQLERRM,1,120);
5745: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking Inventory Records';
5746:
5747: IF l_debug_mode = 'Y' THEN
5748: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5749: END IF;
5750:
5751: return;
5752: END;
5754:
5755: /* END LOOP; */ --Commented By sunkalya for perf fix Bug#4964992
5756: END IF;
5757: IF l_debug_mode = 'Y' THEN
5758: Pa_Debug.reset_curr_function;
5759: END IF;
5760:
5761: EXCEPTION
5762: WHEN OTHERS THEN
5762: WHEN OTHERS THEN
5763: x_error_code := SQLCODE;
5764: x_error_msg_code := substrb(SQLERRM,1,120);
5765:
5766: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_error_msg_code;
5767:
5768: Fnd_Msg_Pub.add_exc_msg
5769: ( p_pkg_name => 'pa_proj_tsk_utils'
5770: ,p_procedure_name => 'TASK_VALIDATIONS'
5770: ,p_procedure_name => 'TASK_VALIDATIONS'
5771: ,p_error_text => x_error_msg_code);
5772:
5773: IF l_debug_mode = 'Y' THEN
5774: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,
5775: l_debug_level5);
5776:
5777: Pa_Debug.reset_curr_function;
5778: END IF;
5773: IF l_debug_mode = 'Y' THEN
5774: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,
5775: l_debug_level5);
5776:
5777: Pa_Debug.reset_curr_function;
5778: END IF;
5779: -- Important : Dont Raise : It will be taken care by Caller API
5780:
5781: end PERFORM_TASK_VALIDATIONS;
5847: BEGIN
5848: l_user_id := fnd_global.user_id;
5849: l_login_id := fnd_global.login_id;
5850:
5851: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
5852:
5853: IF l_debug_mode = 'Y' THEN
5854: PA_DEBUG.set_curr_function( p_function =>'get_task_hierarchy' , p_debug_mode => l_debug_mode );
5855: END IF;
5850:
5851: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
5852:
5853: IF l_debug_mode = 'Y' THEN
5854: PA_DEBUG.set_curr_function( p_function =>'get_task_hierarchy' , p_debug_mode => l_debug_mode );
5855: END IF;
5856:
5857: OPEN task_hierarchy;
5858: FETCH task_hierarchy BULK COLLECT INTO l_task_tbl;
5861: RETURN l_task_tbl;
5862:
5863: EXCEPTION
5864: WHEN OTHERS THEN
5865: Pa_Debug.g_err_stage:= ' API:get_task_hierarchy :Unexpected Error occured while retrieving task strucutre for '|| p_task_id;
5866: IF l_debug_mode = 'Y' THEN
5867: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5868: END IF;
5869: RAISE;
5863: EXCEPTION
5864: WHEN OTHERS THEN
5865: Pa_Debug.g_err_stage:= ' API:get_task_hierarchy :Unexpected Error occured while retrieving task strucutre for '|| p_task_id;
5866: IF l_debug_mode = 'Y' THEN
5867: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5868: END IF;
5869: RAISE;
5870: END get_task_hierarchy;
5871: