The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT project_status_code
FROM pa_projects_all
WHERE project_id = x_project_id;
SELECT project_system_status_code
FROM pa_project_statuses
WHERE project_status_code = x_project_status_code
and status_type = 'PROJECT';
SELECT project_system_status_code
FROM pa_project_statuses
WHERE project_status_code = x_project_status_code
and status_type = 'PROJECT';
SELECT project_system_status_code
FROM pa_project_statuses
WHERE project_status_code = x_project_status_code
and status_type = 'PROJECT';
IF (fnd_function.test('PA_PAXPREPR_UPDATE_ORG') = TRUE) THEN
l_org_func_security := 'Y';
, X_insert_update_mode => NULL
, X_calling_module => x_calling_module
, X_project_id => x_project_id
, X_task_id => NULL
, X_old_value => X_old_proj_status_code
, X_new_value => X_new_proj_status_code
, X_project_type => X_project_type
, X_project_start_date => X_project_start_date
, X_project_end_date => X_project_end_date
, X_public_sector_flag => X_public_sector_flag
, X_task_manager_person_id => NULL
, X_Service_type => NULL
, X_task_start_date => NULL
, X_task_end_date => NULL
, X_entered_by_user_id => FND_GLOBAL.USER_ID
, X_attribute_category => X_attribute_category
, X_attribute1 => X_attribute1
, X_attribute2 => X_attribute2
, X_attribute3 => X_attribute3
, X_attribute4 => X_attribute4
, X_attribute5 => X_attribute5
, X_attribute6 => X_attribute6
, X_attribute7 => X_attribute7
, X_attribute8 => X_attribute8
, X_attribute9 => X_attribute9
, X_attribute10 => X_attribute10
, X_pm_product_code => X_pm_product_code
, X_pm_project_reference => NULL
, X_pm_task_reference => NULL
-- , X_functional_security_flag => NULL /* bug#1968394 */
, X_functional_security_flag => l_org_func_security /* bug#1968394 */
, x_warnings_only_flag => l_warnings_only_flag --bug3134205
, X_err_code => l_err_code
, X_err_stage => x_err_stage
, X_err_stack => x_err_stack );
SELECT workflow_item_type,workflow_process
FROM pa_project_statuses
WHERE project_status_code = l_project_status_code;
SELECT status_type
INTO x_status_type
FROM pa_project_statuses
WHERE project_status_code=x_project_status_code;
SELECT 'Y'
FROM pa_project_statuses
WHERE project_status_code = x_project_status_code
AND trunc(sysdate) BETWEEN start_date_active and
nvl(end_date_active,trunc(sysdate))
AND starting_status_flag='Y';
SELECT def_start_proj_status_code
FROM pa_project_types
WHERE project_type = x_project_type;
check_delete_phase_ok( p_project_status_code => p_project_status_code,
x_err_code =>x_err_code,
x_err_stage =>x_err_stage,
x_err_stack =>x_err_stack,
x_allow_deletion_flag =>x_allow_deletion_flag);
/*Select 'PA_STATUS_CHECK_PRJSTRT','N'
Into x_err_stage,x_allow_deletion_flag
From dual
Where exists
(select '1'
from PA_PROJECT_TYPES_ALL T
where T.def_start_proj_status_code=p_project_status_code);*/
Select 'PA_STATUS_CHECK_PRJUSED','N'
Into x_err_stage,x_allow_deletion_flag
From dual
Where exists
(select '1'
from PA_PROJECTS_ALL P
where P.project_status_code=p_project_status_code);
Select 'PA_STATUS_CHECK_PRE_DEF','N'
Into x_err_stage,x_allow_deletion_flag
From dual
Where exists
(select '1'
from PA_PROJECT_STATUSES S
where S.project_status_code=p_project_status_code
and S.predefined_flag='Y');
Select 'PA_STATUS_CHECK_NEXT','N'
Into x_err_stage,x_allow_deletion_flag
From dual
Where exists
(select '1'
from PA_NEXT_ALLOW_STATUSES N
where N.next_allowable_status_code=p_project_status_code);
Select 'PA_STATUS_CHECK_WF_USED','N'
Into x_err_stage,x_allow_deletion_flag
From dual
Where exists
(select '1'
from PA_PROJECT_STATUSES S
where S.wf_success_status_code=p_project_status_code
OR S.wf_failure_status_code=p_project_status_code);
SELECT STATUS_CODE, NEXT_ALLOWABLE_STATUS_CODE
FROM pa_next_allow_statuses
WHERE STATUS_CODE=o_status_code
-- AND NEXT_ALLOWABLE_STATUS_CODE=n_status_code
;
Select next_allowable_status_flag
into v_next_allowable_status_flag
from pa_project_statuses
where project_status_code = o_status_code;
Select 'Y'
Into v_change_allowed
/*
From PA_PROJECT_STATUSES
Where PROJECT_SYSTEM_STATUS_CODE=c_rec.NEXT_ALLOWABLE_STATUS_CODE
and PROJECT_STATUS_CODE=n_status_code;
select 'x'
from PA_PROJECT_STATUSES
where PROJECT_SYSTEM_STATUS_CODE=c_rec.NEXT_ALLOWABLE_STATUS_CODE
and PROJECT_STATUS_CODE=n_status_code);
PROCEDURE Delete_from_Next_Status (p_current_status_code IN VARCHAR2) IS
BEGIN
Delete from PA_NEXT_ALLOW_STATUSES N
where N.status_code = p_current_status_code
;
END Delete_from_Next_Status;
PROCEDURE Insert_into_Next_Status(
p_current_status_code IN VARCHAR2
, p_next_status_code IN VARCHAR2) IS
cursor c_check1 IS
select status_code
from PA_NEXT_ALLOW_STATUSES
where STATUS_CODE = p_current_status_code
and NEXT_ALLOWABLE_STATUS_CODE = p_next_status_code;
Insert into PA_NEXT_ALLOW_STATUSES(
STATUS_CODE
, NEXT_ALLOWABLE_STATUS_CODE
, LAST_UPDATE_DATE
, LAST_UPDATED_BY
, CREATION_DATE
, CREATED_BY
, LAST_UPDATE_LOGIN
)
Values(
p_current_status_code
, p_next_status_code
, sysdate
, 1
, sysdate
, 1
, 1
);
END Insert_into_Next_Status;
SELECT project_status_code
INTO x_status_code
FROM pa_project_statuses
WHERE project_status_code = p_status_code
AND status_type = p_status_type
AND trunc(sysdate) between trunc(start_date_active) and trunc(nvl(end_date_active,sysdate));
SELECT project_status_code
INTO x_status_code
FROM pa_project_statuses
WHERE project_status_name = p_status_name
AND status_type = p_status_type
AND trunc(sysdate) between trunc(start_date_active) and trunc(nvl(end_date_active,sysdate));
SELECT NVL(wf_success_status_code,project_status_code),
NVL(wf_failure_status_code,project_status_code)
INTO x_wf_success_status_code,x_wf_failure_status_code
FROM pa_project_statuses
WHERE project_status_code = p_status_code
AND status_type = p_status_type;
Procedure check_delete_phase_ok(
p_project_status_code IN VARCHAR2
, x_err_code OUT NOCOPY NUMBER /* Added the nocopy check for Bug 4537865 */
, x_err_stage OUT NOCOPY VARCHAR2 /* Added the nocopy check for Bug 4537865 */
, x_err_stack OUT NOCOPY VARCHAR2 /* Added the nocopy check for Bug 4537865 */
, x_allow_deletion_flag OUT NOCOPY VARCHAR2) /* Added the nocopy check for Bug 4537865 */
IS
BEGIN
-- checking whether the phase to be deleted has been used by a lifecycle
Select 'PA_PHASE_LIFECYCLE_USED','N'
Into x_err_stage,x_allow_deletion_flag
From dual
Where exists(Select 'XYZ' from pa_proj_elements
where project_id= 0 and object_type = 'PA_TASKS'
and phase_code= p_project_status_code);
End check_delete_phase_ok;
G_ProjID_Tab.Delete;
SELECT project_status_code
into l_proj_status_code
FROM pa_projects_all
WHERE project_id = x_project_id;
SELECT project_system_status_code
INTO l_system_status_code
FROM pa_project_statuses
WHERE project_status_code = x_project_status_code
and status_type = 'PROJECT';
SELECT 'Y'
INTO l_dummy
FROM dual
WHERE EXISTS
(SELECT '1'
FROM pa_project_types_all t
WHERE t.def_start_proj_status_code=p_project_status_code
AND project_type <> 'AWARD_PROJECT' /* Bug 5718627 */
);