DBA Data[Home] [Help]

APPS.PO_DOCUMENT_CONTROL_PVT dependencies on PO_LINE_LOCATIONS

Line 244: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;

240: --
241:
242: --
243: l_is_complex_work_po BOOLEAN;
244: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
245: --
246:
247: l_xml_flag PO_HEADERS_all.xml_flag%TYPE; -- Bug 5407459
248:

Line 382: FROM po_line_locations_all poll

378: --Shipment level Cancel action
379:
380: SELECT poll.shipment_type
381: INTO l_shipment_type
382: FROM po_line_locations_all poll
383: WHERE poll.line_location_id = p_doc_line_loc_id
384: ;
385:
386: END IF; --p_doc_line_loc_id is not null

Line 1402: FROM po_line_locations poll

1398: AND NVL(poh.closed_code, 'OPEN') <> 'OPEN'
1399: )
1400: OR ( poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1401: AND EXISTS (SELECT 'Ship exists not OPEN'
1402: FROM po_line_locations poll
1403: WHERE poll.po_header_id = p_doc_id
1404: AND NVL(poll.consigned_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1405: AND NVL(poll.closed_code, 'OPEN') <> 'OPEN')
1406: )

Line 1414: FROM po_line_locations poll

1410: OR ( polc.lookup_code = 'RECEIVE CLOSE'
1411: AND NVL(poh.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1412: AND poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1413: AND EXISTS (SELECT 'Ships exist OPEN'
1414: FROM po_line_locations poll
1415: WHERE poll.po_header_id = p_doc_id
1416: AND NVL(poll.closed_code, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR RECEIVING')) --Bug l
1417: )
1418: OR ( polc.lookup_code = 'INVOICE CLOSE'

Line 1422: FROM po_line_locations poll

1418: OR ( polc.lookup_code = 'INVOICE CLOSE'
1419: AND NVL(poh.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1420: AND poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1421: AND EXISTS(SELECT 'Ships exist OPEN'
1422: FROM po_line_locations poll
1423: WHERE poll.po_header_id = p_doc_id
1424: AND NVL(poll.closed_code, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR INVOICE')) --Bug 954
1425: )
1426: OR ( polc.lookup_code = 'RECEIVE OPEN'

Line 1430: FROM po_line_locations poll

1426: OR ( polc.lookup_code = 'RECEIVE OPEN'
1427: AND NVL(poh.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1428: AND poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1429: AND EXISTS (SELECT 'Ships exist RCLOSED'
1430: FROM po_line_locations poll
1431: WHERE poll.po_header_id = p_doc_id
1432: AND poll.closed_code IN ('CLOSED FOR RECEIVING', 'CLOSED'))
1433: )
1434: OR ( polc.lookup_code = 'INVOICE OPEN'

Line 1437: FROM po_line_locations poll

1433: )
1434: OR ( polc.lookup_code = 'INVOICE OPEN'
1435: AND poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1436: AND EXISTS (SELECT 'Ships exits IC/CLOSED'
1437: FROM po_line_locations poll
1438: WHERE poll.po_header_id = p_doc_id
1439: AND NVL(poll.consigned_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1440: AND poll.closed_code IN ('CLOSED FOR INVOICE', 'CLOSED'))
1441: )

Line 1601: FROM po_line_locations poll

1597: AND NVL(poh.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1598: AND ( (poh.type_lookup_code = 'BLANKET')
1599: OR ( poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1600: AND EXISTS (SELECT 'Ships exist not OPEN'
1601: FROM po_line_locations poll
1602: WHERE poll.po_line_id = p_doc_line_id
1603: AND NVL(poll.consigned_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1604: AND NVL(poll.closed_code, 'OPEN') <> 'OPEN')
1605: )

Line 1612: FROM po_line_locations poll

1608: OR ( polc.lookup_code = 'RECEIVE CLOSE'
1609: AND NVL(poh.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1610: AND poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1611: AND EXISTS (SELECT 'Ships exist that are OPEN'
1612: FROM po_line_locations poll
1613: WHERE poll.po_line_id = p_doc_line_id
1614: AND NVL(poll.closed_code, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR RECEIVING')) --Bug 5113609
1615: )
1616: OR ( polc.lookup_code = 'INVOICE CLOSE'

Line 1620: FROM po_line_locations poll

1616: OR ( polc.lookup_code = 'INVOICE CLOSE'
1617: AND NVL(poh.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1618: AND poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1619: AND EXISTS (SELECT 'Ships exist OPEN'
1620: FROM po_line_locations poll
1621: WHERE poll.po_line_id = p_doc_line_id
1622: AND NVL(poll.closed_code, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR INVOICE')) --Bug 5113609
1623: )
1624: OR ( polc.lookup_code = 'RECEIVE OPEN'

Line 1628: FROM po_line_locations poll

1624: OR ( polc.lookup_code = 'RECEIVE OPEN'
1625: AND NVL(poh.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1626: AND poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1627: AND EXISTS (SELECT 'Ships exist RCLOSED'
1628: FROM po_line_locations poll
1629: WHERE poll.po_line_id = p_doc_line_id
1630: AND poll.closed_code IN ('CLOSED FOR RECEIVING', 'CLOSED'))
1631: )
1632: OR ( polc.lookup_code = 'INVOICE OPEN'

Line 1635: FROM po_line_locations poll

1631: )
1632: OR ( polc.lookup_code = 'INVOICE OPEN'
1633: AND poh.type_lookup_code NOT IN ('BLANKET', 'CONTRACT')
1634: AND EXISTS (SELECT 'Ships exits IC/CLOSED'
1635: FROM po_line_locations poll
1636: WHERE poll.po_line_id = p_doc_line_id
1637: AND NVL(poll.consigned_flag, 'N') <> 'Y' /* CONSIGNED FPI */
1638: AND poll.closed_code IN ('CLOSED FOR INVOICE', 'CLOSED'))
1639: )

Line 1755: po_line_locations_all poll,

1751: -- SQL Why: Find all allowable shipment level control actions for this doc
1752: SELECT polc.displayed_field,
1753: polc.lookup_code
1754: FROM po_lookup_codes polc,
1755: po_line_locations_all poll,
1756: po_headers_all poh
1757: WHERE poll.line_location_id = p_doc_line_loc_id
1758: AND poll.po_header_id = poh.po_header_id
1759: AND polc.lookup_type = 'CONTROL ACTIONS'

Line 2025: FROM po_line_locations poll

2021: )
2022: OR ( polc.lookup_code = 'RECEIVE CLOSE'
2023: AND NVL(por.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
2024: AND EXISTS (SELECT 'Ships exist that are OPEN'
2025: FROM po_line_locations poll
2026: WHERE poll.po_release_id = p_doc_id
2027: AND NVL(poll.closed_code, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR RECEIVING')) --Bug 5113609
2028: )
2029: OR ( polc.lookup_code = 'INVOICE CLOSE'

Line 2032: FROM po_line_locations poll

2028: )
2029: OR ( polc.lookup_code = 'INVOICE CLOSE'
2030: AND NVL(por.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
2031: AND EXISTS (SELECT 'Ships exist that are OPEN'
2032: FROM po_line_locations poll
2033: WHERE poll.po_release_id = p_doc_id
2034: AND NVL(poll.closed_code, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR INVOICE')) --Bug 5113609
2035: )
2036: OR ( polc.lookup_code = 'RECEIVE OPEN'

Line 2039: FROM po_line_locations poll

2035: )
2036: OR ( polc.lookup_code = 'RECEIVE OPEN'
2037: AND NVL(por.consigned_consumption_flag, 'N') <> 'Y' /* CONSIGNED FPI */
2038: AND EXISTS (SELECT 'Ships exist that are RCLOSED'
2039: FROM po_line_locations poll
2040: WHERE poll.po_release_id = p_doc_id
2041: AND poll.closed_code IN ('CLOSED FOR RECEIVING', 'CLOSED'))
2042: )
2043: OR ( polc.lookup_code = 'INVOICE OPEN'

Line 2045: FROM po_line_locations poll

2041: AND poll.closed_code IN ('CLOSED FOR RECEIVING', 'CLOSED'))
2042: )
2043: OR ( polc.lookup_code = 'INVOICE OPEN'
2044: AND EXISTS (SELECT 'Ships exits that are IC/CLOSED'
2045: FROM po_line_locations poll
2046: WHERE poll.po_release_id = p_doc_id
2047: AND poll.closed_code IN ('CLOSED FOR INVOICE', 'CLOSED'))
2048: )
2049: )

Line 2159: po_line_locations poll,

2155: -- release.
2156: SELECT polc.displayed_field,
2157: polc.lookup_code
2158: FROM po_lookup_codes polc,
2159: po_line_locations poll,
2160: po_releases por
2161: WHERE poll.line_location_id = p_doc_line_loc_id
2162: AND poll.po_release_id = por.po_release_id
2163: AND polc.lookup_type = 'CONTROL ACTIONS'

Line 3584: -- SQL What: Query PO_LINE_LOCATIONS for shipments

3580: RETURN BOOLEAN
3581: IS
3582:
3583: CURSOR l_has_ship_csr IS
3584: -- SQL What: Query PO_LINE_LOCATIONS for shipments
3585: -- SQL Why: Check if this document has any shipments
3586: --: include PREPAYMENT line locations
3587: SELECT 'Has shipments'
3588: FROM po_line_locations poll

Line 3588: FROM po_line_locations poll

3584: -- SQL What: Query PO_LINE_LOCATIONS for shipments
3585: -- SQL Why: Check if this document has any shipments
3586: --: include PREPAYMENT line locations
3587: SELECT 'Has shipments'
3588: FROM po_line_locations poll
3589: WHERE poll.po_header_id = p_doc_id AND
3590: poll.shipment_type IN
3591: ('STANDARD', 'PLANNED', 'BLANKET', 'PREPAYMENT') AND
3592: NVL(poll.cancel_flag, 'N') = 'N' AND

Line 3595: -- SQL What: Query PO_LINE_LOCATIONS for shipments

3591: ('STANDARD', 'PLANNED', 'BLANKET', 'PREPAYMENT') AND
3592: NVL(poll.cancel_flag, 'N') = 'N' AND
3593: NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';
3594: CURSOR l_has_rel_ship_csr IS
3595: -- SQL What: Query PO_LINE_LOCATIONS for shipments
3596: -- SQL Why: Check if this release has any shipments
3597: SELECT 'Has shipments'
3598: FROM po_line_locations poll
3599: WHERE poll.po_release_id = p_doc_id AND

Line 3598: FROM po_line_locations poll

3594: CURSOR l_has_rel_ship_csr IS
3595: -- SQL What: Query PO_LINE_LOCATIONS for shipments
3596: -- SQL Why: Check if this release has any shipments
3597: SELECT 'Has shipments'
3598: FROM po_line_locations poll
3599: WHERE poll.po_release_id = p_doc_id AND
3600: poll.shipment_type IN ('STANDARD', 'PLANNED', 'BLANKET') AND
3601: NVL(poll.cancel_flag, 'N') = 'N' AND
3602: NVL(poll.closed_code, 'OPEN') <> 'FINALLY CLOSED';

Line 3995: l_dummy PO_LINE_LOCATIONS_ALL.line_location_id%type := 0;

3991: l_timecard_exists BOOLEAN;
3992: l_otl_field_name VARCHAR2(20);
3993: l_otl_field_value NUMBER;
3994: l_current_entity_changed VARCHAR2(1);
3995: l_dummy PO_LINE_LOCATIONS_ALL.line_location_id%type := 0;
3996: d_pos NUMBER;
3997: l_api_name CONSTANT VARCHAR2(30) := 'Val_Cancel_FinalClose_Action';
3998: d_module CONSTANT VARCHAR2(70) := 'po.plsql.PO_Document_Control_PVT.Val_Cancel_FinalClose_Action' ;
3999: BEGIN

Line 4185: l_doc_subtype PO_LINE_LOCATIONS_ALL.shipment_type%type;

4181: ,x_is_encumbrance_error OUT NOCOPY VARCHAR2
4182: ,x_online_report_id OUT NOCOPY NUMBER--bug#5055417
4183: )
4184: IS
4185: l_doc_subtype PO_LINE_LOCATIONS_ALL.shipment_type%type;
4186: l_conterms_exist_flag PO_HEADERS_ALL.conterms_exist_flag%TYPE;
4187: l_document_start_date PO_HEADERS_ALL.start_date%TYPE;
4188: l_document_end_date PO_HEADERS_ALL.end_date%TYPE;
4189: l_document_version PO_HEADERS_ALL.revision_num%TYPE;

Line 4457: from po_line_locations_all

4453: IF (p_doc_level = PO_CORE_S.g_doc_level_SHIPMENT)
4454: THEN
4455: select shipment_type
4456: into l_doc_subtype
4457: from po_line_locations_all
4458: where line_location_id = p_doc_line_loc_id;
4459: ELSE
4460: l_doc_subtype := p_doc_subtype;
4461: END IF;

Line 4859: l_line_location_id PO_LINE_LOCATIONS_ALL.line_location_id%TYPE := NULL;

4855: p_doc_level IN VARCHAR2)
4856: RETURN BOOLEAN
4857: IS
4858: l_po_line_id PO_LINES_ALL.po_line_id%TYPE := NULL;
4859: l_line_location_id PO_LINE_LOCATIONS_ALL.line_location_id%TYPE := NULL;
4860: l_has_labor_expense_req BOOLEAN := FALSE;
4861: d_pos NUMBER := 0;
4862: l_api_name CONSTANT VARCHAR2(30) := 'is_backing_req_labor_expense';
4863: d_module CONSTANT VARCHAR2(70) := 'po.plsql.PO_Document_Control_PVT.is_backing_req_labor_expense';

Line 5251: FROM po_line_locations_all poll1,

5247: INTO l_ship_invalid_for_ctrl_actn
5248: FROM DUAL
5249: WHERE EXISTS(
5250: SELECT 1
5251: FROM po_line_locations_all poll1,
5252: po_line_locations_all poll2
5253: WHERE poll1.line_location_id = p_doc_level_id
5254: AND poll1.po_line_id = poll2.po_line_id
5255: AND NVL(poll2.cancel_flag,'N') <> 'Y'

Line 5252: po_line_locations_all poll2

5248: FROM DUAL
5249: WHERE EXISTS(
5250: SELECT 1
5251: FROM po_line_locations_all poll1,
5252: po_line_locations_all poll2
5253: WHERE poll1.line_location_id = p_doc_level_id
5254: AND poll1.po_line_id = poll2.po_line_id
5255: AND NVL(poll2.cancel_flag,'N') <> 'Y'
5256: AND NVL(poll2.payment_type, 'NULL') NOT IN ('ADVANCE', 'DELIVERY') --