DBA Data[Home] [Help]

APPS.AHL_OSP_RCV_PVT dependencies on OE_ORDER_LINES_ALL

Line 6: G_TRANSACTION_TABLE CONSTANT VARCHAR2(30) := 'OE_ORDER_LINES_ALL';

2: /* $Header: AHLVORCB.pls 120.16.12020000.3 2013/02/12 04:59:04 jrotich ship $ */
3:
4: -- Global variable containing package name for debugs messages
5: G_PKG_NAME CONSTANT VARCHAR2(30) := 'AHL_OSP_RCV_PVT';
6: G_TRANSACTION_TABLE CONSTANT VARCHAR2(30) := 'OE_ORDER_LINES_ALL';
7: G_CSI_T_SOURCE_LINE_REF CONSTANT VARCHAR2(50) := 'AHL_OSP_ORDER_LINES';
8: -- Ship-only transaction type
9: G_OM_ORDER CONSTANT VARCHAR2(30) := 'OM_SHIPMENT';
10: -- Return transaction type

Line 106: FROM OE_ORDER_LINES_ALL OLA, OE_LINE_TYPES_V OLT

102:
103: -- Cursor to get all the RMA type lines for the given sales order.
104: CURSOR get_rma_lines (c_oe_header_id NUMBER) IS
105: SELECT OLA.line_id
106: FROM OE_ORDER_LINES_ALL OLA, OE_LINE_TYPES_V OLT
107: WHERE OLA.header_id = c_oe_header_id
108: AND OLT.line_type_id = OLA.line_type_id
109: AND OLT.order_category_code = 'RETURN';
110:

Line 116: l_oe_line_id OE_ORDER_LINES_ALL.line_id%TYPE;

112: l_api_name CONSTANT VARCHAR2(30) := 'Can_Receive_Against_OSP';
113: l_debug_key CONSTANT VARCHAR2(60) := 'ahl.plsql.'||G_PKG_NAME||'.'||l_api_name;
114:
115: l_oe_header_id AHL_OSP_ORDERS_B.oe_header_id%TYPE;
116: l_oe_line_id OE_ORDER_LINES_ALL.line_id%TYPE;
117: l_dummy VARCHAR2(1);
118: --
119:
120: BEGIN

Line 219: FROM OE_ORDER_LINES_ALL

215:
216: -- Cursor to check whether the given return line is valid or not.
217: CURSOR chk_return_line (c_oe_line_id NUMBER) IS
218: SELECT 'X'
219: FROM OE_ORDER_LINES_ALL
220: WHERE line_id = c_oe_line_id
221: AND line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID');
222:
223: -- SATHAPLI::Bug 6877509 - changes start, 02-Apr-08

Line 230: FROM OE_ORDER_LINES_ALL

226: -- the cumulative qty of all the split lines so as to decide that the shipped qty is equal to or less than the ordered qty.
227: /*
228: CURSOR get_oe_quantities (c_oe_line_id NUMBER) IS
229: SELECT ordered_quantity, shipped_quantity
230: FROM OE_ORDER_LINES_ALL
231: WHERE line_id = c_oe_line_id;
232: */
233: CURSOR get_oe_quantities (c_oe_header_id NUMBER, c_oe_line_number NUMBER) IS
234: SELECT SUM(ordered_quantity), SUM(shipped_quantity)

Line 235: FROM OE_ORDER_LINES_ALL

231: WHERE line_id = c_oe_line_id;
232: */
233: CURSOR get_oe_quantities (c_oe_header_id NUMBER, c_oe_line_number NUMBER) IS
234: SELECT SUM(ordered_quantity), SUM(shipped_quantity)
235: FROM OE_ORDER_LINES_ALL
236: WHERE header_id = c_oe_header_id
237: AND line_number = c_oe_line_number
238: AND NVL(cancelled_flag, 'X') <> 'Y';
239:

Line 242: But there is no index present on the column split_from_line_id in the table OE_ORDER_LINES_ALL, and the hierarchical query is

238: AND NVL(cancelled_flag, 'X') <> 'Y';
239:
240: /*
241: NOTE: Instead of using the line_number, we can use split_from_line_id and get the cumulative qty using a hierarchical query.
242: But there is no index present on the column split_from_line_id in the table OE_ORDER_LINES_ALL, and the hierarchical query is
243: performance intensive. This approach may be pursued in the future, if need be.
244: */
245:
246: -- Cursor to get the header_id and line_number of the given return line. This is mainly for split lines.

Line 249: FROM OE_ORDER_LINES_ALL

245:
246: -- Cursor to get the header_id and line_number of the given return line. This is mainly for split lines.
247: CURSOR get_oe_split_line_details (c_oe_line_id NUMBER) IS
248: SELECT header_id, line_number
249: FROM OE_ORDER_LINES_ALL
250: WHERE line_id = c_oe_line_id;
251: -- SATHAPLI::Bug 6877509 - changes end, 02-Apr-08
252:
253: -- Cursor to get the PO header id for the OSP order corresponding to the given return line id.

Line 326: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;

322: l_po_header_id AHL_OSP_ORDERS_B.po_header_id%TYPE;
323: l_po_req_header_id AHL_OSP_ORDERS_B.po_req_header_id%TYPE;
324: l_po_line_id AHL_OSP_ORDER_LINES.po_line_id%TYPE;
325: l_po_req_line_id AHL_OSP_ORDER_LINES.po_req_line_id%TYPE;
326: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;
327: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
328: l_po_line_qty NUMBER;
329: l_po_line_tot_qty NUMBER;
330: l_dummy VARCHAR2(1);

Line 327: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;

323: l_po_req_header_id AHL_OSP_ORDERS_B.po_req_header_id%TYPE;
324: l_po_line_id AHL_OSP_ORDER_LINES.po_line_id%TYPE;
325: l_po_req_line_id AHL_OSP_ORDER_LINES.po_req_line_id%TYPE;
326: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;
327: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
328: l_po_line_qty NUMBER;
329: l_po_line_tot_qty NUMBER;
330: l_dummy VARCHAR2(1);
331:

Line 332: l_oe_hdr_id OE_ORDER_LINES_ALL.header_id%TYPE;

328: l_po_line_qty NUMBER;
329: l_po_line_tot_qty NUMBER;
330: l_dummy VARCHAR2(1);
331:
332: l_oe_hdr_id OE_ORDER_LINES_ALL.header_id%TYPE;
333: l_oe_line_no OE_ORDER_LINES_ALL.line_number%TYPE;
334:
335: TYPE PO_LINE_TBL_TYPE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
336: l_po_line_tbl PO_LINE_TBL_TYPE;

Line 333: l_oe_line_no OE_ORDER_LINES_ALL.line_number%TYPE;

329: l_po_line_tot_qty NUMBER;
330: l_dummy VARCHAR2(1);
331:
332: l_oe_hdr_id OE_ORDER_LINES_ALL.header_id%TYPE;
333: l_oe_line_no OE_ORDER_LINES_ALL.line_number%TYPE;
334:
335: TYPE PO_LINE_TBL_TYPE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
336: l_po_line_tbl PO_LINE_TBL_TYPE;
337: l_merged_req_line BOOLEAN := FALSE;

Line 541: FROM OE_ORDER_LINES_ALL

537:
538: -- Cursor to check whether the given return line is valid or not.
539: CURSOR chk_return_line (c_oe_line_id NUMBER) IS
540: SELECT 'X'
541: FROM OE_ORDER_LINES_ALL
542: WHERE line_id = c_oe_line_id
543: AND line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID');
544:
545: -- Cursor to check whether the shipment is booked or not.

Line 548: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA

544:
545: -- Cursor to check whether the shipment is booked or not.
546: CURSOR chk_shipment_booked (c_oe_line_id NUMBER) IS
547: SELECT OHA.header_id
548: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA
549: WHERE OLA.line_id = c_oe_line_id
550: AND OHA.header_id = OLA.header_id
551: AND OHA.booked_flag = 'Y';
552:

Line 563: FROM OE_ORDER_LINES_ALL

559:
560: -- Cursor to get the ordered and shipped quantities of the given return line.
561: CURSOR get_oe_quantities (c_oe_line_id NUMBER) IS
562: SELECT ordered_quantity, shipped_quantity
563: FROM OE_ORDER_LINES_ALL
564: WHERE line_id = c_oe_line_id;
565:
566: --
567: l_api_name CONSTANT VARCHAR2(30) := 'Can_Receive_Against_RMA';

Line 706: FROM OE_ORDER_LINES_ALL

702:
703: -- Cursor to check whether the given return line is valid or not.
704: CURSOR chk_return_line (c_oe_line_id NUMBER) IS
705: SELECT 'X'
706: FROM OE_ORDER_LINES_ALL
707: WHERE line_id = c_oe_line_id
708: AND line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID');
709:
710: -- Cursor to check whether the shipment is booked or not.

Line 713: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA

709:
710: -- Cursor to check whether the shipment is booked or not.
711: CURSOR chk_shipment_booked (c_oe_line_id NUMBER) IS
712: SELECT OHA.header_id
713: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA
714: WHERE OLA.line_id = c_oe_line_id
715: AND OHA.header_id = OLA.header_id
716: AND OHA.booked_flag = 'Y';
717:

Line 728: FROM OE_ORDER_LINES_ALL

724:
725: -- Cursor to get the ordered and shipped quantities of the given return line.
726: CURSOR get_oe_quantities (c_oe_line_id NUMBER) IS
727: SELECT ordered_quantity, shipped_quantity
728: FROM OE_ORDER_LINES_ALL
729: WHERE line_id = c_oe_line_id;
730:
731: -- Cursor to get inventory item details
732: CURSOR get_inv_details (c_oe_line_id NUMBER) IS

Line 734: FROM OE_ORDER_LINES_ALL

730:
731: -- Cursor to get inventory item details
732: CURSOR get_inv_details (c_oe_line_id NUMBER) IS
733: SELECT INVENTORY_ITEM_ID, SHIP_FROM_ORG_ID
734: FROM OE_ORDER_LINES_ALL
735: WHERE line_id = c_oe_line_id;
736:
737: -- Cursor to check whether the given vendor is warranty enabled
738: CURSOR is_warranty_vendor (c_osp_order_id NUMBER) IS

Line 1487: FROM oe_order_lines_all

1483: ship_from_org_id organization_id,
1484: subinventory,
1485: header_id oe_order_header_id,
1486: line_id oe_order_line_id
1487: FROM oe_order_lines_all
1488: WHERE line_id = c_oe_line_id;
1489:
1490: CURSOR inv_item_ctrls_csr (c_inv_item_id NUMBER,c_org_id NUMBER) IS
1491: SELECT serial_number_control_code,

Line 1507: AND tl.source_transaction_table = 'OE_ORDER_LINES_ALL'

1503: FROM csi_t_transaction_lines tl,
1504: csi_t_txn_line_details tld,
1505: csi_item_instances csi
1506: WHERE tl.source_transaction_id = c_oe_line_id
1507: AND tl.source_transaction_table = 'OE_ORDER_LINES_ALL'
1508: AND tl.transaction_line_id = tld.transaction_line_id
1509: AND tld.instance_id = csi.instance_id;
1510:
1511: CURSOR get_osp_order_dtls(c_oe_line_id NUMBER) IS

Line 1516: FROM oe_order_lines_all oel,

1512: SELECT osp.osp_order_id,
1513: osp.order_type_code,
1514: oel.source_document_line_id osp_line_id,
1515: osp.object_version_number
1516: FROM oe_order_lines_all oel,
1517: ahl_osp_orders_b osp
1518: WHERE oel.header_id = osp.oe_header_id
1519: AND oel.line_id = c_oe_line_id;
1520:

Line 2561: FROM OE_ORDER_LINES_ALL

2557:
2558: -- Cursor to check whether the given return line is valid or not.
2559: CURSOR chk_return_line (c_oe_line_id NUMBER) IS
2560: SELECT 'X'
2561: FROM OE_ORDER_LINES_ALL
2562: WHERE line_id = c_oe_line_id
2563: AND line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID');
2564:
2565: -- Cursor to check whether the shipment is booked or not.

Line 2568: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA

2564:
2565: -- Cursor to check whether the shipment is booked or not.
2566: CURSOR chk_shipment_booked (c_oe_line_id NUMBER) IS
2567: SELECT OHA.header_id
2568: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA
2569: WHERE OLA.line_id = c_oe_line_id
2570: AND OHA.header_id = OLA.header_id
2571: AND OHA.booked_flag = 'Y';
2572:

Line 2583: FROM OE_ORDER_LINES_ALL

2579:
2580: -- Cursor to get the ordered and shipped quantities of the given return line.
2581: CURSOR get_oe_quantities (c_oe_line_id NUMBER) IS
2582: SELECT ordered_quantity, shipped_quantity
2583: FROM OE_ORDER_LINES_ALL
2584: WHERE line_id = c_oe_line_id;
2585:
2586: -- Cursor to check that the 'ship from org id' is same as the 'receiving org id' for a given return line.
2587: CURSOR chk_org_id (c_oe_line_id NUMBER, c_rcv_org_id NUMBER) IS

Line 2589: FROM OE_ORDER_LINES_ALL

2585:
2586: -- Cursor to check that the 'ship from org id' is same as the 'receiving org id' for a given return line.
2587: CURSOR chk_org_id (c_oe_line_id NUMBER, c_rcv_org_id NUMBER) IS
2588: SELECT 'X'
2589: FROM OE_ORDER_LINES_ALL
2590: WHERE line_id = c_oe_line_id
2591: AND NVL(ship_from_org_id, -1) = c_rcv_org_id;
2592:
2593: --

Line 2599: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;

2595: l_debug_key CONSTANT VARCHAR2(60) := 'ahl.plsql.'||G_PKG_NAME||'.'||l_api_name;
2596:
2597: l_oe_header_id OE_ORDER_HEADERS_ALL.header_id%TYPE;
2598: l_oe_ship_line_id AHL_OSP_ORDER_LINES.oe_ship_line_id%TYPE;
2599: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;
2600: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
2601: l_valid_flag BOOLEAN := TRUE;
2602: l_part_num_change_flag BOOLEAN := FALSE;
2603: l_exchange_flag BOOLEAN := FALSE;

Line 2600: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;

2596:
2597: l_oe_header_id OE_ORDER_HEADERS_ALL.header_id%TYPE;
2598: l_oe_ship_line_id AHL_OSP_ORDER_LINES.oe_ship_line_id%TYPE;
2599: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;
2600: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
2601: l_valid_flag BOOLEAN := TRUE;
2602: l_part_num_change_flag BOOLEAN := FALSE;
2603: l_exchange_flag BOOLEAN := FALSE;
2604: l_dummy VARCHAR2(1);