DBA Data[Home] [Help]

APPS.MSC_ATP_DB_UTILS dependencies on MSC_SUPPLIES

Line 2348: DELETE FROM MSC_SUPPLIES

2344:
2345: IF NVL(c1.inventory_item_id, -1) > 0 THEN
2346:
2347: -- delete the planned order that we may have enterred.
2348: DELETE FROM MSC_SUPPLIES
2349: WHERE transaction_id = c1.identifier3
2350: AND plan_id = c1.identifier2
2351: returning inventory_item_id, sr_instance_id,new_order_quantity, organization_id, supplier_id, supplier_site_id
2352: into l_inventory_item_id, l_instance_id, l_sd_qty, l_organization_id, l_supplier_id, l_supplier_site_id;

Line 2910: DELETE from msc_supplies

2906: END IF;
2907:
2908: --s_cto_rearch
2909: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
2910: DELETE from msc_supplies
2911: WHERE plan_id = p_plan_id
2912: AND transaction_id = l_transaction_id;
2913: END IF;
2914: --e_cto_rearch

Line 2917: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after msc_supplies');

2913: END IF;
2914: --e_cto_rearch
2915:
2916: IF PG_DEBUG in ('Y', 'C') THEN
2917: msc_sch_wb.atp_debug('Update_Planned_Order: ' || 'after msc_supplies');
2918: END IF;
2919: ELSE
2920:
2921: -- dsting diag_atp.

Line 2933: UPDATE msc_supplies

2929:
2930: -- For bug 2259824, move the supply to the end of day
2931: --s_cto_rearch:
2932: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
2933: UPDATE msc_supplies
2934: SET new_schedule_date = TRUNC(NVL(p_date, new_schedule_date)) + MSC_ATP_PVT.G_END_OF_DAY ,
2935: new_order_quantity = NVL(p_quantity, new_order_quantity),
2936: -- rajjain 02/19/2003 Bug 2788302 Begin
2937: supplier_id = Decode(p_supplier_id,

Line 4566: SELECT msc_supplies_s.nextval into p_transaction_id from dual;

4562: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_ship_date = ' ||to_char(p_ship_date));
4563: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'p_refresh_number = ' ||p_refresh_number);
4564: END IF;
4565:
4566: SELECT msc_supplies_s.nextval into p_transaction_id from dual;
4567:
4568: IF PG_DEBUG in ('Y', 'C') THEN
4569: msc_sch_wb.atp_debug('Add_Stealing_Supply_Details: ' || 'before insert into msc_alloc_supplies-Stealing Info');
4570: END IF;

Line 5021: /* In time phased atp scenarios add planned order in msc_supplies for member item*/

5017:
5018: -- time_phased_atp changes begin
5019: IF (p_supply_rec_type.inventory_item_id <> p_supply_rec_type.request_item_id) and p_supply_rec_type.atf_date is not null THEN
5020: l_time_phased_atp := 'Y';
5021: /* In time phased atp scenarios add planned order in msc_supplies for member item*/
5022: l_insert_item_id := p_supply_rec_type.request_item_id;
5023: IF PG_DEBUG in ('Y', 'C') THEN
5024: msc_sch_wb.atp_debug('Add_Planned_Order: ' || 'Time Phased ATP = ' || l_time_phased_atp);
5025: END IF;

Line 5030: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Insert planned order in msc_supplies for ' || l_insert_item_id);

5026: ELSE
5027: l_insert_item_id := p_supply_rec_type.inventory_item_id;
5028: END IF;
5029: IF PG_DEBUG in ('Y', 'C') THEN
5030: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Insert planned order in msc_supplies for ' || l_insert_item_id);
5031: END IF;
5032: -- time_phased_atp changes end
5033:
5034: -- Insert updated quantity as a Planned Order in msc_supplies

Line 5034: -- Insert updated quantity as a Planned Order in msc_supplies

5030: msc_sch_wb.atp_debug('Add_Supplies: ' || 'Insert planned order in msc_supplies for ' || l_insert_item_id);
5031: END IF;
5032: -- time_phased_atp changes end
5033:
5034: -- Insert updated quantity as a Planned Order in msc_supplies
5035: INSERT into MSC_SUPPLIES
5036: (plan_id,
5037: transaction_id,
5038: organization_id,

Line 5035: INSERT into MSC_SUPPLIES

5031: END IF;
5032: -- time_phased_atp changes end
5033:
5034: -- Insert updated quantity as a Planned Order in msc_supplies
5035: INSERT into MSC_SUPPLIES
5036: (plan_id,
5037: transaction_id,
5038: organization_id,
5039: sr_instance_id,

Line 5078: msc_supplies_s.nextval,

5074: disposition_id,
5075: INTRANSIT_LEAD_TIME --4127630
5076: )
5077: VALUES (p_supply_rec_type.plan_id,
5078: msc_supplies_s.nextval,
5079: p_supply_rec_type.organization_id,
5080: p_supply_rec_type.instance_id,
5081: l_insert_item_id, -- for time_phased_atp
5082: sysdate,

Line 5992: UPDATE MSC_SUPPLIES

5988:
5989: IF c1.supply_demand_type = 2 THEN --This is supply line
5990: IF NVL(c1.inventory_item_id, -1) > 0 THEN
5991: -- Hide the planned order that we may have enterred.
5992: UPDATE MSC_SUPPLIES
5993: SET inventory_item_id = -1*inventory_item_id
5994: WHERE transaction_id = c1.identifier3
5995: AND plan_id = c1.identifier2
5996: AND inventory_item_id > 0;

Line 5999: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of supply updated from msc_supplies = '|| SQL%ROWCOUNT);

5995: AND plan_id = c1.identifier2
5996: AND inventory_item_id > 0;
5997:
5998: IF PG_DEBUG in ('Y', 'C') THEN
5999: msc_sch_wb.atp_debug('Hide_SD_Rec: ' || 'No. of supply updated from msc_supplies = '|| SQL%ROWCOUNT);
6000: END IF;
6001:
6002: -- time_phased_atp or demand priority AATP
6003: IF (c1.aggregate_time_fence_date is not null)

Line 6175: DELETE FROM MSC_SUPPLIES

6171:
6172: IF c1.supply_demand_type = 2 THEN
6173: IF NVL(c1.inventory_item_id, -1) > 0 THEN
6174:
6175: DELETE FROM MSC_SUPPLIES
6176: WHERE transaction_id = c1.identifier3
6177: AND plan_id = c1.identifier2;
6178:
6179: IF PG_DEBUG in ('Y', 'C') THEN

Line 6180: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply deleted from msc_supplies = '|| SQL%ROWCOUNT);

6176: WHERE transaction_id = c1.identifier3
6177: AND plan_id = c1.identifier2;
6178:
6179: IF PG_DEBUG in ('Y', 'C') THEN
6180: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply deleted from msc_supplies = '|| SQL%ROWCOUNT);
6181: END IF;
6182:
6183: -- time_phased_atp
6184: IF (c1.aggregate_time_fence_date is not null)

Line 6342: UPDATE MSC_SUPPLIES

6338:
6339: IF c1.supply_demand_type = 2 THEN
6340: IF NVL(c1.inventory_item_id, -1) > 0 THEN
6341: -- update the planned order that we may have enterred.
6342: UPDATE MSC_SUPPLIES
6343: SET inventory_item_id = -1*inventory_item_id
6344: WHERE transaction_id = c1.identifier3
6345: AND plan_id = c1.identifier2
6346: AND inventory_item_id < 0;

Line 6349: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply updated from msc_supplies = '|| SQL%ROWCOUNT);

6345: AND plan_id = c1.identifier2
6346: AND inventory_item_id < 0;
6347:
6348: IF PG_DEBUG in ('Y', 'C') THEN
6349: msc_sch_wb.atp_debug('Delete_SD_Rec: ' || 'No. of supply updated from msc_supplies = '|| SQL%ROWCOUNT);
6350: END IF;
6351:
6352: -- time_phased_atp
6353: IF (c1.aggregate_time_fence_date is not null)