DBA Data[Home] [Help]

APPS.AHL_OSP_ORDERS_PVT dependencies on AHL_OSP_ORDERS_B

Line 323: SELECT osp_order_id, object_version_number from ahl_osp_orders_b

319: WHERE chr.contract_number = p_contract_number
320: AND chr.sts_code = sts.code AND sts.ste_code in ('ACTIVE', 'SIGNED');
321: l_contract_id NUMBER;
322: CURSOR osp_order_on_csr(p_osp_order_number IN NUMBER) IS
323: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
324: WHERE osp_order_number = p_osp_order_number;
325: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236
326: /*
327: CURSOR osp_order_po_csr(p_po_header_id IN NUMBER) IS

Line 328: SELECT osp_order_id, object_version_number from ahl_osp_orders_b

324: WHERE osp_order_number = p_osp_order_number;
325: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236
326: /*
327: CURSOR osp_order_po_csr(p_po_header_id IN NUMBER) IS
328: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
329: WHERE po_header_id = p_po_header_id;
330: CURSOR osp_order_oe_csr(p_oe_header_id IN NUMBER) IS
331: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
332: WHERE oe_header_id = p_oe_header_id;

Line 331: SELECT osp_order_id, object_version_number from ahl_osp_orders_b

327: CURSOR osp_order_po_csr(p_po_header_id IN NUMBER) IS
328: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
329: WHERE po_header_id = p_po_header_id;
330: CURSOR osp_order_oe_csr(p_oe_header_id IN NUMBER) IS
331: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
332: WHERE oe_header_id = p_oe_header_id;
333: */
334: -- jaramana End
335: l_osp_order_id NUMBER;

Line 846: -- IF not 'C', record should exist and osp_order_id and object version number should match in AHL_OSP_ORDERS_B table.

842: -- validates osp header information for different order types and DML operations.
843: -- Steps :
844: -- Order Type Code can be Service, Loan , Borrow
845: -- Opreation Flag can be 'C', 'U', 'D' or null
846: -- IF not 'C', record should exist and osp_order_id and object version number should match in AHL_OSP_ORDERS_B table.
847: -- IF 'C', osp_order_id and object version number should be null.
848: -- IMPORTANT NOTE: This procedure is NOT being called for Order Header Creation any more.
849: -- Added by jaramana on January 8, 2008 for the Requisition ER 6034236
850: -- Also Note that operation_flag will never be NULL in the call to this API, as if it is null, then there is no updation

Line 869: FROM PO_REQUISITION_HEADERS_ALL POREQ, AHL_OSP_ORDERS_B OSP

865:
866: -- Added by jaramana on January 8, 2008 for the Requisition ER 6034236
867: CURSOR chk_requisition_exists_csr(c_osp_order_id IN NUMBER) IS
868: SELECT POREQ.SEGMENT1
869: FROM PO_REQUISITION_HEADERS_ALL POREQ, AHL_OSP_ORDERS_B OSP
870: WHERE POREQ.INTERFACE_SOURCE_LINE_ID = c_osp_order_id
871: AND OSP.OSP_ORDER_ID = c_osp_order_id
872: AND OSP.OPERATING_UNIT_ID = POREQ.ORG_ID
873: AND POREQ.INTERFACE_SOURCE_CODE = AHL_GLOBAL.AHL_APP_SHORT_NAME

Line 2713: SELECT 'x' FROM po_lines_all POL, ahl_osp_orders_b OO

2709: p_po_line_id IN NUMBER,
2710: p_osp_order_id IN NUMBER
2711: )IS
2712: CURSOR val_po_line_id_csr(p_po_line_id IN NUMBER, p_osp_order_id IN NUMBER) IS
2713: SELECT 'x' FROM po_lines_all POL, ahl_osp_orders_b OO
2714: WHERE POL.po_line_id = p_po_line_id
2715: AND OO.osp_order_id = p_osp_order_id
2716: AND POL.PO_HEADER_ID = OO.po_header_id
2717: -- Added by jaramana on January 9, 2008 to fix the Bug 5358438/5967633

Line 2825: FROM ahl_osp_orders_b

2821: WHERE osp_order_id = p_osp_order_id
2822: ORDER BY osp_line_number;
2823: CURSOR get_old_status IS
2824: SELECT status_code, object_version_number
2825: FROM ahl_osp_orders_b
2826: WHERE osp_order_id = p_x_osp_order_rec.osp_order_id;
2827: --jrotich added for osp receiving
2828: CURSOR val_all_acc_closed(p_osp_order_id IN NUMBER) IS
2829: SELECT 'x' from ahl_osp_order_lines OL, ahl_osp_accomplishments AOA

Line 3321: SELECT status_code FROM ahl_osp_orders_b

3317: SELECT 'x' FROM ahl_osp_order_lines ol --, oe_order_lines_all oel
3318: WHERE ol.osp_order_id = p_osp_order_id
3319: AND ol.oe_return_line_id IS NOT NULL; --= oel.line_id;
3320: CURSOR order_header_status_csr(p_osp_order_id IN NUMBER) IS
3321: SELECT status_code FROM ahl_osp_orders_b
3322: WHERE osp_order_id = p_osp_order_id;
3323: l_exist VARCHAR(1);
3324: l_status_code VARCHAR(30);
3325: L_DEBUG_KEY CONSTANT VARCHAR2(150) := G_LOG_PREFIX || '.CAN_CONVERT_ORDER';

Line 3563: FROM ahl_osp_orders_b

3559: FROM ahl_osp_order_lines
3560: WHERE osp_order_line_id = p_x_osp_order_lines_tbl(i).osp_order_line_id;
3561:
3562: SELECT status_code, oe_header_id INTO l_status_code, l_oe_header_id
3563: FROM ahl_osp_orders_b
3564: WHERE osp_order_id = l_osp_order_id;
3565: EXCEPTION
3566: WHEN NO_DATA_FOUND THEN
3567: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');

Line 3740: FROM ahl_osp_orders_b

3736: l_any_vendor_flag);
3737: IF l_any_vendor_flag <> 'Y' THEN
3738: BEGIN
3739: SELECT vendor_id, vendor_site_id INTO l_header_vendor_id, l_header_site_id
3740: FROM ahl_osp_orders_b
3741: WHERE osp_order_id = p_x_osp_order_lines_tbl(l_first_index).osp_order_id;
3742: EXCEPTION
3743: WHEN NO_DATA_FOUND THEN
3744: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');

Line 3787: FROM ahl_osp_orders_b

3783: END IF;
3784: --Front end just passes the osp_order_id
3785: BEGIN
3786: SELECT status_code, oe_header_id INTO l_status_code, l_oe_header_id
3787: FROM ahl_osp_orders_b
3788: WHERE osp_order_id = p_x_osp_order_rec.osp_order_id;
3789: EXCEPTION
3790: WHEN NO_DATA_FOUND THEN
3791: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');

Line 3914: FROM ahl_osp_orders_b

3910: FROM ahl_osp_order_lines
3911: WHERE osp_order_line_id = p_x_osp_order_lines_tbl(i).osp_order_line_id;
3912:
3913: SELECT status_code, oe_header_id INTO l_status_code, l_oe_header_id
3914: FROM ahl_osp_orders_b
3915: WHERE osp_order_id = l_osp_order_id;
3916: EXCEPTION
3917: WHEN NO_DATA_FOUND THEN
3918: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');

Line 4085: FROM ahl_osp_orders_b

4081: l_valid_vendors_tbl,
4082: l_any_vendor_flag);
4083: BEGIN
4084: SELECT vendor_id, vendor_site_id INTO l_header_vendor_id, l_header_site_id
4085: FROM ahl_osp_orders_b
4086: WHERE osp_order_id = p_x_osp_order_rec.osp_order_id;
4087: EXCEPTION
4088: WHEN NO_DATA_FOUND THEN
4089: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');

Line 4306: SELECT ahl_osp_orders_b_s.NEXTVAL

4302: 'Procedure begins...');
4303: END IF;
4304:
4305: --Generate the primary key
4306: SELECT ahl_osp_orders_b_s.NEXTVAL
4307: INTO l_osp_order_id
4308: FROM sys.dual;
4309: --If there is no records in the table, then max(osp_order_number) IS null
4310: --SELECT NVL(MAX(osp_order_number), l_osp_order_id-1)+1

Line 4312: -- FROM ahl_osp_orders_b;

4308: FROM sys.dual;
4309: --If there is no records in the table, then max(osp_order_number) IS null
4310: --SELECT NVL(MAX(osp_order_number), l_osp_order_id-1)+1
4311: -- INTO l_osp_order_number
4312: -- FROM ahl_osp_orders_b;
4313: --Finally decided to change back because the above logic will probably violate the unique
4314: --index defined on osp_order_number if two concurrent users submit the OSP Order creation at
4315: --the same time
4316: l_osp_order_number := l_osp_order_id;

Line 4595: FROM ahl_osp_orders_b

4591: FROM ahl_osp_order_lines
4592: WHERE osp_order_id = c_osp_order_id;
4593: CURSOR get_old_vendor_attrs(c_osp_order_id NUMBER) IS
4594: SELECT vendor_id, vendor_site_id, oe_header_id
4595: FROM ahl_osp_orders_b
4596: WHERE osp_order_id = c_osp_order_id;
4597:
4598: BEGIN
4599: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 4939: FROM ahl_osp_orders_b

4935: --at association between vendor and items combination
4936: BEGIN
4937: SELECT vendor_id, vendor_site_id
4938: INTO l_vendor_id, l_vendor_site_id
4939: FROM ahl_osp_orders_b
4940: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id;
4941: IF (l_vendor_id IS NOT NULL AND l_vendor_site_id IS NOT NULL) THEN
4942: SELECT IV.service_duration INTO l_service_duration
4943: FROM ahl_inv_service_item_rels SI,

Line 5185: FROM ahl_osp_orders_b

5181: --This is probably not necessary
5182: IF l_create_shipment THEN
5183: BEGIN
5184: SELECT oe_header_id INTO l_oe_header_id
5185: FROM ahl_osp_orders_b
5186: WHERE osp_order_id = l_osp_order_id;
5187: EXCEPTION
5188: WHEN NO_DATA_FOUND THEN
5189: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVALID');

Line 5395: FROM ahl_osp_order_lines ospl, ahl_osp_orders_b osp

5391: /*
5392: CURSOR check_osp_order_unique(c_osp_order_id NUMBER, c_inventory_item_id NUMBER,
5393: c_inventory_org_id NUMBER, c_serial_number VARCHAR2) IS
5394: SELECT 'X'
5395: FROM ahl_osp_order_lines ospl, ahl_osp_orders_b osp
5396: WHERE ospl.osp_order_id = osp.osp_order_id
5397: AND osp.status_code <> 'CLOSED'
5398: AND ospl.status_code is null
5399: AND ospl.inventory_item_id = c_inventory_item_id

Line 5408: FROM ahl_osp_order_lines ospl, ahl_osp_orders_b osp, oe_order_lines_all oelship

5404: -- Added by jaramana on January 10, 2008 for the Bug 5547870/5673279
5405: CURSOR check_osp_order_unique(c_osp_order_id NUMBER, c_inventory_item_id NUMBER,
5406: c_inventory_org_id NUMBER, c_serial_number VARCHAR2) IS
5407: SELECT 'X'
5408: FROM ahl_osp_order_lines ospl, ahl_osp_orders_b osp, oe_order_lines_all oelship
5409: WHERE ospl.osp_order_id = osp.osp_order_id
5410: AND osp.status_code <> 'CLOSED'
5411: AND oelship.LINE_ID = ospl.OE_SHIP_LINE_ID
5412: --The order line should not be closed and should not be cancelled to be considered in the uniqueness check

Line 5498: FROM ahl_osp_orders_b

5494: -- yazhou 28-jul-2006 starts
5495: -- bug#5417460
5496: IF p_x_osp_order_line_rec.po_line_id is not null and p_x_osp_order_line_rec.workorder_id is not null then
5497: SELECT osp_order_id INTO g_dummy_num
5498: FROM ahl_osp_orders_b
5499: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id
5500: AND status_code = G_OSP_PO_CREATED_STATUS
5501: -- Added by jaramana on January 10, 2008 for the Bug 5358438/5967633/5417460
5502: --Pos are not applying to the other order types.

Line 5515: FROM ahl_osp_orders_b

5511: and nvl(status_code, 'X') not in (G_OL_PO_CANCELLED_STATUS, G_OL_PO_DELETED_STATUS, G_OL_REQ_CANCELLED_STATUS, G_OL_REQ_DELETED_STATUS));
5512: -- jaramana End
5513: ELSE
5514: SELECT osp_order_id INTO g_dummy_num
5515: FROM ahl_osp_orders_b
5516: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id
5517: -- jaramana modified on January 10, 2008 for the Requisition ER 6034236 (Added G_OSP_REQ_SUB_FAILED_STATUS)
5518: AND status_code IN (G_OSP_ENTERED_STATUS, G_OSP_SUB_FAILED_STATUS, G_OSP_REQ_SUB_FAILED_STATUS);
5519: -- jaramana End

Line 6201: FROM ahl_osp_orders_b

6197: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
6198: --If the status is other than 'ENTERED', 'SUBMISSION_FAILED', 'REQ_SUBMISSION_FAILED' we should not allow updates of
6199: --service_item_id, service_item_uom_code, quantity and need_by_date
6200: SELECT status_code INTO l_header_status_code
6201: FROM ahl_osp_orders_b
6202: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id;
6203:
6204: IF(l_header_status_code NOT IN (G_OSP_ENTERED_STATUS, G_OSP_SUB_FAILED_STATUS, G_OSP_REQ_SUB_FAILED_STATUS)) THEN
6205: --service_item_id can't be changed from this API, and it could be null.

Line 6395: FROM ahl_osp_orders_b

6391: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
6392: --Moved the logic below, to above
6393: /*
6394: SELECT status_code INTO l_header_status_code
6395: FROM ahl_osp_orders_b
6396: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id;
6397: */
6398: -- jaramana End
6399: IF (p_x_osp_order_line_rec.quantity IS NOT NULL AND p_x_osp_order_line_rec.quantity <> FND_API.G_MISS_NUM) THEN

Line 7628: --ahl_osp_orders_b but populated in ahl_osp_orders_v. After discussion with

7624: END IF;
7625: */
7626: --(Note: 05/31/2005 Jerry)It is not good to use ahl_osp_orders_v here but
7627: --there exists a special case where vendor_contact_id is null in
7628: --ahl_osp_orders_b but populated in ahl_osp_orders_v. After discussion with
7629: --Jay and found we have to use _v here because the vendor_id and vendor_site_id
7630: --could be changed from PO side
7631: BEGIN
7632: --Modified by mpothuku on 27-Feb-06 to fix the Perf Bug #4919164

Line 7637: FROM ahl_osp_orders_b osp,

7633: /*
7634: SELECT decode(osp.po_header_id, null, osp.vendor_id, po.vendor_id) vendor_id,
7635: decode(osp.po_header_id, null, osp.vendor_site_id, po.vendor_site_id) vendor_site_id --, vendor_contact_id
7636: INTO l_vendor_id, l_vendor_site_id --, l_vendor_contact_id
7637: FROM ahl_osp_orders_b osp,
7638: po_headers_all po
7639: WHERE osp.osp_order_id = p_osp_order_line_rec.osp_order_id
7640: AND osp.po_header_id = po.po_header_id(+);
7641: */

Line 7646: FROM ahl_osp_orders_b osp

7642: --modified by mpothuku on 14-mar-2008 to fix the Bug 6885513
7643: SELECT vendor_id,
7644: vendor_site_id
7645: INTO l_vendor_id, l_vendor_site_id --, l_vendor_contact_id
7646: FROM ahl_osp_orders_b osp
7647: WHERE osp.osp_order_id = p_osp_order_line_rec.osp_order_id;
7648: --mpothuku End
7649: EXCEPTION
7650: WHEN NO_DATA_FOUND THEN

Line 7717: FROM ahl_osp_orders_b

7713: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7714: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, G_LOG_PREFIX||'process_order_type_change', 'Begin');
7715: END IF;
7716: SELECT order_type_code INTO l_old_type_code
7717: FROM ahl_osp_orders_b
7718: WHERE osp_order_id = p_osp_order_rec.osp_order_id;
7719: IF l_old_type_code <> p_osp_order_rec.order_type_code THEN
7720: IF(can_convert_order(p_osp_order_rec.osp_order_id, l_old_type_code, p_osp_order_rec.order_type_code)) THEN
7721: IF(p_osp_order_rec.order_type_code = G_OSP_ORDER_TYPE_SERVICE) THEN

Line 7776: AHL_OSP_ORDERS_B AOOB,

7772: CURSOR c_can_show_claim (c_osp_order_line_id IN NUMBER) IS
7773: SELECT 'X'
7774: FROM AHL_WARRANTY_ENTITLEMENTS AWSE,
7775: AHL_WARRANTY_CONTRACTS_B AWCB,
7776: AHL_OSP_ORDERS_B AOOB,
7777: AHL_OSP_ORDER_LINES AOOL
7778: WHERE AOOB.OSP_ORDER_ID = AOOL.OSP_ORDER_ID
7779: AND AOOL.OSP_ORDER_LINE_ID = AWSE.OSP_ORDER_LINE_ID
7780: AND AWCB.WARRANTY_CONTRACT_ID = AWSE.WARRANTY_CONTRACT_ID