DBA Data[Home] [Help]

APPS.MSC_ATP_PEG dependencies on MSC_SCH_WB

Line 4763: msc_sch_wb.atp_debug('***** Begin Add_Offset_Demands *****');

4759: l_sup_offset_type NUMBER;
4760: BEGIN
4761:
4762: IF PG_DEBUG in ('Y', 'C') THEN
4763: msc_sch_wb.atp_debug('***** Begin Add_Offset_Demands *****');
4764: END IF;
4765:
4766: IF PG_DEBUG in ('Y', 'C') THEN
4767: msc_sch_wb.atp_debug('Add_Offset_Demands: ' ||

Line 4767: msc_sch_wb.atp_debug('Add_Offset_Demands: ' ||

4763: msc_sch_wb.atp_debug('***** Begin Add_Offset_Demands *****');
4764: END IF;
4765:
4766: IF PG_DEBUG in ('Y', 'C') THEN
4767: msc_sch_wb.atp_debug('Add_Offset_Demands: ' ||
4768: 'Offsetting msc_demands for identifier = '
4769: || p_identifier ||' : plan id = '||p_plan_id);
4770: msc_sch_wb.atp_debug('Add_Offset_Demands: ' || 'Config Line Id = ' || p_config_line_id );
4771: END IF;

Line 4770: msc_sch_wb.atp_debug('Add_Offset_Demands: ' || 'Config Line Id = ' || p_config_line_id );

4766: IF PG_DEBUG in ('Y', 'C') THEN
4767: msc_sch_wb.atp_debug('Add_Offset_Demands: ' ||
4768: 'Offsetting msc_demands for identifier = '
4769: || p_identifier ||' : plan id = '||p_plan_id);
4770: msc_sch_wb.atp_debug('Add_Offset_Demands: ' || 'Config Line Id = ' || p_config_line_id );
4771: END IF;
4772:
4773: x_return_status := FND_API.G_RET_STS_SUCCESS;
4774:

Line 4795: msc_sch_wb.atp_debug('Add_Offset_Demands: Dmd. Offset Type Set to '|| l_offset_type);

4791: END IF;
4792: -- CTO_PF_PRJ_2 Impacts
4793:
4794: IF PG_DEBUG in ('Y', 'C') THEN
4795: msc_sch_wb.atp_debug('Add_Offset_Demands: Dmd. Offset Type Set to '|| l_offset_type);
4796: -- Bug 3717618 Set value of supply relief type.
4797: msc_sch_wb.atp_debug('Add_Offset_Demands: Sup. Offset Type Set to '|| l_sup_offset_type);
4798: END IF;
4799:

Line 4797: msc_sch_wb.atp_debug('Add_Offset_Demands: Sup. Offset Type Set to '|| l_sup_offset_type);

4793:
4794: IF PG_DEBUG in ('Y', 'C') THEN
4795: msc_sch_wb.atp_debug('Add_Offset_Demands: Dmd. Offset Type Set to '|| l_offset_type);
4796: -- Bug 3717618 Set value of supply relief type.
4797: msc_sch_wb.atp_debug('Add_Offset_Demands: Sup. Offset Type Set to '|| l_sup_offset_type);
4798: END IF;
4799:
4800: -- CTO_PF_PRJ_2 Impacts
4801: SELECT msc_demands_s.nextval ,

Line 4963: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||

4959: -- ,l_offset_demand_id(i)
4960: );
4961:
4962: IF PG_DEBUG in ('Y', 'C') THEN
4963: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||
4964: SQL%ROWCOUNT);
4965: END IF;
4966:
4967: -- Allocated ATP Based on Planning Details

Line 4975: msc_sch_wb.atp_debug('Add_Offset_Demands: before insert into'||

4971: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
4972: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
4973:
4974: IF PG_DEBUG in ('Y', 'C') THEN
4975: msc_sch_wb.atp_debug('Add_Offset_Demands: before insert into'||
4976: ' msc_alloc_demands');
4977: END IF;
4978:
4979: -- CTO_PF_PRJ2 relief_type already set above.

Line 5068: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));

5064: -- End Bug 3890723
5065: AND map.demand_id = l_offset_demand_id(i);
5066:
5067: FOR i in 1..x_demand_id.COUNT LOOP
5068: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5069: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5070: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5071: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5072: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));

Line 5069: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));

5065: AND map.demand_id = l_offset_demand_id(i);
5066:
5067: FOR i in 1..x_demand_id.COUNT LOOP
5068: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5069: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5070: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5071: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5072: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5073: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));

Line 5070: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));

5066:
5067: FOR i in 1..x_demand_id.COUNT LOOP
5068: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5069: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5070: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5071: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5072: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5073: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5074: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||

Line 5071: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));

5067: FOR i in 1..x_demand_id.COUNT LOOP
5068: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5069: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5070: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5071: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5072: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5073: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5074: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5075: 'For Demand id '|| l_offset_demand_id(i) ||

Line 5072: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));

5068: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5069: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5070: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5071: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5072: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5073: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5074: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5075: 'For Demand id '|| l_offset_demand_id(i) ||
5076: ' with offset/relief_type 5 or 7 is ' || SQL%BULK_ROWCOUNT(i));

Line 5073: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));

5069: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5070: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5071: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5072: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5073: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5074: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5075: 'For Demand id '|| l_offset_demand_id(i) ||
5076: ' with offset/relief_type 5 or 7 is ' || SQL%BULK_ROWCOUNT(i));
5077: END LOOP;

Line 5074: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||

5070: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5071: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5072: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5073: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5074: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5075: 'For Demand id '|| l_offset_demand_id(i) ||
5076: ' with offset/relief_type 5 or 7 is ' || SQL%BULK_ROWCOUNT(i));
5077: END LOOP;
5078: IF PG_DEBUG in ('Y', 'C') THEN

Line 5079: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family and Alloc rows inserted '||

5075: 'For Demand id '|| l_offset_demand_id(i) ||
5076: ' with offset/relief_type 5 or 7 is ' || SQL%BULK_ROWCOUNT(i));
5077: END LOOP;
5078: IF PG_DEBUG in ('Y', 'C') THEN
5079: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family and Alloc rows inserted '||
5080: 'with offset/relief_type = 7 or ' ||l_offset_type || 'is ' || SQL%ROWCOUNT);
5081: END IF;
5082:
5083: -- CTO_PF_PRJ_2

Line 5095: msc_sch_wb.atp_debug('Add_Offset_Demands: adjust stealing supplies');

5091: -- End Bug 3344102
5092: -- END CTO_PF_PRJ_2
5093:
5094: IF PG_DEBUG in ('Y', 'C') THEN
5095: msc_sch_wb.atp_debug('Add_Offset_Demands: adjust stealing supplies');
5096: msc_sch_wb.atp_debug(' Number of SO lines to be adjusted := ' || l_so_line_ids.count);
5097: For i in 1..l_so_line_ids.count LOOP
5098: msc_sch_wb.atp_debug('Line id # ' || i || ' := ' || l_so_line_ids(i));
5099: END LOOP;

Line 5096: msc_sch_wb.atp_debug(' Number of SO lines to be adjusted := ' || l_so_line_ids.count);

5092: -- END CTO_PF_PRJ_2
5093:
5094: IF PG_DEBUG in ('Y', 'C') THEN
5095: msc_sch_wb.atp_debug('Add_Offset_Demands: adjust stealing supplies');
5096: msc_sch_wb.atp_debug(' Number of SO lines to be adjusted := ' || l_so_line_ids.count);
5097: For i in 1..l_so_line_ids.count LOOP
5098: msc_sch_wb.atp_debug('Line id # ' || i || ' := ' || l_so_line_ids(i));
5099: END LOOP;
5100:

Line 5098: msc_sch_wb.atp_debug('Line id # ' || i || ' := ' || l_so_line_ids(i));

5094: IF PG_DEBUG in ('Y', 'C') THEN
5095: msc_sch_wb.atp_debug('Add_Offset_Demands: adjust stealing supplies');
5096: msc_sch_wb.atp_debug(' Number of SO lines to be adjusted := ' || l_so_line_ids.count);
5097: For i in 1..l_so_line_ids.count LOOP
5098: msc_sch_wb.atp_debug('Line id # ' || i || ' := ' || l_so_line_ids(i));
5099: END LOOP;
5100:
5101: END IF;
5102:

Line 5118: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of stealing rows updated '||

5114: -1) --CMRO;
5115: and order_type in (46, 47);
5116: END IF;
5117: IF PG_DEBUG in ('Y', 'C') THEN
5118: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of stealing rows updated '||
5119: SQL%ROWCOUNT);
5120: END IF;
5121:
5122: -- Offset Product Family Demands if any

Line 5204: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));

5200: AND map.demand_id = l_offset_demand_id(i);
5201:
5202: IF PG_DEBUG in ('Y', 'C') THEN
5203: FOR i in 1..x_demand_id.COUNT LOOP
5204: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5205: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5206: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5207: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5208: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));

Line 5205: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));

5201:
5202: IF PG_DEBUG in ('Y', 'C') THEN
5203: FOR i in 1..x_demand_id.COUNT LOOP
5204: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5205: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5206: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5207: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5208: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5209: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||

Line 5206: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));

5202: IF PG_DEBUG in ('Y', 'C') THEN
5203: FOR i in 1..x_demand_id.COUNT LOOP
5204: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5205: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5206: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5207: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5208: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5209: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5210: 'For Demand id '|| l_offset_demand_id(i) ||

Line 5207: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));

5203: FOR i in 1..x_demand_id.COUNT LOOP
5204: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5205: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5206: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5207: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5208: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5209: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5210: 'For Demand id '|| l_offset_demand_id(i) ||
5211: ' with offset/relief_type = 7 is ' || SQL%BULK_ROWCOUNT(i));

Line 5208: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));

5204: msc_sch_wb.atp_debug('Demand to be offset ' || l_offset_demand_id(i));
5205: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5206: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5207: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5208: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5209: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5210: 'For Demand id '|| l_offset_demand_id(i) ||
5211: ' with offset/relief_type = 7 is ' || SQL%BULK_ROWCOUNT(i));
5212: END LOOP;

Line 5209: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||

5205: msc_sch_wb.atp_debug('Original Item ' || l_original_item_id(i));
5206: msc_sch_wb.atp_debug('Original Date ' || l_original_demand_date(i));
5207: msc_sch_wb.atp_debug('Supply ID ' || l_supply_id(i));
5208: msc_sch_wb.atp_debug('New Demand ' || x_demand_id(i));
5209: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5210: 'For Demand id '|| l_offset_demand_id(i) ||
5211: ' with offset/relief_type = 7 is ' || SQL%BULK_ROWCOUNT(i));
5212: END LOOP;
5213: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||

Line 5213: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||

5209: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5210: 'For Demand id '|| l_offset_demand_id(i) ||
5211: ' with offset/relief_type = 7 is ' || SQL%BULK_ROWCOUNT(i));
5212: END LOOP;
5213: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of Family rows inserted '||
5214: 'with offset/relief_type = 7 is ' || SQL%ROWCOUNT);
5215: END IF;
5216: END IF; --IF ((MSC_ATP_PVT.G_INV_CTP = 4) AND basically, IF ALLOC
5217:

Line 5219: msc_sch_wb.atp_debug('***** End Add_Offset_Demands *****');

5215: END IF;
5216: END IF; --IF ((MSC_ATP_PVT.G_INV_CTP = 4) AND basically, IF ALLOC
5217:
5218: IF PG_DEBUG in ('Y', 'C') THEN
5219: msc_sch_wb.atp_debug('***** End Add_Offset_Demands *****');
5220: END IF;
5221:
5222: EXCEPTION
5223: WHEN OTHERS THEN

Line 5226: msc_sch_wb.atp_debug('Add_Offset_Demands: ' ||

5222: EXCEPTION
5223: WHEN OTHERS THEN
5224: my_sqlcode := SQLCODE;
5225: IF PG_DEBUG in ('Y', 'C') THEN
5226: msc_sch_wb.atp_debug('Add_Offset_Demands: ' ||
5227: 'error in insert row: sqlcode = '|| to_char(my_sqlcode));
5228: msc_sch_wb.atp_debug('Add_Offset_Demands: ERROR- ' || sqlerrm );
5229: END IF;
5230:

Line 5228: msc_sch_wb.atp_debug('Add_Offset_Demands: ERROR- ' || sqlerrm );

5224: my_sqlcode := SQLCODE;
5225: IF PG_DEBUG in ('Y', 'C') THEN
5226: msc_sch_wb.atp_debug('Add_Offset_Demands: ' ||
5227: 'error in insert row: sqlcode = '|| to_char(my_sqlcode));
5228: msc_sch_wb.atp_debug('Add_Offset_Demands: ERROR- ' || sqlerrm );
5229: END IF;
5230:
5231: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
5232: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Add_Offset_Demands');

Line 5293: msc_sch_wb.atp_debug('***** Begin Add_Offset_Supplies *****');

5289:
5290: BEGIN
5291:
5292: IF PG_DEBUG in ('Y', 'C') THEN
5293: msc_sch_wb.atp_debug('***** Begin Add_Offset_Supplies *****');
5294: END IF;
5295: IF PG_DEBUG in ('Y', 'C') THEN
5296: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||
5297: 'Offsetting msc_supplies for identifier = '

Line 5296: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||

5292: IF PG_DEBUG in ('Y', 'C') THEN
5293: msc_sch_wb.atp_debug('***** Begin Add_Offset_Supplies *****');
5294: END IF;
5295: IF PG_DEBUG in ('Y', 'C') THEN
5296: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||
5297: 'Offsetting msc_supplies for identifier = '
5298: || p_identifier ||' : plan id = '||p_plan_id);
5299: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' || 'Config Line Id = ' || p_config_line_id );
5300: END IF;

Line 5299: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' || 'Config Line Id = ' || p_config_line_id );

5295: IF PG_DEBUG in ('Y', 'C') THEN
5296: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||
5297: 'Offsetting msc_supplies for identifier = '
5298: || p_identifier ||' : plan id = '||p_plan_id);
5299: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' || 'Config Line Id = ' || p_config_line_id );
5300: END IF;
5301:
5302: x_return_status := FND_API.G_RET_STS_SUCCESS;
5303:

Line 5320: msc_sch_wb.atp_debug('Add_Offset_Supplies: Offset Type Set to '|| l_offset_type);

5316: END IF;
5317: -- End CTO_PF_PRJ_2 Changes
5318:
5319: IF PG_DEBUG in ('Y', 'C') THEN
5320: msc_sch_wb.atp_debug('Add_Offset_Supplies: Offset Type Set to '|| l_offset_type);
5321: END IF;
5322:
5323: -- Insert relief quantities as a Offsets in msc_supplies
5324:

Line 5514: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of rows inserted '||

5510: -- ,l_offset_supply_id
5511: );
5512:
5513: IF PG_DEBUG in ('Y', 'C') THEN
5514: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of rows inserted '||
5515: SQL%ROWCOUNT);
5516: END IF;
5517:
5518: -- Bug 3381464 Update offset_supply_id in msc_atp_pegging.

Line 5537: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of rows Updated '|| SQL%ROWCOUNT);

5533: AND map1.pegging_id = l_pegging_id(i)
5534: AND map1.supply_id = l_orig_supply_id(i);
5535:
5536: IF PG_DEBUG in ('Y', 'C') THEN
5537: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of rows Updated '|| SQL%ROWCOUNT);
5538: FOR i in 1..l_del_rows LOOP
5539: msc_sch_wb.atp_debug('Add_Offset_Supplies: Supply Id '|| l_orig_supply_id(i) ||
5540: ' Offset Supply Id ' || x_supply_id(i));
5541: END LOOP;

Line 5539: msc_sch_wb.atp_debug('Add_Offset_Supplies: Supply Id '|| l_orig_supply_id(i) ||

5535:
5536: IF PG_DEBUG in ('Y', 'C') THEN
5537: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of rows Updated '|| SQL%ROWCOUNT);
5538: FOR i in 1..l_del_rows LOOP
5539: msc_sch_wb.atp_debug('Add_Offset_Supplies: Supply Id '|| l_orig_supply_id(i) ||
5540: ' Offset Supply Id ' || x_supply_id(i));
5541: END LOOP;
5542: END IF;
5543: -- End Bug 3381464.

Line 5552: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||

5548: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
5549: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
5550:
5551: IF PG_DEBUG in ('Y', 'C') THEN
5552: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||
5553: ' before insert into' || ' msc_alloc_supplies');
5554: END IF;
5555:
5556: -- CTO_PF_PRJ_2 relief_type already set above.

Line 5616: msc_sch_wb.atp_debug('Supply to be offset ' || l_offset_supply_id(i));

5612: AND map.supply_id = l_offset_supply_id(i); -- Original Supply
5613:
5614: IF PG_DEBUG in ('Y', 'C') THEN
5615: FOR i in 1..x_supply_id.COUNT LOOP
5616: msc_sch_wb.atp_debug('Supply to be offset ' || l_offset_supply_id(i));
5617: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5618: msc_sch_wb.atp_debug('Relief Qty' || l_supply_qty(i));
5619: msc_sch_wb.atp_debug('New Supply ' || x_supply_id(i));
5620: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||

Line 5617: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));

5613:
5614: IF PG_DEBUG in ('Y', 'C') THEN
5615: FOR i in 1..x_supply_id.COUNT LOOP
5616: msc_sch_wb.atp_debug('Supply to be offset ' || l_offset_supply_id(i));
5617: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5618: msc_sch_wb.atp_debug('Relief Qty' || l_supply_qty(i));
5619: msc_sch_wb.atp_debug('New Supply ' || x_supply_id(i));
5620: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||
5621: 'For Supply id '|| l_offset_supply_id(i) ||

Line 5618: msc_sch_wb.atp_debug('Relief Qty' || l_supply_qty(i));

5614: IF PG_DEBUG in ('Y', 'C') THEN
5615: FOR i in 1..x_supply_id.COUNT LOOP
5616: msc_sch_wb.atp_debug('Supply to be offset ' || l_offset_supply_id(i));
5617: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5618: msc_sch_wb.atp_debug('Relief Qty' || l_supply_qty(i));
5619: msc_sch_wb.atp_debug('New Supply ' || x_supply_id(i));
5620: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||
5621: 'For Supply id '|| l_offset_supply_id(i) ||
5622: ' with offset/relief_type = 6 is ' || SQL%BULK_ROWCOUNT(i));

Line 5619: msc_sch_wb.atp_debug('New Supply ' || x_supply_id(i));

5615: FOR i in 1..x_supply_id.COUNT LOOP
5616: msc_sch_wb.atp_debug('Supply to be offset ' || l_offset_supply_id(i));
5617: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5618: msc_sch_wb.atp_debug('Relief Qty' || l_supply_qty(i));
5619: msc_sch_wb.atp_debug('New Supply ' || x_supply_id(i));
5620: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||
5621: 'For Supply id '|| l_offset_supply_id(i) ||
5622: ' with offset/relief_type = 6 is ' || SQL%BULK_ROWCOUNT(i));
5623: END LOOP;

Line 5620: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||

5616: msc_sch_wb.atp_debug('Supply to be offset ' || l_offset_supply_id(i));
5617: msc_sch_wb.atp_debug('Actual Item ' || x_inv_item_id(i));
5618: msc_sch_wb.atp_debug('Relief Qty' || l_supply_qty(i));
5619: msc_sch_wb.atp_debug('New Supply ' || x_supply_id(i));
5620: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||
5621: 'For Supply id '|| l_offset_supply_id(i) ||
5622: ' with offset/relief_type = 6 is ' || SQL%BULK_ROWCOUNT(i));
5623: END LOOP;
5624: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of Alloc rows inserted '||

Line 5624: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of Alloc rows inserted '||

5620: msc_sch_wb.atp_debug('Add_Offset_Demands: Number of rows inserted '||
5621: 'For Supply id '|| l_offset_supply_id(i) ||
5622: ' with offset/relief_type = 6 is ' || SQL%BULK_ROWCOUNT(i));
5623: END LOOP;
5624: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of Alloc rows inserted '||
5625: 'with offset/relief_type = ' ||l_offset_type || 'is ' || SQL%ROWCOUNT);
5626: END IF;
5627:
5628: -- CTO_PF_PRJ_2

Line 5643: msc_sch_wb.atp_debug('***** End Add_Offset_Supplies *****');

5639: END IF;
5640:
5641:
5642: IF PG_DEBUG in ('Y', 'C') THEN
5643: msc_sch_wb.atp_debug('***** End Add_Offset_Supplies *****');
5644: END IF;
5645:
5646: EXCEPTION
5647: WHEN OTHERS THEN

Line 5664: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of rows Updated '||

5660: AND map1.relief_type = decode(map1.offset_type, 1, 6, 2) -- PO
5661: AND map1.inventory_item_id = x_inv_item_id(i)
5662: AND map1.supply_id = l_orig_supply_id(i);
5663: IF PG_DEBUG in ('Y', 'C') THEN
5664: msc_sch_wb.atp_debug('Add_Offset_Supplies: Number of rows Updated '||
5665: SQL%ROWCOUNT);
5666: END IF;
5667:
5668: EXCEPTION

Line 5671: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||

5667:
5668: EXCEPTION
5669: WHEN OTHERS THEN
5670: IF PG_DEBUG in ('Y', 'C') THEN
5671: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||
5672: 'error in updating offset supplies = '|| sqlerrm );
5673: END IF;
5674: END;
5675: -- End Bug 3381464.

Line 5679: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||

5675: -- End Bug 3381464.
5676:
5677: my_sqlcode := SQLCODE;
5678: IF PG_DEBUG in ('Y', 'C') THEN
5679: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||
5680: 'error in insert row: sqlcode = '|| to_char(my_sqlcode));
5681: msc_sch_wb.atp_debug('Add_Offset_Supplies: ERROR- ' || sqlerrm );
5682: END IF;
5683:

Line 5681: msc_sch_wb.atp_debug('Add_Offset_Supplies: ERROR- ' || sqlerrm );

5677: my_sqlcode := SQLCODE;
5678: IF PG_DEBUG in ('Y', 'C') THEN
5679: msc_sch_wb.atp_debug('Add_Offset_Supplies: ' ||
5680: 'error in insert row: sqlcode = '|| to_char(my_sqlcode));
5681: msc_sch_wb.atp_debug('Add_Offset_Supplies: ERROR- ' || sqlerrm );
5682: END IF;
5683:
5684: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
5685: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Add_Offset_Supplies');

Line 5736: msc_sch_wb.atp_debug('***** Begin Add_Offset_Resource_Reqs *****');

5732: l_offset_type NUMBER;
5733: BEGIN
5734:
5735: IF PG_DEBUG in ('Y', 'C') THEN
5736: msc_sch_wb.atp_debug('***** Begin Add_Offset_Resource_Reqs *****');
5737: END IF;
5738: IF PG_DEBUG in ('Y', 'C') THEN
5739: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||
5740: 'Offsetting msc_resource_requirements for identifier = '

Line 5739: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||

5735: IF PG_DEBUG in ('Y', 'C') THEN
5736: msc_sch_wb.atp_debug('***** Begin Add_Offset_Resource_Reqs *****');
5737: END IF;
5738: IF PG_DEBUG in ('Y', 'C') THEN
5739: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||
5740: 'Offsetting msc_resource_requirements for identifier = '
5741: || p_identifier ||' : plan id = '||p_plan_id);
5742: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: Config Line Id = ' || p_config_line_id );
5743: END IF ;

Line 5742: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: Config Line Id = ' || p_config_line_id );

5738: IF PG_DEBUG in ('Y', 'C') THEN
5739: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||
5740: 'Offsetting msc_resource_requirements for identifier = '
5741: || p_identifier ||' : plan id = '||p_plan_id);
5742: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: Config Line Id = ' || p_config_line_id );
5743: END IF ;
5744:
5745: x_return_status := FND_API.G_RET_STS_SUCCESS;
5746:

Line 5878: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||

5874:
5875: l_del_rows := x_res_transactions.COUNT;
5876:
5877: IF PG_DEBUG in ('Y', 'C') THEN
5878: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||
5879: 'Total Rows to add = ' || l_del_rows );
5880: END IF;
5881: FORALL i in 1..l_del_rows
5882: INSERT into msc_resource_requirements

Line 5937: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: Number of rows inserted '||

5933: l_sysdate,
5934: l_user_id ) ;
5935:
5936: IF PG_DEBUG in ('Y', 'C') THEN
5937: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: Number of rows inserted '||
5938: SQL%ROWCOUNT);
5939: END IF;
5940:
5941:

Line 5943: msc_sch_wb.atp_debug('***** End Add_Offset_Resource_Reqs *****');

5939: END IF;
5940:
5941:
5942: IF PG_DEBUG in ('Y', 'C') THEN
5943: msc_sch_wb.atp_debug('***** End Add_Offset_Resource_Reqs *****');
5944: END IF;
5945: EXCEPTION
5946: WHEN OTHERS THEN
5947: my_sqlcode := SQLCODE;

Line 5949: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||

5945: EXCEPTION
5946: WHEN OTHERS THEN
5947: my_sqlcode := SQLCODE;
5948: IF PG_DEBUG in ('Y', 'C') THEN
5949: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||
5950: 'error in processing: sqlcode = '|| to_char(my_sqlcode));
5951: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||
5952: 'error in processing: errmsg = '|| sqlerrm );
5953: END IF;

Line 5951: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||

5947: my_sqlcode := SQLCODE;
5948: IF PG_DEBUG in ('Y', 'C') THEN
5949: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||
5950: 'error in processing: sqlcode = '|| to_char(my_sqlcode));
5951: msc_sch_wb.atp_debug('Add_Offset_Resource_Reqs: ' ||
5952: 'error in processing: errmsg = '|| sqlerrm );
5953: END IF;
5954:
5955: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 5991: msc_sch_wb.atp_debug('**********Begin Add_Offset_Data Procedure************');

5987: l_supply_instance_id MRP_ATP_PUB.Number_Arr := MRP_ATP_PUB.Number_Arr();
5988: BEGIN
5989:
5990: IF PG_DEBUG in ('Y', 'C') THEN
5991: msc_sch_wb.atp_debug('**********Begin Add_Offset_Data Procedure************');
5992: msc_sch_wb.atp_debug('Add_Offset_Data p_identifier :' || p_identifier);
5993: msc_sch_wb.atp_debug('Add_Offset_Data p_config_line_id :' || p_config_line_id);
5994: msc_sch_wb.atp_debug('Add_Offset_Data p_plan_id :' || p_plan_id);
5995: msc_sch_wb.atp_debug('Add_Offset_Data p_refresh_number :' || p_refresh_number);

Line 5992: msc_sch_wb.atp_debug('Add_Offset_Data p_identifier :' || p_identifier);

5988: BEGIN
5989:
5990: IF PG_DEBUG in ('Y', 'C') THEN
5991: msc_sch_wb.atp_debug('**********Begin Add_Offset_Data Procedure************');
5992: msc_sch_wb.atp_debug('Add_Offset_Data p_identifier :' || p_identifier);
5993: msc_sch_wb.atp_debug('Add_Offset_Data p_config_line_id :' || p_config_line_id);
5994: msc_sch_wb.atp_debug('Add_Offset_Data p_plan_id :' || p_plan_id);
5995: msc_sch_wb.atp_debug('Add_Offset_Data p_refresh_number :' || p_refresh_number);
5996: msc_sch_wb.atp_debug('Add_Offset_Data p_order_number :' || p_order_number);

Line 5993: msc_sch_wb.atp_debug('Add_Offset_Data p_config_line_id :' || p_config_line_id);

5989:
5990: IF PG_DEBUG in ('Y', 'C') THEN
5991: msc_sch_wb.atp_debug('**********Begin Add_Offset_Data Procedure************');
5992: msc_sch_wb.atp_debug('Add_Offset_Data p_identifier :' || p_identifier);
5993: msc_sch_wb.atp_debug('Add_Offset_Data p_config_line_id :' || p_config_line_id);
5994: msc_sch_wb.atp_debug('Add_Offset_Data p_plan_id :' || p_plan_id);
5995: msc_sch_wb.atp_debug('Add_Offset_Data p_refresh_number :' || p_refresh_number);
5996: msc_sch_wb.atp_debug('Add_Offset_Data p_order_number :' || p_order_number);
5997: END IF;

Line 5994: msc_sch_wb.atp_debug('Add_Offset_Data p_plan_id :' || p_plan_id);

5990: IF PG_DEBUG in ('Y', 'C') THEN
5991: msc_sch_wb.atp_debug('**********Begin Add_Offset_Data Procedure************');
5992: msc_sch_wb.atp_debug('Add_Offset_Data p_identifier :' || p_identifier);
5993: msc_sch_wb.atp_debug('Add_Offset_Data p_config_line_id :' || p_config_line_id);
5994: msc_sch_wb.atp_debug('Add_Offset_Data p_plan_id :' || p_plan_id);
5995: msc_sch_wb.atp_debug('Add_Offset_Data p_refresh_number :' || p_refresh_number);
5996: msc_sch_wb.atp_debug('Add_Offset_Data p_order_number :' || p_order_number);
5997: END IF;
5998:

Line 5995: msc_sch_wb.atp_debug('Add_Offset_Data p_refresh_number :' || p_refresh_number);

5991: msc_sch_wb.atp_debug('**********Begin Add_Offset_Data Procedure************');
5992: msc_sch_wb.atp_debug('Add_Offset_Data p_identifier :' || p_identifier);
5993: msc_sch_wb.atp_debug('Add_Offset_Data p_config_line_id :' || p_config_line_id);
5994: msc_sch_wb.atp_debug('Add_Offset_Data p_plan_id :' || p_plan_id);
5995: msc_sch_wb.atp_debug('Add_Offset_Data p_refresh_number :' || p_refresh_number);
5996: msc_sch_wb.atp_debug('Add_Offset_Data p_order_number :' || p_order_number);
5997: END IF;
5998:
5999: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 5996: msc_sch_wb.atp_debug('Add_Offset_Data p_order_number :' || p_order_number);

5992: msc_sch_wb.atp_debug('Add_Offset_Data p_identifier :' || p_identifier);
5993: msc_sch_wb.atp_debug('Add_Offset_Data p_config_line_id :' || p_config_line_id);
5994: msc_sch_wb.atp_debug('Add_Offset_Data p_plan_id :' || p_plan_id);
5995: msc_sch_wb.atp_debug('Add_Offset_Data p_refresh_number :' || p_refresh_number);
5996: msc_sch_wb.atp_debug('Add_Offset_Data p_order_number :' || p_order_number);
5997: END IF;
5998:
5999: x_return_status := FND_API.G_RET_STS_SUCCESS;
6000:

Line 6010: msc_sch_wb.atp_debug('Status After Call to Add_Offset_Supplies :' || x_return_status);

6006: p_refresh_number, p_order_number,p_demand_source_type,--cmro
6007: l_inv_supply_items, x_supply_id, x_supply_instance_id, x_return_status); --Bug 3629191
6008:
6009: IF PG_DEBUG in ('Y', 'C') THEN
6010: msc_sch_wb.atp_debug('Status After Call to Add_Offset_Supplies :' || x_return_status);
6011: END IF;
6012:
6013: -- and then call Offset Demands
6014: -- so that only those demands tied to offset supplies are relieved.

Line 6020: msc_sch_wb.atp_debug('Status After Call to Add_Offset_Demands :' || x_return_status);

6016: p_refresh_number, p_order_number,p_demand_source_type,--cmro
6017: l_inv_demand_items, x_demand_id, x_demand_instance_id, x_return_status); --Bug 3629191
6018:
6019: IF PG_DEBUG in ('Y', 'C') THEN
6020: msc_sch_wb.atp_debug('Status After Call to Add_Offset_Demands :' || x_return_status);
6021: END IF;
6022: -- End Bug 3717618 Flip the order of calls ...
6023:
6024: FOR j in 1..l_inv_supply_items.COUNT LOOP

Line 6048: msc_sch_wb.atp_debug('Status After Call to Add_Offset_Resource_Reqs :'

6044: p_refresh_number, p_order_number,p_demand_source_type,--cmro
6045: l_inv_supply_items, x_res_transactions, x_res_instance_id, x_return_status); --Bug 3629191
6046:
6047: IF PG_DEBUG in ('Y', 'C') THEN
6048: msc_sch_wb.atp_debug('Status After Call to Add_Offset_Resource_Reqs :'
6049: || x_return_status);
6050: END IF;
6051:
6052:

Line 6057: msc_sch_wb.atp_debug('**********End Add_Offset_Data Procedure************');

6053: -- Finally assign to output list
6054: x_inv_item_id := l_inv_demand_items;
6055:
6056: IF PG_DEBUG in ('Y', 'C') THEN
6057: msc_sch_wb.atp_debug('**********End Add_Offset_Data Procedure************');
6058: END IF;
6059:
6060: EXCEPTION
6061: WHEN OTHERS THEN

Line 6067: msc_sch_wb.atp_debug('Add_Offset_Data: ERROR' || sqlerrm );

6063: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Add_Offset_Data');
6064: END IF;
6065:
6066: IF PG_DEBUG in ('Y', 'C') THEN
6067: msc_sch_wb.atp_debug('Add_Offset_Data: ERROR' || sqlerrm );
6068: END IF;
6069: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6070: -- Bug 3319810 Enable exception generation.
6071: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 6094: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Demands Procedure************');

6090: -- End CTO_PF_PRJ_2 Impacts
6091:
6092: BEGIN
6093: IF PG_DEBUG in ('Y', 'C') THEN
6094: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Demands Procedure************');
6095: END IF;
6096: IF PG_DEBUG in ('Y', 'C') THEN
6097: FOR i in 1..p_del_demand_ids.COUNT LOOP
6098: msc_sch_wb.atp_debug('Remove_Offset_Demands: ' ||

Line 6098: msc_sch_wb.atp_debug('Remove_Offset_Demands: ' ||

6094: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Demands Procedure************');
6095: END IF;
6096: IF PG_DEBUG in ('Y', 'C') THEN
6097: FOR i in 1..p_del_demand_ids.COUNT LOOP
6098: msc_sch_wb.atp_debug('Remove_Offset_Demands: ' ||
6099: 'p_del_demand_ids('||i||') = '|| p_del_demand_ids(i)||
6100: --'p_inv_item_ids('||i||') = '|| p_inv_item_ids(i)||
6101: 'p_atp_peg_demands_plan_ids('||i||') = '|| p_atp_peg_demands_plan_ids(i)
6102: --'p_plan_ids('||i||') = '|| p_plan_ids(i)||

Line 6150: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||

6146:
6147: -- Count how many rows were updated for each demand id
6148: IF PG_DEBUG in ('Y', 'C') THEN
6149: FOR m IN 1..p_del_demand_ids.COUNT LOOP
6150: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||
6151: SQL%BULK_ROWCOUNT(m)||' records');
6152: END LOOP;
6153: END IF;
6154:

Line 6161: msc_sch_wb.atp_debug('Remove_Offset_Demands: before delete from ' ||

6157: -- with the introduction of CTO_PF_PRJ_2 impacts.
6158: -- Relief_Type 7 can get created irrespective of allocation profiles.
6159:
6160: IF PG_DEBUG in ('Y', 'C') THEN
6161: msc_sch_wb.atp_debug('Remove_Offset_Demands: before delete from ' ||
6162: ' msc_alloc_demands');
6163: END IF;
6164:
6165: --Bug 3629191

Line 6194: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||

6190:
6191: -- Count how many rows were updated for each demand id
6192: IF PG_DEBUG in ('Y', 'C') THEN
6193: FOR m IN 1..p_del_demand_ids.COUNT LOOP
6194: msc_sch_wb.atp_debug('For Demand id '|| p_del_demand_ids(m)||': updated '||
6195: SQL%BULK_ROWCOUNT(m)||' records');
6196: END LOOP;
6197: END IF;
6198:

Line 6200: msc_sch_wb.atp_debug('**********End Remove_Offset_Demands Procedure************');

6196: END LOOP;
6197: END IF;
6198:
6199: IF PG_DEBUG in ('Y', 'C') THEN
6200: msc_sch_wb.atp_debug('**********End Remove_Offset_Demands Procedure************');
6201: END IF;
6202:
6203: EXCEPTION
6204: WHEN OTHERS THEN

Line 6210: msc_sch_wb.atp_debug('Remove_Offset_Demands: ERROR' || sqlerrm );

6206: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Remove_Offset_Demands');
6207: END IF;
6208:
6209: IF PG_DEBUG in ('Y', 'C') THEN
6210: msc_sch_wb.atp_debug('Remove_Offset_Demands: ERROR' || sqlerrm );
6211: END IF;
6212: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6213: -- Bug 3319810 Enable exception generation.
6214: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 6238: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Supplies Procedure************');

6234: -- End CTO_PF_PRJ_2 Impacts
6235:
6236: BEGIN
6237: IF PG_DEBUG in ('Y', 'C') THEN
6238: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Supplies Procedure************');
6239: END IF;
6240: IF PG_DEBUG in ('Y', 'C') THEN
6241: FOR i in 1..p_del_supply_ids.COUNT LOOP
6242: msc_sch_wb.atp_debug('Remove_Offset_Supplies: ' ||

Line 6242: msc_sch_wb.atp_debug('Remove_Offset_Supplies: ' ||

6238: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Supplies Procedure************');
6239: END IF;
6240: IF PG_DEBUG in ('Y', 'C') THEN
6241: FOR i in 1..p_del_supply_ids.COUNT LOOP
6242: msc_sch_wb.atp_debug('Remove_Offset_Supplies: ' ||
6243: 'p_del_supply_ids('||i||') = '|| p_del_supply_ids(i)||
6244: --'p_inv_item_ids('||i||') = '|| p_inv_item_ids(i)||
6245: --'p_plan_ids('||i||') = '|| p_plan_ids(i)||
6246: 'p_atp_peg_supplies_plan_ids('||i||') = '|| p_atp_peg_supplies_plan_ids(i)

Line 6286: msc_sch_wb.atp_debug('Remove_Offset_Supplies: Number of rows Updated '||

6282: --AND map1.inventory_item_id = p_inv_item_ids(m) -- Bug 3629191
6283: AND map1.offset_supply_id = p_del_supply_ids(m);
6284:
6285: IF PG_DEBUG in ('Y', 'C') THEN
6286: msc_sch_wb.atp_debug('Remove_Offset_Supplies: Number of rows Updated '||
6287: SQL%ROWCOUNT);
6288: END IF;
6289: -- End Bug 3381464.
6290:

Line 6331: msc_sch_wb.atp_debug('For Supply id '|| p_del_supply_ids(m)||': updated '||

6327:
6328: -- Count how many rows were updated for each supply id
6329: IF PG_DEBUG in ('Y', 'C') THEN
6330: FOR m IN 1..p_del_supply_ids.COUNT LOOP
6331: msc_sch_wb.atp_debug('For Supply id '|| p_del_supply_ids(m)||': updated '||
6332: SQL%BULK_ROWCOUNT(m)||' records');
6333: END LOOP;
6334: END IF;
6335:

Line 6342: msc_sch_wb.atp_debug('Remove_Offset_Supplies: before delete from ' ||

6338: (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1) AND
6339: (MSC_ATP_PVT.G_ALLOCATION_METHOD = 1)) THEN
6340:
6341: IF PG_DEBUG in ('Y', 'C') THEN
6342: msc_sch_wb.atp_debug('Remove_Offset_Supplies: before delete from ' ||
6343: ' msc_alloc_supplies');
6344: END IF;
6345:
6346: --Bug 3629191

Line 6375: msc_sch_wb.atp_debug('For Supply id '|| p_del_supply_ids(m)||': updated '||

6371:
6372: -- Count how many rows were updated for each supply id
6373: IF PG_DEBUG in ('Y', 'C') THEN
6374: FOR m IN 1..p_del_supply_ids.COUNT LOOP
6375: msc_sch_wb.atp_debug('For Supply id '|| p_del_supply_ids(m)||': updated '||
6376: SQL%BULK_ROWCOUNT(m)||' records');
6377: END LOOP;
6378: END IF;
6379: END IF;

Line 6382: msc_sch_wb.atp_debug('**********End Remove_Offset_Supplies Procedure************');

6378: END IF;
6379: END IF;
6380:
6381: IF PG_DEBUG in ('Y', 'C') THEN
6382: msc_sch_wb.atp_debug('**********End Remove_Offset_Supplies Procedure************');
6383: END IF;
6384:
6385: EXCEPTION
6386: WHEN OTHERS THEN

Line 6392: msc_sch_wb.atp_debug('Remove_Offset_Supplies: ERROR' || sqlerrm );

6388: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Remove_Offset_Supplies');
6389: END IF;
6390:
6391: IF PG_DEBUG in ('Y', 'C') THEN
6392: msc_sch_wb.atp_debug('Remove_Offset_Supplies: ERROR' || sqlerrm );
6393: END IF;
6394: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6395: -- Bug 3319810 Enable exception generation.
6396: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 6416: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Resource_Reqs Procedure************');

6412: i NUMBER;
6413: m PLS_INTEGER := 1;
6414: BEGIN
6415: IF PG_DEBUG in ('Y', 'C') THEN
6416: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Resource_Reqs Procedure************');
6417: END IF;
6418: IF PG_DEBUG in ('Y', 'C') THEN
6419: FOR i in 1..p_del_resrc_reqs.COUNT LOOP
6420: msc_sch_wb.atp_debug('Remove_Offset_Resource_Reqs: ' ||

Line 6420: msc_sch_wb.atp_debug('Remove_Offset_Resource_Reqs: ' ||

6416: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Resource_Reqs Procedure************');
6417: END IF;
6418: IF PG_DEBUG in ('Y', 'C') THEN
6419: FOR i in 1..p_del_resrc_reqs.COUNT LOOP
6420: msc_sch_wb.atp_debug('Remove_Offset_Resource_Reqs: ' ||
6421: 'p_del_resrc_reqs('||i||') = '|| p_del_resrc_reqs(i)||
6422: --'p_inv_item_ids('||i||') = '|| p_inv_item_ids(i)||
6423: --'p_plan_ids('||i||') = '|| p_plan_ids(i)||
6424: --'p_identifiers('||i||') = '|| p_identifiers(i)

Line 6458: msc_sch_wb.atp_debug('For Transaction id '|| p_del_resrc_reqs(m)||': updated '||

6454:
6455: -- Count how many rows were updated for each resource transaction id
6456: IF PG_DEBUG in ('Y', 'C') THEN
6457: FOR m IN 1..p_del_resrc_reqs.COUNT LOOP
6458: msc_sch_wb.atp_debug('For Transaction id '|| p_del_resrc_reqs(m)||': updated '||
6459: SQL%BULK_ROWCOUNT(m)||' records');
6460: END LOOP;
6461: END IF;
6462:

Line 6464: msc_sch_wb.atp_debug('**********End Remove_Offset_Resource_Reqs Procedure************');

6460: END LOOP;
6461: END IF;
6462:
6463: IF PG_DEBUG in ('Y', 'C') THEN
6464: msc_sch_wb.atp_debug('**********End Remove_Offset_Resource_Reqs Procedure************');
6465: END IF;
6466:
6467: EXCEPTION
6468: WHEN OTHERS THEN

Line 6474: msc_sch_wb.atp_debug('Remove_Offset_Supplies: ERROR' || sqlerrm );

6470: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Remove_Offset_Resource_Reqs');
6471: END IF;
6472:
6473: IF PG_DEBUG in ('Y', 'C') THEN
6474: msc_sch_wb.atp_debug('Remove_Offset_Supplies: ERROR' || sqlerrm );
6475: END IF;
6476: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6477: -- Bug 3319810 Enable exception generation.
6478: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 6499: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Data Procedure************');

6495: IS
6496: BEGIN
6497:
6498: IF PG_DEBUG in ('Y', 'C') THEN
6499: msc_sch_wb.atp_debug('**********Begin Remove_Offset_Data Procedure************');
6500: END IF;
6501:
6502: x_return_status := FND_API.G_RET_STS_SUCCESS;
6503:

Line 6509: msc_sch_wb.atp_debug('Status After Call to Remove_Offset_Demands :'

6505: p_atp_peg_demands_plan_ids, --Bug 3629191
6506: p_inv_item_ids, p_del_demand_ids,p_demand_source_type, x_return_status);--cmro
6507:
6508: IF PG_DEBUG in ('Y', 'C') THEN
6509: msc_sch_wb.atp_debug('Status After Call to Remove_Offset_Demands :'
6510: || x_return_status);
6511: END IF;
6512:
6513: Remove_Offset_Supplies ( --p_identifiers, p_plan_ids,

Line 6518: msc_sch_wb.atp_debug('Status After Call to Remove_Offset_Supplies :'

6514: p_atp_peg_supplies_plan_ids, --Bug 3629191
6515: p_inv_item_ids, p_del_supply_ids,p_demand_source_type,x_return_status);--cmro
6516:
6517: IF PG_DEBUG in ('Y', 'C') THEN
6518: msc_sch_wb.atp_debug('Status After Call to Remove_Offset_Supplies :'
6519: || x_return_status);
6520: END IF;
6521:
6522: Remove_Offset_Resource_Reqs ( --p_identifiers, p_plan_ids,

Line 6527: msc_sch_wb.atp_debug('Status After Call to Remove_Offset_Resource_Reqs :'

6523: p_atp_peg_res_reqs_plan_ids, --Bug 3629191
6524: p_inv_item_ids, p_del_resrc_reqs,p_demand_source_type,x_return_status);--cmro
6525:
6526: IF PG_DEBUG in ('Y', 'C') THEN
6527: msc_sch_wb.atp_debug('Status After Call to Remove_Offset_Resource_Reqs :'
6528: || x_return_status);
6529: END IF;
6530:
6531: EXCEPTION

Line 6538: msc_sch_wb.atp_debug('Remove_Offset_Data: ERROR' || sqlerrm );

6534: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Remove_Offset_Data');
6535: END IF;
6536:
6537: IF PG_DEBUG in ('Y', 'C') THEN
6538: msc_sch_wb.atp_debug('Remove_Offset_Data: ERROR' || sqlerrm );
6539: END IF;
6540: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6541: -- Bug 3319810 Enable exception generation.
6542: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 6564: msc_sch_wb.atp_debug('***** Begin Create_PF_Atp_Pegging Procedure *****');

6560:
6561: BEGIN
6562:
6563: IF PG_DEBUG in ('Y', 'C') THEN
6564: msc_sch_wb.atp_debug('***** Begin Create_PF_Atp_Pegging Procedure *****');
6565: msc_sch_wb.atp_debug('Reference Item Id : ' || p_reference_item_id);
6566: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);

Line 6565: msc_sch_wb.atp_debug('Reference Item Id : ' || p_reference_item_id);

6561: BEGIN
6562:
6563: IF PG_DEBUG in ('Y', 'C') THEN
6564: msc_sch_wb.atp_debug('***** Begin Create_PF_Atp_Pegging Procedure *****');
6565: msc_sch_wb.atp_debug('Reference Item Id : ' || p_reference_item_id);
6566: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);
6569: msc_sch_wb.atp_debug('SO End Demand Id : ' || p_end_demand_id);

Line 6566: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);

6562:
6563: IF PG_DEBUG in ('Y', 'C') THEN
6564: msc_sch_wb.atp_debug('***** Begin Create_PF_Atp_Pegging Procedure *****');
6565: msc_sch_wb.atp_debug('Reference Item Id : ' || p_reference_item_id);
6566: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);
6569: msc_sch_wb.atp_debug('SO End Demand Id : ' || p_end_demand_id);
6570: msc_sch_wb.atp_debug('Plan Id : ' || p_plan_id);

Line 6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);

6563: IF PG_DEBUG in ('Y', 'C') THEN
6564: msc_sch_wb.atp_debug('***** Begin Create_PF_Atp_Pegging Procedure *****');
6565: msc_sch_wb.atp_debug('Reference Item Id : ' || p_reference_item_id);
6566: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);
6569: msc_sch_wb.atp_debug('SO End Demand Id : ' || p_end_demand_id);
6570: msc_sch_wb.atp_debug('Plan Id : ' || p_plan_id);
6571: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);

Line 6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);

6564: msc_sch_wb.atp_debug('***** Begin Create_PF_Atp_Pegging Procedure *****');
6565: msc_sch_wb.atp_debug('Reference Item Id : ' || p_reference_item_id);
6566: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);
6569: msc_sch_wb.atp_debug('SO End Demand Id : ' || p_end_demand_id);
6570: msc_sch_wb.atp_debug('Plan Id : ' || p_plan_id);
6571: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);
6572: END IF;

Line 6569: msc_sch_wb.atp_debug('SO End Demand Id : ' || p_end_demand_id);

6565: msc_sch_wb.atp_debug('Reference Item Id : ' || p_reference_item_id);
6566: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);
6569: msc_sch_wb.atp_debug('SO End Demand Id : ' || p_end_demand_id);
6570: msc_sch_wb.atp_debug('Plan Id : ' || p_plan_id);
6571: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);
6572: END IF;
6573:

Line 6570: msc_sch_wb.atp_debug('Plan Id : ' || p_plan_id);

6566: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);
6569: msc_sch_wb.atp_debug('SO End Demand Id : ' || p_end_demand_id);
6570: msc_sch_wb.atp_debug('Plan Id : ' || p_plan_id);
6571: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);
6572: END IF;
6573:
6574: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 6571: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);

6567: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6568: msc_sch_wb.atp_debug('Demand Source Type : ' || p_demand_source_type);
6569: msc_sch_wb.atp_debug('SO End Demand Id : ' || p_end_demand_id);
6570: msc_sch_wb.atp_debug('Plan Id : ' || p_plan_id);
6571: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);
6572: END IF;
6573:
6574: x_return_status := FND_API.G_RET_STS_SUCCESS;
6575:

Line 6691: msc_sch_wb.atp_debug('Create_PF_Atp_Pegging: Number of rows inserted Stage-1 '||

6687:
6688: END IF;
6689:
6690: IF PG_DEBUG in ('Y', 'C') THEN
6691: msc_sch_wb.atp_debug('Create_PF_Atp_Pegging: Number of rows inserted Stage-1 '||
6692: SQL%ROWCOUNT);
6693: END IF;
6694:
6695: -- Now Create Rest of the Records.

Line 6736: msc_sch_wb.atp_debug('Create_PF_Atp_Pegging: Number of rows inserted Stage-2 '||

6732: AND relief_type = 7
6733: );
6734:
6735: IF PG_DEBUG in ('Y', 'C') THEN
6736: msc_sch_wb.atp_debug('Create_PF_Atp_Pegging: Number of rows inserted Stage-2 '||
6737: SQL%ROWCOUNT);
6738: END IF;
6739:
6740: IF PG_DEBUG in ('Y', 'C') THEN

Line 6741: msc_sch_wb.atp_debug('***** End Create_PF_Atp_Pegging Procedure *****');

6737: SQL%ROWCOUNT);
6738: END IF;
6739:
6740: IF PG_DEBUG in ('Y', 'C') THEN
6741: msc_sch_wb.atp_debug('***** End Create_PF_Atp_Pegging Procedure *****');
6742: END IF;
6743:
6744: EXCEPTION
6745: WHEN OTHERS THEN

Line 6748: msc_sch_wb.atp_debug('Create_PF_Atp_Pegging: ' || my_sqlcode ||

6744: EXCEPTION
6745: WHEN OTHERS THEN
6746: my_sqlcode := SQLCODE;
6747: IF PG_DEBUG in ('Y', 'C') THEN
6748: msc_sch_wb.atp_debug('Create_PF_Atp_Pegging: ' || my_sqlcode ||
6749: ' error encountered while creating ATP Pegging : ERROR = '|| sqlerrm);
6750: END IF;
6751:
6752: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 6795: msc_sch_wb.atp_debug('***** Begin Create_Atp_Pegging Procedure *****');

6791:
6792: BEGIN
6793:
6794: IF PG_DEBUG in ('Y', 'C') THEN
6795: msc_sch_wb.atp_debug('***** Begin Create_Atp_Pegging Procedure *****');
6796: msc_sch_wb.atp_debug('End Pegging Id p_identifier : ' || p_identifier);
6797: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);
6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);

Line 6796: msc_sch_wb.atp_debug('End Pegging Id p_identifier : ' || p_identifier);

6792: BEGIN
6793:
6794: IF PG_DEBUG in ('Y', 'C') THEN
6795: msc_sch_wb.atp_debug('***** Begin Create_Atp_Pegging Procedure *****');
6796: msc_sch_wb.atp_debug('End Pegging Id p_identifier : ' || p_identifier);
6797: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);
6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6800: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);

Line 6797: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);

6793:
6794: IF PG_DEBUG in ('Y', 'C') THEN
6795: msc_sch_wb.atp_debug('***** Begin Create_Atp_Pegging Procedure *****');
6796: msc_sch_wb.atp_debug('End Pegging Id p_identifier : ' || p_identifier);
6797: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);
6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6800: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6801: msc_sch_wb.atp_debug('Demand. Source Type p_demand_source_type : ' || p_demand_source_type);

Line 6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);

6794: IF PG_DEBUG in ('Y', 'C') THEN
6795: msc_sch_wb.atp_debug('***** Begin Create_Atp_Pegging Procedure *****');
6796: msc_sch_wb.atp_debug('End Pegging Id p_identifier : ' || p_identifier);
6797: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);
6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6800: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6801: msc_sch_wb.atp_debug('Demand. Source Type p_demand_source_type : ' || p_demand_source_type);
6802: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);

Line 6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);

6795: msc_sch_wb.atp_debug('***** Begin Create_Atp_Pegging Procedure *****');
6796: msc_sch_wb.atp_debug('End Pegging Id p_identifier : ' || p_identifier);
6797: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);
6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6800: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6801: msc_sch_wb.atp_debug('Demand. Source Type p_demand_source_type : ' || p_demand_source_type);
6802: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);
6803: END IF;

Line 6800: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);

6796: msc_sch_wb.atp_debug('End Pegging Id p_identifier : ' || p_identifier);
6797: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);
6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6800: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6801: msc_sch_wb.atp_debug('Demand. Source Type p_demand_source_type : ' || p_demand_source_type);
6802: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);
6803: END IF;
6804:

Line 6801: msc_sch_wb.atp_debug('Demand. Source Type p_demand_source_type : ' || p_demand_source_type);

6797: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);
6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6800: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6801: msc_sch_wb.atp_debug('Demand. Source Type p_demand_source_type : ' || p_demand_source_type);
6802: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);
6803: END IF;
6804:
6805: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 6802: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);

6798: msc_sch_wb.atp_debug('Old Plan Id : ' || p_old_plan_id);
6799: msc_sch_wb.atp_debug('Model Line Id p_model_order_line_id : ' || p_model_order_line_id);
6800: msc_sch_wb.atp_debug('Config. Line Id p_config_order_line_id : ' || p_config_order_line_id);
6801: msc_sch_wb.atp_debug('Demand. Source Type p_demand_source_type : ' || p_demand_source_type);
6802: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HYBRID_ALLOC_ATP : ' || MSC_ATP_PVT.G_HYBRID_ALLOC_ATP);
6803: END IF;
6804:
6805: x_return_status := FND_API.G_RET_STS_SUCCESS;
6806:

Line 6840: msc_sch_wb.atp_debug('Create_Atp_Pegging: Number of rows deleted '||

6836: 100,
6837: p_demand_source_type,
6838: -1); --CMRO
6839: IF PG_DEBUG in ('Y', 'C') THEN
6840: msc_sch_wb.atp_debug('Create_Atp_Pegging: Number of rows deleted '||
6841: SQL%ROWCOUNT);
6842: END IF;
6843: EXCEPTION
6844: WHEN OTHERS THEN

Line 6846: msc_sch_wb.atp_debug('Create_Atp_Pegging: Error '|| sqlerrm);

6842: END IF;
6843: EXCEPTION
6844: WHEN OTHERS THEN
6845: IF PG_DEBUG in ('Y', 'C') THEN
6846: msc_sch_wb.atp_debug('Create_Atp_Pegging: Error '|| sqlerrm);
6847: END IF;
6848:
6849: END;
6850:

Line 6851: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_insert_temp_table = '|| l_insert_temp_table);

6847: END IF;
6848:
6849: END;
6850:
6851: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_insert_temp_table = '|| l_insert_temp_table);
6852: -- CTO_PF_PRJ_2 Impacts SQL are changed to Dynamic Ones
6853: -- first insert the sales order line to the ATP simplified pegging.
6854: -- ALLOC ATP CHANGES
6855: IF (MSC_ATP_PVT.G_HYBRID_ALLOC_ATP = 'N' ) THEN

Line 6936: msc_sch_wb.atp_debug('Create_Atp_Pegging: Insert SQL Statement '||

6932: and model_sd_flag = 1' -- ensure that we only obtain pegging for things in the order.
6933: ;
6934:
6935: IF PG_DEBUG in ('Y', 'C') THEN
6936: msc_sch_wb.atp_debug('Create_Atp_Pegging: Insert SQL Statement '||
6937: l_sql_stmt_1);
6938: END IF;
6939:
6940: EXECUTE IMMEDIATE l_sql_stmt_1 USING

Line 7082: msc_sch_wb.atp_debug('Create_Atp_Pegging: Insert SQL Statement 1 '||

7078: and peg.model_sd_flag = 1' -- ensure that we only obtain pegging for things in the order.
7079: ;
7080:
7081: IF PG_DEBUG in ('Y', 'C') THEN
7082: msc_sch_wb.atp_debug('Create_Atp_Pegging: Insert SQL Statement 1 '||
7083: l_sql_stmt_1);
7084: END IF;
7085:
7086: EXECUTE IMMEDIATE l_sql_stmt_1 USING

Line 7131: msc_sch_wb.atp_debug('Create_Atp_Pegging: Number of rows inserted-1 '||

7127:
7128: -- End CTO_PF_PRJ_2 Impacts SQL are changed to Dynamic Ones
7129:
7130: IF PG_DEBUG in ('Y', 'C') THEN
7131: msc_sch_wb.atp_debug('Create_Atp_Pegging: Number of rows inserted-1 '||
7132: SQL%ROWCOUNT);
7133: END IF;
7134:
7135: SELECT DEST_INV_ITEM_ID, identifier2,

Line 7151: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_reference_item_id ' ||

7147: AND model_sd_flag = 1
7148: AND session_id = MSC_ATP_PVT.G_SESSION_ID;
7149:
7150: IF PG_DEBUG in ('Y', 'C') THEN
7151: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_reference_item_id ' ||
7152: l_reference_item_id);
7153: -- Bug 3334643 Track the plan_id
7154: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_plan_id ' ||
7155: l_plan_id);

Line 7154: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_plan_id ' ||

7150: IF PG_DEBUG in ('Y', 'C') THEN
7151: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_reference_item_id ' ||
7152: l_reference_item_id);
7153: -- Bug 3334643 Track the plan_id
7154: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_plan_id ' ||
7155: l_plan_id);
7156: -- CTO_PF_PRJ Get End Demand Id
7157: msc_sch_wb.atp_debug('Create_Atp_Pegging: End Demand Id ' ||
7158: l_end_demand_id);

Line 7157: msc_sch_wb.atp_debug('Create_Atp_Pegging: End Demand Id ' ||

7153: -- Bug 3334643 Track the plan_id
7154: msc_sch_wb.atp_debug('Create_Atp_Pegging: l_plan_id ' ||
7155: l_plan_id);
7156: -- CTO_PF_PRJ Get End Demand Id
7157: msc_sch_wb.atp_debug('Create_Atp_Pegging: End Demand Id ' ||
7158: l_end_demand_id);
7159: -- End CTO_PF_PRJ Get End Demand Id
7160: END IF;
7161:

Line 7262: msc_sch_wb.atp_debug('Create_Atp_Pegging: Insert SQL Statement '||

7258: AND session_id = prior session_id
7259: AND record_type in (3,4)';
7260:
7261: IF PG_DEBUG in ('Y', 'C') THEN
7262: msc_sch_wb.atp_debug('Create_Atp_Pegging: Insert SQL Statement '||
7263: l_sql_stmt_1);
7264: END IF;
7265:
7266: EXECUTE IMMEDIATE l_sql_stmt_1 USING

Line 7415: msc_sch_wb.atp_debug('Create_Atp_Pegging: Insert SQL Statement 2'||

7411: AND peg.session_id = prior peg.session_id
7412: AND peg.record_type in (3,4)';
7413:
7414: IF PG_DEBUG in ('Y', 'C') THEN
7415: msc_sch_wb.atp_debug('Create_Atp_Pegging: Insert SQL Statement 2'||
7416: l_sql_stmt_1);
7417: END IF;
7418:
7419: EXECUTE IMMEDIATE l_sql_stmt_1 USING

Line 7466: msc_sch_wb.atp_debug('Create_Atp_Pegging: Number of rows inserted '||

7462:
7463: -- End CTO_PF_PRJ_2 Impacts SQL are changed to Dynamic Ones
7464:
7465: IF PG_DEBUG in ('Y', 'C') THEN
7466: msc_sch_wb.atp_debug('Create_Atp_Pegging: Number of rows inserted '||
7467: SQL%ROWCOUNT);
7468: END IF;
7469:
7470: -- CTO_PF_PRJ Impacts

Line 7485: msc_sch_wb.atp_debug('***** End Create_Atp_Pegging Procedure *****');

7481: END IF;
7482: -- CTO_PF_PRJ Impacts
7483:
7484: IF PG_DEBUG in ('Y', 'C') THEN
7485: msc_sch_wb.atp_debug('***** End Create_Atp_Pegging Procedure *****');
7486: END IF;
7487:
7488: EXCEPTION
7489: WHEN OTHERS THEN

Line 7492: msc_sch_wb.atp_debug('Create_Atp_Pegging: ' || my_sqlcode ||

7488: EXCEPTION
7489: WHEN OTHERS THEN
7490: my_sqlcode := SQLCODE;
7491: IF PG_DEBUG in ('Y', 'C') THEN
7492: msc_sch_wb.atp_debug('Create_Atp_Pegging: ' || my_sqlcode ||
7493: ' error encountered while creating ATP Pegging : ERROR = '|| sqlerrm);
7494: END IF;
7495:
7496: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN