DBA Data[Home] [Help]

APPS.PO_DOCUMENT_UPDATE_PVT dependencies on PO_LINE_LOCATIONS

Line 156: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

152: x_return_status OUT NOCOPY VARCHAR2
153: );
154:
155: PROCEDURE get_release_break_price (
156: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
157: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
158: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
159: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
160: x_price OUT NOCOPY PO_LINES.unit_price%TYPE

Line 157: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,

153: );
154:
155: PROCEDURE get_release_break_price (
156: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
157: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
158: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
159: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
160: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
161: );

Line 158: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,

154:
155: PROCEDURE get_release_break_price (
156: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
157: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
158: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
159: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
160: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
161: );
162:

Line 159: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,

155: PROCEDURE get_release_break_price (
156: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
157: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
158: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
159: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
160: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
161: );
162:
163: PROCEDURE get_po_break_price (

Line 166: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

162:
163: PROCEDURE get_po_break_price (
164: p_po_line_id IN PO_LINES.po_line_id%TYPE,
165: p_quantity IN PO_LINES.quantity%TYPE,
166: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
167: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
168: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
169: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
170: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,

Line 167: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,

163: PROCEDURE get_po_break_price (
164: p_po_line_id IN PO_LINES.po_line_id%TYPE,
165: p_quantity IN PO_LINES.quantity%TYPE,
166: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
167: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
168: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
169: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
170: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,
171: --

Line 168: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,

164: p_po_line_id IN PO_LINES.po_line_id%TYPE,
165: p_quantity IN PO_LINES.quantity%TYPE,
166: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
167: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
168: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
169: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
170: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,
171: --
172: x_base_unit_price OUT NOCOPY PO_LINES.base_unit_price%TYPE

Line 803: p_table_name => 'PO_LINE_LOCATIONS_ALL',

799: add_error (
800: p_api_errors => g_api_errors,
801: x_return_status => x_return_status,
802: p_message_name => 'PO_GENERIC_ERROR',
803: p_table_name => 'PO_LINE_LOCATIONS_ALL',
804: p_token_name1 => 'ERROR_TEXT',
805: p_token_value1 => 'You cannot specify both po_line_location_id and parent_line_location_id / split_shipment_num for a shipment change.',
806: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
807: p_entity_id => i

Line 815: FROM po_line_locations

811: BEGIN
812: IF (g_po_header_id IS NOT NULL) THEN -- PO / PA
813: SELECT 1
814: INTO l_dummy
815: FROM po_line_locations
816: WHERE po_header_id = g_po_header_id
817: AND line_location_id =
818: NVL(p_chg.shipment_changes.po_line_location_id(i),
819: p_chg.shipment_changes.parent_line_location_id(i));

Line 823: FROM po_line_locations

819: p_chg.shipment_changes.parent_line_location_id(i));
820: ELSE -- release
821: SELECT 1
822: INTO l_dummy
823: FROM po_line_locations
824: WHERE po_release_id = g_po_release_id
825: AND line_location_id =
826: NVL(p_chg.shipment_changes.po_line_location_id(i),
827: p_chg.shipment_changes.parent_line_location_id(i));

Line 836: p_table_name => 'PO_LINE_LOCATIONS_ALL',

832: add_error (
833: p_api_errors => g_api_errors,
834: x_return_status => x_return_status,
835: p_message_name => 'PO_INVALID_DOC_IDS',
836: p_table_name => 'PO_LINE_LOCATIONS_ALL',
837: p_column_name => 'LINE_LOCATION_ID',
838: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
839: p_entity_id => i
840: );

Line 1203: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

1199: PROCEDURE populate_ship_cached_fields (
1200: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
1201: i IN NUMBER
1202: ) IS
1203: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
1204: BEGIN
1205: l_parent_line_loc_id := p_chg.shipment_changes.parent_line_location_id(i);
1206:
1207: -- SQL What: Retrieve all the database field values that will be needed

Line 1316: FROM po_line_locations PLL,

1312: -- :
1313: p_chg.shipment_changes.t_manual_price_change_flag(i),
1314: p_chg.shipment_changes.c_preferred_grade(i) -- INVCONV sschinch 09/07/04
1315: --p_chg.shipment_changes.c_payment_type(i)
1316: FROM po_line_locations PLL,
1317: po_lines POL,
1318: po_line_types PLT,
1319: mtl_system_items_b MSI,
1320: financials_system_parameters FSP

Line 1443: FROM po_distributions POD, po_lines POL, po_line_types PLT,po_line_locations_all PLL --

1439: p_chg.distribution_changes.c_distribution_num(i),
1440: p_chg.distribution_changes.c_encumbered_flag(i),
1441: p_chg.distribution_changes.c_req_distribution_id(i),
1442: p_chg.distribution_changes.c_creation_date(i)
1443: FROM po_distributions POD, po_lines POL, po_line_types PLT,po_line_locations_all PLL -- 1444: WHERE POD.po_distribution_id =
1445: NVL( p_chg.distribution_changes.parent_distribution_id(i), -- split dist
1446: p_chg.distribution_changes.po_distribution_id(i) ) -- existing dist
1447: AND POL.po_line_id = POD.po_line_id -- JOIN

Line 1754: FROM po_line_locations

1750: -- SQL What: Returns the number of standard/planned shipments
1751: -- for this line that are not cancelled or finally closed.
1752: SELECT count(*)
1753: INTO l_shipment_count
1754: FROM po_line_locations
1755: WHERE po_line_id = p_chg.line_changes.po_line_id(i)
1756: AND shipment_type in ('STANDARD', 'PLANNED')
1757: AND nvl(cancel_flag,'N') <> 'Y'
1758: AND NVL(closed_code,'OPEN') <> 'FINALLY CLOSED';

Line 1937: * p_table_name => 'PO_LINE_LOCATIONS_ALL',

1933: *
1934: * add_error ( p_api_errors => g_api_errors,
1935: * x_return_status => x_return_status,
1936: * p_message_name => 'PO_CHNG_QTY2_NO_UOM2',
1937: * p_table_name => 'PO_LINE_LOCATIONS_ALL',
1938: * p_column_name => 'SECONDARY_QUANTITY',
1939: * p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
1940: * p_entity_id => i );
1941: *END IF;

Line 1952: p_table_name => 'PO_LINE_LOCATIONS_ALL',

1948: g_document_type = 'PA' THEN
1949: add_error ( p_api_errors => g_api_errors,
1950: x_return_status => x_return_status,
1951: p_message_name => 'PO_CHNG_QTY2_GRADE_PA',
1952: p_table_name => 'PO_LINE_LOCATIONS_ALL',
1953: p_column_name => 'SECONDARY_QUANTITY',
1954: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
1955: p_entity_id => i );
1956: END IF;

Line 1972: p_table_name => 'PO_LINE_LOCATIONS_ALL',

1968: IF l_grade_control_flag = 'N' THEN
1969: add_error ( p_api_errors => g_api_errors,
1970: x_return_status => x_return_status,
1971: p_message_name => ' INV_ITEM_NOT_GRADE_CTRL_EXP',
1972: p_table_name => 'PO_LINE_LOCATIONS_ALL',
1973: p_column_name => 'PREFERRED_GRADE',
1974: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
1975: p_entity_id => i);
1976: END IF;

Line 1991: p_table_name => 'PO_LINE_LOCATIONS_ALL',

1987:
1988: add_error ( p_api_errors => g_api_errors,
1989: x_return_status => x_return_status,
1990: p_message_name => 'PO_CHNG_QTY2_NO_QTY',
1991: p_table_name => 'PO_LINE_LOCATIONS_ALL',
1992: p_column_name => 'SECONDARY_QUANTITY',
1993: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
1994: p_entity_id => i );
1995: END IF;

Line 2012: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2008: AND (p_chg.shipment_changes.amount(i) IS NULL) THEN
2009: add_error ( p_api_errors => g_api_errors,
2010: x_return_status => x_return_status,
2011: p_message_name => 'PO_CHNG_SPLIT_SHIP_QTY_AMT',
2012: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2013: p_column_name => NULL,
2014: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2015: p_entity_id => i );
2016: END IF;

Line 2026: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2022: IF (p_chg.shipment_changes.split_shipment_num(i) IS NULL) THEN
2023: add_error ( p_api_errors => g_api_errors,
2024: x_return_status => x_return_status,
2025: p_message_name => 'PO_CHNG_UNIQUE_SPLIT_SHIP_NUM',
2026: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2027: p_column_name => NULL,
2028: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2029: p_entity_id => i );
2030: END IF;

Line 2044: FROM po_line_locations

2040: -- release with the given split shipment number, 0 otherwise.
2041: -- SQL Why: To determine if the given split shipment number is unique.
2042: SELECT count(*)
2043: INTO l_shipment_count
2044: FROM po_line_locations
2045: WHERE po_line_id = p_chg.shipment_changes.c_po_line_id(i)
2046: AND shipment_num = p_chg.shipment_changes.split_shipment_num(i)
2047: AND NVL(po_release_id,-1) = NVL(g_po_release_id,-1);
2048:

Line 2054: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2050: OR (NOT is_split_shipment_num_unique(p_chg,i)) THEN
2051: add_error ( p_api_errors => g_api_errors,
2052: x_return_status => x_return_status,
2053: p_message_name => 'PO_CHNG_UNIQUE_SPLIT_SHIP_NUM',
2054: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2055: p_column_name => NULL,
2056: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2057: p_entity_id => i );
2058: END IF;

Line 2069: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2065: IF (p_chg.shipment_changes.delete_record(i) = G_PARAMETER_YES) THEN
2066: add_error ( p_api_errors => g_api_errors,
2067: x_return_status => x_return_status,
2068: p_message_name => 'PO_CHNG_SPLIT_SHIP_NO_DELETE',
2069: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2070: p_column_name => NULL,
2071: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2072: p_entity_id => i );
2073: END IF; -- delete_record

Line 2235: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2231: IF (p_chg.shipment_changes.promised_date(i) IS NOT NULL) THEN
2232: add_error ( p_api_errors => g_api_errors,
2233: x_return_status => x_return_status,
2234: p_message_name => 'PO_CHNG_BLKT_SHIP_BAD_FIELD',
2235: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2236: p_column_name => 'PROMISED_DATE',
2237: p_token_name1 => 'COLUMN_NAME',
2238: p_token_value1 => 'PROMISED_DATE',
2239: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,

Line 2247: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2243: IF (p_chg.shipment_changes.need_by_date(i) IS NOT NULL) THEN
2244: add_error ( p_api_errors => g_api_errors,
2245: x_return_status => x_return_status,
2246: p_message_name => 'PO_CHNG_BLKT_SHIP_BAD_FIELD',
2247: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2248: p_column_name => 'NEED_BY_DATE',
2249: p_token_name1 => 'COLUMN_NAME',
2250: p_token_value1 => 'NEED_BY_DATE',
2251: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,

Line 2259: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2255: IF (p_chg.shipment_changes.parent_line_location_id(i) IS NOT NULL) THEN
2256: add_error ( p_api_errors => g_api_errors,
2257: x_return_status => x_return_status,
2258: p_message_name => 'PO_CHNG_BLKT_NO_SPLIT_SHIP',
2259: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2260: p_column_name => null,
2261: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2262: p_entity_id => i );
2263: END IF;

Line 2306: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2302:
2303: add_error ( p_api_errors => g_api_errors,
2304: x_return_status => x_return_status,
2305: p_message_name => 'PO_CHNG_PO_NO_SHIP_PRICE',
2306: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2307: p_column_name => 'PRICE_OVERRIDE',
2308: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2309: p_entity_id => G_ENTITY_TYPE_LINES );
2310: END IF;

Line 2432: p_table_name => 'PO_LINE_LOCATIONS_ALL',p_column_name => 'PRICE',

2428:
2429: IF (p_chg.shipment_changes.price_override(i) IS NOT NULL ) THEN
2430: add_error( p_api_errors => g_api_errors,x_return_status => x_return_status,
2431: p_message_name => 'PO_NO_PRICE_CHNG_FP_LINES',
2432: p_table_name => 'PO_LINE_LOCATIONS_ALL',p_column_name => 'PRICE',
2433: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,p_entity_id => i);
2434: END IF;
2435: ELSIF (p_chg.shipment_changes.c_value_basis(i) = 'AMOUNT') THEN
2436: ------------------------------------------------------------------------

Line 2443: p_table_name => 'PO_LINE_LOCATIONS_ALL',p_column_name => 'PRICE',

2439:
2440: IF (p_chg.shipment_changes.price_override(i) IS NOT NULL ) THEN
2441: add_error( p_api_errors => g_api_errors,x_return_status => x_return_status,
2442: p_message_name => 'PO_NO_PRICE_CHNG_AMT_LINES',
2443: p_table_name => 'PO_LINE_LOCATIONS_ALL',p_column_name => 'PRICE',
2444: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,p_entity_id => i);
2445: END IF;
2446: END IF;
2447: --< BUG 5406211 END >

Line 2461: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2457: IF (p_chg.shipment_changes.quantity(i) IS NOT NULL) THEN
2458: add_error ( p_api_errors => g_api_errors,
2459: x_return_status => x_return_status,
2460: p_message_name => 'PO_SVC_NO_QTY',
2461: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2462: p_column_name => 'QUANTITY',
2463: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2464: p_entity_id => i );
2465: END IF;

Line 2479: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2475: IF (p_chg.shipment_changes.amount(i) IS NOT NULL) THEN
2476: add_error ( p_api_errors => g_api_errors,
2477: x_return_status => x_return_status,
2478: p_message_name => 'PO_SVC_NO_AMT',
2479: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2480: p_column_name => 'AMOUNT',
2481: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2482: p_entity_id => i );
2483: END IF;

Line 2497: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2493: IF (p_chg.shipment_changes.need_by_date(i) IS NOT NULL) THEN
2494: add_error ( p_api_errors => g_api_errors,
2495: x_return_status => x_return_status,
2496: p_message_name => 'PO_SVC_NO_NEED_PROMISE_DATE',
2497: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2498: p_column_name => 'NEED_BY_DATE',
2499: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2500: p_entity_id => i );
2501: END IF;

Line 2507: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2503: IF (p_chg.shipment_changes.promised_date(i) IS NOT NULL) THEN
2504: add_error ( p_api_errors => g_api_errors,
2505: x_return_status => x_return_status,
2506: p_message_name => 'PO_SVC_NO_NEED_PROMISE_DATE',
2507: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2508: p_column_name => 'PROMISED_DATE',
2509: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2510: p_entity_id => i );
2511: END IF;

Line 2525: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2521: AND (p_chg.shipment_changes.c_purchase_basis(i) = 'TEMP LABOR') THEN
2522: add_error ( p_api_errors => g_api_errors,
2523: x_return_status => x_return_status,
2524: p_message_name => 'PO_SVC_NO_SPLIT_SHIPMENT',
2525: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2526: p_column_name => null,
2527: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2528: p_entity_id => i );
2529: END IF; -- parent line location ID is not null

Line 2643: l_table_name := 'PO_LINE_LOCATIONS_ALL';

2639: l_new_secondary_quantity := p_chg.shipment_changes.secondary_quantity(i);
2640: l_sec_qty_column_name := 'SECONDARY_QUANTITY';
2641: /*END INVCONV sschinch 09/07/04 */
2642:
2643: l_table_name := 'PO_LINE_LOCATIONS_ALL';
2644: l_qty_column_name := 'QUANTITY';
2645: l_price_column_name := 'PRICE_OVERRIDE';
2646: l_amt_column_name := 'AMOUNT';
2647: ELSE -- PO_DISTRIBUTIONS_REC_TYPE

Line 2739: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;

2735: p_chg IN PO_CHANGES_REC_TYPE,
2736: i IN NUMBER
2737: ) RETURN BOOLEAN IS
2738: l_po_line_id PO_LINES.po_line_id%TYPE;
2739: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
2740: l_ship_chg_i NUMBER;
2741: BEGIN
2742: -- Get the PO_LINE_ID and split shipment num for the i-th shipment change.
2743: l_po_line_id := p_chg.shipment_changes.c_po_line_id(i);

Line 2911: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

2907: FUNCTION ship_has_dist_qty_amt_change (
2908: p_chg IN PO_CHANGES_REC_TYPE,
2909: i IN NUMBER
2910: ) RETURN BOOLEAN IS
2911: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2912: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2913: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
2914: l_dist_chg_i NUMBER;
2915: BEGIN

Line 2912: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

2908: p_chg IN PO_CHANGES_REC_TYPE,
2909: i IN NUMBER
2910: ) RETURN BOOLEAN IS
2911: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2912: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2913: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
2914: l_dist_chg_i NUMBER;
2915: BEGIN
2916: l_line_location_id := p_chg.shipment_changes.po_line_location_id(i);

Line 2913: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;

2909: i IN NUMBER
2910: ) RETURN BOOLEAN IS
2911: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2912: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2913: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
2914: l_dist_chg_i NUMBER;
2915: BEGIN
2916: l_line_location_id := p_chg.shipment_changes.po_line_location_id(i);
2917:

Line 3002: FROM po_line_locations

2998: -- SQL Why: To roll down a line price change on a standard/planned PO
2999: -- to the shipments of that line.
3000: CURSOR po_shipment_csr (p_po_line_id PO_LINES.po_line_id%TYPE) IS
3001: SELECT line_location_id
3002: FROM po_line_locations
3003: WHERE po_line_id = p_po_line_id
3004: AND (NVL(cancel_flag,'N') <> 'Y')
3005: AND (NVL(closed_code,'OPEN') <> 'FINALLY CLOSED')
3006: AND shipment_type IN ('PLANNED','STANDARD');

Line 3009: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

3005: AND (NVL(closed_code,'OPEN') <> 'FINALLY CLOSED')
3006: AND shipment_type IN ('PLANNED','STANDARD');
3007:
3008: l_po_line_id PO_LINES.po_line_id%TYPE;
3009: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3010: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3011: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3012: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3013: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

Line 3010: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;

3006: AND shipment_type IN ('PLANNED','STANDARD');
3007:
3008: l_po_line_id PO_LINES.po_line_id%TYPE;
3009: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3010: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3011: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3012: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3013: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
3014: l_price_break_id PO_LINES.from_line_location_id%TYPE;

Line 3011: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;

3007:
3008: l_po_line_id PO_LINES.po_line_id%TYPE;
3009: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3010: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3011: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3012: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3013: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
3014: l_price_break_id PO_LINES.from_line_location_id%TYPE;
3015: l_cur_uom2 PO_LINES.secondary_unit_of_measure%TYPE;

Line 3012: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;

3008: l_po_line_id PO_LINES.po_line_id%TYPE;
3009: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3010: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3011: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3012: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3013: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
3014: l_price_break_id PO_LINES.from_line_location_id%TYPE;
3015: l_cur_uom2 PO_LINES.secondary_unit_of_measure%TYPE;
3016: l_derived_qty2 PO_LINES.secondary_quantity%TYPE;

Line 3013: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

3009: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3010: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3011: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3012: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3013: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
3014: l_price_break_id PO_LINES.from_line_location_id%TYPE;
3015: l_cur_uom2 PO_LINES.secondary_unit_of_measure%TYPE;
3016: l_derived_qty2 PO_LINES.secondary_quantity%TYPE;
3017: --

Line 3027: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;

3023: l_price_updateable VARCHAR2(1); -- Bug 3337426
3024: l_retro_price_change VARCHAR2(1); -- Bug 3337426
3025: --
3026: l_manual_price_change PO_LINES.manual_price_change_flag%TYPE;
3027: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
3028: --
3029:
3030:
3031: l_return_status VARCHAR2(1);

Line 3035: l_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;

3031: l_return_status VARCHAR2(1);
3032: /* INVCONV sschinch 09/07/04 */
3033: l_dual_um_ind MTL_SYSTEM_ITEMS.TRACKING_QUANTITY_IND%TYPE;
3034: l_secondary_default_ind MTL_SYSTEM_ITEMS.SECONDARY_DEFAULT_IND%TYPE ; --INVCONV sschinch
3035: l_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;
3036: l_fsp_org_id NUMBER;
3037: x_count NUMBER;
3038: x_data VARCHAR2(100);
3039: l_derived_sec_qty PO_LINE_LOCATIONS.quantity%TYPE;

Line 3039: l_derived_sec_qty PO_LINE_LOCATIONS.quantity%TYPE;

3035: l_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;
3036: l_fsp_org_id NUMBER;
3037: x_count NUMBER;
3038: x_data VARCHAR2(100);
3039: l_derived_sec_qty PO_LINE_LOCATIONS.quantity%TYPE;
3040: l_document_uom PO_LINES.secondary_unit_of_measure%TYPE;
3041: l_item_id MTL_SYSTEM_ITEMS_B.inventory_item_id%TYPE;
3042: l_document_sec_uom PO_LINES.secondary_unit_of_measure%TYPE;
3043: l_new_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;

Line 3043: l_new_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;

3039: l_derived_sec_qty PO_LINE_LOCATIONS.quantity%TYPE;
3040: l_document_uom PO_LINES.secondary_unit_of_measure%TYPE;
3041: l_item_id MTL_SYSTEM_ITEMS_B.inventory_item_id%TYPE;
3042: l_document_sec_uom PO_LINES.secondary_unit_of_measure%TYPE;
3043: l_new_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;
3044:
3045: l_new_amt NUMBER;
3046: l_new_promised_date DATE;
3047: l_delete_record VARCHAR2(1);

Line 3049: l_new_preferred_qty PO_LINE_LOCATIONS.quantity%TYPE;

3045: l_new_amt NUMBER;
3046: l_new_promised_date DATE;
3047: l_delete_record VARCHAR2(1);
3048: l_new_preferred_grade mtl_grades.grade_code%TYPE;
3049: l_new_preferred_qty PO_LINE_LOCATIONS.quantity%TYPE;
3050: l_shipment_changes po_shipments_rec_type;
3051:
3052: l_new_sec_uom PO_LINES.secondary_unit_of_measure%TYPE;
3053: l_count NUMBER := 0;

Line 4003: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

3999: -- None.
4000: --End of Comments
4001: -------------------------------------------------------------------------------
4002: PROCEDURE get_release_break_price (
4003: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4004: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
4005: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4006: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4007: x_price OUT NOCOPY PO_LINES.unit_price%TYPE

Line 4004: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,

4000: --End of Comments
4001: -------------------------------------------------------------------------------
4002: PROCEDURE get_release_break_price (
4003: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4004: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
4005: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4006: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4007: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4008: ) IS

Line 4005: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,

4001: -------------------------------------------------------------------------------
4002: PROCEDURE get_release_break_price (
4003: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4004: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
4005: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4006: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4007: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4008: ) IS
4009: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;

Line 4006: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,

4002: PROCEDURE get_release_break_price (
4003: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4004: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
4005: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4006: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4007: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4008: ) IS
4009: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4010: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

Line 4009: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;

4005: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4006: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4007: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4008: ) IS
4009: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4010: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4011: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4012: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4013: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;

Line 4010: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

4006: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4007: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4008: ) IS
4009: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4010: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4011: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4012: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4013: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4014: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;

Line 4011: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;

4007: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4008: ) IS
4009: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4010: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4011: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4012: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4013: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4014: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;
4015: l_cumulative_flag BOOLEAN;

Line 4012: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;

4008: ) IS
4009: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4010: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4011: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4012: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4013: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4014: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;
4015: l_cumulative_flag BOOLEAN;
4016: l_price_break_id PO_LINE_LOCATIONS.line_location_id%TYPE;

Line 4013: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;

4009: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4010: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4011: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4012: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4013: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4014: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;
4015: l_cumulative_flag BOOLEAN;
4016: l_price_break_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4017: l_return_status VARCHAR2(1);

Line 4016: l_price_break_id PO_LINE_LOCATIONS.line_location_id%TYPE;

4012: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4013: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4014: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;
4015: l_cumulative_flag BOOLEAN;
4016: l_price_break_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4017: l_return_status VARCHAR2(1);
4018:
4019: BEGIN
4020: -- For quantity, ship-to location, and need-by date, use the new value

Line 4035: FROM po_line_locations PLL, po_lines POL

4031: l_need_by_date,
4032: l_ship_to_org_id,
4033: l_po_line_id,
4034: l_price_break_type
4035: FROM po_line_locations PLL, po_lines POL
4036: WHERE PLL.line_location_id = p_line_location_id
4037: AND PLL.po_line_id = POL.po_line_id; -- JOIN
4038:
4039: -- True if price break type is CUMULATIVE, false otherwise:

Line 4088: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

4084: -------------------------------------------------------------------------------
4085: PROCEDURE get_po_break_price (
4086: p_po_line_id IN PO_LINES.po_line_id%TYPE,
4087: p_quantity IN PO_LINES.quantity%TYPE,
4088: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4089: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4090: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4091: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
4092: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,

Line 4089: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,

4085: PROCEDURE get_po_break_price (
4086: p_po_line_id IN PO_LINES.po_line_id%TYPE,
4087: p_quantity IN PO_LINES.quantity%TYPE,
4088: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4089: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4090: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4091: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
4092: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,
4093: --

Line 4090: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,

4086: p_po_line_id IN PO_LINES.po_line_id%TYPE,
4087: p_quantity IN PO_LINES.quantity%TYPE,
4088: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4089: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4090: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4091: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
4092: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,
4093: --
4094: x_base_unit_price OUT NOCOPY PO_LINES.base_unit_price%TYPE

Line 4097: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

4093: --
4094: x_base_unit_price OUT NOCOPY PO_LINES.base_unit_price%TYPE
4095: ) IS
4096: l_quantity PO_LINES.quantity%TYPE;
4097: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4098: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4099: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4100: l_from_line_id PO_LINES.from_line_id%TYPE;
4101: l_return_status VARCHAR2(1);

Line 4098: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;

4094: x_base_unit_price OUT NOCOPY PO_LINES.base_unit_price%TYPE
4095: ) IS
4096: l_quantity PO_LINES.quantity%TYPE;
4097: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4098: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4099: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4100: l_from_line_id PO_LINES.from_line_id%TYPE;
4101: l_return_status VARCHAR2(1);
4102:

Line 4099: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;

4095: ) IS
4096: l_quantity PO_LINES.quantity%TYPE;
4097: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4098: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4099: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4100: l_from_line_id PO_LINES.from_line_id%TYPE;
4101: l_return_status VARCHAR2(1);
4102:
4103: --

Line 4172: FROM po_line_locations PLL, po_lines POL,

4168: l_uom,
4169: l_in_unit_price,
4170: l_currency_code -- Bug 3564863
4171: --
4172: FROM po_line_locations PLL, po_lines POL,
4173: --
4174: po_headers POH
4175: WHERE PLL.line_location_id = p_line_location_id
4176: AND POL.po_line_id = PLL.po_line_id -- JOIN

Line 4258: FROM po_line_locations

4254: END IF;
4255:
4256: SELECT line_location_id
4257: INTO l_line_location_id
4258: FROM po_line_locations
4259: WHERE po_line_id = p_po_line_id
4260: AND shipment_num = l_min_shipment_num
4261: AND shipment_type IN ('STANDARD','PLANNED');
4262:

Line 4300: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

4296: l_ship_rollup_started INDEXED_TBL_NUMBER;
4297: l_line_rollup_started INDEXED_TBL_NUMBER;
4298:
4299: l_po_line_id PO_LINES.po_line_id%TYPE;
4300: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4301:
4302: l_cur_line_qty_amt PO_LINES.quantity%TYPE;
4303: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4304: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

Line 4304: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4300: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4301:
4302: l_cur_line_qty_amt PO_LINES.quantity%TYPE;
4303: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4304: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4305: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4306: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4307: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4308: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;

Line 4305: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4301:
4302: l_cur_line_qty_amt PO_LINES.quantity%TYPE;
4303: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4304: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4305: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4306: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4307: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4308: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4309:

Line 4306: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4302: l_cur_line_qty_amt PO_LINES.quantity%TYPE;
4303: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4304: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4305: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4306: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4307: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4308: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4309:
4310: --

Line 4312: l_exist_ship_amt PO_LINE_LOCATIONS.amount%type;

4308: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4309:
4310: --
4311: l_cur_line_amt PO_LINES.amount%type;
4312: l_exist_ship_amt PO_LINE_LOCATIONS.amount%type;
4313: l_new_ship_amt PO_LINE_LOCATIONS.amount%TYPE;
4314: l_new_line_amt PO_LINES.amount%TYPE;
4315: l_new_line_price PO_LINES.unit_price%TYPE;
4316:

Line 4313: l_new_ship_amt PO_LINE_LOCATIONS.amount%TYPE;

4309:
4310: --
4311: l_cur_line_amt PO_LINES.amount%type;
4312: l_exist_ship_amt PO_LINE_LOCATIONS.amount%type;
4313: l_new_ship_amt PO_LINE_LOCATIONS.amount%TYPE;
4314: l_new_line_amt PO_LINES.amount%TYPE;
4315: l_new_line_price PO_LINES.unit_price%TYPE;
4316:
4317: l_ship_chg_i NUMBER;

Line 4666: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

4662: WHERE line_location_id = p_line_location_id
4663: ORDER by distribution_num ASC;
4664:
4665: l_po_line_id PO_LINES.po_line_id%TYPE;
4666: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4667: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4668: l_po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE;
4669:
4670: l_exist_line_qty_amt PO_LINES.quantity%TYPE;

Line 4667: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

4663: ORDER by distribution_num ASC;
4664:
4665: l_po_line_id PO_LINES.po_line_id%TYPE;
4666: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4667: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4668: l_po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE;
4669:
4670: l_exist_line_qty_amt PO_LINES.quantity%TYPE;
4671: l_new_line_qty_amt PO_LINES.quantity%TYPE;

Line 4672: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4668: l_po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE;
4669:
4670: l_exist_line_qty_amt PO_LINES.quantity%TYPE;
4671: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4672: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4673: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4674: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4675: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
4676: l_exist_dist_qty PO_DISTRIBUTIONS.quantity_ordered%TYPE;

Line 4673: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4669:
4670: l_exist_line_qty_amt PO_LINES.quantity%TYPE;
4671: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4672: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4673: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4674: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4675: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
4676: l_exist_dist_qty PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4677: l_exist_dist_amt PO_DISTRIBUTIONS.amount_ordered%TYPE;

Line 4674: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4670: l_exist_line_qty_amt PO_LINES.quantity%TYPE;
4671: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4672: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4673: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4674: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4675: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
4676: l_exist_dist_qty PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4677: l_exist_dist_amt PO_DISTRIBUTIONS.amount_ordered%TYPE;
4678: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;

Line 4675: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;

4671: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4672: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4673: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4674: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4675: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
4676: l_exist_dist_qty PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4677: l_exist_dist_amt PO_DISTRIBUTIONS.amount_ordered%TYPE;
4678: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4679: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;

Line 4717: FROM po_line_locations

4713: -- (Note: The checks in verify_inputs ensure that there can
4714: -- only be one active shipment for this line.)
4715: SELECT line_location_id
4716: INTO l_line_location_id
4717: FROM po_line_locations
4718: WHERE po_line_id = p_chg.line_changes.po_line_id(i)
4719: AND shipment_type in ('STANDARD', 'PLANNED')
4720: AND NVL(cancel_flag,'N') <> 'Y'
4721: AND NVL(closed_code,'OPEN') <> 'FINALLY CLOSED';

Line 5155: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;

5151:
5152: l_has_ga_ref PO_HEADERS.global_agreement_flag%TYPE;
5153: l_po_line_id PO_LINES.po_line_id%TYPE;
5154: l_new_qty PO_LINES.quantity%TYPE;
5155: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5156: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5157: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5158: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5159: l_new_price PO_LINES.unit_price%TYPE;

Line 5156: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;

5152: l_has_ga_ref PO_HEADERS.global_agreement_flag%TYPE;
5153: l_po_line_id PO_LINES.po_line_id%TYPE;
5154: l_new_qty PO_LINES.quantity%TYPE;
5155: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5156: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5157: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5158: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5159: l_new_price PO_LINES.unit_price%TYPE;
5160: l_current_price PO_LINES.unit_price%TYPE;

Line 5157: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;

5153: l_po_line_id PO_LINES.po_line_id%TYPE;
5154: l_new_qty PO_LINES.quantity%TYPE;
5155: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5156: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5157: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5158: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5159: l_new_price PO_LINES.unit_price%TYPE;
5160: l_current_price PO_LINES.unit_price%TYPE;
5161: l_new_start_date PO_LINES.start_date%TYPE;

Line 5158: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;

5154: l_new_qty PO_LINES.quantity%TYPE;
5155: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5156: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5157: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5158: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5159: l_new_price PO_LINES.unit_price%TYPE;
5160: l_current_price PO_LINES.unit_price%TYPE;
5161: l_new_start_date PO_LINES.start_date%TYPE;
5162: l_new_end_date PO_LINES.expiration_date%TYPE;

Line 5173: l_advance_amount PO_LINE_LOCATIONS_ALL.AMOUNT%TYPE; /* << Complex work changes for R12 >> */

5169: l_price_updateable VARCHAR2(1);
5170: l_retroactive_price_change VARCHAR2(1);
5171: l_grade MTL_GRADES.grade_code%TYPE ; -- sschinch INVCONV
5172: l_new_preferred_grade MTL_GRADES.grade_code%TYPE; -- sschinch INVCONV
5173: l_advance_amount PO_LINE_LOCATIONS_ALL.AMOUNT%TYPE; /* << Complex work changes for R12 >> */
5174: BEGIN
5175: IF (g_fnd_debug = 'Y') THEN
5176: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) THEN
5177: FND_LOG.string( log_level => FND_LOG.LEVEL_PROCEDURE,

Line 5205: from po_line_locations_all

5201: BEGIN
5202:
5203: select amount
5204: into l_advance_amount
5205: from po_line_locations_all
5206: where payment_type = 'ADVANCE'
5207: and po_line_id =l_po_line_id ;
5208:
5209: EXCEPTION

Line 5269: FROM po_line_locations

5265: SELECT SUM(NVL(quantity_received,0)),
5266: SUM(NVL(quantity_billed,0))
5267: INTO l_qty_received,
5268: l_qty_billed
5269: FROM po_line_locations
5270: WHERE po_line_id = l_po_line_id
5271: AND shipment_type IN ('STANDARD', 'PLANNED');
5272:
5273: IF (l_new_qty < greatest(l_qty_received, l_qty_billed)) THEN

Line 5289: FROM po_line_locations

5285: SELECT Max(NVL(quantity_received,0)),
5286: Max(NVL(quantity_billed,0))
5287: INTO l_qty_received,
5288: l_qty_billed
5289: FROM po_line_locations
5290: WHERE po_line_id = l_po_line_id
5291: AND shipment_type IN ('STANDARD', 'PLANNED','PREPAYMENT');
5292:
5293: IF (l_new_qty < greatest(l_qty_received, l_qty_billed)) THEN

Line 5388: FROM po_line_locations

5384: SELECT SUM(NVL(amount_received,0)),
5385: SUM(NVL(amount_billed,0))
5386: INTO l_amt_received,
5387: l_amt_billed
5388: FROM po_line_locations
5389: WHERE po_line_id = l_po_line_id
5390: AND shipment_type = 'PREPAYMENT';
5391:
5392: IF (l_new_amount < greatest(l_amt_received, l_amt_billed)) THEN

Line 5411: FROM po_line_locations

5407: SELECT SUM(NVL(amount_received,0)),
5408: SUM(NVL(amount_billed,0))
5409: INTO l_amt_received,
5410: l_amt_billed
5411: FROM po_line_locations
5412: WHERE po_line_id = l_po_line_id
5413: AND shipment_type = 'STANDARD';
5414:
5415: IF (l_new_amount < greatest(l_amt_received, l_amt_billed)) THEN

Line 5604: FROM po_line_locations

5600: -- approved at least once.
5601: ----------------------------------------------------------------------
5602: SELECT count(*)
5603: INTO l_ship_count
5604: FROM po_line_locations
5605: WHERE po_line_id = l_po_line_id
5606: AND approved_date IS NOT NULL;
5607:
5608: IF (l_ship_count > 0) THEN

Line 5623: FROM po_line_locations

5619: -- Check: Prevent delete if the line has encumbered shipments.
5620: ----------------------------------------------------------------------
5621: SELECT count(*)
5622: INTO l_ship_count
5623: FROM po_line_locations
5624: WHERE po_line_id = l_po_line_id
5625: AND encumbered_flag = 'Y';
5626:
5627: IF (l_ship_count > 0) THEN

Line 5701: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;

5697:
5698: l_proc_name CONSTANT VARCHAR2(30) := 'VALIDATE_SHIPMENT_CHANGES';
5699: l_progress VARCHAR2(3) := '000';
5700:
5701: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5702: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5703: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;

Line 5702: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;

5698: l_proc_name CONSTANT VARCHAR2(30) := 'VALIDATE_SHIPMENT_CHANGES';
5699: l_progress VARCHAR2(3) := '000';
5700:
5701: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5702: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5703: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;

Line 5703: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;

5699: l_progress VARCHAR2(3) := '000';
5700:
5701: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5702: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5703: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;

Line 5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;

5700:
5701: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5702: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5703: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;

Line 5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;

5701: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5702: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5703: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

Line 5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;

5702: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5703: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

Line 5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;

5703: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;

Line 5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;

5704: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;

Line 5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

5705: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;

Line 5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

5706: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;

Line 5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;

5707: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;

Line 5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;

5708: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

Line 5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;

5709: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;

Line 5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;

5710: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;

Line 5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;

5711: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;

Line 5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

5712: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5720: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;

Line 5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;

5713: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5720: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5721: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;

Line 5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;

5714: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5720: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5721: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5722: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;

Line 5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;

5715: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5720: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5721: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5722: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;
5723: l_pending_rcv_transactions NUMBER;

Line 5720: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;

5716: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5720: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5721: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5722: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;
5723: l_pending_rcv_transactions NUMBER;
5724: l_allow_price_override PO_LINES.allow_price_override_flag%TYPE;

Line 5721: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;

5717: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5720: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5721: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5722: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;
5723: l_pending_rcv_transactions NUMBER;
5724: l_allow_price_override PO_LINES.allow_price_override_flag%TYPE;
5725: l_ship_to_loc_valid NUMBER;

Line 5722: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;

5718: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5719: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5720: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5721: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5722: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;
5723: l_pending_rcv_transactions NUMBER;
5724: l_allow_price_override PO_LINES.allow_price_override_flag%TYPE;
5725: l_ship_to_loc_valid NUMBER;
5726: l_message_name VARCHAR2(30);

Line 5727: l_new_sales_order_update_date PO_LINE_LOCATIONS.sales_order_update_date%TYPE;

5723: l_pending_rcv_transactions NUMBER;
5724: l_allow_price_override PO_LINES.allow_price_override_flag%TYPE;
5725: l_ship_to_loc_valid NUMBER;
5726: l_message_name VARCHAR2(30);
5727: l_new_sales_order_update_date PO_LINE_LOCATIONS.sales_order_update_date%TYPE;
5728:
5729: l_is_split_shipment BOOLEAN;
5730: l_is_drop_ship BOOLEAN;
5731: l_last_msg_list_index NUMBER;

Line 5738: l_new_secondary_qty PO_LINE_LOCATIONS.SECONDARY_QUANTITY%TYPE; -- INVCONV

5734: l_retroactive_price_change VARCHAR2(1);
5735:
5736: l_grade MTL_GRADES.grade_code%TYPE ; -- sschinch INVCONV
5737: l_new_preferred_grade MTL_GRADES.grade_code%TYPE; -- INVCONV
5738: l_new_secondary_qty PO_LINE_LOCATIONS.SECONDARY_QUANTITY%TYPE; -- INVCONV
5739:
5740: BEGIN
5741: IF (g_fnd_debug = 'Y') THEN
5742: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) THEN

Line 5790: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5786: OR (p_chg.shipment_changes.c_closed_code(i) = 'FINALLY CLOSED') THEN
5787: add_error ( p_api_errors => g_api_errors,
5788: x_return_status => x_return_status,
5789: p_message_name => 'PO_CHNG_CANNOT_MODIFY_SHIPMENT',
5790: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5791: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
5792: p_entity_id => i );
5793: END IF;
5794:

Line 5808: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5804:
5805: add_error ( p_api_errors => g_api_errors,
5806: x_return_status => x_return_status,
5807: p_message_name => 'PO_CHNG_QTY_RESTRICTED',
5808: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5809: p_column_name => 'QUANTITY',
5810: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
5811: p_entity_id => i );
5812: END IF; -- l_new_qty

Line 5827: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5823:
5824: add_error ( p_api_errors => g_api_errors,
5825: x_return_status => x_return_status,
5826: p_message_name => 'PO_CHNG_AMT_RESTRICTED',
5827: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5828: p_column_name => 'AMOUNT',
5829: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
5830: p_entity_id => i );
5831: END IF; -- l_new_amt

Line 5898: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5894: IF (l_new_qty < NVL(l_scheduled_qty, 0)) THEN
5895: add_error ( p_api_errors => g_api_errors,
5896: x_return_status => x_return_status,
5897: p_message_name => 'PO_PO_REL_EXCEEDS_QTY',
5898: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5899: p_column_name => 'QUANTITY',
5900: p_token_name1 => 'SCHEDULED_QTY',
5901: p_token_value1 => TO_CHAR(l_scheduled_qty),
5902: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,

Line 5920: FROM po_line_locations REL, po_line_locations PLAN

5916: -- SQL What: Retrieve the quantity of the planned PO shipment for this
5917: -- release shipment.
5918: SELECT NVL(PLAN.quantity, 0) - NVL(PLAN.quantity_cancelled, 0)
5919: INTO l_planned_qty
5920: FROM po_line_locations REL, po_line_locations PLAN
5921: WHERE REL.line_location_id = l_line_location_id
5922: AND REL.source_shipment_id = PLAN.line_location_id; -- JOIN
5923:
5924: -- Get the total released quantity.

Line 5941: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5937: IF l_new_qty > l_available_qty THEN
5938: add_error ( p_api_errors => g_api_errors,
5939: x_return_status => x_return_status,
5940: p_message_name => 'PO_PO_QTY_EXCEEDS_UNREL',
5941: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5942: p_column_name => 'QUANTITY',
5943: p_token_name1 => 'UNRELEASED',
5944: p_token_value1 => TO_CHAR(l_available_qty),
5945: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,

Line 5987: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5983:
5984: add_error ( p_api_errors => g_api_errors,
5985: x_return_status => x_return_status,
5986: p_message_name => 'PO_CHNG_CANNOT_MODIFY_DROPSHIP',
5987: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5988: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
5989: p_entity_id => i );
5990: END IF; -- shipment is drop ship
5991:

Line 6126: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6122: IF (l_ship_to_loc_valid = 0) THEN
6123: add_error ( p_api_errors => g_api_errors,
6124: x_return_status => x_return_status,
6125: p_message_name => 'PO_PO_SHIP_LOCN_INVALID',
6126: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6127: p_column_name => 'SHIP_TO_LOCATION_ID',
6128: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6129: p_entity_id => i );
6130: END IF;

Line 6145: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6141: IF (l_new_need_by_date IS NOT NULL) THEN
6142: add_error ( p_api_errors => g_api_errors,
6143: x_return_status => x_return_status,
6144: p_message_name => 'PO_CHNG_DROPSHIP_RCV_SHIP_QTY',
6145: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6146: p_column_name => 'NEED_BY_DATE',
6147: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6148: p_entity_id => i );
6149: END IF;

Line 6155: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6151: IF (l_new_ship_to_loc_id IS NOT NULL) THEN
6152: add_error ( p_api_errors => g_api_errors,
6153: x_return_status => x_return_status,
6154: p_message_name => 'PO_CHNG_DROPSHIP_RCV_SHIP_QTY',
6155: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6156: p_column_name => 'SHIP_TO_LOCATION',
6157: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6158: p_entity_id => i );
6159: END IF;

Line 6165: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6161: IF (l_new_sales_order_update_date IS NOT NULL) THEN
6162: add_error ( p_api_errors => g_api_errors,
6163: x_return_status => x_return_status,
6164: p_message_name => 'PO_CHNG_DROPSHIP_RCV_SHIP_QTY',
6165: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6166: p_column_name => 'SALES_ORDER_UPDATE_DATE',
6167: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6168: p_entity_id => i );
6169: END IF;

Line 6192: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6188:
6189: add_error ( p_api_errors => g_api_errors,
6190: x_return_status => x_return_status,
6191: p_message_name => l_message_name,
6192: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6193: p_column_name => NULL,
6194: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6195: p_entity_id => i);
6196: END IF;

Line 6205: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6201: IF (l_encumbered_flag = 'Y') THEN
6202: add_error ( p_api_errors => g_api_errors,
6203: x_return_status => x_return_status,
6204: p_message_name => 'PO_PO_USE_CANCEL_ON_ENCUMB_PO',
6205: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6206: p_column_name => NULL,
6207: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6208: p_entity_id => i);
6209: END IF;

Line 6670: -- PO_LINE_LOCATIONS_ALL, PO_DISTRIBUTIONS_ALL with the changes.

6666: --Pre-reqs:
6667: -- None.
6668: --Modifies:
6669: -- Updates PO_HEADERS_ALL, PO_RELEASES_ALL, PO_LINES_ALL,
6670: -- PO_LINE_LOCATIONS_ALL, PO_DISTRIBUTIONS_ALL with the changes.
6671: --Locks:
6672: -- None.
6673: --End of Comments
6674: -------------------------------------------------------------------------------

Line 6792: -- SQL What: Update PO_LINE_LOCATIONS with the requested/derived shipment

6788: l_progress := '040';
6789:
6790: FORALL i IN 1..p_chg.shipment_changes.get_count
6791:
6792: -- SQL What: Update PO_LINE_LOCATIONS with the requested/derived shipment
6793: -- changes. If the approved flag is Y, update it to R.
6794: UPDATE po_line_locations PLL
6795: SET last_update_date = sysdate,
6796: last_updated_by = g_user_id,

Line 6794: UPDATE po_line_locations PLL

6790: FORALL i IN 1..p_chg.shipment_changes.get_count
6791:
6792: -- SQL What: Update PO_LINE_LOCATIONS with the requested/derived shipment
6793: -- changes. If the approved flag is Y, update it to R.
6794: UPDATE po_line_locations PLL
6795: SET last_update_date = sysdate,
6796: last_updated_by = g_user_id,
6797: request_id = decode(g_request_id,null,PLL.request_id,-1,PLL.request_id,g_request_id), /*bug 7278327, update the request_id with the concerned concurrent_request_id*/
6798: -- approved_flag = decode(approved_flag, 'Y', 'R', approved_flag),

Line 6924: UPDATE po_line_locations PLL

6920:
6921: FORALL i IN 1..p_chg.shipment_changes.get_count
6922: -- SQL What: Re-calculate the price discount if there is a price break
6923: -- price change.
6924: UPDATE po_line_locations PLL
6925: SET last_update_date = sysdate,
6926: last_updated_by = g_user_id,
6927: price_discount =
6928: (SELECT (POL.unit_price - p_chg.shipment_changes.price_override(i))

Line 7090: -- Inserts the split shipments into PO_LINE_LOCATIONS_ALL.

7086: -- Creates split shipments and split distributions.
7087: --Pre-reqs:
7088: -- None.
7089: --Modifies:
7090: -- Inserts the split shipments into PO_LINE_LOCATIONS_ALL.
7091: -- Updates each split shipment change and split distribution change in p_chg
7092: -- with a new LINE_LOCATION_ID from the sequence.
7093: --Locks:
7094: -- None.

Line 7101: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

7097: PROCEDURE create_split_shipments (
7098: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE
7099: ) IS
7100: l_proc_name CONSTANT VARCHAR2(30) := 'CREATE_SPLIT_SHIPMENTS';
7101: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
7102: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
7103: l_ship_chg_i NUMBER;
7104: BEGIN
7105: IF (g_fnd_debug = 'Y') THEN

Line 7102: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

7098: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE
7099: ) IS
7100: l_proc_name CONSTANT VARCHAR2(30) := 'CREATE_SPLIT_SHIPMENTS';
7101: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
7102: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
7103: l_ship_chg_i NUMBER;
7104: BEGIN
7105: IF (g_fnd_debug = 'Y') THEN
7106: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) THEN

Line 7121: SELECT PO_LINE_LOCATIONS_S.nextval

7117: p_chg.shipment_changes.parent_line_location_id(l_ship_chg_i);
7118:
7119: IF (l_parent_line_loc_id IS NOT NULL) THEN -- This is a split shipment.
7120: -- Generate a new LINE_LOCATION_ID from the sequence.
7121: SELECT PO_LINE_LOCATIONS_S.nextval
7122: INTO l_line_location_id
7123: FROM dual;
7124:
7125: -- Update the split shipment change with the new LINE_LOCATION_ID.

Line 7133: -- Bulk insert all the split shipments into PO_LINE_LOCATIONS_ALL,

7129:
7130: END LOOP; -- split shipment
7131:
7132:
7133: -- Bulk insert all the split shipments into PO_LINE_LOCATIONS_ALL,
7134: -- copying most of the field values from the parent shipments.
7135: FORALL i IN 1..p_chg.shipment_changes.po_line_location_id.COUNT
7136: INSERT INTO po_line_locations_all
7137: (

Line 7136: INSERT INTO po_line_locations_all

7132:
7133: -- Bulk insert all the split shipments into PO_LINE_LOCATIONS_ALL,
7134: -- copying most of the field values from the parent shipments.
7135: FORALL i IN 1..p_chg.shipment_changes.po_line_location_id.COUNT
7136: INSERT INTO po_line_locations_all
7137: (
7138: LINE_LOCATION_ID ,
7139: LAST_UPDATE_DATE ,
7140: LAST_UPDATED_BY ,

Line 7466: FROM po_line_locations

7462: nvl2(g_calculate_tax_flag, 'CREATE', null), --
7463: line_location_id, --
7464: decode(p_chg.shipment_changes.payment_type(i),'RATE','QUANTITY',matching_basis), -- FPS Enhancement
7465: decode(p_chg.shipment_changes.payment_type(i),'RATE','QUANTITY',value_basis) -- FPS Enhancement
7466: FROM po_line_locations
7467: WHERE p_chg.shipment_changes.parent_line_location_id(i) IS NOT NULL
7468: AND line_location_id = p_chg.shipment_changes.parent_line_location_id(i);
7469:
7470: -- Now create all the split distributions.

Line 7889: -- PO_LINES, PO_LINE_LOCATIONS, PO_DISTRIBUTIONS

7885: -- G_PARAMETER_YES.
7886: --Pre-reqs:
7887: -- None.
7888: --Modifies:
7889: -- PO_LINES, PO_LINE_LOCATIONS, PO_DISTRIBUTIONS
7890: --Locks:
7891: -- None.
7892: --End of Comments
7893: -------------------------------------------------------------------------------

Line 7930: FROM po_line_locations

7926: FOR i IN 1..p_chg.shipment_changes.get_count LOOP
7927: IF (p_chg.shipment_changes.delete_record(i) = G_PARAMETER_YES) THEN
7928: SELECT rowid
7929: INTO l_rowid
7930: FROM po_line_locations
7931: WHERE line_location_id = p_chg.shipment_changes.po_line_location_id(i);
7932:
7933: PO_SHIPMENTS_SV4.delete_shipment (
7934: x_line_location_id => p_chg.shipment_changes.po_line_location_id(i),

Line 8268: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

8264: PROCEDURE add_ship_change_to_index (
8265: p_chg IN PO_CHANGES_REC_TYPE,
8266: i IN NUMBER
8267: ) IS
8268: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
8269: l_po_line_id PO_LINES.po_line_id%TYPE;
8270: c NUMBER;
8271: BEGIN
8272: l_line_location_id := p_chg.shipment_changes.po_line_location_id(i);

Line 8320: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

8316: p_chg IN PO_CHANGES_REC_TYPE,
8317: i IN NUMBER
8318: ) IS
8319: l_po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE;
8320: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
8321: c NUMBER;
8322: BEGIN
8323: l_po_distribution_id := p_chg.distribution_changes.po_distribution_id(i);
8324:

Line 8429: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE

8425: -- None.
8426: --End of Comments
8427: -------------------------------------------------------------------------------
8428: FUNCTION get_ship_change (
8429: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE
8430: ) RETURN NUMBER IS
8431: i NUMBER;
8432: BEGIN
8433: IF g_ship_changes_index.EXISTS(p_line_location_id) THEN

Line 8457: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE

8453: --End of Comments
8454: -------------------------------------------------------------------------------
8455: FUNCTION find_ship_change (
8456: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
8457: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE
8458: ) RETURN NUMBER IS
8459: i NUMBER;
8460: BEGIN
8461: i := get_ship_change(p_line_location_id);

Line 8551: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

8547: -------------------------------------------------------------------------------
8548: FUNCTION get_split_ship_change (
8549: p_chg IN PO_CHANGES_REC_TYPE,
8550: p_po_line_id IN PO_LINES.po_line_id%TYPE,
8551: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8552: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8553: ) RETURN NUMBER IS
8554: l_ship_chg_i NUMBER;
8555: BEGIN

Line 8552: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE

8548: FUNCTION get_split_ship_change (
8549: p_chg IN PO_CHANGES_REC_TYPE,
8550: p_po_line_id IN PO_LINES.po_line_id%TYPE,
8551: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8552: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8553: ) RETURN NUMBER IS
8554: l_ship_chg_i NUMBER;
8555: BEGIN
8556: -- Loop through the split shipment changes.

Line 8592: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

8588: -------------------------------------------------------------------------------
8589: FUNCTION get_split_dist_change (
8590: p_chg IN PO_CHANGES_REC_TYPE,
8591: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
8592: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8593: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8594: ) RETURN NUMBER IS
8595: l_dist_chg_i NUMBER;
8596: BEGIN

Line 8593: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE

8589: FUNCTION get_split_dist_change (
8590: p_chg IN PO_CHANGES_REC_TYPE,
8591: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
8592: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8593: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8594: ) RETURN NUMBER IS
8595: l_dist_chg_i NUMBER;
8596: BEGIN
8597: -- Loop through the split distribution changes.

Line 8634: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

8630: -------------------------------------------------------------------------------
8631: FUNCTION find_split_dist_change (
8632: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
8633: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
8634: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8635: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8636: ) RETURN NUMBER IS
8637: i NUMBER;
8638: BEGIN

Line 8635: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE

8631: FUNCTION find_split_dist_change (
8632: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
8633: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
8634: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8635: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8636: ) RETURN NUMBER IS
8637: i NUMBER;
8638: BEGIN
8639: i := get_split_dist_change(p_chg, p_parent_distribution_id,

Line 8876: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;

8872: l_conterms_exist_flag PO_HEADERS_ALL.conterms_exist_flag%type;
8873: l_consigned_consumption_flag PO_HEADERS_ALL.consigned_consumption_flag%type;
8874: l_cancel_flag PO_HEADERS_ALL.cancel_flag%type;
8875: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%type;
8876: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
8877: l_allow_delete VARCHAR2(1);
8878: d_pos NUMBER := 0;
8879: l_api_name CONSTANT VARCHAR2(30) := 'validate_delete_action';
8880: d_module CONSTANT VARCHAR2(70) := 'po.plsql.PO_DOCUMENT_UPDATE_PVT.validate_delete_action';