DBA Data[Home] [Help]

APPS.MSC_ATP_PEG dependencies on MSC_UTIL

Line 210: msc_util.msc_log ('*****--- Update_Summary_Flag ---*****');

206: ) IS
207: BEGIN
208:
209: IF PG_DEBUG in ('Y', 'C') THEN
210: msc_util.msc_log ('*****--- Update_Summary_Flag ---*****');
211: msc_util.msc_log (' Plan ID : '|| p_plan_id || ' Status : ' || p_status);
212: END IF;
213:
214: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 211: msc_util.msc_log (' Plan ID : '|| p_plan_id || ' Status : ' || p_status);

207: BEGIN
208:
209: IF PG_DEBUG in ('Y', 'C') THEN
210: msc_util.msc_log ('*****--- Update_Summary_Flag ---*****');
211: msc_util.msc_log (' Plan ID : '|| p_plan_id || ' Status : ' || p_status);
212: END IF;
213:
214: x_return_status := FND_API.G_RET_STS_SUCCESS;
215:

Line 223: msc_util.msc_log ('Cannot Update. Error : ' || sqlerrm);

219:
220: EXCEPTION
221: WHEN OTHERS THEN
222: IF PG_DEBUG in ('Y', 'C') THEN
223: msc_util.msc_log ('Cannot Update. Error : ' || sqlerrm);
224: END IF;
225: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
226:
227: END Update_Summary_Flag;

Line 238: msc_util.msc_log('***** Begin Extend_Atp_Peg Procedure *****');

234: )
235: IS
236: BEGIN
237: IF PG_DEBUG in ('Y', 'C') THEN
238: msc_util.msc_log('***** Begin Extend_Atp_Peg Procedure *****');
239: msc_util.msc_log ('p_index : ' || p_index);
240: END IF;
241:
242: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 239: msc_util.msc_log ('p_index : ' || p_index);

235: IS
236: BEGIN
237: IF PG_DEBUG in ('Y', 'C') THEN
238: msc_util.msc_log('***** Begin Extend_Atp_Peg Procedure *****');
239: msc_util.msc_log ('p_index : ' || p_index);
240: END IF;
241:
242: x_return_status := FND_API.G_RET_STS_SUCCESS;
243:

Line 297: msc_util.msc_log('***** End Extend_Atp_Peg Procedure *****');

293: atp_peg_tab.exclude_flag.Extend(p_index);
294: -- End Bug 3805136
295:
296: IF PG_DEBUG in ('Y', 'C') THEN
297: msc_util.msc_log('***** End Extend_Atp_Peg Procedure *****');
298: END IF;
299: EXCEPTION
300: WHEN OTHERS THEN
301: IF PG_DEBUG in ('Y', 'C') THEN

Line 302: msc_util.msc_log ('Extend_Atp_Peg: Problems in Extending record ERROR:'|| sqlerrm);

298: END IF;
299: EXCEPTION
300: WHEN OTHERS THEN
301: IF PG_DEBUG in ('Y', 'C') THEN
302: msc_util.msc_log ('Extend_Atp_Peg: Problems in Extending record ERROR:'|| sqlerrm);
303: END IF;
304: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
305:
306: END Extend_Atp_Peg;

Line 315: msc_util.msc_log('***** Begin Extend_Atp_Peg Procedure *****');

311: )
312: IS
313: BEGIN
314: IF PG_DEBUG in ('Y', 'C') THEN
315: msc_util.msc_log('***** Begin Extend_Atp_Peg Procedure *****');
316: END IF;
317:
318: x_return_status := FND_API.G_RET_STS_SUCCESS;
319:

Line 368: msc_util.msc_log('***** End Init_Atp_Peg Procedure *****');

364: atp_peg_tab.exclude_flag := MRP_ATP_PUB.number_arr();
365: -- End Bug 3805136
366:
367: IF PG_DEBUG in ('Y', 'C') THEN
368: msc_util.msc_log('***** End Init_Atp_Peg Procedure *****');
369: msc_util.msc_log('Init_Atp_Peg Rowcount is ' || atp_peg_tab.reference_item_id.COUNT);
370: END IF;
371: EXCEPTION
372: WHEN OTHERS THEN

Line 369: msc_util.msc_log('Init_Atp_Peg Rowcount is ' || atp_peg_tab.reference_item_id.COUNT);

365: -- End Bug 3805136
366:
367: IF PG_DEBUG in ('Y', 'C') THEN
368: msc_util.msc_log('***** End Init_Atp_Peg Procedure *****');
369: msc_util.msc_log('Init_Atp_Peg Rowcount is ' || atp_peg_tab.reference_item_id.COUNT);
370: END IF;
371: EXCEPTION
372: WHEN OTHERS THEN
373: IF PG_DEBUG in ('Y', 'C') THEN

Line 374: msc_util.msc_log ('Init_Atp_Peg: Problems in Extending record ERROR:'|| sqlerrm);

370: END IF;
371: EXCEPTION
372: WHEN OTHERS THEN
373: IF PG_DEBUG in ('Y', 'C') THEN
374: msc_util.msc_log ('Init_Atp_Peg: Problems in Extending record ERROR:'|| sqlerrm);
375: END IF;
376: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
377:
378: END Init_Atp_Peg;

Line 388: msc_util.msc_log('***** Begin Extend_Atp_Peg_Det Procedure *****');

384: )
385: IS
386: BEGIN
387: IF PG_DEBUG in ('Y', 'C') THEN
388: msc_util.msc_log('***** Begin Extend_Atp_Peg_Det Procedure *****');
389: msc_util.msc_log ('p_index : ' || p_index);
390: END IF;
391:
392: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 389: msc_util.msc_log ('p_index : ' || p_index);

385: IS
386: BEGIN
387: IF PG_DEBUG in ('Y', 'C') THEN
388: msc_util.msc_log('***** Begin Extend_Atp_Peg_Det Procedure *****');
389: msc_util.msc_log ('p_index : ' || p_index);
390: END IF;
391:
392: x_return_status := FND_API.G_RET_STS_SUCCESS;
393:

Line 445: msc_util.msc_log('***** End Extend_Atp_Peg_Det Procedure *****');

441: atp_peg_det.atf_date.Extend(p_index);
442: atp_peg_det.product_family_id.Extend(p_index);
443:
444: IF PG_DEBUG in ('Y', 'C') THEN
445: msc_util.msc_log('***** End Extend_Atp_Peg_Det Procedure *****');
446: END IF;
447: EXCEPTION
448: WHEN OTHERS THEN
449: IF PG_DEBUG in ('Y', 'C') THEN

Line 450: msc_util.msc_log ('Extend_Atp_Peg_Det: Problems in Extending record ERROR:'|| sqlerrm);

446: END IF;
447: EXCEPTION
448: WHEN OTHERS THEN
449: IF PG_DEBUG in ('Y', 'C') THEN
450: msc_util.msc_log ('Extend_Atp_Peg_Det: Problems in Extending record ERROR:'|| sqlerrm);
451: END IF;
452: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
453:
454: END Extend_Atp_Peg_Det;

Line 500: msc_util.msc_log('***** Begin Calculate_Relief_Quantities Procedure *****');

496: l_proc_supply_flag NUMBER; -- Values 0 False 1 True
497: BEGIN
498:
499: IF PG_DEBUG in ('Y', 'C') THEN
500: msc_util.msc_log('***** Begin Calculate_Relief_Quantities Procedure *****');
501: msc_util.msc_log (' p_pegging_id : '|| p_pegging_id);
502: msc_util.msc_log (' p_fixed_lt : '|| p_fixed_lt);
503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);
504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);

Line 501: msc_util.msc_log (' p_pegging_id : '|| p_pegging_id);

497: BEGIN
498:
499: IF PG_DEBUG in ('Y', 'C') THEN
500: msc_util.msc_log('***** Begin Calculate_Relief_Quantities Procedure *****');
501: msc_util.msc_log (' p_pegging_id : '|| p_pegging_id);
502: msc_util.msc_log (' p_fixed_lt : '|| p_fixed_lt);
503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);
504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);
505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);

Line 502: msc_util.msc_log (' p_fixed_lt : '|| p_fixed_lt);

498:
499: IF PG_DEBUG in ('Y', 'C') THEN
500: msc_util.msc_log('***** Begin Calculate_Relief_Quantities Procedure *****');
501: msc_util.msc_log (' p_pegging_id : '|| p_pegging_id);
502: msc_util.msc_log (' p_fixed_lt : '|| p_fixed_lt);
503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);
504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);
505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);
506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);

Line 503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);

499: IF PG_DEBUG in ('Y', 'C') THEN
500: msc_util.msc_log('***** Begin Calculate_Relief_Quantities Procedure *****');
501: msc_util.msc_log (' p_pegging_id : '|| p_pegging_id);
502: msc_util.msc_log (' p_fixed_lt : '|| p_fixed_lt);
503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);
504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);
505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);
506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);
507: msc_util.msc_log (' p_supply_id : '|| p_supply_id);

Line 504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);

500: msc_util.msc_log('***** Begin Calculate_Relief_Quantities Procedure *****');
501: msc_util.msc_log (' p_pegging_id : '|| p_pegging_id);
502: msc_util.msc_log (' p_fixed_lt : '|| p_fixed_lt);
503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);
504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);
505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);
506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);
507: msc_util.msc_log (' p_supply_id : '|| p_supply_id);
508: msc_util.msc_log (' Calculate_Relief_Quantities Transaction Date for Config : '

Line 505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);

501: msc_util.msc_log (' p_pegging_id : '|| p_pegging_id);
502: msc_util.msc_log (' p_fixed_lt : '|| p_fixed_lt);
503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);
504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);
505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);
506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);
507: msc_util.msc_log (' p_supply_id : '|| p_supply_id);
508: msc_util.msc_log (' Calculate_Relief_Quantities Transaction Date for Config : '
509: || p_transaction_date);

Line 506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);

502: msc_util.msc_log (' p_fixed_lt : '|| p_fixed_lt);
503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);
504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);
505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);
506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);
507: msc_util.msc_log (' p_supply_id : '|| p_supply_id);
508: msc_util.msc_log (' Calculate_Relief_Quantities Transaction Date for Config : '
509: || p_transaction_date);
510: msc_util.msc_log (' Relief Ratio for this Pegging Path p_peg_relief_ratio: '

Line 507: msc_util.msc_log (' p_supply_id : '|| p_supply_id);

503: msc_util.msc_log (' p_variable_lt : '|| p_variable_lt);
504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);
505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);
506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);
507: msc_util.msc_log (' p_supply_id : '|| p_supply_id);
508: msc_util.msc_log (' Calculate_Relief_Quantities Transaction Date for Config : '
509: || p_transaction_date);
510: msc_util.msc_log (' Relief Ratio for this Pegging Path p_peg_relief_ratio: '
511: || p_peg_relief_ratio);

Line 508: msc_util.msc_log (' Calculate_Relief_Quantities Transaction Date for Config : '

504: msc_util.msc_log (' p_tot_relief_qty : '|| p_tot_relief_qty);
505: msc_util.msc_log (' p_inventory_item_id : '|| p_inventory_item_id);
506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);
507: msc_util.msc_log (' p_supply_id : '|| p_supply_id);
508: msc_util.msc_log (' Calculate_Relief_Quantities Transaction Date for Config : '
509: || p_transaction_date);
510: msc_util.msc_log (' Relief Ratio for this Pegging Path p_peg_relief_ratio: '
511: || p_peg_relief_ratio);
512: msc_util.msc_log (' Relief_Qty to Alloc_Qty Ratio for Pegging Path p_peg_alloc_rel_ratio: '

Line 510: msc_util.msc_log (' Relief Ratio for this Pegging Path p_peg_relief_ratio: '

506: msc_util.msc_log (' p_end_pegging_id : '|| p_end_pegging_id);
507: msc_util.msc_log (' p_supply_id : '|| p_supply_id);
508: msc_util.msc_log (' Calculate_Relief_Quantities Transaction Date for Config : '
509: || p_transaction_date);
510: msc_util.msc_log (' Relief Ratio for this Pegging Path p_peg_relief_ratio: '
511: || p_peg_relief_ratio);
512: msc_util.msc_log (' Relief_Qty to Alloc_Qty Ratio for Pegging Path p_peg_alloc_rel_ratio: '
513: || p_peg_alloc_rel_ratio);
514: msc_util.msc_log (' Total Relief_Qty of parent for Pegging Path p_peg_tot_rel_qty: '

Line 512: msc_util.msc_log (' Relief_Qty to Alloc_Qty Ratio for Pegging Path p_peg_alloc_rel_ratio: '

508: msc_util.msc_log (' Calculate_Relief_Quantities Transaction Date for Config : '
509: || p_transaction_date);
510: msc_util.msc_log (' Relief Ratio for this Pegging Path p_peg_relief_ratio: '
511: || p_peg_relief_ratio);
512: msc_util.msc_log (' Relief_Qty to Alloc_Qty Ratio for Pegging Path p_peg_alloc_rel_ratio: '
513: || p_peg_alloc_rel_ratio);
514: msc_util.msc_log (' Total Relief_Qty of parent for Pegging Path p_peg_tot_rel_qty: '
515: || p_peg_tot_rel_qty);
516: msc_util.msc_log (' End Item Usage of parent -- p_end_item_usage: '

Line 514: msc_util.msc_log (' Total Relief_Qty of parent for Pegging Path p_peg_tot_rel_qty: '

510: msc_util.msc_log (' Relief Ratio for this Pegging Path p_peg_relief_ratio: '
511: || p_peg_relief_ratio);
512: msc_util.msc_log (' Relief_Qty to Alloc_Qty Ratio for Pegging Path p_peg_alloc_rel_ratio: '
513: || p_peg_alloc_rel_ratio);
514: msc_util.msc_log (' Total Relief_Qty of parent for Pegging Path p_peg_tot_rel_qty: '
515: || p_peg_tot_rel_qty);
516: msc_util.msc_log (' End Item Usage of parent -- p_end_item_usage: '
517: || p_end_item_usage);
518: END IF;

Line 516: msc_util.msc_log (' End Item Usage of parent -- p_end_item_usage: '

512: msc_util.msc_log (' Relief_Qty to Alloc_Qty Ratio for Pegging Path p_peg_alloc_rel_ratio: '
513: || p_peg_alloc_rel_ratio);
514: msc_util.msc_log (' Total Relief_Qty of parent for Pegging Path p_peg_tot_rel_qty: '
515: || p_peg_tot_rel_qty);
516: msc_util.msc_log (' End Item Usage of parent -- p_end_item_usage: '
517: || p_end_item_usage);
518: END IF;
519:
520: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 525: msc_util.msc_log (' l_row_count : '|| l_row_count);

521:
522: l_row_count := x_atp_peg_tab.pegging_id.COUNT;
523:
524: IF PG_DEBUG in ('Y', 'C') THEN
525: msc_util.msc_log (' l_row_count : '|| l_row_count);
526: END IF;
527:
528: FOR i in 1..l_row_count
529: LOOP

Line 551: msc_util.msc_log (' Pegging Id Match : ' || p_pegging_id);

547: -- Initilize the remaining relief_qty
548: l_rem_relief_qty := l_tot_relief_qty ;
549:
550: IF PG_DEBUG in ('Y', 'C') THEN
551: msc_util.msc_log (' Pegging Id Match : ' || p_pegging_id);
552: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
553: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
554: msc_util.msc_log (' x_atp_peg_tab.consumed_qty(i) : '||
555: x_atp_peg_tab.consumed_qty(i));

Line 552: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);

548: l_rem_relief_qty := l_tot_relief_qty ;
549:
550: IF PG_DEBUG in ('Y', 'C') THEN
551: msc_util.msc_log (' Pegging Id Match : ' || p_pegging_id);
552: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
553: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
554: msc_util.msc_log (' x_atp_peg_tab.consumed_qty(i) : '||
555: x_atp_peg_tab.consumed_qty(i));
556: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity(i) : '||

Line 553: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);

549:
550: IF PG_DEBUG in ('Y', 'C') THEN
551: msc_util.msc_log (' Pegging Id Match : ' || p_pegging_id);
552: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
553: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
554: msc_util.msc_log (' x_atp_peg_tab.consumed_qty(i) : '||
555: x_atp_peg_tab.consumed_qty(i));
556: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity(i) : '||
557: x_atp_peg_tab.allocated_quantity(i));

Line 554: msc_util.msc_log (' x_atp_peg_tab.consumed_qty(i) : '||

550: IF PG_DEBUG in ('Y', 'C') THEN
551: msc_util.msc_log (' Pegging Id Match : ' || p_pegging_id);
552: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
553: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
554: msc_util.msc_log (' x_atp_peg_tab.consumed_qty(i) : '||
555: x_atp_peg_tab.consumed_qty(i));
556: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity(i) : '||
557: x_atp_peg_tab.allocated_quantity(i));
558: END IF;

Line 556: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity(i) : '||

552: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
553: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
554: msc_util.msc_log (' x_atp_peg_tab.consumed_qty(i) : '||
555: x_atp_peg_tab.consumed_qty(i));
556: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity(i) : '||
557: x_atp_peg_tab.allocated_quantity(i));
558: END IF;
559:
560: IF (x_atp_peg_tab.relief_type(i) = 2 ) THEN

Line 587: msc_util.msc_log (' Relief type : '|| x_atp_peg_tab.relief_type(i));

583: -- Update the remaining relief_qty.
584: l_rem_relief_qty := l_tot_relief_qty - l_relief_quantity;
585:
586: IF PG_DEBUG in ('Y', 'C') THEN
587: msc_util.msc_log (' Relief type : '|| x_atp_peg_tab.relief_type(i));
588: msc_util.msc_log (' l_relief_quantity : '|| l_relief_quantity);
589: msc_util.msc_log (' l_rem_relief_qty : '|| l_rem_relief_qty);
590: END IF;
591: ELSIF (NVL(x_atp_peg_tab.prev_pegging_id(i), -1) = p_pegging_id AND

Line 588: msc_util.msc_log (' l_relief_quantity : '|| l_relief_quantity);

584: l_rem_relief_qty := l_tot_relief_qty - l_relief_quantity;
585:
586: IF PG_DEBUG in ('Y', 'C') THEN
587: msc_util.msc_log (' Relief type : '|| x_atp_peg_tab.relief_type(i));
588: msc_util.msc_log (' l_relief_quantity : '|| l_relief_quantity);
589: msc_util.msc_log (' l_rem_relief_qty : '|| l_rem_relief_qty);
590: END IF;
591: ELSIF (NVL(x_atp_peg_tab.prev_pegging_id(i), -1) = p_pegging_id AND
592: -- Bug 3761805 Honor the End Pegging Path.

Line 589: msc_util.msc_log (' l_rem_relief_qty : '|| l_rem_relief_qty);

585:
586: IF PG_DEBUG in ('Y', 'C') THEN
587: msc_util.msc_log (' Relief type : '|| x_atp_peg_tab.relief_type(i));
588: msc_util.msc_log (' l_relief_quantity : '|| l_relief_quantity);
589: msc_util.msc_log (' l_rem_relief_qty : '|| l_rem_relief_qty);
590: END IF;
591: ELSIF (NVL(x_atp_peg_tab.prev_pegging_id(i), -1) = p_pegging_id AND
592: -- Bug 3761805 Honor the End Pegging Path.
593: x_atp_peg_tab.end_pegging_id(i) = p_end_pegging_id) THEN

Line 650: msc_util.msc_log (' Previous Pegging_id Match : ' || x_atp_peg_tab.prev_pegging_id(i));

646: -- Initialize the proc relief total
647: l_proc_relief_tot := 0;
648:
649: IF PG_DEBUG in ('Y', 'C') THEN
650: msc_util.msc_log (' Previous Pegging_id Match : ' || x_atp_peg_tab.prev_pegging_id(i));
651: msc_util.msc_log (' Pegging_id is : ' || x_atp_peg_tab.pegging_id(i));
652: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));
654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);

Line 651: msc_util.msc_log (' Pegging_id is : ' || x_atp_peg_tab.pegging_id(i));

647: l_proc_relief_tot := 0;
648:
649: IF PG_DEBUG in ('Y', 'C') THEN
650: msc_util.msc_log (' Previous Pegging_id Match : ' || x_atp_peg_tab.prev_pegging_id(i));
651: msc_util.msc_log (' Pegging_id is : ' || x_atp_peg_tab.pegging_id(i));
652: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));
654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);

Line 652: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);

648:
649: IF PG_DEBUG in ('Y', 'C') THEN
650: msc_util.msc_log (' Previous Pegging_id Match : ' || x_atp_peg_tab.prev_pegging_id(i));
651: msc_util.msc_log (' Pegging_id is : ' || x_atp_peg_tab.pegging_id(i));
652: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));
654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);
656: msc_util.msc_log (' l_peg_alloc_rel_ratio : '|| l_peg_alloc_rel_ratio);

Line 653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));

649: IF PG_DEBUG in ('Y', 'C') THEN
650: msc_util.msc_log (' Previous Pegging_id Match : ' || x_atp_peg_tab.prev_pegging_id(i));
651: msc_util.msc_log (' Pegging_id is : ' || x_atp_peg_tab.pegging_id(i));
652: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));
654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);
656: msc_util.msc_log (' l_peg_alloc_rel_ratio : '|| l_peg_alloc_rel_ratio);
657: msc_util.msc_log (' Relief_Type : '|| x_atp_peg_tab.relief_type(i) );

Line 654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);

650: msc_util.msc_log (' Previous Pegging_id Match : ' || x_atp_peg_tab.prev_pegging_id(i));
651: msc_util.msc_log (' Pegging_id is : ' || x_atp_peg_tab.pegging_id(i));
652: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));
654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);
656: msc_util.msc_log (' l_peg_alloc_rel_ratio : '|| l_peg_alloc_rel_ratio);
657: msc_util.msc_log (' Relief_Type : '|| x_atp_peg_tab.relief_type(i) );
658: msc_util.msc_log (' Relief_Quantity : '|| x_atp_peg_tab.relief_quantity(i) );

Line 655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);

651: msc_util.msc_log (' Pegging_id is : ' || x_atp_peg_tab.pegging_id(i));
652: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));
654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);
656: msc_util.msc_log (' l_peg_alloc_rel_ratio : '|| l_peg_alloc_rel_ratio);
657: msc_util.msc_log (' Relief_Type : '|| x_atp_peg_tab.relief_type(i) );
658: msc_util.msc_log (' Relief_Quantity : '|| x_atp_peg_tab.relief_quantity(i) );
659: END IF;

Line 656: msc_util.msc_log (' l_peg_alloc_rel_ratio : '|| l_peg_alloc_rel_ratio);

652: msc_util.msc_log (' l_inventory_item_id : '|| l_inventory_item_id);
653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));
654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);
656: msc_util.msc_log (' l_peg_alloc_rel_ratio : '|| l_peg_alloc_rel_ratio);
657: msc_util.msc_log (' Relief_Type : '|| x_atp_peg_tab.relief_type(i) );
658: msc_util.msc_log (' Relief_Quantity : '|| x_atp_peg_tab.relief_quantity(i) );
659: END IF;
660: -- Bug 3701093

Line 657: msc_util.msc_log (' Relief_Type : '|| x_atp_peg_tab.relief_type(i) );

653: msc_util.msc_log (' Total Relief For Item : '|| x_atp_peg_tab.tot_relief_qty(i));
654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);
656: msc_util.msc_log (' l_peg_alloc_rel_ratio : '|| l_peg_alloc_rel_ratio);
657: msc_util.msc_log (' Relief_Type : '|| x_atp_peg_tab.relief_type(i) );
658: msc_util.msc_log (' Relief_Quantity : '|| x_atp_peg_tab.relief_quantity(i) );
659: END IF;
660: -- Bug 3701093
661: -- If the total relief quantity for the config Item Id is 0

Line 658: msc_util.msc_log (' Relief_Quantity : '|| x_atp_peg_tab.relief_quantity(i) );

654: msc_util.msc_log (' l_tot_relief_qty : '|| l_tot_relief_qty);
655: msc_util.msc_log (' l_proc_supply_flag : '|| l_proc_supply_flag);
656: msc_util.msc_log (' l_peg_alloc_rel_ratio : '|| l_peg_alloc_rel_ratio);
657: msc_util.msc_log (' Relief_Type : '|| x_atp_peg_tab.relief_type(i) );
658: msc_util.msc_log (' Relief_Quantity : '|| x_atp_peg_tab.relief_quantity(i) );
659: END IF;
660: -- Bug 3701093
661: -- If the total relief quantity for the config Item Id is 0
662: -- then set the relief quantity to 0 for the component.

Line 669: msc_util.msc_log (' Force set of Relief_Qty : '||

665: -- Re-set the total relief_quantity as well.
666: -- so that any config item below this level will also not be offset
667: x_atp_peg_tab.tot_relief_qty(i) := 0;
668: IF PG_DEBUG in ('Y', 'C') THEN
669: msc_util.msc_log (' Force set of Relief_Qty : '||
670: x_atp_peg_tab.relief_quantity(i));
671: msc_util.msc_log (' Force Set of Tot Relief_Qty : '||
672: x_atp_peg_tab.tot_relief_qty(i));
673: END IF;

Line 671: msc_util.msc_log (' Force Set of Tot Relief_Qty : '||

667: x_atp_peg_tab.tot_relief_qty(i) := 0;
668: IF PG_DEBUG in ('Y', 'C') THEN
669: msc_util.msc_log (' Force set of Relief_Qty : '||
670: x_atp_peg_tab.relief_quantity(i));
671: msc_util.msc_log (' Force Set of Tot Relief_Qty : '||
672: x_atp_peg_tab.tot_relief_qty(i));
673: END IF;
674: -- End Bug 3701093 Changed IF to ELSIF below.
675: -- Bug 3761805 Added relief_qty filter for performance.

Line 723: msc_util.msc_log (' x_atp_peg_tab.relief_quantity(j) : '||

719: * l_peg_alloc_rel_ratio;
720: END IF;
721: -- End Bug 3805136
722: IF PG_DEBUG in ('Y', 'C') THEN
723: msc_util.msc_log (' x_atp_peg_tab.relief_quantity(j) : '||
724: x_atp_peg_tab.relief_quantity(j));
725: END IF;
726:
727: ELSIF (x_atp_peg_tab.relief_type(i) = 3 ) THEN

Line 754: msc_util.msc_log (' x_atp_peg_tab.consumed_qty(j) : '||

750: IF (x_atp_peg_tab.bom_item_type(i) in (1, 2) AND -- Model or OC.
751: x_atp_peg_tab.disposition_id(i) = p_supply_id ) THEN
752: -- Bug 3362558 Also relieve Option Classes
753: IF PG_DEBUG in ('Y', 'C') THEN
754: msc_util.msc_log (' x_atp_peg_tab.consumed_qty(j) : '||
755: x_atp_peg_tab.consumed_qty(j));
756: END IF;
757: -- Bug 3805136 Once the complete offsets have been applied
758: IF ABS(l_tot_relief_qty - l_relief_quantity) < C_ZERO_APPROXIMATOR THEN

Line 808: msc_util.msc_log (' Calculate_Relief_Quantities Before calc. '

804: -- consistent for both +ve and -ve reliefs
805: * (1 + MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR));
806:
807: IF PG_DEBUG in ('Y', 'C') THEN
808: msc_util.msc_log (' Calculate_Relief_Quantities Before calc. '
809: || 'Transaction Date for Item: ' || x_atp_peg_tab.transaction_date(j));
810: END IF;
811: x_atp_peg_tab.transaction_date(j) :=
812: MSC_CALENDAR.DATE_OFFSET

Line 820: msc_util.msc_log('Calculate_Relief_Quantities: '

816: p_transaction_date, -- Config Item's Transaction Date
817: -1 * l_process_lt); -- negative offset
818:
819: IF PG_DEBUG in ('Y', 'C') THEN
820: msc_util.msc_log('Calculate_Relief_Quantities: '
821: || 'l_mso_lead_time_factor := ' || MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR);
822: msc_util.msc_log('Calculate_Relief_Quantities: '
823: || 'Inventory Item Id := ' || x_atp_peg_tab.inventory_item_id(j));
824: msc_util.msc_log('Calculate_Relief_Quantities: '

Line 822: msc_util.msc_log('Calculate_Relief_Quantities: '

818:
819: IF PG_DEBUG in ('Y', 'C') THEN
820: msc_util.msc_log('Calculate_Relief_Quantities: '
821: || 'l_mso_lead_time_factor := ' || MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR);
822: msc_util.msc_log('Calculate_Relief_Quantities: '
823: || 'Inventory Item Id := ' || x_atp_peg_tab.inventory_item_id(j));
824: msc_util.msc_log('Calculate_Relief_Quantities: '
825: || 'fixed_lt : = ' || x_atp_peg_tab.fixed_lt(j));
826: msc_util.msc_log('Calculate_Relief_Quantities: '

Line 824: msc_util.msc_log('Calculate_Relief_Quantities: '

820: msc_util.msc_log('Calculate_Relief_Quantities: '
821: || 'l_mso_lead_time_factor := ' || MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR);
822: msc_util.msc_log('Calculate_Relief_Quantities: '
823: || 'Inventory Item Id := ' || x_atp_peg_tab.inventory_item_id(j));
824: msc_util.msc_log('Calculate_Relief_Quantities: '
825: || 'fixed_lt : = ' || x_atp_peg_tab.fixed_lt(j));
826: msc_util.msc_log('Calculate_Relief_Quantities: '
827: || 'variable_lt : = ' || x_atp_peg_tab.variable_lt(j));
828: msc_util.msc_log('Calculate_Relief_Quantities: '

Line 826: msc_util.msc_log('Calculate_Relief_Quantities: '

822: msc_util.msc_log('Calculate_Relief_Quantities: '
823: || 'Inventory Item Id := ' || x_atp_peg_tab.inventory_item_id(j));
824: msc_util.msc_log('Calculate_Relief_Quantities: '
825: || 'fixed_lt : = ' || x_atp_peg_tab.fixed_lt(j));
826: msc_util.msc_log('Calculate_Relief_Quantities: '
827: || 'variable_lt : = ' || x_atp_peg_tab.variable_lt(j));
828: msc_util.msc_log('Calculate_Relief_Quantities: '
829: || 'l_process_lt : = ' || l_process_lt);
830: msc_util.msc_log (' Calculate_Relief_Quantities '

Line 828: msc_util.msc_log('Calculate_Relief_Quantities: '

824: msc_util.msc_log('Calculate_Relief_Quantities: '
825: || 'fixed_lt : = ' || x_atp_peg_tab.fixed_lt(j));
826: msc_util.msc_log('Calculate_Relief_Quantities: '
827: || 'variable_lt : = ' || x_atp_peg_tab.variable_lt(j));
828: msc_util.msc_log('Calculate_Relief_Quantities: '
829: || 'l_process_lt : = ' || l_process_lt);
830: msc_util.msc_log (' Calculate_Relief_Quantities '
831: || 'Transaction Date for Item: ' || x_atp_peg_tab.transaction_date(j));
832: END IF;

Line 830: msc_util.msc_log (' Calculate_Relief_Quantities '

826: msc_util.msc_log('Calculate_Relief_Quantities: '
827: || 'variable_lt : = ' || x_atp_peg_tab.variable_lt(j));
828: msc_util.msc_log('Calculate_Relief_Quantities: '
829: || 'l_process_lt : = ' || l_process_lt);
830: msc_util.msc_log (' Calculate_Relief_Quantities '
831: || 'Transaction Date for Item: ' || x_atp_peg_tab.transaction_date(j));
832: END IF;
833: END IF;
834: -- End Bug 3445664 Fix transaction date calculation

Line 842: msc_util.msc_log (' l_relief_quantity : '|| l_relief_quantity);

838: -- Update the remaining relief_qty.
839: l_rem_relief_qty := l_tot_relief_qty - l_relief_quantity;
840:
841: IF PG_DEBUG in ('Y', 'C') THEN
842: msc_util.msc_log (' l_relief_quantity : '|| l_relief_quantity);
843: msc_util.msc_log (' l_rem_relief_qty : '|| l_rem_relief_qty);
844: END IF;
845: -- Changed the exit condition to account for relief_ratio.
846: -- Bug 3701093

Line 843: msc_util.msc_log (' l_rem_relief_qty : '|| l_rem_relief_qty);

839: l_rem_relief_qty := l_tot_relief_qty - l_relief_quantity;
840:
841: IF PG_DEBUG in ('Y', 'C') THEN
842: msc_util.msc_log (' l_relief_quantity : '|| l_relief_quantity);
843: msc_util.msc_log (' l_rem_relief_qty : '|| l_rem_relief_qty);
844: END IF;
845: -- Changed the exit condition to account for relief_ratio.
846: -- Bug 3701093
847: -- EXIT WHEN l_tot_relief_qty = l_relief_quantity;

Line 861: msc_util.msc_log (' l_proc_relief_tot Before : '|| l_proc_relief_tot);

857: x_atp_peg_tab.demand_id(j) = x_atp_peg_tab.demand_id(i) AND
858: x_atp_peg_tab.supply_id(j) = x_atp_peg_tab.supply_id(i) AND
859: x_atp_peg_tab.relief_quantity(j) IS NOT NULL) THEN
860: IF PG_DEBUG in ('Y', 'C') THEN
861: msc_util.msc_log (' l_proc_relief_tot Before : '|| l_proc_relief_tot);
862: msc_util.msc_log (' l_rem_relief_qty Before : '|| l_rem_relief_qty);
863: END IF;
864: -- Update the already processed relief_total.
865: l_proc_relief_tot := l_proc_relief_tot + x_atp_peg_tab.relief_quantity(j);

Line 862: msc_util.msc_log (' l_rem_relief_qty Before : '|| l_rem_relief_qty);

858: x_atp_peg_tab.supply_id(j) = x_atp_peg_tab.supply_id(i) AND
859: x_atp_peg_tab.relief_quantity(j) IS NOT NULL) THEN
860: IF PG_DEBUG in ('Y', 'C') THEN
861: msc_util.msc_log (' l_proc_relief_tot Before : '|| l_proc_relief_tot);
862: msc_util.msc_log (' l_rem_relief_qty Before : '|| l_rem_relief_qty);
863: END IF;
864: -- Update the already processed relief_total.
865: l_proc_relief_tot := l_proc_relief_tot + x_atp_peg_tab.relief_quantity(j);
866: -- Update the remaining relief_qty.

Line 869: msc_util.msc_log (' l_proc_relief_tot After : '|| l_proc_relief_tot);

865: l_proc_relief_tot := l_proc_relief_tot + x_atp_peg_tab.relief_quantity(j);
866: -- Update the remaining relief_qty.
867: l_rem_relief_qty := l_tot_relief_qty - x_atp_peg_tab.relief_quantity(j);
868: IF PG_DEBUG in ('Y', 'C') THEN
869: msc_util.msc_log (' l_proc_relief_tot After : '|| l_proc_relief_tot);
870: msc_util.msc_log (' l_rem_relief_qty After : '|| l_rem_relief_qty);
871: END IF;
872: -- End Bug 3761805
873: END IF;

Line 870: msc_util.msc_log (' l_rem_relief_qty After : '|| l_rem_relief_qty);

866: -- Update the remaining relief_qty.
867: l_rem_relief_qty := l_tot_relief_qty - x_atp_peg_tab.relief_quantity(j);
868: IF PG_DEBUG in ('Y', 'C') THEN
869: msc_util.msc_log (' l_proc_relief_tot After : '|| l_proc_relief_tot);
870: msc_util.msc_log (' l_rem_relief_qty After : '|| l_rem_relief_qty);
871: END IF;
872: -- End Bug 3761805
873: END IF;
874:

Line 904: msc_util.msc_log (' Config Item Forecast consumes Demand');

900: x_atp_peg_tab.relief_quantity(i) := p_tot_relief_qty * l_peg_alloc_rel_ratio;
901: END IF;
902: -- End Bug 3805136
903: IF PG_DEBUG in ('Y', 'C') THEN
904: msc_util.msc_log (' Config Item Forecast consumes Demand');
905: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
906: END IF;
907: END IF;
908: -- End Bug 3805136

Line 905: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));

901: END IF;
902: -- End Bug 3805136
903: IF PG_DEBUG in ('Y', 'C') THEN
904: msc_util.msc_log (' Config Item Forecast consumes Demand');
905: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
906: END IF;
907: END IF;
908: -- End Bug 3805136
909:

Line 960: msc_util.msc_log (' Calling Calculate_Relief_Quantities again');

956: l_peg_relief_ratio := x_atp_peg_tab.relief_quantity(i) / x_atp_peg_tab.tot_relief_qty(i);
957: -- End Bug 3827097
958: END IF;
959: IF PG_DEBUG in ('Y', 'C') THEN
960: msc_util.msc_log (' Calling Calculate_Relief_Quantities again');
961: msc_util.msc_log (' x_atp_peg_tab.consumed_qty ' || x_atp_peg_tab.consumed_qty(i));
962: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
963: msc_util.msc_log (' x_atp_peg_tab.tot_relief_quantity ' || x_atp_peg_tab.tot_relief_qty(i));
964: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity ' || x_atp_peg_tab.allocated_quantity(i));

Line 961: msc_util.msc_log (' x_atp_peg_tab.consumed_qty ' || x_atp_peg_tab.consumed_qty(i));

957: -- End Bug 3827097
958: END IF;
959: IF PG_DEBUG in ('Y', 'C') THEN
960: msc_util.msc_log (' Calling Calculate_Relief_Quantities again');
961: msc_util.msc_log (' x_atp_peg_tab.consumed_qty ' || x_atp_peg_tab.consumed_qty(i));
962: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
963: msc_util.msc_log (' x_atp_peg_tab.tot_relief_quantity ' || x_atp_peg_tab.tot_relief_qty(i));
964: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity ' || x_atp_peg_tab.allocated_quantity(i));
965: msc_util.msc_log (' x_atp_peg_tab.exclude_flag ' || x_atp_peg_tab.exclude_flag(i));

Line 962: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));

958: END IF;
959: IF PG_DEBUG in ('Y', 'C') THEN
960: msc_util.msc_log (' Calling Calculate_Relief_Quantities again');
961: msc_util.msc_log (' x_atp_peg_tab.consumed_qty ' || x_atp_peg_tab.consumed_qty(i));
962: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
963: msc_util.msc_log (' x_atp_peg_tab.tot_relief_quantity ' || x_atp_peg_tab.tot_relief_qty(i));
964: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity ' || x_atp_peg_tab.allocated_quantity(i));
965: msc_util.msc_log (' x_atp_peg_tab.exclude_flag ' || x_atp_peg_tab.exclude_flag(i));
966: msc_util.msc_log (' l_peg_relief_ratio ' || l_peg_relief_ratio);

Line 963: msc_util.msc_log (' x_atp_peg_tab.tot_relief_quantity ' || x_atp_peg_tab.tot_relief_qty(i));

959: IF PG_DEBUG in ('Y', 'C') THEN
960: msc_util.msc_log (' Calling Calculate_Relief_Quantities again');
961: msc_util.msc_log (' x_atp_peg_tab.consumed_qty ' || x_atp_peg_tab.consumed_qty(i));
962: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
963: msc_util.msc_log (' x_atp_peg_tab.tot_relief_quantity ' || x_atp_peg_tab.tot_relief_qty(i));
964: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity ' || x_atp_peg_tab.allocated_quantity(i));
965: msc_util.msc_log (' x_atp_peg_tab.exclude_flag ' || x_atp_peg_tab.exclude_flag(i));
966: msc_util.msc_log (' l_peg_relief_ratio ' || l_peg_relief_ratio);
967: END IF;

Line 964: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity ' || x_atp_peg_tab.allocated_quantity(i));

960: msc_util.msc_log (' Calling Calculate_Relief_Quantities again');
961: msc_util.msc_log (' x_atp_peg_tab.consumed_qty ' || x_atp_peg_tab.consumed_qty(i));
962: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
963: msc_util.msc_log (' x_atp_peg_tab.tot_relief_quantity ' || x_atp_peg_tab.tot_relief_qty(i));
964: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity ' || x_atp_peg_tab.allocated_quantity(i));
965: msc_util.msc_log (' x_atp_peg_tab.exclude_flag ' || x_atp_peg_tab.exclude_flag(i));
966: msc_util.msc_log (' l_peg_relief_ratio ' || l_peg_relief_ratio);
967: END IF;
968: Calculate_Relief_Quantities(x_atp_peg_tab,

Line 965: msc_util.msc_log (' x_atp_peg_tab.exclude_flag ' || x_atp_peg_tab.exclude_flag(i));

961: msc_util.msc_log (' x_atp_peg_tab.consumed_qty ' || x_atp_peg_tab.consumed_qty(i));
962: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
963: msc_util.msc_log (' x_atp_peg_tab.tot_relief_quantity ' || x_atp_peg_tab.tot_relief_qty(i));
964: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity ' || x_atp_peg_tab.allocated_quantity(i));
965: msc_util.msc_log (' x_atp_peg_tab.exclude_flag ' || x_atp_peg_tab.exclude_flag(i));
966: msc_util.msc_log (' l_peg_relief_ratio ' || l_peg_relief_ratio);
967: END IF;
968: Calculate_Relief_Quantities(x_atp_peg_tab,
969: x_atp_peg_tab.pegging_id(i),

Line 966: msc_util.msc_log (' l_peg_relief_ratio ' || l_peg_relief_ratio);

962: msc_util.msc_log (' x_atp_peg_tab.relief_quantity ' || x_atp_peg_tab.relief_quantity(i));
963: msc_util.msc_log (' x_atp_peg_tab.tot_relief_quantity ' || x_atp_peg_tab.tot_relief_qty(i));
964: msc_util.msc_log (' x_atp_peg_tab.allocated_quantity ' || x_atp_peg_tab.allocated_quantity(i));
965: msc_util.msc_log (' x_atp_peg_tab.exclude_flag ' || x_atp_peg_tab.exclude_flag(i));
966: msc_util.msc_log (' l_peg_relief_ratio ' || l_peg_relief_ratio);
967: END IF;
968: Calculate_Relief_Quantities(x_atp_peg_tab,
969: x_atp_peg_tab.pegging_id(i),
970: x_atp_peg_tab.fixed_lt(i),

Line 994: msc_util.msc_log (' Non Match Item ' || x_atp_peg_tab.inventory_item_id(i) ||

990: -- End Bug 3761805
991: END IF;
992: ELSE
993: IF PG_DEBUG in ('Y', 'C') THEN
994: msc_util.msc_log (' Non Match Item ' || x_atp_peg_tab.inventory_item_id(i) ||
995: ' Pegging ' || x_atp_peg_tab.pegging_id(i) ||
996: ' Prev Pegging ' || x_atp_peg_tab.prev_pegging_id(i));
997: END IF;
998: END IF;

Line 1002: msc_util.msc_log (' ***** END Calculate_Relief_Quantities. ***** ');

998: END IF;
999: END LOOP;
1000:
1001: IF PG_DEBUG in ('Y', 'C') THEN
1002: msc_util.msc_log (' ***** END Calculate_Relief_Quantities. ***** ');
1003: END IF;
1004: EXCEPTION
1005: WHEN OTHERS THEN
1006: IF PG_DEBUG in ('Y', 'C') THEN

Line 1007: msc_util.msc_log ('Calculate_Relief_Quantities. '|| sqlcode || ': ' || sqlerrm);

1003: END IF;
1004: EXCEPTION
1005: WHEN OTHERS THEN
1006: IF PG_DEBUG in ('Y', 'C') THEN
1007: msc_util.msc_log ('Calculate_Relief_Quantities. '|| sqlcode || ': ' || sqlerrm);
1008: END IF;
1009: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1010:
1011: END Calculate_Relief_Quantities;

Line 1035: msc_util.msc_log('***** Begin Generate_Resource_Pegging Procedure *****');

1031:
1032: BEGIN
1033:
1034: IF PG_DEBUG in ('Y', 'C') THEN
1035: msc_util.msc_log('***** Begin Generate_Resource_Pegging Procedure *****');
1036: END IF;
1037:
1038: x_return_status := FND_API.G_RET_STS_SUCCESS;
1039:

Line 1200: msc_util.msc_log ('Generate_Resource_Pegging. Error : ' || sqlerrm);

1196:
1197: EXCEPTION
1198: WHEN OTHERS THEN
1199: IF PG_DEBUG in ('Y', 'C') THEN
1200: msc_util.msc_log ('Generate_Resource_Pegging. Error : ' || sqlerrm);
1201: END IF;
1202: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1203:
1204: END Generate_Resource_Pegging ;

Line 1233: msc_util.msc_log('***** Begin Get_Forecast_Consumption Procedure *****');

1229:
1230: k := p_array_idx; -- assign to a variable for simplicity.
1231:
1232: IF PG_DEBUG in ('Y', 'C') THEN
1233: msc_util.msc_log('***** Begin Get_Forecast_Consumption Procedure *****');
1234: msc_util.msc_log(' Instance Id atp_peg_tab.sr_instance_id(k) : ' ||
1235: atp_peg_tab.sr_instance_id(k) );
1236: msc_util.msc_log(' Plan Id : ' || atp_peg_tab.plan_id(k) );
1237: msc_util.msc_log(' Organization Id : ' || atp_peg_tab.organization_id(k) );

Line 1234: msc_util.msc_log(' Instance Id atp_peg_tab.sr_instance_id(k) : ' ||

1230: k := p_array_idx; -- assign to a variable for simplicity.
1231:
1232: IF PG_DEBUG in ('Y', 'C') THEN
1233: msc_util.msc_log('***** Begin Get_Forecast_Consumption Procedure *****');
1234: msc_util.msc_log(' Instance Id atp_peg_tab.sr_instance_id(k) : ' ||
1235: atp_peg_tab.sr_instance_id(k) );
1236: msc_util.msc_log(' Plan Id : ' || atp_peg_tab.plan_id(k) );
1237: msc_util.msc_log(' Organization Id : ' || atp_peg_tab.organization_id(k) );
1238: msc_util.msc_log(' Sales Order/Origianl Demand Id : ' ||

Line 1236: msc_util.msc_log(' Plan Id : ' || atp_peg_tab.plan_id(k) );

1232: IF PG_DEBUG in ('Y', 'C') THEN
1233: msc_util.msc_log('***** Begin Get_Forecast_Consumption Procedure *****');
1234: msc_util.msc_log(' Instance Id atp_peg_tab.sr_instance_id(k) : ' ||
1235: atp_peg_tab.sr_instance_id(k) );
1236: msc_util.msc_log(' Plan Id : ' || atp_peg_tab.plan_id(k) );
1237: msc_util.msc_log(' Organization Id : ' || atp_peg_tab.organization_id(k) );
1238: msc_util.msc_log(' Sales Order/Origianl Demand Id : ' ||
1239: atp_peg_tab.original_demand_id(k) );
1240: msc_util.msc_log(' Parent(Config) Item Id : ' ||

Line 1237: msc_util.msc_log(' Organization Id : ' || atp_peg_tab.organization_id(k) );

1233: msc_util.msc_log('***** Begin Get_Forecast_Consumption Procedure *****');
1234: msc_util.msc_log(' Instance Id atp_peg_tab.sr_instance_id(k) : ' ||
1235: atp_peg_tab.sr_instance_id(k) );
1236: msc_util.msc_log(' Plan Id : ' || atp_peg_tab.plan_id(k) );
1237: msc_util.msc_log(' Organization Id : ' || atp_peg_tab.organization_id(k) );
1238: msc_util.msc_log(' Sales Order/Origianl Demand Id : ' ||
1239: atp_peg_tab.original_demand_id(k) );
1240: msc_util.msc_log(' Parent(Config) Item Id : ' ||
1241: atp_peg_tab.inventory_item_id(k) );

Line 1238: msc_util.msc_log(' Sales Order/Origianl Demand Id : ' ||

1234: msc_util.msc_log(' Instance Id atp_peg_tab.sr_instance_id(k) : ' ||
1235: atp_peg_tab.sr_instance_id(k) );
1236: msc_util.msc_log(' Plan Id : ' || atp_peg_tab.plan_id(k) );
1237: msc_util.msc_log(' Organization Id : ' || atp_peg_tab.organization_id(k) );
1238: msc_util.msc_log(' Sales Order/Origianl Demand Id : ' ||
1239: atp_peg_tab.original_demand_id(k) );
1240: msc_util.msc_log(' Parent(Config) Item Id : ' ||
1241: atp_peg_tab.inventory_item_id(k) );
1242: msc_util.msc_log(' Base Model Id : ' || atp_peg_tab.base_item_id(k) );

Line 1240: msc_util.msc_log(' Parent(Config) Item Id : ' ||

1236: msc_util.msc_log(' Plan Id : ' || atp_peg_tab.plan_id(k) );
1237: msc_util.msc_log(' Organization Id : ' || atp_peg_tab.organization_id(k) );
1238: msc_util.msc_log(' Sales Order/Origianl Demand Id : ' ||
1239: atp_peg_tab.original_demand_id(k) );
1240: msc_util.msc_log(' Parent(Config) Item Id : ' ||
1241: atp_peg_tab.inventory_item_id(k) );
1242: msc_util.msc_log(' Base Model Id : ' || atp_peg_tab.base_item_id(k) );
1243: END IF;
1244:

Line 1242: msc_util.msc_log(' Base Model Id : ' || atp_peg_tab.base_item_id(k) );

1238: msc_util.msc_log(' Sales Order/Origianl Demand Id : ' ||
1239: atp_peg_tab.original_demand_id(k) );
1240: msc_util.msc_log(' Parent(Config) Item Id : ' ||
1241: atp_peg_tab.inventory_item_id(k) );
1242: msc_util.msc_log(' Base Model Id : ' || atp_peg_tab.base_item_id(k) );
1243: END IF;
1244:
1245: x_return_status := FND_API.G_RET_STS_SUCCESS;
1246:

Line 1443: msc_util.msc_log(' Count After Model Overconsumption Check : ' ||

1439: decode(fcst1.inventory_item_id, fcst1.parent_item_id, 0, atp_peg_tab.base_item_id(k), 1, fcst1.inventory_item_id)
1440: ORDER BY decode(fcst1.inventory_item_id, fcst1.parent_item_id, 0, atp_peg_tab.base_item_id(k), 1, fcst1.inventory_item_id);
1441: --End Modified SQL for Bug 6046524
1442: IF PG_DEBUG in ('Y', 'C') THEN
1443: msc_util.msc_log(' Count After Model Overconsumption Check : ' ||
1444: x_fcst_data_tab.inventory_item_id.COUNT);
1445: END IF;
1446:
1447: -- Bug 3701093 pure Config Item consumption data only when Model overconsumption

Line 1501: msc_util.msc_log(' Count After Config Check : ' ||

1497: >= fcst.sales_order_qty
1498: ;
1499:
1500: IF PG_DEBUG in ('Y', 'C') THEN
1501: msc_util.msc_log(' Count After Config Check : ' ||
1502: x_fcst_data_tab.inventory_item_id.COUNT);
1503: msc_util.msc_log(' Allocated Quantity : ' || atp_peg_tab.allocated_quantity(k));
1504: END IF;
1505: -- End Bug 3701093

Line 1503: msc_util.msc_log(' Allocated Quantity : ' || atp_peg_tab.allocated_quantity(k));

1499:
1500: IF PG_DEBUG in ('Y', 'C') THEN
1501: msc_util.msc_log(' Count After Config Check : ' ||
1502: x_fcst_data_tab.inventory_item_id.COUNT);
1503: msc_util.msc_log(' Allocated Quantity : ' || atp_peg_tab.allocated_quantity(k));
1504: END IF;
1505: -- End Bug 3701093
1506: END IF;
1507: -- End Bug 3701093

Line 1532: msc_util.msc_log('Get_Fcst_Cons: Model or Config in Forecast Data');

1528: atp_peg_tab.inventory_item_id(k) ) ) THEN
1529: -- The config item or model has been forecast
1530: l_fcst_mod_flag := 1;
1531: IF PG_DEBUG in ('Y', 'C') THEN
1532: msc_util.msc_log('Get_Fcst_Cons: Model or Config in Forecast Data');
1533: msc_util.msc_log('Get_Fcst_Cons: Forecast Inventory_Item_id : '||
1534: x_fcst_data_tab.inventory_item_id(i));
1535: END IF;
1536: END IF;

Line 1533: msc_util.msc_log('Get_Fcst_Cons: Forecast Inventory_Item_id : '||

1529: -- The config item or model has been forecast
1530: l_fcst_mod_flag := 1;
1531: IF PG_DEBUG in ('Y', 'C') THEN
1532: msc_util.msc_log('Get_Fcst_Cons: Model or Config in Forecast Data');
1533: msc_util.msc_log('Get_Fcst_Cons: Forecast Inventory_Item_id : '||
1534: x_fcst_data_tab.inventory_item_id(i));
1535: END IF;
1536: END IF;
1537: END LOOP;

Line 1543: msc_util.msc_log('Get Data from msc_system_items for base_item_id');

1539: -- End Bug 3417410 Determine if model line is present in data
1540:
1541: IF l_fcst_mod_flag = 0 THEN -- Bug 3417410 If no model line is present in forecast
1542: IF PG_DEBUG in ('Y', 'C') THEN
1543: msc_util.msc_log('Get Data from msc_system_items for base_item_id');
1544: msc_util.msc_log('Provide default values for other forecast fields ');
1545: END IF;
1546: -- Get data from msc_system_items for the base_item_id
1547: -- and provide default values for other forecast related fields.

Line 1544: msc_util.msc_log('Provide default values for other forecast fields ');

1540:
1541: IF l_fcst_mod_flag = 0 THEN -- Bug 3417410 If no model line is present in forecast
1542: IF PG_DEBUG in ('Y', 'C') THEN
1543: msc_util.msc_log('Get Data from msc_system_items for base_item_id');
1544: msc_util.msc_log('Provide default values for other forecast fields ');
1545: END IF;
1546: -- Get data from msc_system_items for the base_item_id
1547: -- and provide default values for other forecast related fields.
1548: -- Note Local forecast is assumed as a default.

Line 1605: msc_util.msc_log('Get_Fcst_Cons-Total Forecasted Items : '|| l_fcst_cnt);

1601:
1602: l_fcst_cnt := x_fcst_data_tab.inventory_item_id.COUNT;
1603:
1604: IF PG_DEBUG in ('Y', 'C') THEN
1605: msc_util.msc_log('Get_Fcst_Cons-Total Forecasted Items : '|| l_fcst_cnt);
1606: END IF;
1607:
1608: -- Bug 3701093 COUNT > 0 check only, changed from <>
1609: IF l_fcst_data_tab.inventory_item_id.COUNT > 0 THEN

Line 1642: msc_util.msc_log ( 'No plan data for Base Model ' ||

1638: ELSE
1639: -- No data in msc_system_items for the base model
1640: -- Print out a Warning message.
1641: IF PG_DEBUG in ('Y', 'C') THEN
1642: msc_util.msc_log ( 'No plan data for Base Model ' ||
1643: atp_peg_tab.base_item_id(k) );
1644: msc_util.msc_log('Get_Fcst_Cons-No plan data for Base Model : '||
1645: atp_peg_tab.base_item_id(k) );
1646: END IF;

Line 1644: msc_util.msc_log('Get_Fcst_Cons-No plan data for Base Model : '||

1640: -- Print out a Warning message.
1641: IF PG_DEBUG in ('Y', 'C') THEN
1642: msc_util.msc_log ( 'No plan data for Base Model ' ||
1643: atp_peg_tab.base_item_id(k) );
1644: msc_util.msc_log('Get_Fcst_Cons-No plan data for Base Model : '||
1645: atp_peg_tab.base_item_id(k) );
1646: END IF;
1647: x_fcst_data_tab.plan_id(l_fcst_cnt) := atp_peg_tab.plan_id(k);
1648: x_fcst_data_tab.sr_instance_id(l_fcst_cnt) := atp_peg_tab.sr_instance_id(k);

Line 1686: msc_util.msc_log ('Get_Forecast_Consumption. Error : ' || sqlerrm);

1682:
1683: EXCEPTION
1684: WHEN OTHERS THEN
1685: IF PG_DEBUG in ('Y', 'C') THEN
1686: msc_util.msc_log ('Get_Forecast_Consumption. Error : ' || sqlerrm);
1687: END IF;
1688: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1689:
1690: END Get_Forecast_Consumption;

Line 1704: msc_util.msc_log('***** Begin Create_Simple_Pegging Procedure *****');

1700: l_count NUMBER := 0;
1701: BEGIN
1702:
1703: IF PG_DEBUG in ('Y', 'C') THEN
1704: msc_util.msc_log('***** Begin Create_Simple_Pegging Procedure *****');
1705: END IF;
1706:
1707: x_return_status := FND_API.G_RET_STS_SUCCESS;
1708:

Line 1710: msc_util.msc_log(' atp_peg_det.reference_item_id.COUNT ' ||

1706:
1707: x_return_status := FND_API.G_RET_STS_SUCCESS;
1708:
1709: IF PG_DEBUG in ('Y', 'C') THEN
1710: msc_util.msc_log(' atp_peg_det.reference_item_id.COUNT ' ||
1711: atp_peg_det.reference_item_id.COUNT);
1712: msc_util.msc_log('atp_peg_tab.reference_item_id.COUNT ' ||
1713: atp_peg_tab.reference_item_id.COUNT);
1714: END IF;

Line 1712: msc_util.msc_log('atp_peg_tab.reference_item_id.COUNT ' ||

1708:
1709: IF PG_DEBUG in ('Y', 'C') THEN
1710: msc_util.msc_log(' atp_peg_det.reference_item_id.COUNT ' ||
1711: atp_peg_det.reference_item_id.COUNT);
1712: msc_util.msc_log('atp_peg_tab.reference_item_id.COUNT ' ||
1713: atp_peg_tab.reference_item_id.COUNT);
1714: END IF;
1715:
1716: l_count := atp_peg_tab.reference_item_id.COUNT;

Line 1723: msc_util.msc_log(' Item Id ' || atp_peg_det.inventory_item_id(n));

1719: -- First Call to extend the tables in atp_peg_tab.
1720: Extend_Atp_Peg (atp_peg_tab, l_return_status, 1);
1721:
1722: IF PG_DEBUG in ('Y', 'C') THEN
1723: msc_util.msc_log(' Item Id ' || atp_peg_det.inventory_item_id(n));
1724: msc_util.msc_log(' atp_peg_tab.pegging_id ' ||
1725: atp_peg_det.pegging_id(n));
1726: END IF;
1727: l_count := l_count + 1;

Line 1724: msc_util.msc_log(' atp_peg_tab.pegging_id ' ||

1720: Extend_Atp_Peg (atp_peg_tab, l_return_status, 1);
1721:
1722: IF PG_DEBUG in ('Y', 'C') THEN
1723: msc_util.msc_log(' Item Id ' || atp_peg_det.inventory_item_id(n));
1724: msc_util.msc_log(' atp_peg_tab.pegging_id ' ||
1725: atp_peg_det.pegging_id(n));
1726: END IF;
1727: l_count := l_count + 1;
1728:

Line 1830: msc_util.msc_log(' atp_peg_tab.allocated_quantity ' ||

1826: atp_peg_tab.allocated_quantity(l_count) := atp_peg_det.allocated_quantity(n);
1827:
1828:
1829: IF PG_DEBUG in ('Y', 'C') THEN
1830: msc_util.msc_log(' atp_peg_tab.allocated_quantity ' ||
1831: atp_peg_det.allocated_quantity(n));
1832: END IF;
1833: -- Determine Relief Type
1834: -- For material supplies the relief type is POs

Line 1838: msc_util.msc_log(' atp_peg_tab.reference_item_id.COUNT ' ||

1834: -- For material supplies the relief type is POs
1835: atp_peg_tab.relief_type(l_count) := 2; -- Relief Type is PO.
1836: END IF;
1837: END LOOP;
1838: msc_util.msc_log(' atp_peg_tab.reference_item_id.COUNT ' ||
1839: atp_peg_tab.reference_item_id.COUNT);
1840: EXCEPTION
1841: WHEN OTHERS THEN
1842: IF PG_DEBUG in ('Y', 'C') THEN

Line 1843: msc_util.msc_log ('Create_Simple_Pegging. Error : ' || sqlerrm);

1839: atp_peg_tab.reference_item_id.COUNT);
1840: EXCEPTION
1841: WHEN OTHERS THEN
1842: IF PG_DEBUG in ('Y', 'C') THEN
1843: msc_util.msc_log ('Create_Simple_Pegging. Error : ' || sqlerrm);
1844: END IF;
1845: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1846:
1847: END Create_Simple_Pegging;

Line 1870: msc_util.msc_log('***** Begin Create_Pre_Allocation_Reliefs Procedure *****');

1866:
1867: BEGIN
1868:
1869: IF PG_DEBUG in ('Y', 'C') THEN
1870: msc_util.msc_log('***** Begin Create_Pre_Allocation_Reliefs Procedure *****');
1871: msc_util.msc_log(' Plan Id : ' || p_plan_id );
1872: msc_util.msc_log(' Insert Table parameter : ' || p_insert_table );
1873: msc_util.msc_log(' User Id Paramenter : ' || p_user_id );
1874: msc_util.msc_log(' Date Parameter : ' || p_sysdate );

Line 1871: msc_util.msc_log(' Plan Id : ' || p_plan_id );

1867: BEGIN
1868:
1869: IF PG_DEBUG in ('Y', 'C') THEN
1870: msc_util.msc_log('***** Begin Create_Pre_Allocation_Reliefs Procedure *****');
1871: msc_util.msc_log(' Plan Id : ' || p_plan_id );
1872: msc_util.msc_log(' Insert Table parameter : ' || p_insert_table );
1873: msc_util.msc_log(' User Id Paramenter : ' || p_user_id );
1874: msc_util.msc_log(' Date Parameter : ' || p_sysdate );
1875: END IF;

Line 1872: msc_util.msc_log(' Insert Table parameter : ' || p_insert_table );

1868:
1869: IF PG_DEBUG in ('Y', 'C') THEN
1870: msc_util.msc_log('***** Begin Create_Pre_Allocation_Reliefs Procedure *****');
1871: msc_util.msc_log(' Plan Id : ' || p_plan_id );
1872: msc_util.msc_log(' Insert Table parameter : ' || p_insert_table );
1873: msc_util.msc_log(' User Id Paramenter : ' || p_user_id );
1874: msc_util.msc_log(' Date Parameter : ' || p_sysdate );
1875: END IF;
1876:

Line 1873: msc_util.msc_log(' User Id Paramenter : ' || p_user_id );

1869: IF PG_DEBUG in ('Y', 'C') THEN
1870: msc_util.msc_log('***** Begin Create_Pre_Allocation_Reliefs Procedure *****');
1871: msc_util.msc_log(' Plan Id : ' || p_plan_id );
1872: msc_util.msc_log(' Insert Table parameter : ' || p_insert_table );
1873: msc_util.msc_log(' User Id Paramenter : ' || p_user_id );
1874: msc_util.msc_log(' Date Parameter : ' || p_sysdate );
1875: END IF;
1876:
1877: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 1874: msc_util.msc_log(' Date Parameter : ' || p_sysdate );

1870: msc_util.msc_log('***** Begin Create_Pre_Allocation_Reliefs Procedure *****');
1871: msc_util.msc_log(' Plan Id : ' || p_plan_id );
1872: msc_util.msc_log(' Insert Table parameter : ' || p_insert_table );
1873: msc_util.msc_log(' User Id Paramenter : ' || p_user_id );
1874: msc_util.msc_log(' Date Parameter : ' || p_sysdate );
1875: END IF;
1876:
1877: x_return_status := FND_API.G_RET_STS_SUCCESS;
1878:

Line 1883: msc_util.msc_log(' Inserting Demands');

1879: -- Set the relief type for only demands with Allocated ATP on.
1880: l_relief_type := 5;
1881:
1882: IF PG_DEBUG in ('Y', 'C') THEN
1883: msc_util.msc_log(' Inserting Demands');
1884: END IF;
1885:
1886: l_sql_stmt_1 := 'INSERT INTO ' || p_insert_table || -- actually the insert table parameter.
1887: ' (reference_item_id, inventory_item_id, plan_id,

Line 1929: msc_util.msc_log('Create_Pre_Allocation_Reliefs: Number of Demand rows inserted '||

1925: l_def_dmd_class, l_relief_type,
1926: p_user_id, p_sysdate, p_user_id, p_sysdate, p_plan_id;
1927:
1928: IF PG_DEBUG in ('Y', 'C') THEN
1929: msc_util.msc_log('Create_Pre_Allocation_Reliefs: Number of Demand rows inserted '||
1930: SQL%ROWCOUNT);
1931: END IF;
1932:
1933: -- Set the relief type for only supplies with Allocated ATP on.

Line 1937: msc_util.msc_log(' Inserting Supplies');

1933: -- Set the relief type for only supplies with Allocated ATP on.
1934: l_relief_type := 6;
1935:
1936: IF PG_DEBUG in ('Y', 'C') THEN
1937: msc_util.msc_log(' Inserting Supplies');
1938: END IF;
1939:
1940: l_sql_stmt_1 := 'INSERT INTO ' || p_insert_table || -- actually the insert table parameter.
1941: ' (reference_item_id, inventory_item_id, plan_id,

Line 1983: msc_util.msc_log('Create_Pre_Allocation_Reliefs: Number of Supply rows inserted '||

1979: l_def_dmd_class, l_relief_type,
1980: p_user_id, p_sysdate, p_user_id, p_sysdate, p_plan_id;
1981:
1982: IF PG_DEBUG in ('Y', 'C') THEN
1983: msc_util.msc_log('Create_Pre_Allocation_Reliefs: Number of Supply rows inserted '||
1984: SQL%ROWCOUNT);
1985: END IF;
1986:
1987: EXCEPTION

Line 1990: msc_util.msc_log('Inside main exception of Create_Pre_Allocation_Reliefs');

1986:
1987: EXCEPTION
1988: WHEN OTHERS THEN
1989: IF PG_DEBUG in ('Y', 'C') THEN
1990: msc_util.msc_log('Inside main exception of Create_Pre_Allocation_Reliefs');
1991: msc_util.msc_log ('Create_Pre_Allocation_Reliefs. Error : ' || sqlcode || ': '|| sqlerrm);
1992: END IF;
1993: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1994:

Line 1991: msc_util.msc_log ('Create_Pre_Allocation_Reliefs. Error : ' || sqlcode || ': '|| sqlerrm);

1987: EXCEPTION
1988: WHEN OTHERS THEN
1989: IF PG_DEBUG in ('Y', 'C') THEN
1990: msc_util.msc_log('Inside main exception of Create_Pre_Allocation_Reliefs');
1991: msc_util.msc_log ('Create_Pre_Allocation_Reliefs. Error : ' || sqlcode || ': '|| sqlerrm);
1992: END IF;
1993: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1994:
1995: END Create_Pre_Allocation_Reliefs;

Line 2024: msc_util.msc_log('***** Begin Get_Pegging_Data_Loop (Get_Pegging_Loop) *****');

2020: i NUMBER;
2021:
2022: BEGIN
2023: IF PG_DEBUG in ('Y', 'C') THEN
2024: msc_util.msc_log('***** Begin Get_Pegging_Data_Loop (Get_Pegging_Loop) *****');
2025: msc_util.msc_log('Get_Pegging_Loop : p_plan_id ' || p_plan_id);
2026: END IF;
2027:
2028: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2025: msc_util.msc_log('Get_Pegging_Loop : p_plan_id ' || p_plan_id);

2021:
2022: BEGIN
2023: IF PG_DEBUG in ('Y', 'C') THEN
2024: msc_util.msc_log('***** Begin Get_Pegging_Data_Loop (Get_Pegging_Loop) *****');
2025: msc_util.msc_log('Get_Pegging_Loop : p_plan_id ' || p_plan_id);
2026: END IF;
2027:
2028: x_return_status := FND_API.G_RET_STS_SUCCESS;
2029:

Line 2044: msc_util.msc_log('Error getting performance param: ' || sqlcode || ': ' || sqlerrm);

2040: FROM msc_atp_parameters
2041: WHERE rownum = 1;
2042: EXCEPTION
2043: WHEN others THEN
2044: msc_util.msc_log('Error getting performance param: ' || sqlcode || ': ' || sqlerrm);
2045: l_hash_size := -1;
2046: l_sort_size := -1;
2047: l_parallel_degree := 1;
2048: END;

Line 2051: msc_util.msc_log('Hash: ' || l_hash_size || ' Sort: ' || l_sort_size ||

2047: l_parallel_degree := 1;
2048: END;
2049:
2050: IF PG_DEBUG in ('Y', 'C') THEN
2051: msc_util.msc_log('Hash: ' || l_hash_size || ' Sort: ' || l_sort_size ||
2052: ' Parallel: ' || l_parallel_degree);
2053: END IF;
2054:
2055: IF NVL(l_hash_size, -1) <> -1 THEN

Line 2057: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);

2053: END IF;
2054:
2055: IF NVL(l_hash_size, -1) <> -1 THEN
2056: l_sql_stmt_1 := 'alter session set hash_area_size = ' || to_char(l_hash_size);
2057: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);
2058: execute immediate l_sql_stmt_1;
2059: END IF;
2060:
2061: IF NVL(l_sort_size, -1) <> -1 THEN

Line 2063: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);

2059: END IF;
2060:
2061: IF NVL(l_sort_size, -1) <> -1 THEN
2062: l_sql_stmt_1 := 'alter session set sort_area_size = ' || to_char(l_sort_size);
2063: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);
2064: execute immediate l_sql_stmt_1;
2065: END IF;
2066:
2067: -- Now obtain the pegging data into Global Temporary Table in a Loop.

Line 2193: msc_util.msc_log('Gen_Atp_Pegging : Stage 1 ' );

2189: -- End Bug 3717618
2190: ;
2191:
2192: IF PG_DEBUG in ('Y', 'C') THEN
2193: msc_util.msc_log('Gen_Atp_Pegging : Stage 1 ' );
2194: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2195: END IF;
2196:
2197: -- Update Pegging data with End demand Id. Information

Line 2194: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );

2190: ;
2191:
2192: IF PG_DEBUG in ('Y', 'C') THEN
2193: msc_util.msc_log('Gen_Atp_Pegging : Stage 1 ' );
2194: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2195: END IF;
2196:
2197: -- Update Pegging data with End demand Id. Information
2198: -- CTO_PF_PRJ changes.

Line 2226: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );

2222: -1) -- CMRO
2223: ;
2224:
2225: IF PG_DEBUG in ('Y', 'C') THEN
2226: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2227: END IF;
2228:
2229: -- Update Pegging data with demand Information
2230:

Line 2323: msc_util.msc_log('Gen_Atp_Pegging : Stage 2 ' );

2319: -- fetch into l_original_demand_id is not necessary.
2320:
2321:
2322: IF PG_DEBUG in ('Y', 'C') THEN
2323: msc_util.msc_log('Gen_Atp_Pegging : Stage 2 ' );
2324: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2325: END IF;
2326:
2327:

Line 2324: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );

2320:
2321:
2322: IF PG_DEBUG in ('Y', 'C') THEN
2323: msc_util.msc_log('Gen_Atp_Pegging : Stage 2 ' );
2324: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2325: END IF;
2326:
2327:
2328: -- Bug 3750638 Initialize the Count of Items to be processed.

Line 2337: msc_util.msc_log('Gen_Atp_Pegging : Total Config Items ' ||

2333: -- N levels of Configuration Items.
2334: WHILE l_multi_config_count > 0 LOOP
2335: -- Bug 3750638 Introduce FORALL loop for processing Config Items.
2336: IF PG_DEBUG in ('Y', 'C') THEN
2337: msc_util.msc_log('Gen_Atp_Pegging : Total Config Items ' ||
2338: 'l_multi_config_count ' || l_multi_config_count);
2339: END IF;
2340: FOR n_idx IN 1..l_multi_config_count LOOP
2341: IF PG_DEBUG in ('Y', 'C') THEN

Line 2342: msc_util.msc_log('Gen_Atp_Pegging : Config Instance_Id ' ||

2338: 'l_multi_config_count ' || l_multi_config_count);
2339: END IF;
2340: FOR n_idx IN 1..l_multi_config_count LOOP
2341: IF PG_DEBUG in ('Y', 'C') THEN
2342: msc_util.msc_log('Gen_Atp_Pegging : Config Instance_Id ' ||
2343: L_Config_Sup.SR_INSTANCE_ID(n_idx) );
2344: msc_util.msc_log('Gen_Atp_Pegging : Config Item_Id ' ||
2345: L_Config_Sup.INVENTORY_ITEM_ID(n_idx) );
2346: msc_util.msc_log('Gen_Atp_Pegging : Config Supply_Id ' ||

Line 2344: msc_util.msc_log('Gen_Atp_Pegging : Config Item_Id ' ||

2340: FOR n_idx IN 1..l_multi_config_count LOOP
2341: IF PG_DEBUG in ('Y', 'C') THEN
2342: msc_util.msc_log('Gen_Atp_Pegging : Config Instance_Id ' ||
2343: L_Config_Sup.SR_INSTANCE_ID(n_idx) );
2344: msc_util.msc_log('Gen_Atp_Pegging : Config Item_Id ' ||
2345: L_Config_Sup.INVENTORY_ITEM_ID(n_idx) );
2346: msc_util.msc_log('Gen_Atp_Pegging : Config Supply_Id ' ||
2347: L_Config_Sup.SUPPLY_ID(n_idx) );
2348: msc_util.msc_log('Gen_Atp_Pegging : Config Base_Item_Id ' ||

Line 2346: msc_util.msc_log('Gen_Atp_Pegging : Config Supply_Id ' ||

2342: msc_util.msc_log('Gen_Atp_Pegging : Config Instance_Id ' ||
2343: L_Config_Sup.SR_INSTANCE_ID(n_idx) );
2344: msc_util.msc_log('Gen_Atp_Pegging : Config Item_Id ' ||
2345: L_Config_Sup.INVENTORY_ITEM_ID(n_idx) );
2346: msc_util.msc_log('Gen_Atp_Pegging : Config Supply_Id ' ||
2347: L_Config_Sup.SUPPLY_ID(n_idx) );
2348: msc_util.msc_log('Gen_Atp_Pegging : Config Base_Item_Id ' ||
2349: L_Config_Sup.BASE_ITEM_ID(n_idx) );
2350: msc_util.msc_log('Gen_Atp_Pegging : Config Pegging_Id ' ||

Line 2348: msc_util.msc_log('Gen_Atp_Pegging : Config Base_Item_Id ' ||

2344: msc_util.msc_log('Gen_Atp_Pegging : Config Item_Id ' ||
2345: L_Config_Sup.INVENTORY_ITEM_ID(n_idx) );
2346: msc_util.msc_log('Gen_Atp_Pegging : Config Supply_Id ' ||
2347: L_Config_Sup.SUPPLY_ID(n_idx) );
2348: msc_util.msc_log('Gen_Atp_Pegging : Config Base_Item_Id ' ||
2349: L_Config_Sup.BASE_ITEM_ID(n_idx) );
2350: msc_util.msc_log('Gen_Atp_Pegging : Config Pegging_Id ' ||
2351: L_Config_Sup.PEGGING_ID(n_idx) );
2352: msc_util.msc_log('Gen_Atp_Pegging : Config End_Pegging_Id ' ||

Line 2350: msc_util.msc_log('Gen_Atp_Pegging : Config Pegging_Id ' ||

2346: msc_util.msc_log('Gen_Atp_Pegging : Config Supply_Id ' ||
2347: L_Config_Sup.SUPPLY_ID(n_idx) );
2348: msc_util.msc_log('Gen_Atp_Pegging : Config Base_Item_Id ' ||
2349: L_Config_Sup.BASE_ITEM_ID(n_idx) );
2350: msc_util.msc_log('Gen_Atp_Pegging : Config Pegging_Id ' ||
2351: L_Config_Sup.PEGGING_ID(n_idx) );
2352: msc_util.msc_log('Gen_Atp_Pegging : Config End_Pegging_Id ' ||
2353: L_Config_Sup.END_PEGGING_ID(n_idx) );
2354: END IF;

Line 2352: msc_util.msc_log('Gen_Atp_Pegging : Config End_Pegging_Id ' ||

2348: msc_util.msc_log('Gen_Atp_Pegging : Config Base_Item_Id ' ||
2349: L_Config_Sup.BASE_ITEM_ID(n_idx) );
2350: msc_util.msc_log('Gen_Atp_Pegging : Config Pegging_Id ' ||
2351: L_Config_Sup.PEGGING_ID(n_idx) );
2352: msc_util.msc_log('Gen_Atp_Pegging : Config End_Pegging_Id ' ||
2353: L_Config_Sup.END_PEGGING_ID(n_idx) );
2354: END IF;
2355: END LOOP;
2356:

Line 2502: msc_util.msc_log('Gen_Atp_Pegging : Transfer of config n_row_count ' || n_row_count);

2498: ;
2499:
2500: n_row_count := SQL%ROWCOUNT;
2501: IF PG_DEBUG in ('Y', 'C') THEN
2502: msc_util.msc_log('Gen_Atp_Pegging : Transfer of config n_row_count ' || n_row_count);
2503: END IF;
2504: -- Obtain the data for the components of the lower level configuration item(s)
2505: -- in the sales order.
2506: FORALL n_idx IN 1..l_multi_config_count

Line 2671: msc_util.msc_log('Gen_Atp_Pegging : Stage 3 ' );

2667: -- Bug 3750638 Get the total number of records.
2668: n_row_count := SQL%ROWCOUNT;
2669:
2670: IF PG_DEBUG in ('Y', 'C') THEN
2671: msc_util.msc_log('Gen_Atp_Pegging : Stage 3 ' );
2672: msc_util.msc_log('Gen_Atp_Pegging : Components of config n_row_count ' || n_row_count);
2673: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 2 ' || l_timestamp);
2674: END IF;
2675:

Line 2672: msc_util.msc_log('Gen_Atp_Pegging : Components of config n_row_count ' || n_row_count);

2668: n_row_count := SQL%ROWCOUNT;
2669:
2670: IF PG_DEBUG in ('Y', 'C') THEN
2671: msc_util.msc_log('Gen_Atp_Pegging : Stage 3 ' );
2672: msc_util.msc_log('Gen_Atp_Pegging : Components of config n_row_count ' || n_row_count);
2673: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 2 ' || l_timestamp);
2674: END IF;
2675:
2676:

Line 2673: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 2 ' || l_timestamp);

2669:
2670: IF PG_DEBUG in ('Y', 'C') THEN
2671: msc_util.msc_log('Gen_Atp_Pegging : Stage 3 ' );
2672: msc_util.msc_log('Gen_Atp_Pegging : Components of config n_row_count ' || n_row_count);
2673: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 2 ' || l_timestamp);
2674: END IF;
2675:
2676:
2677: -- update the supplies for the new demands

Line 2787: msc_util.msc_log('Gen_Atp_Pegging : Stage 4 ' );

2783: l_multi_config_count := L_Config_Sup.INVENTORY_ITEM_ID.COUNT;
2784: l_config_level := l_config_level + 1;
2785:
2786: IF PG_DEBUG in ('Y', 'C') THEN
2787: msc_util.msc_log('Gen_Atp_Pegging : Stage 4 ' );
2788: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2789: -- Bug 3750638 Print Out value of variables.
2790: msc_util.msc_log('Gen_Atp_Pegging : l_multi_config_count ' || l_multi_config_count );
2791: msc_util.msc_log('Gen_Atp_Pegging : l_config_level ' || l_config_level );

Line 2788: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );

2784: l_config_level := l_config_level + 1;
2785:
2786: IF PG_DEBUG in ('Y', 'C') THEN
2787: msc_util.msc_log('Gen_Atp_Pegging : Stage 4 ' );
2788: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2789: -- Bug 3750638 Print Out value of variables.
2790: msc_util.msc_log('Gen_Atp_Pegging : l_multi_config_count ' || l_multi_config_count );
2791: msc_util.msc_log('Gen_Atp_Pegging : l_config_level ' || l_config_level );
2792: END IF;

Line 2790: msc_util.msc_log('Gen_Atp_Pegging : l_multi_config_count ' || l_multi_config_count );

2786: IF PG_DEBUG in ('Y', 'C') THEN
2787: msc_util.msc_log('Gen_Atp_Pegging : Stage 4 ' );
2788: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2789: -- Bug 3750638 Print Out value of variables.
2790: msc_util.msc_log('Gen_Atp_Pegging : l_multi_config_count ' || l_multi_config_count );
2791: msc_util.msc_log('Gen_Atp_Pegging : l_config_level ' || l_config_level );
2792: END IF;
2793:
2794: END LOOP;

Line 2791: msc_util.msc_log('Gen_Atp_Pegging : l_config_level ' || l_config_level );

2787: msc_util.msc_log('Gen_Atp_Pegging : Stage 4 ' );
2788: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
2789: -- Bug 3750638 Print Out value of variables.
2790: msc_util.msc_log('Gen_Atp_Pegging : l_multi_config_count ' || l_multi_config_count );
2791: msc_util.msc_log('Gen_Atp_Pegging : l_config_level ' || l_config_level );
2792: END IF;
2793:
2794: END LOOP;
2795: -- End Bug 3750638

Line 2800: msc_util.msc_log ('Get_Pegging_Data_Loop. Error : ' || sqlcode || ': ' || sqlerrm);

2796:
2797: EXCEPTION
2798: WHEN OTHERS THEN
2799: IF PG_DEBUG in ('Y', 'C') THEN
2800: msc_util.msc_log ('Get_Pegging_Data_Loop. Error : ' || sqlcode || ': ' || sqlerrm);
2801: END IF;
2802: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2803:
2804: END Get_Pegging_Data_Loop;

Line 2918: msc_util.msc_log('***** Begin Generate_Simplified_Pegging (Gen_Atp_Pegging) *****');

2914:
2915: BEGIN
2916:
2917: IF PG_DEBUG in ('Y', 'C') THEN
2918: msc_util.msc_log('***** Begin Generate_Simplified_Pegging (Gen_Atp_Pegging) *****');
2919: msc_util.msc_log('Gen_Atp_Pegging : p_plan_id ' || p_plan_id);
2920: msc_util.msc_log('Gen_Atp_Pegging : p_share_partition ' || p_share_partition);
2921: msc_util.msc_log('Gen_Atp_Pegging : p_applsys_schema ' || p_applsys_schema);
2922: END IF;

Line 2919: msc_util.msc_log('Gen_Atp_Pegging : p_plan_id ' || p_plan_id);

2915: BEGIN
2916:
2917: IF PG_DEBUG in ('Y', 'C') THEN
2918: msc_util.msc_log('***** Begin Generate_Simplified_Pegging (Gen_Atp_Pegging) *****');
2919: msc_util.msc_log('Gen_Atp_Pegging : p_plan_id ' || p_plan_id);
2920: msc_util.msc_log('Gen_Atp_Pegging : p_share_partition ' || p_share_partition);
2921: msc_util.msc_log('Gen_Atp_Pegging : p_applsys_schema ' || p_applsys_schema);
2922: END IF;
2923:

Line 2920: msc_util.msc_log('Gen_Atp_Pegging : p_share_partition ' || p_share_partition);

2916:
2917: IF PG_DEBUG in ('Y', 'C') THEN
2918: msc_util.msc_log('***** Begin Generate_Simplified_Pegging (Gen_Atp_Pegging) *****');
2919: msc_util.msc_log('Gen_Atp_Pegging : p_plan_id ' || p_plan_id);
2920: msc_util.msc_log('Gen_Atp_Pegging : p_share_partition ' || p_share_partition);
2921: msc_util.msc_log('Gen_Atp_Pegging : p_applsys_schema ' || p_applsys_schema);
2922: END IF;
2923:
2924: --RETCODE := G_SUCCESS;

Line 2921: msc_util.msc_log('Gen_Atp_Pegging : p_applsys_schema ' || p_applsys_schema);

2917: IF PG_DEBUG in ('Y', 'C') THEN
2918: msc_util.msc_log('***** Begin Generate_Simplified_Pegging (Gen_Atp_Pegging) *****');
2919: msc_util.msc_log('Gen_Atp_Pegging : p_plan_id ' || p_plan_id);
2920: msc_util.msc_log('Gen_Atp_Pegging : p_share_partition ' || p_share_partition);
2921: msc_util.msc_log('Gen_Atp_Pegging : p_applsys_schema ' || p_applsys_schema);
2922: END IF;
2923:
2924: --RETCODE := G_SUCCESS;
2925:

Line 2952: msc_util.msc_log('Error getting performance param: ' || sqlcode || ': ' || sqlerrm);

2948: FROM msc_atp_parameters
2949: WHERE rownum = 1;
2950: EXCEPTION
2951: WHEN others THEN
2952: msc_util.msc_log('Error getting performance param: ' || sqlcode || ': ' || sqlerrm);
2953: l_hash_size := -1;
2954: l_sort_size := -1;
2955: l_parallel_degree := 1;
2956: END;

Line 2959: msc_util.msc_log('Hash: ' || l_hash_size || ' Sort: ' || l_sort_size ||

2955: l_parallel_degree := 1;
2956: END;
2957:
2958: IF PG_DEBUG in ('Y', 'C') THEN
2959: msc_util.msc_log('Hash: ' || l_hash_size || ' Sort: ' || l_sort_size ||
2960: ' Parallel: ' || l_parallel_degree);
2961: END IF;
2962:
2963: IF NVL(l_hash_size, -1) <> -1 THEN

Line 2965: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);

2961: END IF;
2962:
2963: IF NVL(l_hash_size, -1) <> -1 THEN
2964: l_sql_stmt_1 := 'alter session set hash_area_size = ' || to_char(l_hash_size);
2965: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);
2966: execute immediate l_sql_stmt_1;
2967: END IF;
2968:
2969: IF NVL(l_sort_size, -1) <> -1 THEN

Line 2971: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);

2967: END IF;
2968:
2969: IF NVL(l_sort_size, -1) <> -1 THEN
2970: l_sql_stmt_1 := 'alter session set sort_area_size = ' || to_char(l_sort_size);
2971: msc_util.msc_log('l_sql_stmt : ' || l_sql_stmt_1);
2972: execute immediate l_sql_stmt_1;
2973: END IF;
2974:
2975: -- Second set the table names.

Line 2994: msc_util.msc_log('l_partition_name := ' || l_partition_name);

2990: END IF;
2991:
2992: l_partition_name := atp_simple_peg_tab(i)|| '_' || l_plan_id;
2993: IF PG_DEBUG in ('Y', 'C') THEN
2994: msc_util.msc_log('l_partition_name := ' || l_partition_name);
2995: END IF;
2996:
2997: BEGIN
2998: SELECT count(*)

Line 3009: msc_util.msc_log('Inside Exception');

3005: AND table_owner = l_msc_schema;
3006: EXCEPTION
3007: WHEN OTHERS THEN
3008: IF PG_DEBUG in ('Y', 'C') THEN
3009: msc_util.msc_log('Inside Exception');
3010: END IF;
3011: l_count := 0;
3012: END;
3013:

Line 3022: msc_util.msc_log(FND_MESSAGE.GET);

3018: FND_MESSAGE.SET_NAME('MSC', 'MSC_ATP_PLAN_PARTITION_MISSING');
3019: FND_MESSAGE.SET_TOKEN('PLAN_NAME', l_plan_name);
3020: FND_MESSAGE.SET_TOKEN('TABLE_NAME', 'MSC_' || atp_simple_peg_tab(i));
3021: IF PG_DEBUG in ('Y', 'C') THEN
3022: msc_util.msc_log(FND_MESSAGE.GET);
3023: END IF;
3024: msc_util.msc_log('MSC_ATP_PLAN_PARTITION_MISSING : Partition ' || l_partition_name || ' NOT FOUND');
3025: -- Find out presence of config items.
3026: SELECT 1

Line 3024: msc_util.msc_log('MSC_ATP_PLAN_PARTITION_MISSING : Partition ' || l_partition_name || ' NOT FOUND');

3020: FND_MESSAGE.SET_TOKEN('TABLE_NAME', 'MSC_' || atp_simple_peg_tab(i));
3021: IF PG_DEBUG in ('Y', 'C') THEN
3022: msc_util.msc_log(FND_MESSAGE.GET);
3023: END IF;
3024: msc_util.msc_log('MSC_ATP_PLAN_PARTITION_MISSING : Partition ' || l_partition_name || ' NOT FOUND');
3025: -- Find out presence of config items.
3026: SELECT 1
3027: INTO l_count
3028: FROM msc_system_items msi, msc_demands d

Line 3042: msc_util.msc_log('Config Items are present, Partition needs to be created : ERROR.');

3038: AND d.origination_type in (6, 30)
3039: AND ROWNUM = 1 ;
3040:
3041: IF l_count > 0 THEN
3042: msc_util.msc_log('Config Items are present, Partition needs to be created : ERROR.');
3043: RETCODE := G_ERROR;
3044: ELSE
3045: msc_util.msc_log('Config Items are absent, Partition not present flagged as WARNING.');
3046: RETCODE := G_WARNING;

Line 3045: msc_util.msc_log('Config Items are absent, Partition not present flagged as WARNING.');

3041: IF l_count > 0 THEN
3042: msc_util.msc_log('Config Items are present, Partition needs to be created : ERROR.');
3043: RETCODE := G_ERROR;
3044: ELSE
3045: msc_util.msc_log('Config Items are absent, Partition not present flagged as WARNING.');
3046: RETCODE := G_WARNING;
3047: END IF;
3048: RETURN;
3049: */

Line 3050: msc_util.msc_log('Partitions are not found in MSC_ATP_PEGGING. Launch request to create partitions');

3046: RETCODE := G_WARNING;
3047: END IF;
3048: RETURN;
3049: */
3050: msc_util.msc_log('Partitions are not found in MSC_ATP_PEGGING. Launch request to create partitions');
3051: l_request_id := FND_REQUEST.SUBMIT_REQUEST(
3052: 'MSC',
3053: 'MSCSUPRT',
3054: NULL, -- description

Line 3058: msc_util.msc_log('Request to create partition is launched with request id := ' || l_request_id);

3054: NULL, -- description
3055: NULL, -- start time
3056: FALSE); -- sub request
3057:
3058: msc_util.msc_log('Request to create partition is launched with request id := ' || l_request_id);
3059: commit;
3060:
3061: LOOP
3062: l_call_status:= FND_CONCURRENT.GET_REQUEST_STATUS

Line 3074: msc_util.msc_log('Error in creating ATP partitions. Please run Create ATP Partitions program

3070: l_message);
3071:
3072:
3073: IF (l_call_status=FALSE) THEN
3074: msc_util.msc_log('Error in creating ATP partitions. Please run Create ATP Partitions program
3075: and then run ATP Post Plan Processing Again');
3076: RETCODE := G_ERROR;
3077: RETURN;
3078: END IF;

Line 3080: msc_util.msc_log('l_dev_phase := ' || l_dev_phase);

3076: RETCODE := G_ERROR;
3077: RETURN;
3078: END IF;
3079:
3080: msc_util.msc_log('l_dev_phase := ' || l_dev_phase);
3081:
3082: EXIT WHEN l_dev_phase = 'COMPLETE';
3083:
3084: END LOOP;

Line 3092: msc_util.msc_log('before deleting old ATP pegging data');

3088:
3089: IF p_share_partition = 'Y' THEN
3090:
3091: IF PG_DEBUG in ('Y', 'C') THEN
3092: msc_util.msc_log('before deleting old ATP pegging data');
3093: END IF;
3094:
3095: DELETE MSC_ATP_PEGGING where plan_id = p_plan_id;
3096:

Line 3098: msc_util.msc_log('After deleting old ATP pegging info');

3094:
3095: DELETE MSC_ATP_PEGGING where plan_id = p_plan_id;
3096:
3097: IF PG_DEBUG in ('Y', 'C') THEN
3098: msc_util.msc_log('After deleting old ATP pegging info');
3099: END IF;
3100:
3101: END IF;
3102:

Line 3109: msc_util.msc_log('not a shared plan partition, insert data into temp tables');

3105: l_temp_table := 'MSC_ATP_PEGGING';
3106: ELSE
3107:
3108: IF PG_DEBUG in ('Y', 'C') THEN
3109: msc_util.msc_log('not a shared plan partition, insert data into temp tables');
3110: END IF;
3111:
3112: l_temp_table := 'MSC_TEMP_ATP_PEGG_'|| to_char(l_plan_id);
3113:

Line 3115: msc_util.msc_log('temp table : ' || l_temp_table);

3111:
3112: l_temp_table := 'MSC_TEMP_ATP_PEGG_'|| to_char(l_plan_id);
3113:
3114: IF PG_DEBUG in ('Y', 'C') THEN
3115: msc_util.msc_log('temp table : ' || l_temp_table);
3116: END IF;
3117:
3118: SELECT t.tablespace_name, NVL(i.def_tablespace_name, t.tablespace_name)
3119: INTO l_tbspace, l_ind_tbspace

Line 3130: msc_util.msc_log('tb space : ' || l_tbspace);

3126: AND i.table_name (+) = t.table_name
3127: AND rownum = 1;
3128:
3129: IF PG_DEBUG in ('Y', 'C') THEN
3130: msc_util.msc_log('tb space : ' || l_tbspace);
3131: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);
3132: END IF;
3133:
3134: --6113544

Line 3131: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);

3127: AND rownum = 1;
3128:
3129: IF PG_DEBUG in ('Y', 'C') THEN
3130: msc_util.msc_log('tb space : ' || l_tbspace);
3131: msc_util.msc_log('ind tbspace : ' || l_ind_tbspace);
3132: END IF;
3133:
3134: --6113544
3135: l_insert_stmt := 'CREATE TABLE ' || l_temp_table

Line 3187: msc_util.msc_log('before creating table : ' || l_temp_table);

3183: --NOLOGGING
3184: PCTFREE 0 STORAGE(INITIAL 40K NEXT 5M PCTINCREASE 0)';
3185: */
3186: IF PG_DEBUG in ('Y', 'C') THEN
3187: msc_util.msc_log('before creating table : ' || l_temp_table);
3188: END IF;
3189:
3190: BEGIN
3191: ad_ddl.do_ddl(APPLSYS_SCHEMA => p_applsys_schema,

Line 3197: msc_util.msc_log('after creating table : ' || l_temp_table);

3193: STATEMENT_TYPE => ad_ddl.create_table,
3194: STATEMENT => l_insert_stmt,
3195: OBJECT_NAME => l_temp_table);
3196: IF PG_DEBUG in ('Y', 'C') THEN
3197: msc_util.msc_log('after creating table : ' || l_temp_table);
3198: END IF;
3199:
3200: EXCEPTION
3201: WHEN others THEN

Line 3203: msc_util.msc_log(sqlcode || ': ' || sqlerrm);

3199:
3200: EXCEPTION
3201: WHEN others THEN
3202: IF PG_DEBUG in ('Y', 'C') THEN
3203: msc_util.msc_log(sqlcode || ': ' || sqlerrm);
3204: msc_util.msc_log('Exception of create table : ' || l_temp_table);
3205: END IF;
3206: ad_ddl.do_ddl(APPLSYS_SCHEMA => p_applsys_schema,
3207: APPLICATION_SHORT_NAME => 'MSC',

Line 3204: msc_util.msc_log('Exception of create table : ' || l_temp_table);

3200: EXCEPTION
3201: WHEN others THEN
3202: IF PG_DEBUG in ('Y', 'C') THEN
3203: msc_util.msc_log(sqlcode || ': ' || sqlerrm);
3204: msc_util.msc_log('Exception of create table : ' || l_temp_table);
3205: END IF;
3206: ad_ddl.do_ddl(APPLSYS_SCHEMA => p_applsys_schema,
3207: APPLICATION_SHORT_NAME => 'MSC',
3208: STATEMENT_TYPE => ad_ddl.drop_table,

Line 3213: msc_util.msc_log('After Drop table : ' ||l_temp_table);

3209: STATEMENT => 'DROP TABLE ' || l_temp_table,
3210: OBJECT_NAME => l_temp_table);
3211:
3212: IF PG_DEBUG in ('Y', 'C') THEN
3213: msc_util.msc_log('After Drop table : ' ||l_temp_table);
3214: msc_util.msc_log('Before exception create table : ' ||l_temp_table);
3215: END IF;
3216:
3217: ad_ddl.do_ddl(APPLSYS_SCHEMA => p_applsys_schema,

Line 3214: msc_util.msc_log('Before exception create table : ' ||l_temp_table);

3210: OBJECT_NAME => l_temp_table);
3211:
3212: IF PG_DEBUG in ('Y', 'C') THEN
3213: msc_util.msc_log('After Drop table : ' ||l_temp_table);
3214: msc_util.msc_log('Before exception create table : ' ||l_temp_table);
3215: END IF;
3216:
3217: ad_ddl.do_ddl(APPLSYS_SCHEMA => p_applsys_schema,
3218: APPLICATION_SHORT_NAME => 'MSC',

Line 3223: msc_util.msc_log('After exception create table : ' ||l_temp_table);

3219: STATEMENT_TYPE => ad_ddl.create_table,
3220: STATEMENT => l_insert_stmt,
3221: OBJECT_NAME => l_temp_table);
3222: IF PG_DEBUG in ('Y', 'C') THEN
3223: msc_util.msc_log('After exception create table : ' ||l_temp_table);
3224: END IF;
3225: END;
3226: END IF; -- p_share_partition = 'Y'
3227:

Line 3235: msc_util.msc_log('Gen_Atp_Pegging : After opening config_items ');

3231: into l_timestamp
3232: from v$timer;
3233:
3234: IF PG_DEBUG in ('Y', 'C') THEN
3235: msc_util.msc_log('Gen_Atp_Pegging : After opening config_items ');
3236: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 1 ' || l_timestamp);
3237: END IF;
3238:
3239: LOOP -- Begin config_items loop

Line 3236: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 1 ' || l_timestamp);

3232: from v$timer;
3233:
3234: IF PG_DEBUG in ('Y', 'C') THEN
3235: msc_util.msc_log('Gen_Atp_Pegging : After opening config_items ');
3236: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 1 ' || l_timestamp);
3237: END IF;
3238:
3239: LOOP -- Begin config_items loop
3240: IF PG_DEBUG in ('Y', 'C') THEN

Line 3241: msc_util.msc_log('Gen_Atp_Pegging : Before fetch config_items Cursor');

3237: END IF;
3238:
3239: LOOP -- Begin config_items loop
3240: IF PG_DEBUG in ('Y', 'C') THEN
3241: msc_util.msc_log('Gen_Atp_Pegging : Before fetch config_items Cursor');
3242: END IF;
3243: FETCH config_items INTO c_items_rec;
3244: EXIT WHEN config_items%NOTFOUND;
3245:

Line 3247: msc_util.msc_log('Gen_Atp_Pegging : After fetch config_items Cursor');

3243: FETCH config_items INTO c_items_rec;
3244: EXIT WHEN config_items%NOTFOUND;
3245:
3246: IF PG_DEBUG in ('Y', 'C') THEN
3247: msc_util.msc_log('Gen_Atp_Pegging : After fetch config_items Cursor');
3248: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.item_name ' ||
3249: c_items_rec.item_name);
3250: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.inventory_item_id ' ||
3251: c_items_rec.inventory_item_id);

Line 3248: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.item_name ' ||

3244: EXIT WHEN config_items%NOTFOUND;
3245:
3246: IF PG_DEBUG in ('Y', 'C') THEN
3247: msc_util.msc_log('Gen_Atp_Pegging : After fetch config_items Cursor');
3248: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.item_name ' ||
3249: c_items_rec.item_name);
3250: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.inventory_item_id ' ||
3251: c_items_rec.inventory_item_id);
3252: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_inventory_item_id ' ||

Line 3250: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.inventory_item_id ' ||

3246: IF PG_DEBUG in ('Y', 'C') THEN
3247: msc_util.msc_log('Gen_Atp_Pegging : After fetch config_items Cursor');
3248: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.item_name ' ||
3249: c_items_rec.item_name);
3250: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.inventory_item_id ' ||
3251: c_items_rec.inventory_item_id);
3252: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_inventory_item_id ' ||
3253: c_items_rec.sr_inventory_item_id);
3254: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_instance_id ' ||

Line 3252: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_inventory_item_id ' ||

3248: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.item_name ' ||
3249: c_items_rec.item_name);
3250: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.inventory_item_id ' ||
3251: c_items_rec.inventory_item_id);
3252: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_inventory_item_id ' ||
3253: c_items_rec.sr_inventory_item_id);
3254: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_instance_id ' ||
3255: c_items_rec.sr_instance_id);
3256: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.base_item_id ' ||

Line 3254: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_instance_id ' ||

3250: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.inventory_item_id ' ||
3251: c_items_rec.inventory_item_id);
3252: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_inventory_item_id ' ||
3253: c_items_rec.sr_inventory_item_id);
3254: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_instance_id ' ||
3255: c_items_rec.sr_instance_id);
3256: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.base_item_id ' ||
3257: c_items_rec.base_item_id);
3258: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sales_order_line_id ' ||

Line 3256: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.base_item_id ' ||

3252: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_inventory_item_id ' ||
3253: c_items_rec.sr_inventory_item_id);
3254: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_instance_id ' ||
3255: c_items_rec.sr_instance_id);
3256: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.base_item_id ' ||
3257: c_items_rec.base_item_id);
3258: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sales_order_line_id ' ||
3259: c_items_rec.sales_order_line_id);
3260: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_source_type' ||

Line 3258: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sales_order_line_id ' ||

3254: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sr_instance_id ' ||
3255: c_items_rec.sr_instance_id);
3256: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.base_item_id ' ||
3257: c_items_rec.base_item_id);
3258: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sales_order_line_id ' ||
3259: c_items_rec.sales_order_line_id);
3260: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_source_type' ||
3261: c_items_rec.demand_source_type);--cmro
3262: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_class' ||

Line 3260: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_source_type' ||

3256: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.base_item_id ' ||
3257: c_items_rec.base_item_id);
3258: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sales_order_line_id ' ||
3259: c_items_rec.sales_order_line_id);
3260: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_source_type' ||
3261: c_items_rec.demand_source_type);--cmro
3262: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_class' ||
3263: c_items_rec.demand_class); --Bug 3319180
3264: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_id' ||

Line 3262: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_class' ||

3258: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.sales_order_line_id ' ||
3259: c_items_rec.sales_order_line_id);
3260: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_source_type' ||
3261: c_items_rec.demand_source_type);--cmro
3262: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_class' ||
3263: c_items_rec.demand_class); --Bug 3319180
3264: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_id' ||
3265: c_items_rec.demand_id); --Bug 3750638
3266: msc_util.msc_log('Gen_Atp_Pegging : Plan Id ' || p_plan_id );

Line 3264: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_id' ||

3260: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_source_type' ||
3261: c_items_rec.demand_source_type);--cmro
3262: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_class' ||
3263: c_items_rec.demand_class); --Bug 3319180
3264: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_id' ||
3265: c_items_rec.demand_id); --Bug 3750638
3266: msc_util.msc_log('Gen_Atp_Pegging : Plan Id ' || p_plan_id );
3267: msc_util.msc_log('Gen_Atp_Pegging : Stage 0 ' );
3268: END IF;

Line 3266: msc_util.msc_log('Gen_Atp_Pegging : Plan Id ' || p_plan_id );

3262: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_class' ||
3263: c_items_rec.demand_class); --Bug 3319180
3264: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_id' ||
3265: c_items_rec.demand_id); --Bug 3750638
3266: msc_util.msc_log('Gen_Atp_Pegging : Plan Id ' || p_plan_id );
3267: msc_util.msc_log('Gen_Atp_Pegging : Stage 0 ' );
3268: END IF;
3269:
3270: -- Bug 3750638 Call the SQL statements now moved to a new procedure

Line 3267: msc_util.msc_log('Gen_Atp_Pegging : Stage 0 ' );

3263: c_items_rec.demand_class); --Bug 3319180
3264: msc_util.msc_log('Gen_Atp_Pegging : c_items_rec.demand_id' ||
3265: c_items_rec.demand_id); --Bug 3750638
3266: msc_util.msc_log('Gen_Atp_Pegging : Plan Id ' || p_plan_id );
3267: msc_util.msc_log('Gen_Atp_Pegging : Stage 0 ' );
3268: END IF;
3269:
3270: -- Bug 3750638 Call the SQL statements now moved to a new procedure
3271: Get_Pegging_Data_Loop ( p_plan_id,

Line 3277: msc_util.msc_log('Gen_Atp_Pegging: ' ||

3273: l_return_status);
3274:
3275: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3276: IF PG_DEBUG in ('Y', 'C') THEN
3277: msc_util.msc_log('Gen_Atp_Pegging: ' ||
3278: 'Error occured in procedure Get_Pegging_Data_Loop');
3279: END IF;
3280: RAISE FND_API.G_EXC_ERROR;
3281: END IF;

Line 3290: msc_util.msc_log('Gen_Atp_Pegging : Stage 5 ' );

3286: into l_timestamp
3287: from v$timer;
3288:
3289: IF PG_DEBUG in ('Y', 'C') THEN
3290: msc_util.msc_log('Gen_Atp_Pegging : Stage 5 ' );
3291: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 3 ' || l_timestamp);
3292: END IF;
3293:
3294: -- Fetch the data into PL/SQL record of tables.

Line 3291: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 3 ' || l_timestamp);

3287: from v$timer;
3288:
3289: IF PG_DEBUG in ('Y', 'C') THEN
3290: msc_util.msc_log('Gen_Atp_Pegging : Stage 5 ' );
3291: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 3 ' || l_timestamp);
3292: END IF;
3293:
3294: -- Fetch the data into PL/SQL record of tables.
3295: SELECT

Line 3376: msc_util.msc_log('Gen_Atp_Pegging : Stage 6 ' );

3372: into l_timestamp
3373: from v$timer;
3374:
3375: IF PG_DEBUG in ('Y', 'C') THEN
3376: msc_util.msc_log('Gen_Atp_Pegging : Stage 6 ' );
3377: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
3378: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 4 ' || l_timestamp);
3379: END IF;
3380:

Line 3377: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );

3373: from v$timer;
3374:
3375: IF PG_DEBUG in ('Y', 'C') THEN
3376: msc_util.msc_log('Gen_Atp_Pegging : Stage 6 ' );
3377: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
3378: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 4 ' || l_timestamp);
3379: END IF;
3380:
3381:

Line 3378: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 4 ' || l_timestamp);

3374:
3375: IF PG_DEBUG in ('Y', 'C') THEN
3376: msc_util.msc_log('Gen_Atp_Pegging : Stage 6 ' );
3377: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
3378: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 4 ' || l_timestamp);
3379: END IF;
3380:
3381:
3382: -- Obtain and Assign forecast consumption info.

Line 3389: msc_util.msc_log('Gen_Atp_Pegging : End Demand Id for Sales Order: ' ||

3385: IF (atp_peg_det.bom_item_type(i) = 4 AND
3386: atp_peg_det.base_item_id(i) IS NOT NULL ) THEN
3387: -- Bug 3362558 Display the original_demand_id
3388: IF PG_DEBUG in ('Y', 'C') THEN
3389: msc_util.msc_log('Gen_Atp_Pegging : End Demand Id for Sales Order: ' ||
3390: -- CTO_PF_PRJ changes. Use end_demand_id
3391: atp_peg_det.end_demand_id(i) );
3392: --l_original_demand_ids(1) );
3393: END IF;

Line 3398: msc_util.msc_log('Gen_Atp_Pegging : Stage 7 ' );

3394: -- End Bug 3362558
3395: Get_Forecast_Consumption(atp_peg_det, i, fcst_data_tab, l_return_status);
3396: l_total_relief_qty := 0;
3397: IF PG_DEBUG in ('Y', 'C') THEN
3398: msc_util.msc_log('Gen_Atp_Pegging : Stage 7 ' );
3399: msc_util.msc_log('Gen_Atp_Pegging : Status post Fcst Consumption.' ||
3400: l_return_status );
3401: msc_util.msc_log('Gen_Atp_Pegging : Fcst Data Count.' ||
3402: fcst_data_tab.inventory_item_id.Count);

Line 3399: msc_util.msc_log('Gen_Atp_Pegging : Status post Fcst Consumption.' ||

3395: Get_Forecast_Consumption(atp_peg_det, i, fcst_data_tab, l_return_status);
3396: l_total_relief_qty := 0;
3397: IF PG_DEBUG in ('Y', 'C') THEN
3398: msc_util.msc_log('Gen_Atp_Pegging : Stage 7 ' );
3399: msc_util.msc_log('Gen_Atp_Pegging : Status post Fcst Consumption.' ||
3400: l_return_status );
3401: msc_util.msc_log('Gen_Atp_Pegging : Fcst Data Count.' ||
3402: fcst_data_tab.inventory_item_id.Count);
3403: END IF;

Line 3401: msc_util.msc_log('Gen_Atp_Pegging : Fcst Data Count.' ||

3397: IF PG_DEBUG in ('Y', 'C') THEN
3398: msc_util.msc_log('Gen_Atp_Pegging : Stage 7 ' );
3399: msc_util.msc_log('Gen_Atp_Pegging : Status post Fcst Consumption.' ||
3400: l_return_status );
3401: msc_util.msc_log('Gen_Atp_Pegging : Fcst Data Count.' ||
3402: fcst_data_tab.inventory_item_id.Count);
3403: END IF;
3404: END IF;
3405:

Line 3463: msc_util.msc_log('Gen_Atp_Pegging : Total Relief Qty' ||

3459: END IF;
3460:
3461: l_total_relief_qty := atp_peg_det.tot_relief_qty(i);
3462: IF PG_DEBUG in ('Y', 'C') THEN
3463: msc_util.msc_log('Gen_Atp_Pegging : Total Relief Qty' ||
3464: l_total_relief_qty);
3465: msc_util.msc_log('Gen_Atp_Pegging : FC Consumtion Flag' ||
3466: fcst_data_tab.cons_config_mod_flag(j));
3467: END IF;

Line 3465: msc_util.msc_log('Gen_Atp_Pegging : FC Consumtion Flag' ||

3461: l_total_relief_qty := atp_peg_det.tot_relief_qty(i);
3462: IF PG_DEBUG in ('Y', 'C') THEN
3463: msc_util.msc_log('Gen_Atp_Pegging : Total Relief Qty' ||
3464: l_total_relief_qty);
3465: msc_util.msc_log('Gen_Atp_Pegging : FC Consumtion Flag' ||
3466: fcst_data_tab.cons_config_mod_flag(j));
3467: END IF;
3468:
3469: -- Bug 3701093

Line 3522: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.inventory_item_id(j)' ||

3518: ELSE
3519: l_order_org_ratio := 1;
3520: END IF;
3521: IF PG_DEBUG in ('Y', 'C') THEN
3522: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.inventory_item_id(j)' ||
3523: fcst_data_tab.inventory_item_id(j));
3524: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.consumed_qty(j)' ||
3525: fcst_data_tab.consumed_qty(j));
3526: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.sales_order_id(j)' ||

Line 3524: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.consumed_qty(j)' ||

3520: END IF;
3521: IF PG_DEBUG in ('Y', 'C') THEN
3522: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.inventory_item_id(j)' ||
3523: fcst_data_tab.inventory_item_id(j));
3524: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.consumed_qty(j)' ||
3525: fcst_data_tab.consumed_qty(j));
3526: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.sales_order_id(j)' ||
3527: fcst_data_tab.sales_order_id(j));
3528: msc_util.msc_log('Gen_Atp_Pegging : l_order_org_ratio' ||

Line 3526: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.sales_order_id(j)' ||

3522: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.inventory_item_id(j)' ||
3523: fcst_data_tab.inventory_item_id(j));
3524: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.consumed_qty(j)' ||
3525: fcst_data_tab.consumed_qty(j));
3526: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.sales_order_id(j)' ||
3527: fcst_data_tab.sales_order_id(j));
3528: msc_util.msc_log('Gen_Atp_Pegging : l_order_org_ratio' ||
3529: l_order_org_ratio);
3530: msc_util.msc_log('Gen_Atp_Pegging : FC Consumtion Flag' ||

Line 3528: msc_util.msc_log('Gen_Atp_Pegging : l_order_org_ratio' ||

3524: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.consumed_qty(j)' ||
3525: fcst_data_tab.consumed_qty(j));
3526: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.sales_order_id(j)' ||
3527: fcst_data_tab.sales_order_id(j));
3528: msc_util.msc_log('Gen_Atp_Pegging : l_order_org_ratio' ||
3529: l_order_org_ratio);
3530: msc_util.msc_log('Gen_Atp_Pegging : FC Consumtion Flag' ||
3531: fcst_data_tab.cons_config_mod_flag(j));
3532: END IF;

Line 3530: msc_util.msc_log('Gen_Atp_Pegging : FC Consumtion Flag' ||

3526: msc_util.msc_log('Gen_Atp_Pegging : fcst_data_tab.sales_order_id(j)' ||
3527: fcst_data_tab.sales_order_id(j));
3528: msc_util.msc_log('Gen_Atp_Pegging : l_order_org_ratio' ||
3529: l_order_org_ratio);
3530: msc_util.msc_log('Gen_Atp_Pegging : FC Consumtion Flag' ||
3531: fcst_data_tab.cons_config_mod_flag(j));
3532: END IF;
3533: -- Bug 3701093 Model Forecast Has been consumed,
3534: -- Generate Offsets for Model.

Line 3580: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.consumed_qty(k)' ||

3576: atp_peg_det.overconsumption_qty(k) :=
3577: NVL(fcst_data_tab.overconsumption_qty(j), 0)
3578: * l_order_org_ratio;
3579: IF PG_DEBUG in ('Y', 'C') THEN
3580: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.consumed_qty(k)' ||
3581: atp_peg_det.consumed_qty(k));
3582: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.overconsumption_qty(k)' ||
3583: atp_peg_det.overconsumption_qty(k));
3584: END IF;

Line 3582: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.overconsumption_qty(k)' ||

3578: * l_order_org_ratio;
3579: IF PG_DEBUG in ('Y', 'C') THEN
3580: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.consumed_qty(k)' ||
3581: atp_peg_det.consumed_qty(k));
3582: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.overconsumption_qty(k)' ||
3583: atp_peg_det.overconsumption_qty(k));
3584: END IF;
3585: -- For now the process_seq_id remains unassigned
3586: -- atp_peg_det.process_seq_id(k) := atp_peg_det.process_seq_id(i) ;

Line 3637: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(i) ' ||

3633: END IF;
3634: -- End Bug 3701093
3635:
3636: IF PG_DEBUG in ('Y', 'C') THEN
3637: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(i) ' ||
3638: atp_peg_det.tot_relief_qty(i));
3639: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(i) '
3640: || atp_peg_det.inventory_item_id(i));
3641: END IF;

Line 3639: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(i) '

3635:
3636: IF PG_DEBUG in ('Y', 'C') THEN
3637: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(i) ' ||
3638: atp_peg_det.tot_relief_qty(i));
3639: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(i) '
3640: || atp_peg_det.inventory_item_id(i));
3641: END IF;
3642: FOR n in 1..atp_peg_det.inventory_item_id.COUNT LOOP
3643:

Line 3658: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(n) ' ||

3654: atp_peg_det.tot_relief_qty(n) := atp_peg_det.tot_relief_qty(i)
3655: * atp_peg_det.end_item_usage(n) / atp_peg_det.end_item_usage(i);
3656:
3657: IF PG_DEBUG in ('Y', 'C') THEN
3658: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(n) ' ||
3659: atp_peg_det.tot_relief_qty(n));
3660: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(n) '
3661: || atp_peg_det.inventory_item_id(n));
3662: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.pegging_id(n) '

Line 3660: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(n) '

3656:
3657: IF PG_DEBUG in ('Y', 'C') THEN
3658: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(n) ' ||
3659: atp_peg_det.tot_relief_qty(n));
3660: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(n) '
3661: || atp_peg_det.inventory_item_id(n));
3662: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.pegging_id(n) '
3663: || atp_peg_det.pegging_id(n));
3664: msc_util.msc_log('Gen_Atp_Pegging : ' ||

Line 3662: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.pegging_id(n) '

3658: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(n) ' ||
3659: atp_peg_det.tot_relief_qty(n));
3660: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(n) '
3661: || atp_peg_det.inventory_item_id(n));
3662: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.pegging_id(n) '
3663: || atp_peg_det.pegging_id(n));
3664: msc_util.msc_log('Gen_Atp_Pegging : ' ||
3665: 'atp_peg_det.allocated_quantity(n) '|| atp_peg_det.allocated_quantity(n));
3666: END IF;

Line 3664: msc_util.msc_log('Gen_Atp_Pegging : ' ||

3660: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(n) '
3661: || atp_peg_det.inventory_item_id(n));
3662: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.pegging_id(n) '
3663: || atp_peg_det.pegging_id(n));
3664: msc_util.msc_log('Gen_Atp_Pegging : ' ||
3665: 'atp_peg_det.allocated_quantity(n) '|| atp_peg_det.allocated_quantity(n));
3666: END IF;
3667: END IF;
3668:

Line 3695: msc_util.msc_log('Gen_Atp_Pegging : ATP Inventory_item_id. ' ||

3691: -- Update the total count.
3692: l_tot_count := l_count + l_row_count;
3693:
3694: IF PG_DEBUG in ('Y', 'C') THEN
3695: msc_util.msc_log('Gen_Atp_Pegging : ATP Inventory_item_id. ' ||
3696: atp_peg_det.inventory_item_id(i) );
3697: msc_util.msc_log('Gen_Atp_Pegging : FCST Inventory_item_id. ' ||
3698: fcst_data_tab.inventory_item_id(j) );
3699: msc_util.msc_log('Gen_Atp_Pegging : FCST Parent_Item_id. ' ||

Line 3697: msc_util.msc_log('Gen_Atp_Pegging : FCST Inventory_item_id. ' ||

3693:
3694: IF PG_DEBUG in ('Y', 'C') THEN
3695: msc_util.msc_log('Gen_Atp_Pegging : ATP Inventory_item_id. ' ||
3696: atp_peg_det.inventory_item_id(i) );
3697: msc_util.msc_log('Gen_Atp_Pegging : FCST Inventory_item_id. ' ||
3698: fcst_data_tab.inventory_item_id(j) );
3699: msc_util.msc_log('Gen_Atp_Pegging : FCST Parent_Item_id. ' ||
3700: fcst_data_tab.Parent_Item_id(j) );
3701: msc_util.msc_log('Gen_Atp_Pegging : l_row_count. ' ||

Line 3699: msc_util.msc_log('Gen_Atp_Pegging : FCST Parent_Item_id. ' ||

3695: msc_util.msc_log('Gen_Atp_Pegging : ATP Inventory_item_id. ' ||
3696: atp_peg_det.inventory_item_id(i) );
3697: msc_util.msc_log('Gen_Atp_Pegging : FCST Inventory_item_id. ' ||
3698: fcst_data_tab.inventory_item_id(j) );
3699: msc_util.msc_log('Gen_Atp_Pegging : FCST Parent_Item_id. ' ||
3700: fcst_data_tab.Parent_Item_id(j) );
3701: msc_util.msc_log('Gen_Atp_Pegging : l_row_count. ' ||
3702: l_row_count );
3703: msc_util.msc_log('Gen_Atp_Pegging : l_count. ' ||

Line 3701: msc_util.msc_log('Gen_Atp_Pegging : l_row_count. ' ||

3697: msc_util.msc_log('Gen_Atp_Pegging : FCST Inventory_item_id. ' ||
3698: fcst_data_tab.inventory_item_id(j) );
3699: msc_util.msc_log('Gen_Atp_Pegging : FCST Parent_Item_id. ' ||
3700: fcst_data_tab.Parent_Item_id(j) );
3701: msc_util.msc_log('Gen_Atp_Pegging : l_row_count. ' ||
3702: l_row_count );
3703: msc_util.msc_log('Gen_Atp_Pegging : l_count. ' ||
3704: l_count );
3705: msc_util.msc_log('Gen_Atp_Pegging : l_tot_count. ' ||

Line 3703: msc_util.msc_log('Gen_Atp_Pegging : l_count. ' ||

3699: msc_util.msc_log('Gen_Atp_Pegging : FCST Parent_Item_id. ' ||
3700: fcst_data_tab.Parent_Item_id(j) );
3701: msc_util.msc_log('Gen_Atp_Pegging : l_row_count. ' ||
3702: l_row_count );
3703: msc_util.msc_log('Gen_Atp_Pegging : l_count. ' ||
3704: l_count );
3705: msc_util.msc_log('Gen_Atp_Pegging : l_tot_count. ' ||
3706: l_tot_count );
3707: END IF;

Line 3705: msc_util.msc_log('Gen_Atp_Pegging : l_tot_count. ' ||

3701: msc_util.msc_log('Gen_Atp_Pegging : l_row_count. ' ||
3702: l_row_count );
3703: msc_util.msc_log('Gen_Atp_Pegging : l_count. ' ||
3704: l_count );
3705: msc_util.msc_log('Gen_Atp_Pegging : l_tot_count. ' ||
3706: l_tot_count );
3707: END IF;
3708: l_count := l_count + 1;
3709: -- Append the forecast_data for each config item to

Line 3715: msc_util.msc_log('Gen_Atp_Pegging : Value of loop var k. ' || k );

3711: --FOR k in l_count..l_tot_count LOOP
3712:
3713: k:= l_count;
3714: IF PG_DEBUG in ('Y', 'C') THEN
3715: msc_util.msc_log('Gen_Atp_Pegging : Value of loop var k. ' || k );
3716: END IF;
3717:
3718: atp_peg_det.reference_item_id(k) := atp_peg_det.reference_item_id(i);
3719: atp_peg_det.base_item_id(k) := NULL;

Line 3803: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(k) ' ||

3799: END IF;
3800: -- Bug 3805136 Allocated quantity is positive
3801: atp_peg_det.allocated_quantity(k) := ABS(atp_peg_det.tot_relief_qty(k));
3802: IF PG_DEBUG in ('Y', 'C') THEN
3803: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(k) ' ||
3804: atp_peg_det.tot_relief_qty(k));
3805: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(k) '
3806: || atp_peg_det.inventory_item_id(k));
3807: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.prev_pegging_id(k) '

Line 3805: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(k) '

3801: atp_peg_det.allocated_quantity(k) := ABS(atp_peg_det.tot_relief_qty(k));
3802: IF PG_DEBUG in ('Y', 'C') THEN
3803: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(k) ' ||
3804: atp_peg_det.tot_relief_qty(k));
3805: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(k) '
3806: || atp_peg_det.inventory_item_id(k));
3807: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.prev_pegging_id(k) '
3808: || atp_peg_det.prev_pegging_id(k));
3809: END IF;

Line 3807: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.prev_pegging_id(k) '

3803: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.tot_relief_qty(k) ' ||
3804: atp_peg_det.tot_relief_qty(k));
3805: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.inventory_item_id(k) '
3806: || atp_peg_det.inventory_item_id(k));
3807: msc_util.msc_log('Gen_Atp_Pegging : atp_peg_det.prev_pegging_id(k) '
3808: || atp_peg_det.prev_pegging_id(k));
3809: END IF;
3810: --END LOOP;
3811:

Line 3820: msc_util.msc_log('Gen_Atp_Pegging : Initialized Simple Pegging Array ' ||

3816: -- Initialize the Simplified Pegging PL/SQL array
3817:
3818: Init_Atp_Peg ( atp_peg_tab, l_return_status);
3819: IF PG_DEBUG in ('Y', 'C') THEN
3820: msc_util.msc_log('Gen_Atp_Pegging : Initialized Simple Pegging Array ' ||
3821: l_return_status);
3822: END IF;
3823:
3824: -- Bug 3701093

Line 3835: msc_util.msc_log('Gen_Atp_Pegging : Stage 8 After obtaining Simple Pegging ');

3831: into l_timestamp
3832: from v$timer;
3833:
3834: IF PG_DEBUG in ('Y', 'C') THEN
3835: msc_util.msc_log('Gen_Atp_Pegging : Stage 8 After obtaining Simple Pegging ');
3836: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 5 ' || l_timestamp);
3837: END IF;
3838:
3839: -- Calculate and Cascade Relief Quantities

Line 3836: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 5 ' || l_timestamp);

3832: from v$timer;
3833:
3834: IF PG_DEBUG in ('Y', 'C') THEN
3835: msc_util.msc_log('Gen_Atp_Pegging : Stage 8 After obtaining Simple Pegging ');
3836: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 5 ' || l_timestamp);
3837: END IF;
3838:
3839: -- Calculate and Cascade Relief Quantities
3840: -- will be strictly chronological.

Line 3860: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' ||

3856: atp_peg_tab.reference_item_id(i) = atp_peg_tab.inventory_item_id(i) AND
3857: atp_peg_tab.relief_type(i) = 1) THEN
3858:
3859: IF PG_DEBUG in ('Y', 'C') THEN
3860: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' ||
3861: atp_peg_tab.reference_item_id(i) );
3862: END IF;
3863: atp_peg_tab.relief_quantity(i) := 0;
3864:

Line 3883: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' ||

3879: l_peg_relief_qty := L_TOT_RELIEF_QTY;
3880: END IF;
3881: -- Start with the planned order corresponding to the sales order
3882: IF PG_DEBUG in ('Y', 'C') THEN
3883: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' ||
3884: atp_peg_tab.reference_item_id(i) );
3885: msc_util.msc_log('Gen_Atp_Pegging : Pegging Id ' ||
3886: atp_peg_tab.pegging_id(i) );
3887: msc_util.msc_log('Gen_Atp_Pegging : Prev Pegging Id ' ||

Line 3885: msc_util.msc_log('Gen_Atp_Pegging : Pegging Id ' ||

3881: -- Start with the planned order corresponding to the sales order
3882: IF PG_DEBUG in ('Y', 'C') THEN
3883: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' ||
3884: atp_peg_tab.reference_item_id(i) );
3885: msc_util.msc_log('Gen_Atp_Pegging : Pegging Id ' ||
3886: atp_peg_tab.pegging_id(i) );
3887: msc_util.msc_log('Gen_Atp_Pegging : Prev Pegging Id ' ||
3888: atp_peg_tab.prev_pegging_id(i) );
3889: msc_util.msc_log('Gen_Atp_Pegging : '||

Line 3887: msc_util.msc_log('Gen_Atp_Pegging : Prev Pegging Id ' ||

3883: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' ||
3884: atp_peg_tab.reference_item_id(i) );
3885: msc_util.msc_log('Gen_Atp_Pegging : Pegging Id ' ||
3886: atp_peg_tab.pegging_id(i) );
3887: msc_util.msc_log('Gen_Atp_Pegging : Prev Pegging Id ' ||
3888: atp_peg_tab.prev_pegging_id(i) );
3889: msc_util.msc_log('Gen_Atp_Pegging : '||
3890: 'Total Relief Quantity TRACK L_TOT_RELIEF_QTY ' ||
3891: L_TOT_RELIEF_QTY );

Line 3889: msc_util.msc_log('Gen_Atp_Pegging : '||

3885: msc_util.msc_log('Gen_Atp_Pegging : Pegging Id ' ||
3886: atp_peg_tab.pegging_id(i) );
3887: msc_util.msc_log('Gen_Atp_Pegging : Prev Pegging Id ' ||
3888: atp_peg_tab.prev_pegging_id(i) );
3889: msc_util.msc_log('Gen_Atp_Pegging : '||
3890: 'Total Relief Quantity TRACK L_TOT_RELIEF_QTY ' ||
3891: L_TOT_RELIEF_QTY );
3892: msc_util.msc_log('Gen_Atp_Pegging : '||
3893: 'Total Relief Quantity for this Pegged Supply ' ||

Line 3892: msc_util.msc_log('Gen_Atp_Pegging : '||

3888: atp_peg_tab.prev_pegging_id(i) );
3889: msc_util.msc_log('Gen_Atp_Pegging : '||
3890: 'Total Relief Quantity TRACK L_TOT_RELIEF_QTY ' ||
3891: L_TOT_RELIEF_QTY );
3892: msc_util.msc_log('Gen_Atp_Pegging : '||
3893: 'Total Relief Quantity for this Pegged Supply ' ||
3894: l_peg_relief_qty );
3895: END IF;
3896: Calculate_Relief_Quantities(atp_peg_tab,

Line 3929: msc_util.msc_log('Gen_Atp_Pegging : Stage 9 After Calculating Reliefs ');

3925: into l_timestamp
3926: from v$timer;
3927:
3928: IF PG_DEBUG in ('Y', 'C') THEN
3929: msc_util.msc_log('Gen_Atp_Pegging : Stage 9 After Calculating Reliefs ');
3930: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 6 ' || l_timestamp);
3931: END IF;
3932: -- Generate ATP Resource Pegging.
3933:

Line 3930: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 6 ' || l_timestamp);

3926: from v$timer;
3927:
3928: IF PG_DEBUG in ('Y', 'C') THEN
3929: msc_util.msc_log('Gen_Atp_Pegging : Stage 9 After Calculating Reliefs ');
3930: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 6 ' || l_timestamp);
3931: END IF;
3932: -- Generate ATP Resource Pegging.
3933:
3934: Generate_Resource_Pegging (atp_peg_tab, l_return_status);

Line 3941: msc_util.msc_log('Gen_Atp_Pegging : Stage 10 After Resource Pegging ');

3937: into l_timestamp
3938: from v$timer;
3939:
3940: IF PG_DEBUG in ('Y', 'C') THEN
3941: msc_util.msc_log('Gen_Atp_Pegging : Stage 10 After Resource Pegging ');
3942: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 7 ' || l_timestamp);
3943: END IF;
3944: END IF;
3945: -- End Bug 3701093

Line 3942: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 7 ' || l_timestamp);

3938: from v$timer;
3939:
3940: IF PG_DEBUG in ('Y', 'C') THEN
3941: msc_util.msc_log('Gen_Atp_Pegging : Stage 10 After Resource Pegging ');
3942: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 7 ' || l_timestamp);
3943: END IF;
3944: END IF;
3945: -- End Bug 3701093
3946:

Line 3951: msc_util.msc_log('ATP pegging data will be inserted into ' || l_temp_table);

3947: -- After obtaining all the atp simplified pegging information.
3948:
3949: l_row_count := atp_peg_tab.reference_item_id.COUNT ;
3950: IF PG_DEBUG in ('Y', 'C') THEN
3951: msc_util.msc_log('ATP pegging data will be inserted into ' || l_temp_table);
3952: msc_util.msc_log('Total Records to be inserted ' || l_row_count);
3953: END IF;
3954:
3955: -- Bug 3344102 First insert the data into the global temporary table.

Line 3952: msc_util.msc_log('Total Records to be inserted ' || l_row_count);

3948:
3949: l_row_count := atp_peg_tab.reference_item_id.COUNT ;
3950: IF PG_DEBUG in ('Y', 'C') THEN
3951: msc_util.msc_log('ATP pegging data will be inserted into ' || l_temp_table);
3952: msc_util.msc_log('Total Records to be inserted ' || l_row_count);
3953: END IF;
3954:
3955: -- Bug 3344102 First insert the data into the global temporary table.
3956:

Line 4232: msc_util.msc_log('Gen_Atp_Pegging : atf_date ' || atp_peg_tab.atf_date(i));

4228: -- End Bug 3701093
4229: END IF;
4230: --CTO-PF
4231: IF PG_DEBUG in ('Y', 'C') THEN
4232: msc_util.msc_log('Gen_Atp_Pegging : atf_date ' || atp_peg_tab.atf_date(i));
4233: msc_util.msc_log('Gen_Atp_Pegging : product_family_id ' || atp_peg_tab.product_family_id(i));
4234: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' || atp_peg_tab.reference_item_id(i));
4235: msc_util.msc_log('Gen_Atp_Pegging : inventory_item_id ' || atp_peg_tab.inventory_item_id(i));
4236: msc_util.msc_log('Gen_Atp_Pegging : l_time_phased_atp ' || l_time_phased_atp);

Line 4233: msc_util.msc_log('Gen_Atp_Pegging : product_family_id ' || atp_peg_tab.product_family_id(i));

4229: END IF;
4230: --CTO-PF
4231: IF PG_DEBUG in ('Y', 'C') THEN
4232: msc_util.msc_log('Gen_Atp_Pegging : atf_date ' || atp_peg_tab.atf_date(i));
4233: msc_util.msc_log('Gen_Atp_Pegging : product_family_id ' || atp_peg_tab.product_family_id(i));
4234: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' || atp_peg_tab.reference_item_id(i));
4235: msc_util.msc_log('Gen_Atp_Pegging : inventory_item_id ' || atp_peg_tab.inventory_item_id(i));
4236: msc_util.msc_log('Gen_Atp_Pegging : l_time_phased_atp ' || l_time_phased_atp);
4237: END IF;

Line 4234: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' || atp_peg_tab.reference_item_id(i));

4230: --CTO-PF
4231: IF PG_DEBUG in ('Y', 'C') THEN
4232: msc_util.msc_log('Gen_Atp_Pegging : atf_date ' || atp_peg_tab.atf_date(i));
4233: msc_util.msc_log('Gen_Atp_Pegging : product_family_id ' || atp_peg_tab.product_family_id(i));
4234: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' || atp_peg_tab.reference_item_id(i));
4235: msc_util.msc_log('Gen_Atp_Pegging : inventory_item_id ' || atp_peg_tab.inventory_item_id(i));
4236: msc_util.msc_log('Gen_Atp_Pegging : l_time_phased_atp ' || l_time_phased_atp);
4237: END IF;
4238: END LOOP; -- Insert Loop

Line 4235: msc_util.msc_log('Gen_Atp_Pegging : inventory_item_id ' || atp_peg_tab.inventory_item_id(i));

4231: IF PG_DEBUG in ('Y', 'C') THEN
4232: msc_util.msc_log('Gen_Atp_Pegging : atf_date ' || atp_peg_tab.atf_date(i));
4233: msc_util.msc_log('Gen_Atp_Pegging : product_family_id ' || atp_peg_tab.product_family_id(i));
4234: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' || atp_peg_tab.reference_item_id(i));
4235: msc_util.msc_log('Gen_Atp_Pegging : inventory_item_id ' || atp_peg_tab.inventory_item_id(i));
4236: msc_util.msc_log('Gen_Atp_Pegging : l_time_phased_atp ' || l_time_phased_atp);
4237: END IF;
4238: END LOOP; -- Insert Loop
4239:

Line 4236: msc_util.msc_log('Gen_Atp_Pegging : l_time_phased_atp ' || l_time_phased_atp);

4232: msc_util.msc_log('Gen_Atp_Pegging : atf_date ' || atp_peg_tab.atf_date(i));
4233: msc_util.msc_log('Gen_Atp_Pegging : product_family_id ' || atp_peg_tab.product_family_id(i));
4234: msc_util.msc_log('Gen_Atp_Pegging : reference_item_id ' || atp_peg_tab.reference_item_id(i));
4235: msc_util.msc_log('Gen_Atp_Pegging : inventory_item_id ' || atp_peg_tab.inventory_item_id(i));
4236: msc_util.msc_log('Gen_Atp_Pegging : l_time_phased_atp ' || l_time_phased_atp);
4237: END IF;
4238: END LOOP; -- Insert Loop
4239:
4240: IF PG_DEBUG in ('Y', 'C') THEN

Line 4241: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );

4237: END IF;
4238: END LOOP; -- Insert Loop
4239:
4240: IF PG_DEBUG in ('Y', 'C') THEN
4241: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
4242: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 8 ' || l_timestamp);
4243: END IF;
4244: /* commented as a part of CTO-PF
4245: -- Bug 3344102 Second insert the data into the main table.

Line 4242: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 8 ' || l_timestamp);

4238: END LOOP; -- Insert Loop
4239:
4240: IF PG_DEBUG in ('Y', 'C') THEN
4241: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
4242: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 8 ' || l_timestamp);
4243: END IF;
4244: /* commented as a part of CTO-PF
4245: -- Bug 3344102 Second insert the data into the main table.
4246: l_sql_stmt_1 := 'INSERT INTO ' || l_temp_table || '(

Line 4329: msc_util.msc_log('SQL statement to be executed ' || l_sql_stmt_1);

4325: AND end_demand_id = :l_end_demand_id
4326: AND relief_type in (2, 3) ';
4327:
4328: IF PG_DEBUG in ('Y', 'C') THEN
4329: msc_util.msc_log('SQL statement to be executed ' || l_sql_stmt_1);
4330: END IF;
4331:
4332: IF l_row_count > 0 THEN
4333: EXECUTE IMMEDIATE l_sql_stmt_1 USING

Line 4339: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );

4335: atp_peg_tab.end_demand_id(1);
4336: END IF;
4337:
4338: IF PG_DEBUG in ('Y', 'C') THEN
4339: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
4340: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 9 ' || l_timestamp);
4341: END IF;
4342:
4343: -- End Bug 3344102 Secod insert the data into the main table.

Line 4340: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 9 ' || l_timestamp);

4336: END IF;
4337:
4338: IF PG_DEBUG in ('Y', 'C') THEN
4339: msc_util.msc_log('Gen_Atp_Pegging : Rows Procesed ' || SQL%ROWCOUNT );
4340: msc_util.msc_log('Gen_Atp_Pegging : TIMESTAMP 9 ' || l_timestamp);
4341: END IF;
4342:
4343: -- End Bug 3344102 Secod insert the data into the main table.
4344: */

Line 4378: msc_util.msc_log('Gen_Atp_Pegging: ' ||

4374: END IF;
4375: -- CTO-PF end
4376: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4377: IF PG_DEBUG in ('Y', 'C') THEN
4378: msc_util.msc_log('Gen_Atp_Pegging: ' ||
4379: 'Error occured in procedure Create_Pre_Allocation_Reliefs');
4380: END IF;
4381: RAISE FND_API.G_EXC_ERROR;
4382: END IF;

Line 4388: msc_util.msc_log('Analyze Plan partition for MSC_ATP_PEGGING');

4384:
4385: IF p_share_partition = 'Y' THEN
4386:
4387: IF PG_DEBUG in ('Y', 'C') THEN
4388: msc_util.msc_log('Analyze Plan partition for MSC_ATP_PEGGING');
4389: END IF;
4390: fnd_stats.gather_table_stats(ownname=>'MSC',tabname=>'MSC_ATP_PEGGING',
4391: partname=>'ATP_PEGGING_999999',
4392: granularity=>'PARTITION',

Line 4418: msc_util.msc_log('Before creating index ' || l_temp_table ||

4414: LOCAL TABLESPACE ' || l_ind_tbspace;
4415:
4416: BEGIN
4417: IF PG_DEBUG in ('Y', 'C') THEN
4418: msc_util.msc_log('Before creating index ' || l_temp_table ||
4419: '_N1 for table ');
4420: END IF;
4421: ad_ddl.do_ddl( applsys_schema => p_applsys_schema,
4422: application_short_name => l_msc_schema,

Line 4441: msc_util.msc_log('Before creating index ' || l_temp_table ||

4437: LOCAL TABLESPACE ' || l_ind_tbspace;
4438:
4439: BEGIN
4440: IF PG_DEBUG in ('Y', 'C') THEN
4441: msc_util.msc_log('Before creating index ' || l_temp_table ||
4442: '_N2 for table ');
4443: END IF;
4444: ad_ddl.do_ddl( applsys_schema => p_applsys_schema,
4445: application_short_name => l_msc_schema,

Line 4465: msc_util.msc_log('Before creating index ' || l_temp_table ||

4461: LOCAL TABLESPACE ' || l_ind_tbspace;
4462:
4463: BEGIN
4464: IF PG_DEBUG in ('Y', 'C') THEN
4465: msc_util.msc_log('Before creating index ' || l_temp_table ||
4466: '_N3 for table ');
4467: END IF;
4468: ad_ddl.do_ddl( applsys_schema => p_applsys_schema,
4469: application_short_name => l_msc_schema,

Line 4486: msc_util.msc_log('Before creating index ' || l_temp_table ||

4482: LOCAL TABLESPACE ' || l_ind_tbspace;
4483:
4484: BEGIN
4485: IF PG_DEBUG in ('Y', 'C') THEN
4486: msc_util.msc_log('Before creating index ' || l_temp_table ||
4487: '_N4 for table ');
4488: END IF;
4489: ad_ddl.do_ddl( applsys_schema => p_applsys_schema,
4490: application_short_name => l_msc_schema,

Line 4496: msc_util.msc_log('Gather Table Stats for MSC_ATP_PEGGING');

4492: statement => l_sql_stmt,
4493: object_name => l_temp_table );
4494: END ;
4495: IF PG_DEBUG in ('Y', 'C') THEN
4496: msc_util.msc_log('Gather Table Stats for MSC_ATP_PEGGING');
4497: END IF;
4498:
4499: fnd_stats.gather_table_stats('MSC', 'ATP_PEGGING' || to_char(l_plan_id),
4500: granularity => 'ALL');

Line 4503: msc_util.msc_log('swap partition ');

4499: fnd_stats.gather_table_stats('MSC', 'ATP_PEGGING' || to_char(l_plan_id),
4500: granularity => 'ALL');
4501:
4502: IF PG_DEBUG in ('Y', 'C') THEN
4503: msc_util.msc_log('swap partition ');
4504: END IF;
4505:
4506: l_sql_stmt := 'ALTER TABLE msc_atp_pegging EXCHANGE PARTITION ' ||
4507: l_partition_name ||

Line 4513: msc_util.msc_log('Before alter table msc_atp_pegging');

4509: ' including indexes without validation';
4510:
4511: BEGIN
4512: IF PG_DEBUG in ('Y', 'C') THEN
4513: msc_util.msc_log('Before alter table msc_atp_pegging');
4514: END IF;
4515: ad_ddl.do_ddl(APPLSYS_SCHEMA => p_applsys_schema,
4516: APPLICATION_SHORT_NAME => 'MSC',
4517: STATEMENT_TYPE => ad_ddl.alter_table,

Line 4527: msc_util.msc_log ('Generate_Simplified_Pegging. Error : ' || sqlcode || ': ' || sqlerrm);

4523:
4524: EXCEPTION
4525: WHEN OTHERS THEN
4526: IF PG_DEBUG in ('Y', 'C') THEN
4527: msc_util.msc_log ('Generate_Simplified_Pegging. Error : ' || sqlcode || ': ' || sqlerrm);
4528: END IF;
4529: RETCODE := G_ERROR;
4530:
4531: END Generate_Simplified_Pegging;

Line 4555: msc_util.msc_log('Begin procedure post_plan_pegging');

4551: l_log_file VARCHAR2(255);
4552:
4553: BEGIN
4554:
4555: msc_util.msc_log('Begin procedure post_plan_pegging');
4556:
4557: RETCODE := G_SUCCESS;
4558:
4559:

Line 4562: msc_util.msc_log('l_share_partition := ' || l_share_partition);

4558:
4559:
4560: l_share_partition := fnd_profile.value('MSC_SHARE_PARTITIONS');
4561:
4562: msc_util.msc_log('l_share_partition := ' || l_share_partition);
4563:
4564: SELECT NVL(summary_flag,1), compile_designator
4565: INTO l_summary_flag, l_plan_name
4566: FROM msc_plans

Line 4575: msc_util.msc_log('Another session is running post-plan allocation program for this plan');

4571: MSC_POST_PRO.G_SF_PREALLOC_COMPLETED,
4572: MSC_POST_PRO.G_SF_SYNC_SUCCESS,
4573: MSC_POST_PRO.G_SF_SUMMARY_COMPLETED,
4574: MSC_POST_PRO.G_SF_ATPPEG_COMPLETED) THEN
4575: msc_util.msc_log('Another session is running post-plan allocation program for this plan');
4576: RETCODE := G_ERROR;
4577: RETURN;
4578: END IF;
4579:

Line 4585: msc_util.msc_log('G_ALLOC_ATP := ' || G_ALLOC_ATP);

4581: G_ALLOC_ATP := NVL(FND_PROFILE.value('MSC_ALLOCATED_ATP'),'N');
4582: G_CLASS_HRCHY := NVL(FND_PROFILE.VALUE('MSC_CLASS_HIERARCHY'), 2);
4583: G_ALLOC_METHOD := NVL(FND_PROFILE.VALUE('MSC_ALLOCATION_METHOD'), 2);
4584:
4585: msc_util.msc_log('G_ALLOC_ATP := ' || G_ALLOC_ATP);
4586: msc_util.msc_log('G_CLASS_HRCHY := ' || G_CLASS_HRCHY);
4587: msc_util.msc_log('G_ALLOC_METHOD := ' || G_ALLOC_METHOD);
4588: -- End Bug 3344102
4589:

Line 4586: msc_util.msc_log('G_CLASS_HRCHY := ' || G_CLASS_HRCHY);

4582: G_CLASS_HRCHY := NVL(FND_PROFILE.VALUE('MSC_CLASS_HIERARCHY'), 2);
4583: G_ALLOC_METHOD := NVL(FND_PROFILE.VALUE('MSC_ALLOCATION_METHOD'), 2);
4584:
4585: msc_util.msc_log('G_ALLOC_ATP := ' || G_ALLOC_ATP);
4586: msc_util.msc_log('G_CLASS_HRCHY := ' || G_CLASS_HRCHY);
4587: msc_util.msc_log('G_ALLOC_METHOD := ' || G_ALLOC_METHOD);
4588: -- End Bug 3344102
4589:
4590: msc_util.msc_log('Deleting Existing ATP Pegging data for plan : ' || p_plan_id);

Line 4587: msc_util.msc_log('G_ALLOC_METHOD := ' || G_ALLOC_METHOD);

4583: G_ALLOC_METHOD := NVL(FND_PROFILE.VALUE('MSC_ALLOCATION_METHOD'), 2);
4584:
4585: msc_util.msc_log('G_ALLOC_ATP := ' || G_ALLOC_ATP);
4586: msc_util.msc_log('G_CLASS_HRCHY := ' || G_CLASS_HRCHY);
4587: msc_util.msc_log('G_ALLOC_METHOD := ' || G_ALLOC_METHOD);
4588: -- End Bug 3344102
4589:
4590: msc_util.msc_log('Deleting Existing ATP Pegging data for plan : ' || p_plan_id);
4591:

Line 4590: msc_util.msc_log('Deleting Existing ATP Pegging data for plan : ' || p_plan_id);

4586: msc_util.msc_log('G_CLASS_HRCHY := ' || G_CLASS_HRCHY);
4587: msc_util.msc_log('G_ALLOC_METHOD := ' || G_ALLOC_METHOD);
4588: -- End Bug 3344102
4589:
4590: msc_util.msc_log('Deleting Existing ATP Pegging data for plan : ' || p_plan_id);
4591:
4592: IF l_share_partition = 'Y' THEN
4593: DELETE from msc_atp_pegging
4594: where plan_id = p_plan_id;

Line 4597: msc_util.msc_log ('Post_Plan_Pegging: Number of rows deleted '|| SQL%ROWCOUNT);

4593: DELETE from msc_atp_pegging
4594: where plan_id = p_plan_id;
4595:
4596: IF PG_DEBUG in ('Y', 'C') THEN
4597: msc_util.msc_log ('Post_Plan_Pegging: Number of rows deleted '|| SQL%ROWCOUNT);
4598: END IF;
4599: END IF;
4600:
4601: l_retval := FND_INSTALLATION.GET_APP_INFO('FND', dummy1, dummy2, l_applsys_schema);

Line 4609: msc_util.msc_log('Post_Plan_Pegging: ' ||

4605: MSC_POST_PRO.G_SF_ATPPEG_RUNNING,
4606: l_return_status);
4607: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4608: IF PG_DEBUG in ('Y', 'C') THEN
4609: msc_util.msc_log('Post_Plan_Pegging: ' ||
4610: 'Error occured in procedure Update_Summary_Flag');
4611: END IF;
4612: RAISE FND_API.G_EXC_ERROR;
4613: END IF;

Line 4620: msc_util.msc_log('LOG FILE is: ' || l_log_file);

4616: select logfile_name
4617: into l_log_file
4618: from fnd_concurrent_requests
4619: where request_id = fnd_global.conc_request_id;
4620: msc_util.msc_log('LOG FILE is: ' || l_log_file);
4621: ELSE
4622: BEGIN
4623: SELECT mrp_atp_schedule_temp_s.currval
4624: INTO l_session_id

Line 4634: msc_util.msc_log('Setting ATP Session ID : ' || l_session_id);

4630: FROM dual;
4631: order_sch_wb.debug_session_id := l_session_id;
4632: END;
4633:
4634: msc_util.msc_log('Setting ATP Session ID : ' || l_session_id);
4635: msc_util.msc_log('LOG FILE is: session-' || l_session_id);
4636: END IF;
4637:
4638: IF PG_DEBUG in ('Y', 'C') THEN

Line 4635: msc_util.msc_log('LOG FILE is: session-' || l_session_id);

4631: order_sch_wb.debug_session_id := l_session_id;
4632: END;
4633:
4634: msc_util.msc_log('Setting ATP Session ID : ' || l_session_id);
4635: msc_util.msc_log('LOG FILE is: session-' || l_session_id);
4636: END IF;
4637:
4638: IF PG_DEBUG in ('Y', 'C') THEN
4639:

Line 4640: msc_util.msc_log('Calling Generate_Simplified_Pegging ' );

4636: END IF;
4637:
4638: IF PG_DEBUG in ('Y', 'C') THEN
4639:
4640: msc_util.msc_log('Calling Generate_Simplified_Pegging ' );
4641: END IF;
4642:
4643: MSC_ATP_PEG.Generate_Simplified_Pegging(p_plan_id, l_share_partition,
4644: l_applsys_schema, l_ret_code);

Line 4646: msc_util.msc_log('After Call to Generate_Simplified_Pegging ' );

4642:
4643: MSC_ATP_PEG.Generate_Simplified_Pegging(p_plan_id, l_share_partition,
4644: l_applsys_schema, l_ret_code);
4645: IF PG_DEBUG in ('Y', 'C') THEN
4646: msc_util.msc_log('After Call to Generate_Simplified_Pegging ' );
4647: msc_util.msc_log('Return Code is := ' || l_ret_code);
4648: END IF;
4649: --IF l_ret_code = G_ERROR THEN
4650: -- RETCODE := G_WARNING; -- For now we are treating this as a warning

Line 4647: msc_util.msc_log('Return Code is := ' || l_ret_code);

4643: MSC_ATP_PEG.Generate_Simplified_Pegging(p_plan_id, l_share_partition,
4644: l_applsys_schema, l_ret_code);
4645: IF PG_DEBUG in ('Y', 'C') THEN
4646: msc_util.msc_log('After Call to Generate_Simplified_Pegging ' );
4647: msc_util.msc_log('Return Code is := ' || l_ret_code);
4648: END IF;
4649: --IF l_ret_code = G_ERROR THEN
4650: -- RETCODE := G_WARNING; -- For now we are treating this as a warning
4651: --END IF;

Line 4656: msc_util.msc_log('ERROR IN Generate_Simplified_Pegging ' );

4652: EXCEPTION
4653: WHEN OTHERS THEN
4654:
4655: IF PG_DEBUG in ('Y', 'C') THEN
4656: msc_util.msc_log('ERROR IN Generate_Simplified_Pegging ' );
4657: msc_util.msc_log('ERROR: ' || to_char(SQLCODE));
4658: msc_util.msc_log('ERROR: ' || sqlerrm);
4659: END IF;
4660: RETCODE := G_ERROR;

Line 4657: msc_util.msc_log('ERROR: ' || to_char(SQLCODE));

4653: WHEN OTHERS THEN
4654:
4655: IF PG_DEBUG in ('Y', 'C') THEN
4656: msc_util.msc_log('ERROR IN Generate_Simplified_Pegging ' );
4657: msc_util.msc_log('ERROR: ' || to_char(SQLCODE));
4658: msc_util.msc_log('ERROR: ' || sqlerrm);
4659: END IF;
4660: RETCODE := G_ERROR;
4661: ERRBUF := sqlerrm;

Line 4658: msc_util.msc_log('ERROR: ' || sqlerrm);

4654:
4655: IF PG_DEBUG in ('Y', 'C') THEN
4656: msc_util.msc_log('ERROR IN Generate_Simplified_Pegging ' );
4657: msc_util.msc_log('ERROR: ' || to_char(SQLCODE));
4658: msc_util.msc_log('ERROR: ' || sqlerrm);
4659: END IF;
4660: RETCODE := G_ERROR;
4661: ERRBUF := sqlerrm;
4662: END;

Line 4669: msc_util.msc_log('Post_Plan_Pegging: ' ||

4665: MSC_POST_PRO.G_SF_ATPPEG_COMPLETED,
4666: l_return_status);
4667: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4668: IF PG_DEBUG in ('Y', 'C') THEN
4669: msc_util.msc_log('Post_Plan_Pegging: ' ||
4670: 'Error occured in procedure Update_Summary_Flag');
4671: END IF;
4672: RAISE FND_API.G_EXC_ERROR;
4673: END IF;

Line 4682: msc_util.msc_log('Post_Plan_Pegging: ' ||

4678: l_return_status);
4679:
4680: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4681: IF PG_DEBUG in ('Y', 'C') THEN
4682: msc_util.msc_log('Post_Plan_Pegging: ' ||
4683: 'Error occured in procedure Update_Summary_Flag');
4684: END IF;
4685: END IF;
4686:

Line 4688: msc_util.msc_log ('post_plan_pegging. Error : ' || sqlerrm);

4684: END IF;
4685: END IF;
4686:
4687: IF PG_DEBUG in ('Y', 'C') THEN
4688: msc_util.msc_log ('post_plan_pegging. Error : ' || sqlerrm);
4689: END IF;
4690: ERRBUF := sqlerrm;
4691: RETCODE := G_ERROR;
4692: