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 1034: FROM po_line_locations_all poll

1030: d_progress := 20;
1031:
1032: SELECT count(*)
1033: INTO l_line_finally_closed
1034: FROM po_line_locations_all poll
1035: , po_lines_all pol
1036: , po_releases_all por
1037: , po_line_locations_all ppo_ll
1038: WHERE poll.line_location_id = p_shipment_id

Line 1037: , po_line_locations_all ppo_ll

1033: INTO l_line_finally_closed
1034: FROM po_line_locations_all poll
1035: , po_lines_all pol
1036: , po_releases_all por
1037: , po_line_locations_all ppo_ll
1038: WHERE poll.line_location_id = p_shipment_id
1039: AND pol.po_line_id = poll.po_line_id
1040: AND por.po_release_id(+) = poll.po_release_id
1041: AND ppo_ll.line_location_id(+) = poll.source_shipment_id

Line 2114: FROM po_line_locations poll

2110: d_progress := 41;
2111:
2112: SELECT poll.line_location_id
2113: BULK COLLECT INTO l_id_tbl
2114: FROM po_line_locations poll
2115: WHERE poll.line_location_id = p_shipment_id;
2116:
2117: ELSIF(p_line_id IS NOT NULL)
2118: THEN

Line 2124: FROM po_line_locations poll

2120: d_progress := 42;
2121:
2122: SELECT poll.line_location_id
2123: BULK COLLECT INTO l_id_tbl
2124: FROM po_line_locations poll
2125: WHERE poll.po_line_id = p_line_id;
2126:
2127: ELSIF(p_document_type = 'RELEASE')
2128: THEN

Line 2134: FROM po_line_locations poll

2130: d_progress := 43;
2131:
2132: SELECT poll.line_location_id
2133: BULK COLLECT INTO l_id_tbl
2134: FROM po_line_locations poll
2135: WHERE poll.po_release_id = p_document_id;
2136:
2137: ELSE
2138:

Line 2143: FROM po_line_locations poll

2139: d_progress := 44;
2140:
2141: SELECT poll.line_location_id
2142: BULK COLLECT INTO l_id_tbl
2143: FROM po_line_locations poll
2144: WHERE poll.po_header_id = p_document_id;
2145:
2146: END IF;
2147:

Line 2154: UPDATE po_line_locations poll

2150: --
2151: -- Modifed the exisiting sql for shipment closure dates
2152:
2153: FORALL i IN 1..l_id_tbl.COUNT
2154: UPDATE po_line_locations poll
2155: SET poll.last_update_date = SYSDATE
2156: , poll.last_updated_by = p_user_id
2157: , poll.last_update_login = p_login_id
2158: , poll.closed_date = DECODE(p_action,

Line 2453: FROM po_line_locations poll

2449: d_progress := 10;
2450:
2451: SELECT poll.line_location_id,poll.closed_code
2452: BULK COLLECT INTO l_id_tbl,l_closed_code_tbl
2453: FROM po_line_locations poll
2454: WHERE poll.line_location_id = p_shipment_id;
2455:
2456: ELSIF (p_line_id IS NOT NULL)
2457: THEN

Line 2463: FROM po_line_locations poll

2459: d_progress := 20;
2460:
2461: SELECT poll.line_location_id,poll.closed_code
2462: BULK COLLECT INTO l_id_tbl,l_closed_code_tbl
2463: FROM po_line_locations poll
2464: WHERE poll.po_line_id = p_line_id
2465: AND poll.po_release_id IS NULL;
2466:
2467: ELSIF (p_document_type = 'RELEASE')

Line 2474: FROM po_line_locations poll

2470: d_progress := 30;
2471:
2472: SELECT poll.line_location_id,poll.closed_code
2473: BULK COLLECT INTO l_id_tbl,l_closed_code_tbl
2474: FROM po_line_locations poll
2475: WHERE poll.po_release_id = p_document_id;
2476:
2477: ELSE
2478:

Line 2483: FROM po_line_locations poll

2479: d_progress := 40;
2480:
2481: SELECT poll.line_location_id,poll.closed_code
2482: BULK COLLECT INTO l_id_tbl,l_closed_code_tbl
2483: FROM po_line_locations poll
2484: WHERE poll.po_header_id = p_document_id
2485: AND poll.po_release_id IS NULL;
2486:
2487: END IF;

Line 2553: UPDATE po_line_locations poll

2549: IF (l_authorization_status IN ('REQUIRES REAPPROVAL', 'IN PROCESS')) THEN
2550: FORALL i IN 1..l_id_tbl.Count
2551:
2552:
2553: UPDATE po_line_locations poll
2554: SET poll.closed_code =
2555: (
2556: SELECT DECODE(poll.matching_basis,
2557: 'AMOUNT',

Line 2672: UPDATE po_line_locations poll

2668:
2669: --
2670: d_progress := 60;
2671: FORALL i IN 1..l_id_tbl.Count
2672: UPDATE po_line_locations poll
2673: SET poll.closed_code =
2674: (
2675: SELECT DECODE(poll.matching_basis,
2676: 'AMOUNT',

Line 2820: UPDATE po_line_locations poll

2816:
2817: d_progress := 80;
2818:
2819: FORALL i IN 1..l_id_tbl.COUNT
2820: UPDATE po_line_locations poll
2821: SET poll.closed_code =
2822: (
2823: SELECT DECODE(poll.matching_basis,
2824: 'AMOUNT',

Line 2933: UPDATE po_line_locations poll

2929:
2930: d_progress := 100;
2931:
2932: FORALL i IN 1..l_id_tbl.COUNT
2933: UPDATE po_line_locations poll
2934: SET poll.closed_code =
2935: (
2936: SELECT DECODE(poll.matching_basis,
2937: 'AMOUNT',

Line 3013: UPDATE po_line_locations poll

3009: -- previously, the closed_code <> CLOSED and = CLOSED were split up
3010: -- Bug 5480524: removed the closed date is null and <> open condition
3011: -- as thats not required.
3012: FORALL i IN 1..l_id_tbl.COUNT
3013: UPDATE po_line_locations poll
3014: SET poll.closed_date = DECODE(NVL(poll.closed_code, 'OPEN'), 'CLOSED', SYSDATE, NULL)
3015: , poll.closed_reason = DECODE(NVL(poll.closed_code, 'OPEN'), 'CLOSED', p_reason, NULL)
3016: , poll.closed_by = DECODE(NVL(poll.closed_code, 'OPEN'), 'CLOSED', p_employee_id, NULL)
3017: WHERE POLL.LINE_LOCATION_ID = L_ID_TBL(I)

Line 3027: -- use po_line_locations instead of po_line_locations all

3023: d_progress := 210;
3024:
3025: --
3026: -- update the shipment closure dates
3027: -- use po_line_locations instead of po_line_locations all
3028: -- this is to leverage l_id_tbl from above
3029:
3030: FORALL i IN 1..l_id_tbl.COUNT
3031: UPDATE po_line_locations poll

Line 3031: UPDATE po_line_locations poll

3027: -- use po_line_locations instead of po_line_locations all
3028: -- this is to leverage l_id_tbl from above
3029:
3030: FORALL i IN 1..l_id_tbl.COUNT
3031: UPDATE po_line_locations poll
3032: SET poll.shipment_closed_date = DECODE(poll.closed_code,
3033: 'CLOSED', NVL(poll.shipment_closed_date,
3034: PO_ACTIONS.get_closure_dates('CLOSE', poll.line_location_id)),
3035: NULL)

Line 3116: l_none_open_one_closed PO_LINE_LOCATIONS.closed_code%TYPE;

3112:
3113: l_hist_action VARCHAR2(30);
3114: l_update_action_hist BOOLEAN;
3115:
3116: l_none_open_one_closed PO_LINE_LOCATIONS.closed_code%TYPE;
3117: l_all_finally_closed PO_LINE_LOCATIONS.closed_code%TYPE;
3118:
3119:
3120: -- we use cursors for performance reasons during create releases

Line 3117: l_all_finally_closed PO_LINE_LOCATIONS.closed_code%TYPE;

3113: l_hist_action VARCHAR2(30);
3114: l_update_action_hist BOOLEAN;
3115:
3116: l_none_open_one_closed PO_LINE_LOCATIONS.closed_code%TYPE;
3117: l_all_finally_closed PO_LINE_LOCATIONS.closed_code%TYPE;
3118:
3119:
3120: -- we use cursors for performance reasons during create releases
3121: -- See: Bug 1834138 (perf issue) and Bug 2361826 (bug in cursor)

Line 3125: FROM po_line_locations poll

3121: -- See: Bug 1834138 (perf issue) and Bug 2361826 (bug in cursor)
3122:
3123: CURSOR rollup_rel_open(p_rel_id NUMBER) IS
3124: SELECT 'OPEN'
3125: FROM po_line_locations poll
3126: WHERE poll.po_release_id = p_rel_id
3127: AND NVL(poll.closed_code, 'OPEN') IN ('OPEN', 'CLOSED FOR INVOICE', 'CLOSED FOR RECEIVING')
3128: AND rownum = 1;
3129:

Line 3132: FROM po_line_locations poll

3128: AND rownum = 1;
3129:
3130: CURSOR rollup_rel_not_fc(p_rel_id NUMBER) IS
3131: SELECT 'CLOSED'
3132: FROM po_line_locations poll
3133: WHERE poll.po_release_id = p_rel_id
3134: AND NVL(poll.closed_code, 'CLOSED') = 'CLOSED'
3135: AND rownum = 1;
3136:

Line 3176: FROM po_line_locations poll

3172: BULK COLLECT INTO l_lineid_tbl
3173: FROM po_lines pol
3174: WHERE pol.po_line_id =
3175: ( SELECT poll.po_line_id
3176: FROM po_line_locations poll
3177: WHERE poll.line_location_id = p_shipment_id)
3178: ;
3179:
3180: ELSIF (p_line_id IS NOT NULL)

Line 3253: FROM po_line_locations poll

3249: 3, 'OPEN',
3250: 2, l_none_open_one_closed,
3251: 1, l_all_finally_closed )
3252: INTO l_rollup_code
3253: FROM po_line_locations poll
3254: WHERE poll.po_line_id = l_lineid_tbl(i)
3255: AND poll.po_release_id IS NULL
3256: AND poll.shipment_type <> 'PREPAYMENT'; --
3257:

Line 3783: FROM po_line_locations poll

3779: d_progress := 10;
3780:
3781: SELECT poll.line_location_id, poll.closed_code
3782: BULK COLLECT INTO l_ship_id_tbl, l_closed_code_tbl
3783: FROM po_line_locations poll
3784: WHERE poll.line_location_id = p_shipment_id
3785: AND NVL(poll.approved_flag, 'N') = 'Y'
3786: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3787:

Line 3795: FROM po_line_locations poll

3791: d_progress := 20;
3792:
3793: SELECT poll.line_location_id, poll.closed_code
3794: BULK COLLECT INTO l_ship_id_tbl, l_closed_code_tbl
3795: FROM po_line_locations poll
3796: WHERE poll.po_line_id = p_line_id
3797: AND NVL(poll.approved_flag, 'N') = 'Y'
3798: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3799:

Line 3807: FROM po_line_locations poll

3803: d_progress := 30;
3804:
3805: SELECT poll.line_location_id, poll.closed_code
3806: BULK COLLECT INTO l_ship_id_tbl, l_closed_code_tbl
3807: FROM po_line_locations poll
3808: WHERE poll.po_release_id = p_document_id
3809: AND NVL(poll.approved_flag, 'N') = 'Y'
3810: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3811:

Line 3818: FROM po_line_locations poll

3814: d_progress := 40;
3815:
3816: SELECT poll.line_location_id, poll.closed_code
3817: BULK COLLECT INTO l_ship_id_tbl, l_closed_code_tbl
3818: FROM po_line_locations poll
3819: WHERE poll.po_header_id = p_document_id
3820: AND NVL(poll.approved_flag, 'N') = 'Y'
3821: AND NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3822: