The following lines contain the word 'select', 'insert', 'update' or 'delete':
Select 1
Into l_dummy
From pa_expenditure_types_expend_v
Where expenditure_type = p_expenditure_type
And system_linkage_function <> p_system_linkage_function;
G_Projects_Tab.Delete;
Select
Segment1
Into
X_Project_Number
From
Pa_Projects_All
Where
Project_Id = P_Project_Id;
G_Tasks_Tab.Delete;
Select
Task_Number
Into
X_Task_Number
From
Pa_Tasks
Where
Task_Id = P_Task_Id;
G_EmpInfo_Tab.Delete;
Select
Decode(P.Current_Employee_Flag,'Y',P.Employee_Number,P.Npw_Number),
O.Name
Into
X_Inc_By_Per_Number,
X_Business_Group_Name
From
--FP M To reduce dependency on HR, changing the per_people_x to per_all_people_f
--and added the date check
--Per_People_X P,
Per_All_People_F P,
Hr_Organization_Units O
Where
P.Person_Id = P_Inc_By_Per_Id
and O.Organization_Id = P.Business_Group_Id
and trunc(P_exp_date) between trunc(p.effective_start_date) and trunc(p.effective_end_date);
G_OrgName_Tab.Delete;
Select
O.Name
Into
X_Inc_By_Org_Name
From
Per_Assignments_F A,
Hr_All_Organization_Units O
Where
O.Organization_id = A.Organization_Id
And A.person_id = P_Inc_By_Per_Id
And A.Primary_Flag = 'Y'
And A.Organization_Id is not null
And A.Job_Id is not null
And A.Assignment_Type in ('E','C')
And P_Exp_Item_Date between A.Effective_Start_Date
and nvl(A.Effective_End_Date, P_Exp_Item_Date) ;
-- Insert the employee info into the pl/sql table.
G_OrgName_Tab(l_Index).PersonId_Date := to_char(P_Inc_By_Per_Id) || to_char(P_Exp_Item_Date);
G_OrgId_Tab.Delete;
Select
Organization_Id,
Effective_Start_Date,
Effective_End_Date
Into
X_Inc_By_Org_Id,
l_Start_Date,
l_End_Date
From
Per_Assignments_F
Where
Person_id = P_Inc_By_Per_Id
And Primary_Flag = 'Y'
And Organization_Id is not null
And Job_Id is not null
And Assignment_Type in ('E','C')
And P_Exp_Item_Date between Effective_Start_Date
and nvl(Effective_End_Date, P_Exp_Item_Date) ;
SELECT proj.segment1||'/'||TASK.task_number
INTO l_proj_task_info
FROM pa_expenditure_items ei
,pa_projects_all proj
,pa_tasks task
WHERE ei.expenditure_item_id = P_Transferred_from_exp_id
AND ei.task_id = task.task_id
AND proj.project_id = task.project_id;
SELECT proj.segment1||'/'||TASK.task_number
INTO l_proj_task_info
FROM pa_expenditure_items ei
,pa_projects_all proj
,pa_tasks task
WHERE ei.transferred_from_exp_item_id = P_exp_item_id
AND ei.task_id = task.task_id
AND proj.project_id = task.project_id;
SELECT ptype.project_type_class_code
INTO l_project_type_class_code
FROM pa_project_types_all ptype,
pa_projects_all proj
WHERE ptype.project_type = proj.project_type
AND NVL(ptype.org_id, -99) = NVL(proj.org_id, -99)
AND proj.project_id = p_project_id;
SELECT decode(ptype.project_type_class_code,'CAPITAL','P','U')
INTO l_project_type
FROM pa_project_types_all ptype,
pa_projects_all proj
WHERE proj.project_type = ptype.project_type
/* AND NVL(ptype.org_id, -99) = NVL(proj.org_id, -99) commented and removed nvl to make use of the index also in R12, org is populated --Bug 5912873*/
AND ptype.org_id = proj.org_id
AND proj.project_id = p_project_id ;
Select
MAX(P.Employee_Number)
Into
l_emp_Number
From
Per_All_People_F P,
Hr_Organization_Units O
Where
P.Person_Id = P_Person_Id
and O.Organization_Id = P.Business_Group_Id
and trunc(P_ei_date) > = trunc(p.effective_start_date)
AND P.Employee_Number IS NOT NULL;
SELECT Name
FROM HR_ALL_ORGANIZATION_UNITS_TL
WHERE Organization_ID = P_Org_ID
AND Language = USERENV('LANG');