DBA Data[Home] [Help]

APPS.PO_DOCUMENT_ACTION_CLOSE dependencies on PO_LINE_LOCATIONS

Line 13: TYPE g_tbl_closed_code IS TABLE OF PO_LINE_LOCATIONS.closed_code%TYPE;

9: -- Private package types
10:
11: TYPE g_tbl_number IS TABLE OF NUMBER;
12:
13: TYPE g_tbl_closed_code IS TABLE OF PO_LINE_LOCATIONS.closed_code%TYPE;
14:
15: -- Forward declare private methods
16:
17: FUNCTION manual_close_submission_check(

Line 362: UPDATE po_line_locations poll

358: THEN
359:
360: d_progress := 210;
361:
362: UPDATE po_line_locations poll
363: SET closed_code = 'CLOSED'
364: WHERE poll.line_location_id = p_action_ctl_rec.shipment_id
365: AND poll.closed_code = 'FINALLY CLOSED';
366:

Line 957: FROM po_line_locations_all poll

953: d_progress := 20;
954:
955: SELECT count(*)
956: INTO l_line_finally_closed
957: FROM po_line_locations_all poll
958: , po_lines_all pol
959: , po_releases_all por
960: , po_line_locations_all ppo_ll
961: WHERE poll.line_location_id = p_shipment_id

Line 960: , po_line_locations_all ppo_ll

956: INTO l_line_finally_closed
957: FROM po_line_locations_all poll
958: , po_lines_all pol
959: , po_releases_all por
960: , po_line_locations_all ppo_ll
961: WHERE poll.line_location_id = p_shipment_id
962: AND pol.po_line_id = poll.po_line_id
963: AND por.po_release_id(+) = poll.po_release_id
964: AND ppo_ll.line_location_id(+) = poll.source_shipment_id

Line 2030: FROM po_line_locations poll

2026: d_progress := 41;
2027:
2028: SELECT poll.line_location_id
2029: BULK COLLECT INTO l_id_tbl
2030: FROM po_line_locations poll
2031: WHERE poll.line_location_id = p_shipment_id;
2032:
2033: ELSIF(p_line_id IS NOT NULL)
2034: THEN

Line 2040: FROM po_line_locations poll

2036: d_progress := 42;
2037:
2038: SELECT poll.line_location_id
2039: BULK COLLECT INTO l_id_tbl
2040: FROM po_line_locations poll
2041: WHERE poll.po_line_id = p_line_id;
2042:
2043: ELSIF(p_document_type = 'RELEASE')
2044: THEN

Line 2050: FROM po_line_locations poll

2046: d_progress := 43;
2047:
2048: SELECT poll.line_location_id
2049: BULK COLLECT INTO l_id_tbl
2050: FROM po_line_locations poll
2051: WHERE poll.po_release_id = p_document_id;
2052:
2053: ELSE
2054:

Line 2059: FROM po_line_locations poll

2055: d_progress := 44;
2056:
2057: SELECT poll.line_location_id
2058: BULK COLLECT INTO l_id_tbl
2059: FROM po_line_locations poll
2060: WHERE poll.po_header_id = p_document_id;
2061:
2062: END IF;
2063:

Line 2070: UPDATE po_line_locations poll

2066: --
2067: -- Modifed the exisiting sql for shipment closure dates
2068:
2069: FORALL i IN 1..l_id_tbl.COUNT
2070: UPDATE po_line_locations poll
2071: SET poll.last_update_date = SYSDATE
2072: , poll.last_updated_by = p_user_id
2073: , poll.last_update_login = p_login_id
2074: , poll.closed_date = DECODE(p_action,

Line 2322: FROM po_line_locations poll

2318: d_progress := 10;
2319:
2320: SELECT poll.line_location_id
2321: BULK COLLECT INTO l_id_tbl
2322: FROM po_line_locations poll
2323: WHERE poll.line_location_id = p_shipment_id;
2324:
2325: ELSIF (p_line_id IS NOT NULL)
2326: THEN

Line 2332: FROM po_line_locations poll

2328: d_progress := 20;
2329:
2330: SELECT poll.line_location_id
2331: BULK COLLECT INTO l_id_tbl
2332: FROM po_line_locations poll
2333: WHERE poll.po_line_id = p_line_id
2334: AND poll.po_release_id IS NULL;
2335:
2336: ELSIF (p_document_type = 'RELEASE')

Line 2343: FROM po_line_locations poll

2339: d_progress := 30;
2340:
2341: SELECT poll.line_location_id
2342: BULK COLLECT INTO l_id_tbl
2343: FROM po_line_locations poll
2344: WHERE poll.po_release_id = p_document_id;
2345:
2346: ELSE
2347:

Line 2352: FROM po_line_locations poll

2348: d_progress := 40;
2349:
2350: SELECT poll.line_location_id
2351: BULK COLLECT INTO l_id_tbl
2352: FROM po_line_locations poll
2353: WHERE poll.po_header_id = p_document_id
2354: AND poll.po_release_id IS NULL;
2355:
2356: END IF;

Line 2395: UPDATE po_line_locations poll

2391:
2392: d_progress := 50;
2393:
2394: FORALL i IN 1..l_id_tbl.COUNT
2395: UPDATE po_line_locations poll
2396: SET poll.closed_code =
2397: (
2398: SELECT DECODE(poll.matching_basis,
2399: 'AMOUNT',

Line 2539: UPDATE po_line_locations poll

2535:
2536: d_progress := 70;
2537:
2538: FORALL i IN 1..l_id_tbl.COUNT
2539: UPDATE po_line_locations poll
2540: SET poll.closed_code =
2541: (
2542: SELECT DECODE(poll.matching_basis,
2543: 'AMOUNT',

Line 2647: UPDATE po_line_locations poll

2643:
2644: d_progress := 90;
2645:
2646: FORALL i IN 1..l_id_tbl.COUNT
2647: UPDATE po_line_locations poll
2648: SET poll.closed_code =
2649: (
2650: SELECT DECODE(poll.matching_basis,
2651: 'AMOUNT',

Line 2723: UPDATE po_line_locations poll

2719: -- previously, the closed_code <> CLOSED and = CLOSED were split up
2720: -- Bug 5480524: removed the closed date is null and <> open condition
2721: -- as thats not required.
2722: FORALL i IN 1..l_id_tbl.COUNT
2723: UPDATE po_line_locations poll
2724: SET poll.closed_date = DECODE(NVL(poll.closed_code, 'OPEN'), 'CLOSED', SYSDATE, NULL)
2725: , poll.closed_reason = DECODE(NVL(poll.closed_code, 'OPEN'), 'CLOSED', p_reason, NULL)
2726: , poll.closed_by = DECODE(NVL(poll.closed_code, 'OPEN'), 'CLOSED', p_employee_id, NULL)
2727: WHERE poll.line_location_id = l_id_tbl(i)

Line 2736: -- use po_line_locations instead of po_line_locations all

2732: d_progress := 210;
2733:
2734: --
2735: -- update the shipment closure dates
2736: -- use po_line_locations instead of po_line_locations all
2737: -- this is to leverage l_id_tbl from above
2738:
2739: FORALL i IN 1..l_id_tbl.COUNT
2740: UPDATE po_line_locations poll

Line 2740: UPDATE po_line_locations poll

2736: -- use po_line_locations instead of po_line_locations all
2737: -- this is to leverage l_id_tbl from above
2738:
2739: FORALL i IN 1..l_id_tbl.COUNT
2740: UPDATE po_line_locations poll
2741: SET poll.shipment_closed_date = DECODE(poll.closed_code,
2742: 'CLOSED', NVL(poll.shipment_closed_date,
2743: PO_ACTIONS.get_closure_dates('CLOSE', poll.line_location_id)),
2744: NULL)

Line 2823: l_none_open_one_closed PO_LINE_LOCATIONS.closed_code%TYPE;

2819:
2820: l_hist_action VARCHAR2(30);
2821: l_update_action_hist BOOLEAN;
2822:
2823: l_none_open_one_closed PO_LINE_LOCATIONS.closed_code%TYPE;
2824: l_all_finally_closed PO_LINE_LOCATIONS.closed_code%TYPE;
2825:
2826:
2827: -- we use cursors for performance reasons during create releases

Line 2824: l_all_finally_closed PO_LINE_LOCATIONS.closed_code%TYPE;

2820: l_hist_action VARCHAR2(30);
2821: l_update_action_hist BOOLEAN;
2822:
2823: l_none_open_one_closed PO_LINE_LOCATIONS.closed_code%TYPE;
2824: l_all_finally_closed PO_LINE_LOCATIONS.closed_code%TYPE;
2825:
2826:
2827: -- we use cursors for performance reasons during create releases
2828: -- See: Bug 1834138 (perf issue) and Bug 2361826 (bug in cursor)

Line 2832: FROM po_line_locations poll

2828: -- See: Bug 1834138 (perf issue) and Bug 2361826 (bug in cursor)
2829:
2830: CURSOR rollup_rel_open(p_rel_id NUMBER) IS
2831: SELECT 'OPEN'
2832: FROM po_line_locations poll
2833: WHERE poll.po_release_id = p_rel_id
2834: AND NVL(poll.closed_code, 'OPEN') IN ('OPEN', 'CLOSED FOR INVOICE', 'CLOSED FOR RECEIVING')
2835: AND rownum = 1;
2836:

Line 2839: FROM po_line_locations poll

2835: AND rownum = 1;
2836:
2837: CURSOR rollup_rel_not_fc(p_rel_id NUMBER) IS
2838: SELECT 'CLOSED'
2839: FROM po_line_locations poll
2840: WHERE poll.po_release_id = p_rel_id
2841: AND NVL(poll.closed_code, 'CLOSED') = 'CLOSED'
2842: AND rownum = 1;
2843:

Line 2883: FROM po_line_locations poll

2879: BULK COLLECT INTO l_lineid_tbl
2880: FROM po_lines pol
2881: WHERE pol.po_line_id =
2882: ( SELECT poll.po_line_id
2883: FROM po_line_locations poll
2884: WHERE poll.line_location_id = p_shipment_id)
2885: ;
2886:
2887: ELSIF (p_line_id IS NOT NULL)

Line 2960: FROM po_line_locations poll

2956: 3, 'OPEN',
2957: 2, l_none_open_one_closed,
2958: 1, l_all_finally_closed )
2959: INTO l_rollup_code
2960: FROM po_line_locations poll
2961: WHERE poll.po_line_id = l_lineid_tbl(i)
2962: AND poll.po_release_id IS NULL
2963: AND poll.shipment_type <> 'PREPAYMENT'; --
2964:

Line 3490: FROM po_line_locations poll

3486: d_progress := 10;
3487:
3488: SELECT poll.line_location_id, poll.closed_code
3489: BULK COLLECT INTO l_ship_id_tbl, l_closed_code_tbl
3490: FROM po_line_locations poll
3491: WHERE poll.line_location_id = p_shipment_id
3492: AND NVL(poll.approved_flag, 'N') = 'Y'
3493: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3494:

Line 3502: FROM po_line_locations poll

3498: d_progress := 20;
3499:
3500: SELECT poll.line_location_id, poll.closed_code
3501: BULK COLLECT INTO l_ship_id_tbl, l_closed_code_tbl
3502: FROM po_line_locations poll
3503: WHERE poll.po_line_id = p_line_id
3504: AND NVL(poll.approved_flag, 'N') = 'Y'
3505: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3506:

Line 3514: FROM po_line_locations poll

3510: d_progress := 30;
3511:
3512: SELECT poll.line_location_id, poll.closed_code
3513: BULK COLLECT INTO l_ship_id_tbl, l_closed_code_tbl
3514: FROM po_line_locations poll
3515: WHERE poll.po_release_id = p_document_id
3516: AND NVL(poll.approved_flag, 'N') = 'Y'
3517: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3518:

Line 3525: FROM po_line_locations poll

3521: d_progress := 40;
3522:
3523: SELECT poll.line_location_id, poll.closed_code
3524: BULK COLLECT INTO l_ship_id_tbl, l_closed_code_tbl
3525: FROM po_line_locations poll
3526: WHERE poll.po_header_id = p_document_id
3527: AND NVL(poll.approved_flag, 'N') = 'Y'
3528: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3529: