The following lines contain the word 'select', 'insert', 'update' or 'delete':
select start_date_active ,
NVL(end_date_active, SYSDATE) ,
entry_level_code,categorization_code,
time_phased_type_code,
burdened_cost_flag
into l_start_date_active,
l_end_date_active,
l_entry_level_code,
l_categorization_code,
l_time_phased_type_code,
l_burdened_cost_flag
from pa_budget_entry_methods
where BUDGET_ENTRY_METHOD = p_project_bem ;
select count(distinct budget_entry_method_code) ,
count(distinct resource_list_id ), count(distinct award_id)
into l_bem_count, l_res_list_count, l_award_count
from GMS_BUDGET_VERSIONS
where budget_status_code = 'B'
and current_flag = 'Y'
and project_id = x_project_id ;
select distinct rl.name
into l_res_list_name
from GMS_BUDGET_VERSIONS gb , pa_resource_lists rl
where gb.resource_list_id = rl.resource_list_id
and budget_status_code = 'B'
and current_flag = 'Y'
and project_id = x_project_id ;
select distinct time_phased_type_code -- Added distinct for bug : 5750106
into l_time_phased_type_code
from GMS_BUDGET_VERSIONS bv, pa_budget_entry_methods bem
where bv.budget_entry_method_code = bem.budget_entry_method_code
and bv.project_id = x_project_id ;
select distinct resource_list_id
into G_pa_res_list_id
from GMS_BUDGET_VERSIONS
where budget_status_code = 'B'
and current_flag = 'Y'
and project_id = x_project_id ;
select resource_list_id
into G_pa_res_list_id_none
from pa_resource_lists prl , pa_implementations pai
where prl.business_group_id = pai.business_group_id
and prl.uncategorized_flag = 'Y'
and NVL(prl.migration_code ,'M') = 'M' ;
select distinct gbl.start_date
, gbl.end_date
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
where gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.project_id = p_project_id
and gra.resource_list_member_id = p_resource_list_member_id;
select distinct gra.resource_list_member_id , gbl.start_date
, gbl.end_date
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
where gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.project_id = p_project_id
and gbv.current_flag = 'Y'
order by gra.resource_list_member_id ;-- , award_id ;
select count(award_id)
into l_award_count
from GMS_BUDGET_VERSIONS
where budget_status_code = 'B'
and current_flag = 'Y'
and project_id = x_project_id;
select distinct gbv.resource_list_id -- Added distinct for Bug:2254944
, gbv.budget_entry_method_code , bem.time_phased_type_code -- Added time_phase_type_code for bug: 5750106
into x_resource_list_id
, x_budget_entry_method_code,l_time_phased_type_code
from gms_budget_versions gbv, pa_budget_entry_methods bem
where gbv.project_id = x_project_id
and gbv.budget_entry_method_code = bem.budget_entry_method_code -- Added for bug 5750106
and gbv.current_flag = 'Y';
Select 1
into draft_budget_check
from pa_budget_versions
where project_id = x_project_id
and budget_type_code = 'AC'
and budget_status_code in ('W', 'S');
select gbl.period_name
, decode(p_res_grp,
'Y', nvl(prl.parent_member_id, gra.resource_list_member_id),
gra.resource_list_member_id) resource_list_member_id
, gra.task_id
, sum(gbl.raw_cost) raw_cost
, sum(gbl.burdened_cost) burdened_cost
, sum(gbl.quantity) quantity
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
, pa_resource_list_members prl --> Bug 2935048
where gbv.project_id = x_project_id
and gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.current_flag = 'Y'
and gbv.resource_list_id = prl.resource_list_id
and gra.resource_list_member_id = prl.resource_list_member_id
and gra.task_id = p_task_id
group by gbl.period_name,
decode(p_res_grp,
'Y', nvl(prl.parent_member_id, gra.resource_list_member_id),
gra.resource_list_member_id),
gra.task_id;
select gbl.start_date
, gbl.end_date
, decode(p_res_grp,
'Y', nvl(prl.parent_member_id, gra.resource_list_member_id),
gra.resource_list_member_id) resource_list_member_id
, gra.task_id
, sum(gbl.raw_cost) raw_cost
, sum(gbl.burdened_cost) burdened_cost
, sum(gbl.quantity) quantity
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
, pa_resource_list_members prl --> Bug 2935048
where gbv.project_id = x_project_id
and gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.current_flag = 'Y'
and gbv.resource_list_id = prl.resource_list_id
and gra.resource_list_member_id = prl.resource_list_member_id
and gra.task_id = p_task_id
group by gbl.start_date, gbl.end_date,
decode(p_res_grp,
'Y', nvl(prl.parent_member_id, gra.resource_list_member_id),
gra.resource_list_member_id),
gra.task_id;
select decode(p_res_grp,
'Y', nvl(prl.parent_member_id, gra.resource_list_member_id),
gra.resource_list_member_id) resource_list_member_id
, gra.task_id
, sum(gbl.raw_cost) raw_cost
, sum(gbl.burdened_cost) burdened_cost
, sum(gbl.quantity) quantity
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
, pa_resource_list_members prl --> Bug 2935048
where gbv.project_id = x_project_id
and gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.current_flag = 'Y'
and gbv.resource_list_id = prl.resource_list_id
and gra.resource_list_member_id = prl.resource_list_member_id
and gra.task_id = p_task_id
group by decode(p_res_grp,
'Y', nvl(prl.parent_member_id, gra.resource_list_member_id),
gra.resource_list_member_id),
gra.task_id;
select distinct gra.task_id
from gms_resource_assignments gra,
gms_budget_versions gbv
where gra.project_id = x_project_id
and gra.project_id = gbv.project_id
and gbv.current_flag = 'Y'
and gbv.budget_status_code = 'B';
select 'Y'
into v_mixed_level_budget
from dual
where exists (select '1'
from pa_resource_list_members prl,
gms_resource_assignments gra,
gms_budget_versions gbv
where prl.resource_list_id = x_resource_list_id
and prl.resource_list_member_id = gra.resource_list_member_id
and gbv.budget_version_id = gra.budget_version_id
and gbv.current_flag = 'Y'
and prl.parent_member_id is null
and gra.project_id = x_project_id
and gra.task_id = x_task_id);
select prl.resource_list_member_id ,
gbv.project_id ,
sum(gbl.raw_cost) raw_cost
, sum(gbl.burdened_cost) burdened_cost
, sum(gbl.quantity) quantity
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
, pa_resource_list_members prl
where gbv.project_id = x_project_id
and gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.current_flag = 'Y'
and G_pa_res_list_id_none = prl.resource_list_id
and gra.resource_list_member_id = prl.resource_list_member_id
group by prl.resource_list_member_id , gbv.project_id;
select
gra.resource_list_member_id ,
gbv.project_id
, sum(gbl.raw_cost) raw_cost
, sum(gbl.burdened_cost) burdened_cost
, sum(gbl.quantity) quantity
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
, pa_resource_list_members prl
where gbv.project_id = x_project_id
and gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.current_flag = 'Y'
and gbv.resource_list_id = prl.resource_list_id
and gra.resource_list_member_id = prl.resource_list_member_id
group by gra.resource_list_member_id, gbv.project_id ;
select distinct gra.resource_list_member_id , gbl.start_date
, gbl.end_date
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
where gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.project_id = p_project_id
and gbv.current_flag = 'Y'
order by gra.resource_list_member_id ;
select distinct gbl.start_date
, gbl.end_date
from gms_budget_versions gbv
, gms_resource_assignments gra
, gms_budget_lines gbl
where gbv.budget_version_id = gra.budget_version_id
and gra.resource_assignment_id = gbl.resource_assignment_id
and gbv.project_id = p_project_id
and gra.resource_list_member_id = p_resource_list_member_id;
SELECT start_date,
completion_date
INTO x_project_start_date,
x_project_end_date
FROM pa_projects_all
WHERE project_id = x_project_id;
SELECT profile_option_value
INTO l_user_profile_value1
FROM fnd_profile_options p,
fnd_profile_option_values v
WHERE p.profile_option_name = 'PA_SUPER_PROJECT'
AND v.profile_option_id = p.profile_option_id
AND v.level_id = 10004
AND v.level_value = fnd_global.user_id;
SELECT profile_option_value
INTO l_user_profile_value2
FROM fnd_profile_options p,
fnd_profile_option_values v
WHERE p.profile_option_name = 'PA_SUPER_PROJECT_VIEW'
AND v.profile_option_id = p.profile_option_id
AND v.level_id = 10004
AND v.level_value = fnd_global.user_id;
SELECT start_date,
completion_date
INTO x_project_start_date,
x_project_end_date
FROM pa_projects_all
WHERE project_id = x_project_id;
gms_error_pkg.gms_debug('GMS_SUMMARIZE_BUDGETS.SUMMARIZE_BASELINED_VERSIONS - Calling pa_budget_pub.delete_draft_budget','C');
pa_budget_pub.delete_draft_budget(p_api_version_number => 1.0
,p_init_msg_list => 'T'
,p_msg_count => x_msg_count
,p_msg_data => x_err_stage
,p_return_status => x_return_status
,p_pm_product_code => 'GMS' -- bug 3175909
,p_pa_project_id => x_project_id
,p_budget_type_code => 'AC');
gms_error_pkg.gms_debug('GMS_SUMMARIZE_BUDGETS.SUMMARIZE_BASELINED_VERSIONS - after delete draft; **************************','C');
gms_error_pkg.gms_debug('GMS_SUMMARIZE_BUDGETS.SUMMARIZE_BASELINED_VERSIONS - after delete draft; x_return_status = '||x_return_status,'C');
gms_error_pkg.gms_debug('GMS_SUMMARIZE_BUDGETS.SUMMARIZE_BASELINED_VERSIONS - after delete draft; x_err_stage = '||x_err_stage,'C');
gms_error_pkg.gms_debug('GMS_SUMMARIZE_BUDGETS.SUMMARIZE_BASELINED_VERSIONS - after delete draft; x_msg_count = '||x_msg_count,'C');
gms_error_pkg.gms_debug('GMS_SUMMARIZE_BUDGETS.SUMMARIZE_BASELINED_VERSIONS - after delete draft; **************************','C');
SELECT nvl(start_date,x_project_start_date),
nvl(completion_date,x_project_end_date)
INTO x_task_start_date,
x_task_end_date /* Changed for bug 3372853 */
FROM pa_tasks
WHERE task_id = v_task_id;
SELECT start_date,
completion_date
INTO x_project_start_date,
x_project_end_date
FROM pa_projects_all
WHERE project_id = x_project_id;
SELECT distinct entry_level_code -- Added DISTINCT for Bug:2907692
INTO x_entry_level_code
FROM pa_budget_entry_methods pbem,
gms_budget_versions gbv
WHERE gbv.budget_entry_method_code = pbem.budget_entry_method_code
AND gbv.project_id = x_project_id
AND gbv.budget_status_code = 'B'
AND gbv.current_flag = 'Y';
SELECT nvl(start_date,x_project_start_date),
nvl(completion_date,x_project_end_date)
INTO x_task_start_date,
x_task_end_date /* Changed for bug 3372853 */
--INTO x_project_start_date,
-- x_project_end_date
FROM pa_tasks
WHERE task_id = rec_c3.task_id;
select budget_entry_method_code
into x_entry_method_code
from pa_budget_entry_methods
where budget_entry_method = G_project_bem ;
l_budget_lines_in.delete(j);