DBA Data[Home] [Help]

APPS.MSC_ATP_PVT dependencies on MSC_ATP_DB_UTILS

Line 691: MSC_ATP_DB_UTILS.call_delete_row (

687: -- Call_delete_row will take care of calling delete_row for the line/set.
688: -- The input to this procedure is p_atp_table.
689: -- l_delete_atp_rec will contain array to be used to call undo_delete_row.
690: -- l_delete_atp_rec also contains offset records.
691: MSC_ATP_DB_UTILS.call_delete_row (
692: p_instance_id,
693: p_atp_table,
694: p_refresh_number,
695: l_delete_atp_rec,

Line 3419: MSC_ATP_DB_UTILS.Delete_Pegging(l_atp_peg_id);

3415: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);
3416: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count :' || l_ctp_parent_peg_id.count);
3417: END IF;
3418:
3419: MSC_ATP_DB_UTILS.Delete_Pegging(l_atp_peg_id);
3420:
3421: IF l_ctp_parent_peg_id.count > 0 then
3422: --Remove pegging and s/d inventory item id is negative.
3423: MSC_ATP_DB_UTILS.Delete_SD_Rec(l_ctp_parent_peg_id,l_return_status);

Line 3423: MSC_ATP_DB_UTILS.Delete_SD_Rec(l_ctp_parent_peg_id,l_return_status);

3419: MSC_ATP_DB_UTILS.Delete_Pegging(l_atp_peg_id);
3420:
3421: IF l_ctp_parent_peg_id.count > 0 then
3422: --Remove pegging and s/d inventory item id is negative.
3423: MSC_ATP_DB_UTILS.Delete_SD_Rec(l_ctp_parent_peg_id,l_return_status);
3424: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3425: IF PG_DEBUG in ('Y', 'C') THEN
3426: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Delete_SD_Rec');
3427: END IF;

Line 3438: MSC_ATP_DB_UTILS.Delete_SD_Rec(l_steal_atp_peg_id,l_return_status);

3434: END IF;
3435:
3436: IF l_steal_atp_peg_id.count > 0 and MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' then
3437: --Remove stealing records/pegging
3438: MSC_ATP_DB_UTILS.Delete_SD_Rec(l_steal_atp_peg_id,l_return_status);
3439: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3440: IF PG_DEBUG in ('Y', 'C') THEN
3441: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Delete_SD_Rec');
3442: END IF;

Line 3473: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_STEAL_PEGGING_ID(i),l_return_status);

3469: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3470: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));
3471: END IF;
3472: IF G_FW_STEAL_PEGGING_ID(i) is not null THEN
3473: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_STEAL_PEGGING_ID(i),l_return_status);
3474: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3475: IF PG_DEBUG in ('Y', 'C') THEN
3476: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Hide_SD_Rec');
3477: END IF;

Line 3490: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_CTP_PEGGING_ID(i),l_return_status);

3486: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID ' || G_FW_CTP_PEGGING_ID(i));
3487: END IF;
3488: IF G_FW_CTP_PEGGING_ID(i) is not null THEN
3489: --Hide the CTP records with -1*inventory_item_id
3490: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_CTP_PEGGING_ID(i),l_return_status);
3491: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3492: IF PG_DEBUG in ('Y', 'C') THEN
3493: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Hide_SD_Rec');
3494: END IF;

Line 3531: MSC_ATP_DB_UTILS.Delete_Pegging(G_FW_PEGGING_ID);

3527: msc_sch_wb.atp_debug('Schedule: ' || 'Before call to Remove_Invalid_SD_Rec');
3528: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3529: END IF;
3530:
3531: MSC_ATP_DB_UTILS.Delete_Pegging(G_FW_PEGGING_ID);
3532:
3533: IF PG_DEBUG in ('Y', 'C') THEN
3534: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3535: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);

Line 3547: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

3543: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3544: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));
3545: END IF;
3546: IF G_FW_STEAL_PEGGING_ID(i) is not null THEN
3547: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
3548: G_FW_STEAL_PEGGING_ID(i),
3549: null,
3550: l_plan_id,
3551: MSC_ATP_PVT.UNDO,

Line 3565: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

3561: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID ' || G_FW_CTP_PEGGING_ID(i));
3562: END IF;
3563:
3564: IF G_FW_CTP_PEGGING_ID(i) is not null THEN
3565: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
3566: G_FW_CTP_PEGGING_ID(i),
3567: null,
3568: l_plan_id,
3569: MSC_ATP_PVT.UNDO,

Line 3610: MSC_ATP_DB_UTILS.Restore_SD_Rec(l_ctp_parent_peg_id,l_return_status);

3606: END IF;
3607:
3608: IF l_ctp_parent_peg_id.count > 0 then
3609: --Restore the details from pegging, org is negative
3610: MSC_ATP_DB_UTILS.Restore_SD_Rec(l_ctp_parent_peg_id,l_return_status);
3611: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3612: IF PG_DEBUG in ('Y', 'C') THEN
3613: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Restore_SD_Rec');
3614: END IF;

Line 3625: MSC_ATP_DB_UTILS.Restore_SD_Rec(l_steal_atp_peg_id,l_return_status);

3621: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP :' || MSC_ATP_PVT.G_INV_CTP);
3622: END IF;
3623:
3624: IF l_steal_atp_peg_id.count > 0 AND MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
3625: MSC_ATP_DB_UTILS.Restore_SD_Rec(l_steal_atp_peg_id,l_return_status);
3626: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3627: IF PG_DEBUG in ('Y', 'C') THEN
3628: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Restore_SD_Rec');
3629: END IF;

Line 4229: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

4225: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4226: IF PG_DEBUG in ('Y', 'C') THEN
4227: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4228: END IF;
4229: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4230: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4231: p_instance_id,
4232: l_plan_id,
4233: UNDO,

Line 4281: MSC_ATP_DB_UTILS.Update_SD_Date(l_atp_rec.demand_source_line ,

4277: l_atp_insert_rec.inventory_item_id := l_pf_dest_id;
4278: l_atp_insert_rec.request_item_id := l_mem_dest_id;
4279: l_atp_insert_rec.origination_type := 30;
4280:
4281: MSC_ATP_DB_UTILS.Update_SD_Date(l_atp_rec.demand_source_line ,
4282: p_instance_id,
4283: l_sd_date,
4284: l_plan_id,
4285: l_sd_qty,

Line 4397: MSC_ATP_DB_UTILS.Flush_Data_In_Pds(l_ship_arrival_date_rec, l_return_status);

4393: l_ship_arrival_date_rec.order_date_type := 1;
4394: END IF;
4395: IF l_ship_arrival_date_rec.demand_id is not null THEN
4396: IF (G_INV_CTP = 4)THEN
4397: MSC_ATP_DB_UTILS.Flush_Data_In_Pds(l_ship_arrival_date_rec, l_return_status);
4398: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4399: IF PG_DEBUG in ('Y', 'C') THEN
4400: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
4401: END IF;

Line 4404: MSC_ATP_DB_UTILS.Flush_Data_In_Ods(l_ship_arrival_date_rec, l_return_status);

4400: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
4401: END IF;
4402: END IF;
4403: ELSE
4404: MSC_ATP_DB_UTILS.Flush_Data_In_Ods(l_ship_arrival_date_rec, l_return_status);
4405: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4406: IF PG_DEBUG in ('Y', 'C') THEN
4407: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Ods procedure ');
4408: END IF;

Line 4524: MSC_ATP_DB_UTILS.Update_SD_Date(l_atp_rec.demand_source_line ,

4520: l_atp_insert_rec.inventory_item_id := l_pf_dest_id;
4521: l_atp_insert_rec.request_item_id := l_mem_dest_id;
4522: l_atp_insert_rec.origination_type := 30;
4523:
4524: MSC_ATP_DB_UTILS.Update_SD_Date(l_atp_rec.demand_source_line ,
4525: p_instance_id,
4526: l_atp_rec.ship_date,
4527: --s_cto_rearch do not honor atp_lead time
4528: /*

Line 4600: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

4596: END IF;
4597:
4598: IF j > 1 THEN
4599: FOR l_peg_count in k..l_fst_src_pegging_ids.count loop
4600: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4601: l_fst_src_pegging_ids(l_peg_count),
4602: null,
4603: l_plan_id,
4604: UNDO,

Line 4716: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

4712: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4713: IF PG_DEBUG in ('Y', 'C') THEN
4714: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4715: END IF;
4716: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4717: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4718: p_instance_id,
4719: l_plan_id,
4720: UNDO,

Line 4782: MSC_ATP_DB_UTILS.Update_SD_Date(p_atp_table.Identifier(m),

4778: ELSE
4779: l_order_date_type := 1;
4780: END IF;
4781:
4782: MSC_ATP_DB_UTILS.Update_SD_Date(p_atp_table.Identifier(m),
4783: p_instance_id, l_group_date, l_temp_plan_id,null,
4784: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(i),
4785: MSC_ATP_PVT.G_REQ_ATP_DATE(i),
4786: MSC_ATP_PVT.G_REQ_DATE_QTY(i), -- Bug 1501787

Line 4820: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

4816: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4817: IF PG_DEBUG in ('Y', 'C') THEN
4818: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4819: END IF;
4820: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4821: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4822: p_instance_id,
4823: l_plan_id,
4824: UNDO,

Line 4871: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

4867: (l_arrival_count > 1 AND k = l_arrival_count) OR
4868: (l_ship_count > 1 AND i = l_ship_count) ) THEN
4869:
4870: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4871: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4872: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4873: p_instance_id,
4874: l_plan_id,
4875: UNDO,

Line 4905: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

4901: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4902: IF PG_DEBUG in ('Y', 'C') THEN
4903: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4904: END IF;
4905: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4906: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4907: p_instance_id,
4908: l_plan_id,
4909: UNDO,

Line 5434: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

5430: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
5431: IF PG_DEBUG in ('Y', 'C') THEN
5432: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
5433: END IF;
5434: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
5435: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
5436: p_instance_id,
5437: l_plan_id,
5438: UNDO,

Line 5515: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

5511: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5512: END IF;
5513:
5514: -- rajjain single call to Undo_Delete_Row procedure --3720018
5515: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,
5516: l_delete_atp_rec.del_plan_ids,
5517: p_instance_id,
5518: --subst
5519: l_delete_atp_rec.del_demand_ids,

Line 5932: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(MSC_ATP_PVT.G_PEGGING_FOR_SET(i), p_instance_id,

5928: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
5929: IF PG_DEBUG in ('Y', 'C') THEN
5930: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop, i:='||i);
5931: END IF;
5932: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(MSC_ATP_PVT.G_PEGGING_FOR_SET(i), p_instance_id,
5933: l_plan_id, UNDO, MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(i),l_return_status);
5934: END LOOP;
5935:
5936: -- 2902265

Line 5974: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

5970: END IF;
5971:
5972: -- rajjain single call to Undo_Delete_Row procedure
5973: --3720018,changes to refer all the records from l_delete_atp_rec
5974: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,
5975: l_delete_atp_rec.del_plan_ids,
5976: p_instance_id,
5977: --subst
5978: l_delete_atp_rec.del_demand_ids,

Line 6085: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,

6081: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
6082: IF PG_DEBUG in ('Y', 'C') THEN
6083: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');
6084: END IF;
6085: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,
6086: l_plan_id, UNDO, 1,l_return_status);
6087: END IF;
6088:
6089: END LOOP;

Line 6116: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

6112: msc_sch_wb.atp_debug('Schedule: ' || 'single call to Undo_Delete_Row');
6113: END IF;
6114: -- rajjain single call to Undo_Delete_Row procedure
6115: --3720018,changes to refer all the records from l_delete_atp_rec
6116: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,
6117: l_delete_atp_rec.del_plan_ids,
6118: p_instance_id,
6119: --subst
6120: l_delete_atp_rec.del_demand_ids,

Line 6238: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,

6234: IF (NVL(l_tmp_pegging_id, -1) <> -1) THEN
6235: IF PG_DEBUG in ('Y', 'C') THEN
6236: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');
6237: END IF;
6238: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,
6239: l_plan_id, UNDO, 1,l_return_status);
6240: END IF;
6241: END LOOP;
6242:

Line 6267: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

6263: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6264: END IF;
6265: -- rajjain single call to Undo_Delete_Row procedure
6266: --3720018,changes to refer all the records from l_delete_atp_rec
6267: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,
6268: l_delete_atp_rec.del_plan_ids,
6269: p_instance_id,
6270: --subst
6271: l_delete_atp_rec.del_demand_ids,

Line 6394: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,

6390: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
6391: IF PG_DEBUG in ('Y', 'C') THEN
6392: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');
6393: END IF;
6394: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,
6395: l_plan_id, UNDO, 1,l_return_status);
6396: END IF;
6397: END LOOP;
6398: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 6421: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

6417: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6418: END IF;
6419: -- rajjain single call to Undo_Delete_Row procedure
6420: --3720018,changes to refer all the records from l_delete_atp_rec
6421: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,
6422: l_delete_atp_rec.del_plan_ids,
6423: p_instance_id,
6424: --subst
6425: l_delete_atp_rec.del_demand_ids,

Line 6568: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,

6564: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
6565: IF PG_DEBUG in ('Y', 'C') THEN
6566: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');
6567: END IF;
6568: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,
6569: l_plan_id, UNDO, 1,l_return_status);
6570: END IF;
6571: END LOOP;
6572: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 6595: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

6591: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6592: END IF;
6593: -- rajjain single call to Undo_Delete_Row procedure
6594: --3720018,changes to refer all the records from l_delete_atp_rec
6595: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,
6596: l_delete_atp_rec.del_plan_ids,
6597: p_instance_id,
6598: --subst
6599: l_delete_atp_rec.del_demand_ids,

Line 6893: l_supply_rec MSC_ATP_DB_UTILS.supply_rec_typ;

6889: l_order_line_id NUMBER := NULL;
6890: l_location_id NUMBER := NULL;
6891:
6892: -- ATP4drp Declare a variable for creating Planned Arrival.
6893: l_supply_rec MSC_ATP_DB_UTILS.supply_rec_typ;
6894: -- End ATP4drp
6895:
6896: --bug 4394904
6897: l_infinite_time_fence DATE;

Line 7688: MSC_ATP_DB_UTILS.Add_Mat_Demand(l_atp_insert_rec,

7684:
7685: l_atp_insert_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
7686: l_atp_insert_rec.delivery_lead_time := l_delivery_lead_time;
7687:
7688: MSC_ATP_DB_UTILS.Add_Mat_Demand(l_atp_insert_rec,
7689: p_plan_id,
7690: l_demand_class_flag,
7691: l_demand_id);
7692: IF PG_DEBUG in ('Y', 'C') THEN

Line 7890: MSC_ATP_DB_UTILS.Add_Mat_Demand(l_atp_insert_rec,

7886: END IF;
7887: l_atp_insert_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
7888: l_atp_insert_rec.delivery_lead_time := l_delivery_lead_time;
7889:
7890: MSC_ATP_DB_UTILS.Add_Mat_Demand(l_atp_insert_rec,
7891: p_plan_id,
7892: l_demand_class_flag,
7893: l_demand_id);
7894:

Line 7985: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);

7981: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
7982: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
7983: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
7984:
7985: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);
7986:
7987: END IF;
7988: END IF;
7989: IF PG_DEBUG in ('Y', 'C') THEN

Line 8653: MSC_ATP_DB_UTILS.Add_Mat_Demand(l_atp_insert_rec,

8649: AND NVL(p_atp_record.parent_item_id, p_atp_record.inventory_item_id)
8650: = p_atp_record.inventory_item_id
8651: AND NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN --5067205
8652:
8653: MSC_ATP_DB_UTILS.Add_Mat_Demand(l_atp_insert_rec,
8654: p_plan_id,
8655: l_demand_class_flag,
8656: l_demand_id);
8657: END IF;

Line 8774: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);

8770: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
8771: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
8772: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
8773:
8774: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);
8775:
8776: IF p_search = 1 AND p_parent_pegging_id is null THEN
8777: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := l_pegging_id;
8778: END IF;

Line 9027: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_atp_pegging_id);

9023: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
9024: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
9025: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
9026:
9027: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_atp_pegging_id);
9028:
9029: -- Add pegging_id to the l_atp_period and l_atp_supply_demand
9030: --optional_fw store the the supply line pegging id for forward pass
9031: IF (MSC_ATP_PVT.G_OPTIONAL_FW is not null and p_parent_pegging_id is null) THEN

Line 9051: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_atp_pegging_id,

9047: l_atp_supply_demand.End_Pegging_Id(i) := MSC_ATP_PVT.G_DEMAND_PEGGING_ID;
9048: END LOOP;
9049: */
9050: IF p_atp_record.insert_flag <> 0 THEN
9051: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_atp_pegging_id,
9052: MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
9053: END IF;
9054:
9055:

Line 9185: MSC_ATP_DB_UTILS.delete_pegging( l_atp_pegging_id);

9181: END IF;
9182: IF ( ( MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND p_atp_record.scaling_type = 2) OR
9183: (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND p_atp_record.scaling_type IN (0,2))) AND l_net_demand = 0 then
9184: -- Delete the supply pegging of the main component, if substitute can satisfy the lot-size.
9185: MSC_ATP_DB_UTILS.delete_pegging( l_atp_pegging_id);
9186: END IF;
9187:
9188: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP =1 THEN
9189: IF ((p_search = 1) and (l_atp_comp_flag = 'N') and

Line 9225: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id,

9221: IF PG_DEBUG in ('Y', 'C') THEN
9222: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update POD for Primary Component');
9223: END IF;
9224: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP,2) <> 1 THEN
9225: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id,
9226: null,
9227: p_atp_record.quantity_ordered-
9228: l_sub_requested_date_quantity );
9229: END IF;

Line 10100: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,

10096: IF SQL%NOTFOUND THEN
10097: IF PG_DEBUG in ('Y', 'C') THEN
10098: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert demand on new date');
10099: END IF;
10100: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
10101: p_atp_record.instance_id,
10102: p_atp_record.organization_id,
10103: l_inventory_item_id,
10104: l_atp_date_this_level,

Line 10232: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_atp_pegging_id);

10228: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
10229: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
10230: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
10231:
10232: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_atp_pegging_id);
10233: END IF;
10234:
10235: -- 1250141: we need to populate the details
10236: -- 1300692: we only populate the details for

Line 10281: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_atp_pegging_id,

10277: MSC_ATP_PVT.G_DEMAND_PEGGING_ID;
10278: END LOOP;
10279:
10280: IF p_atp_record.insert_flag <> 0 THEN
10281: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_atp_pegging_id,
10282: MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
10283: END IF;
10284:
10285: MSC_ATP_PROC.Details_Output(l_atp_period,

Line 10647: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_future_pegging_id);

10643: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
10644: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
10645: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
10646:
10647: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_future_pegging_id);
10648:
10649: -- bug 1225478
10650: FOR i in 1..l_future_atp_period.Level.COUNT LOOP
10651: l_future_atp_period.Pegging_Id(i) := l_future_pegging_id;

Line 10663: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_future_pegging_id,

10659: l_future_atp_supply_demand.End_Pegging_Id(i) := MSC_ATP_PVT.G_DEMAND_PEGGING_ID;
10660: END LOOP;
10661: */
10662: IF p_atp_record.insert_flag <> 0 THEN
10663: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_future_pegging_id,
10664: MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
10665: END IF;
10666:
10667: END IF; --IF (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1) THEN

Line 12573: MSC_ATP_DB_UTILS.ADD_Supplies(l_supply_rec);

12569: l_supply_rec.record_source := 2; -- ATP created
12570: l_supply_rec.supply_type := 51; --- planned arrival
12571: l_supply_rec.intransit_lead_time := l_atp_rec.delivery_lead_time; --4127630
12572:
12573: MSC_ATP_DB_UTILS.ADD_Supplies(l_supply_rec);
12574: -- Asssign the output to local variables.
12575: l_transaction_id := l_supply_rec.transaction_id;
12576: l_return_status := l_supply_rec.return_status;
12577: IF PG_DEBUG in ('Y', 'C') THEN

Line 12585: MSC_ATP_DB_UTILS.Add_Planned_Order(

12581: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);
12582: END IF;
12583: ELSE -- Create Planned Order otherwise.
12584:
12585: MSC_ATP_DB_UTILS.Add_Planned_Order(
12586: p_atp_record.instance_id,
12587: p_plan_id,
12588: PF_ITEM_INFO_REC.dest_inv_item_id,
12589: p_atp_record.organization_id,

Line 12849: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);

12845: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
12846: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
12847: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
12848:
12849: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);
12850: -- END IF;
12851: --optional_fw Buy/Transfer PO should be set for top level
12852: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
12853: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '

Line 13343: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

13339: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
13340: END IF;
13341: END IF;
13342:
13343: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
13344: p_plan_id,
13345: p_atp_record.ship_date,
13346: 0,
13347: l_atp_rec.supplier_id,

Line 13404: MSC_ATP_DB_UTILS.Remove_Invalid_Future_SD(l_atp_pegging_tab);

13400:
13401: -- Planned Pegging based AATP, l_atp_pegging_tab populated in
13402: -- MSC_AATP_REQ.Get_Forward_Material_Atp
13403:
13404: MSC_ATP_DB_UTILS.Remove_Invalid_Future_SD(l_atp_pegging_tab);
13405: l_atp_pegging_tab := MRP_ATP_PUB.Number_Arr(); --bug3581151
13406:
13407: ELSE -- IF l_atp_pegging_tab.COUNT > 0 THEN
13408: MSC_ATP_DB_UTILS.Update_Planned_Order(l_future_pegging_id,

Line 13408: MSC_ATP_DB_UTILS.Update_Planned_Order(l_future_pegging_id,

13404: MSC_ATP_DB_UTILS.Remove_Invalid_Future_SD(l_atp_pegging_tab);
13405: l_atp_pegging_tab := MRP_ATP_PUB.Number_Arr(); --bug3581151
13406:
13407: ELSE -- IF l_atp_pegging_tab.COUNT > 0 THEN
13408: MSC_ATP_DB_UTILS.Update_Planned_Order(l_future_pegging_id,
13409: p_plan_id,
13410: p_atp_record.ship_date,
13411: 0,
13412: l_atp_rec.supplier_id,

Line 13465: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

13461: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);
13462: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);
13463: END IF;
13464:
13465: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
13466: p_plan_id,
13467: --bug 2798667: The ATO components are sourced on l_ship_date
13468: --p_atp_record.ship_date,
13469: l_ship_date,

Line 13546: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

13542: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
13543: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
13544: END IF;
13545:
13546: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
13547: p_plan_id,
13548: null,
13549: -- dsting 2754446
13550: -- least(greatest(l_atp_rec.requested_date_quantity, 0),

Line 13578: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null,

13574: END IF;
13575: /* ELSE
13576:
13577: l_last_good_pegging_id := l_pegging_id;
13578: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null,
13579: least(greatest(l_atp_rec.requested_date_quantity, 0)));
13580: END IF;
13581: */
13582: --5230396, updating planned order for diag ATP too in Buy case.

Line 13589: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

13585: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
13586: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
13587: END IF;
13588:
13589: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
13590: p_plan_id,
13591: null,
13592: -- dsting 2754446
13593: -- least(greatest(l_atp_rec.requested_date_quantity, 0),

Line 14075: MSC_ATP_DB_UTILS.Add_Planned_Order(

14071: END IF;
14072: END IF;
14073: --s_cto_rearch
14074: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
14075: MSC_ATP_DB_UTILS.Add_Planned_Order(
14076: p_atp_record.instance_id,
14077: p_plan_id,
14078: PF_ITEM_INFO_REC.dest_inv_item_id,
14079: p_atp_record.organization_id,

Line 14245: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);

14241: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
14242: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
14243: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
14244:
14245: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);
14246:
14247: -- dsting diag_atp last good peggingfor make
14248: IF l_pegging_rec.constraint_type IS NULL THEN
14249: IF PG_DEBUG in ('Y', 'C') THEN

Line 14580: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null, l_avail_PO_qty); -- 2869830

14576: l_last_good_pegging_id := l_pegging_id;
14577: IF l_sources.source_type.next(j) IS NULL
14578: AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1
14579: THEN
14580: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null, l_avail_PO_qty); -- 2869830
14581: -- MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null, l_avail_assembly_qty);
14582: ELSE
14583: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
14584: p_plan_id,

Line 14581: -- MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null, l_avail_assembly_qty);

14577: IF l_sources.source_type.next(j) IS NULL
14578: AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1
14579: THEN
14580: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null, l_avail_PO_qty); -- 2869830
14581: -- MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null, l_avail_assembly_qty);
14582: ELSE
14583: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
14584: p_plan_id,
14585: null,

Line 14583: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

14579: THEN
14580: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null, l_avail_PO_qty); -- 2869830
14581: -- MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id, null, l_avail_assembly_qty);
14582: ELSE
14583: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
14584: p_plan_id,
14585: null,
14586: l_avail_PO_qty, -- 2869830
14587: --l_avail_assembly_qty,

Line 14632: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

14628: -- bug 1277418: now clean up the data.
14629: -- if l_avail_assembly_qty >0, we need to
14630: -- to keep the planned order.
14631:
14632: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
14633: l_pegging_id ,
14634: p_atp_record.instance_id,
14635: p_plan_id,
14636: INVALID,

Line 14646: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

14642: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
14643: END IF;
14644:
14645: -- update/delete the planned order record.
14646: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
14647: p_plan_id,
14648: null,
14649: l_avail_PO_qty,
14650: --l_avail_assembly_qty,

Line 14875: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

14871: x_atp_supply_demand,
14872: l_return_status);
14873: ELSE
14874:
14875: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
14876: p_plan_id,
14877: null,
14878: 0,
14879: null,

Line 14894: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

14890: END IF;
14891: ELSE
14892: -- bug 1277418: now clean up the data.
14893: -- we remove the whole planned order
14894: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
14895: p_plan_id,
14896: null,
14897: 0,
14898: null,

Line 15313: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

15309: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');
15310: END IF;
15311:
15312:
15313: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
15314: p_plan_id,
15315: p_atp_record.ship_date,
15316: 0,
15317: null,

Line 15351: MSC_ATP_DB_UTILS.Remove_Invalid_Future_SD(l_atp_pegging_tab);

15347:
15348: -- Planned Pegging based AATP, l_atp_pegging_tab populated in
15349: -- MSC_AATP_REQ.Get_Forward_Material_Atp
15350:
15351: MSC_ATP_DB_UTILS.Remove_Invalid_Future_SD(l_atp_pegging_tab);
15352: l_atp_pegging_tab := MRP_ATP_PUB.Number_Arr(); --bug3581151
15353:
15354: ELSE -- IF l_atp_pegging_tab.COUNT > 0 THEN
15355:

Line 15356: MSC_ATP_DB_UTILS.Update_Planned_Order(l_future_pegging_id,

15352: l_atp_pegging_tab := MRP_ATP_PUB.Number_Arr(); --bug3581151
15353:
15354: ELSE -- IF l_atp_pegging_tab.COUNT > 0 THEN
15355:
15356: MSC_ATP_DB_UTILS.Update_Planned_Order(l_future_pegging_id,
15357: p_plan_id,
15358: p_atp_record.ship_date,
15359: 0,
15360: null,

Line 15455: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

15451: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
15452: END IF;
15453: -- end bug 3755704
15454:
15455: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
15456: p_plan_id,
15457: --bug 2798667: this should be l_temp_date
15458: --p_atp_record.ship_date,
15459: l_temp_date,

Line 15549: MSC_ATP_DB_UTILS.Update_Pegging( l_substitutes_rec.pegging_id(l_index),

15545: END IF;
15546:
15547:
15548: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP,2) <> 1 THEN
15549: MSC_ATP_DB_UTILS.Update_Pegging( l_substitutes_rec.pegging_id(l_index),
15550: null,
15551: l_atp_ctp_qty );
15552: END IF;
15553:

Line 15575: MSC_ATP_DB_UTILS.Add_Mat_Demand(l_atp_insert_rec,

15571: l_atp_insert_rec.refresh_number := p_refresh_number;
15572: l_atp_insert_rec.order_number := p_atp_record.order_number;
15573: l_atp_insert_rec.origination_type := 1;
15574:
15575: MSC_ATP_DB_UTILS.Add_Mat_Demand(l_atp_insert_rec,
15576: -- l_plan_id, use p_plan_id in case of Make CTP.
15577: nvl(l_plan_id,p_plan_id), -- bug#10428207
15578: 0,
15579: l_demand_id);

Line 15594: MSC_ATP_DB_UTILS.Update_Pegging( l_substitutes_rec.pegging_id(l_index),

15590: AND record_type = 3;
15591:
15592: ELSE
15593: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP,2) <> 1 THEN
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

Line 15713: MSC_ATP_DB_UTILS.Update_Planned_Order(l_last_good_pegging_id,

15709: msc_sch_wb.atp_debug('trunc of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
15710: END IF;
15711: END IF;
15712:
15713: MSC_ATP_DB_UTILS.Update_Planned_Order(l_last_good_pegging_id,
15714: p_plan_id,
15715: null,
15716: l_net_demand + l_subst_existing_PO_qty,
15717: null,

Line 15948: MSC_ATP_DB_UTILS.Update_Pegging(l_parent_pegging_id,

15944: WHERE session_id = MSC_ATP_PVT.G_SESSION_ID
15945: AND pegging_id = l_parent_pegging_id
15946: AND record_type = 3;
15947:
15948: MSC_ATP_DB_UTILS.Update_Pegging(l_parent_pegging_id,
15949: null,
15950: (l_peg_qty - l_net_demand));
15951:
15952: IF PG_DEBUG in ('Y', 'C') THEN

Line 16234: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,

16230: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
16231: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);
16232: END IF;
16233: BEGIN
16234: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
16235: p_atp_record.instance_id,
16236: p_atp_record.organization_id,
16237: l_inventory_item_id,
16238: p_atp_record.ship_date,

Line 16624: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);

16620: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
16621: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
16622: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
16623:
16624: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);
16625:
16626: -- add pegging info for the supply
16627:
16628: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;

Line 16715: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);

16711: l_pegging_rec.component_yield_factor := p_atp_record.component_yield_factor; --4570421
16712: l_pegging_rec.usage := p_atp_record.usage_qty; --4775920
16713: l_pegging_rec.organization_type := p_atp_record.organization_type; --4775920
16714:
16715: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);
16716:
16717: ---- summary
16718: --- Create record into summary table for this supplier
16719: -- Code to update summary records removed for summary enhancement

Line 16921: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_pegging_id,

16917: msc_sch_wb.atp_debug('ATP_Check: ' || 'in get_res_requirements we are here 2');
16918: END IF;
16919:
16920: IF p_atp_record.insert_flag <> 0 THEN
16921: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_pegging_id,
16922: MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
16923: END IF;
16924:
16925: END IF;

Line 17301: MSC_ATP_DB_UTILS.call_delete_row (

17297:
17298: -- Call_delete_row will take care of calling delete_row for the whole request.
17299: -- The input to this procedure is p_atp_table.
17300: -- l_delete_atp_rec will contain array to be used to call undo_delete_row.
17301: MSC_ATP_DB_UTILS.call_delete_row (
17302: p_instance_id,
17303: p_atp_table,
17304: p_refresh_number,
17305: l_delete_atp_rec,

Line 18323: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_atp_output_table.end_pegging_id(k),

18319: l_atp_output_table.arrival_Date(k)))))) THEN
18320:
18321: l_atp_output_table.Error_Code(k) := ATP_ACCEPT_FAIL;
18322:
18323: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_atp_output_table.end_pegging_id(k),
18324: l_atp_output_table.instance_id(k),
18325: l_atp_output_table.plan_id(k),
18326: MSC_ATP_PVT.UNDO,
18327: 2,--p_dc_flag

Line 18453: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

18449: END IF;
18450: IF ( x_atp_table.Action(1) = ATPQUERY ) THEN
18451: IF ( MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST IS NOT NULL AND MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.Count > 0) THEN
18452: FOR m in 1..MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.COUNT LOOP
18453: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
18454: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST(m),
18455: p_instance_id,
18456: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PLAN_ID_REQUEST (m),
18457: UNDO,

Line 18487: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

18483: END IF;
18484:
18485: IF ( MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST IS NOT NULL AND MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.Count > 0) THEN
18486: FOR m in 1..MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.COUNT LOOP
18487: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
18488: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST(m) ,
18489: p_instance_id,
18490: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PLAN_ID_REQUEST(m),
18491: UNDO,

Line 18501: MSC_ATP_DB_UTILS.Undo_Delete_Row(

18497: ((NVL(p_atp_table.calling_module(1), -99) = -99) AND
18498: (l_global_availability = 'Y')) THEN --3720018
18499: IF (l_delete_atp_rec.del_demand_ids IS NOT NULL AND l_delete_atp_rec.del_demand_ids.Count > 0) OR
18500: (l_delete_atp_rec.del_ods_demand_ids IS NOT NULL AND l_delete_atp_rec.del_ods_demand_ids.Count > 0) THEN
18501: MSC_ATP_DB_UTILS.Undo_Delete_Row(
18502: l_delete_atp_rec.del_identifiers,
18503: l_delete_atp_rec.del_plan_ids,
18504: p_instance_id,
18505: l_delete_atp_rec.del_demand_ids,

Line 18560: MSC_ATP_DB_UTILS.Delete_Copy_Demand(MSC_ATP_PVT.G_COPY_DEMAND_ID,

18556: END IF;
18557:
18558: -- Summary enhancement - Delete the copy demands that were created in this transaction if refresh number has moved.
18559: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN --bug4291375 Delete_Copy_Demand should be called when summary is ON.
18560: MSC_ATP_DB_UTILS.Delete_Copy_Demand(MSC_ATP_PVT.G_COPY_DEMAND_ID,
18561: MSC_ATP_PVT.G_COPY_DEMAND_PLAN_ID,
18562: G_TIME_PHASED_SET,
18563: l_return_status);
18564: END IF;