2400:
2401: --Begin Encumbrance APIs
2402: ------------------------
2403:
2404: -- API to truncate the PO interface table PO_ENCUMBRANCE_GT
2405: PROCEDURE truncate_po_encumbrance_gt IS
2406:
2407: l_progress VARCHAR2(4) := '000';
2408: BEGIN
2401: --Begin Encumbrance APIs
2402: ------------------------
2403:
2404: -- API to truncate the PO interface table PO_ENCUMBRANCE_GT
2405: PROCEDURE truncate_po_encumbrance_gt IS
2406:
2407: l_progress VARCHAR2(4) := '000';
2408: BEGIN
2409:
2406:
2407: l_progress VARCHAR2(4) := '000';
2408: BEGIN
2409:
2410: DELETE from po_encumbrance_gt;
2411:
2412: EXCEPTION
2413: WHEN OTHERS THEN
2414: RAISE_APPLICATION_ERROR(-20000,
2411:
2412: EXCEPTION
2413: WHEN OTHERS THEN
2414: RAISE_APPLICATION_ERROR(-20000,
2415: 'Exception at POR_UTIL_PKG.truncate_po_encumbrance_gt ' || l_progress ||
2416: 'SQLERRM:' || SQLERRM);
2417:
2418: END truncate_po_encumbrance_gt;
2419:
2414: RAISE_APPLICATION_ERROR(-20000,
2415: 'Exception at POR_UTIL_PKG.truncate_po_encumbrance_gt ' || l_progress ||
2416: 'SQLERRM:' || SQLERRM);
2417:
2418: END truncate_po_encumbrance_gt;
2419:
2420: -- API to populate the distribution data into POs interface table
2421: -- PO_ENCUMBRANCE_GT
2422: PROCEDURE populate_po_encumbrance_gt(
2417:
2418: END truncate_po_encumbrance_gt;
2419:
2420: -- API to populate the distribution data into POs interface table
2421: -- PO_ENCUMBRANCE_GT
2422: PROCEDURE populate_po_encumbrance_gt(
2423: p_dist_data IN ICX_ENC_IN_TYPE) IS
2424:
2425: l_progress VARCHAR2(4) := '000';
2418: END truncate_po_encumbrance_gt;
2419:
2420: -- API to populate the distribution data into POs interface table
2421: -- PO_ENCUMBRANCE_GT
2422: PROCEDURE populate_po_encumbrance_gt(
2423: p_dist_data IN ICX_ENC_IN_TYPE) IS
2424:
2425: l_progress VARCHAR2(4) := '000';
2426: l_header_id ICX_TBL_NUMBER;
2429:
2430: l_header_id := p_dist_data.requisition_header_id;
2431:
2432: FORALL i in 1..l_header_id.count
2433: INSERT INTO po_encumbrance_gt(
2434: adjustment_status,
2435: distribution_type,
2436: header_id,
2437: line_id,
2511:
2512: EXCEPTION
2513: WHEN OTHERS THEN
2514: RAISE_APPLICATION_ERROR(-20000,
2515: 'Exception at POR_UTIL_PKG.populate_po_encumbrance_gt ' || l_progress ||
2516: 'SQLERRM:' || SQLERRM);
2517:
2518: END populate_po_encumbrance_gt;
2519:
2514: RAISE_APPLICATION_ERROR(-20000,
2515: 'Exception at POR_UTIL_PKG.populate_po_encumbrance_gt ' || l_progress ||
2516: 'SQLERRM:' || SQLERRM);
2517:
2518: END populate_po_encumbrance_gt;
2519:
2520: -- API to check if the funds can be reserved on the requisition
2521: -- called during preparer checkout
2522: PROCEDURE check_reserve(
2540:
2541: BEGIN
2542:
2543: -- first truncate the PO global temporary table
2544: truncate_po_encumbrance_gt;
2545:
2546: l_progress := '010';
2547:
2548: -- insert into the PO global temporary table
2545:
2546: l_progress := '010';
2547:
2548: -- insert into the PO global temporary table
2549: -- PO_ENCUMBRANCE_GT
2550: populate_po_encumbrance_gt(p_dist_data);
2551:
2552: l_progress := '020';
2553:
2546: l_progress := '010';
2547:
2548: -- insert into the PO global temporary table
2549: -- PO_ENCUMBRANCE_GT
2550: populate_po_encumbrance_gt(p_dist_data);
2551:
2552: l_progress := '020';
2553:
2554: -- now call the PO check_reserve API
2603:
2604: BEGIN
2605:
2606: -- first truncate the PO global temporary table
2607: truncate_po_encumbrance_gt;
2608:
2609: l_progress := '010';
2610:
2611: -- now insert the old values into the temp table using
2624:
2625: l_progress := '020';
2626:
2627: -- insert into the PO global temporary table
2628: -- PO_ENCUMBRANCE_GT
2629: populate_po_encumbrance_gt(p_dist_data);
2630:
2631: l_progress := '030';
2632:
2625: l_progress := '020';
2626:
2627: -- insert into the PO global temporary table
2628: -- PO_ENCUMBRANCE_GT
2629: populate_po_encumbrance_gt(p_dist_data);
2630:
2631: l_progress := '030';
2632:
2633: -- now call the PO check_adjust API