DBA Data[Home] [Help]

APPS.INV_MINMAX_PVT dependencies on MTL_RESERVATIONS

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

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

Line 1511: from mtl_reservations

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

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

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

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

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

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

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

Line 1648: from mtl_reservations

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

Line 1702: from mtl_reservations mr, oe_order_lines_all ool

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

Line 1734: AND not exists (SELECT 1 from mtl_reservations

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

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

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

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

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

Line 1868: -- Include the reserved demand from mtl_reservations

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

Line 1872: from mtl_reservations md, oe_order_lines_all so,

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

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

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

Line 2007: above from mtl_reservations query. */

2003:
2004: /* Here we need include the query to include OPM as source of demand.
2005: Since GME will always give the complete demand (including reserved demand)
2006: so subtracting the reserved demand as reserved demand will be considered
2007: above from mtl_reservations query. */
2008:
2009: SELECT
2010: SUM (( NVL((NVL(d.wip_plan_qty, d.plan_qty) - d.actual_qty), 0) *
2011: (d.original_primary_qty/d.original_qty)) - NVL(mtr.primary_reservation_quantity,0))

Line 2015: , mtl_reservations mtr

2011: (d.original_primary_qty/d.original_qty)) - NVL(mtr.primary_reservation_quantity,0))
2012: INTO qty
2013: FROM gme_material_details d
2014: , gme_batch_header h
2015: , mtl_reservations mtr
2016: WHERE h.batch_type IN (0,10)
2017: AND h.batch_status IN (1,2)
2018: AND h.batch_id = d.batch_id
2019: AND d.line_type = -1

Line 2255: from mtl_reservations

2251:
2252: -- Bug 5041763 need to exclude drop ship reservation from on-hand qty to get correct availability
2253: select sum(PRIMARY_RESERVATION_QUANTITY)
2254: into qty
2255: from mtl_reservations
2256: WHERE ORGANIZATION_ID = p_org_id
2257: and INVENTORY_ITEM_ID = p_item_id
2258: and demand_source_type_id = 2
2259: and supply_source_type_id = 13

Line 2349: FROM mtl_reservations

2345: -- p_include_nonnet
2346: --
2347: SELECT NVL(SUM(primary_reservation_quantity),0)
2348: INTO l_staged_qty
2349: FROM mtl_reservations
2350: WHERE organization_id = p_org_id
2351: AND inventory_item_id = p_item_id
2352: AND demand_source_line_id = p_order_line_id
2353: AND demand_source_type_id IN (2,8,12)

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

4534:
4535: BEGIN
4536: --The loaded quantity will be calculated only if the report is ran with
4537: --parameters "reserved demand=>No , unreserved demand=>No".
4538: --If the parameters are "yes", the MTL_RESERVATIONS or MMTT will be accounted for this qty.
4539:
4540: IF ( p_net_rsv = 2 and p_net_unrsv = 2 )THEN
4541:
4542: OPEN c_loaded_quantities_v ;