The following lines contain the word 'select', 'insert', 'update' or 'delete':
select oke_k_fund_allocations_s.nextval
into l_funding_allocation_id
from dual;
select currency_code
from oke_k_funding_sources
where funding_source_id = p_funding_source_id;
select p.projfunc_currency_code
from pa_projects_all p
where project_id = p_project_id;
select project_id,
task_id,
start_date_active
from oke_k_fund_allocations
where fund_allocation_id = p_fund_allocation_id;
select 'x'
from pa_tasks
where task_id = p_task_id
and top_task_id = p_task_id
and project_id = p_project_id;
select 'x'
from okc_k_lines_b
where id = p_k_line_id
and dnz_chr_id = p_object_id;
select rowid, nvl(agreement_version, 0)
from oke_k_fund_allocations
where fund_allocation_id = p_fund_allocation_id;
select 'x'
from oke_k_funding_sources
where object_id = p_object_id
and funding_source_id = p_funding_source_id;
select 'x'
from oke_k_funding_sources
where funding_source_id = p_funding_source_id
FOR UPDATE OF funding_source_id NOWAIT;
select 'x'
from oke_k_lines
where k_line_id = p_k_line_id;
select pa_flag
from oke_k_fund_allocations
where fund_allocation_id = p_fund_allocation_id;
select project_id, task_id
from oke_k_lines
where k_line_id = p_k_line_id;
select 'x'
from dual
where p_project_id in
(select to_number(sub_project_id)
from pa_fin_structures_links_v
start with parent_project_id = x_project_id
connect by parent_project_id = prior sub_project_id
);
select 'x'
from dual
where p_project_id in
( select to_number(sub_project_id)
from pa_fin_structures_links_v
START WITH (parent_project_id, parent_task_id)
IN (SELECT x_project_id, task_id FROM pa_tasks
WHERE project_id = x_project_id
AND top_task_id = nvl(x_task_id, top_task_id))
connect by parent_project_id = prior sub_project_id);
select project_id,
parent_line_id,
task_id
from oke_k_lines
where k_line_id = x_line_id;
select 'x'
from pa_project_customers p,
pa_projects_all a,
oke_k_funding_sources f,
pa_project_types_all l,
hz_cust_accounts h
where p.project_id = p_project_id
and nvl(a.template_flag, '-99') <> 'Y'
and f.funding_source_id = p_funding_source_id
and p.customer_id = h.cust_account_id
and h.party_id = f.k_party_id
and a.project_id = p.project_id
and a.project_type = l.project_type
and l.project_type_class_code = 'CONTRACT';
select project_id,
task_id
from oke_k_lines_v
where header_id = p_object_id
and k_line_id = p_k_line_id;
select project_id
from oke_k_headers
where k_header_id = p_object_id;
select 'x'
from dual
where p_project_id in
(select to_number(sub_project_id)
from pa_fin_structures_links_v
start with parent_project_id = x_project_id
connect by parent_project_id = prior sub_project_id
union all
select x_project_id
from dual
);
select 'x'
from dual
where p_project_id in
( select to_number(sub_project_id)
from pa_fin_structures_links_v
start with parent_project_id = x_project_id
and parent_task_id = x_task_id
connect by parent_project_id = prior sub_project_id
union all
select x_project_id
from dual
);
select buy_or_sell
from oke_k_headers_v
where k_header_id = p_object_id;
select project_id,
parent_line_id,
task_id
from oke_k_lines
where k_line_id = x_line_id;
select 'x'
from pa_tasks
where task_id = p_task_id
and task_id = top_task_id;
select 'x'
from fnd_lookup_values
where lookup_type = 'FUND_TYPE'
and language = userenv('LANG')
and enabled_flag = 'Y'
and lookup_code = upper(p_fund_type);
select 'x'
from fnd_lookup_values
where lookup_type = 'FUNDING_STATUS'
and enabled_flag = 'Y'
and language = userenv('LANG')
and lookup_code = upper(p_funding_status);
select 'x'
from pa_lookups
where lookup_type = 'FUNDING CATEGORY TYPE'
and lookup_code = upper(p_funding_category);
select 'x'
from gl_daily_conversion_types
where UPPER(conversion_type) = UPPER(p_conversion_type);
select *
from oke_k_fund_allocations
where fund_allocation_id = p_allocation_in_rec.fund_allocation_id
FOR UPDATE OF fund_allocation_id NOWAIT;
select major_version + 1
from okc_k_vers_numbers
where chr_id = p_allocation_in_rec.object_id;
p_msg_name => 'OKE_API_NO_UPDATE' ,
p_token1 => 'VALUE' ,
p_token1_value => 'task_id'
);
p_msg_name => 'OKE_API_NO_UPDATE' ,
p_token1 => 'VALUE' ,
p_token1_value => 'project_id'
);
p_msg_name => 'OKE_API_NO_UPDATE' ,
p_token1 => 'VALUE' ,
p_token1_value => 'k_line_id'
);
p_msg_name => 'OKE_API_NO_UPDATE' ,
p_token1 => 'VALUE' ,
p_token1_value => 'start_date_active'
);
p_msg_name => 'OKE_API_NO_UPDATE' ,
p_token1 => 'VALUE' ,
p_token1_value => 'funding_category'
);
OKE_FUNDINGALLOCATION_PVT.insert_row(X_Rowid => l_rowid ,
X_Fund_Allocation_Id => l_fund_allocation_id ,
X_Funding_Source_Id => l_allocation_in_rec.funding_source_id ,
X_Object_Id => l_allocation_in_rec.object_id ,
X_K_Line_Id => l_allocation_in_rec.k_line_id ,
X_Project_Id => l_allocation_in_rec.project_id ,
X_Task_Id => l_allocation_in_rec.task_id ,
X_Previous_Amount => 0 ,
X_Amount => l_allocation_in_rec.amount ,
X_Hard_Limit => l_allocation_in_rec.hard_limit ,
X_Fund_Type => upper(l_allocation_in_rec.fund_type) ,
X_Funding_Status => upper(l_allocation_in_rec.funding_status) ,
X_Fiscal_Year => l_allocation_in_rec.fiscal_year ,
X_Reference1 => l_allocation_in_rec.reference1 ,
X_Reference2 => l_allocation_in_rec.reference2 ,
X_Reference3 => l_allocation_in_rec.reference3 ,
X_PA_CONVERSION_TYPE => l_allocation_in_rec.PA_CONVERSION_TYPE ,
X_PA_CONVERSION_DATE => l_allocation_in_rec.PA_CONVERSION_DATE ,
X_PA_CONVERSION_RATE => l_allocation_in_rec.pa_conversion_rate ,
X_Insert_Update_Flag => 'Y' ,
X_Start_Date_Active => l_allocation_in_rec.start_date_active ,
X_End_Date_Active => l_allocation_in_rec.end_date_active ,
X_Last_Update_Date => sysdate ,
X_Last_Updated_By => L_USERID ,
X_Creation_Date => sysdate ,
X_Created_By => L_USERID ,
X_Last_Update_Login => L_LOGINID ,
--X_Attribute_Category => upper(l_allocation_in_rec.oke_attribute_category) ,
X_Attribute_Category => l_allocation_in_rec.oke_attribute_category ,
X_Attribute1 => l_allocation_in_rec.oke_attribute1 ,
X_Attribute2 => l_allocation_in_rec.oke_attribute2 ,
X_Attribute3 => l_allocation_in_rec.oke_attribute3 ,
X_Attribute4 => l_allocation_in_rec.oke_attribute4 ,
X_Attribute5 => l_allocation_in_rec.oke_attribute5 ,
X_Attribute6 => l_allocation_in_rec.oke_attribute6 ,
X_Attribute7 => l_allocation_in_rec.oke_attribute7 ,
X_Attribute8 => l_allocation_in_rec.oke_attribute8 ,
X_Attribute9 => l_allocation_in_rec.oke_attribute9 ,
X_Attribute10 => l_allocation_in_rec.oke_attribute10 ,
X_Attribute11 => l_allocation_in_rec.oke_attribute11 ,
X_Attribute12 => l_allocation_in_rec.oke_attribute12 ,
X_Attribute13 => l_allocation_in_rec.oke_attribute13 ,
X_Attribute14 => l_allocation_in_rec.oke_attribute14 ,
X_Attribute15 => l_allocation_in_rec.oke_attribute15 ,
X_Revenue_Hard_Limit => l_allocation_in_rec.revenue_hard_limit ,
X_Funding_Category => upper(l_allocation_in_rec.funding_category) ,
--X_PA_Attribute_Category => upper(l_allocation_in_rec.pa_attribute_category) ,
X_PA_Attribute_Category => l_allocation_in_rec.pa_attribute_category ,
X_PA_Attribute1 => l_allocation_in_rec.pa_attribute1 ,
X_PA_Attribute2 => l_allocation_in_rec.pa_attribute2 ,
X_PA_Attribute3 => l_allocation_in_rec.pa_attribute3 ,
X_PA_Attribute4 => l_allocation_in_rec.pa_attribute4 ,
X_PA_Attribute5 => l_allocation_in_rec.pa_attribute5 ,
X_PA_Attribute6 => l_allocation_in_rec.pa_attribute6 ,
X_PA_Attribute7 => l_allocation_in_rec.pa_attribute7 ,
X_PA_Attribute8 => l_allocation_in_rec.pa_attribute8 ,
X_PA_Attribute9 => l_allocation_in_rec.pa_attribute9 ,
X_PA_Attribute10 => l_allocation_in_rec.pa_attribute10
);
PROCEDURE update_allocation(p_api_version IN NUMBER ,
p_init_msg_list IN VARCHAR2 :=OKE_API.G_FALSE ,
p_commit IN VARCHAR2 :=OKE_API.G_FALSE ,
p_msg_count OUT NOCOPY NUMBER ,
p_msg_data OUT NOCOPY VARCHAR2 ,
p_allocation_in_rec IN ALLOCATION_REC_IN_TYPE ,
p_allocation_out_rec OUT NOCOPY ALLOCATION_REC_OUT_TYPE ,
p_validation_flag IN VARCHAR2 := OKE_API.G_TRUE ,
p_return_status OUT NOCOPY VARCHAR2
) is
l_api_name CONSTANT VARCHAR2(30) := 'update_allocation';
OKE_FUNDINGALLOCATION_PVT.update_row(X_Fund_Allocation_Id => l_allocation_in_rec.fund_allocation_id ,
X_Amount => l_allocation_in_rec.amount ,
X_Previous_Amount => l_previous_amount ,
X_Object_id => l_allocation_in_rec.object_id ,
X_k_line_id => l_allocation_in_rec.k_line_id ,
X_project_id => l_allocation_in_rec.project_id ,
x_task_id => l_allocation_in_rec.task_id ,
X_Hard_Limit => l_allocation_in_rec.hard_limit ,
X_Fund_Type => upper(l_allocation_in_rec.fund_type) ,
X_Funding_Status => upper(l_allocation_in_rec.funding_status) ,
X_Fiscal_Year => l_allocation_in_rec.fiscal_year ,
X_Reference1 => l_allocation_in_rec.reference1 ,
X_Reference2 => l_allocation_in_rec.reference2 ,
X_Reference3 => l_allocation_in_rec.reference3 ,
X_Pa_Conversion_Type => l_allocation_in_rec.pa_conversion_type ,
X_Pa_Conversion_Date => l_allocation_in_rec.pa_conversion_date ,
X_Pa_Conversion_Rate => l_allocation_in_rec.pa_conversion_rate ,
X_Insert_Update_Flag => 'Y' ,
X_Start_Date_Active => l_allocation_in_rec.start_date_active ,
X_End_Date_Active => l_allocation_in_rec.end_date_active ,
X_Last_Update_Date => sysdate ,
X_Last_Updated_By => L_USERID ,
X_Last_Update_Login => L_LOGINID ,
--X_Attribute_Category => upper(l_allocation_in_rec.oke_attribute_category) ,
X_Attribute_Category => l_allocation_in_rec.oke_attribute_category ,
X_Attribute1 => l_allocation_in_rec.oke_attribute1 ,
X_Attribute2 => l_allocation_in_rec.oke_attribute2 ,
X_Attribute3 => l_allocation_in_rec.oke_attribute3 ,
X_Attribute4 => l_allocation_in_rec.oke_attribute4 ,
X_Attribute5 => l_allocation_in_rec.oke_attribute5 ,
X_Attribute6 => l_allocation_in_rec.oke_attribute6 ,
X_Attribute7 => l_allocation_in_rec.oke_attribute7 ,
X_Attribute8 => l_allocation_in_rec.oke_attribute8 ,
X_Attribute9 => l_allocation_in_rec.oke_attribute9 ,
X_Attribute10 => l_allocation_in_rec.oke_attribute10 ,
X_Attribute11 => l_allocation_in_rec.oke_attribute11 ,
X_Attribute12 => l_allocation_in_rec.oke_attribute12 ,
X_Attribute13 => l_allocation_in_rec.oke_attribute13 ,
X_Attribute14 => l_allocation_in_rec.oke_attribute14 ,
X_Attribute15 => l_allocation_in_rec.oke_attribute15 ,
X_Revenue_Hard_Limit => l_allocation_in_rec.revenue_hard_limit ,
X_Funding_Category => upper(l_allocation_in_rec.funding_category) ,
--X_PA_Attribute_Category => upper(l_allocation_in_rec.pa_attribute_category) ,
X_PA_Attribute_Category => l_allocation_in_rec.pa_attribute_category ,
X_PA_Attribute1 => l_allocation_in_rec.pa_attribute1 ,
X_PA_Attribute2 => l_allocation_in_rec.pa_attribute2 ,
X_PA_Attribute3 => l_allocation_in_rec.pa_attribute3 ,
X_PA_Attribute4 => l_allocation_in_rec.pa_attribute4 ,
X_PA_Attribute5 => l_allocation_in_rec.pa_attribute5 ,
X_PA_Attribute6 => l_allocation_in_rec.pa_attribute6 ,
X_PA_Attribute7 => l_allocation_in_rec.pa_attribute7 ,
X_PA_Attribute8 => l_allocation_in_rec.pa_attribute8 ,
X_PA_Attribute9 => l_allocation_in_rec.pa_attribute9 ,
X_PA_Attribute10 => l_allocation_in_rec.pa_attribute10
);
END update_allocation;
PROCEDURE delete_allocation(p_api_version IN NUMBER ,
p_commit IN VARCHAR2 := OKE_API.G_FALSE ,
p_init_msg_list IN VARCHAR2 := OKE_API.G_FALSE ,
p_msg_count OUT NOCOPY NUMBER ,
p_msg_data OUT NOCOPY VARCHAR2 ,
p_fund_allocation_id IN NUMBER ,
-- p_agreement_flag IN VARCHAR2 := OKE_API.G_FALSE ,
p_return_status OUT NOCOPY VARCHAR2
) is
l_api_name CONSTANT VARCHAR2(30) := 'delete_allocation';
select org_id
from pa_projects_all p,
oke_k_fund_allocations f
where f.project_id = p.project_id
and fund_allocation_id = p_fund_allocation_id;
select major_version + 1,
nvl(created_in_version, -99)
from okc_k_vers_numbers b,
oke_k_fund_allocations a
where b.chr_id = a.object_id
and a.fund_allocation_id = p_fund_allocation_id;
select project_funding_id, org_id, pm_funding_reference
from pa_project_fundings p,
pa_agreements_all a
where p.pm_product_code = G_PRODUCT_CODE
and a.agreement_id = p.agreement_id
and substr(pm_funding_reference, 1, x_length + 1) = p_fund_allocation_id || '.';
p_msg_name => 'OKE_VER_NO_ALLOCATION_DELETE'
);
OKE_FUNDINGALLOCATION_PVT.delete_row(x_rowid => l_rowid);
PA_AGREEMENT_PUB.delete_funding(p_api_version_number => p_api_version ,
p_commit => OKE_API.G_FALSE ,
p_init_msg_list => OKE_API.G_FALSE ,
p_msg_count => p_msg_count ,
p_msg_data => p_msg_data ,
p_return_status => p_return_status ,
p_pm_product_code => G_PRODUCT_CODE ,
p_pm_funding_reference => l_project_funding.pm_funding_reference ,
p_funding_id => l_project_funding.project_funding_id ,
p_check_y_n => 'Y'
);
END delete_allocation;