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:
3706: l_debug_level5 CONSTANT NUMBER := 5;
3707:
3708: BEGIN
3709: IF l_debug_mode = 'Y' THEN
3710: pa_debug.g_err_stage:= 'Entering GET_STRUCTURE_INFO';
3711: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3712: l_debug_level2);
3713: END IF;
3714:
3707:
3708: BEGIN
3709: IF l_debug_mode = 'Y' THEN
3710: pa_debug.g_err_stage:= 'Entering GET_STRUCTURE_INFO';
3711: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3712: l_debug_level2);
3713: END IF;
3714:
3715: x_msg_count := 0;
3713: END IF;
3714:
3715: x_msg_count := 0;
3716: x_return_status := FND_API.G_RET_STS_SUCCESS;
3717: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
3718:
3719: IF l_debug_mode = 'Y' THEN --For bug 4252182
3720:
3721: pa_debug.set_curr_function( p_function => 'GET_STRUCTURE_INFO',
3717: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
3718:
3719: IF l_debug_mode = 'Y' THEN --For bug 4252182
3720:
3721: pa_debug.set_curr_function( p_function => 'GET_STRUCTURE_INFO',
3722: p_debug_mode => l_debug_mode );
3723: END IF;
3724:
3725: -- Check for business rules violations
3725: -- Check for business rules violations
3726:
3727: IF l_debug_mode = 'Y' THEN
3728:
3729: pa_debug.g_err_stage:= 'Input parameter List :';
3730: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3731: l_debug_level3);
3732:
3733: pa_debug.g_err_stage:= 'p_project_id : ' || p_project_id;
3726:
3727: IF l_debug_mode = 'Y' THEN
3728:
3729: pa_debug.g_err_stage:= 'Input parameter List :';
3730: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3731: l_debug_level3);
3732:
3733: pa_debug.g_err_stage:= 'p_project_id : ' || p_project_id;
3734: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3729: pa_debug.g_err_stage:= 'Input parameter List :';
3730: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3731: l_debug_level3);
3732:
3733: pa_debug.g_err_stage:= 'p_project_id : ' || p_project_id;
3734: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3735: l_debug_level3);
3736:
3737:
3730: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3731: l_debug_level3);
3732:
3733: pa_debug.g_err_stage:= 'p_project_id : ' || p_project_id;
3734: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3735: l_debug_level3);
3736:
3737:
3738: pa_debug.g_err_stage:= 'p_structure_type : ' || p_structure_type;
3734: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3735: l_debug_level3);
3736:
3737:
3738: pa_debug.g_err_stage:= 'p_structure_type : ' || p_structure_type;
3739: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3740: l_debug_level3);
3741:
3742: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3735: l_debug_level3);
3736:
3737:
3738: pa_debug.g_err_stage:= 'p_structure_type : ' || p_structure_type;
3739: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3740: l_debug_level3);
3741:
3742: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3743: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3738: pa_debug.g_err_stage:= 'p_structure_type : ' || p_structure_type;
3739: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3740: l_debug_level3);
3741:
3742: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3743: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3744: l_debug_level3);
3745:
3746: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3739: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3740: l_debug_level3);
3741:
3742: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3743: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3744: l_debug_level3);
3745:
3746: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3747: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3742: pa_debug.g_err_stage:= 'p_structure_id : ' || p_structure_id;
3743: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3744: l_debug_level3);
3745:
3746: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3747: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3748: l_debug_level3);
3749:
3750: pa_debug.g_err_stage:= 'p_is_wp_versioning_enabled :' || p_is_wp_versioning_enabled;
3743: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3744: l_debug_level3);
3745:
3746: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3747: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3748: l_debug_level3);
3749:
3750: pa_debug.g_err_stage:= 'p_is_wp_versioning_enabled :' || p_is_wp_versioning_enabled;
3751: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3746: pa_debug.g_err_stage:= 'p_is_wp_separate_from_fn :' || p_is_wp_separate_from_fn;
3747: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3748: l_debug_level3);
3749:
3750: pa_debug.g_err_stage:= 'p_is_wp_versioning_enabled :' || p_is_wp_versioning_enabled;
3751: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3752: l_debug_level3);
3753: END IF;
3754:
3747: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3748: l_debug_level3);
3749:
3750: pa_debug.g_err_stage:= 'p_is_wp_versioning_enabled :' || p_is_wp_versioning_enabled;
3751: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3752: l_debug_level3);
3753: END IF;
3754:
3755:
3798: END IF;
3799: END IF;
3800:
3801: IF l_debug_mode = 'Y' THEN
3802: pa_debug.g_err_stage:= 'Obtained structure version id : '||x_structure_version_id;
3803: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3804: l_debug_level3);
3805: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3806: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3799: END IF;
3800:
3801: IF l_debug_mode = 'Y' THEN
3802: pa_debug.g_err_stage:= 'Obtained structure version id : '||x_structure_version_id;
3803: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3804: l_debug_level3);
3805: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3806: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3807: l_debug_level3);
3801: IF l_debug_mode = 'Y' THEN
3802: pa_debug.g_err_stage:= 'Obtained structure version id : '||x_structure_version_id;
3803: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3804: l_debug_level3);
3805: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3806: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3807: l_debug_level3);
3808: pa_debug.g_err_stage:= 'Exiting GET_STRUCTURE_INFO';
3809: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3802: pa_debug.g_err_stage:= 'Obtained structure version id : '||x_structure_version_id;
3803: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3804: l_debug_level3);
3805: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3806: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3807: l_debug_level3);
3808: pa_debug.g_err_stage:= 'Exiting GET_STRUCTURE_INFO';
3809: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3810: l_debug_level2);
3804: l_debug_level3);
3805: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3806: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3807: l_debug_level3);
3808: pa_debug.g_err_stage:= 'Exiting GET_STRUCTURE_INFO';
3809: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3810: l_debug_level2);
3811: END IF;
3812:
3805: pa_debug.g_err_stage:= 'Task Unpublished version status code : '||x_task_unpub_ver_status_code;
3806: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3807: l_debug_level3);
3808: pa_debug.g_err_stage:= 'Exiting GET_STRUCTURE_INFO';
3809: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3810: l_debug_level2);
3811: END IF;
3812:
3813: IF l_debug_mode = 'Y' THEN --For bug 4252182
3810: l_debug_level2);
3811: END IF;
3812:
3813: IF l_debug_mode = 'Y' THEN --For bug 4252182
3814: pa_debug.reset_curr_function;
3815: End IF;
3816: EXCEPTION
3817:
3818: WHEN Invalid_Arg_Exc_WP THEN
3847: x_msg_count := l_msg_count;
3848: END IF;
3849:
3850: IF l_debug_mode = 'Y' THEN --For bug 4252182
3851: pa_debug.reset_curr_function;
3852: End IF;
3853: RETURN;
3854:
3855: WHEN others THEN
3876: ,p_procedure_name => 'GET_STRUCTURE_INFO'
3877: ,p_error_text => x_msg_data);
3878:
3879: IF l_debug_mode = 'Y' THEN
3880: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
3881: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3882: l_debug_level5);
3883: pa_debug.reset_curr_function;
3884: END IF;
3877: ,p_error_text => x_msg_data);
3878:
3879: IF l_debug_mode = 'Y' THEN
3880: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
3881: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3882: l_debug_level5);
3883: pa_debug.reset_curr_function;
3884: END IF;
3885: RAISE;
3879: IF l_debug_mode = 'Y' THEN
3880: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
3881: pa_debug.write(g_module_name,pa_debug.g_err_stage,
3882: l_debug_level5);
3883: pa_debug.reset_curr_function;
3884: END IF;
3885: RAISE;
3886: END GET_STRUCTURE_INFO;
3887:
3948: BEGIN
3949: x_msg_count := 0;
3950: x_return_status := FND_API.G_RET_STS_SUCCESS;
3951: --Bug 3735089 - instead of fnd_profile.value use fnd_profile.value_specific
3952: --l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
3953: l_user_id := fnd_global.user_id;
3954: l_login_id := fnd_global.login_id;
3955: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
3956:
3951: --Bug 3735089 - instead of fnd_profile.value use fnd_profile.value_specific
3952: --l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
3953: l_user_id := fnd_global.user_id;
3954: l_login_id := fnd_global.login_id;
3955: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
3956:
3957: IF l_debug_mode = 'Y' THEN
3958: PA_DEBUG.set_curr_function( p_function =>'CHECK_TASK_HAS_TRANSACTION' , p_debug_mode => l_debug_mode );
3959: END IF;
3954: l_login_id := fnd_global.login_id;
3955: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
3956:
3957: IF l_debug_mode = 'Y' THEN
3958: PA_DEBUG.set_curr_function( p_function =>'CHECK_TASK_HAS_TRANSACTION' , p_debug_mode => l_debug_mode );
3959: END IF;
3960:
3961: IF l_debug_mode = 'Y' THEN
3962: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Printing Input parameters';
3958: PA_DEBUG.set_curr_function( p_function =>'CHECK_TASK_HAS_TRANSACTION' , p_debug_mode => l_debug_mode );
3959: END IF;
3960:
3961: IF l_debug_mode = 'Y' THEN
3962: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Printing Input parameters';
3963: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3964: Pa_Debug.WRITE(g_module_name , 'p_task_id'||':'||p_task_id , l_debug_level3);
3965: END IF;
3966:
3959: END IF;
3960:
3961: IF l_debug_mode = 'Y' THEN
3962: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Printing Input parameters';
3963: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3964: Pa_Debug.WRITE(g_module_name , 'p_task_id'||':'||p_task_id , l_debug_level3);
3965: END IF;
3966:
3967:
3960:
3961: IF l_debug_mode = 'Y' THEN
3962: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Printing Input parameters';
3963: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3964: Pa_Debug.WRITE(g_module_name , 'p_task_id'||':'||p_task_id , l_debug_level3);
3965: END IF;
3966:
3967:
3968: IF l_debug_mode = 'Y' THEN
3965: END IF;
3966:
3967:
3968: IF l_debug_mode = 'Y' THEN
3969: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Validating Input Paramater';
3970: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3971: END IF;
3972:
3973: -- Validating for Input parameter
3966:
3967:
3968: IF l_debug_mode = 'Y' THEN
3969: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Validating Input Paramater';
3970: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
3971: END IF;
3972:
3973: -- Validating for Input parameter
3974: IF ( p_task_id IS NOT NULL ) THEN
3974: IF ( p_task_id IS NOT NULL ) THEN
3975:
3976: --Commented to be reviewed once more with set financial task
3977: --IF l_debug_mode = 'Y' THEN
3978: -- Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Checking for financial type';
3979: -- Pa_Debug.WRITE ( g_module_name , Pa_Debug.g_err_stage , l_debug_level3 );
3980: --END IF;
3981:
3982: --Select the parent structure version id for the passed task id
3975:
3976: --Commented to be reviewed once more with set financial task
3977: --IF l_debug_mode = 'Y' THEN
3978: -- Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Checking for financial type';
3979: -- Pa_Debug.WRITE ( g_module_name , Pa_Debug.g_err_stage , l_debug_level3 );
3980: --END IF;
3981:
3982: --Select the parent structure version id for the passed task id
3983: --OPEN c_get_parent_str_ver_id ( p_task_id );
3996:
3997: -- Commenting code for 4903460 and replacing this wth new code
3998: --Check if task has expenditure item
3999: /* IF l_debug_mode = 'Y' THEN
4000: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check expenditure item for '|| p_task_id;
4001: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
4002: END IF;
4003: l_status_code :=
4004: pa_proj_tsk_utils.check_exp_item_exists(null, p_task_id);
3997: -- Commenting code for 4903460 and replacing this wth new code
3998: --Check if task has expenditure item
3999: /* IF l_debug_mode = 'Y' THEN
4000: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check expenditure item for '|| p_task_id;
4001: Pa_Debug.WRITE(g_module_name , Pa_Debug.g_err_stage , l_debug_level3);
4002: END IF;
4003: l_status_code :=
4004: pa_proj_tsk_utils.check_exp_item_exists(null, p_task_id);
4005: IF ( l_status_code = 1 ) THEN
4012: END IF;
4013:
4014: --Check if task has purchase order distribution
4015: IF l_debug_mode = 'Y' THEN
4016: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check purchase order for '|| p_task_id;
4017: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4018: l_debug_level3);
4019: END IF;
4020: l_status_code :=
4013:
4014: --Check if task has purchase order distribution
4015: IF l_debug_mode = 'Y' THEN
4016: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check purchase order for '|| p_task_id;
4017: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4018: l_debug_level3);
4019: END IF;
4020: l_status_code :=
4021: pa_proj_tsk_utils.check_po_dist_exists(NULL, p_task_id);
4029: END IF;
4030:
4031: -- Check if task has purchase order requisition
4032: IF l_debug_mode = 'Y' THEN
4033: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check purchase order requisition for '|| p_task_id;
4034: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4035: l_debug_level3);
4036: END IF;
4037:
4030:
4031: -- Check if task has purchase order requisition
4032: IF l_debug_mode = 'Y' THEN
4033: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check purchase order requisition for '|| p_task_id;
4034: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4035: l_debug_level3);
4036: END IF;
4037:
4038: l_status_code :=
4047: END IF;
4048:
4049: -- Check if task has supplier invoices
4050: IF l_debug_mode = 'Y' THEN
4051: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check supplier invoice for '|| p_task_id;
4052: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4053: l_debug_level3);
4054: END IF;
4055:
4048:
4049: -- Check if task has supplier invoices
4050: IF l_debug_mode = 'Y' THEN
4051: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check supplier invoice for '|| p_task_id;
4052: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4053: l_debug_level3);
4054: END IF;
4055:
4056: l_status_code :=
4065: END IF;
4066:
4067: -- Check if task has supplier invoice distribution
4068: IF l_debug_mode = 'Y' THEN
4069: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check supplier inv distribution for '|| p_task_id;
4070: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4071: l_debug_level3);
4072: END IF;
4073:
4066:
4067: -- Check if task has supplier invoice distribution
4068: IF l_debug_mode = 'Y' THEN
4069: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check supplier inv distribution for '|| p_task_id;
4070: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4071: l_debug_level3);
4072: END IF;
4073:
4074: l_status_code :=
4083: END IF;
4084:
4085: -- Check if task has commitment transaction
4086: IF l_debug_mode = 'Y' THEN
4087: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check commitment transaction for '|| p_task_id;
4088: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4089: l_debug_level3);
4090: END IF;
4091: l_status_code :=
4084:
4085: -- Check if task has commitment transaction
4086: IF l_debug_mode = 'Y' THEN
4087: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check commitment transaction for '|| p_task_id;
4088: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4089: l_debug_level3);
4090: END IF;
4091: l_status_code :=
4092: pa_proj_tsk_utils.check_commitment_txn_exists(null, p_task_id);
4100: END IF;
4101:
4102: -- Check if task has compensation rule set
4103: IF l_debug_mode = 'Y' THEN
4104: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check compensation rule set for '|| p_task_id;
4105: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4106: l_debug_level3);
4107: END IF;
4108:
4101:
4102: -- Check if task has compensation rule set
4103: IF l_debug_mode = 'Y' THEN
4104: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check compensation rule set for '|| p_task_id;
4105: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4106: l_debug_level3);
4107: END IF;
4108:
4109: l_status_code :=
4118: END IF; */
4119: -- End of Commenting for 4903460
4120: -- Check if task is in use in an external system
4121: IF l_debug_mode = 'Y' THEN
4122: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check for task used in external system for'|| p_task_id;
4123: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4124: l_debug_level3);
4125: END IF;
4126:
4119: -- End of Commenting for 4903460
4120: -- Check if task is in use in an external system
4121: IF l_debug_mode = 'Y' THEN
4122: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check for task used in external system for'|| p_task_id;
4123: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4124: l_debug_level3);
4125: END IF;
4126:
4127: l_status_code :=
4146: END IF;
4147:
4148: -- Check if task is used in allocations
4149: IF l_debug_mode = 'Y' THEN
4150: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check if project allocations uses task '|| p_task_id;
4151: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4152: l_debug_level3);
4153: END IF;
4154:
4147:
4148: -- Check if task is used in allocations
4149: IF l_debug_mode = 'Y' THEN
4150: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check if project allocations uses task '|| p_task_id;
4151: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4152: l_debug_level3);
4153: END IF;
4154:
4155: l_return_val :=
4163: -- Commenting for Performance fix 4903460
4164: /*
4165: -- Check if task has draft invoices
4166: IF l_debug_mode = 'Y' THEN
4167: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check draft invoice for '|| p_task_id;
4168: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4169: l_debug_level3);
4170: END IF;
4171:
4164: /*
4165: -- Check if task has draft invoices
4166: IF l_debug_mode = 'Y' THEN
4167: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check draft invoice for '|| p_task_id;
4168: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4169: l_debug_level3);
4170: END IF;
4171:
4172: l_status_code :=
4181: END IF;
4182:
4183: -- Check if task has Project_customers
4184: IF l_debug_mode = 'Y' THEN
4185: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check Project Customers for '|| p_task_id;
4186: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4187: l_debug_level3);
4188: END IF;
4189:
4182:
4183: -- Check if task has Project_customers
4184: IF l_debug_mode = 'Y' THEN
4185: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check Project Customers for '|| p_task_id;
4186: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4187: l_debug_level3);
4188: END IF;
4189:
4190:
4216:
4217: -- Check if project contract is installed
4218: IF (pa_install.is_product_installed('OKE')) THEN
4219: IF l_debug_mode = 'Y' THEN
4220: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Check contract association for task '|| p_task_id;
4221: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4222: l_debug_level3);
4223: END IF;
4224:
4217: -- Check if project contract is installed
4218: IF (pa_install.is_product_installed('OKE')) THEN
4219: IF l_debug_mode = 'Y' THEN
4220: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : Check contract association for task '|| p_task_id;
4221: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4222: l_debug_level3);
4223: END IF;
4224:
4225: IF (PA_PROJ_STRUCTURE_PUB.CHECK_TASK_CONTRACT_ASSO(p_task_id) <>
4246: --end of OTL check.
4247: Is_IEX_Installed := pa_install.is_product_installed('IEX');
4248: If Is_IEX_Installed then
4249: IF l_debug_mode = 'Y' THEN
4250: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check if task '|| p_task_id || ' is charged in iexpense';
4251: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4252: l_debug_level3);
4253: END IF;
4254:
4247: Is_IEX_Installed := pa_install.is_product_installed('IEX');
4248: If Is_IEX_Installed then
4249: IF l_debug_mode = 'Y' THEN
4250: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : check if task '|| p_task_id || ' is charged in iexpense';
4251: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4252: l_debug_level3);
4253: END IF;
4254:
4255: l_status_code := pa_proj_tsk_utils.check_iex_task_charged(p_task_id);
4263: END IF;
4264: END IF;
4265: --BEGIN
4266: IF l_debug_mode = 'Y' THEN
4267: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK'|| p_task_id;
4268: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4269: l_debug_level3);
4270: END IF;
4271:
4264: END IF;
4265: --BEGIN
4266: IF l_debug_mode = 'Y' THEN
4267: Pa_Debug.g_err_stage:= 'PA_PROJ_ELEMENTS_UTILS : CHECK_TASK_HAS_TRANSACTION : PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK'|| p_task_id;
4268: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4269: l_debug_level3);
4270: END IF;
4271:
4272: PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK(
4282: return;
4283: END IF;
4284: --EXCEPTION WHEN OTHERS THEN
4285: -- IF l_debug_mode = 'Y' THEN
4286: -- Pa_Debug.g_err_stage:= 'API PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK FAILED';
4287: -- Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4288: -- l_debug_level3);
4289: -- END IF;
4290: --END;
4283: END IF;
4284: --EXCEPTION WHEN OTHERS THEN
4285: -- IF l_debug_mode = 'Y' THEN
4286: -- Pa_Debug.g_err_stage:= 'API PA_FIN_PLAN_UTILS.CHECK_DELETE_TASK_OK FAILED';
4287: -- Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4288: -- l_debug_level3);
4289: -- END IF;
4290: --END;
4291:
4295:
4296: -- Bug 3735089 : using reset_curr_function too, just using set_curr_function may overflow it after several recursive calls
4297: -- and it gives ORA 06512 numeric or value error
4298: IF l_debug_mode = 'Y' THEN
4299: Pa_Debug.reset_curr_function;
4300: END IF;
4301:
4302:
4303: EXCEPTION
4317: ,p_procedure_name => 'CHECK_TASK_HAS_TRANSACTION'
4318: ,p_error_text => x_msg_data);
4319:
4320: IF l_debug_mode = 'Y' THEN
4321: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
4322: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4323: l_debug_level5);
4324:
4325: Pa_Debug.reset_curr_function;
4318: ,p_error_text => x_msg_data);
4319:
4320: IF l_debug_mode = 'Y' THEN
4321: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
4322: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4323: l_debug_level5);
4324:
4325: Pa_Debug.reset_curr_function;
4326: END IF;
4321: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
4322: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
4323: l_debug_level5);
4324:
4325: Pa_Debug.reset_curr_function;
4326: END IF;
4327: RAISE;
4328:
4329: END CHECK_TASK_HAS_TRANSACTION;
5427: x_error_msg_code := NULL ;
5428:
5429: l_user_id := fnd_global.user_id;
5430: l_login_id := fnd_global.login_id;
5431: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
5432:
5433: IF l_debug_mode = 'Y' THEN
5434: PA_DEBUG.set_curr_function( p_function =>'PERFORM_TASK_VALIDATIONS' , p_debug_mode => l_debug_mode );
5435: END IF;
5430: l_login_id := fnd_global.login_id;
5431: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
5432:
5433: IF l_debug_mode = 'Y' THEN
5434: PA_DEBUG.set_curr_function( p_function =>'PERFORM_TASK_VALIDATIONS' , p_debug_mode => l_debug_mode );
5435: END IF;
5436:
5437: IF l_debug_mode = 'Y' THEN
5438: Pa_Debug.g_err_stage:= 'TASK_VALIDATIONS : Printing Input parameters';
5434: PA_DEBUG.set_curr_function( p_function =>'PERFORM_TASK_VALIDATIONS' , p_debug_mode => l_debug_mode );
5435: END IF;
5436:
5437: IF l_debug_mode = 'Y' THEN
5438: Pa_Debug.g_err_stage:= 'TASK_VALIDATIONS : Printing Input parameters';
5439: Pa_Debug.WRITE('pa_proj_tsk_utils', Pa_Debug.g_err_stage ,l_debug_level3 );
5440: Pa_Debug.WRITE('pa_proj_tsk_utils', 'p_task_id'||':'||p_task_id , l_debug_level3);
5441: END IF;
5442:
5435: END IF;
5436:
5437: IF l_debug_mode = 'Y' THEN
5438: Pa_Debug.g_err_stage:= 'TASK_VALIDATIONS : Printing Input parameters';
5439: Pa_Debug.WRITE('pa_proj_tsk_utils', Pa_Debug.g_err_stage ,l_debug_level3 );
5440: Pa_Debug.WRITE('pa_proj_tsk_utils', 'p_task_id'||':'||p_task_id , l_debug_level3);
5441: END IF;
5442:
5443: l_Cbs_Enabled := PA_ALTERNATE_TASK_PVT.Is_Cbs_Enabled(p_Project_Id => p_project_id); -- bug#16461684
5436:
5437: IF l_debug_mode = 'Y' THEN
5438: Pa_Debug.g_err_stage:= 'TASK_VALIDATIONS : Printing Input parameters';
5439: Pa_Debug.WRITE('pa_proj_tsk_utils', Pa_Debug.g_err_stage ,l_debug_level3 );
5440: Pa_Debug.WRITE('pa_proj_tsk_utils', 'p_task_id'||':'||p_task_id , l_debug_level3);
5441: END IF;
5442:
5443: l_Cbs_Enabled := PA_ALTERNATE_TASK_PVT.Is_Cbs_Enabled(p_Project_Id => p_project_id); -- bug#16461684
5444:
5522: END IF;
5523:
5524: EXCEPTION
5525: WHEN NO_DATA_FOUND THEN
5526: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS : No Expenditure Items exist in the entire task hierarchy';
5527: IF l_debug_mode = 'Y' THEN
5528: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5529: END IF;
5530: WHEN OTHERS THEN
5524: EXCEPTION
5525: WHEN NO_DATA_FOUND THEN
5526: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS : No Expenditure Items exist in the entire task hierarchy';
5527: IF l_debug_mode = 'Y' THEN
5528: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5529: END IF;
5530: WHEN OTHERS THEN
5531: x_error_code := SQLCODE;
5532: x_error_msg_code := substrb(SQLERRM,1,120);
5529: END IF;
5530: WHEN OTHERS THEN
5531: x_error_code := SQLCODE;
5532: x_error_msg_code := substrb(SQLERRM,1,120);
5533: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking Expenditure Items';
5534:
5535: IF l_debug_mode = 'Y' THEN
5536: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5537: END IF;
5532: x_error_msg_code := substrb(SQLERRM,1,120);
5533: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking Expenditure Items';
5534:
5535: IF l_debug_mode = 'Y' THEN
5536: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5537: END IF;
5538: return;
5539: END;
5540:
5564: END IF;
5565:
5566: EXCEPTION
5567: WHEN NO_DATA_FOUND THEN
5568: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No purchase order distribution exist in the entire task hierarchy';
5569: IF l_debug_mode = 'Y' THEN
5570: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5571: END IF;
5572: WHEN OTHERS THEN
5566: EXCEPTION
5567: WHEN NO_DATA_FOUND THEN
5568: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No purchase order distribution exist in the entire task hierarchy';
5569: IF l_debug_mode = 'Y' THEN
5570: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5571: END IF;
5572: WHEN OTHERS THEN
5573: x_error_code := SQLCODE;
5574: x_error_msg_code := substrb(SQLERRM,1,120);
5571: END IF;
5572: WHEN OTHERS THEN
5573: x_error_code := SQLCODE;
5574: x_error_msg_code := substrb(SQLERRM,1,120);
5575: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking purchase order distribution';
5576:
5577: IF l_debug_mode = 'Y' THEN
5578: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5579: END IF;
5574: x_error_msg_code := substrb(SQLERRM,1,120);
5575: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking purchase order distribution';
5576:
5577: IF l_debug_mode = 'Y' THEN
5578: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5579: END IF;
5580:
5581: return;
5582: END;
5606: END IF;
5607:
5608: EXCEPTION
5609: WHEN NO_DATA_FOUND THEN
5610: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No purchase order requisition exist in the entire task hierarchy';
5611: IF l_debug_mode = 'Y' THEN
5612: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5613: END IF;
5614: WHEN OTHERS THEN
5608: EXCEPTION
5609: WHEN NO_DATA_FOUND THEN
5610: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No purchase order requisition exist in the entire task hierarchy';
5611: IF l_debug_mode = 'Y' THEN
5612: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5613: END IF;
5614: WHEN OTHERS THEN
5615: x_error_code := SQLCODE;
5616: x_error_msg_code := substrb(SQLERRM,1,120);
5613: END IF;
5614: WHEN OTHERS THEN
5615: x_error_code := SQLCODE;
5616: x_error_msg_code := substrb(SQLERRM,1,120);
5617: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking purchase order requisition';
5618:
5619: IF l_debug_mode = 'Y' THEN
5620: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5621: END IF;
5616: x_error_msg_code := substrb(SQLERRM,1,120);
5617: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking purchase order requisition';
5618:
5619: IF l_debug_mode = 'Y' THEN
5620: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5621: END IF;
5622:
5623: return;
5624: END;
5648: END IF;
5649:
5650: EXCEPTION
5651: WHEN NO_DATA_FOUND THEN
5652: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No supplier invoices exist in the entire task hierarchy' ;
5653: IF l_debug_mode = 'Y' THEN
5654: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5655: END IF;
5656: WHEN OTHERS THEN
5650: EXCEPTION
5651: WHEN NO_DATA_FOUND THEN
5652: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No supplier invoices exist in the entire task hierarchy' ;
5653: IF l_debug_mode = 'Y' THEN
5654: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5655: END IF;
5656: WHEN OTHERS THEN
5657: x_error_code := SQLCODE;
5658: x_error_msg_code := substrb(SQLERRM,1,120);
5655: END IF;
5656: WHEN OTHERS THEN
5657: x_error_code := SQLCODE;
5658: x_error_msg_code := substrb(SQLERRM,1,120);
5659: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking supplier invoices';
5660:
5661: IF l_debug_mode = 'Y' THEN
5662: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5663: END IF;
5658: x_error_msg_code := substrb(SQLERRM,1,120);
5659: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking supplier invoices';
5660:
5661: IF l_debug_mode = 'Y' THEN
5662: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5663: END IF;
5664: return;
5665: END;
5666:
5689: END IF;
5690:
5691: EXCEPTION
5692: WHEN NO_DATA_FOUND THEN
5693: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No supplier invoice distribution exist';
5694: IF l_debug_mode = 'Y' THEN
5695: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5696: END IF;
5697: WHEN OTHERS THEN
5691: EXCEPTION
5692: WHEN NO_DATA_FOUND THEN
5693: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No supplier invoice distribution exist';
5694: IF l_debug_mode = 'Y' THEN
5695: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5696: END IF;
5697: WHEN OTHERS THEN
5698: x_error_code := SQLCODE;
5699: x_error_msg_code := substrb(SQLERRM,1,120);
5696: END IF;
5697: WHEN OTHERS THEN
5698: x_error_code := SQLCODE;
5699: x_error_msg_code := substrb(SQLERRM,1,120);
5700: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking supplier invoice distribution' ;
5701:
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;
5699: x_error_msg_code := substrb(SQLERRM,1,120);
5700: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking supplier invoice distribution' ;
5701:
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: return;
5706: END;
5707:
5727: END IF;
5728:
5729: EXCEPTION
5730: WHEN NO_DATA_FOUND THEN
5731: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No commitment transaction exist';
5732: IF l_debug_mode = 'Y' THEN
5733: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5734: END IF;
5735: WHEN OTHERS THEN
5729: EXCEPTION
5730: WHEN NO_DATA_FOUND THEN
5731: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No commitment transaction exist';
5732: IF l_debug_mode = 'Y' THEN
5733: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5734: END IF;
5735: WHEN OTHERS THEN
5736: x_error_code := SQLCODE;
5737: x_error_msg_code := substrb(SQLERRM,1,120);
5734: END IF;
5735: WHEN OTHERS THEN
5736: x_error_code := SQLCODE;
5737: x_error_msg_code := substrb(SQLERRM,1,120);
5738: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking commitment transaction';
5739:
5740: IF l_debug_mode = 'Y' THEN
5741: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5742: END IF;
5737: x_error_msg_code := substrb(SQLERRM,1,120);
5738: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking commitment transaction';
5739:
5740: IF l_debug_mode = 'Y' THEN
5741: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5742: END IF;
5743: return;
5744: END;
5745:
5769: END IF;
5770:
5771: EXCEPTION
5772: WHEN NO_DATA_FOUND THEN
5773: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No compensation rule set exist';
5774: IF l_debug_mode = 'Y' THEN
5775: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5776: END IF;
5777: WHEN OTHERS THEN
5771: EXCEPTION
5772: WHEN NO_DATA_FOUND THEN
5773: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No compensation rule set exist';
5774: IF l_debug_mode = 'Y' THEN
5775: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5776: END IF;
5777: WHEN OTHERS THEN
5778: x_error_code := SQLCODE;
5779: x_error_msg_code := substrb(SQLERRM,1,120);
5776: END IF;
5777: WHEN OTHERS THEN
5778: x_error_code := SQLCODE;
5779: x_error_msg_code := substrb(SQLERRM,1,120);
5780: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking compensation rule set';
5781:
5782: IF l_debug_mode = 'Y' THEN
5783: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5784: END IF;
5779: x_error_msg_code := substrb(SQLERRM,1,120);
5780: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking compensation rule set';
5781:
5782: IF l_debug_mode = 'Y' THEN
5783: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5784: END IF;
5785: return;
5786: END;
5787:
5810: END IF;
5811:
5812: EXCEPTION
5813: WHEN NO_DATA_FOUND THEN
5814: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No draft invoice exist';
5815: IF l_debug_mode = 'Y' THEN
5816: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5817: END IF;
5818: WHEN OTHERS THEN
5812: EXCEPTION
5813: WHEN NO_DATA_FOUND THEN
5814: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No draft invoice exist';
5815: IF l_debug_mode = 'Y' THEN
5816: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5817: END IF;
5818: WHEN OTHERS THEN
5819: x_error_code := SQLCODE;
5820: x_error_msg_code := substrb(SQLERRM,1,120);
5817: END IF;
5818: WHEN OTHERS THEN
5819: x_error_code := SQLCODE;
5820: x_error_msg_code := substrb(SQLERRM,1,120);
5821: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking draft invoices';
5822:
5823: IF l_debug_mode = 'Y' THEN
5824: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5825: END IF;
5820: x_error_msg_code := substrb(SQLERRM,1,120);
5821: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking draft invoices';
5822:
5823: IF l_debug_mode = 'Y' THEN
5824: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5825: END IF;
5826: return;
5827: END;
5828:
5848: END IF;
5849:
5850: EXCEPTION
5851: WHEN NO_DATA_FOUND THEN
5852: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No Project_customers exist';
5853: IF l_debug_mode = 'Y' THEN
5854: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5855: END IF;
5856: WHEN OTHERS THEN
5850: EXCEPTION
5851: WHEN NO_DATA_FOUND THEN
5852: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No Project_customers exist';
5853: IF l_debug_mode = 'Y' THEN
5854: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5855: END IF;
5856: WHEN OTHERS THEN
5857: x_error_code := SQLCODE;
5858: x_error_msg_code := substrb(SQLERRM,1,120);
5855: END IF;
5856: WHEN OTHERS THEN
5857: x_error_code := SQLCODE;
5858: x_error_msg_code := substrb(SQLERRM,1,120);
5859: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking project customers';
5860:
5861: IF l_debug_mode = 'Y' THEN
5862: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5863: END IF;
5858: x_error_msg_code := substrb(SQLERRM,1,120);
5859: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking project customers';
5860:
5861: IF l_debug_mode = 'Y' THEN
5862: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5863: END IF;
5864: return;
5865: END;
5866:
5890: END IF;
5891:
5892: EXCEPTION
5893: WHEN NO_DATA_FOUND THEN
5894: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No IExpenses exist in the entire task hierarchy';
5895: IF l_debug_mode = 'Y' THEN
5896: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5897: END IF;
5898: WHEN OTHERS THEN
5892: EXCEPTION
5893: WHEN NO_DATA_FOUND THEN
5894: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No IExpenses exist in the entire task hierarchy';
5895: IF l_debug_mode = 'Y' THEN
5896: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5897: END IF;
5898: WHEN OTHERS THEN
5899: x_error_code := SQLCODE;
5900: x_error_msg_code := substrb(SQLERRM,1,120);
5897: END IF;
5898: WHEN OTHERS THEN
5899: x_error_code := SQLCODE;
5900: x_error_msg_code := substrb(SQLERRM,1,120);
5901: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking IExpense Records';
5902:
5903: IF l_debug_mode = 'Y' THEN
5904: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5905: END IF;
5900: x_error_msg_code := substrb(SQLERRM,1,120);
5901: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking IExpense Records';
5902:
5903: IF l_debug_mode = 'Y' THEN
5904: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5905: END IF;
5906:
5907: return;
5908: END;
5932: END IF;
5933:
5934: EXCEPTION
5935: WHEN NO_DATA_FOUND THEN
5936: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No Inventory transactions exist in the entire task hierarchy';
5937: IF l_debug_mode = 'Y' THEN
5938: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5939: END IF;
5940: WHEN OTHERS THEN
5934: EXCEPTION
5935: WHEN NO_DATA_FOUND THEN
5936: Pa_Debug.g_err_stage:= 'API : TASK_VALIDATIONS : No Inventory transactions exist in the entire task hierarchy';
5937: IF l_debug_mode = 'Y' THEN
5938: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5939: END IF;
5940: WHEN OTHERS THEN
5941: x_error_code := SQLCODE;
5942: x_error_msg_code := substrb(SQLERRM,1,120);
5939: END IF;
5940: WHEN OTHERS THEN
5941: x_error_code := SQLCODE;
5942: x_error_msg_code := substrb(SQLERRM,1,120);
5943: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking Inventory Records';
5944:
5945: IF l_debug_mode = 'Y' THEN
5946: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5947: END IF;
5942: x_error_msg_code := substrb(SQLERRM,1,120);
5943: Pa_Debug.g_err_stage:= ' TASK_VALIDATIONS :Unexpected Error occured while checking Inventory Records';
5944:
5945: IF l_debug_mode = 'Y' THEN
5946: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
5947: END IF;
5948:
5949: return;
5950: END;
5952:
5953: /* END LOOP; */ --Commented By sunkalya for perf fix Bug#4964992
5954: END IF;
5955: IF l_debug_mode = 'Y' THEN
5956: Pa_Debug.reset_curr_function;
5957: END IF;
5958:
5959: EXCEPTION
5960: WHEN OTHERS THEN
5960: WHEN OTHERS THEN
5961: x_error_code := SQLCODE;
5962: x_error_msg_code := substrb(SQLERRM,1,120);
5963:
5964: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_error_msg_code;
5965:
5966: Fnd_Msg_Pub.add_exc_msg
5967: ( p_pkg_name => 'pa_proj_tsk_utils'
5968: ,p_procedure_name => 'TASK_VALIDATIONS'
5968: ,p_procedure_name => 'TASK_VALIDATIONS'
5969: ,p_error_text => x_error_msg_code);
5970:
5971: IF l_debug_mode = 'Y' THEN
5972: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,
5973: l_debug_level5);
5974:
5975: Pa_Debug.reset_curr_function;
5976: END IF;
5971: IF l_debug_mode = 'Y' THEN
5972: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,
5973: l_debug_level5);
5974:
5975: Pa_Debug.reset_curr_function;
5976: END IF;
5977: -- Important : Dont Raise : It will be taken care by Caller API
5978:
5979: end PERFORM_TASK_VALIDATIONS;
6045: BEGIN
6046: l_user_id := fnd_global.user_id;
6047: l_login_id := fnd_global.login_id;
6048:
6049: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
6050:
6051: IF l_debug_mode = 'Y' THEN
6052: PA_DEBUG.set_curr_function( p_function =>'get_task_hierarchy' , p_debug_mode => l_debug_mode );
6053: END IF;
6048:
6049: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
6050:
6051: IF l_debug_mode = 'Y' THEN
6052: PA_DEBUG.set_curr_function( p_function =>'get_task_hierarchy' , p_debug_mode => l_debug_mode );
6053: END IF;
6054:
6055: OPEN task_hierarchy;
6056: FETCH task_hierarchy BULK COLLECT INTO l_task_tbl;
6056: FETCH task_hierarchy BULK COLLECT INTO l_task_tbl;
6057: CLOSE task_hierarchy;
6058:
6059: IF l_debug_mode = 'Y' THEN --Bug 8525293 Start
6060: pa_debug.reset_curr_function;
6061: END IF ; --Bug 8525293 End
6062:
6063: RETURN l_task_tbl;
6064:
6063: RETURN l_task_tbl;
6064:
6065: EXCEPTION
6066: WHEN OTHERS THEN
6067: Pa_Debug.g_err_stage:= ' API:get_task_hierarchy :Unexpected Error occured while retrieving task strucutre for '|| p_task_id;
6068: IF l_debug_mode = 'Y' THEN
6069: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
6070: pa_debug.reset_curr_function; --Bug 8525293
6071: END IF;
6065: EXCEPTION
6066: WHEN OTHERS THEN
6067: Pa_Debug.g_err_stage:= ' API:get_task_hierarchy :Unexpected Error occured while retrieving task strucutre for '|| p_task_id;
6068: IF l_debug_mode = 'Y' THEN
6069: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
6070: pa_debug.reset_curr_function; --Bug 8525293
6071: END IF;
6072: RAISE;
6073: END get_task_hierarchy;
6066: WHEN OTHERS THEN
6067: Pa_Debug.g_err_stage:= ' API:get_task_hierarchy :Unexpected Error occured while retrieving task strucutre for '|| p_task_id;
6068: IF l_debug_mode = 'Y' THEN
6069: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
6070: pa_debug.reset_curr_function; --Bug 8525293
6071: END IF;
6072: RAISE;
6073: END get_task_hierarchy;
6074:
6104: BEGIN
6105: l_user_id := fnd_global.user_id;
6106: l_login_id := fnd_global.login_id;
6107:
6108: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
6109:
6110: IF l_debug_mode = 'Y' THEN
6111: PA_DEBUG.set_curr_function( p_function =>'get_Alt_task_List' , p_debug_mode => l_debug_mode );
6112: END IF;
6107:
6108: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',l_user_id, l_login_id,275,null,null),'N');
6109:
6110: IF l_debug_mode = 'Y' THEN
6111: PA_DEBUG.set_curr_function( p_function =>'get_Alt_task_List' , p_debug_mode => l_debug_mode );
6112: END IF;
6113:
6114: OPEN task_hierarchy;
6115: FETCH task_hierarchy BULK COLLECT INTO l_alt_task_tbl;
6115: FETCH task_hierarchy BULK COLLECT INTO l_alt_task_tbl;
6116: CLOSE task_hierarchy;
6117:
6118: IF l_debug_mode = 'Y' THEN
6119: pa_debug.reset_curr_function;
6120: END IF ;
6121:
6122: RETURN l_alt_task_tbl;
6123:
6122: RETURN l_alt_task_tbl;
6123:
6124: EXCEPTION
6125: WHEN OTHERS THEN
6126: Pa_Debug.g_err_stage:= ' API:get_Alt_task_List :Unexpected Error occured while retrieving task strucutre for '|| p_task_id;
6127: IF l_debug_mode = 'Y' THEN
6128: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
6129: pa_debug.reset_curr_function;
6130: END IF;
6124: EXCEPTION
6125: WHEN OTHERS THEN
6126: Pa_Debug.g_err_stage:= ' API:get_Alt_task_List :Unexpected Error occured while retrieving task strucutre for '|| p_task_id;
6127: IF l_debug_mode = 'Y' THEN
6128: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
6129: pa_debug.reset_curr_function;
6130: END IF;
6131: RAISE;
6132: END get_Alt_task_List;
6125: WHEN OTHERS THEN
6126: Pa_Debug.g_err_stage:= ' API:get_Alt_task_List :Unexpected Error occured while retrieving task strucutre for '|| p_task_id;
6127: IF l_debug_mode = 'Y' THEN
6128: Pa_Debug.WRITE('pa_proj_tsk_utils',Pa_Debug.g_err_stage,l_debug_level3);
6129: pa_debug.reset_curr_function;
6130: END IF;
6131: RAISE;
6132: END get_Alt_task_List;
6133: