DBA Data[Home] [Help]

APPS.PO_DOCUMENT_UPDATE_PVT dependencies on PO_LINE_LOCATIONS

Line 160: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

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

Line 161: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,

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

Line 162: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,

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

Line 163: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,

159: PROCEDURE get_release_break_price (
160: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
161: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
162: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
163: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
164: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
165: );
166:
167: PROCEDURE get_po_break_price (

Line 170: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

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

Line 171: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,

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

Line 172: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,

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

Line 817: p_table_name => 'PO_LINE_LOCATIONS_ALL',

813: add_error (
814: p_api_errors => g_api_errors,
815: x_return_status => x_return_status,
816: p_message_name => 'PO_GENERIC_ERROR',
817: p_table_name => 'PO_LINE_LOCATIONS_ALL',
818: p_token_name1 => 'ERROR_TEXT',
819: p_token_value1 => 'You cannot specify both po_line_location_id and parent_line_location_id / split_shipment_num for a shipment change.',
820: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
821: p_entity_id => i

Line 829: FROM po_line_locations

825: BEGIN
826: IF (g_po_header_id IS NOT NULL) THEN -- PO / PA
827: SELECT 1
828: INTO l_dummy
829: FROM po_line_locations
830: WHERE po_header_id = g_po_header_id
831: AND line_location_id =
832: NVL(p_chg.shipment_changes.po_line_location_id(i),
833: p_chg.shipment_changes.parent_line_location_id(i));

Line 837: FROM po_line_locations

833: p_chg.shipment_changes.parent_line_location_id(i));
834: ELSE -- release
835: SELECT 1
836: INTO l_dummy
837: FROM po_line_locations
838: WHERE po_release_id = g_po_release_id
839: AND line_location_id =
840: NVL(p_chg.shipment_changes.po_line_location_id(i),
841: p_chg.shipment_changes.parent_line_location_id(i));

Line 850: p_table_name => 'PO_LINE_LOCATIONS_ALL',

846: add_error (
847: p_api_errors => g_api_errors,
848: x_return_status => x_return_status,
849: p_message_name => 'PO_INVALID_DOC_IDS',
850: p_table_name => 'PO_LINE_LOCATIONS_ALL',
851: p_column_name => 'LINE_LOCATION_ID',
852: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
853: p_entity_id => i
854: );

Line 1226: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

1222: PROCEDURE populate_ship_cached_fields (
1223: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
1224: i IN NUMBER
1225: ) IS
1226: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
1227: BEGIN
1228: l_parent_line_loc_id := p_chg.shipment_changes.parent_line_location_id(i);
1229:
1230: -- SQL What: Retrieve all the database field values that will be needed

Line 1339: FROM po_line_locations PLL,

1335: -- :
1336: p_chg.shipment_changes.t_manual_price_change_flag(i),
1337: p_chg.shipment_changes.c_preferred_grade(i) -- INVCONV sschinch 09/07/04
1338: --p_chg.shipment_changes.c_payment_type(i)
1339: FROM po_line_locations PLL,
1340: po_lines POL,
1341: po_line_types PLT,
1342: mtl_system_items_b MSI,
1343: financials_system_parameters FSP

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

1462: p_chg.distribution_changes.c_distribution_num(i),
1463: p_chg.distribution_changes.c_encumbered_flag(i),
1464: p_chg.distribution_changes.c_req_distribution_id(i),
1465: p_chg.distribution_changes.c_creation_date(i)
1466: FROM po_distributions POD, po_lines POL, po_line_types PLT,po_line_locations_all PLL -- 1467: WHERE POD.po_distribution_id =
1468: NVL( p_chg.distribution_changes.parent_distribution_id(i), -- split dist
1469: p_chg.distribution_changes.po_distribution_id(i) ) -- existing dist
1470: AND POL.po_line_id = POD.po_line_id -- JOIN

Line 1777: FROM po_line_locations

1773: -- SQL What: Returns the number of standard/planned shipments
1774: -- for this line that are not cancelled or finally closed.
1775: SELECT count(*)
1776: INTO l_shipment_count
1777: FROM po_line_locations
1778: WHERE po_line_id = p_chg.line_changes.po_line_id(i)
1779: AND shipment_type in ('STANDARD', 'PLANNED')
1780: AND nvl(cancel_flag,'N') <> 'Y'
1781: AND NVL(closed_code,'OPEN') <> 'FINALLY CLOSED';

Line 1960: * p_table_name => 'PO_LINE_LOCATIONS_ALL',

1956: *
1957: * add_error ( p_api_errors => g_api_errors,
1958: * x_return_status => x_return_status,
1959: * p_message_name => 'PO_CHNG_QTY2_NO_UOM2',
1960: * p_table_name => 'PO_LINE_LOCATIONS_ALL',
1961: * p_column_name => 'SECONDARY_QUANTITY',
1962: * p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
1963: * p_entity_id => i );
1964: *END IF;

Line 1975: p_table_name => 'PO_LINE_LOCATIONS_ALL',

1971: g_document_type = 'PA' THEN
1972: add_error ( p_api_errors => g_api_errors,
1973: x_return_status => x_return_status,
1974: p_message_name => 'PO_CHNG_QTY2_GRADE_PA',
1975: p_table_name => 'PO_LINE_LOCATIONS_ALL',
1976: p_column_name => 'SECONDARY_QUANTITY',
1977: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
1978: p_entity_id => i );
1979: END IF;

Line 1995: p_table_name => 'PO_LINE_LOCATIONS_ALL',

1991: IF l_grade_control_flag = 'N' THEN
1992: add_error ( p_api_errors => g_api_errors,
1993: x_return_status => x_return_status,
1994: p_message_name => ' INV_ITEM_NOT_GRADE_CTRL_EXP',
1995: p_table_name => 'PO_LINE_LOCATIONS_ALL',
1996: p_column_name => 'PREFERRED_GRADE',
1997: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
1998: p_entity_id => i);
1999: END IF;

Line 2014: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2010:
2011: add_error ( p_api_errors => g_api_errors,
2012: x_return_status => x_return_status,
2013: p_message_name => 'PO_CHNG_QTY2_NO_QTY',
2014: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2015: p_column_name => 'SECONDARY_QUANTITY',
2016: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2017: p_entity_id => i );
2018: END IF;

Line 2035: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2031: AND (p_chg.shipment_changes.amount(i) IS NULL) THEN
2032: add_error ( p_api_errors => g_api_errors,
2033: x_return_status => x_return_status,
2034: p_message_name => 'PO_CHNG_SPLIT_SHIP_QTY_AMT',
2035: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2036: p_column_name => NULL,
2037: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2038: p_entity_id => i );
2039: END IF;

Line 2049: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2045: IF (p_chg.shipment_changes.split_shipment_num(i) IS NULL) THEN
2046: add_error ( p_api_errors => g_api_errors,
2047: x_return_status => x_return_status,
2048: p_message_name => 'PO_CHNG_UNIQUE_SPLIT_SHIP_NUM',
2049: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2050: p_column_name => NULL,
2051: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2052: p_entity_id => i );
2053: END IF;

Line 2067: FROM po_line_locations

2063: -- release with the given split shipment number, 0 otherwise.
2064: -- SQL Why: To determine if the given split shipment number is unique.
2065: SELECT count(*)
2066: INTO l_shipment_count
2067: FROM po_line_locations
2068: WHERE po_line_id = p_chg.shipment_changes.c_po_line_id(i)
2069: AND shipment_num = p_chg.shipment_changes.split_shipment_num(i)
2070: AND NVL(po_release_id,-1) = NVL(g_po_release_id,-1);
2071:

Line 2077: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2073: OR (NOT is_split_shipment_num_unique(p_chg,i)) THEN
2074: add_error ( p_api_errors => g_api_errors,
2075: x_return_status => x_return_status,
2076: p_message_name => 'PO_CHNG_UNIQUE_SPLIT_SHIP_NUM',
2077: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2078: p_column_name => NULL,
2079: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2080: p_entity_id => i );
2081: END IF;

Line 2092: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2088: IF (p_chg.shipment_changes.delete_record(i) = G_PARAMETER_YES) THEN
2089: add_error ( p_api_errors => g_api_errors,
2090: x_return_status => x_return_status,
2091: p_message_name => 'PO_CHNG_SPLIT_SHIP_NO_DELETE',
2092: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2093: p_column_name => NULL,
2094: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2095: p_entity_id => i );
2096: END IF; -- delete_record

Line 2258: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2254: IF (p_chg.shipment_changes.promised_date(i) IS NOT NULL) THEN
2255: add_error ( p_api_errors => g_api_errors,
2256: x_return_status => x_return_status,
2257: p_message_name => 'PO_CHNG_BLKT_SHIP_BAD_FIELD',
2258: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2259: p_column_name => 'PROMISED_DATE',
2260: p_token_name1 => 'COLUMN_NAME',
2261: p_token_value1 => 'PROMISED_DATE',
2262: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,

Line 2270: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2266: IF (p_chg.shipment_changes.need_by_date(i) IS NOT NULL) THEN
2267: add_error ( p_api_errors => g_api_errors,
2268: x_return_status => x_return_status,
2269: p_message_name => 'PO_CHNG_BLKT_SHIP_BAD_FIELD',
2270: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2271: p_column_name => 'NEED_BY_DATE',
2272: p_token_name1 => 'COLUMN_NAME',
2273: p_token_value1 => 'NEED_BY_DATE',
2274: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,

Line 2282: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2278: IF (p_chg.shipment_changes.parent_line_location_id(i) IS NOT NULL) THEN
2279: add_error ( p_api_errors => g_api_errors,
2280: x_return_status => x_return_status,
2281: p_message_name => 'PO_CHNG_BLKT_NO_SPLIT_SHIP',
2282: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2283: p_column_name => null,
2284: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2285: p_entity_id => i );
2286: END IF;

Line 2329: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2325:
2326: add_error ( p_api_errors => g_api_errors,
2327: x_return_status => x_return_status,
2328: p_message_name => 'PO_CHNG_PO_NO_SHIP_PRICE',
2329: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2330: p_column_name => 'PRICE_OVERRIDE',
2331: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2332: p_entity_id => G_ENTITY_TYPE_LINES );
2333: END IF;

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

2451:
2452: IF (p_chg.shipment_changes.price_override(i) IS NOT NULL ) THEN
2453: add_error( p_api_errors => g_api_errors,x_return_status => x_return_status,
2454: p_message_name => 'PO_NO_PRICE_CHNG_FP_LINES',
2455: p_table_name => 'PO_LINE_LOCATIONS_ALL',p_column_name => 'PRICE',
2456: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,p_entity_id => i);
2457: END IF;
2458: ELSIF (p_chg.shipment_changes.c_value_basis(i) = 'AMOUNT') THEN
2459: ------------------------------------------------------------------------

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

2462:
2463: IF (p_chg.shipment_changes.price_override(i) IS NOT NULL ) THEN
2464: add_error( p_api_errors => g_api_errors,x_return_status => x_return_status,
2465: p_message_name => 'PO_NO_PRICE_CHNG_AMT_LINES',
2466: p_table_name => 'PO_LINE_LOCATIONS_ALL',p_column_name => 'PRICE',
2467: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,p_entity_id => i);
2468: END IF;
2469: END IF;
2470: --< BUG 5406211 END >

Line 2484: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2480: IF (p_chg.shipment_changes.quantity(i) IS NOT NULL) THEN
2481: add_error ( p_api_errors => g_api_errors,
2482: x_return_status => x_return_status,
2483: p_message_name => 'PO_SVC_NO_QTY',
2484: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2485: p_column_name => 'QUANTITY',
2486: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2487: p_entity_id => i );
2488: END IF;

Line 2502: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2498: IF (p_chg.shipment_changes.amount(i) IS NOT NULL) THEN
2499: add_error ( p_api_errors => g_api_errors,
2500: x_return_status => x_return_status,
2501: p_message_name => 'PO_SVC_NO_AMT',
2502: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2503: p_column_name => 'AMOUNT',
2504: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2505: p_entity_id => i );
2506: END IF;

Line 2520: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2516: IF (p_chg.shipment_changes.need_by_date(i) IS NOT NULL) THEN
2517: add_error ( p_api_errors => g_api_errors,
2518: x_return_status => x_return_status,
2519: p_message_name => 'PO_SVC_NO_NEED_PROMISE_DATE',
2520: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2521: p_column_name => 'NEED_BY_DATE',
2522: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2523: p_entity_id => i );
2524: END IF;

Line 2530: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2526: IF (p_chg.shipment_changes.promised_date(i) IS NOT NULL) THEN
2527: add_error ( p_api_errors => g_api_errors,
2528: x_return_status => x_return_status,
2529: p_message_name => 'PO_SVC_NO_NEED_PROMISE_DATE',
2530: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2531: p_column_name => 'PROMISED_DATE',
2532: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2533: p_entity_id => i );
2534: END IF;

Line 2548: p_table_name => 'PO_LINE_LOCATIONS_ALL',

2544: AND (p_chg.shipment_changes.c_purchase_basis(i) = 'TEMP LABOR') THEN
2545: add_error ( p_api_errors => g_api_errors,
2546: x_return_status => x_return_status,
2547: p_message_name => 'PO_SVC_NO_SPLIT_SHIPMENT',
2548: p_table_name => 'PO_LINE_LOCATIONS_ALL',
2549: p_column_name => null,
2550: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
2551: p_entity_id => i );
2552: END IF; -- parent line location ID is not null

Line 2666: l_table_name := 'PO_LINE_LOCATIONS_ALL';

2662: l_new_secondary_quantity := p_chg.shipment_changes.secondary_quantity(i);
2663: l_sec_qty_column_name := 'SECONDARY_QUANTITY';
2664: /*END INVCONV sschinch 09/07/04 */
2665:
2666: l_table_name := 'PO_LINE_LOCATIONS_ALL';
2667: l_qty_column_name := 'QUANTITY';
2668: l_price_column_name := 'PRICE_OVERRIDE';
2669: l_amt_column_name := 'AMOUNT';
2670: ELSE -- PO_DISTRIBUTIONS_REC_TYPE

Line 2762: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;

2758: p_chg IN PO_CHANGES_REC_TYPE,
2759: i IN NUMBER
2760: ) RETURN BOOLEAN IS
2761: l_po_line_id PO_LINES.po_line_id%TYPE;
2762: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
2763: l_ship_chg_i NUMBER;
2764: BEGIN
2765: -- Get the PO_LINE_ID and split shipment num for the i-th shipment change.
2766: l_po_line_id := p_chg.shipment_changes.c_po_line_id(i);

Line 2934: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

2930: FUNCTION ship_has_dist_qty_amt_change (
2931: p_chg IN PO_CHANGES_REC_TYPE,
2932: i IN NUMBER
2933: ) RETURN BOOLEAN IS
2934: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2935: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2936: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
2937: l_dist_chg_i NUMBER;
2938: BEGIN

Line 2935: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

2931: p_chg IN PO_CHANGES_REC_TYPE,
2932: i IN NUMBER
2933: ) RETURN BOOLEAN IS
2934: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2935: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2936: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
2937: l_dist_chg_i NUMBER;
2938: BEGIN
2939: l_line_location_id := p_chg.shipment_changes.po_line_location_id(i);

Line 2936: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;

2932: i IN NUMBER
2933: ) RETURN BOOLEAN IS
2934: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2935: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
2936: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
2937: l_dist_chg_i NUMBER;
2938: BEGIN
2939: l_line_location_id := p_chg.shipment_changes.po_line_location_id(i);
2940:

Line 3025: FROM po_line_locations

3021: -- SQL Why: To roll down a line price change on a standard/planned PO
3022: -- to the shipments of that line.
3023: CURSOR po_shipment_csr (p_po_line_id PO_LINES.po_line_id%TYPE) IS
3024: SELECT line_location_id
3025: FROM po_line_locations
3026: WHERE po_line_id = p_po_line_id
3027: AND (NVL(cancel_flag,'N') <> 'Y')
3028: AND (NVL(closed_code,'OPEN') <> 'FINALLY CLOSED')
3029: AND shipment_type IN ('PLANNED','STANDARD');

Line 3032: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

3028: AND (NVL(closed_code,'OPEN') <> 'FINALLY CLOSED')
3029: AND shipment_type IN ('PLANNED','STANDARD');
3030:
3031: l_po_line_id PO_LINES.po_line_id%TYPE;
3032: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3033: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3034: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3035: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3036: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

Line 3033: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;

3029: AND shipment_type IN ('PLANNED','STANDARD');
3030:
3031: l_po_line_id PO_LINES.po_line_id%TYPE;
3032: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3033: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3034: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3035: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3036: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
3037: l_price_break_id PO_LINES.from_line_location_id%TYPE;

Line 3034: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;

3030:
3031: l_po_line_id PO_LINES.po_line_id%TYPE;
3032: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3033: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3034: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3035: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3036: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
3037: l_price_break_id PO_LINES.from_line_location_id%TYPE;
3038: l_cur_uom2 PO_LINES.secondary_unit_of_measure%TYPE;

Line 3035: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;

3031: l_po_line_id PO_LINES.po_line_id%TYPE;
3032: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3033: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3034: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3035: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3036: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
3037: l_price_break_id PO_LINES.from_line_location_id%TYPE;
3038: l_cur_uom2 PO_LINES.secondary_unit_of_measure%TYPE;
3039: l_derived_qty2 PO_LINES.secondary_quantity%TYPE;

Line 3036: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

3032: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
3033: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
3034: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
3035: l_new_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
3036: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
3037: l_price_break_id PO_LINES.from_line_location_id%TYPE;
3038: l_cur_uom2 PO_LINES.secondary_unit_of_measure%TYPE;
3039: l_derived_qty2 PO_LINES.secondary_quantity%TYPE;
3040: --

Line 3050: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;

3046: l_price_updateable VARCHAR2(1); -- Bug 3337426
3047: l_retro_price_change VARCHAR2(1); -- Bug 3337426
3048: --
3049: l_manual_price_change PO_LINES.manual_price_change_flag%TYPE;
3050: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
3051: --
3052:
3053:
3054: l_return_status VARCHAR2(1);

Line 3058: l_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;

3054: l_return_status VARCHAR2(1);
3055: /* INVCONV sschinch 09/07/04 */
3056: l_dual_um_ind MTL_SYSTEM_ITEMS.TRACKING_QUANTITY_IND%TYPE;
3057: l_secondary_default_ind MTL_SYSTEM_ITEMS.SECONDARY_DEFAULT_IND%TYPE ; --INVCONV sschinch
3058: l_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;
3059: l_fsp_org_id NUMBER;
3060: x_count NUMBER;
3061: x_data VARCHAR2(100);
3062: l_derived_sec_qty PO_LINE_LOCATIONS.quantity%TYPE;

Line 3062: l_derived_sec_qty PO_LINE_LOCATIONS.quantity%TYPE;

3058: l_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;
3059: l_fsp_org_id NUMBER;
3060: x_count NUMBER;
3061: x_data VARCHAR2(100);
3062: l_derived_sec_qty PO_LINE_LOCATIONS.quantity%TYPE;
3063: l_document_uom PO_LINES.secondary_unit_of_measure%TYPE;
3064: l_item_id MTL_SYSTEM_ITEMS_B.inventory_item_id%TYPE;
3065: l_document_sec_uom PO_LINES.secondary_unit_of_measure%TYPE;
3066: l_new_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;

Line 3066: l_new_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;

3062: l_derived_sec_qty PO_LINE_LOCATIONS.quantity%TYPE;
3063: l_document_uom PO_LINES.secondary_unit_of_measure%TYPE;
3064: l_item_id MTL_SYSTEM_ITEMS_B.inventory_item_id%TYPE;
3065: l_document_sec_uom PO_LINES.secondary_unit_of_measure%TYPE;
3066: l_new_secondary_qty PO_LINE_LOCATIONS.quantity%TYPE;
3067:
3068: l_new_amt NUMBER;
3069: l_new_promised_date DATE;
3070: l_delete_record VARCHAR2(1);

Line 3072: l_new_preferred_qty PO_LINE_LOCATIONS.quantity%TYPE;

3068: l_new_amt NUMBER;
3069: l_new_promised_date DATE;
3070: l_delete_record VARCHAR2(1);
3071: l_new_preferred_grade mtl_grades.grade_code%TYPE;
3072: l_new_preferred_qty PO_LINE_LOCATIONS.quantity%TYPE;
3073: l_shipment_changes po_shipments_rec_type;
3074:
3075: l_new_sec_uom PO_LINES.secondary_unit_of_measure%TYPE;
3076: l_count NUMBER := 0;

Line 4040: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

4036: -- None.
4037: --End of Comments
4038: -------------------------------------------------------------------------------
4039: PROCEDURE get_release_break_price (
4040: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4041: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
4042: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4043: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4044: x_price OUT NOCOPY PO_LINES.unit_price%TYPE

Line 4041: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,

4037: --End of Comments
4038: -------------------------------------------------------------------------------
4039: PROCEDURE get_release_break_price (
4040: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4041: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
4042: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4043: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4044: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4045: ) IS

Line 4042: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,

4038: -------------------------------------------------------------------------------
4039: PROCEDURE get_release_break_price (
4040: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4041: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
4042: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4043: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4044: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4045: ) IS
4046: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;

Line 4043: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,

4039: PROCEDURE get_release_break_price (
4040: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4041: p_quantity IN PO_LINE_LOCATIONS.quantity%TYPE,
4042: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4043: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4044: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4045: ) IS
4046: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4047: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

Line 4046: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;

4042: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4043: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4044: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4045: ) IS
4046: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4047: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4048: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4049: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4050: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;

Line 4047: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

4043: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4044: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4045: ) IS
4046: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4047: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4048: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4049: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4050: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4051: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;

Line 4048: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;

4044: x_price OUT NOCOPY PO_LINES.unit_price%TYPE
4045: ) IS
4046: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4047: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4048: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4049: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4050: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4051: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;
4052: l_cumulative_flag BOOLEAN;

Line 4049: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;

4045: ) IS
4046: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4047: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4048: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4049: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4050: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4051: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;
4052: l_cumulative_flag BOOLEAN;
4053: l_price_break_id PO_LINE_LOCATIONS.line_location_id%TYPE;

Line 4050: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;

4046: l_quantity PO_LINE_LOCATIONS.quantity%TYPE;
4047: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4048: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4049: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4050: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4051: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;
4052: l_cumulative_flag BOOLEAN;
4053: l_price_break_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4054: l_return_status VARCHAR2(1);

Line 4053: l_price_break_id PO_LINE_LOCATIONS.line_location_id%TYPE;

4049: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4050: l_po_line_id PO_LINE_LOCATIONS.po_line_id%TYPE;
4051: l_price_break_type PO_LINES.price_break_lookup_code %TYPE;
4052: l_cumulative_flag BOOLEAN;
4053: l_price_break_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4054: l_return_status VARCHAR2(1);
4055:
4056: BEGIN
4057: -- For quantity, ship-to location, and need-by date, use the new value

Line 4072: FROM po_line_locations PLL, po_lines POL

4068: l_need_by_date,
4069: l_ship_to_org_id,
4070: l_po_line_id,
4071: l_price_break_type
4072: FROM po_line_locations PLL, po_lines POL
4073: WHERE PLL.line_location_id = p_line_location_id
4074: AND PLL.po_line_id = POL.po_line_id; -- JOIN
4075:
4076: -- True if price break type is CUMULATIVE, false otherwise:

Line 4125: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

4121: -------------------------------------------------------------------------------
4122: PROCEDURE get_po_break_price (
4123: p_po_line_id IN PO_LINES.po_line_id%TYPE,
4124: p_quantity IN PO_LINES.quantity%TYPE,
4125: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4126: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4127: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4128: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
4129: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,

Line 4126: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,

4122: PROCEDURE get_po_break_price (
4123: p_po_line_id IN PO_LINES.po_line_id%TYPE,
4124: p_quantity IN PO_LINES.quantity%TYPE,
4125: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4126: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4127: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4128: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
4129: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,
4130: --

Line 4127: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,

4123: p_po_line_id IN PO_LINES.po_line_id%TYPE,
4124: p_quantity IN PO_LINES.quantity%TYPE,
4125: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
4126: p_ship_to_location_id IN PO_LINE_LOCATIONS.ship_to_location_id%TYPE,
4127: p_need_by_date IN PO_LINE_LOCATIONS.need_by_date%TYPE,
4128: x_price_break_id OUT NOCOPY PO_LINES.from_line_location_id%TYPE,
4129: x_price OUT NOCOPY PO_LINES.unit_price%TYPE,
4130: --
4131: x_base_unit_price OUT NOCOPY PO_LINES.base_unit_price%TYPE

Line 4134: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

4130: --
4131: x_base_unit_price OUT NOCOPY PO_LINES.base_unit_price%TYPE
4132: ) IS
4133: l_quantity PO_LINES.quantity%TYPE;
4134: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4135: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4136: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4137: l_from_line_id PO_LINES.from_line_id%TYPE;
4138: l_return_status VARCHAR2(1);

Line 4135: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;

4131: x_base_unit_price OUT NOCOPY PO_LINES.base_unit_price%TYPE
4132: ) IS
4133: l_quantity PO_LINES.quantity%TYPE;
4134: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4135: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4136: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4137: l_from_line_id PO_LINES.from_line_id%TYPE;
4138: l_return_status VARCHAR2(1);
4139:

Line 4136: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;

4132: ) IS
4133: l_quantity PO_LINES.quantity%TYPE;
4134: l_ship_to_location_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
4135: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
4136: l_need_by_date PO_LINE_LOCATIONS.need_by_date%TYPE;
4137: l_from_line_id PO_LINES.from_line_id%TYPE;
4138: l_return_status VARCHAR2(1);
4139:
4140: --

Line 4209: FROM po_line_locations PLL, po_lines POL,

4205: l_uom,
4206: l_in_unit_price,
4207: l_currency_code -- Bug 3564863
4208: --
4209: FROM po_line_locations PLL, po_lines POL,
4210: --
4211: po_headers POH
4212: WHERE PLL.line_location_id = p_line_location_id
4213: AND POL.po_line_id = PLL.po_line_id -- JOIN

Line 4295: FROM po_line_locations

4291: END IF;
4292:
4293: SELECT line_location_id
4294: INTO l_line_location_id
4295: FROM po_line_locations
4296: WHERE po_line_id = p_po_line_id
4297: AND shipment_num = l_min_shipment_num
4298: AND shipment_type IN ('STANDARD','PLANNED');
4299:

Line 4337: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

4333: l_ship_rollup_started INDEXED_TBL_NUMBER;
4334: l_line_rollup_started INDEXED_TBL_NUMBER;
4335:
4336: l_po_line_id PO_LINES.po_line_id%TYPE;
4337: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4338:
4339: l_cur_line_qty_amt PO_LINES.quantity%TYPE;
4340: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4341: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

Line 4341: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4337: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4338:
4339: l_cur_line_qty_amt PO_LINES.quantity%TYPE;
4340: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4341: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4342: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4343: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4344: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4345: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;

Line 4342: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4338:
4339: l_cur_line_qty_amt PO_LINES.quantity%TYPE;
4340: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4341: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4342: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4343: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4344: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4345: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4346:

Line 4343: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4339: l_cur_line_qty_amt PO_LINES.quantity%TYPE;
4340: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4341: l_cur_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4342: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4343: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4344: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4345: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4346:
4347: --

Line 4349: l_exist_ship_amt PO_LINE_LOCATIONS.amount%type;

4345: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4346:
4347: --
4348: l_cur_line_amt PO_LINES.amount%type;
4349: l_exist_ship_amt PO_LINE_LOCATIONS.amount%type;
4350: l_new_ship_amt PO_LINE_LOCATIONS.amount%TYPE;
4351: l_new_line_amt PO_LINES.amount%TYPE;
4352: l_new_line_price PO_LINES.unit_price%TYPE;
4353:

Line 4350: l_new_ship_amt PO_LINE_LOCATIONS.amount%TYPE;

4346:
4347: --
4348: l_cur_line_amt PO_LINES.amount%type;
4349: l_exist_ship_amt PO_LINE_LOCATIONS.amount%type;
4350: l_new_ship_amt PO_LINE_LOCATIONS.amount%TYPE;
4351: l_new_line_amt PO_LINES.amount%TYPE;
4352: l_new_line_price PO_LINES.unit_price%TYPE;
4353:
4354: l_ship_chg_i NUMBER;

Line 4703: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

4699: WHERE line_location_id = p_line_location_id
4700: ORDER by distribution_num ASC;
4701:
4702: l_po_line_id PO_LINES.po_line_id%TYPE;
4703: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4704: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4705: l_po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE;
4706:
4707: l_exist_line_qty_amt PO_LINES.quantity%TYPE;

Line 4704: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

4700: ORDER by distribution_num ASC;
4701:
4702: l_po_line_id PO_LINES.po_line_id%TYPE;
4703: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4704: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
4705: l_po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE;
4706:
4707: l_exist_line_qty_amt PO_LINES.quantity%TYPE;
4708: l_new_line_qty_amt PO_LINES.quantity%TYPE;

Line 4709: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4705: l_po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE;
4706:
4707: l_exist_line_qty_amt PO_LINES.quantity%TYPE;
4708: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4709: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4710: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4711: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4712: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
4713: l_exist_dist_qty PO_DISTRIBUTIONS.quantity_ordered%TYPE;

Line 4710: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4706:
4707: l_exist_line_qty_amt PO_LINES.quantity%TYPE;
4708: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4709: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4710: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4711: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4712: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
4713: l_exist_dist_qty PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4714: l_exist_dist_amt PO_DISTRIBUTIONS.amount_ordered%TYPE;

Line 4711: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;

4707: l_exist_line_qty_amt PO_LINES.quantity%TYPE;
4708: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4709: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4710: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4711: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4712: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
4713: l_exist_dist_qty PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4714: l_exist_dist_amt PO_DISTRIBUTIONS.amount_ordered%TYPE;
4715: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;

Line 4712: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;

4708: l_new_line_qty_amt PO_LINES.quantity%TYPE;
4709: l_exist_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4710: l_new_ship_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4711: l_cum_qty_amt PO_LINE_LOCATIONS.quantity%TYPE;
4712: l_split_shipment_num PO_LINE_LOCATIONS.shipment_num%TYPE;
4713: l_exist_dist_qty PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4714: l_exist_dist_amt PO_DISTRIBUTIONS.amount_ordered%TYPE;
4715: l_exist_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;
4716: l_new_dist_qty_amt PO_DISTRIBUTIONS.quantity_ordered%TYPE;

Line 4754: FROM po_line_locations

4750: -- (Note: The checks in verify_inputs ensure that there can
4751: -- only be one active shipment for this line.)
4752: SELECT line_location_id
4753: INTO l_line_location_id
4754: FROM po_line_locations
4755: WHERE po_line_id = p_chg.line_changes.po_line_id(i)
4756: AND shipment_type in ('STANDARD', 'PLANNED')
4757: AND NVL(cancel_flag,'N') <> 'Y'
4758: AND NVL(closed_code,'OPEN') <> 'FINALLY CLOSED';

Line 5194: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;

5190:
5191: l_has_ga_ref PO_HEADERS.global_agreement_flag%TYPE;
5192: l_po_line_id PO_LINES.po_line_id%TYPE;
5193: l_new_qty PO_LINES.quantity%TYPE;
5194: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5195: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5196: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5197: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5198: l_new_price PO_LINES.unit_price%TYPE;

Line 5195: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;

5191: l_has_ga_ref PO_HEADERS.global_agreement_flag%TYPE;
5192: l_po_line_id PO_LINES.po_line_id%TYPE;
5193: l_new_qty PO_LINES.quantity%TYPE;
5194: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5195: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5196: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5197: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5198: l_new_price PO_LINES.unit_price%TYPE;
5199: l_current_price PO_LINES.unit_price%TYPE;

Line 5196: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;

5192: l_po_line_id PO_LINES.po_line_id%TYPE;
5193: l_new_qty PO_LINES.quantity%TYPE;
5194: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5195: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5196: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5197: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5198: l_new_price PO_LINES.unit_price%TYPE;
5199: l_current_price PO_LINES.unit_price%TYPE;
5200: l_new_start_date PO_LINES.start_date%TYPE;

Line 5197: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;

5193: l_new_qty PO_LINES.quantity%TYPE;
5194: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5195: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5196: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5197: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5198: l_new_price PO_LINES.unit_price%TYPE;
5199: l_current_price PO_LINES.unit_price%TYPE;
5200: l_new_start_date PO_LINES.start_date%TYPE;
5201: l_new_end_date PO_LINES.expiration_date%TYPE;

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

5208: l_price_updateable VARCHAR2(1);
5209: l_retroactive_price_change VARCHAR2(1);
5210: l_grade MTL_GRADES.grade_code%TYPE ; -- sschinch INVCONV
5211: l_new_preferred_grade MTL_GRADES.grade_code%TYPE; -- sschinch INVCONV
5212: l_advance_amount PO_LINE_LOCATIONS_ALL.AMOUNT%TYPE; /* << Complex work changes for R12 >> */
5213: l_orig_qty PO_LINES.quantity%TYPE; --
5214:
5215: BEGIN
5216: IF (g_fnd_debug = 'Y') THEN

Line 5247: from po_line_locations_all

5243: BEGIN
5244:
5245: select amount
5246: into l_advance_amount
5247: from po_line_locations_all
5248: where payment_type = 'ADVANCE'
5249: and po_line_id =l_po_line_id ;
5250:
5251: EXCEPTION

Line 5313: FROM po_line_locations

5309: SELECT SUM(NVL(quantity_received,0)),
5310: SUM(NVL(quantity_billed,0))
5311: INTO l_qty_received,
5312: l_qty_billed
5313: FROM po_line_locations
5314: WHERE po_line_id = l_po_line_id
5315: AND shipment_type IN ('STANDARD', 'PLANNED');
5316:
5317: IF (l_new_qty < greatest(l_qty_received, l_qty_billed)

Line 5334: FROM po_line_locations

5330: SELECT Max(NVL(quantity_received,0)),
5331: Max(NVL(quantity_billed,0))
5332: INTO l_qty_received,
5333: l_qty_billed
5334: FROM po_line_locations
5335: WHERE po_line_id = l_po_line_id
5336: AND shipment_type IN ('STANDARD', 'PLANNED','PREPAYMENT');
5337:
5338: IF (l_new_qty < greatest(l_qty_received, l_qty_billed)) THEN

Line 5433: FROM po_line_locations

5429: SELECT SUM(NVL(amount_received,0)),
5430: SUM(NVL(amount_billed,0))
5431: INTO l_amt_received,
5432: l_amt_billed
5433: FROM po_line_locations
5434: WHERE po_line_id = l_po_line_id
5435: AND shipment_type = 'PREPAYMENT';
5436:
5437: IF (l_new_amount < greatest(l_amt_received, l_amt_billed)) THEN

Line 5456: FROM po_line_locations

5452: SELECT SUM(NVL(amount_received,0)),
5453: SUM(NVL(amount_billed,0))
5454: INTO l_amt_received,
5455: l_amt_billed
5456: FROM po_line_locations
5457: WHERE po_line_id = l_po_line_id
5458: AND shipment_type = 'STANDARD';
5459:
5460: IF (l_new_amount < greatest(l_amt_received, l_amt_billed)) THEN

Line 5649: FROM po_line_locations

5645: -- approved at least once.
5646: ----------------------------------------------------------------------
5647: SELECT count(*)
5648: INTO l_ship_count
5649: FROM po_line_locations
5650: WHERE po_line_id = l_po_line_id
5651: AND approved_date IS NOT NULL;
5652:
5653: IF (l_ship_count > 0) THEN

Line 5668: FROM po_line_locations

5664: -- Check: Prevent delete if the line has encumbered shipments.
5665: ----------------------------------------------------------------------
5666: SELECT count(*)
5667: INTO l_ship_count
5668: FROM po_line_locations
5669: WHERE po_line_id = l_po_line_id
5670: AND encumbered_flag = 'Y';
5671:
5672: IF (l_ship_count > 0) THEN

Line 5746: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;

5742:
5743: l_proc_name CONSTANT VARCHAR2(30) := 'VALIDATE_SHIPMENT_CHANGES';
5744: l_progress VARCHAR2(3) := '000';
5745:
5746: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5747: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5748: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;

Line 5747: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;

5743: l_proc_name CONSTANT VARCHAR2(30) := 'VALIDATE_SHIPMENT_CHANGES';
5744: l_progress VARCHAR2(3) := '000';
5745:
5746: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5747: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5748: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;

Line 5748: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;

5744: l_progress VARCHAR2(3) := '000';
5745:
5746: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5747: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5748: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;

Line 5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;

5745:
5746: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5747: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5748: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;

Line 5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;

5746: l_new_qty PO_LINE_LOCATIONS.quantity%TYPE;
5747: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5748: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

Line 5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;

5747: l_exist_qty PO_LINE_LOCATIONS.quantity%TYPE;
5748: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

Line 5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;

5748: l_planned_qty PO_LINE_LOCATIONS.quantity%TYPE;
5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;

Line 5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;

5749: l_scheduled_qty PO_LINE_LOCATIONS.quantity%TYPE;
5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;

Line 5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

5750: l_available_qty PO_LINE_LOCATIONS.quantity%TYPE;
5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;

Line 5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

5751: l_new_price PO_LINE_LOCATIONS.price_override%TYPE;
5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;

Line 5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;

5752: l_current_price PO_LINE_LOCATIONS.price_override%TYPE;
5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;

Line 5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;

5753: l_new_amt PO_LINE_LOCATIONS.amount%TYPE;
5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

Line 5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;

5754: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;

Line 5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;

5755: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;

Line 5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;

5756: l_qty_received PO_LINE_LOCATIONS.quantity_received%TYPE;
5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;

Line 5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;

5757: l_qty_billed PO_LINE_LOCATIONS.quantity_billed%TYPE;
5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5765: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;

Line 5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;

5758: l_amt_received PO_LINE_LOCATIONS.amount_received%TYPE;
5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5765: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5766: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;

Line 5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;

5759: l_amt_billed PO_LINE_LOCATIONS.amount_billed%TYPE;
5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5765: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5766: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5767: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;

Line 5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;

5760: l_qty_shipped PO_LINE_LOCATIONS.quantity_shipped%TYPE;
5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5765: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5766: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5767: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;
5768: l_pending_rcv_transactions NUMBER;

Line 5765: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;

5761: l_new_ship_to_loc_id PO_LINE_LOCATIONS.ship_to_location_id%TYPE;
5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5765: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5766: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5767: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;
5768: l_pending_rcv_transactions NUMBER;
5769: l_allow_price_override PO_LINES.allow_price_override_flag%TYPE;

Line 5766: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;

5762: l_ship_to_org_id PO_LINE_LOCATIONS.ship_to_organization_id%TYPE;
5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5765: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5766: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5767: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;
5768: l_pending_rcv_transactions NUMBER;
5769: l_allow_price_override PO_LINES.allow_price_override_flag%TYPE;
5770: l_ship_to_loc_valid NUMBER;

Line 5767: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;

5763: l_new_promised_date PO_LINE_LOCATIONS.need_by_date%TYPE;
5764: l_new_need_by_date PO_LINE_LOCATIONS.promised_date%TYPE;
5765: l_approved_date PO_LINE_LOCATIONS.approved_date%TYPE;
5766: l_encumbered_flag PO_LINE_LOCATIONS.encumbered_flag%TYPE;
5767: l_shipment_type PO_LINE_LOCATIONS.shipment_type%TYPE;
5768: l_pending_rcv_transactions NUMBER;
5769: l_allow_price_override PO_LINES.allow_price_override_flag%TYPE;
5770: l_ship_to_loc_valid NUMBER;
5771: l_message_name VARCHAR2(30);

Line 5772: l_new_sales_order_update_date PO_LINE_LOCATIONS.sales_order_update_date%TYPE;

5768: l_pending_rcv_transactions NUMBER;
5769: l_allow_price_override PO_LINES.allow_price_override_flag%TYPE;
5770: l_ship_to_loc_valid NUMBER;
5771: l_message_name VARCHAR2(30);
5772: l_new_sales_order_update_date PO_LINE_LOCATIONS.sales_order_update_date%TYPE;
5773:
5774: l_is_split_shipment BOOLEAN;
5775: l_is_drop_ship BOOLEAN;
5776: l_last_msg_list_index NUMBER;

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

5779: l_retroactive_price_change VARCHAR2(1);
5780:
5781: l_grade MTL_GRADES.grade_code%TYPE ; -- sschinch INVCONV
5782: l_new_preferred_grade MTL_GRADES.grade_code%TYPE; -- INVCONV
5783: l_new_secondary_qty PO_LINE_LOCATIONS.SECONDARY_QUANTITY%TYPE; -- INVCONV
5784: l_orig_qty PO_LINE_LOCATIONS.quantity%TYPE; --
5785:
5786: BEGIN
5787: IF (g_fnd_debug = 'Y') THEN

Line 5784: l_orig_qty PO_LINE_LOCATIONS.quantity%TYPE; --

5780:
5781: l_grade MTL_GRADES.grade_code%TYPE ; -- sschinch INVCONV
5782: l_new_preferred_grade MTL_GRADES.grade_code%TYPE; -- INVCONV
5783: l_new_secondary_qty PO_LINE_LOCATIONS.SECONDARY_QUANTITY%TYPE; -- INVCONV
5784: l_orig_qty PO_LINE_LOCATIONS.quantity%TYPE; --
5785:
5786: BEGIN
5787: IF (g_fnd_debug = 'Y') THEN
5788: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) THEN

Line 5837: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5833: OR (p_chg.shipment_changes.c_closed_code(i) = 'FINALLY CLOSED') THEN
5834: add_error ( p_api_errors => g_api_errors,
5835: x_return_status => x_return_status,
5836: p_message_name => 'PO_CHNG_CANNOT_MODIFY_SHIPMENT',
5837: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5838: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
5839: p_entity_id => i );
5840: END IF;
5841:

Line 5858: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5854:
5855: add_error ( p_api_errors => g_api_errors,
5856: x_return_status => x_return_status,
5857: p_message_name => 'PO_CHNG_QTY_RESTRICTED',
5858: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5859: p_column_name => 'QUANTITY',
5860: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
5861: p_entity_id => i );
5862: END IF; -- l_new_qty

Line 5877: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5873:
5874: add_error ( p_api_errors => g_api_errors,
5875: x_return_status => x_return_status,
5876: p_message_name => 'PO_CHNG_AMT_RESTRICTED',
5877: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5878: p_column_name => 'AMOUNT',
5879: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
5880: p_entity_id => i );
5881: END IF; -- l_new_amt

Line 5948: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5944: IF (l_new_qty < NVL(l_scheduled_qty, 0)) THEN
5945: add_error ( p_api_errors => g_api_errors,
5946: x_return_status => x_return_status,
5947: p_message_name => 'PO_PO_REL_EXCEEDS_QTY',
5948: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5949: p_column_name => 'QUANTITY',
5950: p_token_name1 => 'SCHEDULED_QTY',
5951: p_token_value1 => TO_CHAR(l_scheduled_qty),
5952: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,

Line 5970: FROM po_line_locations REL, po_line_locations PLAN

5966: -- SQL What: Retrieve the quantity of the planned PO shipment for this
5967: -- release shipment.
5968: SELECT NVL(PLAN.quantity, 0) - NVL(PLAN.quantity_cancelled, 0)
5969: INTO l_planned_qty
5970: FROM po_line_locations REL, po_line_locations PLAN
5971: WHERE REL.line_location_id = l_line_location_id
5972: AND REL.source_shipment_id = PLAN.line_location_id; -- JOIN
5973:
5974: -- Get the total released quantity.

Line 5991: p_table_name => 'PO_LINE_LOCATIONS_ALL',

5987: IF l_new_qty > l_available_qty THEN
5988: add_error ( p_api_errors => g_api_errors,
5989: x_return_status => x_return_status,
5990: p_message_name => 'PO_PO_QTY_EXCEEDS_UNREL',
5991: p_table_name => 'PO_LINE_LOCATIONS_ALL',
5992: p_column_name => 'QUANTITY',
5993: p_token_name1 => 'UNRELEASED',
5994: p_token_value1 => TO_CHAR(l_available_qty),
5995: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,

Line 6037: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6033:
6034: add_error ( p_api_errors => g_api_errors,
6035: x_return_status => x_return_status,
6036: p_message_name => 'PO_CHNG_CANNOT_MODIFY_DROPSHIP',
6037: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6038: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6039: p_entity_id => i );
6040: END IF; -- shipment is drop ship
6041:

Line 6176: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6172: IF (l_ship_to_loc_valid = 0) THEN
6173: add_error ( p_api_errors => g_api_errors,
6174: x_return_status => x_return_status,
6175: p_message_name => 'PO_PO_SHIP_LOCN_INVALID',
6176: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6177: p_column_name => 'SHIP_TO_LOCATION_ID',
6178: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6179: p_entity_id => i );
6180: END IF;

Line 6195: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6191: IF (l_new_need_by_date IS NOT NULL) THEN
6192: add_error ( p_api_errors => g_api_errors,
6193: x_return_status => x_return_status,
6194: p_message_name => 'PO_CHNG_DROPSHIP_RCV_SHIP_QTY',
6195: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6196: p_column_name => 'NEED_BY_DATE',
6197: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6198: p_entity_id => i );
6199: END IF;

Line 6205: p_table_name => 'PO_LINE_LOCATIONS_ALL',

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

Line 6215: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6211: IF (l_new_sales_order_update_date IS NOT NULL) THEN
6212: add_error ( p_api_errors => g_api_errors,
6213: x_return_status => x_return_status,
6214: p_message_name => 'PO_CHNG_DROPSHIP_RCV_SHIP_QTY',
6215: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6216: p_column_name => 'SALES_ORDER_UPDATE_DATE',
6217: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6218: p_entity_id => i );
6219: END IF;

Line 6242: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6238:
6239: add_error ( p_api_errors => g_api_errors,
6240: x_return_status => x_return_status,
6241: p_message_name => l_message_name,
6242: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6243: p_column_name => NULL,
6244: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6245: p_entity_id => i);
6246: END IF;

Line 6255: p_table_name => 'PO_LINE_LOCATIONS_ALL',

6251: IF (l_encumbered_flag = 'Y') THEN
6252: add_error ( p_api_errors => g_api_errors,
6253: x_return_status => x_return_status,
6254: p_message_name => 'PO_PO_USE_CANCEL_ON_ENCUMB_PO',
6255: p_table_name => 'PO_LINE_LOCATIONS_ALL',
6256: p_column_name => NULL,
6257: p_entity_type => G_ENTITY_TYPE_SHIPMENTS,
6258: p_entity_id => i);
6259: END IF;

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

6722: --Pre-reqs:
6723: -- None.
6724: --Modifies:
6725: -- Updates PO_HEADERS_ALL, PO_RELEASES_ALL, PO_LINES_ALL,
6726: -- PO_LINE_LOCATIONS_ALL, PO_DISTRIBUTIONS_ALL with the changes.
6727: --Locks:
6728: -- None.
6729: --End of Comments
6730: -------------------------------------------------------------------------------

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

6869: l_progress := '040';
6870:
6871: FORALL i IN 1..p_chg.shipment_changes.get_count
6872:
6873: -- SQL What: Update PO_LINE_LOCATIONS with the requested/derived shipment
6874: -- changes. If the approved flag is Y, update it to R.
6875: UPDATE po_line_locations_all PLL
6876: SET last_update_date = sysdate,
6877: last_updated_by = g_user_id,

Line 6875: UPDATE po_line_locations_all PLL

6871: FORALL i IN 1..p_chg.shipment_changes.get_count
6872:
6873: -- SQL What: Update PO_LINE_LOCATIONS with the requested/derived shipment
6874: -- changes. If the approved flag is Y, update it to R.
6875: UPDATE po_line_locations_all PLL
6876: SET last_update_date = sysdate,
6877: last_updated_by = g_user_id,
6878: 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*/
6879: -- approved_flag = decode(approved_flag, 'Y', 'R', approved_flag),

Line 7036: UPDATE po_line_locations_all PLL

7032:
7033: FORALL i IN 1..p_chg.shipment_changes.get_count
7034: -- SQL What: Re-calculate the price discount if there is a price break
7035: -- price change.
7036: UPDATE po_line_locations_all PLL
7037: SET last_update_date = sysdate,
7038: last_updated_by = g_user_id,
7039: price_discount =
7040: (SELECT (POL.unit_price - p_chg.shipment_changes.price_override(i))

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

7198: -- Creates split shipments and split distributions.
7199: --Pre-reqs:
7200: -- None.
7201: --Modifies:
7202: -- Inserts the split shipments into PO_LINE_LOCATIONS_ALL.
7203: -- Updates each split shipment change and split distribution change in p_chg
7204: -- with a new LINE_LOCATION_ID from the sequence.
7205: --Locks:
7206: -- None.

Line 7213: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

7209: PROCEDURE create_split_shipments (
7210: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE
7211: ) IS
7212: l_proc_name CONSTANT VARCHAR2(30) := 'CREATE_SPLIT_SHIPMENTS';
7213: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
7214: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
7215: l_ship_chg_i NUMBER;
7216: BEGIN
7217: IF (g_fnd_debug = 'Y') THEN

Line 7214: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;

7210: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE
7211: ) IS
7212: l_proc_name CONSTANT VARCHAR2(30) := 'CREATE_SPLIT_SHIPMENTS';
7213: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
7214: l_parent_line_loc_id PO_LINE_LOCATIONS.line_location_id%TYPE;
7215: l_ship_chg_i NUMBER;
7216: BEGIN
7217: IF (g_fnd_debug = 'Y') THEN
7218: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_PROCEDURE) THEN

Line 7233: SELECT PO_LINE_LOCATIONS_S.nextval

7229: p_chg.shipment_changes.parent_line_location_id(l_ship_chg_i);
7230:
7231: IF (l_parent_line_loc_id IS NOT NULL) THEN -- This is a split shipment.
7232: -- Generate a new LINE_LOCATION_ID from the sequence.
7233: SELECT PO_LINE_LOCATIONS_S.nextval
7234: INTO l_line_location_id
7235: FROM dual;
7236:
7237: -- Update the split shipment change with the new LINE_LOCATION_ID.

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

7241:
7242: END LOOP; -- split shipment
7243:
7244:
7245: -- Bulk insert all the split shipments into PO_LINE_LOCATIONS_ALL,
7246: -- copying most of the field values from the parent shipments.
7247: FORALL i IN 1..p_chg.shipment_changes.po_line_location_id.COUNT
7248: INSERT INTO po_line_locations_all
7249: (

Line 7248: INSERT INTO po_line_locations_all

7244:
7245: -- Bulk insert all the split shipments into PO_LINE_LOCATIONS_ALL,
7246: -- copying most of the field values from the parent shipments.
7247: FORALL i IN 1..p_chg.shipment_changes.po_line_location_id.COUNT
7248: INSERT INTO po_line_locations_all
7249: (
7250: LINE_LOCATION_ID ,
7251: LAST_UPDATE_DATE ,
7252: LAST_UPDATED_BY ,

Line 7578: FROM po_line_locations

7574: nvl2(g_calculate_tax_flag, 'CREATE', null), --
7575: line_location_id, --
7576: decode(p_chg.shipment_changes.payment_type(i),'RATE','QUANTITY',matching_basis), -- FPS Enhancement
7577: decode(p_chg.shipment_changes.payment_type(i),'RATE','QUANTITY',value_basis) -- FPS Enhancement
7578: FROM po_line_locations
7579: WHERE p_chg.shipment_changes.parent_line_location_id(i) IS NOT NULL
7580: AND line_location_id = p_chg.shipment_changes.parent_line_location_id(i);
7581:
7582: -- Now create all the split distributions.

Line 8001: -- PO_LINES, PO_LINE_LOCATIONS, PO_DISTRIBUTIONS

7997: -- G_PARAMETER_YES.
7998: --Pre-reqs:
7999: -- None.
8000: --Modifies:
8001: -- PO_LINES, PO_LINE_LOCATIONS, PO_DISTRIBUTIONS
8002: --Locks:
8003: -- None.
8004: --End of Comments
8005: -------------------------------------------------------------------------------

Line 8049: FROM po_line_locations

8045: po_line_id and quantity fro the shipment whose delete record flag is set to Yes*/
8046:
8047: SELECT rowid,po_line_id,quantity
8048: INTO l_rowid, l_po_line_id, l_quantity
8049: FROM po_line_locations
8050: WHERE line_location_id = p_chg.shipment_changes.po_line_location_id(i);
8051:
8052: PO_SHIPMENTS_SV4.delete_shipment (
8053: x_line_location_id => p_chg.shipment_changes.po_line_location_id(i),

Line 8403: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

8399: PROCEDURE add_ship_change_to_index (
8400: p_chg IN PO_CHANGES_REC_TYPE,
8401: i IN NUMBER
8402: ) IS
8403: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
8404: l_po_line_id PO_LINES.po_line_id%TYPE;
8405: c NUMBER;
8406: BEGIN
8407: l_line_location_id := p_chg.shipment_changes.po_line_location_id(i);

Line 8455: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;

8451: p_chg IN PO_CHANGES_REC_TYPE,
8452: i IN NUMBER
8453: ) IS
8454: l_po_distribution_id PO_DISTRIBUTIONS.po_distribution_id%TYPE;
8455: l_line_location_id PO_LINE_LOCATIONS.line_location_id%TYPE;
8456: c NUMBER;
8457: BEGIN
8458: l_po_distribution_id := p_chg.distribution_changes.po_distribution_id(i);
8459:

Line 8564: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE

8560: -- None.
8561: --End of Comments
8562: -------------------------------------------------------------------------------
8563: FUNCTION get_ship_change (
8564: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE
8565: ) RETURN NUMBER IS
8566: i NUMBER;
8567: BEGIN
8568: IF g_ship_changes_index.EXISTS(p_line_location_id) THEN

Line 8592: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE

8588: --End of Comments
8589: -------------------------------------------------------------------------------
8590: FUNCTION find_ship_change (
8591: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
8592: p_line_location_id IN PO_LINE_LOCATIONS.line_location_id%TYPE
8593: ) RETURN NUMBER IS
8594: i NUMBER;
8595: BEGIN
8596: i := get_ship_change(p_line_location_id);

Line 8686: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

8682: -------------------------------------------------------------------------------
8683: FUNCTION get_split_ship_change (
8684: p_chg IN PO_CHANGES_REC_TYPE,
8685: p_po_line_id IN PO_LINES.po_line_id%TYPE,
8686: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8687: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8688: ) RETURN NUMBER IS
8689: l_ship_chg_i NUMBER;
8690: BEGIN

Line 8687: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE

8683: FUNCTION get_split_ship_change (
8684: p_chg IN PO_CHANGES_REC_TYPE,
8685: p_po_line_id IN PO_LINES.po_line_id%TYPE,
8686: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8687: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8688: ) RETURN NUMBER IS
8689: l_ship_chg_i NUMBER;
8690: BEGIN
8691: -- Loop through the split shipment changes.

Line 8727: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

8723: -------------------------------------------------------------------------------
8724: FUNCTION get_split_dist_change (
8725: p_chg IN PO_CHANGES_REC_TYPE,
8726: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
8727: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8728: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8729: ) RETURN NUMBER IS
8730: l_dist_chg_i NUMBER;
8731: BEGIN

Line 8728: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE

8724: FUNCTION get_split_dist_change (
8725: p_chg IN PO_CHANGES_REC_TYPE,
8726: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
8727: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8728: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8729: ) RETURN NUMBER IS
8730: l_dist_chg_i NUMBER;
8731: BEGIN
8732: -- Loop through the split distribution changes.

Line 8769: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,

8765: -------------------------------------------------------------------------------
8766: FUNCTION find_split_dist_change (
8767: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
8768: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
8769: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8770: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8771: ) RETURN NUMBER IS
8772: i NUMBER;
8773: BEGIN

Line 8770: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE

8766: FUNCTION find_split_dist_change (
8767: p_chg IN OUT NOCOPY PO_CHANGES_REC_TYPE,
8768: p_parent_distribution_id IN PO_DISTRIBUTIONS.po_distribution_id%TYPE,
8769: p_parent_line_loc_id IN PO_LINE_LOCATIONS.line_location_id%TYPE,
8770: p_split_shipment_num IN PO_LINE_LOCATIONS.shipment_num%TYPE
8771: ) RETURN NUMBER IS
8772: i NUMBER;
8773: BEGIN
8774: i := get_split_dist_change(p_chg, p_parent_distribution_id,

Line 9011: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;

9007: l_conterms_exist_flag PO_HEADERS_ALL.conterms_exist_flag%type;
9008: l_consigned_consumption_flag PO_HEADERS_ALL.consigned_consumption_flag%type;
9009: l_cancel_flag PO_HEADERS_ALL.cancel_flag%type;
9010: l_ga_flag PO_HEADERS_ALL.global_agreement_flag%type;
9011: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
9012: l_allow_delete VARCHAR2(1);
9013: d_pos NUMBER := 0;
9014: l_api_name CONSTANT VARCHAR2(30) := 'validate_delete_action';
9015: d_module CONSTANT VARCHAR2(70) := 'po.plsql.PO_DOCUMENT_UPDATE_PVT.validate_delete_action';