DBA Data[Home] [Help]

APPS.MSC_ATP_DB_UTILS dependencies on MSC_ALLOC_DEMANDS

Line 299: msc_sch_wb.atp_debug('Add_Mat_Demand: before update of msc_alloc_demands');

295: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
296: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
297:
298: IF PG_DEBUG in ('Y', 'C') THEN
299: msc_sch_wb.atp_debug('Add_Mat_Demand: before update of msc_alloc_demands');
300: END IF;
301:
302: UPDATE msc_alloc_demands
303: SET old_allocated_quantity = allocated_quantity,

Line 302: UPDATE msc_alloc_demands

298: IF PG_DEBUG in ('Y', 'C') THEN
299: msc_sch_wb.atp_debug('Add_Mat_Demand: before update of msc_alloc_demands');
300: END IF;
301:
302: UPDATE msc_alloc_demands
303: SET old_allocated_quantity = allocated_quantity,
304: old_demand_date = demand_date,
305: plan_id = p_plan_id,
306: organization_id = p_atp_rec.organization_id,

Line 523: msc_sch_wb.atp_debug('Add_Mat_Demand: before insert into msc_alloc_demands');

519: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
520: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
521:
522: IF PG_DEBUG in ('Y', 'C') THEN
523: msc_sch_wb.atp_debug('Add_Mat_Demand: before insert into msc_alloc_demands');
524: END IF;
525:
526: INSERT INTO MSC_ALLOC_DEMANDS(
527: PLAN_ID,

Line 526: INSERT INTO MSC_ALLOC_DEMANDS(

522: IF PG_DEBUG in ('Y', 'C') THEN
523: msc_sch_wb.atp_debug('Add_Mat_Demand: before insert into msc_alloc_demands');
524: END IF;
525:
526: INSERT INTO MSC_ALLOC_DEMANDS(
527: PLAN_ID,
528: INVENTORY_ITEM_ID,
529: ORGANIZATION_ID,
530: SR_INSTANCE_ID,

Line 1719: msc_sch_wb.atp_debug('Delete_Row: before update of msc_alloc_demands');

1715: --(MSC_ATP_PVT.G_ALLOCATION_METHOD = 1))) AND p_ato_model_line_id is null THEN
1716: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1))) THEN
1717:
1718: IF PG_DEBUG in ('Y', 'C') THEN
1719: msc_sch_wb.atp_debug('Delete_Row: before update of msc_alloc_demands');
1720: END IF;
1721:
1722: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'N' THEN
1723: -- If condition added for summary enhancement

Line 1732: UPDATE msc_alloc_demands

1728: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);
1729: END IF;
1730:
1731: FORALL i IN 1..l_identifier_tab.COUNT
1732: UPDATE msc_alloc_demands
1733: SET old_allocated_quantity = allocated_quantity,
1734: old_demand_date = demand_date,
1735: allocated_quantity = 0,
1736: old_refresh_number = refresh_number, -- For summary enhancement

Line 1789: FROM msc_alloc_demands

1785: l_refresh_number_tab,
1786: l_qty_tab,
1787: l_old_demand_date,
1788: l_demand_class_tab
1789: FROM msc_alloc_demands
1790: WHERE sr_instance_id = p_instance_id
1791: AND plan_id = p_plan_id
1792: AND allocated_quantity > 0
1793: -- CTO ODR and Simplified Pegging

Line 1825: UPDATE msc_alloc_demands

1821: msc_sch_wb.atp_debug('Delete_Row: l_identifier_tab.COUNT ' || l_identifier_tab.COUNT);
1822: END IF;
1823:
1824: FORALL i IN 1..l_identifier_tab.COUNT
1825: UPDATE msc_alloc_demands
1826: SET old_allocated_quantity = allocated_quantity,
1827: old_demand_date = demand_date,
1828: allocated_quantity = 0,
1829: old_refresh_number = refresh_number, -- For summary enhancement

Line 1986: INSERT INTO MSC_ALLOC_DEMANDS(

1982: msc_sch_wb.atp_debug('Delete_Row: i_ins_item_id_tab.COUNT ' || i_ins_item_id_tab.COUNT);
1983: END IF;
1984:
1985: FORALL i IN 1..i_ins_item_id_tab.COUNT
1986: INSERT INTO MSC_ALLOC_DEMANDS(
1987: PLAN_ID,
1988: INVENTORY_ITEM_ID,
1989: ORGANIZATION_ID,
1990: SR_INSTANCE_ID,

Line 2333: ' msc_alloc_demands');

2329: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
2330:
2331: IF PG_DEBUG in ('Y', 'C') THEN
2332: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: before delete of' ||
2333: ' msc_alloc_demands');
2334: END IF;
2335:
2336: DELETE FROM MSC_ALLOC_DEMANDS
2337: WHERE parent_demand_id = c1.identifier3

Line 2336: DELETE FROM MSC_ALLOC_DEMANDS

2332: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: before delete of' ||
2333: ' msc_alloc_demands');
2334: END IF;
2335:
2336: DELETE FROM MSC_ALLOC_DEMANDS
2337: WHERE parent_demand_id = c1.identifier3
2338: AND old_allocated_quantity IS NULL
2339: AND plan_id = c1.identifier2;
2340:

Line 2342: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_alloc_demands = '|| SQL%ROWCOUNT);

2338: AND old_allocated_quantity IS NULL
2339: AND plan_id = c1.identifier2;
2340:
2341: IF PG_DEBUG in ('Y', 'C') THEN
2342: msc_sch_wb.atp_debug('Remove_Invalid_SD_Rec: ' || 'No. of demand deleted from msc_alloc_demands = '|| SQL%ROWCOUNT);
2343: END IF;
2344: END IF;
2345: -- Allocated ATP Based on Planning Details -- Agilent changes End
2346:

Line 3087: ' msc_alloc_demands');

3083: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3084:
3085: IF PG_DEBUG in ('Y', 'C') THEN
3086: msc_sch_wb.atp_debug('Update_Planned_Order: before update of' ||
3087: ' msc_alloc_demands');
3088: END IF;
3089: UPDATE msc_alloc_demands
3090: SET allocated_quantity = MSC_ATP_UTILS.Truncate_Demand(l_prim_uom_dmd_qty) --5598066
3091: WHERE parent_demand_id = l_demand_id

Line 3089: UPDATE msc_alloc_demands

3085: IF PG_DEBUG in ('Y', 'C') THEN
3086: msc_sch_wb.atp_debug('Update_Planned_Order: before update of' ||
3087: ' msc_alloc_demands');
3088: END IF;
3089: UPDATE msc_alloc_demands
3090: SET allocated_quantity = MSC_ATP_UTILS.Truncate_Demand(l_prim_uom_dmd_qty) --5598066
3091: WHERE parent_demand_id = l_demand_id
3092: AND plan_id = l_plan_id;
3093:

Line 3508: ' msc_alloc_demands');

3504: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3505:
3506: IF PG_DEBUG in ('Y', 'C') THEN
3507: msc_sch_wb.atp_debug('Update_SD_Date: before update of ' ||
3508: ' msc_alloc_demands');
3509: END IF;
3510:
3511: UPDATE MSC_ALLOC_DEMANDS
3512: SET ALLOCATED_QUANTITY = MSC_ATP_UTILS.Truncate_Demand(NVL(p_supply_demand_qty,

Line 3511: UPDATE MSC_ALLOC_DEMANDS

3507: msc_sch_wb.atp_debug('Update_SD_Date: before update of ' ||
3508: ' msc_alloc_demands');
3509: END IF;
3510:
3511: UPDATE MSC_ALLOC_DEMANDS
3512: SET ALLOCATED_QUANTITY = MSC_ATP_UTILS.Truncate_Demand(NVL(p_supply_demand_qty,
3513: ALLOCATED_QUANTITY)), --5598066
3514: DEMAND_DATE = NVL(p_supply_demand_date, DEMAND_DATE),
3515: LAST_UPDATED_BY = FND_GLOBAL.USER_ID,

Line 3840: -- Delete from MSC_ALLOC_DEMANDS

3836: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
3837: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) OR
3838: (p_time_phased_set = 'Y') THEN
3839:
3840: -- Delete from MSC_ALLOC_DEMANDS
3841: FORALL i IN 1..p_copy_demand_ids.COUNT
3842: DELETE FROM MSC_ALLOC_DEMANDS
3843: WHERE parent_demand_id = p_copy_demand_ids(i)
3844: AND plan_id = p_copy_plan_ids(i);

Line 3842: DELETE FROM MSC_ALLOC_DEMANDS

3838: (p_time_phased_set = 'Y') THEN
3839:
3840: -- Delete from MSC_ALLOC_DEMANDS
3841: FORALL i IN 1..p_copy_demand_ids.COUNT
3842: DELETE FROM MSC_ALLOC_DEMANDS
3843: WHERE parent_demand_id = p_copy_demand_ids(i)
3844: AND plan_id = p_copy_plan_ids(i);
3845:
3846: ELSE

Line 3848: -- Delete from MSC_ALLOC_DEMANDS

3844: AND plan_id = p_copy_plan_ids(i);
3845:
3846: ELSE
3847:
3848: -- Delete from MSC_ALLOC_DEMANDS
3849: FORALL i IN 1..p_copy_demand_ids.COUNT
3850: DELETE FROM MSC_DEMANDS
3851: WHERE demand_id = p_copy_demand_ids(i)
3852: AND plan_id = p_copy_plan_ids(i);

Line 3874: ' msc_alloc_demands');

3870: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
3871:
3872: IF PG_DEBUG in ('Y', 'C') THEN
3873: msc_sch_wb.atp_debug('Undo_Delete_Row: before update of ' ||
3874: ' msc_alloc_demands');
3875: END IF;
3876:
3877: /*bug 6642564 we do no want inventory item id to be updated
3878: in case of time phased ATP as,the inventory item id we are picking up

Line 3880: is of member item and msc_alloc_demands could me member item of product

3876:
3877: /*bug 6642564 we do no want inventory item id to be updated
3878: in case of time phased ATP as,the inventory item id we are picking up
3879: from msc_demands but for time phased ATP inventory item id in msc_demands
3880: is of member item and msc_alloc_demands could me member item of product
3881: family item */
3882:
3883: IF p_time_phased_set = 'Y' THEN
3884:

Line 3886: UPDATE msc_alloc_demands

3882:
3883: IF p_time_phased_set = 'Y' THEN
3884:
3885: FORALL m IN 1..p_del_demand_ids.COUNT
3886: UPDATE msc_alloc_demands
3887: SET allocated_quantity = MSC_ATP_UTILS.Truncate_Demand(old_allocated_quantity), --5598066
3888: demand_date = old_demand_date ,
3889: old_allocated_quantity = null,
3890: old_demand_date = null,

Line 3902: UPDATE msc_alloc_demands

3898:
3899: ELSE
3900:
3901: FORALL m IN 1..p_del_demand_ids.COUNT
3902: UPDATE msc_alloc_demands
3903: SET allocated_quantity = MSC_ATP_UTILS.Truncate_Demand(old_allocated_quantity), --5598066
3904: demand_date = old_demand_date ,
3905: old_allocated_quantity = null,
3906: old_demand_date = null,

Line 4679: DELETE FROM msc_alloc_demands

4675:
4676: msc_sch_wb.atp_debug('Delete_Copy_Demand : ' || 'allocated ATP or time phased PF');
4677:
4678: FORALL i IN 1..p_copy_demand_ids.COUNT
4679: DELETE FROM msc_alloc_demands
4680: WHERE parent_demand_id = p_copy_demand_ids(i)
4681: AND plan_id = p_copy_plan_ids(i)
4682: AND refresh_number <= (SELECT nvl(latest_refresh_number,-1)
4683: FROM MSC_PLANS