68: )
69: IS
70: CURSOR C IS
71: SELECT *
72: FROM PA_PROJ_PROGRESS_REPORTS
73: WHERE project_id = P_project_id_old
74: AND task_id = p_task_id_old
75: FOR UPDATE of progress_status_code NOWAIT;
76: Recinfo C%ROWTYPE;
74: AND task_id = p_task_id_old
75: FOR UPDATE of progress_status_code NOWAIT;
76: Recinfo C%ROWTYPE;
77: SAVEPOINT_TAG varchar2(60);
78: l_short_description_old PA_PROJ_PROGRESS_REPORTS.short_description%TYPE;
79: l_progress_asof_date_old date;
80: -- l_progress_asof_date_new date;
81: l_long_description_old PA_PROJ_PROGRESS_REPORTS.long_description%TYPE;
82: l_issues_old PA_PROJ_PROGRESS_REPORTS.issues%TYPE;
77: SAVEPOINT_TAG varchar2(60);
78: l_short_description_old PA_PROJ_PROGRESS_REPORTS.short_description%TYPE;
79: l_progress_asof_date_old date;
80: -- l_progress_asof_date_new date;
81: l_long_description_old PA_PROJ_PROGRESS_REPORTS.long_description%TYPE;
82: l_issues_old PA_PROJ_PROGRESS_REPORTS.issues%TYPE;
83: l_estimated_start_date_old date;
84: l_estimated_end_date_old date;
85: l_actual_start_date_old date;
78: l_short_description_old PA_PROJ_PROGRESS_REPORTS.short_description%TYPE;
79: l_progress_asof_date_old date;
80: -- l_progress_asof_date_new date;
81: l_long_description_old PA_PROJ_PROGRESS_REPORTS.long_description%TYPE;
82: l_issues_old PA_PROJ_PROGRESS_REPORTS.issues%TYPE;
83: l_estimated_start_date_old date;
84: l_estimated_end_date_old date;
85: l_actual_start_date_old date;
86: l_actual_end_date_old date;
83: l_estimated_start_date_old date;
84: l_estimated_end_date_old date;
85: l_actual_start_date_old date;
86: l_actual_end_date_old date;
87: l_percent_complete_old PA_PROJ_PROGRESS_REPORTS.percent_complete%TYPE;
88: l_estimate_to_complete_old PA_PROJ_PROGRESS_REPORTS.estimate_to_complete%TYPE;
89: l_unit_type_old PA_PROJ_PROGRESS_REPORTS.unit_type%TYPE;
90: l_wf_status_code_old PA_PROJ_PROGRESS_REPORTS.wf_status_code%TYPE;
91: --l_wf_item_type_old PA_PROJ_PROGRESS_REPORTS.wf_item_type%TYPE;
84: l_estimated_end_date_old date;
85: l_actual_start_date_old date;
86: l_actual_end_date_old date;
87: l_percent_complete_old PA_PROJ_PROGRESS_REPORTS.percent_complete%TYPE;
88: l_estimate_to_complete_old PA_PROJ_PROGRESS_REPORTS.estimate_to_complete%TYPE;
89: l_unit_type_old PA_PROJ_PROGRESS_REPORTS.unit_type%TYPE;
90: l_wf_status_code_old PA_PROJ_PROGRESS_REPORTS.wf_status_code%TYPE;
91: --l_wf_item_type_old PA_PROJ_PROGRESS_REPORTS.wf_item_type%TYPE;
92: --l_wf_item_key_old PA_PROJ_PROGRESS_REPORTS.wf_item_key%TYPE;
85: l_actual_start_date_old date;
86: l_actual_end_date_old date;
87: l_percent_complete_old PA_PROJ_PROGRESS_REPORTS.percent_complete%TYPE;
88: l_estimate_to_complete_old PA_PROJ_PROGRESS_REPORTS.estimate_to_complete%TYPE;
89: l_unit_type_old PA_PROJ_PROGRESS_REPORTS.unit_type%TYPE;
90: l_wf_status_code_old PA_PROJ_PROGRESS_REPORTS.wf_status_code%TYPE;
91: --l_wf_item_type_old PA_PROJ_PROGRESS_REPORTS.wf_item_type%TYPE;
92: --l_wf_item_key_old PA_PROJ_PROGRESS_REPORTS.wf_item_key%TYPE;
93: --l_wf_process_old PA_PROJ_PROGRESS_REPORTS.wf_process%TYPE;
86: l_actual_end_date_old date;
87: l_percent_complete_old PA_PROJ_PROGRESS_REPORTS.percent_complete%TYPE;
88: l_estimate_to_complete_old PA_PROJ_PROGRESS_REPORTS.estimate_to_complete%TYPE;
89: l_unit_type_old PA_PROJ_PROGRESS_REPORTS.unit_type%TYPE;
90: l_wf_status_code_old PA_PROJ_PROGRESS_REPORTS.wf_status_code%TYPE;
91: --l_wf_item_type_old PA_PROJ_PROGRESS_REPORTS.wf_item_type%TYPE;
92: --l_wf_item_key_old PA_PROJ_PROGRESS_REPORTS.wf_item_key%TYPE;
93: --l_wf_process_old PA_PROJ_PROGRESS_REPORTS.wf_process%TYPE;
94:
87: l_percent_complete_old PA_PROJ_PROGRESS_REPORTS.percent_complete%TYPE;
88: l_estimate_to_complete_old PA_PROJ_PROGRESS_REPORTS.estimate_to_complete%TYPE;
89: l_unit_type_old PA_PROJ_PROGRESS_REPORTS.unit_type%TYPE;
90: l_wf_status_code_old PA_PROJ_PROGRESS_REPORTS.wf_status_code%TYPE;
91: --l_wf_item_type_old PA_PROJ_PROGRESS_REPORTS.wf_item_type%TYPE;
92: --l_wf_item_key_old PA_PROJ_PROGRESS_REPORTS.wf_item_key%TYPE;
93: --l_wf_process_old PA_PROJ_PROGRESS_REPORTS.wf_process%TYPE;
94:
95: l_wf_item_key_new number;
88: l_estimate_to_complete_old PA_PROJ_PROGRESS_REPORTS.estimate_to_complete%TYPE;
89: l_unit_type_old PA_PROJ_PROGRESS_REPORTS.unit_type%TYPE;
90: l_wf_status_code_old PA_PROJ_PROGRESS_REPORTS.wf_status_code%TYPE;
91: --l_wf_item_type_old PA_PROJ_PROGRESS_REPORTS.wf_item_type%TYPE;
92: --l_wf_item_key_old PA_PROJ_PROGRESS_REPORTS.wf_item_key%TYPE;
93: --l_wf_process_old PA_PROJ_PROGRESS_REPORTS.wf_process%TYPE;
94:
95: l_wf_item_key_new number;
96:
89: l_unit_type_old PA_PROJ_PROGRESS_REPORTS.unit_type%TYPE;
90: l_wf_status_code_old PA_PROJ_PROGRESS_REPORTS.wf_status_code%TYPE;
91: --l_wf_item_type_old PA_PROJ_PROGRESS_REPORTS.wf_item_type%TYPE;
92: --l_wf_item_key_old PA_PROJ_PROGRESS_REPORTS.wf_item_key%TYPE;
93: --l_wf_process_old PA_PROJ_PROGRESS_REPORTS.wf_process%TYPE;
94:
95: l_wf_item_key_new number;
96:
97: BEGIN
495: end if;
496: EXCEPTION
497: WHEN TIMEOUT_ON_RESOURCE then
498: FND_MESSAGE.Set_Name('PA', 'PA_XC_ROW_ALREADY_LOCKED');
499: --FND_MESSAGE.Set_token('ENTITY', 'PA_PROJ_PROGRESS_REPORTS');
500: --FND_MESSAGE.Set_token('PROJECT',to_char(P_PROJECT_ID_OLD));
501: --FND_MESSAGE.Set_token('TASK',to_char(P_TASK_ID_OLD));
502: x_msg_count := x_msg_count + 1;
503: x_msg_data.extend(1);
506: -- dbms_output.put_line('timeout on resource');
507: WHEN OTHERS then
508: if(SQLCODE = -54) then
509: FND_MESSAGE.Set_Name('PA', 'PA_XC_ROW_ALREADY_LOCKED');
510: --FND_MESSAGE.Set_token('ENTITY', 'PA_PROJ_PROGRESS_REPORTS');
511: --FND_MESSAGE.Set_token('PROJECT',to_char(P_PROJECT_ID_OLD));
512: --FND_MESSAGE.Set_token('TASK',to_char(P_TASK_ID_OLD));
513:
514: x_msg_count := x_msg_count + 1;
558: )
559: IS
560: l_progress_report_id number;
561: l_row_id varchar2(40);
562: CURSOR C IS SELECT rowid FROM PA_PROJ_PROGRESS_REPORTS
563: WHERE progress_report_id = l_progress_report_id;
564: BEGIN
565: x_return_status := FND_API.G_RET_STS_SUCCESS;
566:
564: BEGIN
565: x_return_status := FND_API.G_RET_STS_SUCCESS;
566:
567: --Fetch the next sequence number for progres report
568: SELECT PA_PROJ_PROGRESS_REPORTS_S.NEXTVAL
569: INTO l_progress_report_id
570: FROM dual;
571:
572: INSERT INTO PA_PROJ_PROGRESS_REPORTS(
568: SELECT PA_PROJ_PROGRESS_REPORTS_S.NEXTVAL
569: INTO l_progress_report_id
570: FROM dual;
571:
572: INSERT INTO PA_PROJ_PROGRESS_REPORTS(
573: PROGRESS_REPORT_ID
574: ,RECORD_VERSION_NUMBER
575: ,PROJECT_ID
576: ,TASK_ID
662:
663: IS
664: CURSOR new_wip is
665: select * from
666: pa_proj_progress_reports
667: where progress_report_id = p_progress_report_id;
668: c_rec new_wip%ROWTYPE;
669: l_row_id varchar2(60);
670: l_progress_report_id number := null;
671:
672: BEGIN
673: x_return_status := FND_API.G_RET_STS_SUCCESS;
674:
675: UPDATE PA_PROJ_PROGRESS_REPORTS
676: SET RECORD_VERSION_NUMBER = P_RECORD_VERSION_NUMBER + 1
677: ,PROJECT_ID = P_PROJECT_ID
678: ,TASK_ID = P_TASK_ID
679: ,PROGRESS_STATUS_CODE = P_PROGRESS_STATUS_CODE
755: )
756: is
757: BEGIN
758: x_return_status := FND_API.G_RET_STS_SUCCESS;
759: DELETE FROM PA_PROJ_PROGRESS_REPORTS
760: WHERE progress_report_id = p_progress_report_id;
761: IF (SQL%NOTFOUND) THEN
762: PA_UTILS.Add_Message ( p_app_short_name => 'PA', p_msg_name => 'PA_XC_RECORD_CHANGED');
763: PA_PROJECT_SUBTEAMS_PUB.g_error_exists := FND_API.G_TRUE;
783: --,x_msg_data OUT VARCHAR2 )
784: IS
785: CURSOR new_wip is
786: select * from
787: pa_proj_progress_reports
788: where progress_report_id = (select max(progress_report_id)
789: from pa_proj_progress_reports
790: where project_id = p_project_id
791: and report_status = 'PUBLISHED');
785: CURSOR new_wip is
786: select * from
787: pa_proj_progress_reports
788: where progress_report_id = (select max(progress_report_id)
789: from pa_proj_progress_reports
790: where project_id = p_project_id
791: and report_status = 'PUBLISHED');
792: c_rec new_wip%ROWTYPE;
793: l_row_id varchar2(60);