DBA Data[Home] [Help]

APPS.PSP_SUM_TRANS dependencies on PSP_PRE_GEN_DIST_LINES

Line 587: DELETE FROM psp_pre_gen_dist_lines

583: END IF;
584: ELSIF payroll_control_rec.source_type = 'P' THEN
585:
586: -- delete the zero amount reversal lines
587: DELETE FROM psp_pre_gen_dist_lines
588: WHERE distribution_amount = 0
589: AND reversal_entry_flag = 'Y'
590: AND payroll_control_id = payroll_control_rec.payroll_control_id;
591:

Line 594: FROM psp_pre_gen_dist_lines ppgd

590: AND payroll_control_id = payroll_control_rec.payroll_control_id;
591:
592: SELECT count(*)
593: INTO l_line_counter
594: FROM psp_pre_gen_dist_lines ppgd
595: WHERE ppgd.payroll_control_id = payroll_control_rec.payroll_control_id;
596:
597: IF l_line_counter = 0 THEN
598: /* commented for 2445196

Line 736: FROM psp_pre_gen_dist_lines ppg,

732: DECODE(g_dff_grouping_option, 'Y', DECODE(ppg.suspense_org_account_id, NULL, ppg.attribute8, pos.attribute8), NULL) attribute8,
733: DECODE(g_dff_grouping_option, 'Y', DECODE(ppg.suspense_org_account_id, NULL, ppg.attribute9, pos.attribute9), NULL) attribute9,
734: DECODE(g_dff_grouping_option, 'Y', DECODE(ppg.suspense_org_account_id, NULL, ppg.attribute10, pos.attribute10), NULL) attribute10
735: ---decode(ppg.suspense_org_Account_id, NULL, 'N', 'Y') Suspense_Flag commented for 2663344
736: FROM psp_pre_gen_dist_lines ppg,
737: psp_organization_accounts pos,
738: psp_payroll_controls ppc
739: WHERE ppg.status_code = 'N'
740: /* changed following condition for bug 2007521 */

Line 998: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' updating psp_pre_gen_dist_lines setting summary_line_id : '||l_summary_line_id);

994: UPDATE psp_distribution_lines
995: SET summary_line_id = l_summary_line_id WHERE distribution_line_id = l_dist_line_id;
996: ELSIF gl_sum_lines_rec.tab_flag = 'P' THEN
997:
998: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' updating psp_pre_gen_dist_lines setting summary_line_id : '||l_summary_line_id);
999:
1000: UPDATE psp_pre_gen_dist_lines
1001: SET summary_line_id = l_summary_line_id WHERE pre_gen_dist_line_id = l_dist_line_id;
1002: END IF;

Line 1000: UPDATE psp_pre_gen_dist_lines

996: ELSIF gl_sum_lines_rec.tab_flag = 'P' THEN
997:
998: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' updating psp_pre_gen_dist_lines setting summary_line_id : '||l_summary_line_id);
999:
1000: UPDATE psp_pre_gen_dist_lines
1001: SET summary_line_id = l_summary_line_id WHERE pre_gen_dist_line_id = l_dist_line_id;
1002: END IF;
1003: END LOOP;
1004:

Line 1101: UPDATE psp_pre_gen_dist_lines

1097: ELSIF gl_sum_lines_rec.tab_flag = 'P' THEN
1098:
1099: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' updating psp_distribution_lines status_code to N and summary_line_id to '||l_summary_line_id||' for dist_line_id: '||l_dist_line_id);
1100:
1101: UPDATE psp_pre_gen_dist_lines
1102: SET summary_line_id = l_summary_line_id,
1103: status_code = 'N'
1104: WHERE pre_gen_dist_line_id = l_dist_line_id;
1105: END IF;

Line 1847: FROM psp_pre_gen_dist_lines ppgd

1843: ppgd.distribution_date,
1844: ppgd.suspense_org_account_id,
1845: ppgd.reversal_entry_flag,
1846: ppgd.effective_date -- Bug 7040943 Added
1847: FROM psp_pre_gen_dist_lines ppgd
1848: WHERE ppgd.summary_line_id = p_summary_line_id;
1849:
1850: -- Get the Organization details ...
1851:

Line 1879: psp_pre_gen_dist_lines ppgd

1875: UNION
1876: SELECT hou.organization_id, hou.name
1877: FROM hr_all_organization_units hou,
1878: per_assignments_f paf,
1879: psp_pre_gen_dist_lines ppgd
1880: WHERE ppgd.pre_gen_dist_line_id = p_line_id
1881: AND ppgd.assignment_id = paf.assignment_id
1882: AND ppgd.distribution_date BETWEEN paf.effective_start_date AND paf.effective_end_date
1883: AND paf.organization_id = hou.organization_id;

Line 2002: from psp_pre_gen_dist_lines ppg

1998: union all
1999: select ppg.element_type_id,
2000: ppg.assignment_id,
2001: ppg.person_id
2002: from psp_pre_gen_dist_lines ppg
2003: where pre_gen_dist_line_id = x_line_id;
2004:
2005: cursor get_asg_details is
2006: select ppf.full_name,

Line 2358: UPDATE psp_pre_gen_dist_lines

2354: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' 1 updated psp_distribution_lines count: '||sql%rowcount);
2355: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_effective_date: '||l_effective_date);
2356:
2357: ELSIF p_source_type = 'P' THEN
2358: UPDATE psp_pre_gen_dist_lines
2359: SET suspense_org_account_id = l_organization_account_id,
2360: suspense_reason_code = 'ST:' || l_status,
2361: status_code = 'N',
2362: effective_date = l_effective_date, --- for Bug 2663344

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

2362: effective_date = l_effective_date, --- for Bug 2663344
2363: suspense_auto_glccid = l_new_glccid, --- added suspense_auto for 5080403
2364: suspense_auto_exp_type = l_new_expenditure_type
2365: WHERE rowid = l_rowid;
2366: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' 1 updated psp_pre_gen_dist_lines count: '||sql%rowcount);
2367: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_effective_date: '||l_effective_date);
2368:
2369: END IF;
2370: ELSE -- introduced for 2479579

Line 2420: UPDATE psp_pre_gen_dist_lines

2416: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_effective_date: '||l_effective_date);
2417:
2418: ELSIF p_source_type = 'P' THEN
2419:
2420: UPDATE psp_pre_gen_dist_lines
2421: SET suspense_org_account_id = NULL,
2422: suspense_reason_code = NULL,
2423: effective_date = decode(NVL(gl_code_combination_id,-999),gl_code_combination_id,
2424: p_period_end_date,distribution_date)

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

2426: AND summary_line_id
2427: IN (SELECT summary_line_id
2428: FROM psp_summary_lines
2429: WHERE payroll_control_id = p_payroll_control_id);
2430: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' 2 updated psp_pre_gen_dist_lines count: '||sql%rowcount);
2431: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_effective_date: '||l_effective_date);
2432:
2433: END IF;
2434:

Line 2488: UPDATE psp_pre_gen_dist_lines

2484: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' 3 updated psp_distribution_lines count: '||sql%rowcount);
2485: --fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_effective_date: '||l_effective_date);
2486:
2487: ELSIF p_source_type = 'P' THEN
2488: UPDATE psp_pre_gen_dist_lines
2489: SET suspense_org_account_id = NULL,
2490: suspense_reason_code = NULL,
2491: effective_date = decode(NVL(gl_code_combination_id,-999),gl_code_combination_id,
2492: p_period_end_date,distribution_date)

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

2495: IN ( SELECT summary_line_id
2496: FROM psp_summary_lines
2497: WHERE payroll_control_id = p_payroll_control_id );
2498:
2499: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' 3 updated psp_pre_gen_dist_lines count: '||sql%rowcount);
2500: --fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_effective_date: '||l_effective_date);
2501:
2502: END IF;
2503:

Line 2632: UPDATE psp_pre_gen_dist_lines

2628: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' deleted from psp_distribution_lines count: '||sql%rowcount);
2629:
2630: ELSIF p_source_type = 'P' THEN
2631:
2632: UPDATE psp_pre_gen_dist_lines
2633: SET status_code = 'A' WHERE summary_line_id = l_summary_line_id;
2634: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' 4 updated psp_pre_gen_distribution_lines set status_code = A count: '||sql%rowcount);
2635:
2636:

Line 2637: -- move the transferred records to psp_pre_gen_dist_lines_history

2633: SET status_code = 'A' WHERE summary_line_id = l_summary_line_id;
2634: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' 4 updated psp_pre_gen_distribution_lines set status_code = A count: '||sql%rowcount);
2635:
2636:
2637: -- move the transferred records to psp_pre_gen_dist_lines_history
2638: -- Introduced DFF columns for bug fix 2908859
2639: INSERT INTO psp_pre_gen_dist_lines_history
2640: (pre_gen_dist_line_id,distribution_interface_id,person_id,assignment_id,
2641: element_type_id,distribution_date,effective_date,distribution_amount,

Line 2639: INSERT INTO psp_pre_gen_dist_lines_history

2635:
2636:
2637: -- move the transferred records to psp_pre_gen_dist_lines_history
2638: -- Introduced DFF columns for bug fix 2908859
2639: INSERT INTO psp_pre_gen_dist_lines_history
2640: (pre_gen_dist_line_id,distribution_interface_id,person_id,assignment_id,
2641: element_type_id,distribution_date,effective_date,distribution_amount,
2642: dr_cr_flag,payroll_control_id,source_type,source_code,time_period_id,
2643: batch_name,status_code,set_of_books_id,

Line 2664: FROM psp_pre_gen_dist_lines

2660: attribute_category, attribute1, attribute2, attribute3,
2661: attribute4, attribute5, attribute6, attribute7,
2662: attribute8, attribute9, attribute10,
2663: suspense_auto_exp_type, suspense_auto_glccid
2664: FROM psp_pre_gen_dist_lines
2665: WHERE status_code = 'A'
2666: AND summary_line_id = l_summary_line_id;
2667:
2668: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' inserted into psp_pre_gen_dist_lines_history count: '||sql%rowcount);

Line 2668: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' inserted into psp_pre_gen_dist_lines_history count: '||sql%rowcount);

2664: FROM psp_pre_gen_dist_lines
2665: WHERE status_code = 'A'
2666: AND summary_line_id = l_summary_line_id;
2667:
2668: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' inserted into psp_pre_gen_dist_lines_history count: '||sql%rowcount);
2669:
2670: DELETE FROM psp_pre_gen_dist_lines
2671: WHERE status_code = 'A'
2672: AND summary_line_id = l_summary_line_id;

Line 2670: DELETE FROM psp_pre_gen_dist_lines

2666: AND summary_line_id = l_summary_line_id;
2667:
2668: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' inserted into psp_pre_gen_dist_lines_history count: '||sql%rowcount);
2669:
2670: DELETE FROM psp_pre_gen_dist_lines
2671: WHERE status_code = 'A'
2672: AND summary_line_id = l_summary_line_id;
2673: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' deleted from psp_pre_gen_dist_lines count: '||sql%rowcount);
2674:

Line 2673: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' deleted from psp_pre_gen_dist_lines count: '||sql%rowcount);

2669:
2670: DELETE FROM psp_pre_gen_dist_lines
2671: WHERE status_code = 'A'
2672: AND summary_line_id = l_summary_line_id;
2673: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' deleted from psp_pre_gen_dist_lines count: '||sql%rowcount);
2674:
2675: END IF;
2676:
2677: END LOOP;

Line 2773: FROM psp_pre_gen_dist_lines ppgd,

2769: ppgd.batch_name,
2770: ppgd.set_of_books_id,
2771: ppgd.business_group_id,
2772: round(sum(ppgd.distribution_amount), p_precision) reversal_dist_amount -- For Bug 2916848 changed to p_precision
2773: FROM psp_pre_gen_dist_lines ppgd,
2774: psp_organization_accounts pos
2775: WHERE ppgd.payroll_control_id = p_payroll_control_id
2776: AND nvl(ppgd.reversal_entry_flag,'N') = 'N'
2777: AND ((ppgd.gl_code_combination_id IS NOT NULL and pos.project_id is null ) OR -- Bug 2007521 Changed condn

Line 2873: delete from psp_pre_gen_dist_lines

2869: fnd_msg_pub.add;
2870: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2871: END;
2872:
2873: delete from psp_pre_gen_dist_lines
2874: where reversal_entry_flag = 'Y'
2875: and status_code = 'N'
2876: and source_type = 'P'
2877: and payroll_control_id = p_payroll_control_id;

Line 2889: -- UPDATE psp_pre_gen_dist_lines

2885: EXIT;
2886: END IF;
2887:
2888: -- Bug# 1140217
2889: -- UPDATE psp_pre_gen_dist_lines
2890: -- SET distribution_amount = pg_reversal_entry_rec.reversal_dist_amount
2891: -- WHERE distribution_interface_id = pg_reversal_entry_rec.distribution_interface_id
2892: -- AND reversal_entry_flag = 'Y';
2893:

Line 2895: insert into psp_pre_gen_dist_lines

2891: -- WHERE distribution_interface_id = pg_reversal_entry_rec.distribution_interface_id
2892: -- AND reversal_entry_flag = 'Y';
2893:
2894:
2895: insert into psp_pre_gen_dist_lines
2896: (pre_gen_dist_line_id, distribution_interface_id, person_id, assignment_id,
2897: element_type_id, distribution_date, effective_date, distribution_amount,
2898: dr_cr_flag, payroll_control_id, source_type, source_code, time_period_id,
2899: batch_name, status_code, set_of_books_id, business_group_id, gl_code_combination_id,

Line 2915: from psp_pre_gen_dist_lines ppgd, psp_organization_accounts pos

2911:
2912: select sum(decode(reversal_entry_flag, 'Y', distribution_amount, 0)),
2913: sum(decode(reversal_entry_flag, 'Y', 0, distribution_amount))
2914: into l_cr_amount, l_dr_amount
2915: from psp_pre_gen_dist_lines ppgd, psp_organization_accounts pos
2916: where payroll_control_id = p_payroll_control_id
2917: and ppgd.status_code = 'N'
2918: and ppgd.suspense_org_account_id = pos.organization_account_id(+)
2919: AND ((ppgd.gl_code_combination_id IS NOT NULL and ppgd.suspense_org_account_id is null ) OR

Line 3254: FROM psp_pre_gen_dist_lines ppg,

3250: DECODE(g_dff_grouping_option, 'Y', DECODE(ppg.suspense_org_account_id, NULL, ppg.attribute8, pos.attribute8), NULL) attribute8,
3251: DECODE(g_dff_grouping_option, 'Y', DECODE(ppg.suspense_org_account_id, NULL, ppg.attribute9, pos.attribute9), NULL) attribute9,
3252: DECODE(g_dff_grouping_option, 'Y', DECODE(ppg.suspense_org_account_id, NULL, ppg.attribute10, pos.attribute10), NULL) attribute10
3253: ---decode(ppg.suspense_org_Account_id, NULL, 'N', 'Y') Suspense_Flag commented for 2663344
3254: FROM psp_pre_gen_dist_lines ppg,
3255: psp_organization_accounts pos,
3256: psp_payroll_controls ppc
3257: WHERE ppg.status_code = 'N'
3258: /* changed following condn. First Pass can have suspense: Bug 2007521 */

Line 3524: UPDATE psp_pre_gen_dist_lines

3520: IF gms_sum_lines_rec.tab_flag = 'D' THEN
3521: UPDATE psp_distribution_lines
3522: SET summary_line_id = l_summary_line_id WHERE distribution_line_id = l_dist_line_id;
3523: ELSIF gms_sum_lines_rec.tab_flag = 'P' THEN
3524: UPDATE psp_pre_gen_dist_lines
3525: SET summary_line_id = l_summary_line_id WHERE pre_gen_dist_line_id = l_dist_line_id;
3526: END IF;
3527: END LOOP;
3528:

Line 3627: UPDATE psp_pre_gen_dist_lines

3623: SET summary_line_id = l_summary_line_id,
3624: status_code = 'N'
3625: WHERE distribution_line_id = l_dist_line_id;
3626: ELSIF gms_sum_lines_rec.tab_flag = 'P' THEN
3627: UPDATE psp_pre_gen_dist_lines
3628: SET summary_line_id = l_summary_line_id,
3629: status_code = 'N'
3630: WHERE pre_gen_dist_line_id = l_dist_line_id;
3631: END IF;

Line 4343: FROM psp_pre_gen_dist_lines ppgd

4339: SELECT ppgd.rowid,
4340: ppgd.pre_gen_dist_line_id line_id,
4341: ppgd.distribution_date,
4342: ppgd.suspense_org_account_id
4343: FROM psp_pre_gen_dist_lines ppgd
4344: WHERE ppgd.summary_line_id = p_summary_line_id;
4345:
4346: CURSOR get_susp_org_cur1 (P_ORG_ID IN VARCHAR2) IS
4347: SELECT hou.organization_id, hou.name

Line 4371: psp_pre_gen_dist_lines ppgdl

4367: UNION
4368: SELECT hou.organization_id, hou.name
4369: FROM hr_all_organization_units hou,
4370: per_assignments_f paf,
4371: psp_pre_gen_dist_lines ppgdl
4372: WHERE paf.assignment_id = ppgdl.assignment_id
4373: AND hou.organization_id = paf.organization_id
4374: AND ppgdl.pre_gen_dist_line_id = p_line_id
4375: AND ppgdl.distribution_date between paf.effective_start_date and paf.effective_end_date;

Line 4496: from psp_pre_gen_dist_lines ppg

4492: union all
4493: select ppg.element_type_id,
4494: ppg.assignment_id,
4495: ppg.person_id
4496: from psp_pre_gen_dist_lines ppg
4497: where pre_gen_dist_line_id = x_line_id;
4498:
4499: cursor get_asg_details is
4500: select ppf.full_name,

Line 4816: UPDATE psp_pre_gen_dist_lines

4812:
4813: --moved the two del stmnts above for 2445196
4814:
4815: ELSIF p_source_type = 'P' THEN
4816: UPDATE psp_pre_gen_dist_lines
4817: SET status_code = 'A'
4818: WHERE rowid = l_rowid;
4819:
4820: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Payroll type P');

Line 4822: -- move the transferred records to psp_pre_gen_dist_lines_history

4818: WHERE rowid = l_rowid;
4819:
4820: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Payroll type P');
4821:
4822: -- move the transferred records to psp_pre_gen_dist_lines_history
4823: INSERT INTO psp_pre_gen_dist_lines_history
4824: (pre_gen_dist_line_id,distribution_interface_id,person_id,assignment_id,
4825: element_type_id,distribution_date,effective_date,distribution_amount,
4826: dr_cr_flag,payroll_control_id,source_type,source_code,time_period_id,

Line 4823: INSERT INTO psp_pre_gen_dist_lines_history

4819:
4820: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Payroll type P');
4821:
4822: -- move the transferred records to psp_pre_gen_dist_lines_history
4823: INSERT INTO psp_pre_gen_dist_lines_history
4824: (pre_gen_dist_line_id,distribution_interface_id,person_id,assignment_id,
4825: element_type_id,distribution_date,effective_date,distribution_amount,
4826: dr_cr_flag,payroll_control_id,source_type,source_code,time_period_id,
4827: batch_name,status_code,set_of_books_id,

Line 4848: FROM psp_pre_gen_dist_lines

4844: attribute_category, attribute1, attribute2, attribute3,
4845: attribute4, attribute5, attribute6, attribute7,
4846: attribute8, attribute9, attribute10,
4847: suspense_auto_exp_type, suspense_auto_glccid
4848: FROM psp_pre_gen_dist_lines
4849: WHERE status_code = 'A'
4850: AND summary_line_id = to_number(l_orig_trx_reference);
4851:
4852: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Inserting into psp_pre_gen_distribution_lines_history for summary_line_id: '||l_orig_trx_reference

Line 4857: DELETE FROM psp_pre_gen_dist_lines

4853: ||'number of rows SQL%ROWCOUNT: '||SQL%ROWCOUNT);
4854: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' after insert into pregen lines');
4855:
4856: hr_utility.trace('after insert into pregen lines');
4857: DELETE FROM psp_pre_gen_dist_lines
4858: WHERE status_code = 'A'
4859: AND summary_line_id = to_number(l_orig_trx_reference);
4860: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleting from psp_pre_gen_distribution_lines for summary_line_id: '||l_orig_trx_reference
4861: ||'number of rows SQL%ROWCOUNT: '||SQL%ROWCOUNT);

Line 4892: UPDATE psp_pre_gen_dist_lines

4888: SET suspense_reason_code = l_trx_reject_code,
4889: status_code = 'N'
4890: WHERE rowid = l_rowid;
4891: ELSIF p_source_type = 'P' THEN
4892: UPDATE psp_pre_gen_dist_lines
4893: SET suspense_reason_code = l_trx_reject_code,
4894: status_code = 'N'
4895: WHERE rowid = l_rowid;
4896: END IF; Enf of commenting for BUg 3065866 */

Line 5090: UPDATE psp_pre_gen_dist_lines

5086: WHERE rowid = l_rowid;
5087: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' updated psp_distribution_lines set pre_distribution_run_flag count: '||sql%rowcount);
5088:
5089: ELSIF p_source_type = 'P' THEN
5090: UPDATE psp_pre_gen_dist_lines
5091: SET suspense_org_account_id = l_organization_account_id,
5092: suspense_reason_code = 'ST:' || l_trx_reject_code,
5093: status_code = 'N',
5094: -- effective_date = l_effective_date, ---uncommented this line for Bug 2663344 -- Commented for Bug 10181561

Line 5098: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Update psp_pre_gen_dist_lines for rowid: '||l_rowid||' with l_effective_date'||l_effective_date||' count: '||sql%rowcount);

5094: -- effective_date = l_effective_date, ---uncommented this line for Bug 2663344 -- Commented for Bug 10181561
5095: suspense_auto_glccid = l_new_glccid,
5096: suspense_auto_exp_type = l_new_expenditure_type
5097: WHERE rowid = l_rowid;
5098: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Update psp_pre_gen_dist_lines for rowid: '||l_rowid||' with l_effective_date'||l_effective_date||' count: '||sql%rowcount);
5099:
5100: END IF;
5101: else -- added for 2479579
5102: l_susp_exception := l_susp_ac_found;

Line 5165: UPDATE psp_pre_gen_dist_lines

5161:
5162: ELSIF p_source_type = 'P' THEN
5163: -- fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' updating psp_pre_gen_distribution_lines for p_payroll_control_id: '||p_payroll_control_id);
5164:
5165: UPDATE psp_pre_gen_dist_lines
5166: SET suspense_org_account_id = NULL,
5167: suspense_reason_code = NULL,
5168: effective_date = decode(NVL(gl_code_combination_id,-999),gl_code_combination_id,
5169: p_period_end_date,distribution_date)

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

5171: AND summary_line_id
5172: IN (SELECT summary_line_id
5173: FROM psp_summary_lines
5174: WHERE payroll_control_id = p_payroll_control_id);
5175: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' updated psp_pre_gen_dist_lines count: '||sql%rowcount);
5176:
5177:
5178: END IF;
5179: /* End of code for Bug 3065866 */

Line 5225: UPDATE psp_pre_gen_dist_lines

5221: ELSIF p_source_type = 'P' THEN
5222:
5223: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' p_source_type P');
5224:
5225: UPDATE psp_pre_gen_dist_lines
5226: SET suspense_org_account_id = NULL,
5227: suspense_reason_code = NULL
5228: WHERE suspense_reason_code like 'ST:%'
5229: AND summary_line_id

Line 5383: UPDATE psp_pre_gen_dist_lines

5379: ELSIF p_source_type = 'P' THEN
5380:
5381: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Payroll type P');
5382:
5383: UPDATE psp_pre_gen_dist_lines
5384: SET status_code = 'A' WHERE summary_line_id = l_summary_line_id;
5385:
5386: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Update psp_pre_gen_distribution_lines for summary_line_id'||l_summary_line_id);
5387:

Line 5388: -- move the transferred records to psp_pre_gen_dist_lines_history

5384: SET status_code = 'A' WHERE summary_line_id = l_summary_line_id;
5385:
5386: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Update psp_pre_gen_distribution_lines for summary_line_id'||l_summary_line_id);
5387:
5388: -- move the transferred records to psp_pre_gen_dist_lines_history
5389: INSERT INTO psp_pre_gen_dist_lines_history
5390: (pre_gen_dist_line_id,distribution_interface_id,person_id,assignment_id,
5391: element_type_id,distribution_date,effective_date,distribution_amount,
5392: dr_cr_flag,payroll_control_id,source_type,source_code,time_period_id,

Line 5389: INSERT INTO psp_pre_gen_dist_lines_history

5385:
5386: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Update psp_pre_gen_distribution_lines for summary_line_id'||l_summary_line_id);
5387:
5388: -- move the transferred records to psp_pre_gen_dist_lines_history
5389: INSERT INTO psp_pre_gen_dist_lines_history
5390: (pre_gen_dist_line_id,distribution_interface_id,person_id,assignment_id,
5391: element_type_id,distribution_date,effective_date,distribution_amount,
5392: dr_cr_flag,payroll_control_id,source_type,source_code,time_period_id,
5393: batch_name,status_code,set_of_books_id,

Line 5414: FROM psp_pre_gen_dist_lines

5410: attribute_category, attribute1, attribute2, attribute3,
5411: attribute4, attribute5, attribute6, attribute7,
5412: attribute8, attribute9, attribute10,
5413: suspense_auto_exp_type, suspense_auto_glccid
5414: FROM psp_pre_gen_dist_lines
5415: WHERE status_code = 'A'
5416: AND summary_line_id = l_summary_line_id;
5417:
5418: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Inserting into psp_pre_gen_distribution_lines_history for summary_line_id: '||l_orig_trx_reference

Line 5421: DELETE FROM psp_pre_gen_dist_lines

5417:
5418: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Inserting into psp_pre_gen_distribution_lines_history for summary_line_id: '||l_orig_trx_reference
5419: ||'number of rows SQL%ROWCOUNT: '||SQL%ROWCOUNT);
5420:
5421: DELETE FROM psp_pre_gen_dist_lines
5422: WHERE status_code = 'A'
5423: AND summary_line_id = l_summary_line_id;
5424: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleting from psp_distribution_lines for summary_line_id: '||l_orig_trx_reference
5425: ||'number of rows SQL%ROWCOUNT: '||SQL%ROWCOUNT);

Line 5740: From psp_pre_gen_dist_lines_history pregen,

5736: cursor pregen_er_supercede is
5737: Select per.effort_report_id,
5738: per.person_id,
5739: min(pregen.summary_line_id)
5740: From psp_pre_gen_dist_lines_history pregen,
5741: Psp_eff_reports per,
5742: Psp_payroll_controls ppc
5743: Where pregen.distribution_date between per.start_date and per.end_date
5744: And per.request_id in (select -person_id from psp_supercede_persons_gt where person_id < 0)

Line 5858: From psp_pre_gen_dist_lines_history pregen,

5854: UNION ALL
5855: Select per.effort_report_id,
5856: per.person_id,
5857: pregen.summary_line_id summary_line_id
5858: From psp_pre_gen_dist_lines_history pregen,
5859: Psp_eff_reports per,
5860: Psp_payroll_controls ppc
5861: Where pregen.distribution_date between per.start_date and per.end_date
5862: And per.request_id in ( select -person_id from psp_supercede_persons_gt )

Line 5930: From psp_pre_gen_dist_lines_history pregen,

5926: cursor pregen_asg_er_supercede is
5927: Select per.effort_report_id,
5928: per.person_id,
5929: min(pregen.summary_line_id)
5930: From psp_pre_gen_dist_lines_history pregen,
5931: Psp_eff_reports per,
5932: Psp_payroll_controls ppc,
5933: psp_eff_report_details perd
5934: Where pregen.distribution_date between per.start_date and per.end_date

Line 6058: From psp_pre_gen_dist_lines_history pregen,

6054: UNION ALL
6055: Select per.effort_report_id,
6056: per.person_id,
6057: pregen.summary_line_id summary_line_id
6058: From psp_pre_gen_dist_lines_history pregen,
6059: Psp_eff_reports per,
6060: Psp_payroll_controls ppc,
6061: psp_eff_report_details perd
6062: Where pregen.distribution_date between per.start_date and per.end_date