DBA Data[Home] [Help]

APPS.INV_MINMAX_PVT dependencies on MTL_RESERVATIONS

Line 1509: -- select the reserved quantity from mtl_reservations for non OE rows

1505: total := total + NVL(qty,0);
1506: END IF;
1507:
1508: --
1509: -- select the reserved quantity from mtl_reservations for non OE rows
1510: --
1511: IF p_net_rsv = 1 THEN
1512: select sum(PRIMARY_RESERVATION_QUANTITY)
1513: into qty

Line 1514: from mtl_reservations

1510: --
1511: IF p_net_rsv = 1 THEN
1512: select sum(PRIMARY_RESERVATION_QUANTITY)
1513: into qty
1514: from mtl_reservations
1515: where ORGANIZATION_ID = p_org_id
1516: and INVENTORY_ITEM_ID = p_item_id
1517: and REQUIREMENT_DATE <= p_d_cutoff + 0.99999 /* bug no 6009682 */
1518: and demand_source_type_id not in (2,8,12)

Line 1549: print_debug('Demand (reserved qty) for non OE rows in mtl_reservations: ' || to_char(qty)

1545: AND mln.availability_type = decode(p_include_nonnet,1,mln.availability_type,1)));
1546: /* nsinghi MIN-MAX INVCONV end */
1547:
1548: IF G_TRACE_ON = 1 THEN
1549: print_debug('Demand (reserved qty) for non OE rows in mtl_reservations: ' || to_char(qty)
1550: , 'get_demand_qty'
1551: , 9);
1552: END IF;
1553: total := total + NVL(qty,0);

Line 1632: -- Find out the reserved qty for the material from mtl_reservations

1628: END IF;
1629: end if;
1630:
1631: --
1632: -- Find out the reserved qty for the material from mtl_reservations
1633: --
1634: -- Since total demand = reserved + unreserved, and we know total
1635: -- demand from oe_order_lines_all (above) we only need to query
1636: -- mtl_reservations if the user wants one of the following:

Line 1636: -- mtl_reservations if the user wants one of the following:

1632: -- Find out the reserved qty for the material from mtl_reservations
1633: --
1634: -- Since total demand = reserved + unreserved, and we know total
1635: -- demand from oe_order_lines_all (above) we only need to query
1636: -- mtl_reservations if the user wants one of the following:
1637: --
1638: -- 1) Only reserved: (p_net_rsv = 1 and p_net_unrsv = 2)
1639: --
1640: -- OR

Line 1651: from mtl_reservations

1647: (p_net_rsv = 2 and p_net_unrsv = 1))
1648: THEN
1649: select sum(PRIMARY_RESERVATION_QUANTITY)
1650: into l_total_reserve_qty
1651: from mtl_reservations
1652: WHERE ORGANIZATION_ID = p_org_id
1653: and INVENTORY_ITEM_ID = p_item_id
1654: and REQUIREMENT_DATE <= p_d_cutoff + 0.99999 /* bug no 6009682 */
1655: and demand_source_type_id in (2,8,12)

Line 1705: from mtl_reservations mr, oe_order_lines_all ool

1701: --
1702: IF (p_level = 2 and (p_net_rsv = 1 or p_net_unrsv = 1)) THEN
1703:
1704: select sum(mr.PRIMARY_RESERVATION_QUANTITY) into l_sub_reserve_qty
1705: from mtl_reservations mr, oe_order_lines_all ool
1706: where mr.organization_id = p_org_id
1707: AND mr.inventory_item_id = p_item_id
1708: AND mr.demand_source_line_id = ool.line_id
1709: AND mr.demand_source_type_id in (2,8,12)

Line 1737: AND not exists (SELECT 1 from mtl_reservations

1733: AND subinventory_code = p_subinv
1734: AND transfer_subinventory <> p_subinv
1735: AND NVL(transaction_status, 1) = 2
1736: AND transaction_source_type_id in (2,8)
1737: AND not exists (SELECT 1 from mtl_reservations
1738: WHERE reservation_id = mmtt.reservation_id
1739: AND nvl(subinventory_code, '@@@') = p_subinv)
1740: AND exists (SELECT 1 from mtl_txn_request_lines
1741: WHERE line_id = mmtt.move_order_line_id

Line 1765: -- demand is simply the reservations from mtl_reservations for the matl.

1761: -- is always set to 0 for org level planning).
1762: -- Bug 3238390, add reserved qty for sales orders with no sub
1763: -- and reservation with sub for sub level planning.
1764: -- elsif we have to take into account only reserved matl. then the
1765: -- demand is simply the reservations from mtl_reservations for the matl.
1766: -- elsif we have to take into account just the unreserved matl. then the
1767: -- demand is total demand - the reservations for the material.
1768: -- Bug 3238390, add reserved qty for sales orders with no sub
1769: -- and reservation with sub for sub level planning, so that demand doesn't go -ve.

Line 1864: -- Find out the reserved qty for the material from mtl_reservations

1860: END IF;
1861: end if;
1862:
1863: --
1864: -- Find out the reserved qty for the material from mtl_reservations
1865: --
1866: IF ((p_net_rsv = 1 and p_net_unrsv = 2)
1867: OR
1868: (p_net_rsv = 2 and p_net_unrsv = 1))

Line 1871: -- Include the reserved demand from mtl_reservations

1867: OR
1868: (p_net_rsv = 2 and p_net_unrsv = 1))
1869: THEN
1870: --
1871: -- Include the reserved demand from mtl_reservations
1872: --
1873: select sum(PRIMARY_RESERVATION_QUANTITY)
1874: into l_total_reserve_qty
1875: from mtl_reservations md, oe_order_lines_all so,

Line 1875: from mtl_reservations md, oe_order_lines_all so,

1871: -- Include the reserved demand from mtl_reservations
1872: --
1873: select sum(PRIMARY_RESERVATION_QUANTITY)
1874: into l_total_reserve_qty
1875: from mtl_reservations md, oe_order_lines_all so,
1876: -- po_req_distributions_all pod, Bug 5934651
1877: po_requisition_lines_all pol
1878: where md.DEMAND_SOURCE_LINE_ID = so.LINE_ID
1879: -- and to_number(so.ORIG_SYS_LINE_REF) = pod.DISTRIBUTION_ID --Bug#2883172

Line 1942: -- demand is simply the reservations from mtl_reservations for the matl.

1938: -- total demand is calculated as follows:
1939: -- if we have to consider both unreserved matl and reserved matl. then the
1940: -- demand is simply the total demand = ordered qty - shipped qty.
1941: -- elsif we have to take into account only reserved matl. then the
1942: -- demand is simply the reservations from mtl_reservations for the matl.
1943: -- elsif we have to take into account just the unreserved matl. then the
1944: -- demand is total demand - the reservations for the material.
1945: --
1946: if p_net_unrsv = 1 and p_net_rsv = 1 then

Line 2010: above from mtl_reservations query. */

2006:
2007: /* Here we need include the query to include OPM as source of demand.
2008: Since GME will always give the complete demand (including reserved demand)
2009: so subtracting the reserved demand as reserved demand will be considered
2010: above from mtl_reservations query. */
2011:
2012:
2013: SELECT
2014: SUM (INV_DECIMALS_PUB.GET_PRIMARY_QUANTITY( p_org_id

Line 2022: , mtl_reservations mtr

2018: NVL(mtr.primary_reservation_quantity,0))
2019: INTO qty
2020: FROM gme_material_details d
2021: , gme_batch_header h
2022: , mtl_reservations mtr
2023: WHERE h.batch_type IN (0,10)
2024: AND h.batch_status IN (1,2)
2025: AND h.batch_id = d.batch_id
2026: AND d.line_type = -1

Line 2265: from mtl_reservations

2261:
2262: -- Bug 5041763 need to exclude drop ship reservation from on-hand qty to get correct availability
2263: select sum(PRIMARY_RESERVATION_QUANTITY)
2264: into qty
2265: from mtl_reservations
2266: WHERE ORGANIZATION_ID = p_org_id
2267: and INVENTORY_ITEM_ID = p_item_id
2268: and demand_source_type_id = 2
2269: and supply_source_type_id = 13

Line 2359: FROM mtl_reservations

2355: -- p_include_nonnet
2356: --
2357: SELECT NVL(SUM(primary_reservation_quantity),0)
2358: INTO l_staged_qty
2359: FROM mtl_reservations
2360: WHERE organization_id = p_org_id
2361: AND inventory_item_id = p_item_id
2362: AND demand_source_line_id = p_order_line_id
2363: AND demand_source_type_id IN (2,8,12)

Line 4558: --If the parameters are "yes", the MTL_RESERVATIONS or MMTT will be accounted for this qty.

4554:
4555: BEGIN
4556: --The loaded quantity will be calculated only if the report is ran with
4557: --parameters "reserved demand=>No , unreserved demand=>No".
4558: --If the parameters are "yes", the MTL_RESERVATIONS or MMTT will be accounted for this qty.
4559:
4560: IF ( p_net_rsv = 2 and p_net_unrsv = 2 )THEN
4561:
4562: OPEN c_loaded_quantities_v ;