5:
6: -- To check on, whether to print debug messages in log file or not
7: L_DEBUG varchar2(1) := NVL(FND_PROFILE.value('GMS_ENABLE_DEBUG_MODE'), 'N');
8:
9: G_USER_ID CONSTANT NUMBER := FND_GLOBAL.user_id;
10: G_LOGIN_ID CONSTANT NUMBER := FND_GLOBAL.login_id;
11:
12: ----------------------------------------------------------------------------------------
13:
6: -- To check on, whether to print debug messages in log file or not
7: L_DEBUG varchar2(1) := NVL(FND_PROFILE.value('GMS_ENABLE_DEBUG_MODE'), 'N');
8:
9: G_USER_ID CONSTANT NUMBER := FND_GLOBAL.user_id;
10: G_LOGIN_ID CONSTANT NUMBER := FND_GLOBAL.login_id;
11:
12: ----------------------------------------------------------------------------------------
13:
14: function G_PA_MISS_NUM return number
803: x_err_code := 0;
804: l_old_stack := x_err_stack;
805: x_err_stack := x_err_stack || '->summerize_project_totals';
806:
807: x_created_by := FND_GLOBAL.USER_ID;
808: x_last_update_login := FND_GLOBAL.LOGIN_ID;
809:
810: -- Get the project_totals
811: x_err_stage := 'get project totals <' || to_char(x_budget_version_id)
804: l_old_stack := x_err_stack;
805: x_err_stack := x_err_stack || '->summerize_project_totals';
806:
807: x_created_by := FND_GLOBAL.USER_ID;
808: x_last_update_login := FND_GLOBAL.LOGIN_ID;
809:
810: -- Get the project_totals
811: x_err_stage := 'get project totals <' || to_char(x_budget_version_id)
812: || '>';
1797:
1798: END IF;
1799: --------------------------------------------------------------------------------
1800:
1801: l_resp_id := FND_GLOBAL.Resp_id;
1802: l_user_id := FND_GLOBAL.User_id;
1803: l_login_id := FND_GLOBAL.Login_id;
1804:
1805: l_module_name := 'GMS_PM_CREATE_DRAFT_BUDGET';
1798: END IF;
1799: --------------------------------------------------------------------------------
1800:
1801: l_resp_id := FND_GLOBAL.Resp_id;
1802: l_user_id := FND_GLOBAL.User_id;
1803: l_login_id := FND_GLOBAL.Login_id;
1804:
1805: l_module_name := 'GMS_PM_CREATE_DRAFT_BUDGET';
1806:
1799: --------------------------------------------------------------------------------
1800:
1801: l_resp_id := FND_GLOBAL.Resp_id;
1802: l_user_id := FND_GLOBAL.User_id;
1803: l_login_id := FND_GLOBAL.Login_id;
1804:
1805: l_module_name := 'GMS_PM_CREATE_DRAFT_BUDGET';
1806:
1807: -- As part of enforcing award security, which would determine
2773: l_app_short_name VARCHAR2(30); -- used for summarizing project budgets
2774: l_return_status VARCHAR2(30); -- used for summarizing project budgets and gms_sweeping
2775: l_dummy_num NUMBER;
2776: l_dummy_char VARCHAR2(255);
2777: l_conc_request_id NUMBER := FND_GLOBAL.CONC_REQUEST_ID;
2778: l_packet_id NUMBER;
2779: v_project_start_date DATE;
2780: v_project_completion_date DATE;
2781: l_user_profile_value1 VARCHAR2(30);
2885: open l_award_csr(l_award_id);
2886: fetch l_award_csr into l_award_number;
2887: close l_award_csr;
2888:
2889: l_resp_id := FND_GLOBAL.Resp_id;
2890: l_user_id := FND_GLOBAL.User_id;
2891: l_login_id := FND_GLOBAL.Login_id;
2892:
2893: l_module_name := 'GMS_PM_BASELINE_BUDGET';
2886: fetch l_award_csr into l_award_number;
2887: close l_award_csr;
2888:
2889: l_resp_id := FND_GLOBAL.Resp_id;
2890: l_user_id := FND_GLOBAL.User_id;
2891: l_login_id := FND_GLOBAL.Login_id;
2892:
2893: l_module_name := 'GMS_PM_BASELINE_BUDGET';
2894:
2887: close l_award_csr;
2888:
2889: l_resp_id := FND_GLOBAL.Resp_id;
2890: l_user_id := FND_GLOBAL.User_id;
2891: l_login_id := FND_GLOBAL.Login_id;
2892:
2893: l_module_name := 'GMS_PM_BASELINE_BUDGET';
2894:
2895: -- As part of enforcing award security, which would determine
3782: gms_error_pkg.gms_debug('GMS_BUDGET_PUB.BASELINE_BUDGET - Start of Project Budget Summarization ', 'C');
3783: END IF;
3784:
3785: -- Bug 2386041
3786: l_user_profile_value1 := fnd_profile.value_specific('PA_SUPER_PROJECT', fnd_global.user_id, fnd_global.resp_id, fnd_global.resp_appl_id);
3787: if ((l_user_profile_value1 = 'N') OR (l_user_profile_value1 is null)) then
3788:
3789: BEGIN
3790:
3794: fnd_profile_option_values v
3795: WHERE p.profile_option_name = 'PA_SUPER_PROJECT'
3796: AND v.profile_option_id = p.profile_option_id
3797: AND v.level_id = 10004
3798: AND v.level_value = fnd_global.user_id;
3799:
3800: EXCEPTION
3801:
3802: WHEN no_data_found THEN
3806: l_user_profile_value1 := null;
3807:
3808: END;
3809:
3810: l_set_profile_success1 := fnd_profile.save('PA_SUPER_PROJECT', 'Y', 'USER', fnd_global.user_id);
3811: end if;
3812:
3813: l_user_profile_value2 := fnd_profile.value_specific('PA_SUPER_PROJECT_VIEW', fnd_global.user_id, fnd_global.resp_id, fnd_global.resp_appl_id);
3814: if ((l_user_profile_value2 = 'N') OR (l_user_profile_value2 is null)) then
3809:
3810: l_set_profile_success1 := fnd_profile.save('PA_SUPER_PROJECT', 'Y', 'USER', fnd_global.user_id);
3811: end if;
3812:
3813: l_user_profile_value2 := fnd_profile.value_specific('PA_SUPER_PROJECT_VIEW', fnd_global.user_id, fnd_global.resp_id, fnd_global.resp_appl_id);
3814: if ((l_user_profile_value2 = 'N') OR (l_user_profile_value2 is null)) then
3815:
3816: BEGIN
3817:
3821: fnd_profile_option_values v
3822: WHERE p.profile_option_name = 'PA_SUPER_PROJECT_VIEW'
3823: AND v.profile_option_id = p.profile_option_id
3824: AND v.level_id = 10004
3825: AND v.level_value = fnd_global.user_id;
3826:
3827: EXCEPTION
3828:
3829: WHEN no_data_found THEN
3833: l_user_profile_value2 := null;
3834:
3835: END;
3836:
3837: l_set_profile_success2 := fnd_profile.save('PA_SUPER_PROJECT_VIEW', 'Y', 'USER', fnd_global.user_id);
3838:
3839: end if;
3840:
3841:
3851: , ERRBUF => x_err_stage);
3852:
3853: -- Bug 2386041
3854: if (l_set_profile_success1 = TRUE) then
3855: l_set_profile_success1 := fnd_profile.save('PA_SUPER_PROJECT', l_user_profile_value1, 'USER', fnd_global.user_id);
3856: end if;
3857: if (l_set_profile_success2 = TRUE) then
3858: l_set_profile_success2 := fnd_profile.save('PA_SUPER_PROJECT_VIEW', l_user_profile_value2, 'USER', fnd_global.user_id);
3859: end if;
3854: if (l_set_profile_success1 = TRUE) then
3855: l_set_profile_success1 := fnd_profile.save('PA_SUPER_PROJECT', l_user_profile_value1, 'USER', fnd_global.user_id);
3856: end if;
3857: if (l_set_profile_success2 = TRUE) then
3858: l_set_profile_success2 := fnd_profile.save('PA_SUPER_PROJECT_VIEW', l_user_profile_value2, 'USER', fnd_global.user_id);
3859: end if;
3860: -- Bug 2386041
3861:
3862: -- Fix for bug : 5511910. We retrun stasus values as 'P' if summarization does not happen.
4278: APP_EXCEPTION.RAISE_EXCEPTION;
4279:
4280: END IF;
4281:
4282: l_resp_id := FND_GLOBAL.Resp_id;
4283: l_user_id := FND_GLOBAL.User_id;
4284: l_login_id := FND_GLOBAL.Login_id;
4285: l_module_name := 'GMS_PM_ADD_BUDGET_LINE';
4286:
4279:
4280: END IF;
4281:
4282: l_resp_id := FND_GLOBAL.Resp_id;
4283: l_user_id := FND_GLOBAL.User_id;
4284: l_login_id := FND_GLOBAL.Login_id;
4285: l_module_name := 'GMS_PM_ADD_BUDGET_LINE';
4286:
4287: -- As part of enforcing award security, which would determine
4280: END IF;
4281:
4282: l_resp_id := FND_GLOBAL.Resp_id;
4283: l_user_id := FND_GLOBAL.User_id;
4284: l_login_id := FND_GLOBAL.Login_id;
4285: l_module_name := 'GMS_PM_ADD_BUDGET_LINE';
4286:
4287: -- As part of enforcing award security, which would determine
4288: -- whether the user has the necessary privileges to update the award
5259: APP_EXCEPTION.RAISE_EXCEPTION;
5260: END IF;
5261: --------------------------------------------------------------------------------
5262:
5263: l_resp_id := FND_GLOBAL.Resp_id;
5264: l_user_id := FND_GLOBAL.User_id;
5265: l_module_name := 'GMS_PM_DELETE_DRAFT_BUDGET';
5266:
5267: -- As part of enforcing award security, which would determine
5260: END IF;
5261: --------------------------------------------------------------------------------
5262:
5263: l_resp_id := FND_GLOBAL.Resp_id;
5264: l_user_id := FND_GLOBAL.User_id;
5265: l_module_name := 'GMS_PM_DELETE_DRAFT_BUDGET';
5266:
5267: -- As part of enforcing award security, which would determine
5268: -- whether the user has the necessary privileges to update the award
5717: APP_EXCEPTION.RAISE_EXCEPTION;
5718: END IF;
5719: --------------------------------------------------------------------------------
5720:
5721: l_resp_id := FND_GLOBAL.Resp_id;
5722: l_user_id := FND_GLOBAL.User_id;
5723: l_login_id := FND_GLOBAL.Login_id;
5724: l_module_name := 'GMS_PM_DELETE_BUDGET_LINE';
5725:
5718: END IF;
5719: --------------------------------------------------------------------------------
5720:
5721: l_resp_id := FND_GLOBAL.Resp_id;
5722: l_user_id := FND_GLOBAL.User_id;
5723: l_login_id := FND_GLOBAL.Login_id;
5724: l_module_name := 'GMS_PM_DELETE_BUDGET_LINE';
5725:
5726: -- As part of enforcing award security, which would determine
5719: --------------------------------------------------------------------------------
5720:
5721: l_resp_id := FND_GLOBAL.Resp_id;
5722: l_user_id := FND_GLOBAL.User_id;
5723: l_login_id := FND_GLOBAL.Login_id;
5724: l_module_name := 'GMS_PM_DELETE_BUDGET_LINE';
5725:
5726: -- As part of enforcing award security, which would determine
5727: -- whether the user has the necessary privileges to update the award
6040:
6041: delete from gms_budget_lines
6042: where rowid = l_budget_line_rowid;
6043:
6044: l_last_updated_by := fnd_global.user_id;
6045: l_last_update_login := fnd_global.login_id;
6046:
6047: select budget_version_id
6048: into l_budget_version_id
6041: delete from gms_budget_lines
6042: where rowid = l_budget_line_rowid;
6043:
6044: l_last_updated_by := fnd_global.user_id;
6045: l_last_update_login := fnd_global.login_id;
6046:
6047: select budget_version_id
6048: into l_budget_version_id
6049: from gms_resource_assignments
6494: END IF;
6495: --------------------------------------------------------------------------------
6496: -- dbms_output.put_line('GMS_BUDGET_PUB.UPDATE_BUDGET - after award info validation');
6497:
6498: l_resp_id := FND_GLOBAL.Resp_id;
6499: l_user_id := FND_GLOBAL.User_id;
6500: l_login_id := FND_GLOBAL.Login_id;
6501:
6502: l_module_name := 'GMS_PM_UPDATE_BUDGET';
6495: --------------------------------------------------------------------------------
6496: -- dbms_output.put_line('GMS_BUDGET_PUB.UPDATE_BUDGET - after award info validation');
6497:
6498: l_resp_id := FND_GLOBAL.Resp_id;
6499: l_user_id := FND_GLOBAL.User_id;
6500: l_login_id := FND_GLOBAL.Login_id;
6501:
6502: l_module_name := 'GMS_PM_UPDATE_BUDGET';
6503:
6496: -- dbms_output.put_line('GMS_BUDGET_PUB.UPDATE_BUDGET - after award info validation');
6497:
6498: l_resp_id := FND_GLOBAL.Resp_id;
6499: l_user_id := FND_GLOBAL.User_id;
6500: l_login_id := FND_GLOBAL.Login_id;
6501:
6502: l_module_name := 'GMS_PM_UPDATE_BUDGET';
6503:
6504: -- As part of enforcing award security, which would determine
7181: --------------------------------------------------------------------------------
7182:
7183: -- dbms_output.put_line('GMS_BUDGET_PUB.UPDATE_BUDGET_LINE - after award info validation');
7184:
7185: l_resp_id := FND_GLOBAL.Resp_id;
7186: l_user_id := FND_GLOBAL.User_id;
7187: l_login_id := FND_GLOBAL.login_id;
7188:
7189: l_module_name := 'GMS_PM_UPDATE_BUDGET_LINE';
7182:
7183: -- dbms_output.put_line('GMS_BUDGET_PUB.UPDATE_BUDGET_LINE - after award info validation');
7184:
7185: l_resp_id := FND_GLOBAL.Resp_id;
7186: l_user_id := FND_GLOBAL.User_id;
7187: l_login_id := FND_GLOBAL.login_id;
7188:
7189: l_module_name := 'GMS_PM_UPDATE_BUDGET_LINE';
7190:
7183: -- dbms_output.put_line('GMS_BUDGET_PUB.UPDATE_BUDGET_LINE - after award info validation');
7184:
7185: l_resp_id := FND_GLOBAL.Resp_id;
7186: l_user_id := FND_GLOBAL.User_id;
7187: l_login_id := FND_GLOBAL.login_id;
7188:
7189: l_module_name := 'GMS_PM_UPDATE_BUDGET_LINE';
7190:
7191: -- As part of enforcing award security, which would determine