DBA Data[Home] [Help]

APPS.MSC_ATP_PVT dependencies on MSC_DEMANDS

Line 7306: Added by avjain to capture original request date to insert in msc-demands

7302: ELSE
7303: l_requested_ship_date := p_atp_record.requested_ship_date;
7304: END IF;
7305: /*
7306: Added by avjain to capture original request date to insert in msc-demands
7307: original_request_date corresponds to request date for 24*7 ATP which gives
7308: the request date
7309: */
7310: l_original_req_ship_date := nvl(p_atp_record.original_request_date,l_requested_ship_date);

Line 9231: update msc_demands

9227: p_atp_record.quantity_ordered-
9228: l_sub_requested_date_quantity );
9229: END IF;
9230:
9231: update msc_demands
9232: set USING_REQUIREMENT_QUANTITY =
9233: MSC_ATP_UTILS.Truncate_Demand((USING_REQUIREMENT_QUANTITY-
9234: greatest(l_sub_requested_date_quantity, 0))) -- 5598066
9235: where demand_id = l_demand_id

Line 9491: update msc_demands

9487: -- using the pegging_id to find the demand_id and plan_id
9488: ---demandxyz
9489: --- Initially we created the demand for l_requested_date_qty
9490: --- now we update the quantity
9491: update msc_demands
9492: set USING_REQUIREMENT_QUANTITY = p_atp_record.quantity_ordered
9493: where plan_id = p_plan_id and
9494: demand_id = l_demand_id;
9495:

Line 9556: update msc_demands

9552: -- we need to change the requested quantity for that primary
9553: -- component to what was requested minus
9554: -- what got satisfied by the stealing
9555:
9556: update msc_demands
9557: set USING_REQUIREMENT_QUANTITY =
9558: (p_atp_record.quantity_ordered - l_stealing_qty)
9559: where demand_id = l_demand_id
9560: and plan_id = p_plan_id;

Line 9684: update msc_demands

9680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
9681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
9682: END IF;
9683:
9684: update msc_demands
9685: set using_requirement_quantity = MSC_ATP_UTILS.Truncate_Demand(p_atp_record.requested_date_quantity + l_stealing_requested_date_qty)
9686: where demand_id = l_demand_id
9687: and plan_id = p_plan_id;
9688:

Line 9894: UPDATE msc_demands

9890: -- bug 1302394: we should adjust the date
9891: -- of the demand which causes this planned order
9892: -- as well so that they can cancel each other.
9893:
9894: UPDATE msc_demands
9895: SET USING_ASSEMBLY_DEMAND_DATE = l_atp_date_this_level
9896: --ngoel 8/30/2000 Check if this needs to be changed to l_atp_date_this_level.
9897: WHERE demand_id = l_demand_id
9898: AND plan_id = p_plan_id;

Line 9957: UPDATE msc_demands

9953: WHERE sr_instance_id = p_atp_record.instance_id
9954: AND DEMAND_ID = l_demand_id
9955: returning inventory_item_id into l_inventory_item_id;
9956: ELSE
9957: UPDATE msc_demands
9958: SET
9959: --start changes for plan by request date
9960: USING_ASSEMBLY_DEMAND_DATE =
9961: DECODE(ORIGINATION_TYPE,

Line 10382: UPDATE msc_demands

10378: p_atp_record.error_code := ATP_REQ_DATE_FAIL;
10379: ---- bug 1819638
10380: ---remove the demand record as supply is 0 on the req_date
10381:
10382: UPDATE msc_demands
10383: SET USING_REQUIREMENT_QUANTITY = 0
10384: WHERE demand_id = l_demand_id
10385: AND plan_id = p_plan_id
10386: returning inventory_item_id into l_inventory_item_id;

Line 10403: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');

10399:
10400: -- update summary records removed in ODS cases - for summary enhancement
10401: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
10402: IF PG_DEBUG in ('Y', 'C') THEN
10403: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
10404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
10405: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
10406: END IF;
10407:

Line 13615: update msc_demands

13611:
13612: /*
13613: -- 1228607: since we add this planned order,
13614: -- we need to work on the demand record for this too.
13615: update msc_demands
13616: set USING_REQUIREMENT_QUANTITY =
13617: (USING_REQUIREMENT_QUANTITY -
13618: LEAST(l_net_demand, 0))
13619: where demand_id = l_demand_id

Line 15598: update msc_demands

15594: MSC_ATP_DB_UTILS.Update_Pegging( l_substitutes_rec.pegging_id(l_index),
15595: null,
15596: l_atp_ctp_qty );
15597: END IF;
15598: update msc_demands
15599: set USING_REQUIREMENT_QUANTITY = MSC_ATP_UTILS.Truncate_Demand(l_atp_ctp_qty) -- 5598066
15600: where demand_id = l_substitutes_rec.demand_id(l_index)
15601: and plan_id = p_plan_id
15602: returning inventory_item_id

Line 15740: update msc_demands

15736:
15737: -- dsting diag_atp. do not adjust the demands for diagnostic ATP
15738:
15739: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
15740: update msc_demands
15741: set USING_REQUIREMENT_QUANTITY =
15742: MSC_ATP_UTILS.Truncate_Demand((USING_REQUIREMENT_QUANTITY-l_net_demand)) -- 5598066
15743: where demand_id = l_demand_id
15744: and plan_id = p_plan_id

Line 15784: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');

15780:
15781: -- update summary records removed in ODS cases - for summary enhancement
15782: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
15783: IF PG_DEBUG in ('Y', 'C') THEN
15784: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
15785: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15786: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15787: END IF;
15788:

Line 15910: /*update msc_demands

15906:
15907: -- 1228607
15908: --- This code has been moved before stealing
15909: --- so that demand record is correct before stealing takes place
15910: /*update msc_demands
15911: set USING_REQUIREMENT_QUANTITY =
15912: (USING_REQUIREMENT_QUANTITY-l_net_demand)
15913: where demand_id = l_demand_id
15914: and plan_id = p_plan_id;*/

Line 15959: update msc_demands

15955:
15956: -- dsting diag_atp do not adjust the demands for diagnostic atp
15957: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
15958:
15959: update msc_demands
15960: set USING_REQUIREMENT_QUANTITY =
15961: MSC_ATP_UTILS.Truncate_Demand((USING_REQUIREMENT_QUANTITY-l_net_demand)) -- 5598066
15962: where demand_id = l_demand_id
15963: and plan_id = p_plan_id

Line 16003: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');

15999: -- update summary records removed in ODS cases - for summary enhancement
16000: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
16001: IF PG_DEBUG in ('Y', 'C') THEN
16002: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');
16003: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
16004: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16005: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16006: END IF;
16007:

Line 16060: -- for override case for CTO, do not adjust demand date in msc_demands

16056: IF p_atp_record.ship_date IS NOT NULL THEN
16057: -- Update only if p_atp_record.ship_date is NOT NULL
16058:
16059: -- dsting ATO 2465370
16060: -- for override case for CTO, do not adjust demand date in msc_demands
16061: --bug 3564511: always update the date on PO demands
16062: --IF NVL(G_LINE_OVERRIDE_FLAG, 'N') = 'N'
16063: --OR (NVL(C_ITEM_INFO_REC.cto_source_org_id, -1) <> p_atp_record.organization_id
16064: --AND p_parent_pegging_id is not null)

Line 16078: UPDATE msc_demands

16074: IF PG_DEBUG in ('Y','C') THEN
16075: msc_sch_wb.atp_debug('ATO update details_temp 12: ' || l_parent_pegging_id || ' date: ' || p_atp_record.ship_date);
16076: END IF;
16077:
16078: UPDATE msc_demands
16079: --SET USING_ASSEMBLY_DEMAND_DATE = NVL(p_atp_record.ship_date,
16080: -- USING_ASSEMBLY_DEMAND_DATE)
16081: -- For bug 2259824, move the demand to the end of day
16082: ----start changes for plan by request date