DBA Data[Home] [Help]

APPS.AHL_OSP_ORDERS_PVT dependencies on AHL_OSP_ORDERS_B

Line 302: SELECT osp_order_id, object_version_number from ahl_osp_orders_b

298: WHERE chr.contract_number = p_contract_number
299: AND chr.sts_code = sts.code AND sts.ste_code in ('ACTIVE', 'SIGNED');
300: l_contract_id NUMBER;
301: CURSOR osp_order_on_csr(p_osp_order_number IN NUMBER) IS
302: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
303: WHERE osp_order_number = p_osp_order_number;
304: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236
305: /*
306: CURSOR osp_order_po_csr(p_po_header_id IN NUMBER) IS

Line 307: SELECT osp_order_id, object_version_number from ahl_osp_orders_b

303: WHERE osp_order_number = p_osp_order_number;
304: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236
305: /*
306: CURSOR osp_order_po_csr(p_po_header_id IN NUMBER) IS
307: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
308: WHERE po_header_id = p_po_header_id;
309: CURSOR osp_order_oe_csr(p_oe_header_id IN NUMBER) IS
310: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
311: WHERE oe_header_id = p_oe_header_id;

Line 310: SELECT osp_order_id, object_version_number from ahl_osp_orders_b

306: CURSOR osp_order_po_csr(p_po_header_id IN NUMBER) IS
307: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
308: WHERE po_header_id = p_po_header_id;
309: CURSOR osp_order_oe_csr(p_oe_header_id IN NUMBER) IS
310: SELECT osp_order_id, object_version_number from ahl_osp_orders_b
311: WHERE oe_header_id = p_oe_header_id;
312: */
313: -- jaramana End
314: l_osp_order_id NUMBER;

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

821: -- validates osp header information for different order types and DML operations.
822: -- Steps :
823: -- Order Type Code can be Service, Loan , Borrow
824: -- Opreation Flag can be 'C', 'U', 'D' or null
825: -- IF not 'C', record should exist and osp_order_id and object version number should match in AHL_OSP_ORDERS_B table.
826: -- IF 'C', osp_order_id and object version number should be null.
827: -- IMPORTANT NOTE: This procedure is NOT being called for Order Header Creation any more.
828: -- Added by jaramana on January 8, 2008 for the Requisition ER 6034236
829: -- 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 848: FROM PO_REQUISITION_HEADERS_ALL POREQ, AHL_OSP_ORDERS_B OSP

844:
845: -- Added by jaramana on January 8, 2008 for the Requisition ER 6034236
846: CURSOR chk_requisition_exists_csr(c_osp_order_id IN NUMBER) IS
847: SELECT POREQ.SEGMENT1
848: FROM PO_REQUISITION_HEADERS_ALL POREQ, AHL_OSP_ORDERS_B OSP
849: WHERE POREQ.INTERFACE_SOURCE_LINE_ID = c_osp_order_id
850: AND OSP.OSP_ORDER_ID = c_osp_order_id
851: AND OSP.OPERATING_UNIT_ID = POREQ.ORG_ID
852: AND POREQ.INTERFACE_SOURCE_CODE = AHL_GLOBAL.AHL_APP_SHORT_NAME

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

2688: p_po_line_id IN NUMBER,
2689: p_osp_order_id IN NUMBER
2690: )IS
2691: CURSOR val_po_line_id_csr(p_po_line_id IN NUMBER, p_osp_order_id IN NUMBER) IS
2692: SELECT 'x' FROM po_lines_all POL, ahl_osp_orders_b OO
2693: WHERE POL.po_line_id = p_po_line_id
2694: AND OO.osp_order_id = p_osp_order_id
2695: AND POL.PO_HEADER_ID = OO.po_header_id
2696: -- Added by jaramana on January 9, 2008 to fix the Bug 5358438/5967633

Line 2804: FROM ahl_osp_orders_b

2800: WHERE osp_order_id = p_osp_order_id
2801: ORDER BY osp_line_number;
2802: CURSOR get_old_status IS
2803: SELECT status_code, object_version_number
2804: FROM ahl_osp_orders_b
2805: WHERE osp_order_id = p_x_osp_order_rec.osp_order_id;
2806:
2807: l_osp_line_number NUMBER;
2808: l_service_item_id NUMBER;

Line 3283: SELECT status_code FROM ahl_osp_orders_b

3279: SELECT 'x' FROM ahl_osp_order_lines ol --, oe_order_lines_all oel
3280: WHERE ol.osp_order_id = p_osp_order_id
3281: AND ol.oe_return_line_id IS NOT NULL; --= oel.line_id;
3282: CURSOR order_header_status_csr(p_osp_order_id IN NUMBER) IS
3283: SELECT status_code FROM ahl_osp_orders_b
3284: WHERE osp_order_id = p_osp_order_id;
3285: l_exist VARCHAR(1);
3286: l_status_code VARCHAR(30);
3287: L_DEBUG_KEY CONSTANT VARCHAR2(150) := G_LOG_PREFIX || '.CAN_CONVERT_ORDER';

Line 3520: FROM ahl_osp_orders_b

3516: FROM ahl_osp_order_lines
3517: WHERE osp_order_line_id = p_x_osp_order_lines_tbl(i).osp_order_line_id;
3518:
3519: SELECT status_code, oe_header_id INTO l_status_code, l_oe_header_id
3520: FROM ahl_osp_orders_b
3521: WHERE osp_order_id = l_osp_order_id;
3522: EXCEPTION
3523: WHEN NO_DATA_FOUND THEN
3524: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');

Line 3584: FROM ahl_osp_orders_b

3580: l_any_vendor_flag);
3581: IF l_any_vendor_flag <> 'Y' THEN
3582: BEGIN
3583: SELECT vendor_id, vendor_site_id INTO l_header_vendor_id, l_header_site_id
3584: FROM ahl_osp_orders_b
3585: WHERE osp_order_id = p_x_osp_order_lines_tbl(l_first_index).osp_order_id;
3586: EXCEPTION
3587: WHEN NO_DATA_FOUND THEN
3588: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');

Line 3631: FROM ahl_osp_orders_b

3627: END IF;
3628: --Front end just passes the osp_order_id
3629: BEGIN
3630: SELECT status_code, oe_header_id INTO l_status_code, l_oe_header_id
3631: FROM ahl_osp_orders_b
3632: WHERE osp_order_id = p_x_osp_order_rec.osp_order_id;
3633: EXCEPTION
3634: WHEN NO_DATA_FOUND THEN
3635: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');

Line 3725: FROM ahl_osp_orders_b

3721: FROM ahl_osp_order_lines
3722: WHERE osp_order_line_id = p_x_osp_order_lines_tbl(i).osp_order_line_id;
3723:
3724: SELECT status_code, oe_header_id INTO l_status_code, l_oe_header_id
3725: FROM ahl_osp_orders_b
3726: WHERE osp_order_id = l_osp_order_id;
3727: EXCEPTION
3728: WHEN NO_DATA_FOUND THEN
3729: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');

Line 3783: FROM ahl_osp_orders_b

3779: l_valid_vendors_tbl,
3780: l_any_vendor_flag);
3781: BEGIN
3782: SELECT vendor_id, vendor_site_id INTO l_header_vendor_id, l_header_site_id
3783: FROM ahl_osp_orders_b
3784: WHERE osp_order_id = p_x_osp_order_rec.osp_order_id;
3785: EXCEPTION
3786: WHEN NO_DATA_FOUND THEN
3787: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');

Line 3964: SELECT ahl_osp_orders_b_s.NEXTVAL

3960: 'Procedure begins...');
3961: END IF;
3962:
3963: --Generate the primary key
3964: SELECT ahl_osp_orders_b_s.NEXTVAL
3965: INTO l_osp_order_id
3966: FROM sys.dual;
3967: --If there is no records in the table, then max(osp_order_number) IS null
3968: --SELECT NVL(MAX(osp_order_number), l_osp_order_id-1)+1

Line 3970: -- FROM ahl_osp_orders_b;

3966: FROM sys.dual;
3967: --If there is no records in the table, then max(osp_order_number) IS null
3968: --SELECT NVL(MAX(osp_order_number), l_osp_order_id-1)+1
3969: -- INTO l_osp_order_number
3970: -- FROM ahl_osp_orders_b;
3971: --Finally decided to change back because the above logic will probably violate the unique
3972: --index defined on osp_order_number if two concurrent users submit the OSP Order creation at
3973: --the same time
3974: l_osp_order_number := l_osp_order_id;

Line 4253: FROM ahl_osp_orders_b

4249: FROM ahl_osp_order_lines
4250: WHERE osp_order_id = c_osp_order_id;
4251: CURSOR get_old_vendor_attrs(c_osp_order_id NUMBER) IS
4252: SELECT vendor_id, vendor_site_id, oe_header_id
4253: FROM ahl_osp_orders_b
4254: WHERE osp_order_id = c_osp_order_id;
4255:
4256: BEGIN
4257: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 4589: FROM ahl_osp_orders_b

4585: --at association between vendor and items combination
4586: BEGIN
4587: SELECT vendor_id, vendor_site_id
4588: INTO l_vendor_id, l_vendor_site_id
4589: FROM ahl_osp_orders_b
4590: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id;
4591: IF (l_vendor_id IS NOT NULL AND l_vendor_site_id IS NOT NULL) THEN
4592: SELECT IV.service_duration INTO l_service_duration
4593: FROM ahl_inv_service_item_rels SI,

Line 4835: FROM ahl_osp_orders_b

4831: --This is probably not necessary
4832: IF l_create_shipment THEN
4833: BEGIN
4834: SELECT oe_header_id INTO l_oe_header_id
4835: FROM ahl_osp_orders_b
4836: WHERE osp_order_id = l_osp_order_id;
4837: EXCEPTION
4838: WHEN NO_DATA_FOUND THEN
4839: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVALID');

Line 5045: FROM ahl_osp_order_lines ospl, ahl_osp_orders_b osp

5041: /*
5042: CURSOR check_osp_order_unique(c_osp_order_id NUMBER, c_inventory_item_id NUMBER,
5043: c_inventory_org_id NUMBER, c_serial_number VARCHAR2) IS
5044: SELECT 'X'
5045: FROM ahl_osp_order_lines ospl, ahl_osp_orders_b osp
5046: WHERE ospl.osp_order_id = osp.osp_order_id
5047: AND osp.status_code <> 'CLOSED'
5048: AND ospl.status_code is null
5049: AND ospl.inventory_item_id = c_inventory_item_id

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

5054: -- Added by jaramana on January 10, 2008 for the Bug 5547870/5673279
5055: CURSOR check_osp_order_unique(c_osp_order_id NUMBER, c_inventory_item_id NUMBER,
5056: c_inventory_org_id NUMBER, c_serial_number VARCHAR2) IS
5057: SELECT 'X'
5058: FROM ahl_osp_order_lines ospl, ahl_osp_orders_b osp, oe_order_lines_all oelship
5059: WHERE ospl.osp_order_id = osp.osp_order_id
5060: AND osp.status_code <> 'CLOSED'
5061: AND oelship.LINE_ID = ospl.OE_SHIP_LINE_ID
5062: --The order line should not be closed and should not be cancelled to be considered in the uniqueness check

Line 5148: FROM ahl_osp_orders_b

5144: -- yazhou 28-jul-2006 starts
5145: -- bug#5417460
5146: 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
5147: SELECT osp_order_id INTO g_dummy_num
5148: FROM ahl_osp_orders_b
5149: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id
5150: AND status_code = G_OSP_PO_CREATED_STATUS
5151: -- Added by jaramana on January 10, 2008 for the Bug 5358438/5967633/5417460
5152: --Pos are not applying to the other order types.

Line 5165: FROM ahl_osp_orders_b

5161: 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));
5162: -- jaramana End
5163: ELSE
5164: SELECT osp_order_id INTO g_dummy_num
5165: FROM ahl_osp_orders_b
5166: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id
5167: -- jaramana modified on January 10, 2008 for the Requisition ER 6034236 (Added G_OSP_REQ_SUB_FAILED_STATUS)
5168: AND status_code IN (G_OSP_ENTERED_STATUS, G_OSP_SUB_FAILED_STATUS, G_OSP_REQ_SUB_FAILED_STATUS);
5169: -- jaramana End

Line 5770: FROM ahl_osp_orders_b

5766: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
5767: --If the status is other than 'ENTERED', 'SUBMISSION_FAILED', 'REQ_SUBMISSION_FAILED' we should not allow updates of
5768: --service_item_id, service_item_uom_code, quantity and need_by_date
5769: SELECT status_code INTO l_header_status_code
5770: FROM ahl_osp_orders_b
5771: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id;
5772:
5773: IF(l_header_status_code NOT IN (G_OSP_ENTERED_STATUS, G_OSP_SUB_FAILED_STATUS, G_OSP_REQ_SUB_FAILED_STATUS)) THEN
5774: --service_item_id can't be changed from this API, and it could be null.

Line 5946: FROM ahl_osp_orders_b

5942: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
5943: --Moved the logic below, to above
5944: /*
5945: SELECT status_code INTO l_header_status_code
5946: FROM ahl_osp_orders_b
5947: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id;
5948: */
5949: -- jaramana End
5950: 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 7179: --ahl_osp_orders_b but populated in ahl_osp_orders_v. After discussion with

7175: END IF;
7176: */
7177: --(Note: 05/31/2005 Jerry)It is not good to use ahl_osp_orders_v here but
7178: --there exists a special case where vendor_contact_id is null in
7179: --ahl_osp_orders_b but populated in ahl_osp_orders_v. After discussion with
7180: --Jay and found we have to use _v here because the vendor_id and vendor_site_id
7181: --could be changed from PO side
7182: BEGIN
7183: --Modified by mpothuku on 27-Feb-06 to fix the Perf Bug #4919164

Line 7188: FROM ahl_osp_orders_b osp,

7184: /*
7185: SELECT decode(osp.po_header_id, null, osp.vendor_id, po.vendor_id) vendor_id,
7186: decode(osp.po_header_id, null, osp.vendor_site_id, po.vendor_site_id) vendor_site_id --, vendor_contact_id
7187: INTO l_vendor_id, l_vendor_site_id --, l_vendor_contact_id
7188: FROM ahl_osp_orders_b osp,
7189: po_headers_all po
7190: WHERE osp.osp_order_id = p_osp_order_line_rec.osp_order_id
7191: AND osp.po_header_id = po.po_header_id(+);
7192: */

Line 7197: FROM ahl_osp_orders_b osp

7193: --modified by mpothuku on 14-mar-2008 to fix the Bug 6885513
7194: SELECT vendor_id,
7195: vendor_site_id
7196: INTO l_vendor_id, l_vendor_site_id --, l_vendor_contact_id
7197: FROM ahl_osp_orders_b osp
7198: WHERE osp.osp_order_id = p_osp_order_line_rec.osp_order_id;
7199: --mpothuku End
7200: EXCEPTION
7201: WHEN NO_DATA_FOUND THEN

Line 7268: FROM ahl_osp_orders_b

7264: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7265: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, G_LOG_PREFIX||'process_order_type_change', 'Begin');
7266: END IF;
7267: SELECT order_type_code INTO l_old_type_code
7268: FROM ahl_osp_orders_b
7269: WHERE osp_order_id = p_osp_order_rec.osp_order_id;
7270: IF l_old_type_code <> p_osp_order_rec.order_type_code THEN
7271: IF(can_convert_order(p_osp_order_rec.osp_order_id, l_old_type_code, p_osp_order_rec.order_type_code)) THEN
7272: IF(p_osp_order_rec.order_type_code = G_OSP_ORDER_TYPE_SERVICE) THEN