DBA Data[Home] [Help]

APPS.AP_MATCHING_UTILS_PKG dependencies on RCV_TRANSACTIONS

Line 1789: CURSOR C_Rcv_Transactions (p_rcv_shipment_line_id IN NUMBER) IS

1785: Procedure Match_To_Rcv_Shipment_Line(P_Invoice_Id IN NUMBER,
1786: P_Invoice_Line_Number IN NUMBER,
1787: P_Calling_Sequence IN VARCHAR2) IS
1788:
1789: CURSOR C_Rcv_Transactions (p_rcv_shipment_line_id IN NUMBER) IS
1790: SELECT rcv.transaction_id,
1791: pll.matching_basis,
1792: pll.line_location_id
1793: FROM rcv_transactions rcv,

Line 1793: FROM rcv_transactions rcv,

1789: CURSOR C_Rcv_Transactions (p_rcv_shipment_line_id IN NUMBER) IS
1790: SELECT rcv.transaction_id,
1791: pll.matching_basis,
1792: pll.line_location_id
1793: FROM rcv_transactions rcv,
1794: rcv_shipment_lines rsl,
1795: po_line_locations pll
1796: WHERE rcv.shipment_line_id = rsl.shipment_line_id
1797: AND rsl.shipment_line_id = p_rcv_shipment_line_id

Line 1804: rcv_transactions

1800:
1801: CURSOR C_Deliver_Transactions(p_rcv_transaction_id IN NUMBER) IS
1802: SELECT po_distribution_id
1803: FROM
1804: rcv_transactions
1805: WHERE
1806: transaction_type = 'DELIVER'
1807: START WITH transaction_id = p_rcv_transaction_id
1808: CONNECT BY parent_transaction_id = PRIOR transaction_id

Line 1821: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;

1817:
1818: l_match_unit_price NUMBER;
1819: l_match_quantity NUMBER;
1820: l_match_amount NUMBER;
1821: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;
1822: l_matching_basis PO_LINE_LOCATIONS.MATCHING_BASIS%TYPE;
1823: l_invoice_currency_code AP_INVOICES.INVOICE_CURRENCY_CODE%TYPE;
1824: l_invoice_type_lookup_code AP_INVOICES.INVOICE_TYPE_LOOKUP_CODE%TYPE;
1825: l_unit_meas_lookup_code AP_INVOICE_LINES.UNIT_MEAS_LOOKUP_CODE%TYPE;

Line 1917: l_debug_info := 'Open C_Rcv_Transactions cursor';

1913: END IF;
1914:
1915:
1916: IF (l_match_mode IN ('STD-PS','STD-PD')) THEN
1917: l_debug_info := 'Open C_Rcv_Transactions cursor';
1918: OPEN c_rcv_transactions(l_rcv_shipment_line_id);
1919:
1920: LOOP
1921:

Line 1918: OPEN c_rcv_transactions(l_rcv_shipment_line_id);

1914:
1915:
1916: IF (l_match_mode IN ('STD-PS','STD-PD')) THEN
1917: l_debug_info := 'Open C_Rcv_Transactions cursor';
1918: OPEN c_rcv_transactions(l_rcv_shipment_line_id);
1919:
1920: LOOP
1921:
1922: FETCH C_Rcv_Transactions INTO l_rcv_transaction_id,

Line 1922: FETCH C_Rcv_Transactions INTO l_rcv_transaction_id,

1918: OPEN c_rcv_transactions(l_rcv_shipment_line_id);
1919:
1920: LOOP
1921:
1922: FETCH C_Rcv_Transactions INTO l_rcv_transaction_id,
1923: l_matching_basis,
1924: l_po_line_location_id;
1925: EXIT WHEN C_Rcv_Transactions%NOTFOUND OR l_total_match_amount = 0
1926: OR l_total_match_quantity = 0;

Line 1925: EXIT WHEN C_Rcv_Transactions%NOTFOUND OR l_total_match_amount = 0

1921:
1922: FETCH C_Rcv_Transactions INTO l_rcv_transaction_id,
1923: l_matching_basis,
1924: l_po_line_location_id;
1925: EXIT WHEN C_Rcv_Transactions%NOTFOUND OR l_total_match_amount = 0
1926: OR l_total_match_quantity = 0;
1927:
1928:
1929: OPEN C_Deliver_Transactions(l_rcv_transaction_id);

Line 2071: CLOSE C_Rcv_Transactions;

2067: CLOSE C_Deliver_Transactions;
2068:
2069: END LOOP;
2070:
2071: CLOSE C_Rcv_Transactions;
2072:
2073: END IF; /* l_match_mode IN ...*/
2074:
2075: --If match_quantity or amount is still not used up by the

Line 2077: --quantity/amount across all the rcv_transactions based on O-B ??

2073: END IF; /* l_match_mode IN ...*/
2074:
2075: --If match_quantity or amount is still not used up by the
2076: --deliver transactions above, then we prorate the remaining
2077: --quantity/amount across all the rcv_transactions based on O-B ??
2078:
2079: IF ((l_match_mode IN ('CR-PS','CR-PD')) OR
2080: (l_matching_basis = 'QUANTITY' and l_total_match_quantity > 0 ) OR
2081: (l_matching_basis = 'AMOUNT' and l_total_match_amount > 0)) THEN

Line 2083: OPEN C_Rcv_Transactions(l_rcv_shipment_line_id);

2079: IF ((l_match_mode IN ('CR-PS','CR-PD')) OR
2080: (l_matching_basis = 'QUANTITY' and l_total_match_quantity > 0 ) OR
2081: (l_matching_basis = 'AMOUNT' and l_total_match_amount > 0)) THEN
2082:
2083: OPEN C_Rcv_Transactions(l_rcv_shipment_line_id);
2084:
2085: LOOP
2086:
2087: FETCH C_Rcv_Transactions INTO l_rcv_transaction_id,

Line 2087: FETCH C_Rcv_Transactions INTO l_rcv_transaction_id,

2083: OPEN C_Rcv_Transactions(l_rcv_shipment_line_id);
2084:
2085: LOOP
2086:
2087: FETCH C_Rcv_Transactions INTO l_rcv_transaction_id,
2088: l_matching_basis,
2089: l_po_line_location_id;
2090:
2091: EXIT WHEN (C_Rcv_Transactions%NOTFOUND or

Line 2091: EXIT WHEN (C_Rcv_Transactions%NOTFOUND or

2087: FETCH C_Rcv_Transactions INTO l_rcv_transaction_id,
2088: l_matching_basis,
2089: l_po_line_location_id;
2090:
2091: EXIT WHEN (C_Rcv_Transactions%NOTFOUND or
2092: l_total_match_quantity = 0 OR l_total_match_amount = 0);
2093:
2094: IF (l_matching_basis = 'QUANTITY') THEN
2095:

Line 2262: CLOSE C_Rcv_Transactions;

2258: END IF; /* l_matching_basis */
2259:
2260: END LOOP;
2261:
2262: CLOSE C_Rcv_Transactions;
2263:
2264: END IF; /* l_match_mode = 'STD-PS' OR l_total_match_quantity > 0 OR ... */
2265:
2266: EXCEPTION WHEN OTHERS THEN

Line 2309: CURSOR C_Rcv_Transactions (p_rcv_shipment_line_id IN NUMBER) IS

2305: p_matching_basis IN VARCHAR2,
2306: p_returned_item IN VARCHAR2)
2307: RETURN NUMBER IS
2308:
2309: CURSOR C_Rcv_Transactions (p_rcv_shipment_line_id IN NUMBER) IS
2310: SELECT rcv.transaction_id,
2311: pll.matching_basis,
2312: pll.line_location_id
2313: FROM rcv_transactions rcv,

Line 2313: FROM rcv_transactions rcv,

2309: CURSOR C_Rcv_Transactions (p_rcv_shipment_line_id IN NUMBER) IS
2310: SELECT rcv.transaction_id,
2311: pll.matching_basis,
2312: pll.line_location_id
2313: FROM rcv_transactions rcv,
2314: rcv_shipment_lines rsl,
2315: po_line_locations pll
2316: WHERE rcv.shipment_line_id = rsl.shipment_line_id
2317: AND rsl.shipment_line_id = p_rcv_shipment_line_id

Line 2322: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;

2318: AND pll.line_location_id = rcv.po_line_location_id
2319: AND rcv.transaction_type IN ('RECEIVE','MATCH');
2320:
2321: l_po_line_location_id PO_LINE_LOCATIONS.LINE_LOCATION_ID%TYPE;
2322: l_rcv_transaction_id RCV_TRANSACTIONS.TRANSACTION_ID%TYPE;
2323: l_matching_basis PO_LINE_LOCATIONS.MATCHING_BASIS%TYPE;
2324: l_po_distribution_id PO_DISTRIBUTIONS.PO_DISTRIBUTION_ID%TYPE;
2325:
2326: l_ordered_qty NUMBER;

Line 2373: l_debug_info := 'Open C_Rcv_Transactions cursor';

2369: l_total_amount_ordered := 0;
2370: l_total_received_qty := 0;
2371: l_total_received_Amount := 0;
2372:
2373: l_debug_info := 'Open C_Rcv_Transactions cursor';
2374: OPEN c_rcv_transactions(p_rcv_shipment_line_id);
2375: LOOP
2376: FETCH C_Rcv_Transactions
2377: INTO l_rcv_transaction_id,

Line 2374: OPEN c_rcv_transactions(p_rcv_shipment_line_id);

2370: l_total_received_qty := 0;
2371: l_total_received_Amount := 0;
2372:
2373: l_debug_info := 'Open C_Rcv_Transactions cursor';
2374: OPEN c_rcv_transactions(p_rcv_shipment_line_id);
2375: LOOP
2376: FETCH C_Rcv_Transactions
2377: INTO l_rcv_transaction_id,
2378: l_matching_basis,

Line 2376: FETCH C_Rcv_Transactions

2372:
2373: l_debug_info := 'Open C_Rcv_Transactions cursor';
2374: OPEN c_rcv_transactions(p_rcv_shipment_line_id);
2375: LOOP
2376: FETCH C_Rcv_Transactions
2377: INTO l_rcv_transaction_id,
2378: l_matching_basis,
2379: l_po_line_location_id;
2380: EXIT WHEN C_Rcv_Transactions%NOTFOUND;

Line 2380: EXIT WHEN C_Rcv_Transactions%NOTFOUND;

2376: FETCH C_Rcv_Transactions
2377: INTO l_rcv_transaction_id,
2378: l_matching_basis,
2379: l_po_line_location_id;
2380: EXIT WHEN C_Rcv_Transactions%NOTFOUND;
2381:
2382: IF (l_matching_basis = 'QUANTITY') THEN
2383:
2384: AP_MATCHING_UTILS_PKG.Get_receipt_Quantities(

Line 2445: CLOSE C_Rcv_Transactions;

2441: l_total_received_qty := l_received_qty + l_total_received_qty;
2442: l_total_delivered_qty := l_delivered_qty + l_total_delivered_qty; --Bug 8881382
2443: l_total_received_Amount := l_amount_received + l_total_received_Amount;
2444: END LOOP;
2445: CLOSE C_Rcv_Transactions;
2446:
2447: IF p_returned_item = 'QUANTITY_BILLED' THEN
2448: RETURN l_total_billed_qty;
2449: ELSIF p_returned_item = 'QUANTITY_RECEIVED' THEN

Line 2486: rcv_transactions rt

2482:
2483: SELECT count(*)
2484: INTO P_num_rect_po_dists
2485: FROM po_distributions_all pod,
2486: rcv_transactions rt
2487: WHERE rt.transaction_id =P_rcv_transaction_id
2488: and rt.po_line_location_id = pod.line_location_id
2489: and (rt.po_distribution_id is null
2490: or rt.po_distribution_id = pod.po_distribution_id);