DBA Data[Home] [Help]

APPS.PSP_ENC_SUM_TRAN dependencies on PSP_ENC_LINES

Line 420: UPDATE psp_enc_lines

416: AND superceded_line_id IS NULL
417: AND status_code = 'N';
418: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted un-imported summary lines (' || SQL%ROWCOUNT || ')');
419:
420: UPDATE psp_enc_lines
421: SET suspense_org_account_id = NULL,
422: gl_code_combination_id = orig_gl_code_combination_id,
423: project_id = orig_project_id,
424: task_id = orig_task_id,

Line 433: UPDATE psp_enc_lines

429: encumbrance_date = prev_effective_date
430: WHERE payroll_action_id = p_payroll_action_id
431: AND suspense_reason_code like 'ES:%';
432:
433: UPDATE psp_enc_lines
434: SET orig_gl_code_combination_id = NULL,
435: orig_project_id = NULL,
436: orig_task_id = NULL,
437: orig_award_id = NULL,

Line 570: -- When the program returns a failure status, it also updates PSP_ENC_LINES

566: -- This procedure updates the table PSP_ENC_CONTROLS with ACTION_CODE = 'P',
567: -- if the program is completed with a return code of success and if the
568: -- return code is failed it updates ACTION_CODE = 'N'.
569:
570: -- When the program returns a failure status, it also updates PSP_ENC_LINES
571: -- with STATUS_CODE = 'N' and PSP_ENC_SUMMARY_LINES with STATUS_CODE = 'R'
572:
573: -- ##########################################################################
574:

Line 585: FROM psp_enc_lines

581: AND pesl.status_code = 'N';
582:
583: CURSOR check_enc_lines IS
584: SELECT COUNT(1)
585: FROM psp_enc_lines
586: WHERE payroll_action_id = p_payroll_action_id
587: AND enc_start_date <= g_def_end_date;
588:
589: l_pending_line_count NUMBER;

Line 610: DELETE psp_enc_lines

606:
607: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_enc_lines_cnt: '||l_enc_lines_cnt);
608:
609: IF (l_enc_lines_cnt = 0) THEN
610: DELETE psp_enc_lines
611: WHERE payroll_action_id = p_payroll_action_id;
612: END IF;
613: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'Calling move_rej_lines_to_arch');
614: move_rej_lines_to_arch(p_payroll_action_id);

Line 646: FROM psp_enc_lines pel

642: SET process_phase = 'summarize_transfer'
643: WHERE payroll_action_id = p_payroll_action_id
644: AND process_code = 'ST'
645: AND EXISTS (SELECT 1
646: FROM psp_enc_lines pel
647: WHERE pel.payroll_action_id = p_payroll_action_id);
648: IF (SQL%ROWCOUNT > 0) THEN
649: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated process_phase to summarize and transfer re-processing');
650: END IF;

Line 759: FROM psp_enc_lines pel

755: enc_control_rec enc_control_cur%ROWTYPE;
756: / * Included as part of Bug fix #1776606 * /
757: CURSOR gl_gms_line_count_cur IS
758: SELECT count(*)
759: FROM psp_enc_lines pel
760: -- ,psp_enc_controls pec
761: WHERE pel.enc_control_id= enc_control_rec.enc_control_id
762: AND pel.time_period_id = enc_control_rec.time_period_id
763: AND pel.encumbrance_amount<>0

Line 808: FROM psp_enc_lines pel

804: -- in psp_enc_controls to 'P' or 'N'
805: / * Commented as part of bug fix #1776606
806: SELECT nvl(sum(encumbrance_amount),0)
807: INTO l_o_enc_sum
808: FROM psp_enc_lines pel
809: -- ,psp_enc_controls pec
810: WHERE pel.enc_control_id = enc_control_rec.enc_control_id
811: AND pel.time_period_id = enc_control_rec.time_period_id
812: AND pel.business_group_id = g_business_group_id

Line 898: -- This procedure summarizes all the lines from psp_enc_lines

894: END;
895: End of comment for Create and Update multi thread enh. *****/
896:
897: -- ##########################################################################
898: -- This procedure summarizes all the lines from psp_enc_lines
899: -- and inserts the summarized lines into psp_enc_summary_lines
900:
901: -- Depending on the setup options, this procedure groups transactions from
902: -- PSP_ENC_LINES and inserts the summarized lines into PSP_ENC_SUMMARY_LINES

Line 902: -- PSP_ENC_LINES and inserts the summarized lines into PSP_ENC_SUMMARY_LINES

898: -- This procedure summarizes all the lines from psp_enc_lines
899: -- and inserts the summarized lines into psp_enc_summary_lines
900:
901: -- Depending on the setup options, this procedure groups transactions from
902: -- PSP_ENC_LINES and inserts the summarized lines into PSP_ENC_SUMMARY_LINES
903:
904: -- There are two setup options in PSP_ENC_SETUP_OPTIONS table called 'TIME_BASED_SUMM'
905: -- and 'CI_BASED_SUMM_GL' on which the procedure depends.
906:

Line 971: FROM PSP_ENC_LINES PEL,

967: DECODE(g_dff_grouping_option, 'Y', DECODE(suspense_org_account_id, NULL, pel.attribute7, pos.attribute7), NULL) attribute7,
968: DECODE(g_dff_grouping_option, 'Y', DECODE(suspense_org_account_id, NULL, pel.attribute8, pos.attribute8), NULL) attribute8,
969: DECODE(g_dff_grouping_option, 'Y', DECODE(suspense_org_account_id, NULL, pel.attribute9, pos.attribute9), NULL) attribute9,
970: DECODE(g_dff_grouping_option, 'Y', DECODE(suspense_org_account_id, NULL, pel.attribute10, pos.attribute10), NULL) attribute10
971: FROM PSP_ENC_LINES PEL,
972: PER_TIME_PERIODS PTP,
973: -- ,GL_SETS_OF_BOOKS SOB,
974: -- GL_CODE_COMBINATIONS GCC,
975: PSP_ORGANIZATION_ACCOUNTS POS

Line 1019: FROM PSP_ENC_LINES PEL,

1015: pel.person_id,
1016: pel.gl_code_combination_id gl_ccid
1017: -- sob.set_of_books_id,
1018: -- decode(suspense_org_account_id, null, pel.gl_code_combination_id, pos.gl_code_combination_id) gl_ccid
1019: FROM PSP_ENC_LINES PEL,
1020: PER_TIME_PERIODS PTP
1021: -- ,GL_SETS_OF_BOOKS SOB,
1022: -- GL_CODE_COMBINATIONS GCC,
1023: -- PSP_ORGANIZATION_ACCOUNTS POS

Line 1053: FROM PSP_ENC_LINES PEL,

1049: pel.gl_project_flag,
1050: pel.gl_code_combination_id gl_ccid
1051: -- sob.set_of_books_id,
1052: -- decode(suspense_org_account_id, null, pel.gl_code_combination_id, pos.gl_code_combination_id) gl_ccid
1053: FROM PSP_ENC_LINES PEL,
1054: PER_TIME_PERIODS PTP
1055: -- ,GL_SETS_OF_BOOKS SOB,
1056: -- GL_CODE_COMBINATIONS GCC,
1057: -- PSP_ORGANIZATION_ACCOUNTS POS

Line 1092: FROM PSP_ENC_LINES PEL,

1088: pel.assignment_id,
1089: pel.gl_code_combination_id gl_ccid
1090: -- ,sob.set_of_books_id,
1091: -- decode(suspense_org_account_id, null, pel.gl_code_combination_id, pos.gl_code_combination_id) gl_ccid
1092: FROM PSP_ENC_LINES PEL,
1093: GL_PERIODS GLP,
1094: GL_SETS_OF_BOOKS SOB,
1095: -- ,GL_CODE_COMBINATIONS GCC,
1096: -- PSP_ORGANIZATION_ACCOUNTS POS

Line 1124: FROM PSP_ENC_LINES PEL,

1120: pel.gl_project_flag,
1121: pel.person_id,
1122: pel.gl_code_combination_id gl_ccid
1123: -- ,decode(suspense_org_account_id, null, pel.gl_code_combination_id, pos.gl_code_combination_id) gl_ccid
1124: FROM PSP_ENC_LINES PEL,
1125: GL_PERIODS GLP,
1126: GL_SETS_OF_BOOKS SOB
1127: -- ,GL_CODE_COMBINATIONS GCC,
1128: -- PSP_ORGANIZATION_ACCOUNTS POS

Line 1154: FROM PSP_ENC_LINES PEL,

1150: sum(pel.encumbrance_amount) sum_amt,
1151: pel.gl_project_flag,
1152: pel.gl_code_combination_id gl_ccid
1153: -- ,decode(suspense_org_account_id, null, pel.gl_code_combination_id, pos.gl_code_combination_id) gl_ccid
1154: FROM PSP_ENC_LINES PEL,
1155: GL_PERIODS GLP,
1156: GL_SETS_OF_BOOKS SOB
1157: -- ,GL_CODE_COMBINATIONS GCC,
1158: -- PSP_ORGANIZATION_ACCOUNTS POS

Line 1308: UPDATE psp_enc_lines

1304: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1305: END IF;
1306:
1307: IF (g_dff_grouping_option = 'N') THEN -- Introduced for bug fix 2908859
1308: UPDATE psp_enc_lines
1309: SET enc_summary_line_id = l_enc_summary_line_id
1310: WHERE enc_control_id = enc_control_rec.enc_control_id
1311: AND payroll_id = enc_control_rec.payroll_id
1312: AND time_period_id = enc_control_rec.time_period_id

Line 1328: UPDATE psp_enc_lines

1324: AND poa.gl_code_combination_id = enc_sum_lines_p1_rec.gl_ccid))
1325: OR gl_code_combination_id = enc_sum_lines_p1_rec.gl_ccid);
1326: -- Introduced ELSE portion for bug fix 2908859
1327: ELSE
1328: UPDATE psp_enc_lines
1329: SET enc_summary_line_id = l_enc_summary_line_id
1330: WHERE enc_control_id = enc_control_rec.enc_control_id
1331: AND payroll_id = enc_control_rec.payroll_id
1332: AND time_period_id = enc_control_rec.time_period_id

Line 1427: UPDATE psp_enc_lines

1423: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1424: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1425: END IF;
1426:
1427: UPDATE psp_enc_lines
1428: SET enc_summary_line_id = l_enc_summary_line_id
1429: WHERE enc_control_id = enc_control_rec.enc_control_id
1430: AND payroll_id = enc_control_rec.payroll_id
1431: ANd time_period_id = enc_control_rec.time_period_id

Line 1492: UPDATE psp_enc_lines

1488: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1489: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1490: END IF;
1491:
1492: UPDATE psp_enc_lines
1493: SET enc_summary_line_id = l_enc_summary_line_id
1494: WHERE enc_control_id = enc_control_rec.enc_control_id
1495: AND time_period_id = enc_control_rec.time_period_id
1496: AND payroll_id = enc_control_rec.payroll_id

Line 1559: UPDATE psp_enc_lines

1555: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1556: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1557: END IF;
1558:
1559: UPDATE psp_enc_lines
1560: SET enc_summary_line_id = l_enc_summary_line_id
1561: WHERE enc_control_id = enc_control_rec.enc_control_id
1562: AND time_period_id = enc_control_rec.time_period_id
1563: AND payroll_id = enc_control_rec.payroll_id

Line 1623: UPDATE psp_enc_lines

1619: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1620: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1621: END IF;
1622:
1623: UPDATE psp_enc_lines
1624: SET enc_summary_line_id = l_enc_summary_line_id
1625: WHERE enc_control_id = enc_control_rec.enc_control_id
1626: AND payroll_id = enc_control_rec.payroll_id
1627: AND time_period_id = enc_control_rec.time_period_id

Line 1686: UPDATE psp_enc_lines

1682: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1683: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1684: END IF;
1685:
1686: UPDATE psp_enc_lines
1687: SET enc_summary_line_id = l_enc_summary_line_id
1688: WHERE enc_control_id = enc_control_rec.enc_control_id
1689: AND payroll_id = enc_control_rec.payroll_id
1690: AND time_period_id = enc_control_rec.time_period_id

Line 2758: FROM psp_enc_lines pel

2754: CURSOR assign_susp_ac_cur(P_ENC_LINE_ID IN NUMBER) IS
2755: SELECT pel.rowid,
2756: pel.encumbrance_date,
2757: pel.suspense_org_account_id
2758: FROM psp_enc_lines pel
2759: WHERE pel.enc_summary_line_id = p_enc_line_id
2760: and enc_control_id=p_enc_control_id ; -- this added to fix suspense ac postings
2761: -- bug fix 1671938
2762:

Line 2777: psp_enc_lines pel

2773: CURSOR get_org_id_cur(P_LINE_ID IN NUMBER) IS
2774: SELECT hou.organization_id, hou.name
2775: FROM hr_all_organization_units hou,
2776: per_assignments_f paf,
2777: psp_enc_lines pel
2778: WHERE pel.enc_summary_line_id = p_line_id
2779: AND pel.assignment_id = paf.assignment_id
2780: AND pel.encumbrance_date BETWEEN paf.effective_start_date AND paf.effective_end_date
2781: AND paf.organization_id = hou.organization_id

Line 2791: psp_enc_lines pel

2787: CURSOR get_org_id_cur(P_ROWID IN ROWID) IS
2788: SELECT hou.organization_id, hou.name
2789: FROM hr_all_organization_units hou,
2790: per_assignments_f paf,
2791: psp_enc_lines pel
2792: WHERE
2793: -- pel.enc_summary_line_id = p_line_id
2794: pel.rowid=p_rowid
2795: AND pel.assignment_id = paf.assignment_id

Line 2817: psp_enc_lines pel

2813: pel.suspense_org_account_id,
2814: pel.gl_code_combination_id
2815: FROM hr_organization_units hou,
2816: per_assignments_f paf,
2817: psp_enc_lines pel
2818: WHERE pel.enc_summary_line_id = p_enc_summary_line_id
2819: AND pel.assignment_id = paf.assignment_id
2820: AND pel.encumbrance_date BETWEEN paf.effective_start_date AND paf.effective_end_date
2821: AND paf.organization_id = hou.organization_id

Line 3001: UPDATE psp_enc_lines

2997: null;
2998: --- fIx for bug 1671938/1888408
2999:
3000: / *
3001: UPDATE psp_enc_lines
3002: SET status_code = 'N'
3003: WHERE rowid = l_rowid;
3004: -- if the suspense a/c failed,update the status of the whole batch and display the error
3005:

Line 3017: UPDATE psp_enc_lines

3013: l_suspense_ac_failed := 'Y';
3014:
3015: / * Commented the following for Bug 3194807
3016:
3017: UPDATE psp_enc_lines
3018: SET suspense_reason_code = l_status,
3019: status_code = 'N'
3020: WHERE rowid = l_rowid;
3021:

Line 3118: UPDATE psp_enc_lines

3114:
3115: -- assign the organization suspense account and gl status
3116: / * For Bug fix 3194807 * /
3117:
3118: UPDATE psp_enc_lines
3119: SET prev_effective_date = encumbrance_date
3120: WHERE rowid = l_rowid;
3121: / * End of changes for Bug fix 3194807 * /
3122:

Line 3123: UPDATE psp_enc_lines

3119: SET prev_effective_date = encumbrance_date
3120: WHERE rowid = l_rowid;
3121: / * End of changes for Bug fix 3194807 * /
3122:
3123: UPDATE psp_enc_lines
3124: SET suspense_org_account_id = l_organization_account_id,
3125: suspense_reason_code = 'ES:' || l_status,
3126: gl_project_flag = l_gl_project_flag,
3127: -- encumbrance_date = l_encumbrance_date, for Bug 3194807

Line 3176: UPDATE psp_enc_lines

3172:
3173:
3174: / * Added the following for Bug 3194807 * /
3175:
3176: UPDATE psp_enc_lines
3177: SET suspense_org_account_id = NULL,
3178: suspense_reason_code = NULL,
3179: gl_project_flag = decode(gl_code_combination_id,NULL,'P','G'),
3180: encumbrance_date = prev_effective_date

Line 3233: UPDATE psp_enc_lines

3229: ELSIF l_dr_cr_flag = 'C' THEN
3230: l_cr_summary_amount := l_cr_summary_amount + l_summary_amount;
3231: END IF;
3232:
3233: UPDATE psp_enc_lines
3234: SET status_code = 'A'
3235: WHERE enc_summary_line_id = l_enc_summary_line_id
3236: AND enc_control_id = p_enc_control_id;
3237:

Line 3239: UPDATE psp_enc_lines

3235: WHERE enc_summary_line_id = l_enc_summary_line_id
3236: AND enc_control_id = p_enc_control_id;
3237:
3238: / * Introduced this cursor for Bug fix 3194807 * /
3239: UPDATE psp_enc_lines
3240: SET gl_code_combination_id = (SELECT poa.gl_code_combination_id
3241: FROM psp_organization_accounts poa
3242: where poa.organization_account_id = suspense_org_account_id),
3243: project_id = NULL,

Line 3253: -- move the transferred records to psp_enc_lines_history

3249: AND suspense_reason_code LIKE 'ES:%';
3250: / * End of code Changes for Bug fix 3194807 * /
3251:
3252:
3253: -- move the transferred records to psp_enc_lines_history
3254: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310.
3255: -- Introduced DFF columns for bug fix 2908859
3256: INSERT INTO psp_enc_lines_history
3257: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,

Line 3256: INSERT INTO psp_enc_lines_history

3252:
3253: -- move the transferred records to psp_enc_lines_history
3254: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310.
3255: -- Introduced DFF columns for bug fix 2908859
3256: INSERT INTO psp_enc_lines_history
3257: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,
3258: dr_cr_flag,encumbrance_amount,status_code,enc_line_type,schedule_line_id,org_schedule_id,
3259: default_org_account_id,suspense_org_account_id,element_account_id,gl_project_flag,
3260: enc_summary_line_id,person_id,assignment_id,award_id,task_id,expenditure_type,

Line 3277: FROM psp_enc_lines

3273: last_updated_by,last_update_login,created_by,creation_date,enc_start_date,enc_end_date,
3274: attribute_category, attribute1, attribute2, attribute3,
3275: attribute4, attribute5, attribute6, attribute7,
3276: attribute8, attribute9, attribute10
3277: FROM psp_enc_lines
3278: WHERE status_code = 'A'
3279: AND enc_summary_line_id = l_enc_summary_line_id
3280: AND enc_control_id = p_enc_control_id;
3281:

Line 3282: DELETE FROM psp_enc_lines

3278: WHERE status_code = 'A'
3279: AND enc_summary_line_id = l_enc_summary_line_id
3280: AND enc_control_id = p_enc_control_id;
3281:
3282: DELETE FROM psp_enc_lines
3283: WHERE status_code = 'A'
3284: AND enc_summary_line_id = l_enc_summary_line_id
3285: AND enc_control_id = p_enc_control_id;
3286:

Line 3380: FROM psp_enc_lines pel,

3376: pel.gl_code_combination_id,
3377: pel.suspense_org_account_id,
3378: pesl.interface_status,
3379: ptp.end_date
3380: FROM psp_enc_lines pel,
3381: psp_enc_summary_lines pesl,
3382: per_time_periods ptp
3383: WHERE pel.payroll_action_id = p_payroll_action_id
3384: AND pel.enc_summary_line_id = pesl.enc_summary_line_id

Line 3404: psp_enc_lines pel

3400: CURSOR get_org_id_cur(P_ROWID IN ROWID) IS
3401: SELECT hou.organization_id, hou.name
3402: FROM hr_all_organization_units hou,
3403: per_assignments_f paf,
3404: psp_enc_lines pel
3405: WHERE pel.rowid=p_rowid
3406: AND pel.assignment_id = paf.assignment_id
3407: AND pel.encumbrance_date BETWEEN paf.effective_start_date AND paf.effective_end_date
3408: AND paf.organization_id = hou.organization_id

Line 3665: UPDATE psp_enc_lines

3661: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3662: END IF;
3663: END IF;
3664:
3665: UPDATE psp_enc_lines
3666: SET prev_effective_date = encumbrance_date,
3667: orig_gl_code_combination_id = gl_code_combination_id,
3668: orig_project_id = project_id,
3669: orig_task_id = task_id,

Line 3676: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines count'||sql%rowcount);

3672: orig_expenditure_type = expenditure_type
3673: WHERE rowid = r_suspense_ac.row_id(recno)
3674: AND enc_start_date <= g_def_end_date;
3675:
3676: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines count'||sql%rowcount);
3677:
3678: UPDATE psp_enc_lines
3679: SET suspense_org_account_id = l_organization_account_id,
3680: gl_code_combination_id = l_susp_glccid,

Line 3678: UPDATE psp_enc_lines

3674: AND enc_start_date <= g_def_end_date;
3675:
3676: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines count'||sql%rowcount);
3677:
3678: UPDATE psp_enc_lines
3679: SET suspense_org_account_id = l_organization_account_id,
3680: gl_code_combination_id = l_susp_glccid,
3681: project_id = l_project_id,
3682: task_id = l_task_id,

Line 3693: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines1 count'||sql%rowcount);

3689: status_code = 'N'
3690: WHERE rowid = r_suspense_ac.row_id(recno)
3691: AND enc_start_date <= g_def_end_date;
3692:
3693: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines1 count'||sql%rowcount);
3694:
3695: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'add_st_warnings');
3696: add_st_warnings(p_assignment_id => r_suspense_ac.assignment_id(recno),
3697: p_payroll_id => r_suspense_ac.payroll_id(recno),

Line 3712: UPDATE psp_enc_lines

3708: END LOOP;
3709:
3710: IF l_suspense_ac_failed = 'Y' THEN
3711: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'Suspence account failed');
3712: UPDATE psp_enc_lines
3713: SET suspense_org_account_id = NULL,
3714: gl_code_combination_id = orig_gl_code_combination_id,
3715: project_id = orig_project_id,
3716: task_id = orig_task_id,

Line 3728: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines2 count'||sql%rowcount);

3724: FROM psp_enc_summary_lines pesl
3725: WHERE pesl.payroll_action_id = p_payroll_action_id
3726: AND pesl.group_id = p_group_id
3727: AND status_code = 'R');
3728: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines2 count'||sql%rowcount);
3729:
3730: UPDATE psp_enc_lines
3731: SET orig_gl_code_combination_id = NULL,
3732: orig_project_id = NULL,

Line 3730: UPDATE psp_enc_lines

3726: AND pesl.group_id = p_group_id
3727: AND status_code = 'R');
3728: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines2 count'||sql%rowcount);
3729:
3730: UPDATE psp_enc_lines
3731: SET orig_gl_code_combination_id = NULL,
3732: orig_project_id = NULL,
3733: orig_task_id = NULL,
3734: orig_award_id = NULL,

Line 3745: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines3 count'||sql%rowcount);

3741: WHERE pesl.payroll_action_id = p_payroll_action_id
3742: AND pesl.group_id = p_group_id
3743: AND status_code = 'R');
3744:
3745: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines3 count'||sql%rowcount);
3746:
3747: END IF;
3748:
3749: IF l_suspense_ac_not_found = 'Y' THEN

Line 3811: INSERT INTO psp_enc_lines_history

3807:
3808: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated status_code to ''A'' in psp_enc_summary_lines count: '||g_bulk_row_count);
3809:
3810: FORALL recno IN 1..r_interface.enc_summary_line_id.COUNT
3811: INSERT INTO psp_enc_lines_history
3812: (enc_line_id, business_group_id, enc_element_type_id, encumbrance_date,
3813: dr_cr_flag, encumbrance_amount, status_code, enc_line_type,
3814: schedule_line_id, org_schedule_id, default_org_account_id, suspense_org_account_id,
3815: element_account_id, gl_project_flag, enc_summary_line_id, person_id,

Line 3842: FROM psp_enc_lines

3838: attribute7, attribute8, attribute9, attribute10,
3839: payroll_action_id, hierarchy_code, hierarchy_start_date, hierarchy_end_date,
3840: orig_gl_code_combination_id, orig_project_id, orig_task_id, orig_award_id,
3841: orig_expenditure_org_id, orig_expenditure_type
3842: FROM psp_enc_lines
3843: WHERE enc_summary_line_id = r_interface.enc_summary_line_id(recno);
3844:
3845: g_bulk_row_count :=0;
3846: FOR bulk_idx IN 1..r_interface.enc_summary_line_id.COUNT

Line 3851: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history count: '||g_bulk_row_count);

3847: loop
3848: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
3849: end loop;
3850:
3851: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history count: '||g_bulk_row_count);
3852:
3853: FORALL recno IN 1..r_interface.enc_summary_line_id.COUNT
3854: DELETE FROM psp_enc_lines
3855: WHERE enc_summary_line_id = r_interface.enc_summary_line_id(recno);

Line 3854: DELETE FROM psp_enc_lines

3850:
3851: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history count: '||g_bulk_row_count);
3852:
3853: FORALL recno IN 1..r_interface.enc_summary_line_id.COUNT
3854: DELETE FROM psp_enc_lines
3855: WHERE enc_summary_line_id = r_interface.enc_summary_line_id(recno);
3856:
3857: g_bulk_row_count :=0;
3858: FOR bulk_idx IN 1..r_interface.enc_summary_line_id.COUNT

Line 3863: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted lines from psp_enc_lines that are summarized and trasnferred to target systems count: '||g_bulk_row_count);

3859: loop
3860: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
3861: end loop;
3862:
3863: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted lines from psp_enc_lines that are summarized and trasnferred to target systems count: '||g_bulk_row_count);
3864:
3865:
3866:
3867: FORALL recno IN 1..r_interface.enc_control_id.COUNT

Line 4090: -- This procedure summarizes all the lines from psp_enc_lines

4086:
4087: END;
4088:
4089: -- ##########################################################################
4090: -- This procedure summarizes all the lines from psp_enc_lines
4091: -- where gl_project_flag = 'P' and inserts the summarized lines
4092: -- into psp_enc_summary_lines
4093:
4094: -- Depending on the setup options, this procedure groups transactions from

Line 4095: -- PSP_ENC_LINES and inserts the summarized lines into PSP_ENC_SUMMARY_LINES

4091: -- where gl_project_flag = 'P' and inserts the summarized lines
4092: -- into psp_enc_summary_lines
4093:
4094: -- Depending on the setup options, this procedure groups transactions from
4095: -- PSP_ENC_LINES and inserts the summarized lines into PSP_ENC_SUMMARY_LINES
4096:
4097: -- There are two setup options in PSP_ENC_SETUP_OPTIONS table called 'TIME_BASED_SUMM'
4098: -- and 'CI_BASED_SUMM_OGM' on which the procedure depends.
4099:

Line 4162: FROM PSP_ENC_LINES PEL,

4158: pel.award_id,
4159: pel.expenditure_type,
4160: pel.expenditure_organization_id * /
4161: -- ,pai.set_of_books_id
4162: FROM PSP_ENC_LINES PEL,
4163: PER_TIME_PERIODS PTP,
4164: PSP_ORGANIZATION_ACCOUNTS POA
4165: -- ,PA_IMPLEMENTATIONS_ALL PAI
4166: WHERE PEL.TIME_PERIOD_ID = PTP.TIME_PERIOD_ID

Line 4228: FROM PSP_ENC_LINES PEL,

4224: pel.award_id,
4225: pel.expenditure_type,
4226: pel.expenditure_organization_id,
4227: pai.set_of_books_id
4228: FROM PSP_ENC_LINES PEL,
4229: GL_PERIODS GLP,
4230: PA_IMPLEMENTATIONS_ALL PAI
4231: WHERE PEL.BUSINESS_GROUP_ID = PAI.BUSINESS_GROUP_ID
4232: AND GLP.PERIOD_TYPE = PAI.PA_PERIOD_TYPE

Line 4377: UPDATE psp_enc_lines

4373: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4374: END IF;
4375:
4376: IF (g_dff_grouping_option = 'N') THEN -- Introduced for bug fix 2908859
4377: UPDATE psp_enc_lines
4378: SET enc_summary_line_id = l_enc_summary_line_id
4379: WHERE -- project_id = enc_sum_lines_p_rec.project_id Commented for bug fix 3194807
4380: -- Introduced the suspense_org_account verification for bug fix 3194807
4381: ( (suspense_org_account_id IS NOT NULL

Line 4410: UPDATE psp_enc_lines

4406: AND trunc(encumbrance_date) = trunc(enc_sum_lines_p_rec.eff_dt); ---- bug 3462452
4407: -- AND set_of_books_id = enc_sum_lines_p_rec.set_of_books_id;
4408: -- Introduced ELSE portion for bug fix 2908859
4409: ELSE
4410: UPDATE psp_enc_lines
4411: SET enc_summary_line_id = l_enc_summary_line_id
4412: WHERE enc_control_id = enc_control_rec.enc_control_id
4413: AND payroll_id = enc_control_rec.payroll_id
4414: AND time_period_id = enc_control_rec.time_period_id

Line 4516: UPDATE psp_enc_lines

4512: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4513: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4514: END IF;
4515:
4516: UPDATE psp_enc_lines
4517: SET enc_summary_line_id = l_enc_summary_line_id
4518: WHERE project_id = enc_sum_lines_g_rec.project_id
4519: AND task_id = enc_sum_lines_g_rec.task_id
4520: AND enc_control_id = enc_control_rec.enc_control_id

Line 5250: FROM psp_enc_lines pel

5246: CURSOR assign_susp_ac_cur(P_ENC_LINE_ID IN NUMBER) IS
5247: SELECT pel.rowid,
5248: pel.encumbrance_date,
5249: pel.suspense_org_account_id
5250: FROM psp_enc_lines pel
5251: WHERE pel.enc_summary_line_id = p_enc_line_id
5252: and pel.enc_control_id=p_enc_control_id;
5253: -- bUg fix 1671938
5254:

Line 5269: psp_enc_lines pel

5265: CURSOR get_org_id_cur(P_LINE_ID IN NUMBER) IS
5266: SELECT hou.organization_id, hou.name
5267: FROM hr_all_organization_units hou,
5268: per_assignments_f paf,
5269: psp_enc_lines pel
5270: WHERE pel.enc_summary_line_id = p_line_id
5271: AND pel.assignment_id = paf.assignment_id
5272: AND pel.encumbrance_date BETWEEN paf.effective_start_date AND paf.effective_end_date
5273: AND paf.organization_id = hou.organization_id

Line 5283: psp_enc_lines pel

5279: CURSOR get_org_id_cur(P_ROWID IN ROWID) IS
5280: SELECT hou.organization_id, hou.name
5281: FROM hr_all_organization_units hou,
5282: per_assignments_f paf,
5283: psp_enc_lines pel
5284: WHERE
5285: -- pel.enc_summary_line_id = p_line_id
5286: pel.rowid=p_rowid
5287: AND pel.assignment_id = paf.assignment_id

Line 5308: psp_enc_lines pel,

5304: pel.encumbrance_date,
5305: pel.suspense_org_account_id
5306: FROM hr_organization_units hou,
5307: per_assignments_f paf,
5308: psp_enc_lines pel,
5309: WHERE pel.enc_summary_line_id = p_enc_summary_line_id
5310: AND pel.assignment_id = paf.assignment_id
5311: AND pel.encumbrance_date BETWEEN paf.effective_start_date AND paf.effective_end_date
5312: AND pel.business_group_id = g_business_group_id

Line 5522: UPDATE psp_enc_lines

5518: END IF;
5519:
5520: IF l_trx_status_code = 'A' THEN
5521:
5522: UPDATE psp_enc_lines
5523: SET status_code = 'A'
5524: WHERE rowid = l_rowid;
5525:
5526: -- move the transferred records to psp_enc_lines_history

Line 5526: -- move the transferred records to psp_enc_lines_history

5522: UPDATE psp_enc_lines
5523: SET status_code = 'A'
5524: WHERE rowid = l_rowid;
5525:
5526: -- move the transferred records to psp_enc_lines_history
5527: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310
5528: --dbms_output.put_line('moving rec into enc lines hist');
5529: --insert_into_psp_stout( 'moving rec into enc lines hist');
5530: -- Introduced DFF columns for bug fix 2908859

Line 5531: INSERT INTO psp_enc_lines_history

5527: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310
5528: --dbms_output.put_line('moving rec into enc lines hist');
5529: --insert_into_psp_stout( 'moving rec into enc lines hist');
5530: -- Introduced DFF columns for bug fix 2908859
5531: INSERT INTO psp_enc_lines_history
5532: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,
5533: dr_cr_flag,encumbrance_amount,status_code,enc_line_type,schedule_line_id,org_schedule_id,
5534: default_org_account_id,suspense_org_account_id,element_account_id,gl_project_flag,
5535: enc_summary_line_id,person_id,assignment_id,award_id,task_id,expenditure_type,

Line 5552: FROM psp_enc_lines

5548: last_updated_by,last_update_login,created_by,creation_date,enc_start_date,enc_end_date,
5549: attribute_category, attribute1, attribute2, attribute3,
5550: attribute4, attribute5, attribute6, attribute7,
5551: attribute8, attribute9, attribute10
5552: FROM psp_enc_lines
5553: WHERE status_code = 'A'
5554: AND enc_summary_line_id = to_number(l_orig_trx_reference)
5555: AND enc_control_id = p_enc_control_id;
5556:

Line 5557: DELETE FROM psp_enc_lines

5553: WHERE status_code = 'A'
5554: AND enc_summary_line_id = to_number(l_orig_trx_reference)
5555: AND enc_control_id = p_enc_control_id;
5556:
5557: DELETE FROM psp_enc_lines
5558: WHERE status_code = 'A'
5559: AND enc_summary_line_id = to_number(l_orig_trx_reference)
5560: AND enc_control_id = p_enc_control_id;
5561:

Line 5595: UPDATE psp_enc_lines

5591: l_suspense_ac_failed := 'Y';
5592:
5593:
5594: / *Commented for Bug 3914807
5595: UPDATE psp_enc_lines
5596: SET suspense_reason_code = 'ES:' || l_trx_reject_code,
5597: status_code = 'N'
5598: WHERE rowid = l_rowid; * /
5599:

Line 5686: UPDATE psp_enc_lines

5682:
5683: END IF;
5684: / * For Bug fix 3194807 * /
5685:
5686: UPDATE psp_enc_lines
5687: SET prev_effective_date = encumbrance_date
5688: WHERE rowid = l_rowid;
5689: / * End of Bug fix 3198407 * /
5690:

Line 5691: UPDATE psp_enc_lines

5687: SET prev_effective_date = encumbrance_date
5688: WHERE rowid = l_rowid;
5689: / * End of Bug fix 3198407 * /
5690:
5691: UPDATE psp_enc_lines
5692: SET suspense_org_account_id = l_organization_account_id,
5693: suspense_reason_code = 'ES:' || l_trx_reject_code,
5694: gl_project_flag = l_gl_project_flag,
5695: -- encumbrance_date = l_encumbrance_date, Commented for Bug 3194807

Line 5737: UPDATE psp_enc_lines

5733:
5734:
5735: / * Added the following for Bug 3194807 * /
5736:
5737: UPDATE psp_enc_lines
5738: SET suspense_org_account_id = NULL,
5739: suspense_reason_code = NULL,
5740: gl_project_flag = decode(gl_code_combination_id,NULL,'P','G'),
5741: encumbrance_date = prev_effective_date

Line 5799: UPDATE psp_enc_lines

5795: -- credit is marked as -ve for posting to Oracle Projects
5796: l_cr_summary_amount := l_cr_summary_amount - l_summary_amount;
5797: END IF;
5798:
5799: UPDATE psp_enc_lines
5800: SET status_code = 'A'
5801: WHERE enc_summary_line_id = l_enc_summary_line_id
5802: AND enc_control_id = p_enc_control_id;
5803:

Line 5806: UPDATE psp_enc_lines

5802: AND enc_control_id = p_enc_control_id;
5803:
5804: / * Introduced this cursor for Bug fix 3194807 * /
5805:
5806: UPDATE psp_enc_lines
5807: SET (gl_code_combination_id,project_id,task_id,award_id,expenditure_organization_id,expenditure_type)
5808: = (select NULL,poa.project_id,poa.task_id,poa.award_id,poa.expenditure_organization_id,poa.expenditure_type
5809: from psp_organization_accounts poa
5810: where poa.organization_account_id = suspense_org_account_id

Line 5819: -- move the transferred records to psp_enc_lines_history

5815:
5816: / * End of code Changes for Bug fix 3194807 * /
5817:
5818:
5819: -- move the transferred records to psp_enc_lines_history
5820: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310
5821: -- Introduced DFF columns for bug fix 2908859
5822: INSERT INTO psp_enc_lines_history
5823: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,

Line 5822: INSERT INTO psp_enc_lines_history

5818:
5819: -- move the transferred records to psp_enc_lines_history
5820: -- Added enc_start_date ,enc_end_date columns for Enh. Enc Redesign Prorata,Bug #2259310
5821: -- Introduced DFF columns for bug fix 2908859
5822: INSERT INTO psp_enc_lines_history
5823: (enc_line_id,business_group_id,enc_element_type_id,encumbrance_date,
5824: dr_cr_flag,encumbrance_amount,status_code,enc_line_type,schedule_line_id,org_schedule_id,
5825: default_org_account_id,suspense_org_account_id,element_account_id,gl_project_flag,
5826: enc_summary_line_id,person_id,assignment_id,award_id,task_id,expenditure_type,

Line 5843: FROM psp_enc_lines

5839: last_updated_by,last_update_login,created_by,creation_date,enc_start_date,enc_end_date,
5840: attribute_category, attribute1, attribute2, attribute3,
5841: attribute4, attribute5, attribute6, attribute7,
5842: attribute8, attribute9, attribute10
5843: FROM psp_enc_lines
5844: WHERE status_code = 'A'
5845: AND enc_summary_line_id = l_enc_summary_line_id
5846: AND enc_control_id = p_enc_control_id;
5847:

Line 5848: DELETE FROM psp_enc_lines

5844: WHERE status_code = 'A'
5845: AND enc_summary_line_id = l_enc_summary_line_id
5846: AND enc_control_id = p_enc_control_id;
5847:
5848: DELETE FROM psp_enc_lines
5849: WHERE status_code = 'A'
5850: AND enc_summary_line_id = l_enc_summary_line_id
5851: AND enc_control_id = p_enc_control_id;
5852:

Line 5954: FROM psp_enc_lines pel,

5950: pel.expenditure_type,
5951: pel.suspense_org_account_id,
5952: pesl.interface_status,
5953: ptp.end_date
5954: FROM psp_enc_lines pel,
5955: psp_enc_summary_lines pesl,
5956: per_time_periods ptp
5957: WHERE pel.payroll_action_id = p_payroll_action_id
5958: AND pel.enc_summary_line_id = pesl.enc_summary_line_id

Line 5978: psp_enc_lines pel

5974: CURSOR get_org_id_cur(P_ROWID IN ROWID) IS
5975: SELECT hou.organization_id, hou.name
5976: FROM hr_all_organization_units hou,
5977: per_assignments_f paf,
5978: psp_enc_lines pel
5979: WHERE pel.rowid=p_rowid
5980: AND pel.assignment_id = paf.assignment_id
5981: AND pel.encumbrance_date BETWEEN paf.effective_start_date AND paf.effective_end_date
5982: AND paf.organization_id = hou.organization_id

Line 6241: INSERT INTO psp_enc_lines_history

6237:
6238: 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);
6239:
6240: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6241: INSERT INTO psp_enc_lines_history
6242: (enc_line_id, business_group_id, enc_element_type_id, encumbrance_date,
6243: dr_cr_flag, encumbrance_amount, status_code, enc_line_type,
6244: schedule_line_id, org_schedule_id, default_org_account_id, suspense_org_account_id,
6245: element_account_id, gl_project_flag, enc_summary_line_id, person_id,

Line 6272: FROM psp_enc_lines

6268: attribute7, attribute8, attribute9, attribute10,
6269: payroll_action_id, hierarchy_code, hierarchy_start_date, hierarchy_end_date,
6270: orig_gl_code_combination_id, orig_project_id, orig_task_id, orig_award_id,
6271: orig_expenditure_org_id, orig_expenditure_type
6272: FROM psp_enc_lines
6273: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6274: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history');
6275:
6276:

Line 6274: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history');

6270: orig_gl_code_combination_id, orig_project_id, orig_task_id, orig_award_id,
6271: orig_expenditure_org_id, orig_expenditure_type
6272: FROM psp_enc_lines
6273: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6274: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history');
6275:
6276:
6277: g_bulk_row_count :=0;
6278: FOR bulk_idx IN 1..r_success_recs.enc_summary_line_id.COUNT

Line 6284: DELETE FROM psp_enc_lines

6280: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
6281: end loop;
6282:
6283: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6284: DELETE FROM psp_enc_lines
6285: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6286: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted lines from psp_enc_lines that are summarized and trasnferred to target systems count: '||g_bulk_row_count);
6287:
6288: OPEN assign_susp_ac_cur;

Line 6286: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted lines from psp_enc_lines that are summarized and trasnferred to target systems count: '||g_bulk_row_count);

6282:
6283: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6284: DELETE FROM psp_enc_lines
6285: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6286: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted lines from psp_enc_lines that are summarized and trasnferred to target systems count: '||g_bulk_row_count);
6287:
6288: OPEN assign_susp_ac_cur;
6289: FETCH assign_susp_ac_cur BULK COLLECT INTO r_suspense_ac.row_id, r_suspense_ac.encumbrance_date,
6290: r_suspense_ac.enc_start_date, r_suspense_ac.enc_end_date, r_suspense_ac.person_id,

Line 6466: UPDATE psp_enc_lines

6462: END IF;
6463: END IF;
6464: END IF;
6465:
6466: UPDATE psp_enc_lines
6467: SET prev_effective_date = encumbrance_date,
6468: prev_enc_end_date = enc_end_date,
6469: prev_encumbrance_amount = encumbrance_amount,
6470: orig_gl_code_combination_id = gl_code_combination_id,

Line 6478: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines4 count'||sql%rowcount);

6474: orig_expenditure_org_id = expenditure_organization_id,
6475: orig_expenditure_type = expenditure_type
6476: WHERE rowid = r_suspense_ac.row_id(recno);
6477:
6478: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines4 count'||sql%rowcount);
6479:
6480: UPDATE psp_enc_lines
6481: SET suspense_org_account_id = l_organization_account_id,
6482: gl_code_combination_id = l_susp_glccid,

Line 6480: UPDATE psp_enc_lines

6476: WHERE rowid = r_suspense_ac.row_id(recno);
6477:
6478: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines4 count'||sql%rowcount);
6479:
6480: UPDATE psp_enc_lines
6481: SET suspense_org_account_id = l_organization_account_id,
6482: gl_code_combination_id = l_susp_glccid,
6483: project_id = l_project_id,
6484: task_id = l_task_id,

Line 6496: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines5 count'||sql%rowcount);

6492: encumbrance_amount = (encumbrance_amount * (psp_general.business_days(enc_start_date, LEAST(enc_end_date, g_def_end_date)) / psp_general.business_days(enc_start_date, enc_end_date))),
6493: status_code = 'N'
6494: WHERE rowid = r_suspense_ac.row_id(recno);
6495:
6496: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'updated psp_enc_lines5 count'||sql%rowcount);
6497: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || 'add_st_warnings');
6498: add_st_warnings(p_assignment_id => r_suspense_ac.assignment_id(recno),
6499: p_payroll_id => r_suspense_ac.payroll_id(recno),
6500: p_element_type_id => r_suspense_ac.element_type_id(recno),

Line 6517: UPDATE psp_enc_lines

6513: END IF;
6514: END LOOP;
6515:
6516: IF l_suspense_ac_failed = 'Y' THEN
6517: UPDATE psp_enc_lines
6518: SET suspense_org_account_id = NULL,
6519: gl_code_combination_id = orig_gl_code_combination_id,
6520: project_id = orig_project_id,
6521: task_id = orig_task_id,

Line 6535: UPDATE psp_enc_lines

6531: FROM psp_enc_summary_lines pesl
6532: WHERE pesl.payroll_action_id = p_payroll_action_id
6533: AND pesl.gms_batch_name = p_gms_batch_name
6534: AND status_code = 'R');
6535: UPDATE psp_enc_lines
6536: SET orig_gl_code_combination_id = NULL,
6537: orig_project_id = NULL,
6538: orig_task_id = NULL,
6539: orig_award_id = NULL,

Line 6606: INSERT INTO psp_enc_lines_history

6602:
6603:
6604:
6605: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6606: INSERT INTO psp_enc_lines_history
6607: (enc_line_id, business_group_id, enc_element_type_id, encumbrance_date,
6608: dr_cr_flag, encumbrance_amount, status_code, enc_line_type,
6609: schedule_line_id, org_schedule_id, default_org_account_id, suspense_org_account_id,
6610: element_account_id, gl_project_flag, enc_summary_line_id, person_id,

Line 6633: FROM psp_enc_lines

6629: enc_end_date, attribute_category, attribute1, attribute2,
6630: attribute3, attribute4, attribute5, attribute6,
6631: attribute7, attribute8, attribute9, attribute10,
6632: payroll_action_id, hierarchy_code, hierarchy_start_date, hierarchy_end_date
6633: FROM psp_enc_lines
6634: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6635:
6636: g_bulk_row_count :=0;
6637: FOR bulk_idx IN 1..r_success_recs.enc_summary_line_id.COUNT

Line 6642: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history count: '||g_bulk_row_count);

6638: loop
6639: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
6640: end loop;
6641:
6642: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history count: '||g_bulk_row_count);
6643:
6644: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6645: DELETE FROM psp_enc_lines
6646: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);

Line 6645: DELETE FROM psp_enc_lines

6641:
6642: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Copied successfully summarized and transferred lines into psp_enc_lines_history count: '||g_bulk_row_count);
6643:
6644: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6645: DELETE FROM psp_enc_lines
6646: WHERE enc_summary_line_id = r_success_recs.enc_summary_line_id(recno);
6647:
6648: g_bulk_row_count :=0;
6649: FOR bulk_idx IN 1..r_success_recs.enc_summary_line_id.COUNT

Line 6653: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted lines from psp_enc_lines that are summarized and trasnferred to target systems'||g_bulk_row_count);

6649: FOR bulk_idx IN 1..r_success_recs.enc_summary_line_id.COUNT
6650: loop
6651: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
6652: end loop;
6653: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted lines from psp_enc_lines that are summarized and trasnferred to target systems'||g_bulk_row_count);
6654:
6655: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6656: UPDATE psp_enc_controls pec
6657: SET gms_phase = 'TieBack',

Line 6747: FROM PSP_ENC_LINES pel,

6743: DECODE(g_dff_grouping_option, 'Y', pel.attribute8, NULL) attribute8,
6744: DECODE(g_dff_grouping_option, 'Y', pel.attribute9, NULL) attribute9,
6745: DECODE(g_dff_grouping_option, 'Y', pel.attribute10, NULL) attribute10,
6746: pa.org_id
6747: FROM PSP_ENC_LINES pel,
6748: pa_projects_all pa
6749: WHERE pel.ENCUMBRANCE_AMOUNT <> 0
6750: AND pel.payroll_action_id = p_payroll_action_id
6751: AND (g_suspense_failed = 'TRUE' OR pel.suspense_reason_code LIKE 'ES:%')

Line 6874: UPDATE psp_enc_lines pel

6870: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' No of Summary lines created (t_sum_lines.enc_control_id.COUNT): ' || t_sum_lines.enc_control_id.COUNT);
6871:
6872: IF (g_dff_grouping_option = 'Y') THEN
6873: FORALL recno IN 1..t_sum_lines.enc_summary_line_id.COUNT
6874: UPDATE psp_enc_lines pel
6875: SET enc_summary_line_id = t_sum_lines.enc_summary_line_id(recno)
6876: WHERE payroll_action_id = p_payroll_action_id
6877: AND pel.enc_control_id = t_sum_lines.enc_control_id(recno)
6878: AND pel.time_period_id = t_sum_lines.time_period_id(recno)

Line 6902: UPDATE psp_enc_lines pel

6898: AND NVL(pel.attribute9, 'NULL') = NVL(t_sum_lines.attribute9(recno), 'NULL')
6899: AND NVL(pel.attribute10, 'NULL') = NVL(t_sum_lines.attribute10(recno), 'NULL');
6900: ELSE
6901: FORALL recno IN 1..t_sum_lines.enc_summary_line_id.COUNT
6902: UPDATE psp_enc_lines pel
6903: SET enc_summary_line_id = t_sum_lines.enc_summary_line_id(recno)
6904: WHERE payroll_action_id = p_payroll_action_id
6905: AND pel.enc_control_id = t_sum_lines.enc_control_id(recno)
6906: AND pel.time_period_id = t_sum_lines.time_period_id(recno)

Line 6941: FROM psp_enc_lines_history pelh

6937: NVL(expenditure_organization_id, -99),
6938: NVL(expenditure_type, '-99'),
6939: enc_start_date,
6940: enc_end_date
6941: FROM psp_enc_lines_history pelh
6942: WHERE change_flag = 'N'
6943: AND assignment_id = p_assignment_id
6944: AND payroll_id = p_payroll_id
6945: ORDER BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;

Line 6954: UPDATE psp_enc_lines_history pelh

6950: l_nlines_counter := 0;
6951:
6952: FOR asg_no IN 1..l_asgs.payroll_id.COUNT
6953: LOOP
6954: UPDATE psp_enc_lines_history pelh
6955: SET change_flag = 'N'
6956: WHERE EXISTS (SELECT 1
6957: FROM psp_enc_summary_lines pesl
6958: WHERE pesl.enc_summary_line_id = pelh.enc_summary_line_id

Line 6963: UPDATE psp_enc_lines_history pelh

6959: AND status_code = 'A')
6960: AND assignment_id = l_asgs.assignment_id(asg_no)
6961: AND payroll_id = l_asgs.payroll_id(asg_no);
6962:
6963: UPDATE psp_enc_lines_history pelh
6964: SET hierarchy_code = 'SA'
6965: WHERE change_flag = 'N'
6966: AND hierarchy_code <> 'SA'
6967: AND suspense_org_account_id IS NOT NULL

Line 7051: UPDATE psp_enc_lines_history

7047: END IF;
7048: END LOOP;
7049:
7050: FORALL recno IN 1..t_enc_nlines.element_type_id.COUNT
7051: UPDATE psp_enc_lines_history
7052: SET hierarchy_start_date = t_enc_nlines.enc_start_date(recno),
7053: hierarchy_end_date = t_enc_nlines.enc_end_date(recno)
7054: WHERE assignment_id = t_enc_nlines.assignment_id(recno)
7055: AND payroll_id = t_enc_nlines.payroll_id(recno)