1495: NULL line_number
1496: FROM mtl_reservations mr,
1497: wip_discrete_jobs wdj,
1498: wip_entities we,
1499: mfg_lookups mlk,
1500: mfg_lookups mlk2,
1501: oe_order_lines_all oel
1502: WHERE oel.line_id = p_line_id
1503: AND demand_source_type_id = DECODE(CTO_WORKBENCH_UTIL_PK.get_source_document_id(p_line_id), 10,8,2)
1496: FROM mtl_reservations mr,
1497: wip_discrete_jobs wdj,
1498: wip_entities we,
1499: mfg_lookups mlk,
1500: mfg_lookups mlk2,
1501: oe_order_lines_all oel
1502: WHERE oel.line_id = p_line_id
1503: AND demand_source_type_id = DECODE(CTO_WORKBENCH_UTIL_PK.get_source_document_id(p_line_id), 10,8,2)
1504: AND oel.line_id = mr.demand_source_line_id
1516: NULL line_number
1517: FROM wip_flow_schedules wfs,
1518: oe_order_lines_all oel,
1519: mtl_system_items msi,
1520: mfg_lookups mlk,
1521: mfg_lookups mlk2
1522: WHERE wfs.demand_source_line = p_line_id
1523: AND oel.line_id = p_line_id
1524: AND mlk.lookup_type = 'WIP_FLOW_SCHEDULE_STATUS'
1517: FROM wip_flow_schedules wfs,
1518: oe_order_lines_all oel,
1519: mtl_system_items msi,
1520: mfg_lookups mlk,
1521: mfg_lookups mlk2
1522: WHERE wfs.demand_source_line = p_line_id
1523: AND oel.line_id = p_line_id
1524: AND mlk.lookup_type = 'WIP_FLOW_SCHEDULE_STATUS'
1525: AND mlk.lookup_code = wfs.status
1537: po_lines_all pol,
1538: po_line_locations_all poll,
1539: oe_order_lines_all oel,
1540: mtl_units_of_measure uom,
1541: mfg_lookups mlk2
1542: WHERE mr.demand_source_type_id IN(8,2)
1543: AND mr.demand_source_line_id = oel.line_id
1544: AND mr.supply_source_type_id = 1
1545: AND mr.supply_source_header_id = poh.po_header_id
1558: po_requisition_headers_all porh,
1559: po_requisition_lines_all porl,
1560: oe_order_lines_all oel,
1561: mtl_units_of_measure uom,
1562: mfg_lookups mlk2
1563: WHERE oel.line_id = p_line_id
1564: AND mr.demand_source_type_id IN (8,2)
1565: AND mr.demand_source_line_id = oel.line_id
1566: AND mr.supply_source_type_id IN (7, 17)
1579: po_line_locations_all poll,
1580: po_lines_all pol,
1581: oe_order_lines_all oel,
1582: mtl_units_of_measure uom,
1583: mfg_lookups mlk2
1584: WHERE oel.line_id = p_line_id
1585: AND ods.line_id = oel.line_id
1586: AND ods.po_header_id = poh.po_header_id
1587: AND poh.po_header_id = poll.po_header_id
1598: po_requisition_headers_all porh,
1599: po_requisition_lines_all porl,
1600: oe_order_lines_all oel,
1601: mtl_units_of_measure uom,
1602: mfg_lookups mlk2
1603: WHERE oel.line_id = p_line_id
1604: AND ods.line_id = oel.line_id
1605: AND ods.po_header_id IS NULL
1606: AND ods.requisition_header_id = porh.requisition_header_id
1615: NULL line_number
1616: FROM mtl_reservations mr,
1617: oe_order_lines_all oel,
1618: mtl_units_of_measure uom,
1619: mfg_lookups mlk2,
1620: rcv_shipment_lines ASN_LINES,
1621: rcv_shipment_headers ASN_HEADERS
1622: WHERE mr.demand_source_type_id IN (8,2)
1623: AND mr.demand_source_line_id = oel.line_id