[Home] [Help]
3207: AND suspense_reason_code LIKE 'ES:%';
3208: / * End of code Changes for Bug fix 3194807 * /
3209:
3210:
3211: -- move the transferred records to psp_enc_lines_history
3212: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310.
3213: -- Introduced DFF columns for bug fix 2908859
3214: INSERT INTO psp_enc_lines_history
3215: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,
3210:
3211: -- move the transferred records to psp_enc_lines_history
3212: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310.
3213: -- Introduced DFF columns for bug fix 2908859
3214: INSERT INTO psp_enc_lines_history
3215: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,
3216: dr_cr_flag,encumbrance_amount,status_code,enc_line_type,schedule_line_id,org_schedule_id,
3217: default_org_account_id,suspense_org_account_id,element_account_id,gl_project_flag,
3218: enc_summary_line_id,person_id,assignment_id,award_id,task_id,expenditure_type,
3728:
3729: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated status_code to ''A'' in psp_enc_summary_lines');
3730:
3731: FORALL recno IN 1..r_interface.enc_summary_line_id.COUNT
3732: INSERT INTO psp_enc_lines_history
3733: (enc_line_id, business_group_id, enc_element_type_id, encumbrance_date,
3734: dr_cr_flag, encumbrance_amount, status_code, enc_line_type,
3735: schedule_line_id, org_schedule_id, default_org_account_id, suspense_org_account_id,
3736: element_account_id, gl_project_flag, enc_summary_line_id, person_id,
3761: orig_gl_code_combination_id, orig_project_id, orig_task_id, orig_award_id,
3762: orig_expenditure_org_id, orig_expenditure_type
3763: FROM psp_enc_lines
3764: WHERE enc_summary_line_id = r_interface.enc_summary_line_id(recno);
3765: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history');
3766:
3767: FORALL recno IN 1..r_interface.enc_summary_line_id.COUNT
3768: DELETE FROM psp_enc_lines
3769: WHERE enc_summary_line_id = r_interface.enc_summary_line_id(recno);
5339: UPDATE psp_enc_lines
5340: SET status_code = 'A'
5341: WHERE rowid = l_rowid;
5342:
5343: -- move the transferred records to psp_enc_lines_history
5344: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310
5345: --dbms_output.put_line('moving rec into enc lines hist');
5346: --insert_into_psp_stout( 'moving rec into enc lines hist');
5347: -- Introduced DFF columns for bug fix 2908859
5344: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310
5345: --dbms_output.put_line('moving rec into enc lines hist');
5346: --insert_into_psp_stout( 'moving rec into enc lines hist');
5347: -- Introduced DFF columns for bug fix 2908859
5348: INSERT INTO psp_enc_lines_history
5349: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,
5350: dr_cr_flag,encumbrance_amount,status_code,enc_line_type,schedule_line_id,org_schedule_id,
5351: default_org_account_id,suspense_org_account_id,element_account_id,gl_project_flag,
5352: enc_summary_line_id,person_id,assignment_id,award_id,task_id,expenditure_type,
5632:
5633: / * End of code Changes for Bug fix 3194807 * /
5634:
5635:
5636: -- move the transferred records to psp_enc_lines_history
5637: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310
5638: -- Introduced DFF columns for bug fix 2908859
5639: INSERT INTO psp_enc_lines_history
5640: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,
5635:
5636: -- move the transferred records to psp_enc_lines_history
5637: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310
5638: -- Introduced DFF columns for bug fix 2908859
5639: INSERT INTO psp_enc_lines_history
5640: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,
5641: dr_cr_flag,encumbrance_amount,status_code,enc_line_type,schedule_line_id,org_schedule_id,
5642: default_org_account_id,suspense_org_account_id,element_account_id,gl_project_flag,
5643: enc_summary_line_id,person_id,assignment_id,award_id,task_id,expenditure_type,
6043:
6044: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' r_success_recs.enc_summary_line_id.COUNT: ' || r_success_recs.enc_summary_line_id.COUNT);
6045:
6046: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6047: INSERT INTO psp_enc_lines_history
6048: (enc_line_id, business_group_id, enc_element_type_id, encumbrance_date,
6049: dr_cr_flag, encumbrance_amount, status_code, enc_line_type,
6050: schedule_line_id, org_schedule_id, default_org_account_id, suspense_org_account_id,
6051: element_account_id, gl_project_flag, enc_summary_line_id, person_id,
6076: orig_gl_code_combination_id, orig_project_id, orig_task_id, orig_award_id,
6077: orig_expenditure_org_id, orig_expenditure_type
6078: FROM psp_enc_lines
6079: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6080: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history');
6081:
6082: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6083: DELETE FROM psp_enc_lines
6084: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6388: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6389: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated status_code to ''A'' in psp_enc_summary_lines');
6390:
6391: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6392: INSERT INTO psp_enc_lines_history
6393: (enc_line_id, business_group_id, enc_element_type_id, encumbrance_date,
6394: dr_cr_flag, encumbrance_amount, status_code, enc_line_type,
6395: schedule_line_id, org_schedule_id, default_org_account_id, suspense_org_account_id,
6396: element_account_id, gl_project_flag, enc_summary_line_id, person_id,
6417: attribute7, attribute8, attribute9, attribute10,
6418: payroll_action_id, hierarchy_code, hierarchy_start_date, hierarchy_end_date
6419: FROM psp_enc_lines
6420: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6421: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history');
6422:
6423: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6424: DELETE FROM psp_enc_lines
6425: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6702: NVL(expenditure_organization_id, -99),
6703: NVL(expenditure_type, '-99'),
6704: enc_start_date,
6705: enc_end_date
6706: FROM psp_enc_lines_history pelh
6707: WHERE change_flag = 'N'
6708: AND assignment_id = p_assignment_id
6709: AND payroll_id = p_payroll_id
6710: ORDER BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
6715: l_nlines_counter := 0;
6716:
6717: FOR asg_no IN 1..l_asgs.payroll_id.COUNT
6718: LOOP
6719: UPDATE psp_enc_lines_history pelh
6720: SET change_flag = 'N'
6721: WHERE EXISTS (SELECT 1
6722: FROM psp_enc_summary_lines pesl
6723: WHERE pesl.enc_summary_line_id = pelh.enc_summary_line_id
6724: AND status_code = 'A')
6725: AND assignment_id = l_asgs.assignment_id(asg_no)
6726: AND payroll_id = l_asgs.payroll_id(asg_no);
6727:
6728: UPDATE psp_enc_lines_history pelh
6729: SET hierarchy_code = 'SA'
6730: WHERE change_flag = 'N'
6731: AND hierarchy_code <> 'SA'
6732: AND suspense_org_account_id IS NOT NULL
6812: END IF;
6813: END LOOP;
6814:
6815: FORALL recno IN 1..t_enc_nlines.element_type_id.COUNT
6816: UPDATE psp_enc_lines_history
6817: SET hierarchy_start_date = t_enc_nlines.enc_start_date(recno),
6818: hierarchy_end_date = t_enc_nlines.enc_end_date(recno)
6819: WHERE assignment_id = t_enc_nlines.assignment_id(recno)
6820: AND payroll_id = t_enc_nlines.payroll_id(recno)