DBA Data[Home] [Help]

APPS.CSP_MINMAX_PVT dependencies on MTL_RESERVATIONS

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

1497: total := total + NVL(qty,0);
1498: END IF;
1499:
1500: --
1501: -- select the reserved quantity from mtl_reservations for non OE rows
1502: --
1503: IF p_net_rsv = 1 THEN
1504: select sum(PRIMARY_RESERVATION_QUANTITY)
1505: into qty

Line 1506: from mtl_reservations

1502: --
1503: IF p_net_rsv = 1 THEN
1504: select sum(PRIMARY_RESERVATION_QUANTITY)
1505: into qty
1506: from mtl_reservations
1507: where ORGANIZATION_ID = p_org_id
1508: and INVENTORY_ITEM_ID = p_item_id
1509: and REQUIREMENT_DATE <= p_d_cutoff
1510: and demand_source_type_id not in (2,8,12)

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

1520: 1,
1521: S.availability_type,
1522: 1)));
1523:
1524: print_debug('Demand (reserved qty) for non OE rows in mtl_reservations: ' || to_char(qty)
1525: , 'get_demand_qty'
1526: , 9);
1527: total := total + NVL(qty,0);
1528: END IF;

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

1597: , 9);
1598: end if;
1599:
1600: --
1601: -- Find out the reserved qty for the material from mtl_reservations
1602: --
1603: -- Since total demand = reserved + unreserved, and we know total
1604: -- demand from oe_order_lines_all (above) we only need to query
1605: -- mtl_reservations if the user wants one of the following:

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

1601: -- Find out the reserved qty for the material from mtl_reservations
1602: --
1603: -- Since total demand = reserved + unreserved, and we know total
1604: -- demand from oe_order_lines_all (above) we only need to query
1605: -- mtl_reservations if the user wants one of the following:
1606: --
1607: -- 1) Only reserved: (p_net_rsv = 1 and p_net_unrsv = 2)
1608: --
1609: -- OR

Line 1620: from mtl_reservations

1616: (p_net_rsv = 2 and p_net_unrsv = 1))
1617: THEN
1618: select sum(PRIMARY_RESERVATION_QUANTITY)
1619: into l_total_reserve_qty
1620: from mtl_reservations
1621: WHERE ORGANIZATION_ID = p_org_id
1622: and INVENTORY_ITEM_ID = p_item_id
1623: and REQUIREMENT_DATE <= p_d_cutoff
1624: and demand_source_type_id in (2,8,12)

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

1646: -- demand is simply the total demand = ordered qty - shipped qty.
1647: -- Bug 2333526: Deduct staged qty for sub level. (l_staged_qty
1648: -- is always set to 0 for org level planning).
1649: -- elsif we have to take into account only reserved matl. then the
1650: -- demand is simply the reservations from mtl_reservations for the matl.
1651: -- elsif we have to take into account just the unreserved matl. then the
1652: -- demand is total demand - the reservations for the material.
1653: --
1654: IF p_net_unrsv = 1 AND p_net_rsv = 1 THEN

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

1727: , 9);
1728: end if;
1729:
1730: --
1731: -- Find out the reserved qty for the material from mtl_reservations
1732: --
1733: IF ((p_net_rsv = 1 and p_net_unrsv = 2)
1734: OR
1735: (p_net_rsv = 2 and p_net_unrsv = 1))

Line 1738: -- Include the reserved demand from mtl_reservations

1734: OR
1735: (p_net_rsv = 2 and p_net_unrsv = 1))
1736: THEN
1737: --
1738: -- Include the reserved demand from mtl_reservations
1739: --
1740: select sum(PRIMARY_RESERVATION_QUANTITY)
1741: into l_total_reserve_qty
1742: from mtl_reservations md, oe_order_lines_all so,

Line 1742: from mtl_reservations md, oe_order_lines_all so,

1738: -- Include the reserved demand from mtl_reservations
1739: --
1740: select sum(PRIMARY_RESERVATION_QUANTITY)
1741: into l_total_reserve_qty
1742: from mtl_reservations md, oe_order_lines_all so,
1743: po_req_distributions_all pod,
1744: po_requisition_lines_all pol
1745: where md.DEMAND_SOURCE_LINE_ID = so.LINE_ID
1746: and so.ORIG_SYS_LINE_REF = to_char(pod.DISTRIBUTION_ID)

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

1773: -- total demand is calculated as follows:
1774: -- if we have to consider both unreserved matl and reserved matl. then the
1775: -- demand is simply the total demand = ordered qty - shipped qty.
1776: -- elsif we have to take into account only reserved matl. then the
1777: -- demand is simply the reservations from mtl_reservations for the matl.
1778: -- elsif we have to take into account just the unreserved matl. then the
1779: -- demand is total demand - the reservations for the material.
1780: --
1781: if p_net_unrsv = 1 and p_net_rsv = 1 then

Line 2048: FROM mtl_reservations

2044: -- p_include_nonnet
2045: --
2046: SELECT NVL(SUM(primary_reservation_quantity),0)
2047: INTO l_staged_qty
2048: FROM mtl_reservations
2049: WHERE organization_id = p_org_id
2050: AND inventory_item_id = p_item_id
2051: AND demand_source_line_id = p_order_line_id
2052: AND demand_source_type_id IN (2,8,12)