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.10 2008/04/02 14:51:32 sathapli noship $ */
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 97: FROM OE_ORDER_LINES_ALL OLA, OE_LINE_TYPES_V OLT

93:
94: -- Cursor to get all the RMA type lines for the given sales order.
95: CURSOR get_rma_lines (c_oe_header_id NUMBER) IS
96: SELECT OLA.line_id
97: FROM OE_ORDER_LINES_ALL OLA, OE_LINE_TYPES_V OLT
98: WHERE OLA.header_id = c_oe_header_id
99: AND OLT.line_type_id = OLA.line_type_id
100: AND OLT.order_category_code = 'RETURN';
101:

Line 107: l_oe_line_id OE_ORDER_LINES_ALL.line_id%TYPE;

103: l_api_name CONSTANT VARCHAR2(30) := 'Can_Receive_Against_OSP';
104: l_debug_key CONSTANT VARCHAR2(60) := 'ahl.plsql.'||G_PKG_NAME||'.'||l_api_name;
105:
106: l_oe_header_id AHL_OSP_ORDERS_B.oe_header_id%TYPE;
107: l_oe_line_id OE_ORDER_LINES_ALL.line_id%TYPE;
108: l_dummy VARCHAR2(1);
109: --
110:
111: BEGIN

Line 210: FROM OE_ORDER_LINES_ALL

206:
207: -- Cursor to check whether the given return line is valid or not.
208: CURSOR chk_return_line (c_oe_line_id NUMBER) IS
209: SELECT 'X'
210: FROM OE_ORDER_LINES_ALL
211: WHERE line_id = c_oe_line_id
212: AND line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID');
213:
214: -- SATHAPLI::Bug 6877509 - changes start, 02-Apr-08

Line 221: FROM OE_ORDER_LINES_ALL

217: -- 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.
218: /*
219: CURSOR get_oe_quantities (c_oe_line_id NUMBER) IS
220: SELECT ordered_quantity, shipped_quantity
221: FROM OE_ORDER_LINES_ALL
222: WHERE line_id = c_oe_line_id;
223: */
224: CURSOR get_oe_quantities (c_oe_header_id NUMBER, c_oe_line_number NUMBER) IS
225: SELECT SUM(ordered_quantity), SUM(shipped_quantity)

Line 226: FROM OE_ORDER_LINES_ALL

222: WHERE line_id = c_oe_line_id;
223: */
224: CURSOR get_oe_quantities (c_oe_header_id NUMBER, c_oe_line_number NUMBER) IS
225: SELECT SUM(ordered_quantity), SUM(shipped_quantity)
226: FROM OE_ORDER_LINES_ALL
227: WHERE header_id = c_oe_header_id
228: AND line_number = c_oe_line_number
229: AND NVL(cancelled_flag, 'X') <> 'Y';
230:

Line 233: 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

229: AND NVL(cancelled_flag, 'X') <> 'Y';
230:
231: /*
232: NOTE: Instead of using the line_number, we can use split_from_line_id and get the cumulative qty using a hierarchical query.
233: 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
234: performance intensive. This approach may be pursued in the future, if need be.
235: */
236:
237: -- Cursor to get the header_id and line_number of the given return line. This is mainly for split lines.

Line 240: FROM OE_ORDER_LINES_ALL

236:
237: -- Cursor to get the header_id and line_number of the given return line. This is mainly for split lines.
238: CURSOR get_oe_split_line_details (c_oe_line_id NUMBER) IS
239: SELECT header_id, line_number
240: FROM OE_ORDER_LINES_ALL
241: WHERE line_id = c_oe_line_id;
242: -- SATHAPLI::Bug 6877509 - changes end, 02-Apr-08
243:
244: -- Cursor to get the PO header id for the OSP order corresponding to the given return line id.

Line 317: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;

313: l_po_header_id AHL_OSP_ORDERS_B.po_header_id%TYPE;
314: l_po_req_header_id AHL_OSP_ORDERS_B.po_req_header_id%TYPE;
315: l_po_line_id AHL_OSP_ORDER_LINES.po_line_id%TYPE;
316: l_po_req_line_id AHL_OSP_ORDER_LINES.po_req_line_id%TYPE;
317: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;
318: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
319: l_po_line_qty NUMBER;
320: l_po_line_tot_qty NUMBER;
321: l_dummy VARCHAR2(1);

Line 318: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;

314: l_po_req_header_id AHL_OSP_ORDERS_B.po_req_header_id%TYPE;
315: l_po_line_id AHL_OSP_ORDER_LINES.po_line_id%TYPE;
316: l_po_req_line_id AHL_OSP_ORDER_LINES.po_req_line_id%TYPE;
317: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;
318: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
319: l_po_line_qty NUMBER;
320: l_po_line_tot_qty NUMBER;
321: l_dummy VARCHAR2(1);
322:

Line 323: l_oe_hdr_id OE_ORDER_LINES_ALL.header_id%TYPE;

319: l_po_line_qty NUMBER;
320: l_po_line_tot_qty NUMBER;
321: l_dummy VARCHAR2(1);
322:
323: l_oe_hdr_id OE_ORDER_LINES_ALL.header_id%TYPE;
324: l_oe_line_no OE_ORDER_LINES_ALL.line_number%TYPE;
325:
326: TYPE PO_LINE_TBL_TYPE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
327: l_po_line_tbl PO_LINE_TBL_TYPE;

Line 324: l_oe_line_no OE_ORDER_LINES_ALL.line_number%TYPE;

320: l_po_line_tot_qty NUMBER;
321: l_dummy VARCHAR2(1);
322:
323: l_oe_hdr_id OE_ORDER_LINES_ALL.header_id%TYPE;
324: l_oe_line_no OE_ORDER_LINES_ALL.line_number%TYPE;
325:
326: TYPE PO_LINE_TBL_TYPE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
327: l_po_line_tbl PO_LINE_TBL_TYPE;
328: l_merged_req_line BOOLEAN := FALSE;

Line 532: FROM OE_ORDER_LINES_ALL

528:
529: -- Cursor to check whether the given return line is valid or not.
530: CURSOR chk_return_line (c_oe_line_id NUMBER) IS
531: SELECT 'X'
532: FROM OE_ORDER_LINES_ALL
533: WHERE line_id = c_oe_line_id
534: AND line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID');
535:
536: -- Cursor to check whether the shipment is booked or not.

Line 539: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA

535:
536: -- Cursor to check whether the shipment is booked or not.
537: CURSOR chk_shipment_booked (c_oe_line_id NUMBER) IS
538: SELECT OHA.header_id
539: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA
540: WHERE OLA.line_id = c_oe_line_id
541: AND OHA.header_id = OLA.header_id
542: AND OHA.booked_flag = 'Y';
543:

Line 554: FROM OE_ORDER_LINES_ALL

550:
551: -- Cursor to get the ordered and shipped quantities of the given return line.
552: CURSOR get_oe_quantities (c_oe_line_id NUMBER) IS
553: SELECT ordered_quantity, shipped_quantity
554: FROM OE_ORDER_LINES_ALL
555: WHERE line_id = c_oe_line_id;
556:
557: --
558: l_api_name CONSTANT VARCHAR2(30) := 'Can_Receive_Against_RMA';

Line 1257: FROM oe_order_lines_all

1253: ship_from_org_id organization_id,
1254: subinventory,
1255: header_id oe_order_header_id,
1256: line_id oe_order_line_id
1257: FROM oe_order_lines_all
1258: WHERE line_id = c_oe_line_id;
1259:
1260: CURSOR inv_item_ctrls_csr (c_inv_item_id NUMBER,c_org_id NUMBER) IS
1261: SELECT serial_number_control_code,

Line 1277: AND tl.source_transaction_table = 'OE_ORDER_LINES_ALL'

1273: FROM csi_t_transaction_lines tl,
1274: csi_t_txn_line_details tld,
1275: csi_item_instances csi
1276: WHERE tl.source_transaction_id = c_oe_line_id
1277: AND tl.source_transaction_table = 'OE_ORDER_LINES_ALL'
1278: AND tl.transaction_line_id = tld.transaction_line_id
1279: AND tld.instance_id = csi.instance_id;
1280:
1281: CURSOR get_osp_order_dtls(c_oe_line_id NUMBER) IS

Line 1286: FROM oe_order_lines_all oel,

1282: SELECT osp.osp_order_id,
1283: osp.order_type_code,
1284: oel.source_document_line_id osp_line_id,
1285: osp.object_version_number
1286: FROM oe_order_lines_all oel,
1287: ahl_osp_orders_b osp
1288: WHERE oel.header_id = osp.oe_header_id
1289: AND oel.line_id = c_oe_line_id;
1290:

Line 2282: FROM OE_ORDER_LINES_ALL

2278:
2279: -- Cursor to check whether the given return line is valid or not.
2280: CURSOR chk_return_line (c_oe_line_id NUMBER) IS
2281: SELECT 'X'
2282: FROM OE_ORDER_LINES_ALL
2283: WHERE line_id = c_oe_line_id
2284: AND line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID');
2285:
2286: -- Cursor to check whether the shipment is booked or not.

Line 2289: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA

2285:
2286: -- Cursor to check whether the shipment is booked or not.
2287: CURSOR chk_shipment_booked (c_oe_line_id NUMBER) IS
2288: SELECT OHA.header_id
2289: FROM OE_ORDER_LINES_ALL OLA, OE_ORDER_HEADERS_ALL OHA
2290: WHERE OLA.line_id = c_oe_line_id
2291: AND OHA.header_id = OLA.header_id
2292: AND OHA.booked_flag = 'Y';
2293:

Line 2304: FROM OE_ORDER_LINES_ALL

2300:
2301: -- Cursor to get the ordered and shipped quantities of the given return line.
2302: CURSOR get_oe_quantities (c_oe_line_id NUMBER) IS
2303: SELECT ordered_quantity, shipped_quantity
2304: FROM OE_ORDER_LINES_ALL
2305: WHERE line_id = c_oe_line_id;
2306:
2307: -- Cursor to check that the 'ship from org id' is same as the 'receiving org id' for a given return line.
2308: CURSOR chk_org_id (c_oe_line_id NUMBER, c_rcv_org_id NUMBER) IS

Line 2310: FROM OE_ORDER_LINES_ALL

2306:
2307: -- Cursor to check that the 'ship from org id' is same as the 'receiving org id' for a given return line.
2308: CURSOR chk_org_id (c_oe_line_id NUMBER, c_rcv_org_id NUMBER) IS
2309: SELECT 'X'
2310: FROM OE_ORDER_LINES_ALL
2311: WHERE line_id = c_oe_line_id
2312: AND NVL(ship_from_org_id, -1) = c_rcv_org_id;
2313:
2314: --

Line 2320: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;

2316: l_debug_key CONSTANT VARCHAR2(60) := 'ahl.plsql.'||G_PKG_NAME||'.'||l_api_name;
2317:
2318: l_oe_header_id OE_ORDER_HEADERS_ALL.header_id%TYPE;
2319: l_oe_ship_line_id AHL_OSP_ORDER_LINES.oe_ship_line_id%TYPE;
2320: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;
2321: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
2322: l_valid_flag BOOLEAN := TRUE;
2323: l_part_num_change_flag BOOLEAN := FALSE;
2324: l_exchange_flag BOOLEAN := FALSE;

Line 2321: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;

2317:
2318: l_oe_header_id OE_ORDER_HEADERS_ALL.header_id%TYPE;
2319: l_oe_ship_line_id AHL_OSP_ORDER_LINES.oe_ship_line_id%TYPE;
2320: l_oe_ordered_qty OE_ORDER_LINES_ALL.ordered_quantity%TYPE;
2321: l_oe_shipped_qty OE_ORDER_LINES_ALL.shipped_quantity%TYPE;
2322: l_valid_flag BOOLEAN := TRUE;
2323: l_part_num_change_flag BOOLEAN := FALSE;
2324: l_exchange_flag BOOLEAN := FALSE;
2325: l_dummy VARCHAR2(1);