DBA Data[Home] [Help]

APPS.AHL_OSP_PO_REQ_PVT dependencies on AHL_OSP_ORDERS_B

Line 102: -- This Procedure updates a record of AHL_OSP_ORDERS_B using the table handler.

98: p_batch_id IN NUMBER,
99: p_osp_order_id IN NUMBER,
100: x_request_id OUT NOCOPY NUMBER);
101:
102: -- This Procedure updates a record of AHL_OSP_ORDERS_B using the table handler.
103: -- All updates to this table from this Package should go through this procedure only
104: PROCEDURE Update_OSP_Order(
105: p_osp_order_id IN NUMBER,
106: p_po_req_header_id IN NUMBER := NULL,

Line 117: -- This Procedure updates AHL_OSP_ORDERS_B's PO_REQ_HEADER_ID and sets STATUS_CODE to REQUISITION_CREATED

113: PROCEDURE Associate_New_Req(
114: p_osp_order_id IN NUMBER,
115: x_po_req_header_id OUT NOCOPY NUMBER);
116:
117: -- This Procedure updates AHL_OSP_ORDERS_B's PO_REQ_HEADER_ID and sets STATUS_CODE to REQUISITION_CREATED
118: PROCEDURE Set_PO_Req_Header_ID(
119: p_osp_order_id IN NUMBER,
120: p_po_req_header_id IN NUMBER);
121:

Line 127: -- This Procedure updates AHL_OSP_ORDERS_B.STATUS_CODE to SUBMISSION_FAILED

123: PROCEDURE Update_Osp_Order_Lines(
124: p_osp_order_line_id IN NUMBER,
125: p_po_req_line_id IN NUMBER := NULL);
126:
127: -- This Procedure updates AHL_OSP_ORDERS_B.STATUS_CODE to SUBMISSION_FAILED
128: PROCEDURE Set_Req_Submission_Failed(
129: p_osp_order_id IN NUMBER);
130:
131: -- This Procedure handles deleted Requisition Headers from Purchasing and is Part of PO Synchronization.

Line 225: FROM AHL_OSP_ORDERS_B

221: L_DEBUG_KEY CONSTANT VARCHAR2(150) := G_LOG_PREFIX || '.Create_PO_Requisition';
222:
223: CURSOR l_osp_id_csr(p_osp_order_number IN NUMBER) IS
224: SELECT OSP_ORDER_ID
225: FROM AHL_OSP_ORDERS_B
226: WHERE OSP_ORDER_NUMBER = p_osp_order_number;
227:
228: CURSOR l_osp_dtls_csr(p_osp_order_id IN NUMBER) IS
229: SELECT B.VENDOR_ID,

Line 238: FROM AHL_OSP_ORDERS_B B, AHL_OSP_ORDERS_TL TL

234: TL.DESCRIPTION,
235: B.PO_INTERFACE_HEADER_ID,
236: B.VENDOR_CONTACT_ID,
237: B.STATUS_CODE
238: FROM AHL_OSP_ORDERS_B B, AHL_OSP_ORDERS_TL TL
239: WHERE B.OSP_ORDER_ID = p_osp_order_id
240: AND TL.OSP_ORDER_ID = B.OSP_ORDER_ID
241: AND TL.LANGUAGE = userenv('LANG');
242:

Line 711: -- Function : Updates AHL_OSP_ORDERS_B.PO_REQ_HEADER_ID and

707:
708: -- Start of Comments --
709: -- Procedure name : Associate_All_New_Reqs
710: -- Type : Private
711: -- Function : Updates AHL_OSP_ORDERS_B.PO_REQ_HEADER_ID and
712: -- AHL_OSP_ORDER_LINES.PO_REQ_LINE_ID with REQUISITION_HEADER_ID and
713: -- REQUISITION_LINE_ID respectively for all submitted OSP Orders (for Requisitions).
714: -- Pre-reqs :
715: -- Parameters :

Line 748: SELECT OSP_ORDER_ID FROM AHL_OSP_ORDERS_B

744: x_msg_count OUT NOCOPY NUMBER,
745: x_msg_data OUT NOCOPY VARCHAR2) IS
746:
747: CURSOR l_get_osps_for_reqs_csr IS
748: SELECT OSP_ORDER_ID FROM AHL_OSP_ORDERS_B
749: WHERE STATUS_CODE = G_OSP_REQ_SUBMITTED_STATUS
750: AND PO_REQ_HEADER_ID IS NULL
751: AND PO_BATCH_ID IS NOT NULL
752: -- Added by jaramana on April 7, 2008 for bug 6609988

Line 1097: SELECT 'x' FROM AHL_OSP_ORDERS_B

1093: PROCEDURE Validate_PO_Req_Header(
1094: p_po_req_header_rec IN PO_Req_Header_Rec_Type) IS
1095:
1096: CURSOR l_validate_osp_csr(p_osp_order_id IN NUMBER) IS
1097: SELECT 'x' FROM AHL_OSP_ORDERS_B
1098: WHERE OSP_ORDER_ID = p_osp_order_id
1099: FOR UPDATE OF PO_BATCH_ID, PO_REQUEST_ID; -- Lock Row
1100:
1101: CURSOR l_validate_supplier_csr(p_supplier_id IN NUMBER) IS

Line 1408: -- This Procedure updates a record of AHL_OSP_ORDERS_B using the table handler

1404: END IF;
1405: END Validate_PO_Req_Lines;
1406:
1407: ----------------------------------------
1408: -- This Procedure updates a record of AHL_OSP_ORDERS_B using the table handler
1409: -- All updates to this table from this Package should go through this procedure only
1410: ----------------------------------------
1411: PROCEDURE Update_OSP_Order(
1412: p_osp_order_id IN NUMBER,

Line 1557: FROM PO_REQUISITION_HEADERS_ALL POREQ, AHL_OSP_ORDERS_B OSP

1553: x_po_req_header_id OUT NOCOPY NUMBER) IS
1554:
1555: CURSOR l_get_po_req_hdr_csr(p_osp_order_id IN NUMBER) IS
1556: SELECT POREQ.REQUISITION_HEADER_ID
1557: FROM PO_REQUISITION_HEADERS_ALL POREQ, AHL_OSP_ORDERS_B OSP
1558: WHERE POREQ.INTERFACE_SOURCE_LINE_ID = p_osp_order_id AND
1559: OSP.OSP_ORDER_ID = p_osp_order_id AND
1560: OSP.OPERATING_UNIT_ID = POREQ.ORG_ID AND
1561: POREQ.INTERFACE_SOURCE_CODE = AHL_GLOBAL.AHL_APP_SHORT_NAME;

Line 1574: SELECT PO_REQUEST_ID FROM AHL_OSP_ORDERS_B

1570: WHERE REFERENCE_NUM = p_osp_order_line_id AND
1571: REQUISITION_HEADER_ID = p_po_req_header_id;
1572:
1573: CURSOR l_get_request_id_csr(p_osp_order_id IN NUMBER) IS
1574: SELECT PO_REQUEST_ID FROM AHL_OSP_ORDERS_B
1575: WHERE OSP_ORDER_ID = p_osp_order_id;
1576:
1577: CURSOR check_req_completeness_csr(c_po_req_header_id IN NUMBER) IS
1578: select 1 from dual where

Line 1618: -- Update AHL_OSP_ORDERS_B's PO_REQ_HEADER_ID

1614: ', Requisition Header Id: ' || x_po_req_header_id);
1615: END IF;
1616: Set_Req_Submission_Failed(p_osp_order_id);
1617: ELSE
1618: -- Update AHL_OSP_ORDERS_B's PO_REQ_HEADER_ID
1619: --dbms_output.put_line('About to Update AHL_OSP_ORDERS_B.PO_REQ_HEADER_ID with ' || x_po_req_header_id);
1620: Set_PO_Req_Header_Id(p_osp_order_id => p_osp_order_id,
1621: p_po_req_header_id => x_po_req_header_id);
1622:

Line 1619: --dbms_output.put_line('About to Update AHL_OSP_ORDERS_B.PO_REQ_HEADER_ID with ' || x_po_req_header_id);

1615: END IF;
1616: Set_Req_Submission_Failed(p_osp_order_id);
1617: ELSE
1618: -- Update AHL_OSP_ORDERS_B's PO_REQ_HEADER_ID
1619: --dbms_output.put_line('About to Update AHL_OSP_ORDERS_B.PO_REQ_HEADER_ID with ' || x_po_req_header_id);
1620: Set_PO_Req_Header_Id(p_osp_order_id => p_osp_order_id,
1621: p_po_req_header_id => x_po_req_header_id);
1622:
1623: --dbms_output.put_line('Updated po_req_header_id. Logging Transaction...');

Line 1688: -- This Procedure updates AHL_OSP_ORDERS_B's PO_REQ_HEADER_ID and sets STATUS_CODE to REQUISITION_CREATED

1684: END Associate_New_Req;
1685:
1686:
1687: ----------------------------------------
1688: -- This Procedure updates AHL_OSP_ORDERS_B's PO_REQ_HEADER_ID and sets STATUS_CODE to REQUISITION_CREATED
1689: ----------------------------------------
1690: PROCEDURE Set_PO_Req_Header_ID(
1691: p_osp_order_id IN NUMBER,
1692: p_po_req_header_id IN NUMBER) IS

Line 1834: -- This Procedure updates AHL_OSP_ORDERS_B.STATUS_CODE to REQ_SUBMISSION_FAILED

1830: END IF;
1831: END Update_Osp_Order_Lines;
1832:
1833:
1834: -- This Procedure updates AHL_OSP_ORDERS_B.STATUS_CODE to REQ_SUBMISSION_FAILED
1835: PROCEDURE Set_Req_Submission_Failed(
1836: p_osp_order_id IN NUMBER) IS
1837: BEGIN
1838: Update_OSP_Order(p_osp_order_id => p_osp_order_id,

Line 1855: -- This procedure does a direct update of the AHL_OSP_ORDERS_B and the AHL_OSP_ORDER_LINES

1851: -- we need to change the OSP order to bring it to a consistent state.
1852: -- This procedure basically looks for OSP Orders for which the Requisition has been deleted
1853: -- and resets some values and corrects the status of the order as well as the lines
1854: -- so that the OSP Order can be resubmitted and a different Requisition can be created.
1855: -- This procedure does a direct update of the AHL_OSP_ORDERS_B and the AHL_OSP_ORDER_LINES
1856: -- tables and does not call the process_osp_order API to avoid unwanted validations
1857: ----------------------------------------
1858: PROCEDURE Handle_Deleted_Req_Headers(
1859: p_commit IN VARCHAR2,

Line 1868: FROM ahl_osp_orders_b osp

1864: osp.object_version_number,
1865: osp.po_req_header_id,
1866: osp.status_code,
1867: osp.order_type_code
1868: FROM ahl_osp_orders_b osp
1869: WHERE osp.status_code = G_OSP_REQ_CREATED_STATUS AND
1870: osp.order_type_code in ('SERVICE', 'EXCHANGE') AND
1871: -- Added by jaramana on April 7, 2008 for bug 6609988
1872: osp.operating_unit_id = MO_GLOBAL.get_current_org_id() AND

Line 1938: update ahl_osp_orders_b

1934: END LOOP;
1935: CLOSE get_osp_line_dtls_csr;
1936: -- Now for the OSP Order Header, reset PO_REQ_HEADER_ID, PO_BATCH_ID, PO_REQUEST_ID
1937: -- set STATUS_CODE to "ENTERED" and increment OVN
1938: update ahl_osp_orders_b
1939: set po_req_header_id = null,
1940: po_batch_id = null,
1941: po_request_id = null,
1942: status_code = G_OSP_ENTERED_STATUS,

Line 2003: AHL_OSP_ORDERS_B OSP

1999: OSP.OBJECT_VERSION_NUMBER
2000: FROM PO_REQUISITION_LINES_ALL REQL,
2001: PO_REQUISITION_HEADERS_ALL REQH,
2002: AHL_OSP_ORDER_LINES OL,
2003: AHL_OSP_ORDERS_B OSP
2004: WHERE nvl(REQL.CANCEL_FLAG,'N') = 'Y' AND -- Canceled Req Line
2005: REQL.REQUISITION_HEADER_ID = REQH.REQUISITION_HEADER_ID AND
2006: REQH.INTERFACE_SOURCE_CODE = AHL_GLOBAL.AHL_APP_SHORT_NAME AND -- AHL Created Req
2007: REQH.INTERFACE_SOURCE_LINE_ID = OSP.OSP_ORDER_ID AND -- Related to the OSP Order

Line 2157: FROM AHL_OSP_ORDER_LINES OL, AHL_OSP_ORDERS_B OSP

2153:
2154: CURSOR l_get_deleted_req_lines_csr IS
2155: SELECT OL.OSP_ORDER_ID, OL.OSP_ORDER_LINE_ID,
2156: OL.OBJECT_VERSION_NUMBER, OSP.OBJECT_VERSION_NUMBER
2157: FROM AHL_OSP_ORDER_LINES OL, AHL_OSP_ORDERS_B OSP
2158: WHERE OL.PO_REQ_LINE_ID IS NOT NULL AND -- PO Created
2159: NVL(OL.STATUS_CODE, ' ') <> G_OL_REQ_DELETED_STATUS AND -- Not yet updated
2160: OSP.OSP_ORDER_ID = OL.OSP_ORDER_ID AND
2161: -- Added by jaramana on April 7, 2008 for bug 6609988