DBA Data[Home] [Help]

APPS.PSP_ENC_LIQ_TRAN dependencies on PSP_ENC_CONTROLS

Line 553: -- liquidate 'L' and picks up the necessary rows from PSP_ENC_CONTROLS,

549: -- This procedure begins the encumbrance liquidation process
550:
551: -- Included action_code 'Q' for Quick Update
552: -- This procedure identifies whether the call is for update ('Q', 'U') or
553: -- liquidate 'L' and picks up the necessary rows from PSP_ENC_CONTROLS,
554: -- generates a RUN_ID and updates PSP_ENC_CONTROLS table with
555: -- the RUN_ID and sets the ACTION_CODE = 'I' where
556: -- ACTION_TYPE in ('N', 'U', 'Q') and ACTION_CODE = 'P'
557:

Line 554: -- generates a RUN_ID and updates PSP_ENC_CONTROLS table with

550:
551: -- Included action_code 'Q' for Quick Update
552: -- This procedure identifies whether the call is for update ('Q', 'U') or
553: -- liquidate 'L' and picks up the necessary rows from PSP_ENC_CONTROLS,
554: -- generates a RUN_ID and updates PSP_ENC_CONTROLS table with
555: -- the RUN_ID and sets the ACTION_CODE = 'I' where
556: -- ACTION_TYPE in ('N', 'U', 'Q') and ACTION_CODE = 'P'
557:
558: -- If the call is for update it will retireve all the rows with time_period_id

Line 574: FROM psp_enc_controls

570: l_payroll_id NUMBER(15);
571:
572: CURSOR payroll_id_cur IS
573: SELECT DISTINCT payroll_id
574: FROM psp_enc_controls
575: WHERE payroll_action_id = p_payroll_action_id;
576:
577: /* Bug 5642002: Replaced earned date with period end date */
578: CURSOR payroll_run_date_cur IS

Line 631: FROM psp_enc_controls pec

627: NVL(run_id, 0),
628: gl_phase,
629: gms_phase,
630: batch_name
631: FROM psp_enc_controls pec
632: WHERE payroll_action_id = p_payroll_action_id
633: -- WHERE payroll_id = p_payroll_id
634: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
635: AND action_type IN ('N', 'U', 'Q')

Line 669: FROM psp_enc_controls pec

665: NVL(run_id, 0),
666: gl_phase,
667: gms_phase,
668: batch_name
669: FROM psp_enc_controls pec
670: WHERE payroll_action_id = p_payroll_action_id
671: -- WHERE payroll_id = p_payroll_id
672: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
673: AND action_type IN ('N', 'U', 'Q')

Line 708: FROM psp_enc_controls pec

704: NVL(run_id, 0),
705: gl_phase,
706: gms_phase,
707: batch_name
708: FROM psp_enc_controls pec
709: WHERE payroll_id = p_payroll_id
710: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
711: AND action_type IN ('N', 'U', 'Q')
712: AND action_code IN ('P', 'IT')

Line 738: psp_enc_controls pec,

734: DECODE(pesl.status_code, 'A', 'Accepted', 'L', 'Liquidated', 'S', 'Superceded', 'N', 'New', 'R', 'Rejected', pesl.status_code) status_code,
735: SUM(pesl.summary_amount),
736: COUNT(1)
737: FROM psp_enc_summary_lines pesl,
738: psp_enc_controls pec,
739: per_assignments_f paf,
740: per_people_f ppf
741: WHERE pesl.enc_control_id = pec.enc_control_id
742: AND paf.assignment_id = pesl.assignment_id

Line 811: FROM psp_enc_controls pec

807: CURSOR enc_control_cur1(p_max_time_period NUMBER) IS
808: SELECT enc_control_id,
809: payroll_id,
810: time_period_id
811: FROM psp_enc_controls pec
812: WHERE payroll_id = nvl(p_payroll_id, payroll_id)
813: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
814: AND action_type in ('N', 'U', 'Q') -- Included 'Q' for Enh. 2143723
815: AND action_code in ('P','IL') --- added 'IL' for 2444657

Line 825: FROM psp_enc_controls pec

821: CURSOR enc_control_cur3 IS
822: SELECT enc_control_id,
823: payroll_id,
824: time_period_id
825: FROM psp_enc_controls pec
826: WHERE payroll_id = nvl(p_payroll_id, payroll_id)
827: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
828: AND action_type in ('N', 'U', 'Q')
829: AND action_code in ('P','IL')

Line 866: FROM psp_enc_controls pec

862: CURSOR enc_control_cur2 (p_max_time_period NUMBER)IS
863: SELECT enc_control_id,
864: payroll_id,
865: time_period_id
866: FROM psp_enc_controls pec
867: WHERE payroll_id = nvl(p_payroll_id, payroll_id)
868: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
869: AND action_type in ('N', 'U', 'Q') -- Included 'Q' for Enh. 2143723
870: AND action_code in ('P','IU') --- added 'IU' for 2444657

Line 937: UPDATE psp_enc_controls

933: CLOSE enc_control_cur1;
934: EXIT;
935: END IF;
936:
937: UPDATE psp_enc_controls
938: SET action_code = 'IL', / * Changed from 'I' for Restart Update/Quick Update Encumbrance Lines * /
939: run_id = g_run_id
940: -- gms_phase = null,
941: -- gl_phase = null commented null for 2444657

Line 963: UPDATE psp_enc_controls

959: CLOSE enc_control_cur2;
960: EXIT;
961: END IF;
962:
963: UPDATE psp_enc_controls
964: SET action_code = 'IU',/ * Changed from 'I' for Restart Update/Quick Update Encumbrance Lines * /
965: run_id = g_run_id
966: WHERE enc_control_id = enc_control_rec2.enc_control_id;
967: --insert into psp_stout values(55,'after updating psp_enc_controls');

Line 967: --insert into psp_stout values(55,'after updating psp_enc_controls');

963: UPDATE psp_enc_controls
964: SET action_code = 'IU',/ * Changed from 'I' for Restart Update/Quick Update Encumbrance Lines * /
965: run_id = g_run_id
966: WHERE enc_control_id = enc_control_rec2.enc_control_id;
967: --insert into psp_stout values(55,'after updating psp_enc_controls');
968: ----commit; Bug 2039196: commented this unnecessary commit.
969: END LOOP;
970: END IF;
971: else --- introduced else for 3413373

Line 990: UPDATE psp_enc_controls

986: CLOSE enc_control_cur3;
987: EXIT;
988: END IF;
989:
990: UPDATE psp_enc_controls
991: SET action_code = 'IL',
992: run_id = g_run_id
993: WHERE enc_control_id = enc_control_rec3.enc_control_id;
994:

Line 1044: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updating psp_enc_controls table setting action_code to ''IL'' ');

1040:
1041: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' enc_control_status_cur1%ROWCOUNT : '||enc_control_status_cur1%ROWCOUNT);
1042: CLOSE enc_control_status_cur1;
1043:
1044: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updating psp_enc_controls table setting action_code to ''IL'' ');
1045:
1046: UPDATE psp_enc_controls pec
1047: SET action_code = 'IL',
1048: run_id = g_run_id,

Line 1046: UPDATE psp_enc_controls pec

1042: CLOSE enc_control_status_cur1;
1043:
1044: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updating psp_enc_controls table setting action_code to ''IL'' ');
1045:
1046: UPDATE psp_enc_controls pec
1047: SET action_code = 'IL',
1048: run_id = g_run_id,
1049: liquidate_request_id = g_request_id
1050: WHERE payroll_id = l_payroll_id

Line 1077: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updating psp_enc_controls table setting action_code to ''IU'' ');

1073:
1074: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' enc_control_status_cur2%ROWCOUNT : '||enc_control_status_cur2%ROWCOUNT);
1075: CLOSE enc_control_status_cur2;
1076:
1077: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updating psp_enc_controls table setting action_code to ''IU'' ');
1078:
1079: UPDATE psp_enc_controls pec
1080: SET action_code = 'IU',
1081: run_id = g_run_id,

Line 1079: UPDATE psp_enc_controls pec

1075: CLOSE enc_control_status_cur2;
1076:
1077: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updating psp_enc_controls table setting action_code to ''IU'' ');
1078:
1079: UPDATE psp_enc_controls pec
1080: SET action_code = 'IU',
1081: run_id = g_run_id,
1082: liquidate_request_id = g_request_id
1083: WHERE payroll_id = l_payroll_id

Line 1113: UPDATE psp_enc_controls pec

1109: r_enc_controls.run_id, r_enc_controls.gl_phase,
1110: r_enc_controls.gms_phase, r_enc_controls.batch_name;
1111: CLOSE enc_control_status_cur3;
1112:
1113: UPDATE psp_enc_controls pec
1114: SET action_code = 'IT',
1115: run_id = g_run_id,
1116: liquidate_request_id = g_request_id
1117: WHERE payroll_id = p_payroll_id

Line 1231: -- This procedure updates the table PSP_ENC_CONTROLS with ACTION_CODE = 'L',

1227:
1228: -- ##########################################################################
1229: -- This procedure ends the encumbrance liquidation process
1230:
1231: -- This procedure updates the table PSP_ENC_CONTROLS with ACTION_CODE = 'L',
1232: -- if the program is completed with a return code of success and if the
1233: -- return code is failed it updates ACTION_CODE = 'P'
1234:
1235: -- When the program returns a failure status, it also updates

Line 1248: --FROM psp_enc_controls

1244: p_set_of_books_id IN NUMBER,
1245: p_return_status OUT NOCOPY VARCHAR2) IS
1246: CURSOR enc_control_cur IS
1247: SELECT DISTINCT enc_control_id
1248: --FROM psp_enc_controls
1249: FROM psp_enc_summary_lines
1250: --WHERE payroll_id = p_payroll_id
1251: WHERE payroll_action_id = p_payroll_action_id
1252: --AND run_id = g_run_id

Line 1285: FROM psp_enc_controls pec

1281: run_id,
1282: gl_phase,
1283: gms_phase,
1284: batch_name
1285: FROM psp_enc_controls pec
1286: --WHERE payroll_id = p_payroll_id
1287: WHERE payroll_action_id = p_payroll_action_id
1288: AND run_id = g_run_id
1289: AND business_group_id = g_bg_id

Line 1312: psp_enc_controls pec,

1308: DECODE(pesl.status_code, 'A', 'Accepted', 'L', 'Liquidated', 'S', 'Superceded', 'N', 'New', 'R', 'Rejected', pesl.status_code) status_code,
1309: SUM(pesl.summary_amount),
1310: COUNT(1)
1311: FROM psp_enc_summary_lines pesl,
1312: psp_enc_controls pec,
1313: per_assignments_f paf,
1314: per_people_f ppf
1315: WHERE pesl.enc_control_id = pec.enc_control_id
1316: AND paf.assignment_id = pesl.assignment_id

Line 1458: UPDATE psp_enc_controls

1454: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated change_flag to ''L'' in psp_enc_lines_history for lines that are liquidated count: '||g_bulk_row_count);
1455:
1456:
1457: FORALL recno IN 1..t_enc_control_id.COUNT
1458: UPDATE psp_enc_controls
1459: SET action_code = 'L'
1460: WHERE enc_control_id = t_enc_control_id(recno)
1461: AND NOT EXISTS (SELECT 1
1462: FROM psp_enc_summary_lines pesl

Line 1471: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated action_code to ''L'' in psp_enc_controls for control records whose enc summary lines are completely liquidated count '||g_bulk_row_count);

1467: FOR bulk_idx IN 1..t_enc_control_id.COUNT
1468: loop
1469: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
1470: end loop;
1471: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated action_code to ''L'' in psp_enc_controls for control records whose enc summary lines are completely liquidated count '||g_bulk_row_count);
1472:
1473:
1474: FORALL recno IN 1..t_enc_control_id.COUNT
1475: UPDATE psp_enc_controls

Line 1475: UPDATE psp_enc_controls

1471: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated action_code to ''L'' in psp_enc_controls for control records whose enc summary lines are completely liquidated count '||g_bulk_row_count);
1472:
1473:
1474: FORALL recno IN 1..t_enc_control_id.COUNT
1475: UPDATE psp_enc_controls
1476: SET action_code = 'P'
1477: WHERE enc_control_id = t_enc_control_id(recno)
1478: AND EXISTS (SELECT 1
1479: FROM psp_enc_summary_lines pesl

Line 1487: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated action_code to ''P'' in psp_enc_controls for control records whose enc summary lines aren''t completely liquidated count'||g_bulk_row_count);

1483: FOR bulk_idx IN 1..t_enc_control_id.COUNT
1484: loop
1485: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
1486: end loop;
1487: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated action_code to ''P'' in psp_enc_controls for control records whose enc summary lines aren''t completely liquidated count'||g_bulk_row_count);
1488:
1489:
1490: UPDATE psp_enc_processes
1491: SET process_phase = 'completed',

Line 1718: FROM psp_enc_controls

1714: payroll_id,
1715: time_period_id,
1716: gl_phase,
1717: gms_phase
1718: FROM psp_enc_controls
1719: WHERE payroll_id = nvl(p_payroll_id, payroll_id)
1720: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
1721: AND action_type in ('N', 'U', 'Q') -- Included 'Q' for Enh. 2143723
1722: AND action_code = DECODE(p_action_type,'U','IU','Q','IU','IL') / * Restart Update/Quick Update Encumbrance Lines Changes * /

Line 1821: UPDATE psp_enc_controls

1817: AND status_code = 'R';
1818:
1819: -- update status_code to 'P' in psp_payroll_controls
1820:
1821: UPDATE psp_enc_controls
1822: SET action_code = 'P',
1823: run_id = NULL
1824: WHERE enc_control_id = enc_control_rec.enc_control_id;
1825: ELSIF l_status_code = 'L' THEN

Line 1829: UPDATE psp_enc_controls

1825: ELSIF l_status_code = 'L' THEN
1826: -- NULL;
1827: if p_Action_type='L' and p_mode = 'N' then -- added p_mode for Bug 2039196
1828:
1829: UPDATE psp_enc_controls
1830: SET action_code = 'L',
1831: run_id = NULL
1832: WHERE enc_control_id = enc_control_rec.enc_control_id;
1833: update psp_enc_Controls set action_code='L' where

Line 1833: update psp_enc_Controls set action_code='L' where

1829: UPDATE psp_enc_controls
1830: SET action_code = 'L',
1831: run_id = NULL
1832: WHERE enc_control_id = enc_control_rec.enc_control_id;
1833: update psp_enc_Controls set action_code='L' where
1834: time_period_id=enc_control_rec.time_period_id and
1835: payroll_id=p_payroll_id;
1836:
1837: --required to update all previous records as well for this T.p to liquidated

Line 1852: update psp_enc_controls set action_code='P', run_id=null

1848: Control Records will have a status of 'L' if no accepted SummaryLines exist
1849: OR to 'P', if present, regardless of whether it is invoked in 'L', 'Q' and 'U' modes
1850: / * Added so that status not left in I * /
1851: if p_action_type IN ('Q', 'U') then -- Included 'Q' for Enh. 2143723
1852: update psp_enc_controls set action_code='P', run_id=null
1853: where enc_control_id=enc_control_rec.enc_control_id;
1854: elsif p_action_type = 'L' and p_mode ='R' then --- Bug 2039196: Introduced this condition
1855:
1856: -- Moved the following SELECT into cursor summary_line_count_cur

Line 1870: update psp_enc_controls set action_code='L' ---, run_id=null ...commented run_id = null for 3473294

1866: FETCH summary_line_count_cur INTO l_line_count;
1867: CLOSE summary_line_count_cur;
1868:
1869: if l_line_count = 0 then
1870: update psp_enc_controls set action_code='L' ---, run_id=null ...commented run_id = null for 3473294
1871: where enc_control_id=enc_control_rec.enc_control_id;
1872: else
1873: --- removed the code that leaves controls at IU for 3473294
1874: update psp_enc_controls set action_code='P' ---, run_id=null

Line 1874: update psp_enc_controls set action_code='P' ---, run_id=null

1870: update psp_enc_controls set action_code='L' ---, run_id=null ...commented run_id = null for 3473294
1871: where enc_control_id=enc_control_rec.enc_control_id;
1872: else
1873: --- removed the code that leaves controls at IU for 3473294
1874: update psp_enc_controls set action_code='P' ---, run_id=null
1875: where enc_control_id=enc_control_rec.enc_control_id;
1876: end if;
1877: -- end if; Commented this for enh. 2143723
1878: END LOOP; --enc control cur

Line 1920: DELETE FROM psp_enc_controls

1916: FETCH pending_enc_lines_cur INTO l_new_line_count;
1917: CLOSE pending_enc_lines_cur;
1918:
1919: IF (l_new_line_count = 0) THEN
1920: DELETE FROM psp_enc_controls
1921: WHERE action_type = p_action_type
1922: AND payroll_id = p_payroll_id
1923: AND action_code = 'N';
1924: END IF;

Line 2006: FROM psp_enc_controls pec

2002: DECODE(g_dff_grouping_option, 'Y', pesl.attribute9, NULL) attribute9,
2003: DECODE(g_dff_grouping_option, 'Y', pesl.attribute10, NULL) attribute10
2004: FROM psp_enc_summary_lines pesl
2005: WHERE pesl.enc_control_id IN (SELECT pec.enc_control_id
2006: FROM psp_enc_controls pec
2007: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
2008: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
2009: AND pec.run_id = g_run_id
2010: AND pec.business_group_id = g_bg_id

Line 2045: FROM psp_enc_controls pec

2041: DECODE(g_dff_grouping_option, 'Y', pesl.attribute9, NULL) attribute9,
2042: DECODE(g_dff_grouping_option, 'Y', pesl.attribute10, NULL) attribute10
2043: FROM psp_enc_summary_lines pesl
2044: WHERE pesl.enc_control_id IN (SELECT pec.enc_control_id
2045: FROM psp_enc_controls pec
2046: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
2047: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
2048: AND pec.run_id = g_run_id
2049: AND pec.business_group_id = g_bg_id

Line 2088: FROM psp_enc_controls pec

2084: DECODE(g_dff_grouping_option, 'Y', pesl.attribute9, NULL) attribute9,
2085: DECODE(g_dff_grouping_option, 'Y', pesl.attribute10, NULL) attribute10
2086: FROM psp_enc_summary_lines pesl
2087: WHERE pesl.enc_control_id IN (SELECT pec.enc_control_id
2088: FROM psp_enc_controls pec
2089: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
2090: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
2091: AND pec.run_id = g_run_id
2092: AND pec.business_group_id = g_bg_id

Line 2132: FROM psp_enc_controls pec

2128: DECODE(g_dff_grouping_option, 'Y', pesl.attribute9, NULL) attribute9,
2129: DECODE(g_dff_grouping_option, 'Y', pesl.attribute10, NULL) attribute10
2130: FROM psp_enc_summary_lines pesl
2131: WHERE enc_control_id IN (SELECT pec.enc_control_id
2132: FROM psp_enc_controls pec
2133: WHERE pec.payroll_id = NVL(p_payroll_id, pec.payroll_id)
2134: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
2135: AND pec.run_id = g_run_id
2136: AND pec.business_group_id = g_bg_id

Line 2282: UPDATE psp_enc_controls

2278:
2279: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated status_code to ''S'' in psp_enc_summary_lines');
2280:
2281: FORALL recno IN 1..r_liq_lines.enc_summary_line_id.COUNT
2282: UPDATE psp_enc_controls
2283: SET gl_phase = 'Summarize'
2284: WHERE enc_control_id = r_liq_lines.enc_control_id(recno);
2285:
2286: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gl_phase to ''Summarize'' in psp_enc_controls');

Line 2286: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gl_phase to ''Summarize'' in psp_enc_controls');

2282: UPDATE psp_enc_controls
2283: SET gl_phase = 'Summarize'
2284: WHERE enc_control_id = r_liq_lines.enc_control_id(recno);
2285:
2286: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gl_phase to ''Summarize'' in psp_enc_controls');
2287:
2288: p_return_status := fnd_api.g_ret_sts_success;
2289:
2290: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving CREATE_GL_ENC_LIQ_LINES');

Line 2315: FROM psp_enc_controls

2311: CURSOR enc_control_cur IS
2312: SELECT enc_control_id,
2313: payroll_id,
2314: time_period_id
2315: FROM psp_enc_controls
2316: WHERE payroll_id = nvl(p_payroll_id, payroll_id)
2317: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
2318: AND action_type in ('N', 'U', 'Q') -- Included 'Q' for Enh. 2143723
2319: AND action_code IN ('IL','IU') -- Replaced I with IL and IU for Bug#2142865

Line 2377: psp_enc_lines_history pelh, psp_enc_controls pec

2373: AND (p_action_type='L' or
2374: (p_action_type='U' and
2375: pelh.assignment_id IN
2376: (SELECT distinct pelh.assignment_id FROM
2377: psp_enc_lines_history pelh, psp_enc_controls pec
2378: WHERE pec.enc_control_id=p_enc_control_id AND
2379: pelh.time_period_id=pec.time_period_id and pelh.change_flag='N')));
2380: Above cursor modified for bug fixes 1832670 and 1776752
2381:

Line 2467: update psp_enc_controls

2463: l_count := l_count + 1;
2464: END LOOP;
2465:
2466: if l_count > 0 then
2467: update psp_enc_controls
2468: set gl_phase = 'Summarize' --- replaced NULL for 2444657
2469: where enc_control_id = enc_control_rec.enc_control_id;
2470: l_count := 0;
2471: end if;

Line 2654: FROM psp_enc_controls

2650: SELECT enc_control_id,
2651: payroll_id,
2652: time_period_id,
2653: gl_phase ---added for 2444657
2654: FROM psp_enc_controls
2655: WHERE payroll_id = nvl(p_payroll_id, payroll_id)
2656: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
2657: AND action_type in ('N', 'Q', 'U') -- Included 'Q' for Enh. 2143723
2658: AND action_code IN ('IT', 'IL','IU') -- Replaced I with IL and IU for Bug#2142865

Line 2776: FROM psp_enc_controls pec

2772: SELECT DISTINCT group_id
2773: FROM psp_enc_summary_lines pesl
2774: WHERE pesl.payroll_action_id = p_payroll_action_id
2775: /*WHERE enc_control_id IN (SELECT pec.enc_control_id
2776: FROM psp_enc_controls pec
2777: WHERE pec.payroll_id = NVL(p_payroll_id, pec.payroll_id)
2778: AND action_type IN ('N', 'U', 'Q')
2779: AND action_code IN ('IT', 'IL', 'IU')
2780: AND pec.run_id = g_run_id

Line 2837: FROM psp_enc_controls pec

2833: AND gl_code_combination_id IS NOT NULL
2834: AND superceded_line_id IS NOT NULL
2835: AND payroll_action_id = p_payroll_action_id;
2836: /* AND enc_control_id IN (SELECT pec.enc_control_id
2837: FROM psp_enc_controls pec
2838: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
2839: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
2840: AND action_type IN ('N', 'U', 'Q')
2841: AND action_code IN ('IT', 'IL', 'IU')

Line 2888: psp_enc_controls pec

2884: attribute24, attribute25, attribute26,
2885: attribute27, attribute28, attribute29,
2886: attribute30
2887: FROM psp_enc_summary_lines pesl,
2888: psp_enc_controls pec
2889: WHERE pec.enc_control_id = pesl.enc_control_id
2890: AND pesl.status_code = 'N'
2891: AND pesl.gl_code_combination_id is NOT NULL
2892: AND superceded_line_id IS NOT NULL

Line 2895: FROM psp_enc_controls pec

2891: AND pesl.gl_code_combination_id is NOT NULL
2892: AND superceded_line_id IS NOT NULL
2893: AND pesl.payroll_action_id = p_payroll_action_id;
2894: /* AND enc_control_id IN (SELECT pec.enc_control_id
2895: FROM psp_enc_controls pec
2896: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
2897: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
2898: AND action_type IN ('N', 'U', 'Q')
2899: AND action_code IN ('IT', 'IL', 'IU')

Line 3125: update psp_enc_controls

3121: ELSE
3122: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Submitted Journal Import (req_id: ' || req_id || ')');
3123: -- insert into psp_stout values(94, 'transfer in Gl');
3124: /***** Converted the following UPDATE TO BULK for R12 performance fixes (bug 4507892)
3125: update psp_enc_controls
3126: set gl_phase = 'Transfer'
3127: where enc_control_id in (select distinct enc_control_id
3128: from psp_enc_summary_lines
3129: where group_id = l_group_id);

Line 3139: UPDATE psp_enc_controls

3135:
3136: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' r_enc_controls.enc_control_id.COUNT: ' || r_enc_controls.enc_control_id.COUNT);
3137:
3138: FORALL I IN 1..r_enc_controls.enc_control_id.COUNT
3139: UPDATE psp_enc_controls
3140: SET gl_phase = 'Transfer'
3141: WHERE enc_control_id = r_enc_controls.enc_control_id(I);
3142:
3143: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gl_phase to ''Transfer'' in psp_enc_controls');

Line 3143: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gl_phase to ''Transfer'' in psp_enc_controls');

3139: UPDATE psp_enc_controls
3140: SET gl_phase = 'Transfer'
3141: WHERE enc_control_id = r_enc_controls.enc_control_id(I);
3142:
3143: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gl_phase to ''Transfer'' in psp_enc_controls');
3144:
3145: r_enc_controls.enc_control_id.DELETE;
3146: -- End of Changes for bug fix 4507892
3147:

Line 3681: UPDATE psp_enc_controls pec

3677: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted from psp_enc_summary_lines');
3678:
3679: -- Introduced the following for bug fix 4625734
3680: FORALL recno IN 1..r_enc_controls.enc_control_id.COUNT
3681: UPDATE psp_enc_controls pec
3682: SET gl_phase = 'TieBack'
3683: WHERE enc_control_id = r_enc_controls.enc_control_id(recno);
3684: -- End of changes for bug fix 4625734
3685:

Line 3759: UPDATE psp_enc_controls

3755: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' g_rejected_group_id: ' || g_rejected_group_id);
3756: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' SQL%ROWCOUNT: ' || SQL%ROWCOUNT);
3757:
3758: FORALL recno IN 1..r_interface.status.COUNT
3759: UPDATE psp_enc_controls
3760: SET gl_phase = 'TieBack'
3761: WHERE enc_control_id IN (SELECT pesl.enc_control_id
3762: FROM psp_enc_summary_lines pesl
3763: WHERE pesl.enc_summary_line_id = r_interface.enc_summary_line_id(recno));

Line 3765: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated psp_enc_controls resetting gl_phase to TieBack SQL%ROWCOUNT: ' || SQL%ROWCOUNT);

3761: WHERE enc_control_id IN (SELECT pesl.enc_control_id
3762: FROM psp_enc_summary_lines pesl
3763: WHERE pesl.enc_summary_line_id = r_interface.enc_summary_line_id(recno));
3764:
3765: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated psp_enc_controls resetting gl_phase to TieBack SQL%ROWCOUNT: ' || SQL%ROWCOUNT);
3766:
3767: FORALL recno IN 1..r_interface.status.COUNT
3768: UPDATE psp_enc_controls
3769: SET gl_phase = 'Summarize'

Line 3768: UPDATE psp_enc_controls

3764:
3765: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated psp_enc_controls resetting gl_phase to TieBack SQL%ROWCOUNT: ' || SQL%ROWCOUNT);
3766:
3767: FORALL recno IN 1..r_interface.status.COUNT
3768: UPDATE psp_enc_controls
3769: SET gl_phase = 'Summarize'
3770: WHERE enc_control_id IN (SELECT pesl.enc_control_id
3771: FROM psp_enc_summary_lines pesl
3772: WHERE pesl.enc_summary_line_id = r_interface.enc_summary_line_id(recno)

Line 3775: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated psp_enc_controls resetting gl_phase to Summarize SQL%ROWCOUNT: ' || SQL%ROWCOUNT);

3771: FROM psp_enc_summary_lines pesl
3772: WHERE pesl.enc_summary_line_id = r_interface.enc_summary_line_id(recno)
3773: AND pesl.status_code = 'N');
3774:
3775: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated psp_enc_controls resetting gl_phase to Summarize SQL%ROWCOUNT: ' || SQL%ROWCOUNT);
3776:
3777:
3778: ELSIF (l_cnt_gl_interface = 0) THEN
3779: g_accepted_group_id := p_group_id;

Line 3809: UPDATE psp_enc_controls pec

3805: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated respective lines in psp_enc_lines_history to ''L'' status SQL%ROWCOUNT: ' || SQL%ROWCOUNT);
3806: END IF;
3807:
3808: FORALL recno IN 1..r_interface.enc_control_id.COUNT
3809: UPDATE psp_enc_controls pec
3810: SET gl_phase = 'TieBack',
3811: summ_gl_dr_amount = NVL(summ_gl_dr_amount, 0) + DECODE(r_interface.dr_cr_flag(recno), 'D', r_interface.summary_amount(recno), 0),
3812: summ_gl_cr_amount = NVL(summ_gl_cr_amount, 0) + DECODE(r_interface.dr_cr_flag(recno), 'C', r_interface.summary_amount(recno), 0)
3813: WHERE enc_control_id = r_interface.enc_control_id(recno);

Line 3814: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gl_phase, summ_gl_dr_amount, summ_gl_cr_amount in psp_enc_controls SQL%ROWCOUNT: ' || SQL%ROWCOUNT);

3810: SET gl_phase = 'TieBack',
3811: summ_gl_dr_amount = NVL(summ_gl_dr_amount, 0) + DECODE(r_interface.dr_cr_flag(recno), 'D', r_interface.summary_amount(recno), 0),
3812: summ_gl_cr_amount = NVL(summ_gl_cr_amount, 0) + DECODE(r_interface.dr_cr_flag(recno), 'C', r_interface.summary_amount(recno), 0)
3813: WHERE enc_control_id = r_interface.enc_control_id(recno);
3814: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gl_phase, summ_gl_dr_amount, summ_gl_cr_amount in psp_enc_controls SQL%ROWCOUNT: ' || SQL%ROWCOUNT);
3815: END IF;
3816:
3817: /***** Commented the following for bug fix 4625734
3818: IF l_cnt_gl_interface > 0 THEN

Line 3968: UPDATE psp_enc_controls

3964: Record for invalid suspense reason in control record record so
3965: that Restart Update can derive the failed point * /
3966: IF l_return_value <> 'PROFILE_VAL_DATE_MATCHES' THEN
3967: IF p_action_type IN ('Q','U') THEN
3968: UPDATE psp_enc_controls
3969: SET gl_phase = 'INVALID_SUSPENSE'
3970: WHERE enc_control_id = p_enc_control_id;
3971: END IF;
3972: g_invalid_suspense:='Y';

Line 3989: UPDATE psp_enc_controls

3985: x_susp_nf_org_name := l_orig_org_name;
3986: x_susp_nf_date := l_encumbrance_date; Commented for bug 2056877 * /
3987: / * Added for Restart Update/Quick Update Encumbrance Lines Enh. * /
3988: IF p_action_type IN ('Q','U') THEN
3989: UPDATE psp_enc_controls
3990: SET gl_phase = 'INVALID_SUSPENSE'
3991: WHERE enc_control_id = p_enc_control_id;
3992: END IF;
3993: g_invalid_suspense:='Y';

Line 4084: update psp_enc_controls

4080: End of comment for Enh. 2768298 Removal of suspense posting in Enc. Liquidation ***** /
4081:
4082: END LOOP;
4083: if nvl(g_gl_run,FALSE) then
4084: update psp_enc_controls
4085: set gl_phase = 'Summarize' --- replaced 'TieBack' .... for 2444657
4086: where enc_control_id = p_enc_control_id;
4087: else
4088: update psp_enc_controls --- introduced else part for 3413373

Line 4088: update psp_enc_controls --- introduced else part for 3413373

4084: update psp_enc_controls
4085: set gl_phase = 'Summarize' --- replaced 'TieBack' .... for 2444657
4086: where enc_control_id = p_enc_control_id;
4087: else
4088: update psp_enc_controls --- introduced else part for 3413373
4089: set gl_phase = 'TieBack'
4090: where enc_control_id = p_enc_control_id;
4091: end if;
4092: / * commented: Bug 2039196

Line 4104: UPDATE psp_enc_controls

4100: / ***** Commented for Enh. 2768298 Removal of suspense posting in Liquidation
4101: IF l_suspense_ac_failed = 'Y' THEN
4102: / * Added for Restart Update/Quick Update Encumbrance Lines Enh. * /
4103: IF p_action_type IN ('Q','U') THEN
4104: UPDATE psp_enc_controls
4105: SET gl_phase = 'INVALID_SUSPENSE'
4106: WHERE enc_control_id = p_enc_control_id;
4107: END IF;
4108: -- removed statement set invalid susp to 'Y' for 2479579

Line 4180: UPDATE psp_enc_controls

4176:
4177: * /
4178:
4179: if l_dr_cr_flag = 'D' then
4180: UPDATE psp_enc_controls
4181: SET summ_gl_cr_amount = l_dr_summary_amount
4182: WHERE enc_control_id = p_enc_control_id;
4183: elsif l_dr_cr_flag = 'C' then
4184: UPDATE psp_enc_controls

Line 4184: UPDATE psp_enc_controls

4180: UPDATE psp_enc_controls
4181: SET summ_gl_cr_amount = l_dr_summary_amount
4182: WHERE enc_control_id = p_enc_control_id;
4183: elsif l_dr_cr_flag = 'C' then
4184: UPDATE psp_enc_controls
4185: SET summ_gl_dr_amount = l_cr_summary_amount
4186: WHERE enc_control_id = p_enc_control_id;
4187: end if;
4188: --- moved this stmnt from below endif..for 2444657

Line 4189: update psp_enc_controls

4185: SET summ_gl_dr_amount = l_cr_summary_amount
4186: WHERE enc_control_id = p_enc_control_id;
4187: end if;
4188: --- moved this stmnt from below endif..for 2444657
4189: update psp_enc_controls
4190: set gl_phase = 'TieBack'
4191: where enc_control_id = p_enc_control_id;
4192:
4193: END IF;

Line 4452: FROM psp_enc_controls pec

4448: DECODE(g_dff_grouping_option, 'Y', attribute9, NULL) attribute9,
4449: DECODE(g_dff_grouping_option, 'Y', attribute10, NULL) attribute10
4450: FROM psp_enc_summary_lines pesl
4451: WHERE enc_control_id IN (SELECT pec.enc_control_id
4452: FROM psp_enc_controls pec
4453: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
4454: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
4455: AND action_type IN ('N', 'U', 'Q')
4456: AND action_code = 'IL'

Line 4498: FROM psp_enc_controls pec

4494: DECODE(g_dff_grouping_option, 'Y', attribute9, NULL) attribute9,
4495: DECODE(g_dff_grouping_option, 'Y', attribute10, NULL) attribute10
4496: FROM psp_enc_summary_lines pesl
4497: WHERE enc_control_id IN (SELECT pec.enc_control_id
4498: FROM psp_enc_controls pec
4499: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
4500: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
4501: AND action_type IN ('N', 'U', 'Q')
4502: AND action_code = 'IU'

Line 4548: FROM psp_enc_controls pec

4544: DECODE(g_dff_grouping_option, 'Y', attribute9, NULL) attribute9,
4545: DECODE(g_dff_grouping_option, 'Y', attribute10, NULL) attribute10
4546: FROM psp_enc_summary_lines pesl
4547: WHERE enc_control_id IN (SELECT pec.enc_control_id
4548: FROM psp_enc_controls pec
4549: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
4550: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
4551: AND action_type IN ('N', 'U', 'Q')
4552: AND action_code = 'IU'

Line 4599: FROM psp_enc_controls pec

4595: DECODE(g_dff_grouping_option, 'Y', attribute9, NULL) attribute9,
4596: DECODE(g_dff_grouping_option, 'Y', attribute10, NULL) attribute10
4597: FROM psp_enc_summary_lines pesl
4598: WHERE enc_control_id IN (SELECT pec.enc_control_id
4599: FROM psp_enc_controls pec
4600: WHERE pec.payroll_id = NVL(p_payroll_id, pec.payroll_id)
4601: AND (pec.total_dr_amount IS NOT NULL OR pec.total_cr_amount IS NOT NULL)
4602: AND action_type IN ('N', 'U', 'Q')
4603: AND action_code = 'IT'

Line 4776: UPDATE psp_enc_controls

4772:
4773: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated status_code to ''S'' in psp_enc_summary_lines');
4774:
4775: FORALL recno IN 1..r_liq_lines.enc_summary_line_id.COUNT
4776: UPDATE psp_enc_controls
4777: SET gms_phase = 'Summarize'
4778: WHERE enc_control_id = r_liq_lines.enc_control_id(recno);
4779:
4780: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gms_phase to ''Summarize'' in psp_enc_controls');

Line 4780: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gms_phase to ''Summarize'' in psp_enc_controls');

4776: UPDATE psp_enc_controls
4777: SET gms_phase = 'Summarize'
4778: WHERE enc_control_id = r_liq_lines.enc_control_id(recno);
4779:
4780: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gms_phase to ''Summarize'' in psp_enc_controls');
4781:
4782: p_return_status := fnd_api.g_ret_sts_success;
4783:
4784: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving CREATE_GMS_ENC_LIQ_LINES');

Line 4809: FROM psp_enc_controls

4805: CURSOR enc_control_cur IS
4806: SELECT enc_control_id,
4807: payroll_id,
4808: time_period_id
4809: FROM psp_enc_controls
4810: WHERE payroll_id = nvl(p_payroll_id, payroll_id)
4811: AND (total_dr_amount IS NOT NULL OR total_cr_amount IS NOT NULL)
4812: AND action_type in ('N', 'Q', 'U') -- Included 'Q' for Enh. 2143723
4813: AND action_code IN ('IL','IU') -- Replaced I with IL and IU for Bug#2142865

Line 4877: psp_enc_controls pec

4873:
4874: AND (p_action_type='L') or
4875: (p_action_type='U' and
4876: pesl.assignment_id in (select pelh.assignment_id FROM psp_enc_lines_history pelh,
4877: psp_enc_controls pec
4878: where pec.enc_control_id=p_enc_control_id AND
4879: pelh.time_period_id=pec.time_period_id
4880: and pelh.change_flag='N'));
4881:

Line 4911: update psp_enc_controls

4907: G_GMS_AVAILABLE := FALSE;
4908: CLOSE enc_liq_cur;
4909: EXIT;
4910: ELSIF enc_liq_cur%NOTFOUND THEN
4911: update psp_enc_controls
4912: set gms_phase = 'Summarize' --- replaced NULL...for 2444657
4913: where enc_control_id = enc_control_rec.enc_control_id;
4914:
4915: G_GMS_AVAILABLE := TRUE;

Line 5066: psp_enc_controls pec

5062: pa_projects_all ppa,
5063: pa_tasks_expend_v pt, -- Replaced pa_tasks with pa_tasks_expend_v for Bug : 16391366
5064: per_time_periods ptp,
5065: per_all_people_f papf,
5066: psp_enc_controls pec
5067: WHERE pesl.payroll_action_id = p_payroll_action_id
5068: AND pec.enc_control_id = pesl.enc_control_id
5069: AND pesl.status_code = 'N'
5070: AND pesl.gl_code_combination_id is NULL

Line 5159: FROM psp_enc_controls pec

5155: SELECT DISTINCT gms_batch_name
5156: FROM psp_enc_summary_lines pesl
5157: WHERE pesl.payroll_action_id = p_payroll_action_id
5158: /*WHERE enc_control_id IN (SELECT pec.enc_control_id
5159: FROM psp_enc_controls pec
5160: WHERE pec.payroll_id = nvl(p_payroll_id, pec.payroll_id)
5161: AND pec.run_id = g_run_id
5162: AND pec.business_group_id = g_bg_id
5163: AND pec.set_of_books_id = g_sob_id

Line 5844: update psp_enc_controls

5840: ELSE
5841: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Submitted Transaction Import');
5842:
5843: /***** Modified teh following update to BULK UPDATE for R12 performance fixes (bug 4507892)
5844: update psp_enc_controls
5845: set gms_phase = 'Transfer'
5846: where enc_control_id in (select distinct enc_control_id
5847: from psp_enc_summary_lines
5848: where gms_batch_name = g_gms_batch_name); --- replaced with global for 3473294

Line 5856: UPDATE psp_enc_controls

5852: FETCH enc_control_id_cur BULK COLLECT INTO r_enc_controls.enc_control_id;
5853: CLOSE enc_control_id_cur;
5854:
5855: FORALL I IN 1..r_enc_controls.enc_control_id.COUNT
5856: UPDATE psp_enc_controls
5857: SET gms_phase = 'Transfer'
5858: WHERE enc_control_id = r_enc_controls.enc_control_id(I);
5859:
5860: g_bulk_row_count :=0;

Line 5865: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gms_phase to ''Transfer'' in psp_enc_controls count: '||g_bulk_row_count);

5861: FOR bulk_idx IN 1..r_enc_controls.enc_control_id.COUNT
5862: loop
5863: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
5864: end loop;
5865: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gms_phase to ''Transfer'' in psp_enc_controls count: '||g_bulk_row_count);
5866:
5867: r_enc_controls.enc_control_id.DELETE;
5868: -- End of changes for bug fix 4507892
5869: END IF;

Line 6440: UPDATE psp_enc_controls pec

6436: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted from psp_enc_summary_lines sql%rowcount'||sql%rowcount);
6437:
6438: -- Introduced the folowing for bug fix 4625734
6439: FORALL recno IN 1..r_enc_controls.enc_control_id.COUNT
6440: UPDATE psp_enc_controls pec
6441: SET gms_phase = 'TieBack'
6442: WHERE enc_control_id = r_enc_controls.enc_control_id(recno);
6443:
6444:

Line 6451: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gms_phase to ''TieBack'' in psp_enc_controls count: '||g_bulk_row_count);

6447: loop
6448: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
6449: end loop;
6450:
6451: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated gms_phase to ''TieBack'' in psp_enc_controls count: '||g_bulk_row_count);
6452:
6453: r_enc_controls.enc_control_id.DELETE;
6454: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' GMS g_liq_has_failed_transactions := TRUE');
6455:

Line 6589: UPDATE psp_enc_controls pec

6585:
6586: 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);
6587:
6588: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6589: UPDATE psp_enc_controls pec
6590: SET gms_phase = 'TieBack',
6591: summ_ogm_dr_amount = NVL(pec.summ_ogm_dr_amount, 0) + DECODE(r_success_recs.dr_cr_flag(recno), 'D', r_success_recs.summary_amount(recno), 0),
6592: summ_ogm_cr_amount = NVL(pec.summ_ogm_cr_amount, 0) + DECODE(r_success_recs.dr_cr_flag(recno), 'C', r_success_recs.summary_amount(recno), 0)
6593: WHERE enc_control_id = r_success_recs.enc_control_id(recno);

Line 6603: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Update summ_ogm_cr_amount, summ_ogm_dr_amount in psp_enc_controls count'||g_bulk_row_count);

6599: loop
6600: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
6601: end loop;
6602:
6603: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Update summ_ogm_cr_amount, summ_ogm_dr_amount in psp_enc_controls count'||g_bulk_row_count);
6604:
6605: r_reject_recs.enc_summary_line_id.DELETE;
6606: r_reject_recs.enc_control_id.DELETE;
6607: r_reject_recs.reason_code.DELETE;

Line 6771: UPDATE psp_enc_controls

6767: ---------------------------------------------------------------------- * /
6768: / * Added for Restart Update/Quick Update Encumbrance Lines Enh. * /
6769: IF l_return_value <> 'PROFILE_VAL_DATE_MATCHES' THEN
6770: IF p_action_type IN ('Q','U') THEN
6771: UPDATE psp_enc_controls
6772: SET gms_phase='INVALID_SUSPENSE'
6773: WHERE enc_control_id=p_enc_control_id;
6774: END IF;
6775: g_invalid_suspense:='Y';

Line 6793: UPDATE psp_enc_controls

6789: x_susp_nf_org_name := l_orig_org_name;
6790: x_susp_nf_date := l_encumbrance_date; Bug 2056877 * /
6791: / * Added for Restart Update/Quick Update Encumbrance Lines * /
6792: IF p_action_type IN ('Q','U') THEN
6793: UPDATE psp_enc_controls
6794: SET gms_phase = 'INVALID_SUSPENSE'
6795: WHERE enc_control_id = p_enc_control_id;
6796: END IF;
6797: g_invalid_suspense:='Y';

Line 6880: UPDATE psp_enc_controls

6876: END LOOP;
6877: End of comment for Enh. 2768298 Removal of suspense posting in Enc. Liquidation ***** /
6878: END LOOP;
6879:
6880: UPDATE psp_enc_controls
6881: SET summ_ogm_cr_amount = nvl(summ_ogm_cr_amount, 0) + l_cr_summary_amount,
6882: summ_ogm_dr_amount = nvl(summ_ogm_dr_amount, 0) + l_dr_summary_amount,
6883: gms_phase = 'TieBack'
6884: WHERE enc_control_id = p_enc_control_id;

Line 6896: UPDATE psp_enc_controls

6892: fnd_message.set_token('ERROR_MSG',x_susp_failed_reject_code);
6893: fnd_msg_pub.add;
6894: / * Added the below IF condition for Restart Update/Quick Update Encumbrance Lines Enh. * /
6895: IF p_action_type IN ('Q','U') THEN
6896: UPDATE psp_enc_controls
6897: SET gms_phase = 'INVALID_SUSPENSE'
6898: WHERE enc_control_id = p_enc_control_id;
6899: END IF;
6900: --g_invalid_suspense:='Y'; commented for 2479579

Line 6961: UPDATE psp_enc_controls pec

6957: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated change_flag to ''L'' in psp_enc_lines_history for employee level liquidation count'||g_bulk_row_count);
6958: END IF;
6959:
6960: FORALL recno IN 1..r_success_recs.enc_summary_line_id.COUNT
6961: UPDATE psp_enc_controls pec
6962: SET gms_phase = 'TieBack',
6963: summ_ogm_dr_amount = NVL(pec.summ_ogm_dr_amount, 0) + DECODE(r_success_recs.dr_cr_flag(recno), 'D', r_success_recs.summary_amount(recno), 0),
6964: summ_ogm_cr_amount = NVL(pec.summ_ogm_cr_amount, 0) + DECODE(r_success_recs.dr_cr_flag(recno), 'C', r_success_recs.summary_amount(recno), 0)
6965: WHERE enc_control_id = r_success_recs.enc_control_id(recno);

Line 6972: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated summ_ogm_cr_amount, summ_ogm_dr_amount, gms_phase in psp_enc_controls count: '||g_bulk_row_count);

6968: FOR bulk_idx IN 1..r_success_recs.enc_summary_line_id.COUNT
6969: loop
6970: g_bulk_row_count := g_bulk_row_count + SQL%BULK_ROWCOUNT(bulk_idx);
6971: end loop;
6972: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated summ_ogm_cr_amount, summ_ogm_dr_amount, gms_phase in psp_enc_controls count: '||g_bulk_row_count);
6973:
6974: r_success_recs.enc_summary_line_id.DELETE;
6975: r_success_recs.enc_control_id.DELETE;
6976: r_success_recs.reason_code.DELETE;

Line 7037: UPDATE psp_enc_controls

7033: and gl_project_flag = 'P'
7034: and gms_batch_name=p_gms_batch_name
7035: and status_code = 'A';
7036: * /
7037: UPDATE psp_enc_controls
7038: SET summ_ogm_cr_amount = l_cr_summary_amount,
7039: summ_ogm_dr_amount = l_dr_summary_amount,
7040: gms_phase = 'TieBack'
7041: WHERE enc_control_id = p_enc_control_id;

Line 7274: from psp_enc_controls CTRL

7270: --- left with 'S'
7271: / ***** Modified the following cursor for bug fix 4625734
7272: cursor inprogress_controls_cur is
7273: select CTRL.payroll_id, min(CTRL.time_period_id) time_period_id
7274: from psp_enc_controls CTRL
7275: where CTRL.action_code = 'IT'
7276: and (CTRL.payroll_id, CTRL.time_period_id) in
7277: (select ASG.payroll_id, min(PER.time_period_id)
7278: from per_all_assignments_f ASG,

Line 7293: FROM psp_enc_controls pec

7289: SELECT pec.liquidate_request_id,
7290: pec.payroll_id,
7291: MIN(pec.time_period_id),
7292: MIN(enc_control_id)
7293: FROM psp_enc_controls pec
7294: WHERE pec.action_code = 'IT'
7295: GROUP BY pec.liquidate_request_id, pec.payroll_id;
7296:
7297: l_request_id NUMBER(15);

Line 7397: UPDATE psp_enc_controls

7393:
7394: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' t_enc_control_id.COUNT: ' || t_enc_control_id.COUNT);
7395:
7396: FORALL recno IN 1..t_enc_control_id.COUNT
7397: UPDATE psp_enc_controls
7398: SET number_of_dr = (SELECT number_of_dr - COUNT(1)
7399: FROM psp_enc_lines
7400: WHERE enc_control_id = t_enc_control_id(recno)
7401: AND dr_cr_flag = 'D'

Line 7452: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated number_of_dr, number_of_cr, total_dr_amount, total_cr_amount, gl_dr_amount, gl_cr_amount, ogm_dr_amount, ogm_cr_cmount in psp_enc_controls');

7448: AND person_id = p_person_id
7449: AND encumbrance_date > p_actual_term_date)
7450: WHERE enc_control_id = t_enc_control_id(recno);
7451:
7452: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated number_of_dr, number_of_cr, total_dr_amount, total_cr_amount, gl_dr_amount, gl_cr_amount, ogm_dr_amount, ogm_cr_cmount in psp_enc_controls');
7453:
7454: DELETE psp_enc_lines
7455: WHERE person_id = p_person_id
7456: AND encumbrance_date > p_actual_term_date;