DBA Data[Home] [Help]

APPS.MSC_ATP_PVT dependencies on MSC_SCH_WB

Line 314: msc_sch_wb.atp_debug('**********IN Schedule Procedure************');

310:
311: BEGIN
312:
313: IF PG_DEBUG in ('Y', 'C') THEN
314: msc_sch_wb.atp_debug('**********IN Schedule Procedure************');
315: END IF;
316: --initialize ATP_SET_FLAG TO NO --4460369
317: MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := 'N';
318: -- initialize API return status to success

Line 323: msc_sch_wb.atp_debug('Schedule: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);

319: x_return_status := FND_API.G_RET_STS_SUCCESS;
320:
321: MSC_ATP_PVT.G_RES_CONSUME := NVL(FND_PROFILE.value('MSC_ATP_RES_CONSUME'), 'Y');
322: IF PG_DEBUG in ('Y', 'C') THEN
323: msc_sch_wb.atp_debug('Schedule: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);
324: END IF;
325:
326: MSC_ATP_PVT.G_PARTNER_ID := NULL;
327: MSC_ATP_PVT.G_PARTNER_SITE_ID := NULL;

Line 337: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 15');

333: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
334: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
335: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
336: IF PG_DEBUG in ('Y', 'C') THEN
337: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 15');
338: END IF;
339:
340: END IF;
341:

Line 349: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 15.0');

345: l_DEMAND_CLASS_ATP_FLAG.DELETE;
346: l_REQ_ATP_DATE.DELETE;
347: l_REQ_DATE_QTY.DELETE;
348: IF PG_DEBUG in ('Y', 'C') THEN
349: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 15.0');
350: END IF;
351: END IF;
352:
353: --- BUG: 1777496

Line 373: msc_sch_wb.atp_debug('Schedule: ' || 'count :='|| p_atp_table.attribute_02.count);

369:
370: l_plan_id := -1;
371:
372: IF PG_DEBUG in ('Y', 'C') THEN
373: msc_sch_wb.atp_debug('Schedule: ' || 'count :='|| p_atp_table.attribute_02.count);
374: END IF;
375: ---diag_atp: Enable diagnostic ATP only if calling module tells us to do so and for ATP inquiry only
376: ---Also Diag ATP is supported for PDS.
377: IF ((p_atp_table.Action(1) = ATPQUERY) AND (NVL(p_atp_table.attribute_02(1), 2) = 1)

Line 388: msc_sch_wb.atp_debug('Schedule: ' || 'G_DIAGNOSTIC_ATP := ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);

384: MSC_ATP_PVT.G_DIAGNOSTIC_ATP := 2;
385:
386: END IF;
387: IF PG_DEBUG in ('Y', 'C') THEN
388: msc_sch_wb.atp_debug('Schedule: ' || 'G_DIAGNOSTIC_ATP := ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);
389: END IF;
390:
391: /************ Bug 2085071 Assignment set changes ************/
392: IF NVL(p_atp_table.Calling_Module(1), -1) = 724 THEN

Line 394: msc_sch_wb.atp_debug('Schedule: ' || '724');

390:
391: /************ Bug 2085071 Assignment set changes ************/
392: IF NVL(p_atp_table.Calling_Module(1), -1) = 724 THEN
393: IF PG_DEBUG in ('Y', 'C') THEN
394: msc_sch_wb.atp_debug('Schedule: ' || '724');
395: END IF;
396: lv_assign_set_id := p_assign_set_id; -- Use new local variable
397: ELSE
398: -- convert the assignment set id from mrp to msc

Line 400: msc_sch_wb.atp_debug('Schedule: ' || ' not 724');

396: lv_assign_set_id := p_assign_set_id; -- Use new local variable
397: ELSE
398: -- convert the assignment set id from mrp to msc
399: IF PG_DEBUG in ('Y', 'C') THEN
400: msc_sch_wb.atp_debug('Schedule: ' || ' not 724');
401: END IF;
402:
403: -- Need to conver assignment set only if it is NOT NULL. If NULL, do nothing.
404: IF p_assign_set_id IS NOT NULL THEN

Line 407: msc_sch_wb.atp_debug('Schedule: p_atp_table.calling_module: ' || p_atp_table.calling_module(1));

403: -- Need to conver assignment set only if it is NOT NULL. If NULL, do nothing.
404: IF p_assign_set_id IS NOT NULL THEN
405:
406: IF PG_DEBUG in ('Y', 'C') THEN
407: msc_sch_wb.atp_debug('Schedule: p_atp_table.calling_module: ' || p_atp_table.calling_module(1));
408: msc_sch_wb.atp_debug('Schedule: p_atp_table.action: ' || p_atp_table.action(1));
409: END IF;
410:
411: --4567833 , in case of ATP inquiry from source with Org_id as NULL,

Line 408: msc_sch_wb.atp_debug('Schedule: p_atp_table.action: ' || p_atp_table.action(1));

404: IF p_assign_set_id IS NOT NULL THEN
405:
406: IF PG_DEBUG in ('Y', 'C') THEN
407: msc_sch_wb.atp_debug('Schedule: p_atp_table.calling_module: ' || p_atp_table.calling_module(1));
408: msc_sch_wb.atp_debug('Schedule: p_atp_table.action: ' || p_atp_table.action(1));
409: END IF;
410:
411: --4567833 , in case of ATP inquiry from source with Org_id as NULL,
412: -- ATP UI is passing assignment set id of destination so no need to convert it.

Line 418: msc_sch_wb.atp_debug('Schedule: ' || 'source side ATP inquiry with Org_id as NULL');

414:
415: lv_assign_set_id := p_assign_set_id;
416:
417: IF PG_DEBUG in ('Y', 'C') THEN
418: msc_sch_wb.atp_debug('Schedule: ' || 'source side ATP inquiry with Org_id as NULL');
419: END IF;
420:
421: ELSE --4567833 end
422: begin

Line 430: msc_sch_wb.atp_debug('Schedule: ' || 'source side ATP inquiry with Org_id as not NULL');

426: where sr_instance_id = p_instance_id
427: and sr_assignment_set_id = p_assign_set_id;
428:
429: IF PG_DEBUG in ('Y', 'C') THEN
430: msc_sch_wb.atp_debug('Schedule: ' || 'source side ATP inquiry with Org_id as not NULL');
431: END IF;
432:
433: exception
434: when no_data_found then

Line 459: msc_sch_wb.atp_debug('Schedule: ' || 'after converting the assign set id');

455: lv_assign_set_id := FND_PROFILE.value('MSC_ATP_ASSIGN_SET');
456: END IF;
457:
458: IF PG_DEBUG in ('Y', 'C') THEN
459: msc_sch_wb.atp_debug('Schedule: ' || 'after converting the assign set id');
460: END IF;
461: END IF;
462: l_assign_set_id := lv_assign_set_id; -- Set the original local variable
463: /************ Bug 2085071 Assignment set changes ************/

Line 466: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

462: l_assign_set_id := lv_assign_set_id; -- Set the original local variable
463: /************ Bug 2085071 Assignment set changes ************/
464:
465: IF PG_DEBUG in ('Y', 'C') THEN
466: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
467: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id = '||l_plan_id);
468: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
469: END IF;
470:

Line 467: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id = '||l_plan_id);

463: /************ Bug 2085071 Assignment set changes ************/
464:
465: IF PG_DEBUG in ('Y', 'C') THEN
466: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
467: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id = '||l_plan_id);
468: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
469: END IF;
470:
471: IF p_atp_table.Ship_Set_Name(1) IS NOT NULL THEN

Line 468: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);

464:
465: IF PG_DEBUG in ('Y', 'C') THEN
466: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
467: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id = '||l_plan_id);
468: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
469: END IF;
470:
471: IF p_atp_table.Ship_Set_Name(1) IS NOT NULL THEN
472: l_ship_count := p_atp_table.Action.COUNT;

Line 492: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

488: /* Modularize Item and Org Info */
489:
490: l_stmt := 20;
491: IF PG_DEBUG in ('Y', 'C') THEN
492: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
493:
494: -- make sure we get the right record of tables
495: i := p_atp_table.Action.FIRST;
496: WHILE i IS NOT NULL LOOP

Line 497: msc_sch_wb.atp_debug('Schedule: ' || 'Inventory_Item_Id:' || to_char(p_atp_table.Inventory_Item_Id(i))

493:
494: -- make sure we get the right record of tables
495: i := p_atp_table.Action.FIRST;
496: WHILE i IS NOT NULL LOOP
497: msc_sch_wb.atp_debug('Schedule: ' || 'Inventory_Item_Id:' || to_char(p_atp_table.Inventory_Item_Id(i))
498: || 'Source_Organization_Id:' || to_char(p_atp_table.Source_Organization_Id(i))
499: || 'Quantity_Ordered:' || to_char(p_atp_table.Quantity_Ordered(i))
500: || ' old_source organzation id : ' || p_atp_table.old_Source_Organization_Id(i));
501: i := p_atp_table.Action.NEXT(i);

Line 512: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

508: -- we won't do any validation here due to ato impacts.
509:
510: l_stmt := 30;
511: IF PG_DEBUG in ('Y', 'C') THEN
512: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
513: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
514: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
515: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
516: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||

Line 513: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

509:
510: l_stmt := 30;
511: IF PG_DEBUG in ('Y', 'C') THEN
512: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
513: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
514: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
515: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
516: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||
517: MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);

Line 514: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);

510: l_stmt := 30;
511: IF PG_DEBUG in ('Y', 'C') THEN
512: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
513: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
514: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
515: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
516: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||
517: MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
518: END IF;

Line 515: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);

511: IF PG_DEBUG in ('Y', 'C') THEN
512: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
513: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
514: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
515: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
516: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||
517: MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
518: END IF;
519: IF ((MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND (MSC_ATP_PVT.G_DATABASE_LINK IS NULL) AND

Line 516: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||

512: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
513: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
514: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
515: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
516: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||
517: MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
518: END IF;
519: IF ((MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND (MSC_ATP_PVT.G_DATABASE_LINK IS NULL) AND
520: (MSC_ATP_PVT.G_ALLOCATED_ATP = 'N')) THEN

Line 533: msc_sch_wb.atp_debug('Schedule: ' || 'calling_module := ' || p_atp_table.calling_module(1));

529:
530: ---bug 2301524:
531: --- 2301524: Summary mode is not supported for backlog workbench.
532: IF PG_DEBUG in ('Y', 'C') THEN
533: msc_sch_wb.atp_debug('Schedule: ' || 'calling_module := ' || p_atp_table.calling_module(1));
534: msc_sch_wb.atp_debug('Schedule: ' || ' l_summary_flag := ' || l_summary_flag);
535: msc_sch_wb.atp_debug('Schedule: ' || ' G_DATABASE_LINK := ' || NVL(MSC_ATP_PVT.G_DATABASE_LINK,'NULL'));
536: END IF;
537:

Line 534: msc_sch_wb.atp_debug('Schedule: ' || ' l_summary_flag := ' || l_summary_flag);

530: ---bug 2301524:
531: --- 2301524: Summary mode is not supported for backlog workbench.
532: IF PG_DEBUG in ('Y', 'C') THEN
533: msc_sch_wb.atp_debug('Schedule: ' || 'calling_module := ' || p_atp_table.calling_module(1));
534: msc_sch_wb.atp_debug('Schedule: ' || ' l_summary_flag := ' || l_summary_flag);
535: msc_sch_wb.atp_debug('Schedule: ' || ' G_DATABASE_LINK := ' || NVL(MSC_ATP_PVT.G_DATABASE_LINK,'NULL'));
536: END IF;
537:
538: -- After summary enhancement summary ATP is supported for BWB as well - except for ODS case

Line 535: msc_sch_wb.atp_debug('Schedule: ' || ' G_DATABASE_LINK := ' || NVL(MSC_ATP_PVT.G_DATABASE_LINK,'NULL'));

531: --- 2301524: Summary mode is not supported for backlog workbench.
532: IF PG_DEBUG in ('Y', 'C') THEN
533: msc_sch_wb.atp_debug('Schedule: ' || 'calling_module := ' || p_atp_table.calling_module(1));
534: msc_sch_wb.atp_debug('Schedule: ' || ' l_summary_flag := ' || l_summary_flag);
535: msc_sch_wb.atp_debug('Schedule: ' || ' G_DATABASE_LINK := ' || NVL(MSC_ATP_PVT.G_DATABASE_LINK,'NULL'));
536: END IF;
537:
538: -- After summary enhancement summary ATP is supported for BWB as well - except for ODS case
539: IF NVL(p_atp_table.calling_module(1), -99) = -1 AND NVL(l_summary_flag, -1) <> 200 AND MSC_ATP_PVT.G_INV_CTP = 5 THEN

Line 542: msc_sch_wb.atp_debug('Schedule: ' || 'Site is using backlog workbench, update tables and turnoff summary for ODS case');

538: -- After summary enhancement summary ATP is supported for BWB as well - except for ODS case
539: IF NVL(p_atp_table.calling_module(1), -99) = -1 AND NVL(l_summary_flag, -1) <> 200 AND MSC_ATP_PVT.G_INV_CTP = 5 THEN
540: --- if backlog workbench is used then set the summary falg to 200
541: IF PG_DEBUG in ('Y', 'C') THEN
542: msc_sch_wb.atp_debug('Schedule: ' || 'Site is using backlog workbench, update tables and turnoff summary for ODS case');
543: END IF;
544:
545: update msc_apps_instances
546: set summary_flag = 200;

Line 552: msc_sch_wb.atp_debug('Schedule: ' || 'Site is using backlog workbench, turnoff summary');

548: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
549: ELSIF NVL(l_summary_flag, -1) = 200 AND MSC_ATP_PVT.G_INV_CTP = 5 THEN
550: --site is using backlog workbench, turn off the summary flag - only for ODS case - summary enhancement
551: IF PG_DEBUG in ('Y', 'C') THEN
552: msc_sch_wb.atp_debug('Schedule: ' || 'Site is using backlog workbench, turnoff summary');
553: END IF;
554: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
555: END IF;
556:

Line 563: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed scenario + ODS, turning summary flag off');

559: ---- After summary enhancement summary will be supported for distributed cases as well - except for ODS case
560: IF MSC_ATP_PVT.G_DATABASE_LINK IS NOT NULL AND MSC_ATP_PVT.G_INV_CTP = 5 THEN
561: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
562: IF PG_DEBUG in ('Y', 'C') THEN
563: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed scenario + ODS, turning summary flag off');
564: END IF;
565: END IF;
566: -- specify l_atp_table here so that for undemand we have a
567: -- place to store the error code.

Line 580: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP ' || MSC_ATP_PVT.G_INV_CTP_SOURCE);

576:
577: IF MSC_ATP_PVT.G_INV_CTP_SOURCE <> MSC_ATP_PVT.G_INV_CTP THEN
578:
579: IF PG_DEBUG in ('Y', 'C') THEN
580: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP ' || MSC_ATP_PVT.G_INV_CTP_SOURCE);
581: msc_sch_wb.atp_debug('Schedule: ' || 'Destination INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
582: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP not in sync with destination ');
583: END IF;
584: -- apply the error code in l_atp_table

Line 581: msc_sch_wb.atp_debug('Schedule: ' || 'Destination INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);

577: IF MSC_ATP_PVT.G_INV_CTP_SOURCE <> MSC_ATP_PVT.G_INV_CTP THEN
578:
579: IF PG_DEBUG in ('Y', 'C') THEN
580: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP ' || MSC_ATP_PVT.G_INV_CTP_SOURCE);
581: msc_sch_wb.atp_debug('Schedule: ' || 'Destination INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
582: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP not in sync with destination ');
583: END IF;
584: -- apply the error code in l_atp_table
585:

Line 582: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP not in sync with destination ');

578:
579: IF PG_DEBUG in ('Y', 'C') THEN
580: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP ' || MSC_ATP_PVT.G_INV_CTP_SOURCE);
581: msc_sch_wb.atp_debug('Schedule: ' || 'Destination INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
582: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP not in sync with destination ');
583: END IF;
584: -- apply the error code in l_atp_table
585:
586: FOR l_counter IN 1..l_atp_table.error_code.COUNT LOOP

Line 597: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP is in sync with destination ');

593: RAISE NO_DATA_FOUND;
594:
595: ELSE
596: IF PG_DEBUG in ('Y', 'C') THEN
597: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP is in sync with destination ');
598: END IF;
599: END IF;
600:
601: END IF;

Line 627: msc_sch_wb.atp_debug('Schedule: p_atp_table.Identifier(m)' ||

623:
624: For m in 1..p_atp_table.action.count LOOP
625: IF p_atp_table.ato_model_line_id(m) IS NOT NULL THEN
626: IF PG_DEBUG in ('Y', 'C') THEN
627: msc_sch_wb.atp_debug('Schedule: p_atp_table.Identifier(m)' ||
628: p_atp_table.Identifier(m));
629: msc_sch_wb.atp_debug('Schedule: ' ||
630: 'p_atp_table.Config_item_line_id(m)' ||
631: p_atp_table.Config_item_line_id(m));

Line 629: msc_sch_wb.atp_debug('Schedule: ' ||

625: IF p_atp_table.ato_model_line_id(m) IS NOT NULL THEN
626: IF PG_DEBUG in ('Y', 'C') THEN
627: msc_sch_wb.atp_debug('Schedule: p_atp_table.Identifier(m)' ||
628: p_atp_table.Identifier(m));
629: msc_sch_wb.atp_debug('Schedule: ' ||
630: 'p_atp_table.Config_item_line_id(m)' ||
631: p_atp_table.Config_item_line_id(m));
632: END IF;
633: END IF;

Line 641: msc_sch_wb.atp_debug('Schedule: ' || 'Inventory item_id := ' || l_atp_table.inventory_item_id(m));

637: p_atp_table.inventory_item_id(m),
638: p_atp_table.old_source_organization_id(m));
639: --l_old_org_id(m) := l_atp_table.old_source_organization_id(m);
640: IF PG_DEBUG in ('Y', 'C') THEN
641: msc_sch_wb.atp_debug('Schedule: ' || 'Inventory item_id := ' || l_atp_table.inventory_item_id(m));
642: msc_sch_wb.atp_debug('Schedule: ' || 'PF item id := ' || l_pf_item_id(m));
643: END IF;
644: END IF;
645: END LOOP;

Line 642: msc_sch_wb.atp_debug('Schedule: ' || 'PF item id := ' || l_pf_item_id(m));

638: p_atp_table.old_source_organization_id(m));
639: --l_old_org_id(m) := l_atp_table.old_source_organization_id(m);
640: IF PG_DEBUG in ('Y', 'C') THEN
641: msc_sch_wb.atp_debug('Schedule: ' || 'Inventory item_id := ' || l_atp_table.inventory_item_id(m));
642: msc_sch_wb.atp_debug('Schedule: ' || 'PF item id := ' || l_pf_item_id(m));
643: END IF;
644: END IF;
645: END LOOP;
646: END IF;

Line 669: msc_sch_wb.atp_debug('Schedule: l_return_status: ' || l_return_status);

665: l_delete_atp_rec,
666: l_return_status);
667:
668: IF PG_DEBUG in ('Y', 'C') THEN --3720018
669: msc_sch_wb.atp_debug('Schedule: l_return_status: ' || l_return_status);
670: END IF;
671:
672: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
673: IF PG_DEBUG in ('Y', 'C') THEN

Line 674: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');

670: END IF;
671:
672: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
673: IF PG_DEBUG in ('Y', 'C') THEN
674: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');
675: END IF;
676: x_return_status := FND_API.G_RET_STS_ERROR;
677: RAISE FND_API.G_EXC_ERROR;
678: END IF;

Line 687: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);

683: RAISE NO_DATA_FOUND;
684: END IF;
685: END IF;
686: IF PG_DEBUG in ('Y', 'C') THEN --3720018
687: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);
688: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);
689: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);
690: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);
691: END IF;

Line 688: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);

684: END IF;
685: END IF;
686: IF PG_DEBUG in ('Y', 'C') THEN --3720018
687: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);
688: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);
689: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);
690: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);
691: END IF;
692:

Line 689: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);

685: END IF;
686: IF PG_DEBUG in ('Y', 'C') THEN --3720018
687: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);
688: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);
689: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);
690: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);
691: END IF;
692:
693: --3720018, error_code, attribute_07(plan_name) and old_plan_id are populated back to local variables.

Line 690: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);

686: IF PG_DEBUG in ('Y', 'C') THEN --3720018
687: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);
688: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);
689: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);
690: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);
691: END IF;
692:
693: --3720018, error_code, attribute_07(plan_name) and old_plan_id are populated back to local variables.
694: l_atp_table.error_code := l_delete_atp_rec.error_code; --3720018

Line 701: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

697:
698:
699: l_stmt := 40;
700: IF PG_DEBUG in ('Y', 'C') THEN
701: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
702: END IF;
703:
704: -- bug 1382994: if action is demand, quantity should not be 0.
705: -- otherwise we also treat it as undemand.

Line 724: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

720: -- will explain later.
721:
722: l_stmt := 50;
723: IF PG_DEBUG in ('Y', 'C') THEN
724: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
725: END IF;
726:
727: -- cchen: disable complete scatp for now
728: -- l_complete_scatp := NVL(FND_PROFILE.value('MRP_COMPLETE_SCATP'), 'N');

Line 730: -- msc_sch_wb.atp_debug('l_complete_scatp = '||l_complete_scatp);

726:
727: -- cchen: disable complete scatp for now
728: -- l_complete_scatp := NVL(FND_PROFILE.value('MRP_COMPLETE_SCATP'), 'N');
729: -- l_complete_scatp := 'Y';
730: -- msc_sch_wb.atp_debug('l_complete_scatp = '||l_complete_scatp);
731:
732: -- we may need to loop through every supply source until we succeed
733: -- if action is atp, depending on profile option mrp_complete_scatp
734: -- we do things differently:

Line 750: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

746: k := 1;
747:
748: l_stmt := 60;
749: IF PG_DEBUG in ('Y', 'C') THEN
750: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
751: END IF;
752:
753: IF ((p_atp_table.action(k) <> ATPQUERY) OR
754: (p_atp_table.action(k) = ATPQUERY AND l_complete_scatp = 'N')) THEN

Line 765: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

761:
762: -- loop through the items in the arrival set.
763: l_stmt := 70;
764: IF PG_DEBUG in ('Y', 'C') THEN
765: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
766: END IF;
767:
768:
769: -- 1873918: PDS-ODS fix

Line 779: msc_sch_wb.atp_debug('p_atp_table.delivery_lead_time: ' || p_atp_table.delivery_lead_time(1));

775: l_allocation_method := NVL(MSC_ATP_PVT.G_ALLOCATION_METHOD, 2);
776:
777: -- savirine, Sep 05, 2001: call get_regions to get regions info which will be used for ATP request.
778:
779: msc_sch_wb.atp_debug('p_atp_table.delivery_lead_time: ' || p_atp_table.delivery_lead_time(1));
780:
781: IF (p_atp_table.Source_Organization_id(1) IS NULL or p_atp_table.ship_method(1) IS NULL or
782: p_atp_table.delivery_lead_time(1) IS NULL) and (p_atp_table.Calling_Module(1) = 724)
783: and (NVL(p_atp_table.Customer_Site_Id(1), -1) <> NVL(G_SR_PARTNER_SITE_ID, -1)) THEN

Line 805: msc_sch_wb.atp_debug('Schedule: ' || 'Get_Regions, return status : ' || l_return_status);

801: G_SR_PARTY_SITE_ID := p_atp_table.party_site_id(1);
802: G_SR_CUSTOMER_COUNTRY := p_atp_table.customer_country(1);
803:
804: IF PG_DEBUG in ('Y', 'C') THEN
805: msc_sch_wb.atp_debug('Schedule: ' || 'Get_Regions, return status : ' || l_return_status);
806: END IF;
807:
808: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
809: -- something wrong so we want to rollback;

Line 811: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');

807:
808: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
809: -- something wrong so we want to rollback;
810: IF PG_DEBUG in ('Y', 'C') THEN
811: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');
812: END IF;
813: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
814: IF PG_DEBUG in ('Y', 'C') THEN
815: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');

Line 815: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');

811: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');
812: END IF;
813: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
814: IF PG_DEBUG in ('Y', 'C') THEN
815: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');
816: END IF;
817: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
818: END IF;
819:

Line 831: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

827: -- default the plan_id to -1 and adjust it later.
828:
829: -- 1873918: PDS-ODS fix
830: IF PG_DEBUG in ('Y', 'C') THEN
831: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
832: END IF;
833: MSC_ATP_PVT.G_INV_CTP := l_inv_ctp;
834: -- ATP4drp re-set using original profile value.
835: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

Line 841: msc_sch_wb.atp_debug('Schedule: ' || '724');

837: MSC_ATP_PVT.G_ALLOCATION_METHOD := l_allocation_method;
838: l_plan_id := -1;
839: IF NVL(p_atp_table.Calling_Module(1), -1) = 724 THEN
840: IF PG_DEBUG in ('Y', 'C') THEN
841: msc_sch_wb.atp_debug('Schedule: ' || '724');
842: END IF;
843: l_assign_set_id := p_assign_set_id;
844: ELSE
845: -- convert the assignment set id from mrp to msc

Line 847: msc_sch_wb.atp_debug('Schedule: ' || ' not 724');

843: l_assign_set_id := p_assign_set_id;
844: ELSE
845: -- convert the assignment set id from mrp to msc
846: IF PG_DEBUG in ('Y', 'C') THEN
847: msc_sch_wb.atp_debug('Schedule: ' || ' not 724');
848: END IF;
849: /************ Bug 2085071 Assignment set changes ************/
850: /* Remove duplicate query
851: //begin

Line 865: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);

861: //end;
862: */
863: l_assign_set_id := lv_assign_set_id; -- Use new variable instead
864: IF PG_DEBUG in ('Y', 'C') THEN
865: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
866: END IF;
867: /************ Bug 2085071 Assignment set changes ************/
868: IF PG_DEBUG in ('Y', 'C') THEN
869: msc_sch_wb.atp_debug('Schedule: ' || 'after converting the assign set id');

Line 869: msc_sch_wb.atp_debug('Schedule: ' || 'after converting the assign set id');

865: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
866: END IF;
867: /************ Bug 2085071 Assignment set changes ************/
868: IF PG_DEBUG in ('Y', 'C') THEN
869: msc_sch_wb.atp_debug('Schedule: ' || 'after converting the assign set id');
870: END IF;
871:
872: END IF;
873:

Line 881: msc_sch_wb.atp_debug('Schedule: ' || 'requesting org id := ' || l_request_org_id);

877: l_process_org_id := p_atp_table.Source_Organization_Id(k);
878: l_request_org_id := p_atp_table.organization_id(k);
879:
880: IF PG_DEBUG in ('Y', 'C') THEN
881: msc_sch_wb.atp_debug('Schedule: ' || 'requesting org id := ' || l_request_org_id);
882: END IF;
883: -- for bug 1052654
884: -- l_atp_table := p_atp_table;
885:

Line 903: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

899:
900: IF l_arrival_count > 1 THEN
901: l_stmt := 150;
902: IF PG_DEBUG in ('Y', 'C') THEN
903: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
904: END IF;
905:
906: -- arrival set exists
907: l_atp_table := x_atp_table; -- this is to null out l_atp_table;

Line 914: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

910: l_atp_table, l_return_status );
911: ELSE
912: l_stmt := 160;
913: IF PG_DEBUG in ('Y', 'C') THEN
914: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
915: END IF;
916:
917: l_atp_table := p_atp_table;
918:

Line 937: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);

933: FROM msc_apps_instances
934: WHERE instance_id = p_instance_id;
935:
936: IF PG_DEBUG in ('Y', 'C') THEN
937: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
938: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = ' || l_summary_flag);
939: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_APPS_VER = ' || MSC_ATP_PVT.G_APPS_VER);
940: END IF; -- 2300767
941:

Line 938: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = ' || l_summary_flag);

934: WHERE instance_id = p_instance_id;
935:
936: IF PG_DEBUG in ('Y', 'C') THEN
937: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
938: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = ' || l_summary_flag);
939: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_APPS_VER = ' || MSC_ATP_PVT.G_APPS_VER);
940: END IF; -- 2300767
941:
942:

Line 939: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_APPS_VER = ' || MSC_ATP_PVT.G_APPS_VER);

935:
936: IF PG_DEBUG in ('Y', 'C') THEN
937: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
938: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = ' || l_summary_flag);
939: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_APPS_VER = ' || MSC_ATP_PVT.G_APPS_VER);
940: END IF; -- 2300767
941:
942:
943: IF NVL(l_so_tbl_status, 1) = 2 THEN

Line 946: msc_sch_wb.atp_debug('Schedule: ' || 'ATP not available');

942:
943: IF NVL(l_so_tbl_status, 1) = 2 THEN
944: -- not available for atp
945: IF PG_DEBUG in ('Y', 'C') THEN
946: msc_sch_wb.atp_debug('Schedule: ' || 'ATP not available');
947: END IF;
948:
949: l_atp_table.error_code(1) := TRY_ATP_LATER;
950: RAISE NO_DATA_FOUND;

Line 955: msc_sch_wb.atp_debug('Schedule: ' || ' summary table is not ready. Switch to detail tables');

951:
952: ELSIF l_summary_flag = 1 THEN
953: ---- summary table is not ready. Switch to detail tables
954: IF PG_DEBUG in ('Y', 'C') THEN
955: msc_sch_wb.atp_debug('Schedule: ' || ' summary table is not ready. Switch to detail tables');
956: END IF;
957: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
958:
959: ELSIF l_summary_flag = 2 THEN

Line 962: msc_sch_wb.atp_debug('Schedule: ' || 'Summary Concurrent program is running');

958:
959: ELSIF l_summary_flag = 2 THEN
960:
961: IF PG_DEBUG in ('Y', 'C') THEN
962: msc_sch_wb.atp_debug('Schedule: ' || 'Summary Concurrent program is running');
963: END IF;
964: l_atp_table.error_code(1) := SUMM_CONC_PROG_RUNNING;
965: RAISE NO_DATA_FOUND;
966: END IF;

Line 975: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

971: -- if specified, use it. otherwise, get it from sourcing rules
972:
973: l_stmt := 80;
974: IF PG_DEBUG in ('Y', 'C') THEN
975: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
976: END IF;
977:
978:
979: IF p_atp_table.Source_Organization_Id(k) is null THEN

Line 996: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

992: -- if this is actually an ship set, then get the common
993: -- warehouses for the whole ship set instead of this item.
994:
995: IF PG_DEBUG in ('Y', 'C') THEN
996: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
997: msc_sch_wb.atp_debug('Schedule: ' || 'Before Atp_Sources');
998: END IF;
999:
1000: l_item_sourcing_info_rec.sr_inventory_item_id := l_atp_table.inventory_item_id;

Line 997: msc_sch_wb.atp_debug('Schedule: ' || 'Before Atp_Sources');

993: -- warehouses for the whole ship set instead of this item.
994:
995: IF PG_DEBUG in ('Y', 'C') THEN
996: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
997: msc_sch_wb.atp_debug('Schedule: ' || 'Before Atp_Sources');
998: END IF;
999:
1000: l_item_sourcing_info_rec.sr_inventory_item_id := l_atp_table.inventory_item_id;
1001: l_item_sourcing_info_rec.line_id := l_atp_table.identifier;

Line 1018: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1014: IF l_ship_count > 1 THEN
1015:
1016: l_stmt := 100;
1017: IF PG_DEBUG in ('Y', 'C') THEN
1018: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1019: END IF;
1020:
1021:
1022: MSC_ATP_PROC.Atp_Sources(p_instance_id,

Line 1042: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1038: ELSE
1039:
1040: l_stmt := 110;
1041: IF PG_DEBUG in ('Y', 'C') THEN
1042: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1043: END IF;
1044:
1045: MSC_ATP_PROC.Atp_Sources(p_instance_id,
1046: l_plan_id,

Line 1065: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1061: END IF;
1062:
1063: l_stmt := 120;
1064: IF PG_DEBUG in ('Y', 'C') THEN
1065: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1066: msc_sch_wb.atp_debug('Schedule: ' || 'After Atp_Sources');
1067: msc_sch_wb.atp_debug('Schedule: ' || 'l_sources.source_type.count = '||
1068: to_char(l_sources.source_type.count));
1069: END IF;

Line 1066: msc_sch_wb.atp_debug('Schedule: ' || 'After Atp_Sources');

1062:
1063: l_stmt := 120;
1064: IF PG_DEBUG in ('Y', 'C') THEN
1065: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1066: msc_sch_wb.atp_debug('Schedule: ' || 'After Atp_Sources');
1067: msc_sch_wb.atp_debug('Schedule: ' || 'l_sources.source_type.count = '||
1068: to_char(l_sources.source_type.count));
1069: END IF;
1070:

Line 1067: msc_sch_wb.atp_debug('Schedule: ' || 'l_sources.source_type.count = '||

1063: l_stmt := 120;
1064: IF PG_DEBUG in ('Y', 'C') THEN
1065: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1066: msc_sch_wb.atp_debug('Schedule: ' || 'After Atp_Sources');
1067: msc_sch_wb.atp_debug('Schedule: ' || 'l_sources.source_type.count = '||
1068: to_char(l_sources.source_type.count));
1069: END IF;
1070:
1071: -- check the return status

Line 1076: msc_sch_wb.atp_debug('Schedule: ' || 'atp source fails');

1072: IF l_return_status <> FND_API.G_RET_STS_SUCCESS OR
1073: l_sources.source_type.count = 0 THEN
1074:
1075: IF PG_DEBUG in ('Y', 'C') THEN
1076: msc_sch_wb.atp_debug('Schedule: ' || 'atp source fails');
1077: END IF;
1078: x_return_status := FND_API.G_RET_STS_ERROR;
1079:
1080: IF PG_DEBUG in ('Y', 'C') THEN

Line 1081: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Customer_Id.COUNT :='||l_atp_table.Customer_Id.COUNT);

1077: END IF;
1078: x_return_status := FND_API.G_RET_STS_ERROR;
1079:
1080: IF PG_DEBUG in ('Y', 'C') THEN
1081: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Customer_Id.COUNT :='||l_atp_table.Customer_Id.COUNT);
1082: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code.COUNT :='||l_atp_table.Error_Code.COUNT);
1083: END IF;
1084: --4091487 In case no records in msc_item_id_lid
1085: --raise seperate error item not collected in case item not found in

Line 1082: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code.COUNT :='||l_atp_table.Error_Code.COUNT);

1078: x_return_status := FND_API.G_RET_STS_ERROR;
1079:
1080: IF PG_DEBUG in ('Y', 'C') THEN
1081: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Customer_Id.COUNT :='||l_atp_table.Customer_Id.COUNT);
1082: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code.COUNT :='||l_atp_table.Error_Code.COUNT);
1083: END IF;
1084: --4091487 In case no records in msc_item_id_lid
1085: --raise seperate error item not collected in case item not found in
1086:

Line 1110: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1106: -- assume it is a transfer as well
1107:
1108: l_stmt := 130;
1109: IF PG_DEBUG in ('Y', 'C') THEN
1110: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1111: msc_sch_wb.atp_debug('G_MODEL_IS_PRESENT_IN_SET := ' || MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET);
1112: END IF;
1113:
1114: --s_cto_rearch

Line 1111: msc_sch_wb.atp_debug('G_MODEL_IS_PRESENT_IN_SET := ' || MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET);

1107:
1108: l_stmt := 130;
1109: IF PG_DEBUG in ('Y', 'C') THEN
1110: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1111: msc_sch_wb.atp_debug('G_MODEL_IS_PRESENT_IN_SET := ' || MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET);
1112: END IF;
1113:
1114: --s_cto_rearch
1115: IF NVL(MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET, 2) = 1 THEN

Line 1135: msc_sch_wb.atp_debug('Rows inserted in MSC_SHIP_SET_TEMP := ' || SQL%ROWCOUNT);

1131: VALUES
1132: (p_atp_table.inventory_item_id(l_count),
1133: p_atp_table.identifier(l_count));
1134: IF PG_DEBUG in ('Y', 'C') THEN
1135: msc_sch_wb.atp_debug('Rows inserted in MSC_SHIP_SET_TEMP := ' || SQL%ROWCOUNT);
1136: END IF;
1137: END IF;
1138:
1139:

Line 1166: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1162: END IF;
1163:
1164: l_stmt := 140;
1165: IF PG_DEBUG in ('Y', 'C') THEN
1166: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1167: END IF;
1168:
1169: -- go over each sources: j is the index for sources (warehouses)
1170: j := 1;

Line 1177: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1173: * so moved this chunk up before exception can be raised
1174: IF l_arrival_count > 1 THEN
1175: l_stmt := 150;
1176: IF PG_DEBUG in ('Y', 'C') THEN
1177: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1178: END IF;
1179:
1180: -- arrival set exists
1181: l_atp_table := x_atp_table; -- this is to null out l_atp_table;

Line 1188: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1184: l_atp_table, l_return_status );
1185: ELSE
1186: l_stmt := 160;
1187: IF PG_DEBUG in ('Y', 'C') THEN
1188: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1189: END IF;
1190:
1191: l_atp_table := p_atp_table;
1192:

Line 1198: msc_sch_wb.atp_debug('Schedule: Stmt = ' ||l_stmt || ' : '||j || 'status : '|| l_overall_status);

1194: */
1195:
1196: l_stmt := 170;
1197: IF PG_DEBUG in ('Y', 'C') THEN
1198: msc_sch_wb.atp_debug('Schedule: Stmt = ' ||l_stmt || ' : '||j || 'status : '|| l_overall_status);
1199: END IF;
1200:
1201: -- 2902265 do sane var initialization
1202: l_date_higher_src := 'N';

Line 1219: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);

1215: l_ship_method := p_atp_table.ship_method(k);
1216: l_delivery_lead_time := p_atp_table.delivery_lead_time(k);
1217: --4386906
1218: IF PG_DEBUG in ('Y', 'C') THEN
1219: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);
1220: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);
1221: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906
1222: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906
1223: END IF;

Line 1220: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);

1216: l_delivery_lead_time := p_atp_table.delivery_lead_time(k);
1217: --4386906
1218: IF PG_DEBUG in ('Y', 'C') THEN
1219: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);
1220: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);
1221: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906
1222: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906
1223: END IF;
1224:

Line 1221: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906

1217: --4386906
1218: IF PG_DEBUG in ('Y', 'C') THEN
1219: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);
1220: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);
1221: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906
1222: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906
1223: END IF;
1224:
1225: /* ship_rec_cal

Line 1222: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906

1218: IF PG_DEBUG in ('Y', 'C') THEN
1219: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);
1220: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);
1221: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906
1222: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906
1223: END IF;
1224:
1225: /* ship_rec_cal
1226: -- ngoel 9/25/2001, wrapped since this function raises an exception which needs to be handled.

Line 1239: msc_sch_wb.atp_debug('Schedule: ' || 'Sysdate not found in Calendar');

1235: END;
1236:
1237: IF l_sys_next_date IS NULL THEN
1238: IF PG_DEBUG in ('Y', 'C') THEN
1239: msc_sch_wb.atp_debug('Schedule: ' || 'Sysdate not found in Calendar');
1240: END IF;
1241: l_atp_table.error_code(1) := NO_MATCHING_CAL_DATE;
1242: RAISE NO_DATA_FOUND;
1243: END IF;

Line 1247: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);

1243: END IF;
1244:
1245: l_stmt := 180;
1246: IF PG_DEBUG in ('Y', 'C') THEN
1247: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1248: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1249: END IF;*/
1250:
1251: -- initialize the group date in case it is a ship set

Line 1248: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1244:
1245: l_stmt := 180;
1246: IF PG_DEBUG in ('Y', 'C') THEN
1247: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1248: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1249: END IF;*/
1250:
1251: -- initialize the group date in case it is a ship set
1252: -- Bug 2259824

Line 1255: msc_sch_wb.atp_debug('Schedule: 2259824 l_group_date = '||

1251: -- initialize the group date in case it is a ship set
1252: -- Bug 2259824
1253: l_group_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1254: IF PG_DEBUG in ('Y', 'C') THEN
1255: msc_sch_wb.atp_debug('Schedule: 2259824 l_group_date = '||
1256: to_char(l_group_date, 'DD-MON-YYYY HH24:MI:SS'));
1257: END IF;
1258:
1259: -- initialize the # of element success in a set.

Line 1287: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1283: l_atp_table.delivery_lead_time(i) :=l_delivery_lead_time;
1284: --4386906
1285: -- 1873918: PDS-ODS fix
1286: IF PG_DEBUG in ('Y', 'C') THEN
1287: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1288: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
1289: msc_sch_wb.atp_debug('Schedule: Reinitialize global org/item/plan recs');
1290: END IF;
1291: MSC_ATP_PVT.G_INV_CTP := l_inv_ctp;

Line 1288: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

1284: --4386906
1285: -- 1873918: PDS-ODS fix
1286: IF PG_DEBUG in ('Y', 'C') THEN
1287: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1288: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
1289: msc_sch_wb.atp_debug('Schedule: Reinitialize global org/item/plan recs');
1290: END IF;
1291: MSC_ATP_PVT.G_INV_CTP := l_inv_ctp;
1292: -- ATP4drp re-set using original profile value

Line 1289: msc_sch_wb.atp_debug('Schedule: Reinitialize global org/item/plan recs');

1285: -- 1873918: PDS-ODS fix
1286: IF PG_DEBUG in ('Y', 'C') THEN
1287: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1288: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
1289: msc_sch_wb.atp_debug('Schedule: Reinitialize global org/item/plan recs');
1290: END IF;
1291: MSC_ATP_PVT.G_INV_CTP := l_inv_ctp;
1292: -- ATP4drp re-set using original profile value
1293: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

Line 1305: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP '||G_INV_CTP|| ' G_ALLOCATED_ATP '||G_ALLOCATED_ATP);

1301:
1302: --diag_atp: Reset the allocation rule name varibale as it may get reset.
1303: MSC_ATP_PVT.G_ALLOCATION_RULE_NAME := null;
1304: IF PG_DEBUG in ('Y', 'C') THEN
1305: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP '||G_INV_CTP|| ' G_ALLOCATED_ATP '||G_ALLOCATED_ATP);
1306: END IF;
1307:
1308: -- ship_rec_cal
1309: -- MSC_ATP_PVT.G_CALENDAR_CONSTRAINT := 'N';

Line 1341: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||

1337: AND MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' -- user defined allocated ATP
1338: AND MSC_ATP_PVT.G_ALLOCATION_METHOD <> 1
1339: ) THEN
1340: IF PG_DEBUG in ('Y', 'C') THEN
1341: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||
1342: 'always do ATP against details table');
1343: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1344: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1345: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);

Line 1343: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);

1339: ) THEN
1340: IF PG_DEBUG in ('Y', 'C') THEN
1341: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||
1342: 'always do ATP against details table');
1343: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1344: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1345: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
1346: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);
1347: END IF;

Line 1344: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);

1340: IF PG_DEBUG in ('Y', 'C') THEN
1341: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||
1342: 'always do ATP against details table');
1343: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1344: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1345: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
1346: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);
1347: END IF;
1348: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';

Line 1345: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);

1341: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||
1342: 'always do ATP against details table');
1343: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1344: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1345: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
1346: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);
1347: END IF;
1348: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
1349: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 1346: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);

1342: 'always do ATP against details table');
1343: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1344: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1345: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
1346: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);
1347: END IF;
1348: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
1349: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 THEN
1350: --- we re-read this summary profile option because it might get changed with plan

Line 1354: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

1350: --- we re-read this summary profile option because it might get changed with plan
1351: MSC_ATP_PVT.G_SUMMARY_FLAG := NVL(FND_PROFILE.VALUE('MSC_ENABLE_ATP_SUMMARY'), 'N');
1352: END IF;
1353: IF PG_DEBUG in ('Y', 'C') THEN
1354: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
1355: END IF;
1356:
1357: MSC_ATP_PVT.G_ORDER_LINE_ID := l_atp_table.Identifier(i);
1358: MSC_ATP_PVT.G_ASSEMBLY_LINE_ID := l_atp_table.Identifier(i);

Line 1366: msc_sch_wb.atp_debug('Schedule: ' || 'Setting global Demand_Class variable to : '|| MSC_ATP_PVT.G_ATP_DEMAND_CLASS );

1362:
1363: -- krajan : 2408902 - populate global variable (for use with CTO items)
1364: MSC_ATP_PVT.G_ATP_DEMAND_CLASS := l_atp_table.Demand_class(i);
1365: IF PG_DEBUG in ('Y', 'C') THEN
1366: msc_sch_wb.atp_debug('Schedule: ' || 'Setting global Demand_Class variable to : '|| MSC_ATP_PVT.G_ATP_DEMAND_CLASS );
1367: END IF;
1368:
1369: -- 9/24/2001, ngoel added to identify if current line is a MATO line, initializing here.
1370: MSC_ATP_PVT.G_CTO_LINE := 'N';

Line 1418: msc_sch_wb.atp_debug('Schedule: ' || 'Item not found : ' || MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID);

1414: IF MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID IS NOT NULL AND
1415: (NVL(l_atp_table.attribute_06(i), 'N') <> 'N' OR NVL(l_atp_table.atp_components_flag(i), 'N') <> 'N') THEN
1416:
1417: IF PG_DEBUG in ('Y', 'C') THEN
1418: msc_sch_wb.atp_debug('Schedule: ' || 'Item not found : ' || MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID);
1419: END IF;
1420:
1421: FOR l_count in 1..l_atp_table.error_code.count LOOP
1422: IF l_atp_table.inventory_item_id(l_count) = MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID THEN

Line 1435: msc_sch_wb.atp_debug('Schedule: ' || 'ship_method: ' || l_atp_table.ship_method(i));

1431:
1432: END IF;
1433:
1434: IF PG_DEBUG in ('Y', 'C') THEN
1435: msc_sch_wb.atp_debug('Schedule: ' || 'ship_method: ' || l_atp_table.ship_method(i));
1436: END IF;
1437: -- dsting dlt
1438: IF nvl(l_atp_table.delivery_lead_time(i), -1) = -1 THEN
1439: -- Bug 3449812 - Base DLT on internal_org_id if available

Line 1449: msc_sch_wb.atp_debug('Schedule: ' || 'Inside Org code');

1445: l_atp_table.customer_site_id(1) IS NULL AND
1446: l_atp_table.party_site_id(1) IS NULL AND --2814895
1447: l_atp_table.customer_country(1) IS NULL) THEN --2814895
1448: IF PG_DEBUG in ('Y', 'C') THEN
1449: msc_sch_wb.atp_debug('Schedule: ' || 'Inside Org code');
1450: END IF;
1451: MSC_ATP_PROC.get_delivery_lead_time(
1452: l_sourcing_org_id,
1453: NULL, -- from location id

Line 1474: msc_sch_wb.atp_debug('Schedule: ' || 'Inside customer_site_id code');

1470: );
1471:
1472: ELSIF (l_atp_table.customer_site_id(1) IS NOT NULL) THEN
1473: IF PG_DEBUG in ('Y', 'C') THEN
1474: msc_sch_wb.atp_debug('Schedule: ' || 'Inside customer_site_id code');
1475: END IF;
1476: MSC_ATP_PROC.get_delivery_lead_time(
1477: l_sourcing_org_id,
1478: NULL, -- from location id

Line 1499: msc_sch_wb.atp_debug('Schedule: ' || 'Inside party_site_id code');

1495: );
1496:
1497: ELSIF ( l_atp_table.party_site_id(1) IS NOT NULL ) THEN --2814895
1498: IF PG_DEBUG in ('Y', 'C') THEN
1499: msc_sch_wb.atp_debug('Schedule: ' || 'Inside party_site_id code');
1500: END IF;
1501: MSC_ATP_PROC.get_delivery_lead_time(
1502: l_sourcing_org_id,
1503: NULL, -- from location id

Line 1524: msc_sch_wb.atp_debug('Schedule: ' || 'Inside address parameter code');

1520: );
1521:
1522: ELSIF ( l_atp_table.customer_country(1) IS NOT NULL) THEN --2814895
1523: IF PG_DEBUG in ('Y', 'C') THEN
1524: msc_sch_wb.atp_debug('Schedule: ' || 'Inside address parameter code');
1525: END IF;
1526: MSC_ATP_PROC.get_delivery_lead_time(
1527: l_sourcing_org_id,
1528: NULL, -- from location id

Line 1574: msc_sch_wb.atp_debug('Schedule: ' || 'G_PARTNER_ID = '||MSC_ATP_PVT.G_PARTNER_ID);

1570: MSC_ATP_PVT.G_PARTNER_ID := NULL;
1571: END IF;
1572:
1573: IF PG_DEBUG in ('Y', 'C') THEN
1574: msc_sch_wb.atp_debug('Schedule: ' || 'G_PARTNER_ID = '||MSC_ATP_PVT.G_PARTNER_ID);
1575: END IF;
1576:
1577: IF l_atp_table.customer_site_id(i) IS NOT NULL THEN
1578: -- bug3593394 - Run this SQL only if customer site has changed.

Line 1598: msc_sch_wb.atp_debug('Schedule: ' || 'G_PARTNER_SITE_ID = '||MSC_ATP_PVT.G_PARTNER_SITE_ID);

1594: MSC_ATP_PVT.G_PARTNER_SITE_ID := NULL;
1595: END IF;
1596:
1597: IF PG_DEBUG in ('Y', 'C') THEN
1598: msc_sch_wb.atp_debug('Schedule: ' || 'G_PARTNER_SITE_ID = '||MSC_ATP_PVT.G_PARTNER_SITE_ID);
1599: END IF;
1600:
1601: -- ship_rec_cal changes begin
1602: IF PG_DEBUG in ('Y', 'C') THEN

Line 1603: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');

1599: END IF;
1600:
1601: -- ship_rec_cal changes begin
1602: IF PG_DEBUG in ('Y', 'C') THEN
1603: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1604: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1605: msc_sch_wb.atp_debug('* ');
1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );

Line 1604: msc_sch_wb.atp_debug('* ___________________Input_____________________');

1600:
1601: -- ship_rec_cal changes begin
1602: IF PG_DEBUG in ('Y', 'C') THEN
1603: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1604: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1605: msc_sch_wb.atp_debug('* ');
1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );

Line 1605: msc_sch_wb.atp_debug('* ');

1601: -- ship_rec_cal changes begin
1602: IF PG_DEBUG in ('Y', 'C') THEN
1603: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1604: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1605: msc_sch_wb.atp_debug('* ');
1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );

Line 1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );

1602: IF PG_DEBUG in ('Y', 'C') THEN
1603: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1604: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1605: msc_sch_wb.atp_debug('* ');
1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1610: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );

Line 1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );

1603: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1604: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1605: msc_sch_wb.atp_debug('* ');
1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1610: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1611: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );

Line 1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );

1604: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1605: msc_sch_wb.atp_debug('* ');
1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1610: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1611: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1612: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );

Line 1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );

1605: msc_sch_wb.atp_debug('* ');
1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1610: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1611: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1612: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );
1613: END IF;

Line 1610: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );

1606: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1610: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1611: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1612: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );
1613: END IF;
1614: -- Bug 3449812 - get receiving cal from ISO's destination org if available

Line 1611: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );

1607: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1610: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1611: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1612: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );
1613: END IF;
1614: -- Bug 3449812 - get receiving cal from ISO's destination org if available
1615: -- Bug 3515520, don't use org in case customer/site is populated.

Line 1612: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );

1608: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1609: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1610: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1611: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1612: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );
1613: END IF;
1614: -- Bug 3449812 - get receiving cal from ISO's destination org if available
1615: -- Bug 3515520, don't use org in case customer/site is populated.
1616: -- IF NVL(l_atp_table.internal_org_id(i), l_atp_table.organization_id(i)) IS NOT NULL THEN

Line 1642: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for ORC');

1638: MSC_CALENDAR.ORC);
1639: ELSE
1640: l_receiving_cal_code := l_atp_table.receiving_cal_code(i-1);
1641: IF PG_DEBUG in ('Y', 'C') THEN
1642: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for ORC');
1643: END IF;
1644: END IF;
1645: ELSIF l_atp_table.customer_id(i) IS NOT NULL AND MSC_ATP_PVT.G_USE_SHIP_REC_CAL='Y' THEN
1646: -- Bug 3647208 - Call CRC only if using ship/rec cal

Line 1666: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for CRC');

1662: MSC_CALENDAR.CRC);
1663: ELSE
1664: l_receiving_cal_code := l_atp_table.receiving_cal_code(i-1);
1665: IF PG_DEBUG in ('Y', 'C') THEN
1666: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for CRC');
1667: END IF;
1668: END IF;
1669: ELSE
1670: -- Neither org nor customer provided

Line 1691: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for VIC');

1687: MSC_CALENDAR.VIC);
1688: ELSE
1689: l_intransit_cal_code := l_atp_table.intransit_cal_code(i-1);
1690: IF PG_DEBUG in ('Y', 'C') THEN
1691: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for VIC');
1692: END IF;
1693: END IF;
1694: ELSE
1695: l_intransit_cal_code := MSC_CALENDAR.FOC;

Line 1716: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for OSC');

1712: MSC_CALENDAR.OSC);
1713: ELSE
1714: l_shipping_cal_code := l_atp_table.shipping_cal_code(i-1);
1715: IF PG_DEBUG in ('Y', 'C') THEN
1716: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for OSC');
1717: END IF;
1718: END IF;
1719:
1720:

Line 1746: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for OMC');

1742: -- End ATP4drp
1743: ELSE
1744: l_manufacturing_cal_code := l_atp_table.manufacturing_cal_code(i-1);
1745: IF PG_DEBUG in ('Y', 'C') THEN
1746: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for OMC');
1747: END IF;
1748: END IF;
1749:
1750: IF PG_DEBUG in ('Y', 'C') THEN

Line 1751: msc_sch_wb.atp_debug(' ');

1747: END IF;
1748: END IF;
1749:
1750: IF PG_DEBUG in ('Y', 'C') THEN
1751: msc_sch_wb.atp_debug(' ');
1752: msc_sch_wb.atp_debug('* ___________________Output____________________');
1753: msc_sch_wb.atp_debug('* ');
1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);

Line 1752: msc_sch_wb.atp_debug('* ___________________Output____________________');

1748: END IF;
1749:
1750: IF PG_DEBUG in ('Y', 'C') THEN
1751: msc_sch_wb.atp_debug(' ');
1752: msc_sch_wb.atp_debug('* ___________________Output____________________');
1753: msc_sch_wb.atp_debug('* ');
1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1756: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);

Line 1753: msc_sch_wb.atp_debug('* ');

1749:
1750: IF PG_DEBUG in ('Y', 'C') THEN
1751: msc_sch_wb.atp_debug(' ');
1752: msc_sch_wb.atp_debug('* ___________________Output____________________');
1753: msc_sch_wb.atp_debug('* ');
1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1756: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1757: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);

Line 1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);

1750: IF PG_DEBUG in ('Y', 'C') THEN
1751: msc_sch_wb.atp_debug(' ');
1752: msc_sch_wb.atp_debug('* ___________________Output____________________');
1753: msc_sch_wb.atp_debug('* ');
1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1756: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1757: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1758: msc_sch_wb.atp_debug('**************************************************************');

Line 1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);

1751: msc_sch_wb.atp_debug(' ');
1752: msc_sch_wb.atp_debug('* ___________________Output____________________');
1753: msc_sch_wb.atp_debug('* ');
1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1756: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1757: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1758: msc_sch_wb.atp_debug('**************************************************************');
1759: END IF;

Line 1756: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);

1752: msc_sch_wb.atp_debug('* ___________________Output____________________');
1753: msc_sch_wb.atp_debug('* ');
1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1756: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1757: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1758: msc_sch_wb.atp_debug('**************************************************************');
1759: END IF;
1760:

Line 1757: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);

1753: msc_sch_wb.atp_debug('* ');
1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1756: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1757: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1758: msc_sch_wb.atp_debug('**************************************************************');
1759: END IF;
1760:
1761: -- Add the calendar codes to l_atp_table

Line 1758: msc_sch_wb.atp_debug('**************************************************************');

1754: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1755: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1756: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1757: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1758: msc_sch_wb.atp_debug('**************************************************************');
1759: END IF;
1760:
1761: -- Add the calendar codes to l_atp_table
1762: l_atp_table.receiving_cal_code(i) := l_receiving_cal_code;

Line 1807: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);

1803: null;
1804: END;
1805:
1806: IF PG_DEBUG in ('Y', 'C') THEN
1807: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1808: msc_sch_wb.atp_debug('Schedule: ' || 'l_sysdate_orc = ' || l_sysdate_orc); --bug3439591
1809: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1810: END IF;
1811:

Line 1808: msc_sch_wb.atp_debug('Schedule: ' || 'l_sysdate_orc = ' || l_sysdate_orc); --bug3439591

1804: END;
1805:
1806: IF PG_DEBUG in ('Y', 'C') THEN
1807: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1808: msc_sch_wb.atp_debug('Schedule: ' || 'l_sysdate_orc = ' || l_sysdate_orc); --bug3439591
1809: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1810: END IF;
1811:
1812: IF l_sys_next_date IS NULL THEN

Line 1809: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

1805:
1806: IF PG_DEBUG in ('Y', 'C') THEN
1807: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1808: msc_sch_wb.atp_debug('Schedule: ' || 'l_sysdate_orc = ' || l_sysdate_orc); --bug3439591
1809: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1810: END IF;
1811:
1812: IF l_sys_next_date IS NULL THEN
1813: IF PG_DEBUG in ('Y', 'C') THEN

Line 1814: msc_sch_wb.atp_debug('Schedule: ' || 'Sysdate not found in Calendar');

1810: END IF;
1811:
1812: IF l_sys_next_date IS NULL THEN
1813: IF PG_DEBUG in ('Y', 'C') THEN
1814: msc_sch_wb.atp_debug('Schedule: ' || 'Sysdate not found in Calendar');
1815: END IF;
1816: l_atp_table.error_code(1) := NO_MATCHING_CAL_DATE;
1817: RAISE NO_DATA_FOUND;
1818: END IF;

Line 1831: msc_sch_wb.atp_debug('Schedule: ' || 'Either old source ors is null or is not same as l_process_org_id');

1827: IF (MSC_ATP_PVT.G_INV_CTP = 5) OR
1828: (MSC_ATP_PVT.G_INV_CTP = 4 AND
1829: NVL(l_atp_table.old_source_organization_id(i), -1) <> l_process_org_id ) THEN
1830: IF PG_DEBUG in ('Y', 'C') THEN
1831: msc_sch_wb.atp_debug('Schedule: ' || 'Either old source ors is null or is not same as l_process_org_id');
1832: msc_sch_wb.atp_debug('Schedule: ' || 'Old org :=' || l_atp_table.old_source_organization_id(i));
1833: END IF;
1834: --- we get PF item id only if its a case of new schedulling
1835: -- if its a reschedulling then we mayalready have got the id just for deleting

Line 1832: msc_sch_wb.atp_debug('Schedule: ' || 'Old org :=' || l_atp_table.old_source_organization_id(i));

1828: (MSC_ATP_PVT.G_INV_CTP = 4 AND
1829: NVL(l_atp_table.old_source_organization_id(i), -1) <> l_process_org_id ) THEN
1830: IF PG_DEBUG in ('Y', 'C') THEN
1831: msc_sch_wb.atp_debug('Schedule: ' || 'Either old source ors is null or is not same as l_process_org_id');
1832: msc_sch_wb.atp_debug('Schedule: ' || 'Old org :=' || l_atp_table.old_source_organization_id(i));
1833: END IF;
1834: --- we get PF item id only if its a case of new schedulling
1835: -- if its a reschedulling then we mayalready have got the id just for deleting
1836: ---the previous order. For reschedulling we handel it in the elase part

Line 1844: msc_sch_wb.atp_debug('Schedule: ' || 'Arrival Set');

1840: l_process_org_id);
1841: ELSE
1842: IF l_arrival_count > 1 THEN
1843: IF PG_DEBUG in ('Y', 'C') THEN
1844: msc_sch_wb.atp_debug('Schedule: ' || 'Arrival Set');
1845: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(k) := ' || l_pf_item_id(k));
1846: END IF;
1847: l_process_item_id := l_pf_item_id(k);
1848: ELSE

Line 1845: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(k) := ' || l_pf_item_id(k));

1841: ELSE
1842: IF l_arrival_count > 1 THEN
1843: IF PG_DEBUG in ('Y', 'C') THEN
1844: msc_sch_wb.atp_debug('Schedule: ' || 'Arrival Set');
1845: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(k) := ' || l_pf_item_id(k));
1846: END IF;
1847: l_process_item_id := l_pf_item_id(k);
1848: ELSE
1849: IF PG_DEBUG in ('Y', 'C') THEN

Line 1850: msc_sch_wb.atp_debug('Schedule: ' || 'Ship Set');

1846: END IF;
1847: l_process_item_id := l_pf_item_id(k);
1848: ELSE
1849: IF PG_DEBUG in ('Y', 'C') THEN
1850: msc_sch_wb.atp_debug('Schedule: ' || 'Ship Set');
1851: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(i) := ' || l_pf_item_id(i));
1852: END IF;
1853: l_process_item_id := l_pf_item_id(i);
1854: END IF;

Line 1851: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(i) := ' || l_pf_item_id(i));

1847: l_process_item_id := l_pf_item_id(k);
1848: ELSE
1849: IF PG_DEBUG in ('Y', 'C') THEN
1850: msc_sch_wb.atp_debug('Schedule: ' || 'Ship Set');
1851: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(i) := ' || l_pf_item_id(i));
1852: END IF;
1853: l_process_item_id := l_pf_item_id(i);
1854: END IF;
1855: END IF;

Line 1857: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id := ' || l_process_item_id);

1853: l_process_item_id := l_pf_item_id(i);
1854: END IF;
1855: END IF;
1856: IF PG_DEBUG in ('Y', 'C') THEN
1857: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id := ' || l_process_item_id);
1858: END IF;
1859:
1860: IF (l_process_item_id <> l_requested_item_id) and (l_atp_flag = 'N') then
1861: --For Product family based ATP we will flag an error if request comes for a

Line 1864: msc_sch_wb.atp_debug('Schedule: ' || 'Member item is not atpable');

1860: IF (l_process_item_id <> l_requested_item_id) and (l_atp_flag = 'N') then
1861: --For Product family based ATP we will flag an error if request comes for a
1862: -- member item which has ATP flag = 'N'. For other members we will continue as usual
1863: IF PG_DEBUG in ('Y', 'C') THEN
1864: msc_sch_wb.atp_debug('Schedule: ' || 'Member item is not atpable');
1865: END IF;
1866: x_return_status := FND_API.G_RET_STS_ERROR;
1867: l_atp_table.Error_Code(i):= PF_MEMBER_ITEM_NOT_ATPABLE;
1868: RAISE NO_DATA_FOUND;

Line 1905: msc_sch_wb.atp_debug('Schedule: matc_id.count := ' || l_atp_table.match_item_id.count);

1901: */
1902: --s_cto_reach
1903: l_plan_found_for_match := 2;
1904: IF PG_DEBUG in ('Y', 'C') THEN
1905: msc_sch_wb.atp_debug('Schedule: matc_id.count := ' || l_atp_table.match_item_id.count);
1906: msc_sch_wb.atp_debug('Schedule: bom_item_type count := ' || l_atp_table.bom_item_type.count);
1907: msc_sch_wb.atp_debug('match item is := ' || l_atp_table.match_item_id(i));
1908: END IF;
1909: IF l_atp_table.match_item_id(i) is not null and l_atp_table.bom_item_type(i) = 1 THEN

Line 1906: msc_sch_wb.atp_debug('Schedule: bom_item_type count := ' || l_atp_table.bom_item_type.count);

1902: --s_cto_reach
1903: l_plan_found_for_match := 2;
1904: IF PG_DEBUG in ('Y', 'C') THEN
1905: msc_sch_wb.atp_debug('Schedule: matc_id.count := ' || l_atp_table.match_item_id.count);
1906: msc_sch_wb.atp_debug('Schedule: bom_item_type count := ' || l_atp_table.bom_item_type.count);
1907: msc_sch_wb.atp_debug('match item is := ' || l_atp_table.match_item_id(i));
1908: END IF;
1909: IF l_atp_table.match_item_id(i) is not null and l_atp_table.bom_item_type(i) = 1 THEN
1910:

Line 1907: msc_sch_wb.atp_debug('match item is := ' || l_atp_table.match_item_id(i));

1903: l_plan_found_for_match := 2;
1904: IF PG_DEBUG in ('Y', 'C') THEN
1905: msc_sch_wb.atp_debug('Schedule: matc_id.count := ' || l_atp_table.match_item_id.count);
1906: msc_sch_wb.atp_debug('Schedule: bom_item_type count := ' || l_atp_table.bom_item_type.count);
1907: msc_sch_wb.atp_debug('match item is := ' || l_atp_table.match_item_id(i));
1908: END IF;
1909: IF l_atp_table.match_item_id(i) is not null and l_atp_table.bom_item_type(i) = 1 THEN
1910:
1911: IF PG_DEBUG in ('Y', 'C') THEN

Line 1912: msc_sch_wb.atp_debug('Match Found, find plan for matched item');

1908: END IF;
1909: IF l_atp_table.match_item_id(i) is not null and l_atp_table.bom_item_type(i) = 1 THEN
1910:
1911: IF PG_DEBUG in ('Y', 'C') THEN
1912: msc_sch_wb.atp_debug('Match Found, find plan for matched item');
1913: END IF;
1914:
1915: /* time_phased_atp changes begin*/
1916: l_match_item_family_id := MSC_ATP_PF.Get_PF_Atp_Item_Id(

Line 1938: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');

1934: );
1935:
1936: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1937: IF PG_DEBUG in ('Y', 'C') THEN
1938: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
1939: END IF;
1940: x_return_status := FND_API.G_RET_STS_ERROR;
1941: RAISE FND_API.G_EXC_ERROR;
1942: END IF;

Line 1958: msc_sch_wb.atp_debug('plan found for matched item');

1954:
1955: IF MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id is not null and
1956: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id, -1) <> -1 then
1957: IF PG_DEBUG in ('Y', 'C') THEN
1958: msc_sch_wb.atp_debug('plan found for matched item');
1959: END IF;
1960: l_plan_found_for_match := 1;
1961: l_atp_table.base_model_id(i) := l_process_item_id;
1962: l_process_item_id := l_match_item_family_id;

Line 1982: msc_sch_wb.atp_debug('plan not found for matched item');

1978: l_atp_table.matched_item_name(i) := l_item_attribute_rec.item_name;
1979:
1980: ELSE
1981: IF PG_DEBUG in ('Y', 'C') THEN
1982: msc_sch_wb.atp_debug('plan not found for matched item');
1983: END IF;
1984: l_plan_found_for_match := 2;
1985: l_atp_table.match_item_id(i) := null;
1986:

Line 1994: msc_sch_wb.atp_debug('Schedule: l_plan_found_for_match := ' || l_plan_found_for_match);

1990: END IF;
1991: END IF;
1992:
1993: IF PG_DEBUG in ('Y', 'C') THEN
1994: msc_sch_wb.atp_debug('Schedule: l_plan_found_for_match := ' || l_plan_found_for_match);
1995: END IF;
1996: IF l_plan_found_for_match = 2 THEN
1997: /* time_phased_atp changes begin
1998: Call new procedure Get_PF_Plan_Info*/

Line 2013: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');

2009: );
2010:
2011: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2012: IF PG_DEBUG in ('Y', 'C') THEN
2013: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2014: END IF;
2015: x_return_status := FND_API.G_RET_STS_ERROR;
2016: RAISE FND_API.G_EXC_ERROR;
2017: END IF;

Line 2025: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

2021: -- time_phased_atp - Reset variables
2022: l_process_item_id := l_requested_item_id;
2023: MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id;
2024: IF PG_DEBUG in ('Y', 'C') THEN
2025: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2026: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2027: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2028: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2029: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);

Line 2026: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');

2022: l_process_item_id := l_requested_item_id;
2023: MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id;
2024: IF PG_DEBUG in ('Y', 'C') THEN
2025: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2026: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2027: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2028: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2029: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2030: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 2027: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);

2023: MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id;
2024: IF PG_DEBUG in ('Y', 'C') THEN
2025: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2026: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2027: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2028: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2029: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2030: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2031: END IF;

Line 2028: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);

2024: IF PG_DEBUG in ('Y', 'C') THEN
2025: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2026: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2027: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2028: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2029: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2030: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2031: END IF;
2032: ELSE

Line 2029: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);

2025: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2026: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2027: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2028: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2029: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2030: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2031: END IF;
2032: ELSE
2033: IF l_atf_date is not null THEN

Line 2030: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

2026: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2027: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2028: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2029: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2030: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2031: END IF;
2032: ELSE
2033: IF l_atf_date is not null THEN
2034: l_time_phased_atp := 'Y';

Line 2063: msc_sch_wb.atp_debug('Schedule: ' || 'no plan available');

2059: -- 1873918: PDS-ODS fix
2060: -- PDS-ODS fix
2061: IF l_plan_id is NULL THEN
2062: IF PG_DEBUG in ('Y', 'C') THEN
2063: msc_sch_wb.atp_debug('Schedule: ' || 'no plan available');
2064: END IF;
2065: x_return_status := FND_API.G_RET_STS_ERROR;
2066: --bug 2854351: Raise plan down time error
2067: --l_atp_table.Error_Code(i):= PLAN_NOT_FOUND;

Line 2072: msc_sch_wb.atp_debug('Schedule: ' || 'Summary Concurrent program is running');

2068: l_atp_table.Error_Code(i):= MSC_ATP_PVT.PLAN_DOWN_TIME;
2069: RAISE NO_DATA_FOUND;
2070: ELSIF l_plan_id = -100 THEN
2071: IF PG_DEBUG in ('Y', 'C') THEN
2072: msc_sch_wb.atp_debug('Schedule: ' || 'Summary Concurrent program is running');
2073: END IF;
2074: x_return_status := FND_API.G_RET_STS_ERROR;
2075: l_atp_table.Error_Code(i):= SUMM_CONC_PROG_RUNNING;
2076: RAISE NO_DATA_FOUND;

Line 2079: msc_sch_wb.atp_debug('Schedule: ' || 'Post Plan Alloc progranm has not been run');

2075: l_atp_table.Error_Code(i):= SUMM_CONC_PROG_RUNNING;
2076: RAISE NO_DATA_FOUND;
2077: ELSIF l_plan_id = -200 THEN
2078: IF PG_DEBUG in ('Y', 'C') THEN
2079: msc_sch_wb.atp_debug('Schedule: ' || 'Post Plan Alloc progranm has not been run');
2080: END IF;
2081: x_return_status := FND_API.G_RET_STS_ERROR;
2082: l_atp_table.Error_Code(i):= RUN_POST_PLAN_ALLOC;
2083: RAISE NO_DATA_FOUND;

Line 2088: msc_sch_wb.atp_debug ('Schedule: ' || 'ATP Downtime . 24x7 ATP');

2084:
2085: -- 24x7 ATP
2086: ELSIF l_plan_id = -300 THEN
2087: if PG_DEBUG in ('Y','C') THEN
2088: msc_sch_wb.atp_debug ('Schedule: ' || 'ATP Downtime . 24x7 ATP');
2089: END IF;
2090: x_return_status := FND_API.G_RET_STS_ERROR;
2091: --- bug 2854351: Show planned down time error
2092: --l_atp_table.Error_Code(i) := TRY_ATP_LATER;

Line 2098: msc_sch_wb.atp_debug('Schedule: ' || 'no plan available, switch to ods');

2094: RAISE NO_DATA_FOUND;
2095:
2096: ELSIF l_plan_id = -1 THEN
2097: IF PG_DEBUG in ('Y', 'C') THEN
2098: msc_sch_wb.atp_debug('Schedule: ' || 'no plan available, switch to ods');
2099: END IF;
2100:
2101: l_atp_table.Error_Code(i):= PDS_TO_ODS_SWITCH;
2102: IF PG_DEBUG in ('Y', 'C') THEN

Line 2103: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code(i)='||l_atp_table.Error_Code(i));

2099: END IF;
2100:
2101: l_atp_table.Error_Code(i):= PDS_TO_ODS_SWITCH;
2102: IF PG_DEBUG in ('Y', 'C') THEN
2103: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code(i)='||l_atp_table.Error_Code(i));
2104: END IF;
2105: MSC_ATP_PVT.G_INV_CTP := 5;
2106: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2107: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;

Line 2139: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);

2135: FROM msc_apps_instances
2136: WHERE instance_id = p_instance_id;
2137:
2138: IF PG_DEBUG in ('Y', 'C') THEN
2139: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
2140: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);
2141: END IF;
2142:
2143: -- Doing PDS-ODS switch. Summary will be diabled in all cases because ODS summary

Line 2140: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);

2136: WHERE instance_id = p_instance_id;
2137:
2138: IF PG_DEBUG in ('Y', 'C') THEN
2139: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
2140: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);
2141: END IF;
2142:
2143: -- Doing PDS-ODS switch. Summary will be diabled in all cases because ODS summary
2144: -- will commit even PDS data from previous lines

Line 2145: msc_sch_wb.atp_debug('Schedule: ' || 'Summary will be disabled');

2141: END IF;
2142:
2143: -- Doing PDS-ODS switch. Summary will be diabled in all cases because ODS summary
2144: -- will commit even PDS data from previous lines
2145: msc_sch_wb.atp_debug('Schedule: ' || 'Summary will be disabled');
2146: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
2147:
2148: IF NVL(l_so_tbl_status, 1) = 2 THEN
2149: -- not available for atp

Line 2151: msc_sch_wb.atp_debug('Schedule: ' || 'ods not available');

2147:
2148: IF NVL(l_so_tbl_status, 1) = 2 THEN
2149: -- not available for atp
2150: IF PG_DEBUG in ('Y', 'C') THEN
2151: msc_sch_wb.atp_debug('Schedule: ' || 'ods not available');
2152: END IF;
2153:
2154: l_atp_table.error_code(1) := TRY_ATP_LATER;
2155: RAISE NO_DATA_FOUND;

Line 2172: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);

2168: FROM msc_apps_instances
2169: WHERE instance_id = p_instance_id;
2170:
2171: IF PG_DEBUG in ('Y', 'C') THEN
2172: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
2173: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);
2174: END IF;
2175:
2176: IF NVL(l_so_tbl_status, 1) = 2 THEN

Line 2173: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);

2169: WHERE instance_id = p_instance_id;
2170:
2171: IF PG_DEBUG in ('Y', 'C') THEN
2172: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
2173: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);
2174: END IF;
2175:
2176: IF NVL(l_so_tbl_status, 1) = 2 THEN
2177: -- not available for atp

Line 2179: msc_sch_wb.atp_debug('Schedule: ' || 'ATP not available');

2175:
2176: IF NVL(l_so_tbl_status, 1) = 2 THEN
2177: -- not available for atp
2178: IF PG_DEBUG in ('Y', 'C') THEN
2179: msc_sch_wb.atp_debug('Schedule: ' || 'ATP not available');
2180: END IF;
2181:
2182: l_atp_table.error_code(1) := TRY_ATP_LATER;
2183: RAISE NO_DATA_FOUND;

Line 2192: msc_sch_wb.atp_debug('Schedule: ' || 'Summary will be disabled');

2188:
2189: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
2190:
2191: IF PG_DEBUG in ('Y', 'C') THEN
2192: msc_sch_wb.atp_debug('Schedule: ' || 'Summary will be disabled');
2193: END IF;
2194:
2195: END IF;
2196: END IF;

Line 2207: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

2203: l_process_org_id); */
2204:
2205: l_stmt := 200;
2206: IF PG_DEBUG in ('Y', 'C') THEN
2207: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
2208: END IF;
2209:
2210: -- reinitialize some elements in l_atp_rec
2211: l_atp_rec.error_code := ALLSUCCESS;

Line 2269: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');

2265: /* ship_rec_cal changes begin
2266: If ship date is provided validate it on OSC
2267: If arrival date is provided validate it on ORC, offset using VIC, validate it on OSC*/
2268: IF PG_DEBUG in ('Y', 'C') THEN
2269: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');
2270: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);
2271: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);
2272: msc_sch_wb.atp_debug('Schedule: ');
2273: END IF;

Line 2270: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);

2266: If ship date is provided validate it on OSC
2267: If arrival date is provided validate it on ORC, offset using VIC, validate it on OSC*/
2268: IF PG_DEBUG in ('Y', 'C') THEN
2269: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');
2270: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);
2271: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);
2272: msc_sch_wb.atp_debug('Schedule: ');
2273: END IF;
2274: -- Bug3593394 - Recalculate date only if parameters have changed

Line 2271: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);

2267: If arrival date is provided validate it on ORC, offset using VIC, validate it on OSC*/
2268: IF PG_DEBUG in ('Y', 'C') THEN
2269: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');
2270: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);
2271: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);
2272: msc_sch_wb.atp_debug('Schedule: ');
2273: END IF;
2274: -- Bug3593394 - Recalculate date only if parameters have changed
2275: IF (i=1)

Line 2272: msc_sch_wb.atp_debug('Schedule: ');

2268: IF PG_DEBUG in ('Y', 'C') THEN
2269: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');
2270: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);
2271: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);
2272: msc_sch_wb.atp_debug('Schedule: ');
2273: END IF;
2274: -- Bug3593394 - Recalculate date only if parameters have changed
2275: IF (i=1)
2276: OR (l_atp_rec.receiving_cal_code <> l_atp_table.receiving_cal_code(i-1))

Line 2301: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on ORC/CRC: ' || l_requested_ship_date);

2297: l_atp_rec.instance_id,
2298: l_atp_rec.requested_arrival_date);
2299:
2300: IF PG_DEBUG in ('Y', 'C') THEN
2301: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on ORC/CRC: ' || l_requested_ship_date);
2302: END IF;
2303:
2304: IF trunc(l_requested_ship_date) <> trunc(l_atp_rec.requested_arrival_date) THEN
2305: G_CALENDAR_CONSTRAINT := 'Y';

Line 2317: msc_sch_wb.atp_debug('Schedule: ' || 'Date after subtracting intransit LT using VIC: ' || l_requested_ship_date);

2313: -1 * nvl(l_atp_rec.delivery_lead_time, 0),
2314: -1);
2315:
2316: IF PG_DEBUG in ('Y', 'C') THEN
2317: msc_sch_wb.atp_debug('Schedule: ' || 'Date after subtracting intransit LT using VIC: ' || l_requested_ship_date);
2318: END IF;
2319:
2320: l_requested_ship_date := MSC_CALENDAR.PREV_WORK_DAY(
2321: l_atp_rec.shipping_cal_code,

Line 2338: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);

2334: END IF;
2335: END IF;
2336:
2337: IF PG_DEBUG in ('Y', 'C') THEN
2338: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);
2339: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2340: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2341: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2342: END IF;

Line 2339: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);

2335: END IF;
2336:
2337: IF PG_DEBUG in ('Y', 'C') THEN
2338: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);
2339: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2340: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2341: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2342: END IF;
2343:

Line 2340: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);

2336:
2337: IF PG_DEBUG in ('Y', 'C') THEN
2338: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);
2339: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2340: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2341: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2342: END IF;
2343:
2344: IF l_requested_ship_date is NULL THEN

Line 2341: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');

2337: IF PG_DEBUG in ('Y', 'C') THEN
2338: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);
2339: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2340: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2341: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2342: END IF;
2343:
2344: IF l_requested_ship_date is NULL THEN
2345: l_atp_table.error_code(i) := MSC_ATP_PVT.ATP_INVALID_DATE;

Line 2353: msc_sch_wb.atp_debug('Schedule: ' || 'MOVE_PAST_DUE_TO_SYS_DATE :'|| L_MOVE_PAST_DUE_TO_SYSDATE);

2349: --bug 3322846: Move past due ship date to the first working day after sysdate
2350: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929
2351: L_MOVE_PAST_DUE_TO_SYSDATE := MSC_ATP_PVT.G_MOV_PAST_DUE_SYSDATE_PROF;--6316476
2352: IF PG_DEBUG in ('Y', 'C') THEN
2353: msc_sch_wb.atp_debug('Schedule: ' || 'MOVE_PAST_DUE_TO_SYS_DATE :'|| L_MOVE_PAST_DUE_TO_SYSDATE);
2354: END IF;
2355: if L_MOVE_PAST_DUE_TO_SYSDATE = 'Y' THEN -- Bug 5584634/5618929
2356: IF l_requested_ship_date < l_sys_next_date THEN
2357:

Line 2359: msc_sch_wb.atp_debug('Schedule: ' || 'Request date is less than sysdate');

2355: if L_MOVE_PAST_DUE_TO_SYSDATE = 'Y' THEN -- Bug 5584634/5618929
2356: IF l_requested_ship_date < l_sys_next_date THEN
2357:
2358: IF PG_DEBUG in ('Y', 'C') THEN
2359: msc_sch_wb.atp_debug('Schedule: ' || 'Request date is less than sysdate');
2360: END IF;
2361: l_requested_ship_date := MSC_CALENDAR.NEXT_WORK_DAY(
2362: l_atp_rec.shipping_cal_code,
2363: l_atp_rec.instance_id,

Line 2368: msc_sch_wb.atp_debug('Schedule: ' || 'New l_requested_ship_date := ' || l_requested_ship_date);

2364: l_sys_next_date);
2365:
2366: l_past_due_ship_date := 1; --bug4291375 setting for past due ship date
2367: IF PG_DEBUG in ('Y', 'C') THEN
2368: msc_sch_wb.atp_debug('Schedule: ' || 'New l_requested_ship_date := ' || l_requested_ship_date);
2369: END IF;
2370: END IF;
2371: END IF; -- Bug 5584634/5618929
2372:

Line 2380: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');

2376: END IF;
2377:
2378: ELSE -- Bug3593394
2379: IF PG_DEBUG in ('Y', 'C') THEN
2380: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');
2381: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2382: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2383: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2384: END IF;

Line 2381: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);

2377:
2378: ELSE -- Bug3593394
2379: IF PG_DEBUG in ('Y', 'C') THEN
2380: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');
2381: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2382: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2383: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2384: END IF;
2385: END IF; -- Bug3593394

Line 2382: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);

2378: ELSE -- Bug3593394
2379: IF PG_DEBUG in ('Y', 'C') THEN
2380: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');
2381: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2382: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2383: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2384: END IF;
2385: END IF; -- Bug3593394
2386:

Line 2383: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');

2379: IF PG_DEBUG in ('Y', 'C') THEN
2380: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');
2381: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2382: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2383: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2384: END IF;
2385: END IF; -- Bug3593394
2386:
2387: l_atp_rec.requested_ship_date := l_requested_ship_date;

Line 2425: msc_sch_wb.atp_debug('Schedule: ' || 'Override Flag: '||l_atp_rec.override_flag);

2421: --END IF;
2422: -- ATP Override rajjain begin
2423: IF l_atp_table.Action(i) = ATPQUERY THEN
2424: IF PG_DEBUG in ('Y', 'C') THEN
2425: msc_sch_wb.atp_debug('Schedule: ' || 'Override Flag: '||l_atp_rec.override_flag);
2426: END IF;
2427:
2428: l_atp_rec.override_flag := 'N';
2429:

Line 2431: msc_sch_wb.atp_debug('Schedule: ' || 'ATPQUERY - Setting the Override Flag to : '||l_atp_rec.override_flag);

2427:
2428: l_atp_rec.override_flag := 'N';
2429:
2430: IF PG_DEBUG in ('Y', 'C') THEN
2431: msc_sch_wb.atp_debug('Schedule: ' || 'ATPQUERY - Setting the Override Flag to : '||l_atp_rec.override_flag);
2432: END IF;
2433: ELSE
2434: l_atp_rec.override_flag := l_atp_table.Override_Flag(i);
2435:

Line 2460: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

2456: -- for multi_level/ multi_org cto support
2457: l_atp_rec.calling_module := l_atp_table.calling_module(i);
2458: l_stmt := 210;
2459: IF PG_DEBUG in ('Y', 'C') THEN
2460: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
2461: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Inventory_Item_Id:' || to_char(l_atp_rec.Inventory_Item_Id)
2462: ||' l_atp_rec.request_item_id:' || to_char(l_atp_rec.request_item_id)
2463: ||' l_atp_rec.organization_id:' || to_char(l_atp_rec.organization_id) );
2464: END IF;

Line 2461: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Inventory_Item_Id:' || to_char(l_atp_rec.Inventory_Item_Id)

2457: l_atp_rec.calling_module := l_atp_table.calling_module(i);
2458: l_stmt := 210;
2459: IF PG_DEBUG in ('Y', 'C') THEN
2460: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
2461: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Inventory_Item_Id:' || to_char(l_atp_rec.Inventory_Item_Id)
2462: ||' l_atp_rec.request_item_id:' || to_char(l_atp_rec.request_item_id)
2463: ||' l_atp_rec.organization_id:' || to_char(l_atp_rec.organization_id) );
2464: END IF;
2465:

Line 2486: msc_sch_wb.atp_debug('Schedule: ' || 'Before ATP_Check for this l_atp_rec ');

2482: -- CTO_PF_PRJ_2 changes for CTO PF Cross Project Impacts
2483: -- Set the default to No PF ATP Items being processed.
2484: MSC_ATP_PVT.G_CTO_PF_ATP := 'N';
2485: IF PG_DEBUG in ('Y', 'C') THEN
2486: msc_sch_wb.atp_debug('Schedule: ' || 'Before ATP_Check for this l_atp_rec ');
2487: msc_sch_wb.atp_debug('Schedule: Init G_CTO_PF_ATP to ' ||
2488: MSC_ATP_PVT.G_CTO_PF_ATP);
2489: END IF;
2490: -- End CTO_PF_PRJ_2 changes for CTO PF Cross Project Impacts

Line 2487: msc_sch_wb.atp_debug('Schedule: Init G_CTO_PF_ATP to ' ||

2483: -- Set the default to No PF ATP Items being processed.
2484: MSC_ATP_PVT.G_CTO_PF_ATP := 'N';
2485: IF PG_DEBUG in ('Y', 'C') THEN
2486: msc_sch_wb.atp_debug('Schedule: ' || 'Before ATP_Check for this l_atp_rec ');
2487: msc_sch_wb.atp_debug('Schedule: Init G_CTO_PF_ATP to ' ||
2488: MSC_ATP_PVT.G_CTO_PF_ATP);
2489: END IF;
2490: -- End CTO_PF_PRJ_2 changes for CTO PF Cross Project Impacts
2491:

Line 2495: msc_sch_wb.atp_debug('Schedule: ' || 'G_PLAN_SUBST_FLAG := ' || MSC_ATP_PVT.G_PLAN_SUBST_FLAG);

2491:
2492: --- subst
2493:
2494: IF PG_DEBUG in ('Y', 'C') THEN
2495: msc_sch_wb.atp_debug('Schedule: ' || 'G_PLAN_SUBST_FLAG := ' || MSC_ATP_PVT.G_PLAN_SUBST_FLAG);
2496: END IF;
2497:
2498: IF MSC_ATP_PVT.G_INV_CTP = 4 AND
2499: NVL(MSC_ATP_PVT.G_PLAN_SUBST_FLAG, 2) = 1 THEN

Line 2501: msc_sch_wb.atp_debug('Schedule: ' || 'count := ' || l_item_substitute_rec.inventory_item_id.count);

2497:
2498: IF MSC_ATP_PVT.G_INV_CTP = 4 AND
2499: NVL(MSC_ATP_PVT.G_PLAN_SUBST_FLAG, 2) = 1 THEN
2500: IF PG_DEBUG in ('Y', 'C') THEN
2501: msc_sch_wb.atp_debug('Schedule: ' || 'count := ' || l_item_substitute_rec.inventory_item_id.count);
2502: msc_sch_wb.atp_debug('Schedule: ' || 'G_CREATE_SUPPLY_FLAG := ' || MSC_ATP_SUBST.G_CREATE_SUPPLY_FLAG);
2503: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2504: END IF;
2505:

Line 2502: msc_sch_wb.atp_debug('Schedule: ' || 'G_CREATE_SUPPLY_FLAG := ' || MSC_ATP_SUBST.G_CREATE_SUPPLY_FLAG);

2498: IF MSC_ATP_PVT.G_INV_CTP = 4 AND
2499: NVL(MSC_ATP_PVT.G_PLAN_SUBST_FLAG, 2) = 1 THEN
2500: IF PG_DEBUG in ('Y', 'C') THEN
2501: msc_sch_wb.atp_debug('Schedule: ' || 'count := ' || l_item_substitute_rec.inventory_item_id.count);
2502: msc_sch_wb.atp_debug('Schedule: ' || 'G_CREATE_SUPPLY_FLAG := ' || MSC_ATP_SUBST.G_CREATE_SUPPLY_FLAG);
2503: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2504: END IF;
2505:
2506: -- check if one and only one of the requested_ship_date and

Line 2503: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');

2499: NVL(MSC_ATP_PVT.G_PLAN_SUBST_FLAG, 2) = 1 THEN
2500: IF PG_DEBUG in ('Y', 'C') THEN
2501: msc_sch_wb.atp_debug('Schedule: ' || 'count := ' || l_item_substitute_rec.inventory_item_id.count);
2502: msc_sch_wb.atp_debug('Schedule: ' || 'G_CREATE_SUPPLY_FLAG := ' || MSC_ATP_SUBST.G_CREATE_SUPPLY_FLAG);
2503: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2504: END IF;
2505:
2506: -- check if one and only one of the requested_ship_date and
2507: -- requested_arrival_date is provided

Line 2527: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');

2523:
2524: RAISE FND_API.G_EXC_ERROR;
2525: END IF;
2526: IF PG_DEBUG in ('Y', 'C') THEN
2527: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2528: END IF;
2529:
2530: -- old dlt code
2531:

Line 2539: msc_sch_wb.atp_debug('Schedule: ' || 'Point 3');

2535: -- item we need to do the offset. The reason of doing this is to avoid
2536: -- database hit.
2537:
2538: IF PG_DEBUG in ('Y', 'C') THEN
2539: msc_sch_wb.atp_debug('Schedule: ' || 'Point 3');
2540: END IF;
2541:
2542: l_atp_rec.delivery_lead_time := l_delivery_lead_time;
2543: l_atp_rec.ship_method := l_ship_method;

Line 2547: msc_sch_wb.atp_debug('Schedule: ' || 'ship_method = '||l_ship_method ||' lead time = '||l_delivery_lead_time);

2543: l_atp_rec.ship_method := l_ship_method;
2544: l_atp_rec.requested_ship_date := l_requested_ship_date;
2545: l_atp_rec.requested_arrival_date := null;
2546: IF PG_DEBUG in ('Y', 'C') THEN
2547: msc_sch_wb.atp_debug('Schedule: ' || 'ship_method = '||l_ship_method ||' lead time = '||l_delivery_lead_time);
2548: END IF;
2549:
2550: -----------
2551: /* Modularize Item and Org Info */

Line 2568: msc_sch_wb.atp_debug('Schedule: ' || ' Create supply flag :=' ||

2564: l_post_pro_lt := G_ITEM_INFO_REC.post_pro_lt;
2565: l_inventory_item_id := G_ITEM_INFO_REC.dest_inv_item_id;
2566: l_item_name := G_ITEM_INFO_REC.item_name;
2567: IF PG_DEBUG in ('Y', 'C') THEN
2568: msc_sch_wb.atp_debug('Schedule: ' || ' Create supply flag :=' ||
2569: G_ITEM_INFO_REC.create_supply_flag);
2570: END IF;
2571: /* Modularize Item and Org Info */
2572:

Line 2575: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);

2571: /* Modularize Item and Org Info */
2572:
2573: l_substitution_type := l_atp_table.substitution_typ_code(i);
2574: IF PG_DEBUG in ('Y', 'C') THEN
2575: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2576: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2577: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2578: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2579: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

Line 2576: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);

2572:
2573: l_substitution_type := l_atp_table.substitution_typ_code(i);
2574: IF PG_DEBUG in ('Y', 'C') THEN
2575: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2576: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2577: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2578: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2579: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2580: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);

Line 2577: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);

2573: l_substitution_type := l_atp_table.substitution_typ_code(i);
2574: IF PG_DEBUG in ('Y', 'C') THEN
2575: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2576: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2577: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2578: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2579: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2580: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2581: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);

Line 2578: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);

2574: IF PG_DEBUG in ('Y', 'C') THEN
2575: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2576: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2577: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2578: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2579: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2580: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2581: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);
2582: END IF;

Line 2579: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

2575: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2576: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2577: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2578: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2579: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2580: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2581: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);
2582: END IF;
2583: ---bug 2341073 : null out the l_item_substitute_rec else values for last item might get used again

Line 2580: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);

2576: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2577: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2578: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2579: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2580: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2581: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);
2582: END IF;
2583: ---bug 2341073 : null out the l_item_substitute_rec else values for last item might get used again
2584: l_item_substitute_rec := l_null_item_sub_rec;

Line 2581: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);

2577: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2578: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2579: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2580: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2581: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);
2582: END IF;
2583: ---bug 2341073 : null out the l_item_substitute_rec else values for last item might get used again
2584: l_item_substitute_rec := l_null_item_sub_rec;
2585:

Line 2602: msc_sch_wb.atp_debug('Schedule: ' || ' subst count := ' || l_item_substitute_rec.inventory_item_id.count);

2598: l_atp_rec.organization_id);
2599: END IF;
2600:
2601: IF PG_DEBUG in ('Y', 'C') THEN
2602: msc_sch_wb.atp_debug('Schedule: ' || ' subst count := ' || l_item_substitute_rec.inventory_item_id.count);
2603: END IF;
2604:
2605: IF l_item_substitute_rec.inventory_item_id.count > 0 AND
2606: (NVL(l_substitution_type, 4) = 4 OR

Line 2614: msc_sch_wb.atp_debug('Schedule: ' || 'Substitution defined but not doing substitution');

2610: --- if item has substitutes but we dont want to do any substitution then
2611: --- we will do breadth first search. But we dont want to use any substitutes.
2612: --- Therefore we remove all the substitutes from the table
2613: IF PG_DEBUG in ('Y', 'C') THEN
2614: msc_sch_wb.atp_debug('Schedule: ' || 'Substitution defined but not doing substitution');
2615: END IF;
2616: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'Y';
2617: l_highest_rev := l_item_substitute_rec.highest_revision_item_id(1);
2618: l_item_substitute_rec := l_null_item_sub_rec;

Line 2623: msc_sch_wb.atp_debug('Schedule: ' || 'Substitute not defined');

2619:
2620: ELSIF NVL(l_substitution_type, 4) = 4 or
2621: (l_item_substitute_rec.inventory_item_id.count = 0) THEN
2622: IF PG_DEBUG in ('Y', 'C') THEN
2623: msc_sch_wb.atp_debug('Schedule: ' || 'Substitute not defined');
2624: END IF;
2625: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'N';
2626: ELSE
2627: IF PG_DEBUG in ('Y', 'C') THEN

Line 2628: msc_sch_wb.atp_debug('Schedule: ' || 'Substitution defined and doing substitution');

2624: END IF;
2625: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'N';
2626: ELSE
2627: IF PG_DEBUG in ('Y', 'C') THEN
2628: msc_sch_wb.atp_debug('Schedule: ' || 'Substitution defined and doing substitution');
2629: END IF;
2630: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'Y';
2631: END IF;
2632:

Line 2642: msc_sch_wb.atp_debug('Schedule: ' || ' Re-use Create supply flag :=' ||

2638: ELSE
2639: -- Modular re-use of info.
2640: l_create_supply_on_orig_item := G_ITEM_INFO_REC.create_supply_flag;
2641: IF PG_DEBUG in ('Y', 'C') THEN
2642: msc_sch_wb.atp_debug('Schedule: ' || ' Re-use Create supply flag :=' ||
2643: G_ITEM_INFO_REC.create_supply_flag);
2644: END IF;
2645: -- Modular re-use of info.
2646:

Line 2653: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

2649:
2650: --- now add the original item
2651: l_count := l_item_substitute_rec.inventory_item_id.count;
2652: IF PG_DEBUG in ('Y', 'C') THEN
2653: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
2654: END IF;
2655: MSC_ATP_SUBST.Extend_Item_Info_Rec_Typ(l_item_substitute_rec, l_return_status);
2656: IF PG_DEBUG in ('Y', 'C') THEN
2657: msc_sch_wb.atp_debug('Schedule: ' || 'After extending Item info');

Line 2657: msc_sch_wb.atp_debug('Schedule: ' || 'After extending Item info');

2653: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
2654: END IF;
2655: MSC_ATP_SUBST.Extend_Item_Info_Rec_Typ(l_item_substitute_rec, l_return_status);
2656: IF PG_DEBUG in ('Y', 'C') THEN
2657: msc_sch_wb.atp_debug('Schedule: ' || 'After extending Item info');
2658: END IF;
2659: l_count := l_item_substitute_rec.inventory_item_id.count;
2660: IF PG_DEBUG in ('Y', 'C') THEN
2661: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

Line 2661: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

2657: msc_sch_wb.atp_debug('Schedule: ' || 'After extending Item info');
2658: END IF;
2659: l_count := l_item_substitute_rec.inventory_item_id.count;
2660: IF PG_DEBUG in ('Y', 'C') THEN
2661: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
2662: END IF;
2663: l_item_substitute_rec.inventory_item_id(l_count) := l_inventory_item_id;
2664: --l_item_substitute_rec.sr_inventory_item_id(l_count) := l_atp_rec.inventory_item_id;
2665: --l_requested_item_id has member_item_id.l_atp_rec.inventory_item_id has family id.

Line 2727: msc_sch_wb.atp_debug('Schedule: ' || 'Item ' || i || ' := ' || l_item_substitute_rec.inventory_item_id(i));

2723:
2724: --l_item_substitute_rec.requested_ship_date(l_count) := l_requested_ship_date;
2725: FOR i in 1..l_item_substitute_rec.inventory_item_id.count LOOP
2726: IF PG_DEBUG in ('Y', 'C') THEN
2727: msc_sch_wb.atp_debug('Schedule: ' || 'Item ' || i || ' := ' || l_item_substitute_rec.inventory_item_id(i));
2728: END IF;
2729: END LOOP;
2730:
2731:

Line 2733: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_count := ' || l_item_substitute_rec.inventory_item_id.count);

2729: END LOOP;
2730:
2731:
2732: IF PG_DEBUG in ('Y', 'C') THEN
2733: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_count := ' || l_item_substitute_rec.inventory_item_id.count);
2734: END IF;
2735: END IF;
2736:
2737: ELSE

Line 2743: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUBSTITUTION_FLAG := ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);

2739: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'N';
2740:
2741: END IF;
2742: IF PG_DEBUG in ('Y', 'C') THEN
2743: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUBSTITUTION_FLAG := ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
2744: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id := ' || l_plan_id);
2745: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP);
2746: END IF;
2747:

Line 2744: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id := ' || l_plan_id);

2740:
2741: END IF;
2742: IF PG_DEBUG in ('Y', 'C') THEN
2743: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUBSTITUTION_FLAG := ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
2744: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id := ' || l_plan_id);
2745: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP);
2746: END IF;
2747:
2748: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 2745: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP);

2741: END IF;
2742: IF PG_DEBUG in ('Y', 'C') THEN
2743: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUBSTITUTION_FLAG := ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
2744: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id := ' || l_plan_id);
2745: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP);
2746: END IF;
2747:
2748: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
2749:

Line 2771: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');

2767: l_atp_supply_demand,
2768: l_return_status);
2769: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2770: IF PG_DEBUG in ('Y', 'C') THEN
2771: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
2772: END IF;
2773: x_return_status := FND_API.G_RET_STS_ERROR;
2774: --2741997
2775: l_atp_table.Error_Code(i):= l_atp_rec.Error_Code;

Line 2791: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);

2787: l_bkwd_pass_atf_date_qty := l_atp_rec.atf_date_quantity;
2788: END IF;
2789:
2790: IF PG_DEBUG in ('Y', 'C') THEN
2791: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);
2792: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
2793: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
2794: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);
2795: END IF;

Line 2792: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);

2788: END IF;
2789:
2790: IF PG_DEBUG in ('Y', 'C') THEN
2791: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);
2792: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
2793: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
2794: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);
2795: END IF;
2796: --bug3467631 end

Line 2793: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);

2789:
2790: IF PG_DEBUG in ('Y', 'C') THEN
2791: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);
2792: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
2793: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
2794: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);
2795: END IF;
2796: --bug3467631 end
2797:

Line 2794: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);

2790: IF PG_DEBUG in ('Y', 'C') THEN
2791: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);
2792: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
2793: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
2794: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);
2795: END IF;
2796: --bug3467631 end
2797:
2798: ---- add this item to MSC_ATP_PVT.G_PEGGING_FOR_SET as this is used to remove the demands if needed

Line 2811: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_table.requested_ship_date(i), 'mm-dd-yy hh:mm:ss'));

2807: --- As a result we are loosing time component. So we restore the date back.
2808: IF l_atp_table.requested_ship_date(i) is not null THEN
2809: l_atp_rec.requested_ship_date := l_atp_table.requested_ship_date(i);
2810: IF PG_DEBUG in ('Y', 'C') THEN
2811: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_table.requested_ship_date(i), 'mm-dd-yy hh:mm:ss'));
2812: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the ship date bug 2361283');
2813: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_rec.requested_ship_date, 'mm-dd-yy hh:mm:ss'));
2814: END IF;
2815: END IF;

Line 2812: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the ship date bug 2361283');

2808: IF l_atp_table.requested_ship_date(i) is not null THEN
2809: l_atp_rec.requested_ship_date := l_atp_table.requested_ship_date(i);
2810: IF PG_DEBUG in ('Y', 'C') THEN
2811: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_table.requested_ship_date(i), 'mm-dd-yy hh:mm:ss'));
2812: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the ship date bug 2361283');
2813: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_rec.requested_ship_date, 'mm-dd-yy hh:mm:ss'));
2814: END IF;
2815: END IF;
2816:

Line 2813: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_rec.requested_ship_date, 'mm-dd-yy hh:mm:ss'));

2809: l_atp_rec.requested_ship_date := l_atp_table.requested_ship_date(i);
2810: IF PG_DEBUG in ('Y', 'C') THEN
2811: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_table.requested_ship_date(i), 'mm-dd-yy hh:mm:ss'));
2812: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the ship date bug 2361283');
2813: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_rec.requested_ship_date, 'mm-dd-yy hh:mm:ss'));
2814: END IF;
2815: END IF;
2816:
2817: -- Commented for bug 2748730. G_END_OF_DAY not required here.

Line 2823: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||

2819: -- for bug 2259824, add end of day to ship date
2820: IF l_atp_rec.ship_date IS NOT NULL THEN
2821: l_atp_rec.ship_date := TRUNC(l_atp_rec.ship_date) + MSC_ATP_PVT.G_END_OF_DAY ;
2822: IF PG_DEBUG in ('Y', 'C') THEN
2823: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||
2824: to_char(l_atp_rec.ship_date, 'DD-MON-YYYY HH24:MI:SS'));
2825: END IF;
2826: END IF;
2827: */

Line 2853: msc_sch_wb.atp_debug('Call ATP_Check');

2849: l_atp_rec.override_flag :=l_atp_table.override_flag(i); --plan by request date
2850:
2851:
2852: IF PG_DEBUG in ('Y', 'C') THEN
2853: msc_sch_wb.atp_debug('Call ATP_Check');
2854: END IF;
2855: --e_cto_rearch
2856: MSC_ATP_PVT.ATP_Check(l_atp_rec,
2857: l_plan_id,

Line 2873: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');

2869: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;
2870:
2871: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2872: IF PG_DEBUG in ('Y', 'C') THEN
2873: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
2874: END IF;
2875: x_return_status := FND_API.G_RET_STS_ERROR;
2876: --2741997
2877: -- l_atp_table.Error_Code(k):= l_atp_rec.Error_Code;

Line 2883: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);

2879: RAISE NO_DATA_FOUND;
2880: END IF;
2881:
2882: IF PG_DEBUG in ('Y', 'C') THEN
2883: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
2884: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
2885: END IF;
2886: -- No NVL is needed on atf_date_quantity bug3555084
2887: --l_atp_rec.atf_date_quantity := GREATEST(NVL(l_atp_rec.atf_date_quantity, 0), 0);

Line 2884: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);

2880: END IF;
2881:
2882: IF PG_DEBUG in ('Y', 'C') THEN
2883: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
2884: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
2885: END IF;
2886: -- No NVL is needed on atf_date_quantity bug3555084
2887: --l_atp_rec.atf_date_quantity := GREATEST(NVL(l_atp_rec.atf_date_quantity, 0), 0);
2888: --bug3397904 start

Line 2902: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||

2898: -- for bug 2259824, add end of day to ship date
2899: IF l_atp_rec.ship_date IS NOT NULL THEN
2900: l_atp_rec.ship_date := TRUNC(l_atp_rec.ship_date) + MSC_ATP_PVT.G_END_OF_DAY ;
2901: IF PG_DEBUG in ('Y', 'C') THEN
2902: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||
2903: to_char(l_atp_rec.ship_date, 'DD-MON-YYYY HH24:MI:SS'));
2904: END IF;
2905: END IF;
2906: */

Line 2940: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.quantity_ordered ='||l_future_atp_rec.quantity_ordered );

2936: -- MSC_ATP_PVT.G_PTF_DATE := l_sys_next_omc_date;
2937: MSC_ATP_PVT.G_PTF_DATE := l_sys_next_date;
2938:
2939: IF PG_DEBUG in ('Y', 'C') THEN
2940: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.quantity_ordered ='||l_future_atp_rec.quantity_ordered );
2941: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity ='||l_atp_rec.requested_date_quantity);
2942: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty ='||l_atp_rec.combined_requested_date_qty);
2943: END IF;
2944:

Line 2941: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity ='||l_atp_rec.requested_date_quantity);

2937: MSC_ATP_PVT.G_PTF_DATE := l_sys_next_date;
2938:
2939: IF PG_DEBUG in ('Y', 'C') THEN
2940: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.quantity_ordered ='||l_future_atp_rec.quantity_ordered );
2941: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity ='||l_atp_rec.requested_date_quantity);
2942: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty ='||l_atp_rec.combined_requested_date_qty);
2943: END IF;
2944:
2945: MSC_ATP_PVT.ATP_Check(l_future_atp_rec,

Line 2942: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty ='||l_atp_rec.combined_requested_date_qty);

2938:
2939: IF PG_DEBUG in ('Y', 'C') THEN
2940: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.quantity_ordered ='||l_future_atp_rec.quantity_ordered );
2941: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity ='||l_atp_rec.requested_date_quantity);
2942: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty ='||l_atp_rec.combined_requested_date_qty);
2943: END IF;
2944:
2945: MSC_ATP_PVT.ATP_Check(l_future_atp_rec,
2946: l_plan_id,

Line 2966: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails in future case');

2962: MSC_ATP_PVT.G_ATO_UNCOLL_ITEM,
2963: MSC_ATP_PVT.G_NO_PLAN_FOUND)
2964: THEN
2965: IF PG_DEBUG in ('Y', 'C') THEN
2966: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails in future case');
2967: END IF;
2968: --2741997
2969: x_return_status := FND_API.G_RET_STS_ERROR;
2970: l_atp_rec.error_code := l_future_atp_rec.Error_code;

Line 2981: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||

2977: -- for bug 2259824, add end of day to ship date
2978: l_atp_rec.ship_date := TRUNC(l_future_atp_rec.ship_date) + MSC_ATP_PVT.G_END_OF_DAY ;
2979:
2980: IF PG_DEBUG in ('Y', 'C') THEN
2981: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||
2982: to_char(l_atp_rec.ship_date, 'DD-MON-YYYY HH24:MI:SS'));
2983: END IF;
2984: */
2985:

Line 2991: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.available_quantity = '||

2987: -- make sure we won't ouput any available_quantity which is
2988: -- greater than the infinite number
2989:
2990: IF PG_DEBUG in ('Y', 'C') THEN
2991: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.available_quantity = '||
2992: to_char(nvl(l_future_atp_rec.available_quantity, -99)));
2993: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||
2994: l_future_atp_rec.used_available_quantity); --bug3409973
2995: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||

Line 2993: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||

2989:
2990: IF PG_DEBUG in ('Y', 'C') THEN
2991: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.available_quantity = '||
2992: to_char(nvl(l_future_atp_rec.available_quantity, -99)));
2993: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||
2994: l_future_atp_rec.used_available_quantity); --bug3409973
2995: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||
2996: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
2997: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||

Line 2995: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||

2991: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.available_quantity = '||
2992: to_char(nvl(l_future_atp_rec.available_quantity, -99)));
2993: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||
2994: l_future_atp_rec.used_available_quantity); --bug3409973
2995: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||
2996: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
2997: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||
2998: to_char(nvl(l_atp_rec.requested_date_quantity, -99)));
2999: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);

Line 2997: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||

2993: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||
2994: l_future_atp_rec.used_available_quantity); --bug3409973
2995: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||
2996: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
2997: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||
2998: to_char(nvl(l_atp_rec.requested_date_quantity, -99)));
2999: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);
3000: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.atf_date_quantity = '||l_future_atp_rec.atf_date_quantity);
3001: END IF;

Line 2999: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);

2995: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||
2996: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
2997: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||
2998: to_char(nvl(l_atp_rec.requested_date_quantity, -99)));
2999: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);
3000: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.atf_date_quantity = '||l_future_atp_rec.atf_date_quantity);
3001: END IF;
3002:
3003: IF (l_future_atp_rec.atf_date_quantity is null) and (l_future_atp_rec.ship_date <= l_atf_date) THEN

Line 3000: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.atf_date_quantity = '||l_future_atp_rec.atf_date_quantity);

2996: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
2997: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||
2998: to_char(nvl(l_atp_rec.requested_date_quantity, -99)));
2999: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);
3000: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.atf_date_quantity = '||l_future_atp_rec.atf_date_quantity);
3001: END IF;
3002:
3003: IF (l_future_atp_rec.atf_date_quantity is null) and (l_future_atp_rec.ship_date <= l_atf_date) THEN
3004: l_future_atp_rec.atf_date_quantity := l_future_atp_rec.quantity_ordered;

Line 3019: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity after adding qty from future = '||l_atp_rec.atf_date_quantity);

3015: GREATEST(NVL(l_future_atp_rec.atf_date_quantity, 0), 0);
3016: END IF;
3017:
3018: IF PG_DEBUG in ('Y', 'C') THEN
3019: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity after adding qty from future = '||l_atp_rec.atf_date_quantity);
3020: END IF;
3021:
3022: -- cchen 1238941
3023: -- 1411818 : add greatest

Line 3070: msc_sch_wb.atp_debug('Schedule: ' || 'After ATP_Check for this l_atp_rec ');

3066: l_atp_rec.combined_requested_date_qty;
3067: END IF;
3068: END IF; -- IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4
3069: IF PG_DEBUG in ('Y', 'C') THEN
3070: msc_sch_wb.atp_debug('Schedule: ' || 'After ATP_Check for this l_atp_rec ');
3071: END IF;
3072: -- check the return status
3073: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
3074: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;

Line 3095: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);

3091: END IF;
3092:
3093: l_stmt := 220;
3094: IF PG_DEBUG in ('Y', 'C') THEN
3095: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
3096: END IF;
3097:
3098:
3099: -- now we get the results back and we need to analyze them

Line 3133: msc_sch_wb.atp_debug('Schedule: ' || 'l_dmd_satisfied_date: ' || l_dmd_satisfied_date);

3129: -NVL(l_atp_rec.atp_lead_time, 0));
3130: */
3131: --e_cto_rearch
3132: IF PG_DEBUG in ('Y', 'C') THEN
3133: msc_sch_wb.atp_debug('Schedule: ' || 'l_dmd_satisfied_date: ' || l_dmd_satisfied_date);
3134: END IF;
3135:
3136: IF ( (NVL(l_atp_rec.Override_Flag, 'N') = 'Y')
3137: AND l_atp_rec.Action <> ATPQUERY ) THEN

Line 3141: msc_sch_wb.atp_debug('Schedule: ' || '_______________Override Scenario_______________ ');

3137: AND l_atp_rec.Action <> ATPQUERY ) THEN
3138:
3139: /* ship_rec_cal changes begin */
3140: IF PG_DEBUG in ('Y', 'C') THEN
3141: msc_sch_wb.atp_debug('Schedule: ' || '_______________Override Scenario_______________ ');
3142: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_ship_date(i): ' || l_atp_table.requested_ship_date(i));
3143: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_arrival_date(i): ' || l_atp_table.requested_arrival_date(i));
3144: END IF;
3145: IF (l_atp_table.requested_ship_date(i) IS NOT NULL) THEN

Line 3142: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_ship_date(i): ' || l_atp_table.requested_ship_date(i));

3138:
3139: /* ship_rec_cal changes begin */
3140: IF PG_DEBUG in ('Y', 'C') THEN
3141: msc_sch_wb.atp_debug('Schedule: ' || '_______________Override Scenario_______________ ');
3142: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_ship_date(i): ' || l_atp_table.requested_ship_date(i));
3143: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_arrival_date(i): ' || l_atp_table.requested_arrival_date(i));
3144: END IF;
3145: IF (l_atp_table.requested_ship_date(i) IS NOT NULL) THEN
3146: l_atp_rec.ship_date := l_atp_table.requested_ship_date(i);

Line 3143: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_arrival_date(i): ' || l_atp_table.requested_arrival_date(i));

3139: /* ship_rec_cal changes begin */
3140: IF PG_DEBUG in ('Y', 'C') THEN
3141: msc_sch_wb.atp_debug('Schedule: ' || '_______________Override Scenario_______________ ');
3142: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_ship_date(i): ' || l_atp_table.requested_ship_date(i));
3143: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_arrival_date(i): ' || l_atp_table.requested_arrival_date(i));
3144: END IF;
3145: IF (l_atp_table.requested_ship_date(i) IS NOT NULL) THEN
3146: l_atp_rec.ship_date := l_atp_table.requested_ship_date(i);
3147:

Line 3164: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);

3160: l_atp_rec.intransit_cal_code, -1 * nvl(l_atp_rec.delivery_lead_time, 0), -1,
3161: l_atp_rec.shipping_cal_code, -1, p_instance_id);
3162: END IF;
3163: IF PG_DEBUG in ('Y', 'C') THEN
3164: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3165: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.arrival_date: ' || l_atp_rec.arrival_date);
3166: END IF;
3167:
3168: /* If ship date returned is greater than requested ship date move it to OSC */

Line 3165: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.arrival_date: ' || l_atp_rec.arrival_date);

3161: l_atp_rec.shipping_cal_code, -1, p_instance_id);
3162: END IF;
3163: IF PG_DEBUG in ('Y', 'C') THEN
3164: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3165: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.arrival_date: ' || l_atp_rec.arrival_date);
3166: END IF;
3167:
3168: /* If ship date returned is greater than requested ship date move it to OSC */
3169: ELSIF trunc(l_atp_rec.ship_date) > trunc(l_atp_rec.requested_ship_date) THEN

Line 3175: msc_sch_wb.atp_debug('Schedule: ' || 'ship_date > req_ship_date');

3171: l_atp_rec.shipping_cal_code,
3172: p_instance_id,
3173: l_atp_rec.ship_date);
3174: IF PG_DEBUG in ('Y', 'C') THEN
3175: msc_sch_wb.atp_debug('Schedule: ' || 'ship_date > req_ship_date');
3176: msc_sch_wb.atp_debug('Schedule: ' || '_______________After validating ship date on OSC_______________ ');
3177: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3178: END IF;
3179: END IF;

Line 3176: msc_sch_wb.atp_debug('Schedule: ' || '_______________After validating ship date on OSC_______________ ');

3172: p_instance_id,
3173: l_atp_rec.ship_date);
3174: IF PG_DEBUG in ('Y', 'C') THEN
3175: msc_sch_wb.atp_debug('Schedule: ' || 'ship_date > req_ship_date');
3176: msc_sch_wb.atp_debug('Schedule: ' || '_______________After validating ship date on OSC_______________ ');
3177: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3178: END IF;
3179: END IF;
3180: /* ship_rec_cal changes end */

Line 3177: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);

3173: l_atp_rec.ship_date);
3174: IF PG_DEBUG in ('Y', 'C') THEN
3175: msc_sch_wb.atp_debug('Schedule: ' || 'ship_date > req_ship_date');
3176: msc_sch_wb.atp_debug('Schedule: ' || '_______________After validating ship date on OSC_______________ ');
3177: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3178: END IF;
3179: END IF;
3180: /* ship_rec_cal changes end */
3181:

Line 3200: msc_sch_wb.atp_debug('Schedule: l_atp_rec.arrival_date = '||

3196: l_atp_rec.arrival_date));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
3197: END IF;
3198:
3199: IF PG_DEBUG in ('Y', 'C') THEN
3200: msc_sch_wb.atp_debug('Schedule: l_atp_rec.arrival_date = '||
3201: to_char(l_atp_rec.arrival_date, 'DD-MON-YYYY HH24:MI:SS'));
3202: END IF;
3203:
3204: END IF;

Line 3219: msc_sch_wb.atp_debug('Schedule: request arrival date = '||

3215: -- date type is arrival
3216: l_original_req_arrival_date := NVL(l_atp_rec.original_request_date,l_atp_rec.requested_arrival_date);
3217: END IF;
3218: IF PG_DEBUG in ('Y', 'C') THEN
3219: msc_sch_wb.atp_debug('Schedule: request arrival date = '||
3220: to_char(l_atp_rec.requested_arrival_date, 'DD-MON-YYYY HH24:MI:SS'));
3221: END IF;
3222: l_req_arr_date(i) := l_original_req_arrival_date;
3223: /*plan by request date changes end */

Line 3226: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');

3222: l_req_arr_date(i) := l_original_req_arrival_date;
3223: /*plan by request date changes end */
3224: -- populate the output info l_atp_table
3225: IF PG_DEBUG in ('Y', 'C') THEN
3226: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3227: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);

Line 3227: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));

3223: /*plan by request date changes end */
3224: -- populate the output info l_atp_table
3225: IF PG_DEBUG in ('Y', 'C') THEN
3226: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3227: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);

Line 3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);

3224: -- populate the output info l_atp_table
3225: IF PG_DEBUG in ('Y', 'C') THEN
3226: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3227: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3232: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);

Line 3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);

3225: IF PG_DEBUG in ('Y', 'C') THEN
3226: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3227: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3232: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3233: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||

Line 3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);

3226: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3227: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3232: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3233: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3234: l_atp_rec.Available_Quantity);

Line 3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);

3227: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3232: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3233: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3234: l_atp_rec.Available_Quantity);
3235: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||

Line 3232: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);

3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3232: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3233: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3234: l_atp_rec.Available_Quantity);
3235: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3236: l_atp_rec.Requested_Date_Quantity);

Line 3233: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||

3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3232: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3233: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3234: l_atp_rec.Available_Quantity);
3235: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3236: l_atp_rec.Requested_Date_Quantity);
3237: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);

Line 3235: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||

3231: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3232: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3233: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3234: l_atp_rec.Available_Quantity);
3235: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3236: l_atp_rec.Requested_Date_Quantity);
3237: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3238: --bug3709707 added debug messages
3239: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);

Line 3237: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);

3233: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3234: l_atp_rec.Available_Quantity);
3235: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3236: l_atp_rec.Requested_Date_Quantity);
3237: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3238: --bug3709707 added debug messages
3239: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3240: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3241: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);

Line 3239: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);

3235: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3236: l_atp_rec.Requested_Date_Quantity);
3237: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3238: --bug3709707 added debug messages
3239: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3240: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3241: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3242: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3243: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);

Line 3240: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);

3236: l_atp_rec.Requested_Date_Quantity);
3237: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3238: --bug3709707 added debug messages
3239: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3240: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3241: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3242: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3243: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);
3244: END IF;

Line 3241: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);

3237: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3238: --bug3709707 added debug messages
3239: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3240: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3241: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3242: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3243: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);
3244: END IF;
3245: --- subst

Line 3242: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));

3238: --bug3709707 added debug messages
3239: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3240: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3241: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3242: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3243: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);
3244: END IF;
3245: --- subst
3246: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' THEN

Line 3243: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);

3239: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3240: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3241: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3242: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3243: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);
3244: END IF;
3245: --- subst
3246: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' THEN
3247:

Line 3264: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_Item_Name(i) '||l_atp_table.Inventory_Item_Name(i));

3260: l_atp_table.Inventory_item_id(i) := l_atp_rec.inventory_item_id;
3261: END IF;
3262:
3263: IF PG_DEBUG in ('Y', 'C') THEN
3264: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_Item_Name(i) '||l_atp_table.Inventory_Item_Name(i));
3265: END IF;
3266: --bug3709707 used original item id and name
3267: --l_atp_table.Inventory_item_id(i) := l_atp_rec.inventory_item_id;
3268: --l_atp_table.request_item_id(i) := l_atp_rec.request_item_id;

Line 3280: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_table.req_item_available_date(i) = '||

3276: -- Bug 2259824
3277: l_atp_table.req_item_available_date(i) := TRUNC(l_atp_rec.req_item_available_date) ;
3278: --4460369+ MSC_ATP_PVT.G_END_OF_DAY;
3279: IF PG_DEBUG in ('Y', 'C') THEN
3280: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_table.req_item_available_date(i) = '||
3281: to_char(l_atp_table.req_item_available_date(i), 'DD-MON-YYYY HH24:MI:SS'));
3282: END IF;
3283:
3284: l_atp_table.req_item_available_date_qty(i) := l_atp_rec.req_item_available_date_qty;

Line 3313: msc_sch_wb.atp_debug ('Schedule: ' || 'after item name');

3309: l_atp_table.Inventory_Item_Name(i)) ;
3310: END IF;
3311: /* Modularize Item and Org Info */
3312: IF PG_DEBUG in ('Y', 'C') THEN
3313: msc_sch_wb.atp_debug ('Schedule: ' || 'after item name');
3314: END IF;
3315: END IF; --- IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'
3316: l_atp_table.Source_Organization_Id(i):=
3317: l_atp_rec.organization_id;

Line 3319: msc_sch_wb.atp_debug ('Schedule: ' || 'after source org id ');

3315: END IF; --- IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'
3316: l_atp_table.Source_Organization_Id(i):=
3317: l_atp_rec.organization_id;
3318: IF PG_DEBUG in ('Y', 'C') THEN
3319: msc_sch_wb.atp_debug ('Schedule: ' || 'after source org id ');
3320: END IF;
3321:
3322: -- since we do a uom conversion, so we need to repopulate
3323: -- the primary uom and primary uom quantity back

Line 3336: msc_sch_wb.atp_debug ('Schedule: ' || 'after code');

3332: /*l_atp_table.Source_Organization_Code(i):=
3333: MSC_ATP_FUNC.get_org_code(p_instance_id, l_atp_rec.organization_id);
3334: Modularize Item and Org Info */
3335: IF PG_DEBUG in ('Y', 'C') THEN
3336: msc_sch_wb.atp_debug ('Schedule: ' || 'after code');
3337: END IF;
3338:
3339: l_atp_table.Ship_Method(i) := l_atp_rec.ship_method;
3340: l_atp_table.Delivery_Lead_Time(i) := l_atp_rec.delivery_lead_time;

Line 3384: msc_sch_wb.atp_debug('Schedule: ' || 'In case 2: l_multi_scenario = 0 ');

3380: -- old bad code was here
3381: IF l_multi_scenario = 0 THEN
3382: -- case 2
3383: IF PG_DEBUG in ('Y', 'C') THEN
3384: msc_sch_wb.atp_debug('Schedule: ' || 'In case 2: l_multi_scenario = 0 ');
3385: END IF;
3386: -- since case 2 is what oe wants, we can always set this
3387: -- flag to 'Y'
3388: l_atp_table.OE_Flag(i) := 'Y';

Line 3414: msc_sch_wb.atp_debug('Schedule: ' || 'Reset The error code for diag ATP mode');

3410: ---diag_atp
3411: ---In diagnostic ATP we continue as if we are able to meet the demand on request date
3412: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
3413: IF PG_DEBUG in ('Y', 'C') THEN
3414: msc_sch_wb.atp_debug('Schedule: ' || 'Reset The error code for diag ATP mode');
3415: END IF;
3416: l_atp_rec.error_code := ALLSUCCESS;
3417: --here we mark the constraint path for UI so that they can show the constraiend nodes
3418: ---bug 27744106: Improve the query for performance

Line 3462: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);

3458: END IF;
3459:
3460: ---bug 1819638: Compare ship_date with greatest of lat_acceptable_date and l_sys_next_date
3461: IF PG_DEBUG in ('Y', 'C') THEN
3462: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
3463: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
3464: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
3465: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
3466: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);

Line 3463: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);

3459:
3460: ---bug 1819638: Compare ship_date with greatest of lat_acceptable_date and l_sys_next_date
3461: IF PG_DEBUG in ('Y', 'C') THEN
3462: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
3463: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
3464: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
3465: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
3466: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);
3467: END IF;

Line 3464: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);

3460: ---bug 1819638: Compare ship_date with greatest of lat_acceptable_date and l_sys_next_date
3461: IF PG_DEBUG in ('Y', 'C') THEN
3462: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
3463: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
3464: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
3465: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
3466: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);
3467: END IF;
3468:

Line 3465: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);

3461: IF PG_DEBUG in ('Y', 'C') THEN
3462: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
3463: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
3464: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
3465: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
3466: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);
3467: END IF;
3468:
3469: -- dsting setproc

Line 3466: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);

3462: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
3463: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
3464: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
3465: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
3466: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);
3467: END IF;
3468:
3469: -- dsting setproc
3470: l_atp_table.instance_id(i) := p_instance_id;

Line 3505: msc_sch_wb.atp_debug('override ship_date: ' || l_atp_table.ship_date(i));

3501: END IF;
3502: END IF;*/
3503:
3504: IF PG_DEBUG in ('Y', 'C') THEN
3505: msc_sch_wb.atp_debug('override ship_date: ' || l_atp_table.ship_date(i));
3506: msc_sch_wb.atp_debug('override arrival_date: ' || l_atp_table.arrival_date(i));
3507: END IF;
3508: ELSE
3509: -- xxx dsting hack to make sure things don't ship before sysdate

Line 3506: msc_sch_wb.atp_debug('override arrival_date: ' || l_atp_table.arrival_date(i));

3502: END IF;*/
3503:
3504: IF PG_DEBUG in ('Y', 'C') THEN
3505: msc_sch_wb.atp_debug('override ship_date: ' || l_atp_table.ship_date(i));
3506: msc_sch_wb.atp_debug('override arrival_date: ' || l_atp_table.arrival_date(i));
3507: END IF;
3508: ELSE
3509: -- xxx dsting hack to make sure things don't ship before sysdate
3510: -- for an overridden ship set with req_arrival_date

Line 3520: msc_sch_wb.atp_debug('ship_date: ' || l_atp_table.ship_date(i));

3516: sysdate);
3517: END IF; -- override
3518:
3519: IF PG_DEBUG in ('Y', 'C') THEN
3520: msc_sch_wb.atp_debug('ship_date: ' || l_atp_table.ship_date(i));
3521: msc_sch_wb.atp_debug('arrival_date: ' || l_atp_table.arrival_date(i));
3522: END IF;
3523: --bug3439591 start
3524: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929

Line 3521: msc_sch_wb.atp_debug('arrival_date: ' || l_atp_table.arrival_date(i));

3517: END IF; -- override
3518:
3519: IF PG_DEBUG in ('Y', 'C') THEN
3520: msc_sch_wb.atp_debug('ship_date: ' || l_atp_table.ship_date(i));
3521: msc_sch_wb.atp_debug('arrival_date: ' || l_atp_table.arrival_date(i));
3522: END IF;
3523: --bug3439591 start
3524: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929
3525: L_MOVE_PAST_DUE_TO_SYSDATE := MSC_ATP_PVT.G_MOV_PAST_DUE_SYSDATE_PROF;--6316476

Line 3527: msc_sch_wb.atp_debug('Schedule: ' || 'MOVE_PAST_DUE_TO_SYS_DATE :'|| L_MOVE_PAST_DUE_TO_SYSDATE);

3523: --bug3439591 start
3524: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929
3525: L_MOVE_PAST_DUE_TO_SYSDATE := MSC_ATP_PVT.G_MOV_PAST_DUE_SYSDATE_PROF;--6316476
3526: IF PG_DEBUG in ('Y', 'C') THEN
3527: msc_sch_wb.atp_debug('Schedule: ' || 'MOVE_PAST_DUE_TO_SYS_DATE :'|| L_MOVE_PAST_DUE_TO_SYSDATE);
3528: END IF;
3529: if L_MOVE_PAST_DUE_TO_SYSDATE = 'Y' THEN -- Bug 5584634/5618929
3530: IF l_atp_table.requested_ship_date(i) IS NOT NULL THEN
3531: l_atp_table.latest_acceptable_date(i) := GREATEST(NVL(l_atp_table.latest_acceptable_date(i),

Line 3554: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));

3550: END IF;
3551: END IF;
3552:
3553: IF PG_DEBUG in ('Y', 'C') THEN
3554: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
3555: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
3556: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
3557: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
3558: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375

Line 3555: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);

3551: END IF;
3552:
3553: IF PG_DEBUG in ('Y', 'C') THEN
3554: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
3555: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
3556: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
3557: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
3558: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
3559: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));

Line 3556: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);

3552:
3553: IF PG_DEBUG in ('Y', 'C') THEN
3554: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
3555: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
3556: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
3557: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
3558: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
3559: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
3560: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));

Line 3557: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375

3553: IF PG_DEBUG in ('Y', 'C') THEN
3554: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
3555: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
3556: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
3557: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
3558: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
3559: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
3560: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));
3561: END IF;

Line 3558: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375

3554: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
3555: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
3556: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
3557: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
3558: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
3559: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
3560: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));
3561: END IF;
3562: --bug3439591 end

Line 3559: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));

3555: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
3556: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
3557: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
3558: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
3559: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
3560: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));
3561: END IF;
3562: --bug3439591 end
3563: -- dsting setproc

Line 3560: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));

3556: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
3557: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
3558: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
3559: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
3560: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));
3561: END IF;
3562: --bug3439591 end
3563: -- dsting setproc
3564: MSC_ATP_PROC.Process_Set_Line(l_atp_table, i, l_line_status);

Line 3566: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

3562: --bug3439591 end
3563: -- dsting setproc
3564: MSC_ATP_PROC.Process_Set_Line(l_atp_table, i, l_line_status);
3565: Process_Time_Stamp_Errors(l_atp_table,i);
3566: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
3567: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
3568: IF l_ship_count = 1 and l_arrival_count = 1 THEN
3569: l_set_status := l_line_status;
3570: END iF;

Line 3567: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));

3563: -- dsting setproc
3564: MSC_ATP_PROC.Process_Set_Line(l_atp_table, i, l_line_status);
3565: Process_Time_Stamp_Errors(l_atp_table,i);
3566: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
3567: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
3568: IF l_ship_count = 1 and l_arrival_count = 1 THEN
3569: l_set_status := l_line_status;
3570: END iF;
3571: -- 2902129

Line 3578: msc_sch_wb.atp_debug('Schedule: ' || 'inside the range in case 2');

3574: END IF;
3575: IF l_line_status = ALLSUCCESS THEN
3576: l_stmt := 260;
3577: IF PG_DEBUG in ('Y', 'C') THEN
3578: msc_sch_wb.atp_debug('Schedule: ' || 'inside the range in case 2');
3579: END IF;
3580:
3581: -- we are inside the latest acceptable range
3582: -- remember, l_atp_rec.error_code = ALLSUCCESS means

Line 3603: msc_sch_wb.atp_debug('Schedule: ' || 'bug 1225631');

3599: (l_ship_count > 1 AND i = l_ship_count) OR
3600: (l_ship_count = 1 AND l_arrival_count = 1)) THEN
3601:
3602: IF PG_DEBUG in ('Y', 'C') THEN
3603: msc_sch_wb.atp_debug('Schedule: ' || 'bug 1225631');
3604: END IF;
3605: --3720018 , Global array MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC is used to append records
3606: -- in case of ATP Inquiry. This global array will be used to call remove_invalid_sd_rec
3607: -- From request level (Call_schedule)

Line 3615: msc_sch_wb.atp_debug('Schedule: ' || MSC_ATP_PVT.G_PEGGING_FOR_SET(m));

3611: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PLAN_ID_REQUEST.extend(MSC_ATP_PVT.G_PEGGING_FOR_SET.count);
3612: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_DC_ATP_FLAG_REQUEST.extend(MSC_ATP_PVT.G_PEGGING_FOR_SET.count);
3613: FOR m in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
3614: IF PG_DEBUG in ('Y', 'C') THEN
3615: msc_sch_wb.atp_debug('Schedule: ' || MSC_ATP_PVT.G_PEGGING_FOR_SET(m));
3616: END IF;
3617: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST(l_count + m) := MSC_ATP_PVT.G_PEGGING_FOR_SET(m);
3618: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PLAN_ID_REQUEST(l_count + m) := l_plan_id;
3619: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_DC_ATP_FLAG_REQUEST(l_count + m) := MSC_ATP_PVT.G_PEGGING_FOR_SET(m);

Line 3626: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');

3622:
3623: /* --3720018, donot call remove_invalid_sd_rec here
3624: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
3625: IF PG_DEBUG in ('Y', 'C') THEN
3626: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
3627: END IF;
3628: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
3629: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
3630: p_instance_id,

Line 3644: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);

3640:
3641: IF l_atp_rec.error_code = ATP_REQ_DATE_FAIL THEN
3642: l_sd_qty := l_atp_rec.quantity_ordered;
3643: IF PG_DEBUG in ('Y', 'C') THEN
3644: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_DATE_QTY(i) := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(i));
3646: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_ATP_DATE(i) := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(i));
3647: END IF;
3648: -- rajjain begin 01/30/2003 Bug 2777661

Line 3645: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_DATE_QTY(i) := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(i));

3641: IF l_atp_rec.error_code = ATP_REQ_DATE_FAIL THEN
3642: l_sd_qty := l_atp_rec.quantity_ordered;
3643: IF PG_DEBUG in ('Y', 'C') THEN
3644: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_DATE_QTY(i) := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(i));
3646: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_ATP_DATE(i) := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(i));
3647: END IF;
3648: -- rajjain begin 01/30/2003 Bug 2777661
3649: -- bug 2795053-reopen (ssurendr): Do date offset for override case as well

Line 3646: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_ATP_DATE(i) := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(i));

3642: l_sd_qty := l_atp_rec.quantity_ordered;
3643: IF PG_DEBUG in ('Y', 'C') THEN
3644: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_DATE_QTY(i) := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(i));
3646: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_ATP_DATE(i) := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(i));
3647: END IF;
3648: -- rajjain begin 01/30/2003 Bug 2777661
3649: -- bug 2795053-reopen (ssurendr): Do date offset for override case as well
3650: -- IF NVL(l_atp_rec.override_flag, 'N') = 'Y' THEN

Line 3671: msc_sch_wb.atp_debug('Schedule: ' || 'l_order_date_type : ' || l_order_date_type);

3667: l_order_date_type := 1;
3668: END IF;
3669:
3670: IF PG_DEBUG in ('Y', 'C') THEN
3671: msc_sch_wb.atp_debug('Schedule: ' || 'l_order_date_type : ' || l_order_date_type);
3672: END IF;
3673:
3674: --Bug 3226083
3675: l_atp_insert_rec := l_atp_rec;

Line 3713: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code(i)='||l_atp_table.Error_Code(i));

3709: IF ((l_atp_table.Action(i) = ATPQUERY) AND
3710: ((l_atp_table.Error_Code(i) = ATP_NOT_APPL) OR
3711: (l_atp_table.Error_Code(i) = PDS_TO_ODS_SWITCH))) THEN
3712: IF PG_DEBUG in ('Y', 'C') THEN
3713: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code(i)='||l_atp_table.Error_Code(i));
3714: END IF;
3715: ELSE
3716: l_atp_table.Error_Code(i) := ALLSUCCESS;
3717: END IF;

Line 3728: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count := ' ||l_ship_count);

3724:
3725: -- need to do something for the set if we are done
3726: -- with this set
3727: IF PG_DEBUG in ('Y', 'C') THEN
3728: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count := ' ||l_ship_count);
3729: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);
3730: msc_sch_wb.atp_debug('Schedule: ' || 'stmt - l_set_element_success := ' || l_set_element_success);
3731: END IF;
3732: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN

Line 3729: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);

3725: -- need to do something for the set if we are done
3726: -- with this set
3727: IF PG_DEBUG in ('Y', 'C') THEN
3728: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count := ' ||l_ship_count);
3729: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);
3730: msc_sch_wb.atp_debug('Schedule: ' || 'stmt - l_set_element_success := ' || l_set_element_success);
3731: END IF;
3732: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN
3733:

Line 3730: msc_sch_wb.atp_debug('Schedule: ' || 'stmt - l_set_element_success := ' || l_set_element_success);

3726: -- with this set
3727: IF PG_DEBUG in ('Y', 'C') THEN
3728: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count := ' ||l_ship_count);
3729: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);
3730: msc_sch_wb.atp_debug('Schedule: ' || 'stmt - l_set_element_success := ' || l_set_element_success);
3731: END IF;
3732: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN
3733:
3734: l_stmt := 290;

Line 3736: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt:= ' || l_stmt);

3732: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN
3733:
3734: l_stmt := 290;
3735: IF PG_DEBUG in ('Y', 'C') THEN
3736: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt:= ' || l_stmt);
3737: END IF;
3738:
3739: -- this is a set, make sure this set is successful
3740:

Line 3752: msc_sch_wb.atp_debug('Schedule: ' || 'stmt17');

3748:
3749: l_stmt := 300;
3750:
3751: IF PG_DEBUG in ('Y', 'C') THEN
3752: msc_sch_wb.atp_debug('Schedule: ' || 'stmt17');
3753: END IF;
3754:
3755: MSC_ATP_PROC.Update_Set_SD_Dates(l_atp_table,l_req_arr_date);
3756: END IF;

Line 3785: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_arrival_date_rec.demand_id = ' || l_ship_arrival_date_rec.demand_id);

3781: WHEN OTHERS THEN
3782: l_ship_arrival_date_rec.demand_id := null;
3783: END;
3784: IF PG_DEBUG in ('Y', 'C') THEN
3785: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_arrival_date_rec.demand_id = ' || l_ship_arrival_date_rec.demand_id);
3786: END IF;
3787:
3788: /* Determine order date type*/
3789: IF l_atp_table.requested_arrival_date(i) is not null THEN

Line 3799: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');

3795: IF (G_INV_CTP = 4)THEN
3796: MSC_ATP_DB_UTILS.Flush_Data_In_Pds(l_ship_arrival_date_rec, l_return_status);
3797: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3798: IF PG_DEBUG in ('Y', 'C') THEN
3799: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
3800: END IF;
3801: END IF;
3802: ELSE
3803: MSC_ATP_DB_UTILS.Flush_Data_In_Ods(l_ship_arrival_date_rec, l_return_status);

Line 3806: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Ods procedure ');

3802: ELSE
3803: MSC_ATP_DB_UTILS.Flush_Data_In_Ods(l_ship_arrival_date_rec, l_return_status);
3804: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3805: IF PG_DEBUG in ('Y', 'C') THEN
3806: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Ods procedure ');
3807: END IF;
3808: END IF;
3809: END IF;
3810: END IF;

Line 3814: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');

3810: END IF;
3811:
3812: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3813: IF PG_DEBUG in ('Y', 'C') THEN
3814: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
3815: END IF;
3816: RAISE FND_API.G_EXC_ERROR;
3817: END IF;
3818: END IF;

Line 3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);

3826: END IF;
3827:
3828: l_stmt := 360;
3829: IF PG_DEBUG in ('Y', 'C') THEN
3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);
3831: END IF;
3832:
3833: -- Added by NGOEL for BUG 1533251, in case ship_date is <= requested_date
3834: -- and G_FIND_FUTURE = Y, copy available quantity into request_date quantity.

Line 3847: msc_sch_wb.atp_debug ('Schedule: ' || 'Bug 1533251');

3843: (l_atp_rec.requested_arrival_date IS NOT NULL) AND
3844: (l_atp_rec.ship_date+NVL(l_atp_rec.delivery_lead_time,0)
3845: <= l_atp_rec.requested_arrival_date))) THEN
3846: IF PG_DEBUG in ('Y', 'C') THEN
3847: msc_sch_wb.atp_debug ('Schedule: ' || 'Bug 1533251');
3848: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||
3849: l_atp_rec.requested_date_quantity);
3850: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||
3851: l_atp_rec.combined_requested_date_qty);

Line 3848: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||

3844: (l_atp_rec.ship_date+NVL(l_atp_rec.delivery_lead_time,0)
3845: <= l_atp_rec.requested_arrival_date))) THEN
3846: IF PG_DEBUG in ('Y', 'C') THEN
3847: msc_sch_wb.atp_debug ('Schedule: ' || 'Bug 1533251');
3848: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||
3849: l_atp_rec.requested_date_quantity);
3850: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||
3851: l_atp_rec.combined_requested_date_qty);
3852: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.available_quantity : '||

Line 3850: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||

3846: IF PG_DEBUG in ('Y', 'C') THEN
3847: msc_sch_wb.atp_debug ('Schedule: ' || 'Bug 1533251');
3848: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||
3849: l_atp_rec.requested_date_quantity);
3850: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||
3851: l_atp_rec.combined_requested_date_qty);
3852: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.available_quantity : '||
3853: l_atp_rec.available_quantity);
3854: END IF;

Line 3852: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.available_quantity : '||

3848: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||
3849: l_atp_rec.requested_date_quantity);
3850: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||
3851: l_atp_rec.combined_requested_date_qty);
3852: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.available_quantity : '||
3853: l_atp_rec.available_quantity);
3854: END IF;
3855:
3856: l_atp_rec.requested_date_quantity := l_atp_rec.available_quantity;

Line 3863: msc_sch_wb.atp_debug('Schedule: ' || 'Reset The error code for diag ATP mode 2');

3859:
3860: --diag_atp
3861: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
3862: IF PG_DEBUG in ('Y', 'C') THEN
3863: msc_sch_wb.atp_debug('Schedule: ' || 'Reset The error code for diag ATP mode 2');
3864: END IF;
3865: l_atp_table.Error_Code(i) := MSC_ATP_PVT.DIAGNOSTIC_ATP_ENABLED;
3866: END IF;
3867: ELSE --- bug 1104565

Line 3871: msc_sch_wb.atp_debug('Schedule: ' || 'Date requirements fail vivek');

3867: ELSE --- bug 1104565
3868:
3869: -- The request_date fails
3870: IF PG_DEBUG in ('Y', 'C') THEN
3871: msc_sch_wb.atp_debug('Schedule: ' || 'Date requirements fail vivek');
3872: END IF;
3873: -- Bug 2266808 : krajan
3874: -- dsting setproc
3875: IF l_ship_count > 1 AND i = l_ship_count THEN

Line 3896: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);

3892: -- 1580127
3893: IF (l_atp_rec.error_code = ATP_REQ_DATE_FAIL) THEN
3894:
3895: IF PG_DEBUG in ('Y', 'C') THEN
3896: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);
3897: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);
3898: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);
3899: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);
3900: END IF;

Line 3897: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);

3893: IF (l_atp_rec.error_code = ATP_REQ_DATE_FAIL) THEN
3894:
3895: IF PG_DEBUG in ('Y', 'C') THEN
3896: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);
3897: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);
3898: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);
3899: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);
3900: END IF;
3901:

Line 3898: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);

3894:
3895: IF PG_DEBUG in ('Y', 'C') THEN
3896: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);
3897: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);
3898: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);
3899: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);
3900: END IF;
3901:
3902: l_sd_qty := l_atp_rec.quantity_ordered;

Line 3899: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);

3895: IF PG_DEBUG in ('Y', 'C') THEN
3896: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);
3897: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);
3898: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);
3899: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);
3900: END IF;
3901:
3902: l_sd_qty := l_atp_rec.quantity_ordered;
3903: IF PG_DEBUG in ('Y', 'C') THEN

Line 3904: msc_sch_wb.atp_debug('Schedule: ' || 'quantity : ' || l_sd_qty);

3900: END IF;
3901:
3902: l_sd_qty := l_atp_rec.quantity_ordered;
3903: IF PG_DEBUG in ('Y', 'C') THEN
3904: msc_sch_wb.atp_debug('Schedule: ' || 'quantity : ' || l_sd_qty);
3905: END IF;
3906:
3907: /* ship_rec_cal Determine order date type*/
3908: IF l_atp_table.requested_arrival_date(i) is not null THEN

Line 3914: msc_sch_wb.atp_debug('Schedule: ' || 'l_order_date_type : ' || l_order_date_type);

3910: ELSE
3911: l_order_date_type := 1;
3912: END IF;
3913: IF PG_DEBUG in ('Y', 'C') THEN
3914: msc_sch_wb.atp_debug('Schedule: ' || 'l_order_date_type : ' || l_order_date_type);
3915: END IF;
3916:
3917: --Bug 3226083
3918: l_atp_insert_rec := l_atp_rec;

Line 3967: msc_sch_wb.atp_debug('Schedule: ' || 'in case 2, not in acceptable range');

3963:
3964: -- IF (l_atp_rec.error_code = ATP_REQ_DATE_FAIL) THEN
3965: IF (l_atp_table.error_code(i) = ATP_REQ_DATE_FAIL) THEN
3966: IF PG_DEBUG in ('Y', 'C') THEN
3967: msc_sch_wb.atp_debug('Schedule: ' || 'in case 2, not in acceptable range');
3968: END IF;
3969: l_atp_table.Error_Code(i) := ATP_ACCEPT_FAIL;
3970:
3971: END IF;

Line 3975: msc_sch_wb.atp_debug('arrival cntr k: ' || k);

3971: END IF;
3972: END IF; --- IF l_atp_rec.error_code = "ALLSUCCESS"
3973:
3974: IF PG_DEBUG in ('Y', 'C') THEN
3975: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
3976: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
3977: msc_sch_wb.atp_debug('i: ' || i);
3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);

Line 3976: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);

3972: END IF; --- IF l_atp_rec.error_code = "ALLSUCCESS"
3973:
3974: IF PG_DEBUG in ('Y', 'C') THEN
3975: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
3976: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
3977: msc_sch_wb.atp_debug('i: ' || i);
3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);

Line 3977: msc_sch_wb.atp_debug('i: ' || i);

3973:
3974: IF PG_DEBUG in ('Y', 'C') THEN
3975: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
3976: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
3977: msc_sch_wb.atp_debug('i: ' || i);
3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
3981: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);

Line 3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);

3974: IF PG_DEBUG in ('Y', 'C') THEN
3975: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
3976: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
3977: msc_sch_wb.atp_debug('i: ' || i);
3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
3981: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
3982: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);

Line 3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);

3975: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
3976: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
3977: msc_sch_wb.atp_debug('i: ' || i);
3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
3981: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
3982: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
3983: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);

Line 3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);

3976: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
3977: msc_sch_wb.atp_debug('i: ' || i);
3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
3981: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
3982: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
3983: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);
3984: END IF;

Line 3981: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);

3977: msc_sch_wb.atp_debug('i: ' || i);
3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
3981: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
3982: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
3983: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);
3984: END IF;
3985:

Line 3982: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);

3978: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
3981: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
3982: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
3983: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);
3984: END IF;
3985:
3986: IF i = l_ship_count THEN

Line 3983: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);

3979: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
3980: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
3981: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
3982: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
3983: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);
3984: END IF;
3985:
3986: IF i = l_ship_count THEN
3987:

Line 3994: msc_sch_wb.atp_debug('used src for fst_src_peg');

3990: (l_date_higher_src = 'N' and l_overall_status
3991: in (ATP_REQ_DATE_FAIL, ATP_ACCEPT_FAIL, GROUPEL_ERROR))
3992: THEN
3993: IF PG_DEBUG in ('Y', 'C') THEN
3994: msc_sch_wb.atp_debug('used src for fst_src_peg');
3995: END IF;
3996:
3997: IF j > 1 THEN
3998: FOR l_peg_count in k..l_fst_src_pegging_ids.count loop

Line 4014: msc_sch_wb.atp_debug('adding to fst_src_peg p');

4010: l_req_date_qty.trim(l_fst_src_pegging_ids.count - k + 1);
4011: l_demand_class_atp_flag.trim(l_fst_src_pegging_ids.count - k + 1);
4012: END IF;
4013:
4014: msc_sch_wb.atp_debug('adding to fst_src_peg p');
4015: MSC_ATP_PROC.number_arr_cat(l_fst_src_pegging_ids, MSC_ATP_PVT.G_PEGGING_FOR_SET);
4016: msc_sch_wb.atp_debug('adding to fst_src_peg d');
4017: MSC_ATP_PROC.date_arr_cat(l_req_atp_date, MSC_ATP_PVT.G_REQ_ATP_DATE);
4018: msc_sch_wb.atp_debug('adding to fst_src_peg q');

Line 4016: msc_sch_wb.atp_debug('adding to fst_src_peg d');

4012: END IF;
4013:
4014: msc_sch_wb.atp_debug('adding to fst_src_peg p');
4015: MSC_ATP_PROC.number_arr_cat(l_fst_src_pegging_ids, MSC_ATP_PVT.G_PEGGING_FOR_SET);
4016: msc_sch_wb.atp_debug('adding to fst_src_peg d');
4017: MSC_ATP_PROC.date_arr_cat(l_req_atp_date, MSC_ATP_PVT.G_REQ_ATP_DATE);
4018: msc_sch_wb.atp_debug('adding to fst_src_peg q');
4019: MSC_ATP_PROC.number_arr_cat(l_req_date_qty, MSC_ATP_PVT.G_REQ_DATE_QTY);
4020: msc_sch_wb.atp_debug('adding to fst_src_peg f');

Line 4018: msc_sch_wb.atp_debug('adding to fst_src_peg q');

4014: msc_sch_wb.atp_debug('adding to fst_src_peg p');
4015: MSC_ATP_PROC.number_arr_cat(l_fst_src_pegging_ids, MSC_ATP_PVT.G_PEGGING_FOR_SET);
4016: msc_sch_wb.atp_debug('adding to fst_src_peg d');
4017: MSC_ATP_PROC.date_arr_cat(l_req_atp_date, MSC_ATP_PVT.G_REQ_ATP_DATE);
4018: msc_sch_wb.atp_debug('adding to fst_src_peg q');
4019: MSC_ATP_PROC.number_arr_cat(l_req_date_qty, MSC_ATP_PVT.G_REQ_DATE_QTY);
4020: msc_sch_wb.atp_debug('adding to fst_src_peg f');
4021: MSC_ATP_PROC.number_arr_cat(l_demand_class_atp_flag, MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG);
4022:

Line 4020: msc_sch_wb.atp_debug('adding to fst_src_peg f');

4016: msc_sch_wb.atp_debug('adding to fst_src_peg d');
4017: MSC_ATP_PROC.date_arr_cat(l_req_atp_date, MSC_ATP_PVT.G_REQ_ATP_DATE);
4018: msc_sch_wb.atp_debug('adding to fst_src_peg q');
4019: MSC_ATP_PROC.number_arr_cat(l_req_date_qty, MSC_ATP_PVT.G_REQ_DATE_QTY);
4020: msc_sch_wb.atp_debug('adding to fst_src_peg f');
4021: MSC_ATP_PROC.number_arr_cat(l_demand_class_atp_flag, MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG);
4022:
4023: IF l_overall_status in (MSC_ATP_PVT.ALLSUCCESS,
4024: MSC_ATP_PVT.ATP_REQ_DATE_FAIL,

Line 4029: msc_sch_wb.atp_debug('have date. l_date_higher_src: ' || l_date_higher_src);

4025: MSC_ATP_PVT.GROUPEL_ERROR,
4026: MSC_ATP_PVT.ATP_ACCEPT_FAIL)
4027: THEN
4028: l_date_higher_src := 'Y';
4029: msc_sch_wb.atp_debug('have date. l_date_higher_src: ' || l_date_higher_src);
4030: END IF;
4031: -- cleanup only if not arrival set
4032: --3720018 , Global array MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC is used to append records
4033: -- in case of ATP Inquiry. This global array will be used to call remove_invalid_sd_rec

Line 4070: msc_sch_wb.atp_debug('Schedule: ' || 'l_fst_src_pegging_ids.count'|| l_fst_src_pegging_ids.count);

4066: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4067:
4068: IF j = l_sources.source_type.count THEN
4069: IF PG_DEBUG in ('Y', 'C') THEN
4070: msc_sch_wb.atp_debug('Schedule: ' || 'l_fst_src_pegging_ids.count'|| l_fst_src_pegging_ids.count);
4071: END IF;
4072:
4073: -- dsting 2741997
4074: IF l_ship_count > 1 THEN

Line 4092: msc_sch_wb.atp_debug('Schedule: ' || 'In case 1');

4088: -- dsting case 1 => multi_scenario = 1.
4089: -- multi_scenario is always 0 since complete_scatp is disabled
4090: -- case 1
4091: IF PG_DEBUG in ('Y', 'C') THEN
4092: msc_sch_wb.atp_debug('Schedule: ' || 'In case 1');
4093: END IF;
4094: IF ((l_atp_rec.error_code = ALLSUCCESS) AND
4095: (l_sources.Preferred(j) = 1))
4096: OR (l_atp_rec.error_code = ATP_NOT_APPL) THEN

Line 4107: msc_sch_wb.atp_debug('Schedule: ' || 'bug 1225631');

4103: IF (l_arrival_count > 1 AND k = l_arrival_count) OR
4104: (l_ship_count > 1 AND i = l_ship_count) OR
4105: (l_ship_count = 1 AND l_arrival_count = 1) THEN
4106: IF PG_DEBUG in ('Y', 'C') THEN
4107: msc_sch_wb.atp_debug('Schedule: ' || 'bug 1225631');
4108: END IF;
4109:
4110: -- ROLLBACK to SAVEPOINT start_atp;
4111: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP

Line 4113: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');

4109:
4110: -- ROLLBACK to SAVEPOINT start_atp;
4111: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4112: IF PG_DEBUG in ('Y', 'C') THEN
4113: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4114: END IF;
4115: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4116: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4117: p_instance_id,

Line 4130: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 7');

4126: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4127: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4128: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4129: IF PG_DEBUG in ('Y', 'C') THEN
4130: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 7');
4131: END IF;
4132:
4133: END IF;
4134: END IF;

Line 4217: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');

4213: -- 1072816 need to do something to undo
4214:
4215: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4216: IF PG_DEBUG in ('Y', 'C') THEN
4217: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4218: END IF;
4219: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4220: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4221: p_instance_id,

Line 4234: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 8');

4230: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4231: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4232: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4233: IF PG_DEBUG in ('Y', 'C') THEN
4234: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 8');
4235: END IF;
4236:
4237: END IF;
4238: END IF;

Line 4285: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 9');

4281: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4282: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4283: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4284: IF PG_DEBUG in ('Y', 'C') THEN
4285: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 9');
4286: END IF;
4287: END IF;
4288:
4289: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN

Line 4302: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');

4298: -- 1072816 need to do something to undo
4299:
4300: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4301: IF PG_DEBUG in ('Y', 'C') THEN
4302: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4303: END IF;
4304: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4305: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4306: p_instance_id,

Line 4319: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 10');

4315: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4316: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4317: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4318: IF PG_DEBUG in ('Y', 'C') THEN
4319: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 10');
4320: END IF;
4321:
4322: END IF;
4323:

Line 4349: msc_sch_wb.atp_debug('Schedule: ' || 'l_overall_status = ALLSUCCESS');

4345: IF i = l_ship_count THEN
4346: IF l_overall_status = ALLSUCCESS THEN
4347:
4348: IF PG_DEBUG in ('Y', 'C') THEN
4349: msc_sch_wb.atp_debug('Schedule: ' || 'l_overall_status = ALLSUCCESS');
4350: END IF;
4351:
4352: l_temp_atp_table := l_atp_table;
4353:

Line 4358: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count > 1');

4354: IF l_ship_count > 1 THEN
4355: -- ship set case
4356: -- the curr one is sucessful
4357: IF PG_DEBUG in ('Y', 'C') THEN
4358: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count > 1');
4359: END IF;
4360:
4361: l_temp_atp_period := l_curr_atp_period;
4362: l_temp_atp_supply_demand := l_curr_atp_supply_demand;

Line 4365: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of (l_ship_count > 1)');

4361: l_temp_atp_period := l_curr_atp_period;
4362: l_temp_atp_supply_demand := l_curr_atp_supply_demand;
4363: ELSE
4364: IF PG_DEBUG in ('Y', 'C') THEN
4365: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of (l_ship_count > 1)');
4366: END IF;
4367:
4368: -- single line (do not need to consider arrival set here)
4369: l_temp_atp_period := l_atp_period;

Line 4380: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of l_overall_status = ALLSUCCESS');

4376: -- we need to know if we got a date or not, and we need to know
4377: -- if l_temp_atp_table is empty or not
4378:
4379: IF PG_DEBUG in ('Y', 'C') THEN
4380: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of l_overall_status = ALLSUCCESS');
4381: END IF;
4382:
4383: IF l_ship_count > 1 THEN
4384:

Line 4386: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count > 1');

4382:
4383: IF l_ship_count > 1 THEN
4384:
4385: IF PG_DEBUG in ('Y', 'C') THEN
4386: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count > 1');
4387: END IF;
4388:
4389: -- this is a set
4390: IF (l_group_date IS NOT NULL) AND

Line 4394: msc_sch_wb.atp_debug('Schedule: ' || 'in the l_group_date is not null and l_arr_no_date = Y');

4390: IF (l_group_date IS NOT NULL) AND
4391: (l_arr_no_date = 'Y') THEN
4392:
4393: IF PG_DEBUG in ('Y', 'C') THEN
4394: msc_sch_wb.atp_debug('Schedule: ' || 'in the l_group_date is not null and l_arr_no_date = Y');
4395: END IF;
4396: l_temp_atp_table := l_atp_table;
4397: l_temp_atp_period := l_curr_atp_period;
4398: l_temp_atp_supply_demand := l_curr_atp_supply_demand;

Line 4402: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSIF j = 1 of (l_group_date is not null and l_arr_no_date = Y)');

4398: l_temp_atp_supply_demand := l_curr_atp_supply_demand;
4399: l_arr_no_date := 'N';
4400: ELSIF j = 1 THEN -- this is the first warehouse
4401: IF PG_DEBUG in ('Y', 'C') THEN
4402: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSIF j = 1 of (l_group_date is not null and l_arr_no_date = Y)');
4403: END IF;
4404: l_temp_atp_table := l_atp_table;
4405: l_temp_atp_period := l_curr_atp_period;
4406: l_temp_atp_supply_demand := l_curr_atp_supply_demand;

Line 4413: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of (l_ship_count > 1)');

4409:
4410: ELSE
4411:
4412: IF PG_DEBUG in ('Y', 'C') THEN
4413: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of (l_ship_count > 1)');
4414: END IF;
4415:
4416: -- this is a line
4417: IF (l_atp_rec.ship_date IS NOT NULL) AND

Line 4420: msc_sch_wb.atp_debug('Schedule: ' || 'in the l_atp_rec.ship_date is not null and l_arr_no_date = Y');

4416: -- this is a line
4417: IF (l_atp_rec.ship_date IS NOT NULL) AND
4418: (l_arr_no_date = 'Y') THEN
4419: IF PG_DEBUG in ('Y', 'C') THEN
4420: msc_sch_wb.atp_debug('Schedule: ' || 'in the l_atp_rec.ship_date is not null and l_arr_no_date = Y');
4421: END IF;
4422: l_temp_atp_table := l_atp_table;
4423: l_temp_atp_period := l_atp_period;
4424: l_temp_atp_supply_demand := l_atp_supply_demand;

Line 4428: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSIF j = 1 of (l_group_date is not null and l_arr_no_date = Y)');

4424: l_temp_atp_supply_demand := l_atp_supply_demand;
4425: l_arr_no_date := 'N';
4426: ELSIF j = 1 THEN -- this is the first warehouse
4427: IF PG_DEBUG in ('Y', 'C') THEN
4428: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSIF j = 1 of (l_group_date is not null and l_arr_no_date = Y)');
4429: END IF;
4430: l_temp_atp_table := l_atp_table;
4431: l_temp_atp_period := l_atp_period;
4432: l_temp_atp_supply_demand := l_atp_supply_demand;

Line 4470: msc_sch_wb.atp_debug('Schedule: ' || 'Reset Destination INV_CTP '

4466: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;
4467: -- End ATP4drp
4468: MSC_ATP_PVT.G_ALLOCATION_METHOD := l_allocation_method;
4469: IF PG_DEBUG in ('Y', 'C') THEN
4470: msc_sch_wb.atp_debug('Schedule: ' || 'Reset Destination INV_CTP '
4471: || MSC_ATP_PVT.G_INV_CTP);
4472: END IF;
4473: -- The local variables were assigned at the beginning of the Loop
4474: -- Values should be reset after every ship-set row.

Line 4502: msc_sch_wb.atp_debug('Schedule: ' || 'I am here!!!');

4498:
4499: IF (l_temp_atp_table.Action.COUNT > 0) THEN
4500:
4501: IF PG_DEBUG in ('Y', 'C') THEN
4502: msc_sch_wb.atp_debug('Schedule: ' || 'I am here!!!');
4503: END IF;
4504: -- we need to assign oe_flag for oe to indicate which
4505: -- scenario they should show to users if we return multiple
4506: -- scenarios. Now we need to pick one which is inside the

Line 4588: msc_sch_wb.atp_debug('Schedule: ' || 'before k := p_atp_table.Arrival_Set_Name.NEXT(i)');

4584: END IF;
4585: END IF;
4586:
4587: IF PG_DEBUG in ('Y', 'C') THEN
4588: msc_sch_wb.atp_debug('Schedule: ' || 'before k := p_atp_table.Arrival_Set_Name.NEXT(i)');
4589: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
4590: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
4591: END IF;
4592:

Line 4589: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));

4585: END IF;
4586:
4587: IF PG_DEBUG in ('Y', 'C') THEN
4588: msc_sch_wb.atp_debug('Schedule: ' || 'before k := p_atp_table.Arrival_Set_Name.NEXT(i)');
4589: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
4590: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
4591: END IF;
4592:
4593: IF l_arrival_count > 1 THEN

Line 4590: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));

4586:
4587: IF PG_DEBUG in ('Y', 'C') THEN
4588: msc_sch_wb.atp_debug('Schedule: ' || 'before k := p_atp_table.Arrival_Set_Name.NEXT(i)');
4589: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
4590: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
4591: END IF;
4592:
4593: IF l_arrival_count > 1 THEN
4594: k := p_atp_table.Arrival_Set_Name.NEXT(k);

Line 4600: msc_sch_wb.atp_debug('Schedule: ' || 'after k := p_atp_table.Arrival_Set_Name.NEXT(i)');

4596: k := null;
4597: END IF;
4598:
4599: IF PG_DEBUG in ('Y', 'C') THEN
4600: msc_sch_wb.atp_debug('Schedule: ' || 'after k := p_atp_table.Arrival_Set_Name.NEXT(i)');
4601: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
4602: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
4603: END IF;
4604:

Line 4601: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));

4597: END IF;
4598:
4599: IF PG_DEBUG in ('Y', 'C') THEN
4600: msc_sch_wb.atp_debug('Schedule: ' || 'after k := p_atp_table.Arrival_Set_Name.NEXT(i)');
4601: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
4602: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
4603: END IF;
4604:
4605: l_temp_atp_supply_demand := l_null_atp_supply_demand;

Line 4602: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));

4598:
4599: IF PG_DEBUG in ('Y', 'C') THEN
4600: msc_sch_wb.atp_debug('Schedule: ' || 'after k := p_atp_table.Arrival_Set_Name.NEXT(i)');
4601: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
4602: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
4603: END IF;
4604:
4605: l_temp_atp_supply_demand := l_null_atp_supply_demand;
4606: l_temp_atp_period := l_null_atp_period;

Line 4637: msc_sch_wb.atp_debug('Schedule: 2259824 l_group_date = '||

4633: IF l_arrival_count > 1 and p_atp_table.quantity_ordered(1) <> 0 THEN
4634: -- Bug 2259824
4635: l_group_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
4636: IF PG_DEBUG in ('Y', 'C') THEN
4637: msc_sch_wb.atp_debug('Schedule: 2259824 l_group_date = '||
4638: to_char(l_group_date, 'DD-MON-YYYY HH24:MI:SS'));
4639: END IF;
4640:
4641: IF l_multi_scenario = 1 THEN

Line 4644: msc_sch_wb.atp_debug('Schedule: ' || 'print data from l_temp_arr_atp_table');

4640:
4641: IF l_multi_scenario = 1 THEN
4642:
4643: IF PG_DEBUG in ('Y', 'C') THEN
4644: msc_sch_wb.atp_debug('Schedule: ' || 'print data from l_temp_arr_atp_table');
4645: i := l_temp_arr_atp_table.Action.FIRST;
4646: WHILE i IS NOT NULL LOOP
4647: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||
4648: to_char(i) || '):'|| to_char(l_temp_arr_atp_table.Inventory_Item_Id(i)) );

Line 4647: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||

4643: IF PG_DEBUG in ('Y', 'C') THEN
4644: msc_sch_wb.atp_debug('Schedule: ' || 'print data from l_temp_arr_atp_table');
4645: i := l_temp_arr_atp_table.Action.FIRST;
4646: WHILE i IS NOT NULL LOOP
4647: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||
4648: to_char(i) || '):'|| to_char(l_temp_arr_atp_table.Inventory_Item_Id(i)) );
4649: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||
4650: to_char(l_temp_arr_atp_table.Source_Organization_Id(i)) );
4651: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||

Line 4649: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||

4645: i := l_temp_arr_atp_table.Action.FIRST;
4646: WHILE i IS NOT NULL LOOP
4647: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||
4648: to_char(i) || '):'|| to_char(l_temp_arr_atp_table.Inventory_Item_Id(i)) );
4649: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||
4650: to_char(l_temp_arr_atp_table.Source_Organization_Id(i)) );
4651: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||
4652: to_char(l_temp_arr_atp_table.Quantity_Ordered(i)) );
4653: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.OE_FLAG:' ||

Line 4651: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||

4647: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||
4648: to_char(i) || '):'|| to_char(l_temp_arr_atp_table.Inventory_Item_Id(i)) );
4649: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||
4650: to_char(l_temp_arr_atp_table.Source_Organization_Id(i)) );
4651: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||
4652: to_char(l_temp_arr_atp_table.Quantity_Ordered(i)) );
4653: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.OE_FLAG:' ||
4654: l_temp_arr_atp_table.OE_FLAG(i) );
4655: i := l_temp_arr_atp_table.Action.NEXT(i);

Line 4653: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.OE_FLAG:' ||

4649: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||
4650: to_char(l_temp_arr_atp_table.Source_Organization_Id(i)) );
4651: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||
4652: to_char(l_temp_arr_atp_table.Quantity_Ordered(i)) );
4653: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.OE_FLAG:' ||
4654: l_temp_arr_atp_table.OE_FLAG(i) );
4655: i := l_temp_arr_atp_table.Action.NEXT(i);
4656: END LOOP;
4657: END IF;

Line 4687: msc_sch_wb.atp_debug('Schedule: ' || 'working on group date');

4683: END LOOP;
4684:
4685: -- first scenario: populate group date
4686: IF PG_DEBUG in ('Y', 'C') THEN
4687: msc_sch_wb.atp_debug('Schedule: ' || 'working on group date');
4688: END IF;
4689: FOR i in 1..x_atp_table.Action.COUNT LOOP
4690: x_atp_table.Scenario_Id(i) := 1;
4691: END LOOP;

Line 4766: msc_sch_wb.atp_debug('Schedule: ' || 'in arrival set, oe case');

4762: -- multi_scenario = 0
4763: -- this is the OE case
4764: -- get the group date.
4765: IF PG_DEBUG in ('Y', 'C') THEN
4766: msc_sch_wb.atp_debug('Schedule: ' || 'in arrival set, oe case');
4767: END IF;
4768:
4769: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_temp_arr_atp_table,
4770: x_atp_table,

Line 4794: msc_sch_wb.atp_debug('Schedule: ' || 'l_group_date ='||

4790:
4791: -- 1072816 need to do something to undo
4792:
4793: IF PG_DEBUG in ('Y', 'C') THEN
4794: msc_sch_wb.atp_debug('Schedule: ' || 'l_group_date ='||
4795: to_char(l_group_date, 'DD-MON-YYYY HH24:MI:SS'));
4796: msc_sch_wb.atp_debug('Schedule: ' || 'p_atp_table.Requested_Arrival_Date(1) = '||
4797: to_char(p_atp_table.Requested_Arrival_Date(1), 'DD-MON-YYYY HH24:MI:SS'));
4798: END IF;

Line 4796: msc_sch_wb.atp_debug('Schedule: ' || 'p_atp_table.Requested_Arrival_Date(1) = '||

4792:
4793: IF PG_DEBUG in ('Y', 'C') THEN
4794: msc_sch_wb.atp_debug('Schedule: ' || 'l_group_date ='||
4795: to_char(l_group_date, 'DD-MON-YYYY HH24:MI:SS'));
4796: msc_sch_wb.atp_debug('Schedule: ' || 'p_atp_table.Requested_Arrival_Date(1) = '||
4797: to_char(p_atp_table.Requested_Arrival_Date(1), 'DD-MON-YYYY HH24:MI:SS'));
4798: END IF;
4799: -- dsting setproc
4800:

Line 4815: msc_sch_wb.atp_debug('Schedule: ' || 'before removing the data for arrival set');

4811: IF l_set_status <> ALLSUCCESS OR x_atp_table.action(1) = ATPQUERY
4812: THEN
4813: -- arrival set fails/ we need to remove demands
4814: IF PG_DEBUG in ('Y', 'C') THEN
4815: msc_sch_wb.atp_debug('Schedule: ' || 'before removing the data for arrival set');
4816: END IF;
4817:
4818: -- 2902265
4819: MSC_ATP_PROC.cleanup_set(p_instance_id,

Line 4826: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');

4822: l_demand_class_atp_flag);
4823: /*
4824: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4825: IF PG_DEBUG in ('Y', 'C') THEN
4826: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4827: END IF;
4828: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4829: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4830: p_instance_id,

Line 4842: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 12');

4838: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4839: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4840: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4841: IF PG_DEBUG in ('Y', 'C') THEN
4842: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 12');
4843: END IF;
4844: ELSE
4845: IF PG_DEBUG in ('Y', 'C') THEN
4846: msc_sch_wb.atp_debug('arrival set succeeded');

Line 4846: msc_sch_wb.atp_debug('arrival set succeeded');

4842: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 12');
4843: END IF;
4844: ELSE
4845: IF PG_DEBUG in ('Y', 'C') THEN
4846: msc_sch_wb.atp_debug('arrival set succeeded');
4847: END IF;
4848: -- dsting setproc
4849:
4850: -- 2902265

Line 4883: msc_sch_wb.atp_debug('Schedule: Debug l_inv_ctp ' || l_inv_ctp);

4879: -- preserved back, as it was updated to 0 in the begining in case of reschedule.
4880:
4881: ---bug 2384224
4882: IF PG_DEBUG in ('Y', 'C') THEN
4883: msc_sch_wb.atp_debug('Schedule: Debug l_inv_ctp ' || l_inv_ctp);
4884: msc_sch_wb.atp_debug('Schedule: Debug G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
4885: msc_sch_wb.atp_debug('Schedule: Debug x_atp_table.Action(1)' || x_atp_table.Action(1));
4886: END IF;
4887: IF /*(l_inv_ctp = 4) AND */ (x_atp_table.Action(1) = DEMANDMODIFY OR --3720018, commented for support of rescheduling in ODS

Line 4884: msc_sch_wb.atp_debug('Schedule: Debug G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);

4880:
4881: ---bug 2384224
4882: IF PG_DEBUG in ('Y', 'C') THEN
4883: msc_sch_wb.atp_debug('Schedule: Debug l_inv_ctp ' || l_inv_ctp);
4884: msc_sch_wb.atp_debug('Schedule: Debug G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
4885: msc_sch_wb.atp_debug('Schedule: Debug x_atp_table.Action(1)' || x_atp_table.Action(1));
4886: END IF;
4887: IF /*(l_inv_ctp = 4) AND */ (x_atp_table.Action(1) = DEMANDMODIFY OR --3720018, commented for support of rescheduling in ODS
4888: x_atp_table.Action(1) = DEMANDADD OR

Line 4885: msc_sch_wb.atp_debug('Schedule: Debug x_atp_table.Action(1)' || x_atp_table.Action(1));

4881: ---bug 2384224
4882: IF PG_DEBUG in ('Y', 'C') THEN
4883: msc_sch_wb.atp_debug('Schedule: Debug l_inv_ctp ' || l_inv_ctp);
4884: msc_sch_wb.atp_debug('Schedule: Debug G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
4885: msc_sch_wb.atp_debug('Schedule: Debug x_atp_table.Action(1)' || x_atp_table.Action(1));
4886: END IF;
4887: IF /*(l_inv_ctp = 4) AND */ (x_atp_table.Action(1) = DEMANDMODIFY OR --3720018, commented for support of rescheduling in ODS
4888: x_atp_table.Action(1) = DEMANDADD OR
4889: x_atp_table.Action(1) = DMDRSVADD) THEN

Line 4904: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');

4900: END LOOP; */
4901:
4902: IF NVL(x_atp_table.error_code(1), -1) not in (0, 61) THEN --3720018
4903: IF PG_DEBUG in ('Y', 'C') THEN
4904: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
4905: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
4906: END IF;
4907:
4908: -- rajjain single call to Undo_Delete_Row procedure --3720018

Line 4905: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');

4901:
4902: IF NVL(x_atp_table.error_code(1), -1) not in (0, 61) THEN --3720018
4903: IF PG_DEBUG in ('Y', 'C') THEN
4904: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
4905: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
4906: END IF;
4907:
4908: -- rajjain single call to Undo_Delete_Row procedure --3720018
4909: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

Line 4939: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');

4935: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
4936: );
4937:
4938: IF PG_DEBUG in ('Y', 'C') THEN
4939: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
4940: END IF;
4941:
4942: ELSE -- For summary enhancement
4943:

Line 4960: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

4956:
4957: --Changes for Bug 3629191 : Population of Offset data in Global Records.
4958:
4959: IF PG_DEBUG in ('Y', 'C') THEN
4960: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
4961: END IF;
4962:
4963: IF l_delete_atp_rec.del_demand_ids IS NOT NULL and l_delete_atp_rec.del_demand_ids.COUNT > 0 THEN
4964: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 4969: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_demand_ids ' || l_delete_atp_rec.del_demand_ids.count);

4965: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_demand_ids.count);
4966: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_demand_ids.count);
4967: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_demand_ids.count);
4968: IF PG_DEBUG in ('Y', 'C') THEN
4969: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_demand_ids ' || l_delete_atp_rec.del_demand_ids.count);
4970: END IF;
4971: FOR i in 1..l_delete_atp_rec.del_demand_ids.count LOOP
4972: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := p_instance_id;
4973: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_demand_ids(i);

Line 4979: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

4975: END LOOP;
4976: END IF;
4977:
4978: IF PG_DEBUG in ('Y', 'C') THEN
4979: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
4980: END IF;
4981:
4982: IF l_delete_atp_rec.del_atp_peg_demands IS NOT NULL and l_delete_atp_rec.del_atp_peg_demands.COUNT > 0 THEN
4983: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 4988: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_demands.count ' || l_delete_atp_rec.del_atp_peg_demands.count);

4984: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_demands.count);
4985: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_demands.count);
4986: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_demands.count);
4987: IF PG_DEBUG in ('Y', 'C') THEN
4988: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_demands.count ' || l_delete_atp_rec.del_atp_peg_demands.count);
4989: END IF;
4990: FOR i in 1..l_delete_atp_rec.del_atp_peg_demands.count LOOP
4991: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_demand_instance_id(i);
4992: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_demands(i);

Line 4998: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

4994: END LOOP;
4995: END IF;
4996:
4997: IF PG_DEBUG in ('Y', 'C') THEN
4998: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
4999: END IF;
5000:
5001: IF l_delete_atp_rec.del_atp_peg_supplies IS NOT NULL and l_delete_atp_rec.del_atp_peg_supplies.COUNT > 0 THEN
5002: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5007: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_supplies.count ' || l_delete_atp_rec.del_atp_peg_supplies.count );

5003: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_supplies.count);
5004: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_supplies.count);
5005: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_supplies.count);
5006: IF PG_DEBUG in ('Y', 'C') THEN
5007: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_supplies.count ' || l_delete_atp_rec.del_atp_peg_supplies.count );
5008: END IF;
5009: FOR i in 1..l_delete_atp_rec.del_atp_peg_supplies.count LOOP
5010: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_supply_instance_id(i);
5011: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_supplies(i);

Line 5017: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5013: END LOOP;
5014: END IF;
5015:
5016: IF PG_DEBUG in ('Y', 'C') THEN
5017: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5018: END IF;
5019:
5020: IF l_delete_atp_rec.del_atp_peg_res_reqs IS NOT NULL and l_delete_atp_rec.del_atp_peg_res_reqs.COUNT > 0 THEN
5021: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5026: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_res_reqs.count ' || l_delete_atp_rec.del_atp_peg_res_reqs.count );

5022: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5023: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5024: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5025: IF PG_DEBUG in ('Y', 'C') THEN
5026: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_res_reqs.count ' || l_delete_atp_rec.del_atp_peg_res_reqs.count );
5027: END IF;
5028: FOR i in 1..l_delete_atp_rec.del_atp_peg_res_reqs.count LOOP
5029: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_res_instance_id(i);
5030: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_res_reqs(i);

Line 5037: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5033: END IF;
5034: --3720018
5035:
5036: IF PG_DEBUG in ('Y', 'C') THEN
5037: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5038: END IF;
5039:
5040: --Changes for Bug 3629191: Population of Offset data in Global record ends.
5041:

Line 5047: msc_sch_wb.atp_debug('Schedule: ' || 'Model present in Set Creating ATP Pegging');

5043: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET = 1 THEN
5044:
5045: -- ATP request successfull, create atp pegging
5046: IF PG_DEBUG in ('Y', 'C') THEN
5047: msc_sch_wb.atp_debug('Schedule: ' || 'Model present in Set Creating ATP Pegging');
5048: END IF;
5049:
5050: FOR i in 1..x_atp_table.inventory_item_id.COUNT LOOP
5051: IF ((x_atp_table.ATO_Model_Line_Id(i) IS NOT NULL) AND

Line 5062: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');

5058: -- plan_id > 0 and pegging has been generated.
5059: (x_atp_table.End_Pegging_Id(i) IS NOT NULL) ) THEN
5060:
5061: IF PG_DEBUG in ('Y', 'C') THEN
5062: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5063: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5064: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5065: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5066: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));

Line 5063: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );

5059: (x_atp_table.End_Pegging_Id(i) IS NOT NULL) ) THEN
5060:
5061: IF PG_DEBUG in ('Y', 'C') THEN
5062: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5063: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5064: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5065: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5066: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5067: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));

Line 5064: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));

5060:
5061: IF PG_DEBUG in ('Y', 'C') THEN
5062: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5063: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5064: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5065: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5066: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5067: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));
5068: END IF;

Line 5065: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));

5061: IF PG_DEBUG in ('Y', 'C') THEN
5062: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5063: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5064: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5065: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5066: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5067: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));
5068: END IF;
5069:

Line 5066: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));

5062: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5063: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5064: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5065: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5066: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5067: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));
5068: END IF;
5069:
5070: MSC_ATP_PEG.Create_Atp_Pegging (

Line 5067: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));

5063: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5064: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5065: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5066: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5067: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));
5068: END IF;
5069:
5070: MSC_ATP_PEG.Create_Atp_Pegging (
5071: x_atp_table.End_Pegging_Id(i),

Line 5081: msc_sch_wb.atp_debug('Schedule: No Call to Create_Atp_Pegging ');

5077: l_return_status
5078: );
5079: ELSE
5080: IF PG_DEBUG in ('Y', 'C') THEN
5081: msc_sch_wb.atp_debug('Schedule: No Call to Create_Atp_Pegging ');
5082: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5083: END IF;
5084:
5085: -- End Bug 3334643

Line 5082: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );

5078: );
5079: ELSE
5080: IF PG_DEBUG in ('Y', 'C') THEN
5081: msc_sch_wb.atp_debug('Schedule: No Call to Create_Atp_Pegging ');
5082: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5083: END IF;
5084:
5085: -- End Bug 3334643
5086:

Line 5125: msc_sch_wb.atp_debug('Schedule: Unscheduling...');

5121: -- Mark moved ELSE and END IF to here from the previous MARK point.
5122: ELSE
5123:
5124: IF PG_DEBUG in ('Y', 'C') THEN
5125: msc_sch_wb.atp_debug('Schedule: Unscheduling...');
5126: END IF;
5127:
5128: --Changes for Bug 3629191 : Population of Offset data in Global Records.
5129:

Line 5133: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5129:
5130: --3720018, arrays to be refered from l_delete_atp_rec.
5131:
5132: IF PG_DEBUG in ('Y', 'C') THEN
5133: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5134: END IF;
5135:
5136: IF l_delete_atp_rec.del_demand_ids IS NOT NULL and l_delete_atp_rec.del_demand_ids.COUNT > 0 THEN
5137: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5142: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_demand_ids ' || l_delete_atp_rec.del_demand_ids.count);

5138: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_demand_ids.count);
5139: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_demand_ids.count);
5140: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_demand_ids.count);
5141: IF PG_DEBUG in ('Y', 'C') THEN
5142: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_demand_ids ' || l_delete_atp_rec.del_demand_ids.count);
5143: END IF;
5144: FOR i in 1..l_delete_atp_rec.del_demand_ids.count LOOP
5145: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := p_instance_id;
5146: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_demand_ids(i);

Line 5153: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5149: END IF;
5150:
5151:
5152: IF PG_DEBUG in ('Y', 'C') THEN
5153: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5154: END IF;
5155:
5156: IF l_delete_atp_rec.del_atp_peg_demands IS NOT NULL and l_delete_atp_rec.del_atp_peg_demands.COUNT > 0 THEN
5157: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5162: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_demands.count ' || l_delete_atp_rec.del_atp_peg_demands.count);

5158: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_demands.count);
5159: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_demands.count);
5160: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_demands.count);
5161: IF PG_DEBUG in ('Y', 'C') THEN
5162: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_demands.count ' || l_delete_atp_rec.del_atp_peg_demands.count);
5163: END IF;
5164: FOR i in 1..l_delete_atp_rec.del_atp_peg_demands.count LOOP
5165: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_demand_instance_id(i);
5166: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_demands(i);

Line 5173: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5169: END IF;
5170:
5171:
5172: IF PG_DEBUG in ('Y', 'C') THEN
5173: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5174: END IF;
5175:
5176: IF l_delete_atp_rec.del_atp_peg_supplies IS NOT NULL and l_delete_atp_rec.del_atp_peg_supplies.COUNT > 0 THEN
5177: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5182: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_supplies.count ' || l_delete_atp_rec.del_atp_peg_supplies.count );

5178: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_supplies.count);
5179: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_supplies.count);
5180: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_supplies.count);
5181: IF PG_DEBUG in ('Y', 'C') THEN
5182: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_supplies.count ' || l_delete_atp_rec.del_atp_peg_supplies.count );
5183: END IF;
5184: FOR i in 1..l_delete_atp_rec.del_atp_peg_supplies.count LOOP
5185: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_supply_instance_id(i);
5186: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_supplies(i);

Line 5193: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5189: END IF;
5190:
5191:
5192: IF PG_DEBUG in ('Y', 'C') THEN
5193: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5194: END IF;
5195:
5196: IF l_delete_atp_rec.del_atp_peg_res_reqs IS NOT NULL and l_delete_atp_rec.del_atp_peg_res_reqs.COUNT > 0 THEN
5197: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5202: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_res_reqs.count ' || l_delete_atp_rec.del_atp_peg_res_reqs.count );

5198: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5199: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5200: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5201: IF PG_DEBUG in ('Y', 'C') THEN
5202: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_res_reqs.count ' || l_delete_atp_rec.del_atp_peg_res_reqs.count );
5203: END IF;
5204: FOR i in 1..l_delete_atp_rec.del_atp_peg_res_reqs.count LOOP
5205: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_res_instance_id(i);
5206: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_res_reqs(i);

Line 5211: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5207: MSC_ATP_PVT.G_OFF_PLAN_ID(l_count + i) := l_delete_atp_rec.atp_peg_res_reqs_plan_ids(i);
5208: END LOOP;
5209: END IF;
5210: IF PG_DEBUG in ('Y', 'C') THEN
5211: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5212: END IF;
5213: --3720018
5214:
5215: --Changes for Bug 3629191: Population of Offset data in Global record ends.

Line 5226: msc_sch_wb.atp_debug('Schedule: Model in set : ' ||

5222: IF (x_atp_table.Action(1) = DEMANDMODIFY OR
5223: x_atp_table.Action(1) = DEMANDADD OR
5224: x_atp_table.Action(1) = DMDRSVADD) THEN
5225: IF PG_DEBUG in ('Y', 'C') THEN
5226: msc_sch_wb.atp_debug('Schedule: Model in set : ' ||
5227: MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET);
5228: END IF;
5229:
5230: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET = 1 THEN

Line 5239: msc_sch_wb.atp_debug('End Pegging Id Pegging Identifier : ' ||

5235: (x_atp_table.identifier(i) = NVL(x_atp_table.ATO_Model_Line_Id(i), 0))) THEN
5236:
5237:
5238: IF PG_DEBUG in ('Y', 'C') THEN
5239: msc_sch_wb.atp_debug('End Pegging Id Pegging Identifier : ' ||
5240: x_atp_table.End_Pegging_Id(i));
5241: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
5242: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5243: x_atp_table.ATO_Model_Line_Id(i));

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

5237:
5238: IF PG_DEBUG in ('Y', 'C') THEN
5239: msc_sch_wb.atp_debug('End Pegging Id Pegging Identifier : ' ||
5240: x_atp_table.End_Pegging_Id(i));
5241: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
5242: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5243: x_atp_table.ATO_Model_Line_Id(i));
5244: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||
5245: x_atp_table.Config_item_line_id(i));

Line 5242: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||

5238: IF PG_DEBUG in ('Y', 'C') THEN
5239: msc_sch_wb.atp_debug('End Pegging Id Pegging Identifier : ' ||
5240: x_atp_table.End_Pegging_Id(i));
5241: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
5242: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5243: x_atp_table.ATO_Model_Line_Id(i));
5244: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||
5245: x_atp_table.Config_item_line_id(i));
5246: msc_sch_wb.atp_debug('Old Plan Id : ' || l_old_plan_id(i));

Line 5244: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||

5240: x_atp_table.End_Pegging_Id(i));
5241: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
5242: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5243: x_atp_table.ATO_Model_Line_Id(i));
5244: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||
5245: x_atp_table.Config_item_line_id(i));
5246: msc_sch_wb.atp_debug('Old Plan Id : ' || l_old_plan_id(i));
5247: END IF;
5248:

Line 5246: msc_sch_wb.atp_debug('Old Plan Id : ' || l_old_plan_id(i));

5242: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5243: x_atp_table.ATO_Model_Line_Id(i));
5244: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||
5245: x_atp_table.Config_item_line_id(i));
5246: msc_sch_wb.atp_debug('Old Plan Id : ' || l_old_plan_id(i));
5247: END IF;
5248:
5249: DELETE from msc_atp_pegging
5250: WHERE plan_id = l_old_plan_id(i)

Line 5256: msc_sch_wb.atp_debug('Schedule: Number of rows deleted '||

5252: NVL( x_atp_table.Config_item_line_id(i), -1),
5253: x_atp_table.ATO_Model_Line_Id(i) );
5254:
5255: IF PG_DEBUG in ('Y', 'C') THEN
5256: msc_sch_wb.atp_debug('Schedule: Number of rows deleted '||
5257: ' from Atp Pegging ' || SQL%ROWCOUNT);
5258: END IF;
5259: END IF;
5260: END LOOP;

Line 5269: msc_sch_wb.atp_debug('**********End Schedule Procedure************');

5265:
5266: END IF; -- end if action = ATPQUERY or DEMANDADD or DEMANDMODIFY
5267: -- commit;
5268: IF PG_DEBUG in ('Y', 'C') THEN
5269: msc_sch_wb.atp_debug('**********End Schedule Procedure************');
5270: END IF;
5271:
5272: EXCEPTION
5273:

Line 5279: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

5275: x_return_status := FND_API.G_RET_STS_ERROR;
5276:
5277: -- Resetting global variables for additional issue encountered while bug 3295831
5278: IF PG_DEBUG in ('Y', 'C') THEN
5279: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
5280: END IF;
5281: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
5282: -- ATP4drp re-set using original profile value
5283: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 5295: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

5291: -- 2625800: krajan
5292: ---agilent arrival set bug
5293: IF l_arrival_count > 1 THEN
5294: IF PG_DEBUG in ('Y', 'C') THEN
5295: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
5296: END IF;
5297: --for arrivalset l_atp_table contains only the record that we are processing
5298: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
5299: ---first we add the record we have processed so far

Line 5306: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

5302: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
5303: --now we assign rest of the record.
5304: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
5305: IF PG_DEBUG in ('Y', 'C') THEN
5306: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
5307: END IF;
5308: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
5309: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
5310: END LOOP;

Line 5316: msc_sch_wb.atp_debug('Schedule: NO_DATA_FOUND: Stmt = '||l_stmt);

5312: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status );
5313: END IF;
5314:
5315: IF PG_DEBUG in ('Y', 'C') THEN
5316: msc_sch_wb.atp_debug('Schedule: NO_DATA_FOUND: Stmt = '||l_stmt);
5317: END IF;
5318: -- 1072816 need to do something to undo
5319:
5320: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP

Line 5322: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop, i:='||i);

5318: -- 1072816 need to do something to undo
5319:
5320: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
5321: IF PG_DEBUG in ('Y', 'C') THEN
5322: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop, i:='||i);
5323: END IF;
5324: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(MSC_ATP_PVT.G_PEGGING_FOR_SET(i), p_instance_id,
5325: l_plan_id, UNDO, MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(i),l_return_status);
5326: END LOOP;

Line 5339: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 13');

5335: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
5336: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
5337: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
5338: IF PG_DEBUG in ('Y', 'C') THEN
5339: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 13');
5340: msc_sch_wb.atp_debug('Schedule: ' || 'after the fix to remove the data');
5341: END IF;
5342:
5343: -- Bug 1661545, if scheduling was unsuccessful, make sure that old demand record is

Line 5340: msc_sch_wb.atp_debug('Schedule: ' || 'after the fix to remove the data');

5336: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
5337: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
5338: IF PG_DEBUG in ('Y', 'C') THEN
5339: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 13');
5340: msc_sch_wb.atp_debug('Schedule: ' || 'after the fix to remove the data');
5341: END IF;
5342:
5343: -- Bug 1661545, if scheduling was unsuccessful, make sure that old demand record is
5344: -- preserved back, as it was updated to 0 in the begining in case of reschedule.

Line 5351: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

5347: x_atp_table.Action(1) = DEMANDADD OR
5348: x_atp_table.Action(1) = DMDRSVADD) THEN
5349:
5350: IF PG_DEBUG in ('Y', 'C') THEN
5351: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
5352: END IF;
5353:
5354: -- Loop thru the whole set to check if any of the records had failed Scheduling
5355: -- Update demands to reset the quantity and date in such cases

Line 5360: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');

5356: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
5357:
5358: --bug 2384224: un delete only those demands which are deleted
5359: IF PG_DEBUG in ('Y', 'C') THEN
5360: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5361: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5362: END IF;
5363:
5364: -- rajjain single call to Undo_Delete_Row procedure

Line 5361: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');

5357:
5358: --bug 2384224: un delete only those demands which are deleted
5359: IF PG_DEBUG in ('Y', 'C') THEN
5360: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5361: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5362: END IF;
5363:
5364: -- rajjain single call to Undo_Delete_Row procedure
5365: --3720018,changes to refer all the records from l_delete_atp_rec

Line 5396: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');

5392: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
5393: );
5394:
5395: IF PG_DEBUG in ('Y', 'C') THEN
5396: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
5397: END IF;
5398:
5399: /* --s_cto_rearch
5400: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 5416: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

5412: x_return_status := FND_API.G_RET_STS_ERROR;
5413:
5414: -- Resetting global variables for additional issue encountered while bug 3295831
5415: IF PG_DEBUG in ('Y', 'C') THEN
5416: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
5417: END IF;
5418: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
5419: -- ATP4drp re-set using original profile value
5420: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 5429: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

5425: -- 2625800: krajan
5426: ---agilent arrival set bug
5427: IF l_arrival_count > 1 THEN
5428: IF PG_DEBUG in ('Y', 'C') THEN
5429: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
5430: END IF;
5431: --for arrivalset l_atp_table contains only the record that we are processing
5432: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
5433: ---first we add the record we have processed so far

Line 5440: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

5436: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
5437: --now we assign rest of the record.
5438: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
5439: IF PG_DEBUG in ('Y', 'C') THEN
5440: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
5441: END IF;
5442: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
5443: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
5444: END LOOP;

Line 5473: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

5469: l_tmp_pegging_id := -1; --Setting to error
5470: END;
5471: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
5472: IF PG_DEBUG in ('Y', 'C') THEN
5473: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');
5474: END IF;
5475: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,
5476: l_plan_id, UNDO, 1,l_return_status);
5477: END IF;

Line 5492: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

5488: x_atp_table.Action(1) = DEMANDADD OR
5489: x_atp_table.Action(1) = DMDRSVADD) THEN
5490:
5491: IF PG_DEBUG in ('Y', 'C') THEN
5492: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
5493: END IF;
5494:
5495: -- Loop thru the whole set to check if any of the records had failed Scheduling
5496: -- Update demands to reset the quantity and date in such cases

Line 5501: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');

5497: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
5498:
5499: --bug 2384224: un delete only those demands which are deleted
5500: IF PG_DEBUG in ('Y', 'C') THEN
5501: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5502: msc_sch_wb.atp_debug('Schedule: ' || 'single call to Undo_Delete_Row');
5503: END IF;
5504: -- rajjain single call to Undo_Delete_Row procedure
5505: --3720018,changes to refer all the records from l_delete_atp_rec

Line 5502: msc_sch_wb.atp_debug('Schedule: ' || 'single call to Undo_Delete_Row');

5498:
5499: --bug 2384224: un delete only those demands which are deleted
5500: IF PG_DEBUG in ('Y', 'C') THEN
5501: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5502: msc_sch_wb.atp_debug('Schedule: ' || 'single call to Undo_Delete_Row');
5503: END IF;
5504: -- rajjain single call to Undo_Delete_Row procedure
5505: --3720018,changes to refer all the records from l_delete_atp_rec
5506: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

Line 5536: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');

5532: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
5533: );
5534:
5535: IF PG_DEBUG in ('Y', 'C') THEN
5536: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
5537: END IF;
5538:
5539: /* --s_cto_rearch
5540: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 5556: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

5552: -- Error Handling Insert krajan
5553: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
5554:
5555: IF PG_DEBUG in ('Y', 'C') THEN
5556: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5557: msc_sch_wb.atp_debug('Schedule: Invalid Object Found. In it');
5558: END IF;
5559: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5560:

Line 5557: msc_sch_wb.atp_debug('Schedule: Invalid Object Found. In it');

5553: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
5554:
5555: IF PG_DEBUG in ('Y', 'C') THEN
5556: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5557: msc_sch_wb.atp_debug('Schedule: Invalid Object Found. In it');
5558: END IF;
5559: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5560:
5561: -- Resetting global variables for additional issue encountered while bug 3295831

Line 5563: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

5559: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5560:
5561: -- Resetting global variables for additional issue encountered while bug 3295831
5562: IF PG_DEBUG in ('Y', 'C') THEN
5563: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
5564: END IF;
5565: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
5566: -- ATP4drp re-set using original profile value
5567: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 5576: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

5572: -- 2625800: krajan
5573: ---agilent arrival set bug
5574: IF l_arrival_count > 1 THEN
5575: IF PG_DEBUG in ('Y', 'C') THEN
5576: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
5577: END IF;
5578: --for arrivalset l_atp_table contains only the record that we are processing
5579: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
5580: ---first we add the record we have processed so far

Line 5587: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

5583: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
5584: --now we assign rest of the record.
5585: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
5586: IF PG_DEBUG in ('Y', 'C') THEN
5587: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
5588: END IF;
5589: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
5590: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
5591: END LOOP;

Line 5614: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR :invalid obj');

5610: AND record_type in (3,4);
5611: EXCEPTION
5612: WHEN others then
5613: IF PG_DEBUG in ('Y', 'C') THEN
5614: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR :invalid obj');
5615: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5616: END IF;
5617: l_tmp_pegging_id := -1; --Setting to error
5618: END;

Line 5615: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

5611: EXCEPTION
5612: WHEN others then
5613: IF PG_DEBUG in ('Y', 'C') THEN
5614: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR :invalid obj');
5615: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5616: END IF;
5617: l_tmp_pegging_id := -1; --Setting to error
5618: END;
5619: IF PG_DEBUG in ('Y', 'C') THEN

Line 5620: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);

5616: END IF;
5617: l_tmp_pegging_id := -1; --Setting to error
5618: END;
5619: IF PG_DEBUG in ('Y', 'C') THEN
5620: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
5621: END IF;
5622: IF (NVL(l_tmp_pegging_id, -1) <> -1) THEN
5623: IF PG_DEBUG in ('Y', 'C') THEN
5624: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

Line 5624: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

5620: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
5621: END IF;
5622: IF (NVL(l_tmp_pegging_id, -1) <> -1) THEN
5623: IF PG_DEBUG in ('Y', 'C') THEN
5624: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');
5625: END IF;
5626: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,
5627: l_plan_id, UNDO, 1,l_return_status);
5628: END IF;

Line 5641: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

5637: x_atp_table.Action(1) = DEMANDADD OR
5638: x_atp_table.Action(1) = DMDRSVADD) THEN
5639:
5640: IF PG_DEBUG in ('Y', 'C') THEN
5641: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
5642: END IF;
5643:
5644: -- Loop thru the whole set to check if any of the records had failed Scheduling
5645: -- Update demands to reset the quantity and date in such cases

Line 5650: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');

5646: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
5647:
5648: --bug 2384224: un delete only those demands which are deleted
5649: IF PG_DEBUG in ('Y', 'C') THEN
5650: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5651: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5652: END IF;
5653: -- rajjain single call to Undo_Delete_Row procedure
5654: --3720018,changes to refer all the records from l_delete_atp_rec

Line 5651: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');

5647:
5648: --bug 2384224: un delete only those demands which are deleted
5649: IF PG_DEBUG in ('Y', 'C') THEN
5650: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5651: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5652: END IF;
5653: -- rajjain single call to Undo_Delete_Row procedure
5654: --3720018,changes to refer all the records from l_delete_atp_rec
5655: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

Line 5685: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');

5681: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
5682: );
5683:
5684: IF PG_DEBUG in ('Y', 'C') THEN
5685: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
5686: END IF;
5687:
5688: /*--s_cto_rearch
5689: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 5698: msc_sch_wb.atp_debug('Schedule: Invalid object encountered in schedule');

5694: --e_cto_rearch
5695: */
5696: END IF;
5697: IF PG_DEBUG in ('Y', 'C') THEN
5698: msc_sch_wb.atp_debug('Schedule: Invalid object encountered in schedule');
5699: END IF;
5700:
5701: -- Added to handle calendar exceptions : ship_rec_cal
5702: WHEN NO_MATCHING_DATE_IN_CAL THEN

Line 5704: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

5700:
5701: -- Added to handle calendar exceptions : ship_rec_cal
5702: WHEN NO_MATCHING_DATE_IN_CAL THEN
5703: IF PG_DEBUG in ('Y', 'C') THEN
5704: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5705: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
5706: END IF;
5707: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5708:

Line 5705: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');

5701: -- Added to handle calendar exceptions : ship_rec_cal
5702: WHEN NO_MATCHING_DATE_IN_CAL THEN
5703: IF PG_DEBUG in ('Y', 'C') THEN
5704: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5705: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
5706: END IF;
5707: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5708:
5709: -- Resetting global variables for additional issue encountered while bug 3295831

Line 5711: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

5707: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5708:
5709: -- Resetting global variables for additional issue encountered while bug 3295831
5710: IF PG_DEBUG in ('Y', 'C') THEN
5711: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
5712: END IF;
5713: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
5714: -- ATP4drp re-set using original profile value
5715: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 5728: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

5724: -- 2625800: krajan
5725: ---agilent arrival set bug
5726: IF l_arrival_count > 1 THEN
5727: IF PG_DEBUG in ('Y', 'C') THEN
5728: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
5729: END IF;
5730: --for arrivalset l_atp_table contains only the record that we are processing
5731: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
5732: ---first we add the record we have processed so far

Line 5739: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

5735: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
5736: --now we assign rest of the record.
5737: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
5738: IF PG_DEBUG in ('Y', 'C') THEN
5739: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
5740: END IF;
5741: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
5742: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
5743: END LOOP;

Line 5768: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');

5764: AND record_type in (3,4);
5765: EXCEPTION
5766: WHEN others then
5767: IF PG_DEBUG in ('Y', 'C') THEN
5768: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
5769: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5770: END IF;
5771: l_tmp_pegging_id := -1; --Setting to error
5772: END;

Line 5769: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

5765: EXCEPTION
5766: WHEN others then
5767: IF PG_DEBUG in ('Y', 'C') THEN
5768: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
5769: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5770: END IF;
5771: l_tmp_pegging_id := -1; --Setting to error
5772: END;
5773: IF PG_DEBUG in ('Y', 'C') THEN

Line 5774: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);

5770: END IF;
5771: l_tmp_pegging_id := -1; --Setting to error
5772: END;
5773: IF PG_DEBUG in ('Y', 'C') THEN
5774: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
5775: END IF;
5776: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
5777: IF PG_DEBUG in ('Y', 'C') THEN
5778: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

Line 5778: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

5774: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
5775: END IF;
5776: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
5777: IF PG_DEBUG in ('Y', 'C') THEN
5778: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');
5779: END IF;
5780: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,
5781: l_plan_id, UNDO, 1,l_return_status);
5782: END IF;

Line 5793: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

5789: x_atp_table.Action(1) = DEMANDADD OR
5790: x_atp_table.Action(1) = DMDRSVADD) THEN
5791:
5792: IF PG_DEBUG in ('Y', 'C') THEN
5793: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
5794: END IF;
5795:
5796: -- Loop thru the whole set to check if any of the records had failed Scheduling
5797: -- Update demands to reset the quantity and date in such cases

Line 5802: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');

5798: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
5799:
5800: --bug 2384224: un delete only those demands which are deleted
5801: IF PG_DEBUG in ('Y', 'C') THEN
5802: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5803: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5804: END IF;
5805: -- rajjain single call to Undo_Delete_Row procedure
5806: --3720018,changes to refer all the records from l_delete_atp_rec

Line 5803: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');

5799:
5800: --bug 2384224: un delete only those demands which are deleted
5801: IF PG_DEBUG in ('Y', 'C') THEN
5802: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5803: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5804: END IF;
5805: -- rajjain single call to Undo_Delete_Row procedure
5806: --3720018,changes to refer all the records from l_delete_atp_rec
5807: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

Line 5837: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');

5833: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
5834: );
5835:
5836: IF PG_DEBUG in ('Y', 'C') THEN
5837: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
5838: END IF;
5839:
5840: /* --s_cto_rearch
5841: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 5853: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

5849: END IF;
5850:
5851: WHEN OTHERS THEN
5852: IF PG_DEBUG in ('Y', 'C') THEN
5853: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5854: END IF;
5855: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5856:
5857: -- Resetting global variables for additional issue encountered while bug 3295831

Line 5859: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

5855: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5856:
5857: -- Resetting global variables for additional issue encountered while bug 3295831
5858: IF PG_DEBUG in ('Y', 'C') THEN
5859: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
5860: END IF;
5861: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
5862: -- ATP4drp re-set using original profile value
5863: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 5876: msc_sch_wb.atp_debug('Schedule: ' || 'l_msg_name := ' || l_msg_name);

5872: l_msg_name := NULL;
5873: ELSE
5874: fnd_message.parse_encoded(l_encoded_text, l_msg_app, l_msg_name);
5875: IF PG_DEBUG in ('Y', 'C') THEN
5876: msc_sch_wb.atp_debug('Schedule: ' || 'l_msg_name := ' || l_msg_name);
5877: END IF;
5878: END IF;
5879: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
5880: l_error_code := NO_MATCHING_CAL_DATE;

Line 5882: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_CAL_DATE ' );

5878: END IF;
5879: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
5880: l_error_code := NO_MATCHING_CAL_DATE;
5881: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705
5882: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_CAL_DATE ' );
5883: END IF;
5884: ELSE
5885: l_error_code := ATP_PROCESSING_ERROR;
5886: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705

Line 5887: msc_sch_wb.atp_debug('Schedule: ' || 'ATP_PROCESSING_ERROR ' );

5883: END IF;
5884: ELSE
5885: l_error_code := ATP_PROCESSING_ERROR;
5886: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705
5887: msc_sch_wb.atp_debug('Schedule: ' || 'ATP_PROCESSING_ERROR ' );
5888: END IF;
5889: END IF;
5890:
5891: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 5899: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

5895: -- 2625800: krajan
5896: ---agilent arrival set bug
5897: IF l_arrival_count > 1 THEN
5898: IF PG_DEBUG in ('Y', 'C') THEN
5899: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
5900: END IF;
5901: --for arrivalset l_atp_table contains only the record that we are processing
5902: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
5903: ---first we add the record we have processed so far

Line 5910: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

5906: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
5907: --now we assign rest of the record.
5908: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
5909: IF PG_DEBUG in ('Y', 'C') THEN
5910: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
5911: END IF;
5912: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
5913: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
5914: END LOOP;

Line 5940: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR: others ');

5936: AND record_type in (3,4);
5937: EXCEPTION
5938: WHEN others then
5939: IF PG_DEBUG in ('Y', 'C') THEN
5940: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR: others ');
5941: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5942: END IF;
5943: l_tmp_pegging_id := -1; --Setting to error
5944: END;

Line 5941: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

5937: EXCEPTION
5938: WHEN others then
5939: IF PG_DEBUG in ('Y', 'C') THEN
5940: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR: others ');
5941: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5942: END IF;
5943: l_tmp_pegging_id := -1; --Setting to error
5944: END;
5945: IF PG_DEBUG in ('Y', 'C') THEN

Line 5946: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);

5942: END IF;
5943: l_tmp_pegging_id := -1; --Setting to error
5944: END;
5945: IF PG_DEBUG in ('Y', 'C') THEN
5946: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
5947: END IF;
5948: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
5949: IF PG_DEBUG in ('Y', 'C') THEN
5950: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

Line 5950: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

5946: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
5947: END IF;
5948: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
5949: IF PG_DEBUG in ('Y', 'C') THEN
5950: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');
5951: END IF;
5952: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(l_tmp_pegging_id, null,
5953: l_plan_id, UNDO, 1,l_return_status);
5954: END IF;

Line 5965: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

5961: x_atp_table.Action(1) = DEMANDADD OR
5962: x_atp_table.Action(1) = DMDRSVADD) THEN
5963:
5964: IF PG_DEBUG in ('Y', 'C') THEN
5965: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
5966: END IF;
5967:
5968: -- Loop thru the whole set to check if any of the records had failed Scheduling
5969: -- Update demands to reset the quantity and date in such cases

Line 5974: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');

5970: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
5971:
5972: --bug 2384224: un delete only those demands which are deleted
5973: IF PG_DEBUG in ('Y', 'C') THEN
5974: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5975: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5976: END IF;
5977: -- rajjain single call to Undo_Delete_Row procedure
5978: --3720018,changes to refer all the records from l_delete_atp_rec

Line 5975: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');

5971:
5972: --bug 2384224: un delete only those demands which are deleted
5973: IF PG_DEBUG in ('Y', 'C') THEN
5974: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5975: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5976: END IF;
5977: -- rajjain single call to Undo_Delete_Row procedure
5978: --3720018,changes to refer all the records from l_delete_atp_rec
5979: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

Line 6009: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');

6005: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
6006: );
6007:
6008: IF PG_DEBUG in ('Y', 'C') THEN
6009: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
6010: END IF;
6011:
6012: /* --s_cto_rearch
6013: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 6290: msc_sch_wb.atp_debug('**********Begin ATP_Check Procedure************');

6286: l_net_demand_qty NUMBER; --5598066
6287:
6288: BEGIN
6289: IF PG_DEBUG in ('Y', 'C') THEN
6290: msc_sch_wb.atp_debug('**********Begin ATP_Check Procedure************');
6291: END IF;
6292:
6293: -- initialize API return status to success
6294: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 6299: msc_sch_wb.atp_debug('in atp_check');

6295:
6296: -- initialize the error_code to ALLSUCCESS
6297: p_atp_record.error_code := ALLSUCCESS;
6298: IF PG_DEBUG in ('Y', 'C') THEN
6299: msc_sch_wb.atp_debug('in atp_check');
6300: END IF;
6301:
6302: -- print the record
6303: IF PG_DEBUG in ('Y', 'C') THEN

Line 6304: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');

6300: END IF;
6301:
6302: -- print the record
6303: IF PG_DEBUG in ('Y', 'C') THEN
6304: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6305: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6306: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );

Line 6305: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );

6301:
6302: -- print the record
6303: IF PG_DEBUG in ('Y', 'C') THEN
6304: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6305: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6306: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );

Line 6306: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );

6302: -- print the record
6303: IF PG_DEBUG in ('Y', 'C') THEN
6304: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6305: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6306: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );

Line 6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );

6303: IF PG_DEBUG in ('Y', 'C') THEN
6304: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6305: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6306: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );

Line 6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );

6304: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6305: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6306: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );

Line 6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );

6305: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6306: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );

Line 6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );

6306: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );

Line 6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );

6307: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );

Line 6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );

6308: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );

Line 6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );

6309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );

Line 6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );

6310: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );

Line 6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );

6311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );

Line 6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );

6312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );

Line 6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );

6313: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973

Line 6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );

6314: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );

Line 6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );

6315: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );

Line 6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );

6316: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );

Line 6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973

6317: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );

Line 6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );

6318: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );

Line 6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );

6319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );

Line 6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );

6320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

Line 6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );

6321: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);

Line 6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );

6322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6330: -- 2462661 : krajan

Line 6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );

6323: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6330: -- 2462661 : krajan
6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);

Line 6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

6324: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6330: -- 2462661 : krajan
6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);

Line 6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);

6325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6330: -- 2462661 : krajan
6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);

Line 6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);

6327: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6330: -- 2462661 : krajan
6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);

Line 6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);

6328: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6330: -- 2462661 : krajan
6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);

Line 6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);

6329: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6330: -- 2462661 : krajan
6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);

Line 6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);

6330: -- 2462661 : krajan
6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);

Line 6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);

6331: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);

Line 6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);

6332: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);

Line 6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);

6333: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);

Line 6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);

6334: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);

Line 6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);

6335: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);

Line 6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);

6336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);

Line 6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);

6337: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);

Line 6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);

6338: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);

Line 6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);

6339: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);

Line 6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);

6340: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6348: -- ship_rec_cal

Line 6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);

6341: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6348: -- ship_rec_cal
6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);

Line 6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);

6342: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6348: -- ship_rec_cal
6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);

Line 6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);

6343: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6344: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6348: -- ship_rec_cal
6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);

Line 6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);

6345: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6348: -- ship_rec_cal
6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro

Line 6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);

6346: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6348: -- ship_rec_cal
6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6354: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

Line 6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);

6347: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6348: -- ship_rec_cal
6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6354: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6355: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012

Line 6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);

6348: -- ship_rec_cal
6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6354: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6355: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6356: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');

Line 6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro

6349: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6354: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6355: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6356: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');
6357: END IF;

Line 6354: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

6350: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6354: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6355: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6356: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');
6357: END IF;
6358:

Line 6355: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012

6351: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6354: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6355: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6356: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');
6357: END IF;
6358:
6359: -- dsting

Line 6356: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');

6352: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6353: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6354: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6355: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6356: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');
6357: END IF;
6358:
6359: -- dsting
6360: p_atp_record.children_type := NO_MAKE_BUY_CHILDREN;

Line 6382: msc_sch_wb.atp_debug('ATP_Check: Sys Next Date is: ' || l_sys_next_date);

6378: l_sys_next_date := MSC_CALENDAR.NEXT_WORK_DAY(p_atp_record.manufacturing_cal_code, -- use OMC
6379: p_atp_record.instance_id,
6380: l_trunc_sysdate);
6381: IF PG_DEBUG in ('Y', 'C') THEN
6382: msc_sch_wb.atp_debug('ATP_Check: Sys Next Date is: ' || l_sys_next_date);
6383: END IF;
6384: /* To support new logic for dependent demands allocation in time phased PF rule based AATP scenarios
6385: Reset global variable*/
6386: MSC_ATP_PVT.G_TIME_PHASED_PF_ENABLED := 'N';

Line 6392: msc_sch_wb.atp_debug('ATP_Check: ' || 'do atp check at an inventory org');

6388: IF (NVL(p_atp_record.supplier_id, -1) = -1) THEN
6389: -- doing atp check in an inventory org
6390:
6391: IF PG_DEBUG in ('Y', 'C') THEN
6392: msc_sch_wb.atp_debug('ATP_Check: ' || 'do atp check at an inventory org');
6393: END IF;
6394:
6395: -- krajan : 2462661 : post fix
6396: -- set the global variable to null

Line 6419: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Time Phased ATP for this item *** ');

6415: -- If dealing with Time Phased ATP Item set the global for CTO_PF
6416: MSC_ATP_PVT.G_CTO_PF_ATP := 'Y';
6417:
6418: IF PG_DEBUG in ('Y', 'C') THEN
6419: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Time Phased ATP for this item *** ');
6420: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATF Date := ' || p_atp_record.atf_date);
6421: msc_sch_wb.atp_debug('ATP_Check: Re-set G_CTO_PF_ATP to ' ||
6422: MSC_ATP_PVT.G_CTO_PF_ATP);
6423: END IF;

Line 6420: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATF Date := ' || p_atp_record.atf_date);

6416: MSC_ATP_PVT.G_CTO_PF_ATP := 'Y';
6417:
6418: IF PG_DEBUG in ('Y', 'C') THEN
6419: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Time Phased ATP for this item *** ');
6420: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATF Date := ' || p_atp_record.atf_date);
6421: msc_sch_wb.atp_debug('ATP_Check: Re-set G_CTO_PF_ATP to ' ||
6422: MSC_ATP_PVT.G_CTO_PF_ATP);
6423: END IF;
6424: -- CTO_PF_PRJ changes for CTO PF Cross Project Impacts

Line 6421: msc_sch_wb.atp_debug('ATP_Check: Re-set G_CTO_PF_ATP to ' ||

6417:
6418: IF PG_DEBUG in ('Y', 'C') THEN
6419: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Time Phased ATP for this item *** ');
6420: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATF Date := ' || p_atp_record.atf_date);
6421: msc_sch_wb.atp_debug('ATP_Check: Re-set G_CTO_PF_ATP to ' ||
6422: MSC_ATP_PVT.G_CTO_PF_ATP);
6423: END IF;
6424: -- CTO_PF_PRJ changes for CTO PF Cross Project Impacts
6425: ELSE

Line 6431: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Product Family(non-time phased) ATP for this item *** ');

6427: l_time_phased_atp := 'N';
6428: l_request_item_id := p_atp_record.inventory_item_id;
6429:
6430: IF PG_DEBUG in ('Y', 'C') THEN
6431: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Product Family(non-time phased) ATP for this item *** ');
6432: END IF;
6433: END IF;
6434: END IF;
6435:

Line 6437: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_TIME_PHASED_PF_ENABLED := ' || MSC_ATP_PVT.G_TIME_PHASED_PF_ENABLED);

6433: END IF;
6434: END IF;
6435:
6436: IF PG_DEBUG in ('Y', 'C') THEN
6437: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_TIME_PHASED_PF_ENABLED := ' || MSC_ATP_PVT.G_TIME_PHASED_PF_ENABLED);
6438: END IF;
6439:
6440: /* Now we store member item's info in G_ITEM_INFO_REC (C_ITEM_INFO_REC)
6441: PF_ITEM_INFO_REC is used to store family item's info*/

Line 6453: msc_sch_wb.atp_debug('This models atp flag = Y. We are coming here for second time');

6449: IF NVL(p_atp_record.parent_item_id, -1) = p_atp_record.inventory_item_id THEN
6450: -- if we are rechecking model as atp flag = 'Y' then
6451: -- we should recheck model's attribute so that model flags are set correctly.
6452: IF PG_DEBUG in ('Y', 'C') THEN
6453: msc_sch_wb.atp_debug('This models atp flag = Y. We are coming here for second time');
6454: END IF;
6455: MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id := null;
6456: END IF;
6457: --e_cto_rearch

Line 6472: msc_sch_wb.atp_debug('ATP_Check: ' || 'Local Rec Inst. '||PF_ITEM_INFO_REC.instance_id);

6468: /* Now get family item's info*/
6469: IF (l_family_item_id = G_ITEM_INFO_REC.sr_inv_item_id) THEN
6470: PF_ITEM_INFO_REC := G_ITEM_INFO_REC;
6471: IF PG_DEBUG in ('Y', 'C') THEN
6472: msc_sch_wb.atp_debug('ATP_Check: ' || 'Local Rec Inst. '||PF_ITEM_INFO_REC.instance_id);
6473: END IF;
6474: ELSE
6475: --s_cto_rearch
6476: PF_ITEM_INFO_REC.parent_pegging_id := p_parent_pegging_id;

Line 6520: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);

6516:
6517: /* Modularize Item and Org Info */
6518:
6519: IF PG_DEBUG in ('Y', 'C') THEN
6520: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
6521: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
6522: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
6523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
6524: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);

Line 6521: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);

6517: /* Modularize Item and Org Info */
6518:
6519: IF PG_DEBUG in ('Y', 'C') THEN
6520: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
6521: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
6522: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
6523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
6524: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
6525: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);

Line 6522: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);

6518:
6519: IF PG_DEBUG in ('Y', 'C') THEN
6520: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
6521: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
6522: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
6523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
6524: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
6525: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
6526: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149

Line 6523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);

6519: IF PG_DEBUG in ('Y', 'C') THEN
6520: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
6521: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
6522: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
6523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
6524: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
6525: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
6526: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149
6527: END IF;

Line 6524: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);

6520: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
6521: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
6522: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
6523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
6524: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
6525: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
6526: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149
6527: END IF;
6528:

Line 6525: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);

6521: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
6522: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
6523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
6524: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
6525: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
6526: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149
6527: END IF;
6528:
6529: -- 2462661 : krajan

Line 6526: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149

6522: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
6523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
6524: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
6525: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
6526: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149
6527: END IF;
6528:
6529: -- 2462661 : krajan
6530: -- Check to see if the item is uncollected.

Line 6534: msc_sch_wb.atp_debug ('Checking for uncollected item ' );

6530: -- Check to see if the item is uncollected.
6531: -- If we get here, then it means that the item is not ATPABle.
6532: -- If we defer, then error out
6533: IF PG_DEBUG in ('Y', 'C') THEN
6534: msc_sch_wb.atp_debug ('Checking for uncollected item ' );
6535: end if;
6536: if (MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID is not NULL) AND
6537: (NVL(p_atp_record.src_atp_flag,'N') <> 'N') then
6538: IF PG_DEBUG in ('Y', 'C') THEN

Line 6539: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Not Collected as flags differ');

6535: end if;
6536: if (MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID is not NULL) AND
6537: (NVL(p_atp_record.src_atp_flag,'N') <> 'N') then
6538: IF PG_DEBUG in ('Y', 'C') THEN
6539: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Not Collected as flags differ');
6540: END IF;
6541: p_atp_record.error_code := ATP_ITEM_NOT_COLLECTED;
6542:
6543: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;

Line 6550: msc_sch_wb.atp_debug('ATP_Check: ' || 'C_ITEM_INFO_REC atp_rule_id := '

6546: /************ Bug 1510853 ATP Rule Check ************/
6547: -- Initialize the rule flag
6548: G_ATP_RULE_FLAG := 'Y';
6549: IF PG_DEBUG in ('Y', 'C') THEN
6550: msc_sch_wb.atp_debug('ATP_Check: ' || 'C_ITEM_INFO_REC atp_rule_id := '
6551: || NVL(C_ITEM_INFO_REC.atp_rule_id, 0));
6552: END IF;
6553: IF ((G_INV_CTP = 5) AND (C_ITEM_INFO_REC.atp_rule_id IS NULL)) THEN
6554: G_ATP_RULE_FLAG := 'N'; -- Rule not found at item level.

Line 6556: msc_sch_wb.atp_debug('ATP_Check: ' || ' NO ATP RULE FOR ITEM ');

6552: END IF;
6553: IF ((G_INV_CTP = 5) AND (C_ITEM_INFO_REC.atp_rule_id IS NULL)) THEN
6554: G_ATP_RULE_FLAG := 'N'; -- Rule not found at item level.
6555: IF PG_DEBUG in ('Y', 'C') THEN
6556: msc_sch_wb.atp_debug('ATP_Check: ' || ' NO ATP RULE FOR ITEM ');
6557: END IF;
6558: END IF;
6559: /************ Bug 1510853 ATP Rule Check ************/
6560:

Line 6569: msc_sch_wb.atp_debug('delivery lead time is not specified');

6565: -- get the default delivery_lead_time if it is not specified.
6566: -- dsting dlt
6567: IF (NVL(p_atp_record.delivery_lead_time, -1) = -1 ) THEN
6568:
6569: msc_sch_wb.atp_debug('delivery lead time is not specified');
6570:
6571: -- if we can not get the lead time from sourcing,
6572: -- we need to find the default between locations.
6573:

Line 6605: msc_sch_wb.atp_debug('ATP_Check: Nothing passed');

6601: l_order_line_id := NULL;
6602: l_location_id := p_atp_record.to_location_id;
6603: ELSE
6604: IF PG_DEBUG in ('Y', 'C') THEN
6605: msc_sch_wb.atp_debug('ATP_Check: Nothing passed');
6606: END IF;
6607: END IF;
6608:
6609: -- cchen : changes for ship method

Line 6635: msc_sch_wb.atp_debug('rounded l_delivery_lead_time: ' || l_delivery_lead_time);

6631:
6632: -- dsting dlt Round delivery lead time up
6633: l_delivery_lead_time := CEIL(l_delivery_lead_time);
6634: IF PG_DEBUG in ('Y', 'C') THEN
6635: msc_sch_wb.atp_debug('rounded l_delivery_lead_time: ' || l_delivery_lead_time);
6636: END IF;
6637:
6638: -- BUG 1621816- We offset the delivery lead time instead of
6639: -- reducing it. To off set we use calender code of the target_org

Line 6678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_original_req_ship_date: '||l_original_req_ship_date);

6674: the request date
6675: */
6676: l_original_req_ship_date := nvl(p_atp_record.original_request_date,l_requested_ship_date);
6677: IF PG_DEBUG in ('Y', 'C') THEN
6678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_original_req_ship_date: '||l_original_req_ship_date);
6679: END IF;
6680:
6681: l_summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG;
6682: --- postprocess summary

Line 6691: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find out ATP_DEMAND_class flag for that item ');

6687: IF ((p_search = 1) and (p_parent_pegging_id is null)) THEN
6688: IF (MSC_ATP_PVT.G_INV_CTP = 5) AND (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN
6689: --- THIS IS OSD case, backward case, and top demand
6690: IF PG_DEBUG in ('Y', 'C') THEN
6691: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find out ATP_DEMAND_class flag for that item ');
6692: END IF;
6693:
6694: BEGIN
6695: SELECT NVL(r.demand_class_atp_flag, 0)

Line 6711: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_demand_class_flag : = ' || l_demand_class_flag);

6707: AND I.sr_instance_id = R.sr_instance_id
6708: AND R.rule_id = NVL(I.atp_rule_id, P.default_atp_rule_id);
6709:
6710: IF PG_DEBUG in ('Y', 'C') THEN
6711: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_demand_class_flag : = ' || l_demand_class_flag);
6712: END IF;
6713: EXCEPTION
6714: WHEN OTHERS THEN
6715: l_demand_class_flag := 0;

Line 6725: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);

6721: END IF;
6722: --- now extend the array which holds the demand_class atp_flag and add l_demand_class_flag to it
6723: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.EXTEND;
6724: IF PG_DEBUG in ('Y', 'C') THEN
6725: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
6726: END IF;
6727: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG( MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count) := l_demand_class_flag;
6728: END IF;
6729:

Line 6787: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sysdate ='||l_sysdate);

6783: p_atp_record.instance_id,
6784: sysdate), sysdate); */
6785:
6786: IF PG_DEBUG in ('Y', 'C') THEN
6787: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sysdate ='||l_sysdate);
6788: END IF;
6789: --END IF; Comment out atp_flag block
6790: -- Bugs 2020607, 2104018, 2031894, 1869748
6791:

Line 6796: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_method = '||l_ship_method ||' lead time = '||l_delivery_lead_time);

6792: p_atp_record.delivery_lead_time := l_delivery_lead_time;
6793: p_atp_record.ship_method := l_ship_method;
6794:
6795: IF PG_DEBUG in ('Y', 'C') THEN
6796: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_method = '||l_ship_method ||' lead time = '||l_delivery_lead_time);
6797: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date :=' || l_requested_ship_date);
6798: END IF;
6799:
6800: IF (l_atp_flag = 'N') and (l_atp_comp_flag = 'N') THEN

Line 6797: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date :=' || l_requested_ship_date);

6793: p_atp_record.ship_method := l_ship_method;
6794:
6795: IF PG_DEBUG in ('Y', 'C') THEN
6796: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_method = '||l_ship_method ||' lead time = '||l_delivery_lead_time);
6797: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date :=' || l_requested_ship_date);
6798: END IF;
6799:
6800: IF (l_atp_flag = 'N') and (l_atp_comp_flag = 'N') THEN
6801: IF PG_DEBUG in ('Y', 'C') THEN

Line 6802: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_flag and l_atp_comp_flag are both N');

6798: END IF;
6799:
6800: IF (l_atp_flag = 'N') and (l_atp_comp_flag = 'N') THEN
6801: IF PG_DEBUG in ('Y', 'C') THEN
6802: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_flag and l_atp_comp_flag are both N');
6803: END IF;
6804: p_atp_record.error_code := ATP_NOT_APPL;
6805:
6806: -- Bug 1916086, modified Schedule procedure to extend G_PEGGING_FOR_SET in case of

Line 6812: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');

6808: -- l_fst_src_pegging_ids would have same number of records.
6809:
6810: IF p_parent_pegging_id is null THEN
6811: IF PG_DEBUG in ('Y', 'C') THEN
6812: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
6813: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6814: END IF;
6815:
6816: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;

Line 6813: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

6809:
6810: IF p_parent_pegging_id is null THEN
6811: IF PG_DEBUG in ('Y', 'C') THEN
6812: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
6813: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6814: END IF;
6815:
6816: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
6817: IF PG_DEBUG in ('Y', 'C') THEN

Line 6818: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

6814: END IF;
6815:
6816: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
6817: IF PG_DEBUG in ('Y', 'C') THEN
6818: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6819: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
6820: END IF;
6821:
6822: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := null;

Line 6819: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');

6815:
6816: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
6817: IF PG_DEBUG in ('Y', 'C') THEN
6818: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6819: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
6820: END IF;
6821:
6822: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := null;
6823:

Line 6849: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

6845: -- Bug 2625791, 2623816: If it is a transfer case then We should take
6846: -- into consideration PTF date passed to us from the top organization.
6847: -- We should satisfy the damand as per the PTF date from the top org.
6848: IF PG_DEBUG in ('Y', 'C') THEN
6849: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6850: END IF;
6851:
6852: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on
6853: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');

Line 6856: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);

6852: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on
6853: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');
6854:
6855: IF PG_DEBUG in ('Y', 'C') THEN
6856: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);
6857: END IF;
6858:
6859: IF MSC_ATP_PVT.G_INV_CTP = 5 and C_ITEM_INFO_REC.bom_item_type = 1
6860: and C_ITEM_INFO_REC.replenish_to_ord_flag = 'Y'

Line 6880: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date < l_sysdate');

6876: --5160663, commenting out.
6877: /*
6878: IF l_requested_ship_date < GREATEST(l_sysdate,l_ato_date) THEN
6879: IF PG_DEBUG in ('Y', 'C') THEN
6880: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date < l_sysdate');
6881: END IF;
6882: p_atp_record.requested_date_quantity := 0.0;
6883: p_atp_record.ship_date := GREATEST(l_sysdate, MSC_ATP_PVT.G_PTF_DATE, l_ato_date);
6884: ELSE

Line 6886: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date >= l_sysdate');

6882: p_atp_record.requested_date_quantity := 0.0;
6883: p_atp_record.ship_date := GREATEST(l_sysdate, MSC_ATP_PVT.G_PTF_DATE, l_ato_date);
6884: ELSE
6885: IF PG_DEBUG in ('Y', 'C') THEN
6886: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date >= l_sysdate');
6887: END IF;
6888: p_atp_record.requested_date_quantity :=
6889: p_atp_record.quantity_ordered;
6890: p_atp_record.ship_date := GREATEST(l_requested_ship_date, MSC_ATP_PVT.G_PTF_DATE);

Line 6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date:='||

6920: END IF;
6921: */
6922:
6923: IF PG_DEBUG in ('Y', 'C') THEN
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date:='||
6925: p_atp_record.ship_date );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:='||
6927: p_atp_record.requested_date_quantity);
6928: END IF;

Line 6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:='||

6922:
6923: IF PG_DEBUG in ('Y', 'C') THEN
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date:='||
6925: p_atp_record.ship_date );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:='||
6927: p_atp_record.requested_date_quantity);
6928: END IF;
6929: p_atp_record.available_quantity := p_atp_record.quantity_ordered;
6930:

Line 6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.Calling_Module : '||p_atp_record.Calling_Module);

6937: -- shall always be yes in case of CTO, this situation may only occur at
6938: -- components level.
6939:
6940: IF PG_DEBUG in ('Y', 'C') THEN
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.Calling_Module : '||p_atp_record.Calling_Module);
6942: END IF;
6943:
6944: --s_cto_rearch
6945: /* bug 3564511: We do not need to add demand and pegging for non-atpable items

Line 6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');

6962: IF p_parent_pegging_id is null THEN
6963:
6964: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
6965: IF PG_DEBUG in ('Y', 'C') THEN
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
6970: END IF;

Line 6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

6963:
6964: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
6965: IF PG_DEBUG in ('Y', 'C') THEN
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
6970: END IF;
6971:

Line 6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

6964: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
6965: IF PG_DEBUG in ('Y', 'C') THEN
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
6970: END IF;
6971:
6972: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := null;

Line 6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');

6965: IF PG_DEBUG in ('Y', 'C') THEN
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
6970: END IF;
6971:
6972: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := null;
6973:

Line 7059: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||

7055: p_plan_id,
7056: l_demand_class_flag,
7057: l_demand_id);
7058: IF PG_DEBUG in ('Y', 'C') THEN
7059: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||
7060: l_demand_id);
7061: END IF;
7062:
7063:

Line 7080: msc_sch_wb.atp_debug('ATP_Check: ' || 'customer class or demand class : same calls');

7076: -- hierarchy changes due to arrival set
7077:
7078: IF (MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') THEN
7079: IF PG_DEBUG in ('Y', 'C') THEN
7080: msc_sch_wb.atp_debug('ATP_Check: ' || 'customer class or demand class : same calls');
7081: END IF;
7082:
7083: /* Modularize Item and Org Info */
7084: -- Re-Use info instead of making unnecessary call.

Line 7106: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Set_Alloc_Rule_Variables');

7102: l_return_status
7103: );
7104: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
7105: IF PG_DEBUG in ('Y', 'C') THEN
7106: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Set_Alloc_Rule_Variables');
7107: END IF;
7108: RAISE FND_API.G_EXC_ERROR;
7109: END IF;
7110:

Line 7128: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date = '||l_requested_ship_date);

7124: ELSE
7125: l_item_to_use := l_inv_item_id;
7126: END IF;
7127: IF PG_DEBUG in ('Y', 'C') THEN
7128: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date = '||l_requested_ship_date);
7129: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item to be used = '||l_item_to_use);
7130: END IF;
7131: /* New allocation logic for time_phased_atp changes end */
7132:

Line 7129: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item to be used = '||l_item_to_use);

7125: l_item_to_use := l_inv_item_id;
7126: END IF;
7127: IF PG_DEBUG in ('Y', 'C') THEN
7128: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date = '||l_requested_ship_date);
7129: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item to be used = '||l_item_to_use);
7130: END IF;
7131: /* New allocation logic for time_phased_atp changes end */
7132:
7133: p_atp_record.demand_class :=

Line 7146: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');

7142: p_atp_record.Demand_Class);
7143: --diag_atp
7144: l_allocation_rule_name := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
7145: IF PG_DEBUG in ('Y', 'C') THEN
7146: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');
7147: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);
7148: END IF;
7149:
7150: END IF;

Line 7147: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);

7143: --diag_atp
7144: l_allocation_rule_name := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
7145: IF PG_DEBUG in ('Y', 'C') THEN
7146: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');
7147: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);
7148: END IF;
7149:
7150: END IF;
7151: ---subst

Line 7160: msc_sch_wb.atp_debug('ATP_Check: ' || 'Original item, substitution');

7156: ---1) Backward case- we do not want to look for top item's availability as it is already been
7157: --- taken care of during breadth level item availability search in Check_atp-subst
7158: ---2) Forward: we do not want to look for item's availability in top org
7159: IF PG_DEBUG in ('Y', 'C') THEN
7160: msc_sch_wb.atp_debug('ATP_Check: ' || 'Original item, substitution');
7161: END IF;
7162: IF l_atp_comp_flag = 'N' THEN
7163: --- if ATP components flag is "N' and if it top level item then
7164: --- we cant make anything. Therefore, we set the l_re_date_qty to be zero

Line 7173: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward sch and not a top org, add demand');

7169: IF p_search = BACKWARD_SCHEDULING and NVL(p_atp_record.top_tier_org_flag, 2) = 2 THEN
7170: -- we add demand for only second tier org. Demand for first tier org has
7171: --- already been created while looking for substitute availability
7172: IF PG_DEBUG in ('Y', 'C') THEN
7173: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward sch and not a top org, add demand');
7174: END IF;
7175: l_atp_insert_rec.instance_id := p_atp_record.instance_id;
7176: /* Modularize Item and Org Info */
7177: -- time_phased_atp changes begin

Line 7208: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

7204: IF (NVL(p_atp_record.parent_item_id, p_atp_record.inventory_item_id) <> p_atp_record.inventory_item_id AND
7205: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN
7206: l_atp_insert_rec.origination_type := 47;
7207: IF PG_DEBUG in ('Y', 'C') THEN
7208: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7209: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7210: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7211: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7212: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 7209: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);

7205: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN
7206: l_atp_insert_rec.origination_type := 47;
7207: IF PG_DEBUG in ('Y', 'C') THEN
7208: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7209: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7210: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7211: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7212: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7213: END IF;

Line 7210: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);

7206: l_atp_insert_rec.origination_type := 47;
7207: IF PG_DEBUG in ('Y', 'C') THEN
7208: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7209: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7210: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7211: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7212: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7213: END IF;
7214: ELSE

Line 7211: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);

7207: IF PG_DEBUG in ('Y', 'C') THEN
7208: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7209: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7210: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7211: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7212: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7213: END IF;
7214: ELSE
7215: l_atp_insert_rec.origination_type := 1;

Line 7212: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

7208: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7209: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7210: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7211: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7212: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7213: END IF;
7214: ELSE
7215: l_atp_insert_rec.origination_type := 1;
7216: END IF;

Line 7262: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||

7258: l_demand_class_flag,
7259: l_demand_id);
7260:
7261: IF PG_DEBUG in ('Y', 'C') THEN
7262: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||
7263: l_demand_id);
7264: END IF;
7265:
7266: -- populate insert rec to pegging tree for this demand

Line 7356: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand := ' || l_net_demand);

7352:
7353: END IF;
7354: END IF;
7355: IF PG_DEBUG in ('Y', 'C') THEN
7356: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand := ' || l_net_demand);
7357: END IF;
7358:
7359: IF NVL(p_atp_record.top_tier_org_flag, 2) = 1 THEN
7360: --for top tier org l_pegging_id should be mapped to demand in

Line 7436: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id := ' || l_pegging_id);

7432: l_demand_id := p_atp_record.subs_demand_id; --5088719
7433:
7434: END IF;
7435: IF PG_DEBUG in ('Y', 'C') THEN
7436: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id := ' || l_pegging_id);
7437: END IF;
7438: /* Modularize Item and Org Info */
7439: -- Re-Use info instead of making unnecessary call.
7440: l_inv_item_name := C_ITEM_INFO_REC.item_name;

Line 7495: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE from parent := ' || MSC_ATP_PVT.G_PTF_DATE);

7491: --- availabilty on greatest of (PTF of parent , req_date)
7492: --- Here PTF_date is ptf date for parent i.e if we came here from get_comp_req then
7493: --- it is PTF for parent item. If we came here for transfer then PTF will be that of last org
7494: IF PG_DEBUG in ('Y', 'C') THEN
7495: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE from parent := ' || MSC_ATP_PVT.G_PTF_DATE);
7496: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
7497: END IF;
7498:
7499: --diag_atp

Line 7496: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);

7492: --- Here PTF_date is ptf date for parent i.e if we came here from get_comp_req then
7493: --- it is PTF for parent item. If we came here for transfer then PTF will be that of last org
7494: IF PG_DEBUG in ('Y', 'C') THEN
7495: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE from parent := ' || MSC_ATP_PVT.G_PTF_DATE);
7496: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
7497: END IF;
7498:
7499: --diag_atp
7500: l_get_mat_in_rec.rounding_control_flag := l_rounding_control_flag;

Line 7529: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);

7525: */
7526:
7527: l_parent_peg_forward := p_parent_pegging_id;
7528: IF PG_DEBUG in ('Y', 'C') THEN
7529: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);
7530: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);
7531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
7532: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);
7533: END IF;

Line 7530: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);

7526:
7527: l_parent_peg_forward := p_parent_pegging_id;
7528: IF PG_DEBUG in ('Y', 'C') THEN
7529: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);
7530: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);
7531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
7532: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);
7533: END IF;
7534:

Line 7531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);

7527: l_parent_peg_forward := p_parent_pegging_id;
7528: IF PG_DEBUG in ('Y', 'C') THEN
7529: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);
7530: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);
7531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
7532: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);
7533: END IF;
7534:
7535: l_get_mat_in_rec.parent_bom_item_type := p_atp_record.parent_bom_item_type;

Line 7532: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);

7528: IF PG_DEBUG in ('Y', 'C') THEN
7529: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);
7530: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);
7531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
7532: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);
7533: END IF;
7534:
7535: l_get_mat_in_rec.parent_bom_item_type := p_atp_record.parent_bom_item_type;
7536: l_get_mat_in_rec.bom_item_type := C_ITEM_INFO_REC.bom_item_type;

Line 7595: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Forward_Material_Atp **********');

7591:
7592: --- End Enhance CTO Phase 1 Req #17
7593: -- print the results from Get_Forward_Material_Atp
7594: IF PG_DEBUG in ('Y', 'C') THEN
7595: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Forward_Material_Atp **********');
7596: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
7597: END IF;
7598:
7599: ELSE -- IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1

Line 7596: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973

7592: --- End Enhance CTO Phase 1 Req #17
7593: -- print the results from Get_Forward_Material_Atp
7594: IF PG_DEBUG in ('Y', 'C') THEN
7595: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Forward_Material_Atp **********');
7596: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
7597: END IF;
7598:
7599: ELSE -- IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1
7600: -- time_phased_atp changes begin

Line 7649: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Material_Atp_Info **********');

7645: l_used_available_quantity := l_mat_atp_info_rec.atp_date_quantity_this_level;
7646:
7647: -- print the results from Get_Material_Atp_Info
7648: IF PG_DEBUG in ('Y', 'C') THEN
7649: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Material_Atp_Info **********');
7650: END IF;
7651:
7652: END IF; -- IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1
7653:

Line 7656: msc_sch_wb.atp_debug('p_search '||p_search);

7652: END IF; -- IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1
7653:
7654: -- Bug 3782472
7655: IF PG_DEBUG in ('Y', 'C') THEN
7656: msc_sch_wb.atp_debug('p_search '||p_search);
7657: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
7658: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
7659: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
7660: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);

Line 7657: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);

7653:
7654: -- Bug 3782472
7655: IF PG_DEBUG in ('Y', 'C') THEN
7656: msc_sch_wb.atp_debug('p_search '||p_search);
7657: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
7658: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
7659: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
7660: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);
7661: END IF;

Line 7658: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);

7654: -- Bug 3782472
7655: IF PG_DEBUG in ('Y', 'C') THEN
7656: msc_sch_wb.atp_debug('p_search '||p_search);
7657: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
7658: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
7659: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
7660: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);
7661: END IF;
7662: IF p_search = FORWARD_SCHEDULING AND

Line 7659: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);

7655: IF PG_DEBUG in ('Y', 'C') THEN
7656: msc_sch_wb.atp_debug('p_search '||p_search);
7657: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
7658: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
7659: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
7660: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);
7661: END IF;
7662: IF p_search = FORWARD_SCHEDULING AND
7663: l_requested_date_quantity >= p_atp_record.quantity_ordered and

Line 7660: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);

7656: msc_sch_wb.atp_debug('p_search '||p_search);
7657: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
7658: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
7659: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
7660: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);
7661: END IF;
7662: IF p_search = FORWARD_SCHEDULING AND
7663: l_requested_date_quantity >= p_atp_record.quantity_ordered and
7664: MSC_ATP_PVT.G_PTF_DATE > l_requested_ship_date THEN

Line 7674: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);

7670: greatest(l_requested_date_quantity, 0);
7671: END IF;
7672:
7673: IF PG_DEBUG in ('Y', 'C') THEN
7674: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
7675: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
7676: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);

Line 7675: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);

7671: END IF;
7672:
7673: IF PG_DEBUG in ('Y', 'C') THEN
7674: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
7675: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
7676: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7679: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);

Line 7676: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);

7672:
7673: IF PG_DEBUG in ('Y', 'C') THEN
7674: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
7675: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
7676: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7679: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
7680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);

Line 7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);

7673: IF PG_DEBUG in ('Y', 'C') THEN
7674: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
7675: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
7676: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7679: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
7680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
7681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);

Line 7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);

7674: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
7675: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
7676: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7679: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
7680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
7681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
7682: END IF;

Line 7679: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);

7675: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
7676: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7679: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
7680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
7681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
7682: END IF;
7683: ELSE

Line 7680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);

7676: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7679: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
7680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
7681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
7682: END IF;
7683: ELSE
7684: IF PG_DEBUG in ('Y', 'C') THEN

Line 7681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);

7677: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7678: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7679: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
7680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
7681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
7682: END IF;
7683: ELSE
7684: IF PG_DEBUG in ('Y', 'C') THEN
7685: msc_sch_wb.atp_debug('ATP_Check: ' || 'did not call get_material_atp_info');

Line 7685: msc_sch_wb.atp_debug('ATP_Check: ' || 'did not call get_material_atp_info');

7681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
7682: END IF;
7683: ELSE
7684: IF PG_DEBUG in ('Y', 'C') THEN
7685: msc_sch_wb.atp_debug('ATP_Check: ' || 'did not call get_material_atp_info');
7686: END IF;
7687: l_net_demand := p_atp_record.quantity_ordered;
7688: l_requested_date_quantity := 0.0; -- cchen 08/31
7689:

Line 7702: msc_sch_wb.atp_debug('ATP_Check: ' || 'Initialize atp_date and atp_quantity_this_level');

7698: -- Bug 1566260, Initialize atp_date_this_level and atp_date_quantity_this_level to
7699: -- infinite_time_fence_date and INFINITE_NUMBER to avoid them to be null later on.
7700:
7701: IF PG_DEBUG in ('Y', 'C') THEN
7702: msc_sch_wb.atp_debug('ATP_Check: ' || 'Initialize atp_date and atp_quantity_this_level');
7703: END IF;
7704:
7705: /* s_cto_rearch: chnage call to MSC_ATP_PROC.get_infinite_time_fence_date procedure
7706: l_atp_date_this_level := GREATEST(MSC_ATP_FUNC.get_infinite_time_fence_date(

Line 7734: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);

7730: l_requested_date_quantity := 0.0;
7731: END IF;
7732:
7733: IF PG_DEBUG in ('Y', 'C') THEN
7734: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7735: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7736: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
7737: END IF;
7738:

Line 7735: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);

7731: END IF;
7732:
7733: IF PG_DEBUG in ('Y', 'C') THEN
7734: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7735: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7736: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
7737: END IF;
7738:
7739: END IF;

Line 7736: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973

7732:
7733: IF PG_DEBUG in ('Y', 'C') THEN
7734: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
7735: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
7736: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
7737: END IF;
7738:
7739: END IF;
7740:

Line 7743: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand : '|| to_char(l_net_demand));

7739: END IF;
7740:
7741: -- print the net_demand
7742: IF PG_DEBUG in ('Y', 'C') THEN
7743: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand : '|| to_char(l_net_demand));
7744: END IF;
7745:
7746: -- cchen 1238941
7747:

Line 7849: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||

7845: p_atp_record.parent_item_id is null)) THEN
7846: l_atp_insert_rec.quantity_ordered := LEAST(GREATEST(l_requested_date_quantity, 0),
7847: p_atp_record.quantity_ordered);
7848: IF PG_DEBUG in ('Y', 'C') THEN
7849: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
7850: l_atp_insert_rec.quantity_ordered);
7851: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
7852: p_atp_record.quantity_ordered);
7853: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||

Line 7851: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||

7847: p_atp_record.quantity_ordered);
7848: IF PG_DEBUG in ('Y', 'C') THEN
7849: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
7850: l_atp_insert_rec.quantity_ordered);
7851: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
7852: p_atp_record.quantity_ordered);
7853: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||
7854: l_requested_date_quantity);
7855: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp condition : ' );

Line 7853: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||

7849: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
7850: l_atp_insert_rec.quantity_ordered);
7851: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
7852: p_atp_record.quantity_ordered);
7853: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||
7854: l_requested_date_quantity);
7855: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp condition : ' );
7856: END IF;
7857: ELSE

Line 7855: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp condition : ' );

7851: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
7852: p_atp_record.quantity_ordered);
7853: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||
7854: l_requested_date_quantity);
7855: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp condition : ' );
7856: END IF;
7857: ELSE
7858: l_atp_insert_rec.quantity_ordered := p_atp_record.quantity_ordered;
7859: IF PG_DEBUG in ('Y', 'C') THEN

Line 7860: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||

7856: END IF;
7857: ELSE
7858: l_atp_insert_rec.quantity_ordered := p_atp_record.quantity_ordered;
7859: IF PG_DEBUG in ('Y', 'C') THEN
7860: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
7861: l_atp_insert_rec.quantity_ordered);
7862: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
7863: p_atp_record.quantity_ordered);
7864: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp Else : ' );

Line 7862: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||

7858: l_atp_insert_rec.quantity_ordered := p_atp_record.quantity_ordered;
7859: IF PG_DEBUG in ('Y', 'C') THEN
7860: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
7861: l_atp_insert_rec.quantity_ordered);
7862: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
7863: p_atp_record.quantity_ordered);
7864: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp Else : ' );
7865: END IF;
7866: END IF;

Line 7864: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp Else : ' );

7860: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
7861: l_atp_insert_rec.quantity_ordered);
7862: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
7863: p_atp_record.quantity_ordered);
7864: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp Else : ' );
7865: END IF;
7866: END IF;
7867:
7868: l_atp_insert_rec.requested_ship_date := l_requested_ship_date;

Line 7884: msc_sch_wb.atp_debug('Either ODS based ATP or top level demand. Add as a SO Demand');

7880: -- this is top level demand, which we should consider it
7881: -- as sales order demand.
7882:
7883: IF PG_DEBUG in ('Y', 'C') THEN
7884: msc_sch_wb.atp_debug('Either ODS based ATP or top level demand. Add as a SO Demand');
7885: END IF;
7886:
7887: -- Modified by ngoel on 1/12/2001 for origination_type = 30
7888: --l_atp_insert_rec.origination_type := 6;

Line 7904: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

7900: IF (NVL(p_atp_record.parent_item_id, p_atp_record.inventory_item_id) <> p_atp_record.inventory_item_id AND
7901: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN
7902: l_atp_insert_rec.origination_type := 47;
7903: IF PG_DEBUG in ('Y', 'C') THEN
7904: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7905: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7906: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7907: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7908: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 7905: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);

7901: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN
7902: l_atp_insert_rec.origination_type := 47;
7903: IF PG_DEBUG in ('Y', 'C') THEN
7904: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7905: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7906: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7907: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7908: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7909: END IF;

Line 7906: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);

7902: l_atp_insert_rec.origination_type := 47;
7903: IF PG_DEBUG in ('Y', 'C') THEN
7904: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7905: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7906: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7907: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7908: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7909: END IF;
7910: ELSE

Line 7907: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);

7903: IF PG_DEBUG in ('Y', 'C') THEN
7904: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7905: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7906: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7907: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7908: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7909: END IF;
7910: ELSE
7911: l_atp_insert_rec.origination_type := 1;

Line 7908: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

7904: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7905: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7906: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7907: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7908: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7909: END IF;
7910: ELSE
7911: l_atp_insert_rec.origination_type := 1;
7912: END IF;

Line 7955: msc_sch_wb.atp_debug('ATP_Check: ' || 'temp l_net_demand : '|| l_net_demand);

7951:
7952:
7953: -- temporary
7954: IF PG_DEBUG in ('Y', 'C') THEN
7955: msc_sch_wb.atp_debug('ATP_Check: ' || 'temp l_net_demand : '|| l_net_demand);
7956: END IF;
7957: IF (p_search = 1 OR
7958: (p_search= 2 AND p_parent_pegging_id is not null))
7959: --- IN ODS ATP, we do not want add demand for model only once.

Line 7974: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.latest_acceptable_date);

7970: l_atp_insert_rec.ship_set_name := p_atp_record.ship_set_name;
7971: l_atp_insert_rec.arrival_set_name := p_atp_record.arrival_set_name;
7972: l_atp_insert_rec.original_request_ship_date :=l_original_req_ship_date;
7973: IF PG_DEBUG in ('Y', 'C') THEN
7974: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.latest_acceptable_date);
7975: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.original_request_ship_date);
7976: END IF;
7977: l_atp_insert_rec.wip_supply_type := p_atp_record.mand_comp_flag;
7978: --e_cto_rearch

Line 7975: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.original_request_ship_date);

7971: l_atp_insert_rec.arrival_set_name := p_atp_record.arrival_set_name;
7972: l_atp_insert_rec.original_request_ship_date :=l_original_req_ship_date;
7973: IF PG_DEBUG in ('Y', 'C') THEN
7974: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.latest_acceptable_date);
7975: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.original_request_ship_date);
7976: END IF;
7977: l_atp_insert_rec.wip_supply_type := p_atp_record.mand_comp_flag;
7978: --e_cto_rearch
7979:

Line 7989: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.ship_method : '|| l_atp_insert_rec.ship_method);

7985: l_atp_insert_rec.ship_method := null;
7986: END IF;
7987: END IF;
7988: IF PG_DEBUG in ('Y', 'C') THEN
7989: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.ship_method : '|| l_atp_insert_rec.ship_method);
7990: END IF;
7991: l_atp_insert_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
7992: l_atp_insert_rec.delivery_lead_time := l_delivery_lead_time;
7993:

Line 8007: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||

8003: l_demand_id);
8004: END IF;
8005:
8006: IF PG_DEBUG in ('Y', 'C') THEN
8007: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||
8008: l_demand_id);
8009: END IF;
8010:
8011: -- populate insert rec to pegging tree for this demand

Line 8136: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id for Forward Stealing is : ' || l_pegging_id);

8132: --for demand priority forward ATP we have already set l_pegging_id after get_forward
8133: /*
8134: l_pegging_id := MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG;
8135: IF PG_DEBUG in ('Y', 'C') THEN
8136: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id for Forward Stealing is : ' || l_pegging_id);
8137: END IF;
8138:
8139: */
8140: IF p_parent_pegging_id is not null THEN

Line 8154: msc_sch_wb.atp_debug('ATP_Check: ' || 'Right before pegging');

8150: END IF;
8151: --- End Enhance CTO Phase 1 Req #17
8152:
8153: IF PG_DEBUG in ('Y', 'C') THEN
8154: msc_sch_wb.atp_debug('ATP_Check: ' || 'Right before pegging');
8155: END IF;
8156:
8157: IF (p_parent_pegging_id is null) AND (p_search = 1) THEN
8158: IF PG_DEBUG in ('Y', 'C') THEN

Line 8159: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');

8155: END IF;
8156:
8157: IF (p_parent_pegging_id is null) AND (p_search = 1) THEN
8158: IF PG_DEBUG in ('Y', 'C') THEN
8159: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
8160: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8161: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8162: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8163: END IF;

Line 8160: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

8156:
8157: IF (p_parent_pegging_id is null) AND (p_search = 1) THEN
8158: IF PG_DEBUG in ('Y', 'C') THEN
8159: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
8160: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8161: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8162: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8163: END IF;
8164:

Line 8161: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);

8157: IF (p_parent_pegging_id is null) AND (p_search = 1) THEN
8158: IF PG_DEBUG in ('Y', 'C') THEN
8159: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
8160: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8161: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8162: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8163: END IF;
8164:
8165: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;

Line 8162: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);

8158: IF PG_DEBUG in ('Y', 'C') THEN
8159: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
8160: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8161: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8162: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8163: END IF;
8164:
8165: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
8166: MSC_ATP_PVT.G_REQ_ATP_DATE.EXTEND;

Line 8170: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

8166: MSC_ATP_PVT.G_REQ_ATP_DATE.EXTEND;
8167: MSC_ATP_PVT.G_REQ_DATE_QTY.EXTEND;
8168:
8169: IF PG_DEBUG in ('Y', 'C') THEN
8170: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8171: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8172: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8173: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );
8174: END IF;

Line 8171: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);

8167: MSC_ATP_PVT.G_REQ_DATE_QTY.EXTEND;
8168:
8169: IF PG_DEBUG in ('Y', 'C') THEN
8170: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8171: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8172: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8173: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );
8174: END IF;
8175:

Line 8172: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);

8168:
8169: IF PG_DEBUG in ('Y', 'C') THEN
8170: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8171: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8172: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8173: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );
8174: END IF;
8175:
8176:

Line 8173: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );

8169: IF PG_DEBUG in ('Y', 'C') THEN
8170: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8171: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8172: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8173: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );
8174: END IF;
8175:
8176:
8177: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := l_pegging_id;

Line 8183: msc_sch_wb.atp_debug('ATP_Check: ' || 'Right after pegging');

8179: MSC_ATP_PVT.G_REQ_DATE_QTY(MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT) := p_atp_record.Quantity_Ordered;
8180:
8181: END IF;
8182: IF PG_DEBUG in ('Y', 'C') THEN
8183: msc_sch_wb.atp_debug('ATP_Check: ' || 'Right after pegging');
8184: END IF;
8185: -- dsting: 9/19/2002 component substitute check moved to
8186: -- after move_sd_temp_to_mrp_details.
8187:

Line 8300: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');

8296:
8297: l_pegging_rec.demand_class := p_atp_record.demand_class;
8298: -- Bug 3826234
8299: IF PG_DEBUG in ('Y', 'C') THEN
8300: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8301: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8302: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8303: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8304: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);

Line 8301: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);

8297: l_pegging_rec.demand_class := p_atp_record.demand_class;
8298: -- Bug 3826234
8299: IF PG_DEBUG in ('Y', 'C') THEN
8300: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8301: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8302: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8303: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8304: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);
8305: END IF;

Line 8302: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);

8298: -- Bug 3826234
8299: IF PG_DEBUG in ('Y', 'C') THEN
8300: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8301: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8302: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8303: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8304: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);
8305: END IF;
8306: IF p_parent_pegging_id is null then

Line 8303: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);

8299: IF PG_DEBUG in ('Y', 'C') THEN
8300: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8301: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8302: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8303: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8304: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);
8305: END IF;
8306: IF p_parent_pegging_id is null then
8307: l_pegging_rec.shipping_cal_code := p_atp_record.shipping_cal_code;

Line 8304: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);

8300: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8301: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8302: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8303: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8304: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);
8305: END IF;
8306: IF p_parent_pegging_id is null then
8307: l_pegging_rec.shipping_cal_code := p_atp_record.shipping_cal_code;
8308: l_pegging_rec.receiving_cal_code := p_atp_record.receiving_cal_code;

Line 8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside IF');

8308: l_pegging_rec.receiving_cal_code := p_atp_record.receiving_cal_code;
8309: l_pegging_rec.intransit_cal_code := p_atp_record.intransit_cal_code;
8310: l_pegging_rec.manufacturing_cal_code := p_atp_record.manufacturing_cal_code;
8311: IF PG_DEBUG in ('Y', 'C') THEN
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside IF');
8313: END IF;
8314: ELSIF NVL(p_atp_record.to_organization_id,p_atp_record.organization_id)
8315: <> p_atp_record.organization_id THEN
8316:

Line 8322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside ELSIF');

8318: l_pegging_rec.receiving_cal_code := p_atp_record.receiving_cal_code;
8319: l_pegging_rec.intransit_cal_code := p_atp_record.intransit_cal_code;
8320: l_pegging_rec.manufacturing_cal_code := NULL;
8321: IF PG_DEBUG in ('Y', 'C') THEN
8322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside ELSIF');
8323: END IF;
8324: ELSE
8325: l_pegging_rec.manufacturing_cal_code := p_atp_record.manufacturing_cal_code;
8326: l_pegging_rec.shipping_cal_code := NULL;

Line 8330: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside ELSE');

8326: l_pegging_rec.shipping_cal_code := NULL;
8327: l_pegging_rec.receiving_cal_code := NULL;
8328: l_pegging_rec.intransit_cal_code := NULL;
8329: IF PG_DEBUG in ('Y', 'C') THEN
8330: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside ELSE');
8331: END IF;
8332: END IF;
8333: -- Bug 3826234
8334:

Line 8373: msc_sch_wb.atp_debug('ATP_Check: ' || 'Before check substitutes call:'||

8369: -- Nagaraj
8370: IF ( p_search = BACKWARD_SCHEDULING) and (p_parent_pegging_id is not null --5006799
8371: and l_net_demand > 0 and MSC_ATP_PVT.G_SUB_COMP = 'Y') THEN
8372: IF PG_DEBUG in ('Y', 'C') THEN
8373: msc_sch_wb.atp_debug('ATP_Check: ' || 'Before check substitutes call:'||
8374: to_char(p_parent_pegging_id) || ':' || to_char(l_net_demand));
8375: END IF;
8376:
8377: -- Setup new g_atp_record during each loop, we should not

Line 8474: msc_sch_wb.atp_debug('From Substitute Array Item : '|| l_substitutes_rec.inventory_item_id(ii));

8470: p_atp_record.quantity_ordered);
8471: IF PG_DEBUG in ('Y', 'C') THEN
8472: for ii in 1..l_substitutes_rec.inventory_item_id.count
8473: loop
8474: msc_sch_wb.atp_debug('From Substitute Array Item : '|| l_substitutes_rec.inventory_item_id(ii));
8475: msc_sch_wb.atp_debug('From Substitute Array Pegging: '|| l_substitutes_rec.pegging_id(ii));
8476: msc_sch_wb.atp_debug('From Substitute Array ATP QTY: '|| l_substitutes_rec.sub_atp_qty(ii));
8477: end loop;
8478: END IF;

Line 8475: msc_sch_wb.atp_debug('From Substitute Array Pegging: '|| l_substitutes_rec.pegging_id(ii));

8471: IF PG_DEBUG in ('Y', 'C') THEN
8472: for ii in 1..l_substitutes_rec.inventory_item_id.count
8473: loop
8474: msc_sch_wb.atp_debug('From Substitute Array Item : '|| l_substitutes_rec.inventory_item_id(ii));
8475: msc_sch_wb.atp_debug('From Substitute Array Pegging: '|| l_substitutes_rec.pegging_id(ii));
8476: msc_sch_wb.atp_debug('From Substitute Array ATP QTY: '|| l_substitutes_rec.sub_atp_qty(ii));
8477: end loop;
8478: END IF;
8479: --4902658/5216528 end

Line 8476: msc_sch_wb.atp_debug('From Substitute Array ATP QTY: '|| l_substitutes_rec.sub_atp_qty(ii));

8472: for ii in 1..l_substitutes_rec.inventory_item_id.count
8473: loop
8474: msc_sch_wb.atp_debug('From Substitute Array Item : '|| l_substitutes_rec.inventory_item_id(ii));
8475: msc_sch_wb.atp_debug('From Substitute Array Pegging: '|| l_substitutes_rec.pegging_id(ii));
8476: msc_sch_wb.atp_debug('From Substitute Array ATP QTY: '|| l_substitutes_rec.sub_atp_qty(ii));
8477: end loop;
8478: END IF;
8479: --4902658/5216528 end
8480: -- cchen : 1238941

Line 8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);

8483: greatest(l_net_demand, 0);
8484:
8485: --4570421
8486: IF PG_DEBUG in ('Y', 'C') THEN
8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);
8488: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);
8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);
8490: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_ORG_INFO_REC.org_type:'|| MSC_ATP_PVT.G_ORG_INFO_REC.org_type);
8491: END IF;

Line 8488: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);

8484:
8485: --4570421
8486: IF PG_DEBUG in ('Y', 'C') THEN
8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);
8488: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);
8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);
8490: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_ORG_INFO_REC.org_type:'|| MSC_ATP_PVT.G_ORG_INFO_REC.org_type);
8491: END IF;
8492: IF ( ( MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND p_atp_record.scaling_type = 2) OR

Line 8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);

8485: --4570421
8486: IF PG_DEBUG in ('Y', 'C') THEN
8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);
8488: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);
8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);
8490: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_ORG_INFO_REC.org_type:'|| MSC_ATP_PVT.G_ORG_INFO_REC.org_type);
8491: END IF;
8492: IF ( ( MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND p_atp_record.scaling_type = 2) OR
8493: (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND p_atp_record.scaling_type IN (0,2))) AND l_net_demand = 0 then

Line 8490: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_ORG_INFO_REC.org_type:'|| MSC_ATP_PVT.G_ORG_INFO_REC.org_type);

8486: IF PG_DEBUG in ('Y', 'C') THEN
8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);
8488: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);
8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);
8490: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_ORG_INFO_REC.org_type:'|| MSC_ATP_PVT.G_ORG_INFO_REC.org_type);
8491: END IF;
8492: IF ( ( MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND p_atp_record.scaling_type = 2) OR
8493: (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND p_atp_record.scaling_type IN (0,2))) AND l_net_demand = 0 then
8494: -- Delete the supply pegging of the main component, if substitute can satisfy the lot-size.

Line 8508: msc_sch_wb.atp_debug('ATP_Check: ' || 'After check substitutes:'||

8504: END IF;
8505: END IF;
8506:
8507: IF PG_DEBUG in ('Y', 'C') THEN
8508: msc_sch_wb.atp_debug('ATP_Check: ' || 'After check substitutes:'||
8509: to_char(l_net_demand));
8510: END IF;
8511:
8512: -- In order to show the correct demand quantity that got considered

Line 8530: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update POD for Primary Component');

8526: -- we do the substitute now.
8527: --5220357 start
8528: IF l_sub_requested_date_quantity > 0 THEN
8529: IF PG_DEBUG in ('Y', 'C') THEN
8530: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update POD for Primary Component');
8531: END IF;
8532: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP,2) <> 1 THEN
8533: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id,
8534: null,

Line 8548: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);

8544: and plan_id = p_plan_id
8545: returning inventory_item_id into l_inventory_item_id;
8546:
8547: IF PG_DEBUG in ('Y', 'C') THEN
8548: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
8549: END IF;
8550: /* time_phased_atp
8551: need to check this while UT*/
8552: IF l_time_phased_atp = 'Y' THEN

Line 8566: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

8562: l_return_status
8563: );
8564: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8565: IF PG_DEBUG in ('Y', 'C') THEN
8566: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
8567: END IF;
8568: RAISE FND_API.G_EXC_ERROR;
8569: END IF;
8570: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'

Line 8579: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);

8575: where parent_demand_id = l_demand_id --updating for primary only
8576: and plan_id = p_plan_id;
8577:
8578: IF PG_DEBUG in ('Y', 'C') THEN
8579: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
8580: END IF;
8581: END IF;
8582: IF PG_DEBUG in ('Y', 'C') THEN
8583: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

Line 8583: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

8579: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
8580: END IF;
8581: END IF;
8582: IF PG_DEBUG in ('Y', 'C') THEN
8583: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
8584: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
8585: END IF;
8586:
8587: -- update summary records removed in ODS case - for summary enhancement

Line 8584: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

8580: END IF;
8581: END IF;
8582: IF PG_DEBUG in ('Y', 'C') THEN
8583: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
8584: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
8585: END IF;
8586:
8587: -- update summary records removed in ODS case - for summary enhancement
8588: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN

Line 8700: msc_sch_wb.atp_debug('ATP_Check: ' || 'Start stealing in backward case, before CTP');

8696: END IF;
8697: --- End Enhance CTO Phase 1 Req #17
8698:
8699: IF PG_DEBUG in ('Y', 'C') THEN
8700: msc_sch_wb.atp_debug('ATP_Check: ' || 'Start stealing in backward case, before CTP');
8701: END IF;
8702: -- AATP: here we need to do the stealing.
8703: -- Only do stealing if ATP flag for the item is Yes.
8704: g_atp_record.error_code := ALLSUCCESS;

Line 8789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);

8785: l_stealing_qty := l_stealing_requested_date_qty -
8786: greatest(l_net_demand, 0);
8787:
8788: IF PG_DEBUG in ('Y', 'C') THEN
8789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);
8790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);
8791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);
8792: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);
8793: END IF;

Line 8790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);

8786: greatest(l_net_demand, 0);
8787:
8788: IF PG_DEBUG in ('Y', 'C') THEN
8789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);
8790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);
8791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);
8792: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);
8793: END IF;
8794:

Line 8791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);

8787:
8788: IF PG_DEBUG in ('Y', 'C') THEN
8789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);
8790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);
8791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);
8792: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);
8793: END IF;
8794:
8795: -- using the pegging_id to find the demand_id and plan_id

Line 8792: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);

8788: IF PG_DEBUG in ('Y', 'C') THEN
8789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);
8790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);
8791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);
8792: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);
8793: END IF;
8794:
8795: -- using the pegging_id to find the demand_id and plan_id
8796: ---demandxyz

Line 8819: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

8815: l_return_status
8816: );
8817: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8818: IF PG_DEBUG in ('Y', 'C') THEN
8819: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
8820: END IF;
8821: RAISE FND_API.G_EXC_ERROR;
8822: END IF;
8823: /* update atf date quantity */

Line 8852: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Stealing :'|| l_net_demand);

8848:
8849: l_net_demand := greatest(l_net_demand, 0);
8850:
8851: IF PG_DEBUG in ('Y', 'C') THEN
8852: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Stealing :'|| l_net_demand);
8853: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_requested_date_qty = '||
8854: l_stealing_requested_date_qty);
8855: END IF;
8856: /* bug 1680212

Line 8853: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_requested_date_qty = '||

8849: l_net_demand := greatest(l_net_demand, 0);
8850:
8851: IF PG_DEBUG in ('Y', 'C') THEN
8852: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Stealing :'|| l_net_demand);
8853: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_requested_date_qty = '||
8854: l_stealing_requested_date_qty);
8855: END IF;
8856: /* bug 1680212
8857: -- In order to show the correct demand quantity that got

Line 8875: msc_sch_wb.atp_debug('ATP_Check: ' || 'Look forward to meet the remaining shortage of comp');

8871: IF (p_search = FORWARD_SCHEDULING) AND
8872: (p_parent_pegging_id IS NOT NULL) AND
8873: (MSC_ATP_PVT.G_PTF_DATE > l_requested_ship_date) THEN
8874: IF PG_DEBUG in ('Y', 'C') THEN
8875: msc_sch_wb.atp_debug('ATP_Check: ' || 'Look forward to meet the remaining shortage of comp');
8876: END IF;
8877: --Bug2682094 Do not reset the demand
8878: --l_net_demand := p_atp_record.quantity_ordered;
8879: l_req_date_qty := 0;

Line 8905: msc_sch_wb.atp_debug('l_check_model_capacity := ' || l_check_model_capacity);

8901: l_sr_inv_item_id,
8902: l_check_model_capacity);
8903:
8904: IF PG_DEBUG in ('Y', 'C') THEN
8905: msc_sch_wb.atp_debug('l_check_model_capacity := ' || l_check_model_capacity);
8906: END IF;
8907: IF l_check_model_capacity = 1 THEN
8908: --- we set comp flag to Y so that it goes into the logic of make
8909: l_atp_comp_flag := 'Y';

Line 8920: msc_sch_wb.atp_debug('Demabnd is Met');

8916: END IF;
8917:
8918: IF l_net_demand <= 0 THEN
8919: IF PG_DEBUG in ('Y', 'C') THEN
8920: msc_sch_wb.atp_debug('Demabnd is Met');
8921: msc_sch_wb.atp_debug('Requested Date quantity := ' || l_requested_date_quantity);
8922: END IF;
8923: -- we meet the requirements!!!
8924: --commenting for bug3550292

Line 8921: msc_sch_wb.atp_debug('Requested Date quantity := ' || l_requested_date_quantity);

8917:
8918: IF l_net_demand <= 0 THEN
8919: IF PG_DEBUG in ('Y', 'C') THEN
8920: msc_sch_wb.atp_debug('Demabnd is Met');
8921: msc_sch_wb.atp_debug('Requested Date quantity := ' || l_requested_date_quantity);
8922: END IF;
8923: -- we meet the requirements!!!
8924: --commenting for bug3550292
8925: /*p_atp_record.requested_date_quantity:= l_requested_date_quantity

Line 8953: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity = '||p_atp_record.atf_date_quantity);

8949: p_atp_record.combined_requested_date_qty; --bug3409973
8950: -- p_atp_record.available_quantity:=l_atp_date_quantity_this_level;
8951:
8952: IF PG_DEBUG in ('Y', 'C') THEN
8953: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity = '||p_atp_record.atf_date_quantity);
8954: msc_sch_wb.atp_debug('ATP_Check: ' || 'after insert row, 1');
8955: END IF;
8956: --diag_atp
8957: ELSIF (l_atp_comp_flag = 'N') AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN

Line 8954: msc_sch_wb.atp_debug('ATP_Check: ' || 'after insert row, 1');

8950: -- p_atp_record.available_quantity:=l_atp_date_quantity_this_level;
8951:
8952: IF PG_DEBUG in ('Y', 'C') THEN
8953: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity = '||p_atp_record.atf_date_quantity);
8954: msc_sch_wb.atp_debug('ATP_Check: ' || 'after insert row, 1');
8955: END IF;
8956: --diag_atp
8957: ELSIF (l_atp_comp_flag = 'N') AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
8958: IF PG_DEBUG in ('Y', 'C') THEN

Line 8959: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Component flag = N');

8955: END IF;
8956: --diag_atp
8957: ELSIF (l_atp_comp_flag = 'N') AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
8958: IF PG_DEBUG in ('Y', 'C') THEN
8959: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Component flag = N');
8960: END IF;
8961:
8962: -- we cannot meet the requirements, so we provide
8963: -- the information at this level

Line 8973: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');

8969: --support forward stealing for all levels
8970: AND p_parent_pegging_id IS NULL
8971: THEN
8972: IF PG_DEBUG in ('Y', 'C') THEN
8973: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');
8974: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);
8975: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
8976: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
8977: END IF;

Line 8974: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);

8970: AND p_parent_pegging_id IS NULL
8971: THEN
8972: IF PG_DEBUG in ('Y', 'C') THEN
8973: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');
8974: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);
8975: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
8976: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
8977: END IF;
8978:

Line 8975: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);

8971: THEN
8972: IF PG_DEBUG in ('Y', 'C') THEN
8973: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');
8974: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);
8975: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
8976: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
8977: END IF;
8978:
8979: update msc_demands

Line 8976: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);

8972: IF PG_DEBUG in ('Y', 'C') THEN
8973: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');
8974: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);
8975: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
8976: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
8977: END IF;
8978:
8979: update msc_demands
8980: set using_requirement_quantity = MSC_ATP_UTILS.Truncate_Demand(p_atp_record.requested_date_quantity + l_stealing_requested_date_qty)

Line 9000: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

8996: l_return_status
8997: );
8998: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8999: IF PG_DEBUG in ('Y', 'C') THEN
9000: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9001: END IF;
9002: RAISE FND_API.G_EXC_ERROR;
9003: END IF;
9004: ELSE

Line 9075: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);

9071: p_atp_record.atf_date_quantity := NVL(p_atp_record.atf_date_quantity, 0) + NVL(l_atf_date_qty, 0);
9072: END IF;
9073:
9074: IF PG_DEBUG in ('Y', 'C') THEN
9075: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9076: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9077: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9078: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9079: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);

Line 9076: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);

9072: END IF;
9073:
9074: IF PG_DEBUG in ('Y', 'C') THEN
9075: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9076: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9077: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9078: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9079: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);
9080: END IF;

Line 9077: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973

9073:
9074: IF PG_DEBUG in ('Y', 'C') THEN
9075: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9076: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9077: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9078: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9079: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);
9080: END IF;
9081:

Line 9078: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);

9074: IF PG_DEBUG in ('Y', 'C') THEN
9075: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9076: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9077: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9078: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9079: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);
9080: END IF;
9081:
9082: ELSE

Line 9079: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);

9075: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9076: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9077: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9078: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9079: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);
9080: END IF;
9081:
9082: ELSE
9083: IF (l_stealing_requested_date_qty > 0) AND

Line 9092: msc_sch_wb.atp_debug('ATP_Check: ' || 'Do a Second pass to find better date for Qty:' || l_requested_quantity);

9088: --as stealing has happened.
9089: l_requested_quantity := p_atp_record.quantity_ordered -
9090: l_stealing_requested_date_qty;
9091: IF PG_DEBUG in ('Y', 'C') THEN
9092: msc_sch_wb.atp_debug('ATP_Check: ' || 'Do a Second pass to find better date for Qty:' || l_requested_quantity);
9093: msc_sch_wb.atp_debug('ATP_Check: ' || 'Count:' || l_atp_period_first.period_start_date.COUNT);
9094: END IF;
9095:
9096: FOR i in 1..l_atp_period_first.period_start_date.COUNT LOOP

Line 9093: msc_sch_wb.atp_debug('ATP_Check: ' || 'Count:' || l_atp_period_first.period_start_date.COUNT);

9089: l_requested_quantity := p_atp_record.quantity_ordered -
9090: l_stealing_requested_date_qty;
9091: IF PG_DEBUG in ('Y', 'C') THEN
9092: msc_sch_wb.atp_debug('ATP_Check: ' || 'Do a Second pass to find better date for Qty:' || l_requested_quantity);
9093: msc_sch_wb.atp_debug('ATP_Check: ' || 'Count:' || l_atp_period_first.period_start_date.COUNT);
9094: END IF;
9095:
9096: FOR i in 1..l_atp_period_first.period_start_date.COUNT LOOP
9097: IF i <> l_atp_period_first.period_start_date.COUNT THEN

Line 9121: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Date II pass is ' || l_atp_date_this_level);

9117: END IF;
9118: END IF;
9119: END LOOP;
9120: IF PG_DEBUG in ('Y', 'C') THEN
9121: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Date II pass is ' || l_atp_date_this_level);
9122: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Qty II Pass is ' || l_atp_date_quantity_this_level);
9123: END IF;
9124: --End Changes bug2471377 pumehta
9125: END IF;

Line 9122: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Qty II Pass is ' || l_atp_date_quantity_this_level);

9118: END IF;
9119: END LOOP;
9120: IF PG_DEBUG in ('Y', 'C') THEN
9121: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Date II pass is ' || l_atp_date_this_level);
9122: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Qty II Pass is ' || l_atp_date_quantity_this_level);
9123: END IF;
9124: --End Changes bug2471377 pumehta
9125: END IF;
9126:

Line 9173: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);

9169: l_atp_date_this_level);
9170: END IF;
9171:
9172: IF PG_DEBUG in ('Y', 'C') THEN
9173: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9174: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9175: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9176: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);

Line 9174: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);

9170: END IF;
9171:
9172: IF PG_DEBUG in ('Y', 'C') THEN
9173: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9174: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9175: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9176: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);

Line 9175: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973

9171:
9172: IF PG_DEBUG in ('Y', 'C') THEN
9173: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9174: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9175: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9176: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);
9179: END IF;

Line 9176: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);

9172: IF PG_DEBUG in ('Y', 'C') THEN
9173: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9174: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9175: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9176: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);
9179: END IF;
9180: -- p_atp_record.available_quantity:=l_atp_date_quantity_this_level;

Line 9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);

9173: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9174: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9175: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9176: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);
9179: END IF;
9180: -- p_atp_record.available_quantity:=l_atp_date_quantity_this_level;
9181: IF p_atp_record.ship_date IS NOT NULL THEN

Line 9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);

9174: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9175: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9176: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);
9179: END IF;
9180: -- p_atp_record.available_quantity:=l_atp_date_quantity_this_level;
9181: IF p_atp_record.ship_date IS NOT NULL THEN
9182: p_atp_record.error_code := ATP_REQ_DATE_FAIL;

Line 9234: msc_sch_wb.atp_debug('ATO update details_temp 1: ' || l_pegging_id || ' date: ' || l_atp_date_this_level);

9230: and pegging_id = l_pegging_id
9231: and record_type = 3;
9232:
9233: IF PG_DEBUG in ('Y', 'C') THEN
9234: msc_sch_wb.atp_debug('ATO update details_temp 1: ' || l_pegging_id || ' date: ' || l_atp_date_this_level);
9235: msc_sch_wb.atp_debug('Update demand with demand id := ' || l_demand_id);
9236: msc_sch_wb.atp_debug('Update demand on date : = ' || l_atp_date_this_level);
9237: END IF;
9238:

Line 9235: msc_sch_wb.atp_debug('Update demand with demand id := ' || l_demand_id);

9231: and record_type = 3;
9232:
9233: IF PG_DEBUG in ('Y', 'C') THEN
9234: msc_sch_wb.atp_debug('ATO update details_temp 1: ' || l_pegging_id || ' date: ' || l_atp_date_this_level);
9235: msc_sch_wb.atp_debug('Update demand with demand id := ' || l_demand_id);
9236: msc_sch_wb.atp_debug('Update demand on date : = ' || l_atp_date_this_level);
9237: END IF;
9238:
9239: -- bug 1302394: we should adjust the date

Line 9236: msc_sch_wb.atp_debug('Update demand on date : = ' || l_atp_date_this_level);

9232:
9233: IF PG_DEBUG in ('Y', 'C') THEN
9234: msc_sch_wb.atp_debug('ATO update details_temp 1: ' || l_pegging_id || ' date: ' || l_atp_date_this_level);
9235: msc_sch_wb.atp_debug('Update demand with demand id := ' || l_demand_id);
9236: msc_sch_wb.atp_debug('Update demand on date : = ' || l_atp_date_this_level);
9237: END IF;
9238:
9239: -- bug 1302394: we should adjust the date
9240: -- of the demand which causes this planned order

Line 9303: msc_sch_wb.atp_debug('ATP_Check: ' || 'I come here 123');

9299:
9300:
9301: -- time_phased_atp changes begin
9302: IF l_time_phased_atp = 'Y' THEN
9303: msc_sch_wb.atp_debug('ATP_Check: ' || 'I come here 123');
9304: --bug3397904 start
9305: IF p_atp_record.requested_ship_date <= p_atp_record.atf_date THEN
9306: l_bkwd_pass_atf_date_qty := GREATEST(NVL(p_atp_record.combined_requested_date_qty,
9307: p_atp_record.requested_date_quantity), 0);

Line 9326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');

9322: l_bkwd_pass_atf_date_qty --bug3397904
9323: );
9324: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9325: IF PG_DEBUG in ('Y', 'C') THEN
9326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
9327: END IF;
9328: RAISE FND_API.G_EXC_ERROR;
9329: END IF;
9330: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'

Line 9342: msc_sch_wb.atp_debug('ATP_Check: ' || 'update old date demand');

9338:
9339: -- update summary records removed in ODS cases - for summary enhancement
9340: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' and (p_parent_pegging_id is not null) AND p_plan_id = -1 THEN
9341: IF PG_DEBUG in ('Y', 'C') THEN
9342: msc_sch_wb.atp_debug('ATP_Check: ' || 'update old date demand');
9343: END IF;
9344: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
9345: p_plan_id,
9346: p_atp_record.organization_id,

Line 9380: msc_sch_wb.atp_debug('ATP_Check: ' || 'update demand on new date');

9376: 2);
9377:
9378:
9379: IF PG_DEBUG in ('Y', 'C') THEN
9380: msc_sch_wb.atp_debug('ATP_Check: ' || 'update demand on new date');
9381: END IF;
9382: update /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) */ msc_atp_summary_sd
9383: set sd_qty = sd_qty - p_atp_record.quantity_ordered
9384: where plan_id = p_plan_id

Line 9392: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert demand on new date');

9388: and sd_date = trunc(l_atp_date_this_level);
9389: commit;
9390: IF SQL%NOTFOUND THEN
9391: IF PG_DEBUG in ('Y', 'C') THEN
9392: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert demand on new date');
9393: END IF;
9394: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
9395: p_atp_record.instance_id,
9396: p_atp_record.organization_id,

Line 9472: msc_sch_wb.atp_debug('ATP_Check: ' || 'Qty := ' || l_pegging_rec.supply_demand_quantity);

9468: l_pegging_rec.supply_demand_date:= l_atp_date_this_level;
9469: l_pegging_rec.actual_supply_demand_date:= l_atp_date_this_level;
9470: l_pegging_rec.supply_demand_type:= 2;
9471: IF PG_DEBUG in ('Y', 'C') THEN
9472: msc_sch_wb.atp_debug('ATP_Check: ' || 'Qty := ' || l_pegging_rec.supply_demand_quantity);
9473: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date := ' || l_pegging_rec.supply_demand_date);
9474: END IF;
9475: l_pegging_rec.source_type := 0;
9476:

Line 9473: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date := ' || l_pegging_rec.supply_demand_date);

9469: l_pegging_rec.actual_supply_demand_date:= l_atp_date_this_level;
9470: l_pegging_rec.supply_demand_type:= 2;
9471: IF PG_DEBUG in ('Y', 'C') THEN
9472: msc_sch_wb.atp_debug('ATP_Check: ' || 'Qty := ' || l_pegging_rec.supply_demand_quantity);
9473: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date := ' || l_pegging_rec.supply_demand_date);
9474: END IF;
9475: l_pegging_rec.source_type := 0;
9476:
9477: -- for demo:1153192

Line 9498: msc_sch_wb.atp_debug('Forward ATP, add pegging constriant');

9494: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP, 2) = 2
9495: AND l_requested_date_quantity < p_atp_record.quantity_ordered THEN
9496: -- Bug 3828469 - Add constraint only if it exists
9497: IF PG_DEBUG in ('Y', 'C') THEN
9498: msc_sch_wb.atp_debug('Forward ATP, add pegging constriant');
9499: END IF;
9500: l_pegging_rec.constraint_type := 1;
9501: END IF;
9502: --e_cto_rearch

Line 9638: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured while getting PTF : ' || sqlerrm);

9634: and pl.sr_instance_id = itm.sr_instance_id;
9635: EXCEPTION
9636: WHEN OTHERS THEN
9637: IF PG_DEBUG in ('Y', 'C') THEN
9638: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured while getting PTF : ' || sqlerrm);
9639: END IF;
9640: l_ptf_date := l_ptf_date; -- Bug 3535999 - l_sysdate;
9641: END;
9642: END IF;

Line 9644: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);

9640: l_ptf_date := l_ptf_date; -- Bug 3535999 - l_sysdate;
9641: END;
9642: END IF;
9643: IF PG_DEBUG in ('Y', 'C') THEN
9644: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
9645: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_enabled := ' || l_ptf_enabled);
9646: END IF;
9647: -- for bug 1124538: do not pass down the demand to the
9648: -- next level if it is backward scheduling and

Line 9645: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_enabled := ' || l_ptf_enabled);

9641: END;
9642: END IF;
9643: IF PG_DEBUG in ('Y', 'C') THEN
9644: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
9645: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_enabled := ' || l_ptf_enabled);
9646: END IF;
9647: -- for bug 1124538: do not pass down the demand to the
9648: -- next level if it is backward scheduling and
9649: -- requested_ship_date is less than sysdate.

Line 9657: msc_sch_wb.atp_debug('ATP_Check: ' || 'backward, request ship date

9653: --(l_requested_ship_date < GREATEST(l_sysdate, l_ptf_date))) THEN
9654: --diag_atp: we dont want to stop in case of diag ATP. We still want to explode sources
9655: (l_requested_ship_date < l_sysdate ) AND (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2)) THEN
9656: IF PG_DEBUG in ('Y', 'C') THEN
9657: msc_sch_wb.atp_debug('ATP_Check: ' || 'backward, request ship date 9658: END IF;
9659: p_atp_record.requested_date_quantity:=0.0;
9660: -- cchen : 1238941
9661: p_atp_record.combined_requested_date_qty := 0.0;

Line 9665: msc_sch_wb.atp_debug('ATP_Check: ' || 'top level, set future date Y');

9661: p_atp_record.combined_requested_date_qty := 0.0;
9662:
9663: IF p_parent_pegging_id is null THEN
9664: IF PG_DEBUG in ('Y', 'C') THEN
9665: msc_sch_wb.atp_debug('ATP_Check: ' || 'top level, set future date Y');
9666: END IF;
9667: MSC_ATP_PVT.G_FIND_FUTURE_DATE := 'Y';
9668: MSC_ATP_PVT.G_ASSEMBLY_LINE_ID := p_atp_record.Identifier;
9669: MSC_ATP_PVT.G_COMP_LINE_ID := p_atp_record.Identifier;

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

9692:
9693: -- update summary records removed in ODS cases - for summary enhancement
9694: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
9695: IF PG_DEBUG in ('Y', 'C') THEN
9696: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
9697: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
9698: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
9699: END IF;
9700:

Line 9697: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

9693: -- update summary records removed in ODS cases - for summary enhancement
9694: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
9695: IF PG_DEBUG in ('Y', 'C') THEN
9696: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
9697: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
9698: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
9699: END IF;
9700:
9701: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 9698: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

9694: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
9695: IF PG_DEBUG in ('Y', 'C') THEN
9696: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
9697: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
9698: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
9699: END IF;
9700:
9701: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
9702: p_plan_id,

Line 9726: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand updated for demand id = '|| l_demand_id);

9722: commit;
9723: END IF;
9724:
9725: IF PG_DEBUG in ('Y', 'C') THEN
9726: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand updated for demand id = '|| l_demand_id);
9727: END IF;
9728:
9729: END IF;
9730: ELSE

Line 9738: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside net_demand > 0');

9734: -- components.
9735: -- first we check the supply chain bill
9736:
9737: IF PG_DEBUG in ('Y', 'C') THEN
9738: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside net_demand > 0');
9739: END IF;
9740: -- for bug 1094773
9741: IF (p_search = FORWARD_SCHEDULING) AND
9742: --subst : for top org in case of subst we do not add pegg

Line 9750: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward ATP Qty := ' || l_atp_date_quantity_this_level);

9746: -- assume the atp date and quantity to be single level.
9747: -- this is the worst that we can get.
9748:
9749: IF PG_DEBUG in ('Y', 'C') THEN
9750: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward ATP Qty := ' || l_atp_date_quantity_this_level);
9751: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Date : FUTURE : ' || l_atp_date_this_level);
9752: END IF;
9753:
9754: p_atp_record.available_quantity:= l_atp_date_quantity_this_level;

Line 9751: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Date : FUTURE : ' || l_atp_date_this_level);

9747: -- this is the worst that we can get.
9748:
9749: IF PG_DEBUG in ('Y', 'C') THEN
9750: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward ATP Qty := ' || l_atp_date_quantity_this_level);
9751: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Date : FUTURE : ' || l_atp_date_this_level);
9752: END IF;
9753:
9754: p_atp_record.available_quantity:= l_atp_date_quantity_this_level;
9755: p_atp_record.used_available_quantity:= l_used_available_quantity;--bug3409973

Line 9780: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date : ' || p_atp_record.ship_date);

9776: p_atp_record.instance_id,
9777: l_atp_date_this_level);
9778:
9779: IF PG_DEBUG in ('Y', 'C') THEN
9780: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date : ' || p_atp_record.ship_date);
9781: END IF;
9782:
9783: -- Planned Pegging Based AATP Changes
9784: --enable forward pegging for all cases.

Line 9807: msc_sch_wb.atp_debug('ATP_Check: ' || 'Already added future supply pegging : '|| l_atp_pegging_tab.COUNT);

9803: -- Already Called MSC_AATP_REQ.Get_Forward_Material_Atp, thus don't add
9804: -- pegging for future case here as its already added.
9805:
9806: IF PG_DEBUG in ('Y', 'C') THEN
9807: msc_sch_wb.atp_debug('ATP_Check: ' || 'Already added future supply pegging : '|| l_atp_pegging_tab.COUNT);
9808: END IF;
9809: ELSE
9810: l_future_atp_period := l_atp_period;
9811: l_future_atp_supply_demand := l_atp_supply_demand;

Line 9857: msc_sch_wb.atp_debug('ATP_Check: p_atp_record_available_qty : ' || p_atp_record.available_quantity);

9853: IF nvl(l_req_date_qty, -1) = 0 THEN
9854: l_pegging_rec.supply_demand_quantity:= p_atp_record.available_quantity;
9855: ELSE
9856: IF PG_DEBUG in ('Y', 'C') THEN
9857: msc_sch_wb.atp_debug('ATP_Check: p_atp_record_available_qty : ' || p_atp_record.available_quantity);
9858: msc_sch_wb.atp_debug('ATP_Check: requested_day_quantity : ' || p_atp_record.available_quantity);
9859: END IF;
9860: IF(p_atp_record.available_quantity <> INFINITE_NUMBER) THEN
9861: IF PG_DEBUG in ('Y', 'C') THEN

Line 9858: msc_sch_wb.atp_debug('ATP_Check: requested_day_quantity : ' || p_atp_record.available_quantity);

9854: l_pegging_rec.supply_demand_quantity:= p_atp_record.available_quantity;
9855: ELSE
9856: IF PG_DEBUG in ('Y', 'C') THEN
9857: msc_sch_wb.atp_debug('ATP_Check: p_atp_record_available_qty : ' || p_atp_record.available_quantity);
9858: msc_sch_wb.atp_debug('ATP_Check: requested_day_quantity : ' || p_atp_record.available_quantity);
9859: END IF;
9860: IF(p_atp_record.available_quantity <> INFINITE_NUMBER) THEN
9861: IF PG_DEBUG in ('Y', 'C') THEN
9862: msc_sch_wb.atp_debug('ATP_Check: Available Quantity is not INFINITE, subtracting requested_day_qty');

Line 9862: msc_sch_wb.atp_debug('ATP_Check: Available Quantity is not INFINITE, subtracting requested_day_qty');

9858: msc_sch_wb.atp_debug('ATP_Check: requested_day_quantity : ' || p_atp_record.available_quantity);
9859: END IF;
9860: IF(p_atp_record.available_quantity <> INFINITE_NUMBER) THEN
9861: IF PG_DEBUG in ('Y', 'C') THEN
9862: msc_sch_wb.atp_debug('ATP_Check: Available Quantity is not INFINITE, subtracting requested_day_qty');
9863: END IF;
9864: l_pegging_rec.supply_demand_quantity:=
9865: p_atp_record.available_quantity - greatest(0, l_requested_date_quantity);
9866: ELSE

Line 9868: msc_sch_wb.atp_debug('ATP_Check: Available Quantity INFINITE');

9864: l_pegging_rec.supply_demand_quantity:=
9865: p_atp_record.available_quantity - greatest(0, l_requested_date_quantity);
9866: ELSE
9867: IF PG_DEBUG in ('Y', 'C') THEN
9868: msc_sch_wb.atp_debug('ATP_Check: Available Quantity INFINITE');
9869: END IF;
9870: l_pegging_rec.supply_demand_quantity:= p_atp_record.available_quantity;
9871: END IF;
9872: END IF;

Line 9920: msc_sch_wb.atp_debug('Forward ATP, add pegging constriant');

9916:
9917: --s_cto_rearch
9918: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP, 2) = 2 THEN
9919: IF PG_DEBUG in ('Y', 'C') THEN
9920: msc_sch_wb.atp_debug('Forward ATP, add pegging constriant');
9921: END IF;
9922: l_pegging_rec.constraint_type := 1;
9923: END IF;
9924: l_pegging_rec.dest_inv_item_id := C_ITEM_INFO_REC.dest_inv_item_id;

Line 9965: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);

9961: -- that we know how to peg to the demand for the planned
9962: -- order that we are going to create for each child.
9963: --4902658/5216528
9964: IF PG_DEBUG in ('Y', 'C') THEN
9965: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
9966: END IF;
9967:
9968: l_parent_pegging_id := l_pegging_id;
9969: -- Bug 2814872

Line 9971: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);

9967:
9968: l_parent_pegging_id := l_pegging_id;
9969: -- Bug 2814872
9970: IF PG_DEBUG in ('Y', 'C') THEN
9971: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
9972: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
9973: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
9974: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
9975: l_atp_date_quantity_this_level);

Line 9972: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);

9968: l_parent_pegging_id := l_pegging_id;
9969: -- Bug 2814872
9970: IF PG_DEBUG in ('Y', 'C') THEN
9971: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
9972: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
9973: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
9974: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
9975: l_atp_date_quantity_this_level);
9976: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||

Line 9973: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);

9969: -- Bug 2814872
9970: IF PG_DEBUG in ('Y', 'C') THEN
9971: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
9972: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
9973: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
9974: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
9975: l_atp_date_quantity_this_level);
9976: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
9977: l_used_available_quantity);

Line 9974: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||

9970: IF PG_DEBUG in ('Y', 'C') THEN
9971: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
9972: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
9973: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
9974: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
9975: l_atp_date_quantity_this_level);
9976: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
9977: l_used_available_quantity);
9978: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||

Line 9976: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||

9972: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
9973: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
9974: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
9975: l_atp_date_quantity_this_level);
9976: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
9977: l_used_available_quantity);
9978: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||
9979: p_atp_record.Quantity_Ordered);
9980: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );

Line 9978: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||

9974: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
9975: l_atp_date_quantity_this_level);
9976: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
9977: l_used_available_quantity);
9978: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||
9979: p_atp_record.Quantity_Ordered);
9980: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );
9981: msc_sch_wb.atp_debug('ATP_Check: Count of Subs Items '|| l_substitutes_rec.inventory_item_id.count );
9982: END IF;

Line 9980: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );

9976: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
9977: l_used_available_quantity);
9978: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||
9979: p_atp_record.Quantity_Ordered);
9980: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );
9981: msc_sch_wb.atp_debug('ATP_Check: Count of Subs Items '|| l_substitutes_rec.inventory_item_id.count );
9982: END IF;
9983: l_tmp_parent_pegging_id := l_parent_pegging_id;
9984: --4902658/5216528

Line 9981: msc_sch_wb.atp_debug('ATP_Check: Count of Subs Items '|| l_substitutes_rec.inventory_item_id.count );

9977: l_used_available_quantity);
9978: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||
9979: p_atp_record.Quantity_Ordered);
9980: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );
9981: msc_sch_wb.atp_debug('ATP_Check: Count of Subs Items '|| l_substitutes_rec.inventory_item_id.count );
9982: END IF;
9983: l_tmp_parent_pegging_id := l_parent_pegging_id;
9984: --4902658/5216528
9985: for l_index in 1..l_substitutes_rec.inventory_item_id.count

Line 9990: msc_sch_wb.atp_debug('Substitute Loop Starts with l_index := ' || l_index);

9986: LOOP
9987:
9988: IF l_substitutes_rec.inventory_item_id.count > 1 THEN
9989: IF PG_DEBUG in ('Y', 'C') THEN
9990: msc_sch_wb.atp_debug('Substitute Loop Starts with l_index := ' || l_index);
9991: END IF;
9992: END IF;
9993:
9994: IF (l_net_demand <= 0) then

Line 10021: msc_sch_wb.atp_debug('ATP_Check: ' ||

10017: (l_atp_date_quantity_this_level >= p_atp_record.Quantity_Ordered) AND
10018: (l_atp_date_this_level = l_sysdate ) AND (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2)) THEN
10019: --diag_atp: we dont want to stop in case of diag ATP. We still want to explode sources
10020: IF PG_DEBUG in ('Y', 'C') THEN
10021: msc_sch_wb.atp_debug('ATP_Check: ' ||
10022: 'Past Due Order Satisfied on Sysdate, Stop unless dia_atp ');
10023: END IF;
10024: p_atp_record.error_code := ATP_REQ_DATE_FAIL;
10025: --END IF;

Line 10034: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');

10030: ELSIF NOT (p_search = BACKWARD_SCHEDULING AND l_requested_ship_date < l_ptf_date
10031: AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2) THEN
10032:
10033: IF PG_DEBUG in ('Y', 'C') THEN
10034: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');
10035: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10036: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);
10037: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10038: END IF;

Line 10035: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);

10031: AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2) THEN
10032:
10033: IF PG_DEBUG in ('Y', 'C') THEN
10034: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');
10035: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10036: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);
10037: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10038: END IF;
10039: --s_cto_rearch

Line 10036: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);

10032:
10033: IF PG_DEBUG in ('Y', 'C') THEN
10034: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');
10035: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10036: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);
10037: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10038: END IF;
10039: --s_cto_rearch
10040: l_item_sourcing_info_rec := l_null_item_sourcing_info_rec;

Line 10037: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);

10033: IF PG_DEBUG in ('Y', 'C') THEN
10034: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');
10035: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10036: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);
10037: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10038: END IF;
10039: --s_cto_rearch
10040: l_item_sourcing_info_rec := l_null_item_sourcing_info_rec;
10041: l_item_sourcing_info_rec.sr_inventory_item_id.extend;

Line 10059: msc_sch_wb.atp_debug('ATP_Check: ' || 'ods atp, we always make');

10055:
10056: --if ods ATP and ATO model/item or if checking base model's capacity then we only make
10057: IF MSC_ATP_PVT.G_INV_CTP = 5 or l_check_model_capacity = 1 THEN
10058: IF PG_DEBUG in ('Y', 'C') THEN
10059: msc_sch_wb.atp_debug('ATP_Check: ' || 'ods atp, we always make');
10060: END IF;
10061:
10062: --we should come here only for ATO models or ATO items
10063: l_sources.Source_Type := MRP_ATP_PUB.number_arr(2); -- make

Line 10098: msc_sch_wb.atp_debug('ATP_Check: ' || 'after atp_sources');

10094:
10095: END IF;
10096: --e_cto_rearch
10097: IF PG_DEBUG in ('Y', 'C') THEN
10098: msc_sch_wb.atp_debug('ATP_Check: ' || 'after atp_sources');
10099: END IF;
10100:
10101: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR Then
10102: --- Model has option specific sources which do not match with sourcing of model

Line 10117: msc_sch_wb.atp_debug('ATP_Check: ' || 'no sources');

10113: l_sources.source_type.count = 0 THEN
10114: -- no sources in supply chain bill, then we assume
10115: -- it has "make at" type
10116: IF PG_DEBUG in ('Y', 'C') THEN
10117: msc_sch_wb.atp_debug('ATP_Check: ' || 'no sources');
10118: END IF;
10119: --- select make buy code to decide if we want to make it or buy it
10120: --EFTC Changes
10121: BEGIN

Line 10131: msc_sch_wb.atp_debug('ATP_Check: ' || 'make-buy Code = '|| l_make_buy_cd);

10127: I.sr_instance_id = p_atp_record.instance_id and
10128: I.organization_id = p_atp_record.organization_id and
10129: I.plan_id = p_plan_id ;
10130: IF PG_DEBUG in ('Y', 'C') THEN
10131: msc_sch_wb.atp_debug('ATP_Check: ' || 'make-buy Code = '|| l_make_buy_cd);
10132: END IF;
10133: EXCEPTION
10134: WHEN OTHERS THEN
10135: l_make_buy_cd := 1; --- make 'make' default

Line 10159: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have buy source');

10155: l_sources.Sup_Cap_Type := MRP_ATP_PUB.number_arr(2); -- ship_rec_cal
10156:
10157: -- dsting
10158: IF PG_DEBUG in ('Y', 'C') THEN
10159: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have buy source');
10160: END IF;
10161: p_atp_record.children_type := MAKE_BUY_CHILDREN;
10162: ELSE
10163: l_sources.Source_Type := MRP_ATP_PUB.number_arr(2); -- make

Line 10179: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have make source');

10175: l_sources.Sup_Cap_Type := MRP_ATP_PUB.number_arr(2); -- ship_rec_cal
10176:
10177: -- dsting
10178: IF PG_DEBUG in ('Y', 'C') THEN
10179: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have make source');
10180: END IF;
10181: p_atp_record.children_type := MAKE_BUY_CHILDREN;
10182: END IF;
10183:

Line 10193: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_ptf_date := ' || l_parent_ptf_date);

10189:
10190: --- we store parent_ptf in a local varibale as it might get changed
10191: l_parent_ptf_date := NVL(MSC_ATP_PVT.G_PTF_DATE, l_ptf_date);
10192: IF PG_DEBUG in ('Y', 'C') THEN
10193: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_ptf_date := ' || l_parent_ptf_date);
10194: END IF;
10195: WHILE (j IS NOT NULL) LOOP
10196:
10197: -- Bug 3667729 - Reset G_ITEM_INFO_REC as it may have changed in last source.

Line 10207: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside while loop for the children');

10203: --bug 2178544: Since the ptf flag may be chnaged by transfer org, we reassign it for the curent plan
10204: MSC_ATP_PVT.G_PTF_DATE := l_parent_ptf_date;
10205:
10206: IF PG_DEBUG in ('Y', 'C') THEN
10207: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside while loop for the children');
10208: END IF;
10209:
10210: /* ship_rec_cal changes begin */
10211: -- populate calendar codes in l_atp_rec

Line 10213: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');

10209:
10210: /* ship_rec_cal changes begin */
10211: -- populate calendar codes in l_atp_rec
10212: IF PG_DEBUG in ('Y', 'C') THEN
10213: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10214: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10215: msc_sch_wb.atp_debug('* ');
10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );

Line 10214: msc_sch_wb.atp_debug('* ___________________Input_____________________');

10210: /* ship_rec_cal changes begin */
10211: -- populate calendar codes in l_atp_rec
10212: IF PG_DEBUG in ('Y', 'C') THEN
10213: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10214: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10215: msc_sch_wb.atp_debug('* ');
10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );

Line 10215: msc_sch_wb.atp_debug('* ');

10211: -- populate calendar codes in l_atp_rec
10212: IF PG_DEBUG in ('Y', 'C') THEN
10213: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10214: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10215: msc_sch_wb.atp_debug('* ');
10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );

Line 10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );

10212: IF PG_DEBUG in ('Y', 'C') THEN
10213: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10214: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10215: msc_sch_wb.atp_debug('* ');
10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );

Line 10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );

10213: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10214: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10215: msc_sch_wb.atp_debug('* ');
10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );

Line 10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );

10214: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10215: msc_sch_wb.atp_debug('* ');
10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );

Line 10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );

10215: msc_sch_wb.atp_debug('* ');
10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );

Line 10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );

10216: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10224: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );

Line 10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );

10217: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10224: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10225: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );

Line 10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );

10218: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10224: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10225: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10226: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );

Line 10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );

10219: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10224: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10225: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10226: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );
10227: END IF;

Line 10224: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );

10220: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10224: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10225: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10226: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );
10227: END IF;
10228:

Line 10225: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );

10221: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10224: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10225: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10226: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );
10227: END IF;
10228:
10229: IF l_sources.source_type(j) = MAKE THEN

Line 10226: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );

10222: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10223: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10224: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10225: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10226: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );
10227: END IF;
10228:
10229: IF l_sources.source_type(j) = MAKE THEN
10230:

Line 10269: msc_sch_wb.atp_debug('Lead time := ' || l_atp_rec.delivery_lead_time);

10265: l_sources.Ship_Method(j) := l_atp_rec.ship_method;
10266: l_sources.lead_time(j) := l_atp_rec.delivery_lead_time;
10267:
10268: IF PG_DEBUG in ('Y', 'C') THEN
10269: msc_sch_wb.atp_debug('Lead time := ' || l_atp_rec.delivery_lead_time);
10270: msc_sch_wb.atp_debug('Ship Method := ' || l_atp_rec.ship_method);
10271: END IF;
10272: END IF;
10273:

Line 10270: msc_sch_wb.atp_debug('Ship Method := ' || l_atp_rec.ship_method);

10266: l_sources.lead_time(j) := l_atp_rec.delivery_lead_time;
10267:
10268: IF PG_DEBUG in ('Y', 'C') THEN
10269: msc_sch_wb.atp_debug('Lead time := ' || l_atp_rec.delivery_lead_time);
10270: msc_sch_wb.atp_debug('Ship Method := ' || l_atp_rec.ship_method);
10271: END IF;
10272: END IF;
10273:
10274: -- Bug 3737759 - Moved from below

Line 10324: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_USE_SHIP_REC_CAL is N');

10320: MSC_CALENDAR.OSC);
10321: ELSE
10322: -- Bug 3593394
10323: IF PG_DEBUG in ('Y', 'C') THEN
10324: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_USE_SHIP_REC_CAL is N');
10325: END IF;
10326: -- Bug 3737759 - Use receiving org's OMC - l_atp_rec.receiving_cal_code := MSC_CALENDAR.FOC;
10327: l_atp_rec.receiving_cal_code := p_atp_record.manufacturing_cal_code;
10328: l_atp_rec.intransit_cal_code := MSC_CALENDAR.FOC;

Line 10390: msc_sch_wb.atp_debug('ATP_Check: Use SMC irrespective of profile G_USE_SHIP_REC_CAL');

10386: l_atp_rec.ship_method,
10387: l_atp_rec.delivery_lead_time);
10388:
10389: IF PG_DEBUG in ('Y', 'C') THEN
10390: msc_sch_wb.atp_debug('ATP_Check: Use SMC irrespective of profile G_USE_SHIP_REC_CAL');
10391: END IF;
10392: --l_atp_rec.manufacturing_cal_code := p_atp_record.manufacturing_cal_code;
10393: --Bug 3687353: Use SMC irrespective of profile MSC_ATP_PVT.G_USE_SHIP_REC_CAL
10394:

Line 10468: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_USE_SHIP_REC_CAL is N');

10464: ELSE
10465:
10466: -- Bug 3593394
10467: IF PG_DEBUG in ('Y', 'C') THEN
10468: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_USE_SHIP_REC_CAL is N');
10469: END IF;
10470: -- Bug 3737759 - Use receiving org's OMC - l_atp_rec.receiving_cal_code := MSC_CALENDAR.FOC;
10471: l_atp_rec.receiving_cal_code := p_atp_record.manufacturing_cal_code;
10472: l_atp_rec.intransit_cal_code := MSC_CALENDAR.FOC;

Line 10481: msc_sch_wb.atp_debug(' ');

10477:
10478: END IF;
10479: END IF;
10480: IF PG_DEBUG in ('Y', 'C') THEN
10481: msc_sch_wb.atp_debug(' ');
10482: msc_sch_wb.atp_debug('* ___________________Output____________________');
10483: msc_sch_wb.atp_debug('* ');
10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);

Line 10482: msc_sch_wb.atp_debug('* ___________________Output____________________');

10478: END IF;
10479: END IF;
10480: IF PG_DEBUG in ('Y', 'C') THEN
10481: msc_sch_wb.atp_debug(' ');
10482: msc_sch_wb.atp_debug('* ___________________Output____________________');
10483: msc_sch_wb.atp_debug('* ');
10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
10486: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);

Line 10483: msc_sch_wb.atp_debug('* ');

10479: END IF;
10480: IF PG_DEBUG in ('Y', 'C') THEN
10481: msc_sch_wb.atp_debug(' ');
10482: msc_sch_wb.atp_debug('* ___________________Output____________________');
10483: msc_sch_wb.atp_debug('* ');
10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
10486: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
10487: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);

Line 10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);

10480: IF PG_DEBUG in ('Y', 'C') THEN
10481: msc_sch_wb.atp_debug(' ');
10482: msc_sch_wb.atp_debug('* ___________________Output____________________');
10483: msc_sch_wb.atp_debug('* ');
10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
10486: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
10487: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
10488: msc_sch_wb.atp_debug('**************************************************************');

Line 10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);

10481: msc_sch_wb.atp_debug(' ');
10482: msc_sch_wb.atp_debug('* ___________________Output____________________');
10483: msc_sch_wb.atp_debug('* ');
10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
10486: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
10487: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
10488: msc_sch_wb.atp_debug('**************************************************************');
10489: END IF;

Line 10486: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);

10482: msc_sch_wb.atp_debug('* ___________________Output____________________');
10483: msc_sch_wb.atp_debug('* ');
10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
10486: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
10487: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
10488: msc_sch_wb.atp_debug('**************************************************************');
10489: END IF;
10490:

Line 10487: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);

10483: msc_sch_wb.atp_debug('* ');
10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
10486: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
10487: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
10488: msc_sch_wb.atp_debug('**************************************************************');
10489: END IF;
10490:
10491: /* planned order due date as per OMC-D */

Line 10488: msc_sch_wb.atp_debug('**************************************************************');

10484: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
10485: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
10486: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
10487: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
10488: msc_sch_wb.atp_debug('**************************************************************');
10489: END IF;
10490:
10491: /* planned order due date as per OMC-D */
10492: l_planned_order_date := MSC_CALENDAR.PREV_WORK_DAY(

Line 10497: msc_sch_wb.atp_debug('* Planned Order Due Date as per OMC-D: ' || l_planned_order_date);

10493: p_atp_record.manufacturing_cal_code,
10494: p_atp_record.instance_id,
10495: l_requested_ship_date);
10496: IF PG_DEBUG in ('Y', 'C') THEN
10497: msc_sch_wb.atp_debug('* Planned Order Due Date as per OMC-D: ' || l_planned_order_date);
10498: END IF;
10499: -- ship_rec_cal changes end
10500:
10501: IF ((l_sources.source_type(j) = MAKE) or

Line 10506: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have make/buy source');

10502: (l_sources.source_type(j) = BUY))
10503: THEN
10504: -- dsting
10505: IF PG_DEBUG in ('Y', 'C') THEN
10506: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have make/buy source');
10507: END IF;
10508: p_atp_record.children_type := MAKE_BUY_CHILDREN;
10509: G_HAVE_MAKE_BUY_PARENT := 1;
10510: END IF;

Line 10632: msc_Sch_wb.atp_debug('Transfer case: bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);

10628:
10629: ELSE
10630: --s_cto_rearch
10631: IF PG_DEBUG in ('Y', 'C') THEN
10632: msc_Sch_wb.atp_debug('Transfer case: bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10633: msc_Sch_wb.atp_debug('Transfer case: parent_repl_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10634:
10635: END IF;
10636: IF C_ITEM_INFO_REC.bom_item_type in (1, 2) and C_ITEM_INFO_REC.replenish_to_ord_flag = 'Y' THEN

Line 10633: msc_Sch_wb.atp_debug('Transfer case: parent_repl_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);

10629: ELSE
10630: --s_cto_rearch
10631: IF PG_DEBUG in ('Y', 'C') THEN
10632: msc_Sch_wb.atp_debug('Transfer case: bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10633: msc_Sch_wb.atp_debug('Transfer case: parent_repl_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10634:
10635: END IF;
10636: IF C_ITEM_INFO_REC.bom_item_type in (1, 2) and C_ITEM_INFO_REC.replenish_to_ord_flag = 'Y' THEN
10637: IF PG_DEBUG in ('Y', 'C') THEN

Line 10638: msc_Sch_wb.atp_debug('This is model entity. Pass Line IDs');

10634:
10635: END IF;
10636: IF C_ITEM_INFO_REC.bom_item_type in (1, 2) and C_ITEM_INFO_REC.replenish_to_ord_flag = 'Y' THEN
10637: IF PG_DEBUG in ('Y', 'C') THEN
10638: msc_Sch_wb.atp_debug('This is model entity. Pass Line IDs');
10639: END IF;
10640: --if model then pass the
10641: l_atp_rec.Top_Model_line_id := p_atp_record.Top_Model_line_id;
10642: l_atp_rec.ATO_Parent_Model_Line_Id := p_atp_record.ATO_Parent_Model_Line_Id;

Line 10708: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');

10704: );
10705:
10706: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10707: IF PG_DEBUG in ('Y', 'C') THEN
10708: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
10709: END IF;
10710: x_return_status := FND_API.G_RET_STS_ERROR;
10711: RAISE FND_API.G_EXC_ERROR;
10712: END IF;

Line 10746: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan not found for : '||

10742: -- 24x7 ATP
10743: -- IF (l_plan_id is NULL) or (l_plan_id = -100) THEN
10744: IF NVL(l_plan_id, -1) = -1 or (l_plan_id = -100 ) THEN
10745: IF PG_DEBUG in ('Y', 'C') THEN
10746: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan not found for : '||
10747: l_atp_rec.inventory_item_id
10748: ||' in org : '||l_atp_rec.organization_id);
10749: END IF;
10750: ELSIF l_plan_id = -300 then

Line 10752: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime in plan for' ||

10748: ||' in org : '||l_atp_rec.organization_id);
10749: END IF;
10750: ELSIF l_plan_id = -300 then
10751: IF PG_DEBUG in ('Y', 'C') THEN
10752: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime in plan for' ||
10753: l_atp_rec.inventory_item_id
10754: ||' in org : '||l_atp_rec.organization_id);
10755: END IF;
10756: --bug 2854351

Line 10785: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

10781: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN --bug3397904
10782:
10783: l_PO_qty := CEIL(p_atp_record.quantity_ordered);
10784: IF PG_DEBUG in ('Y', 'C') THEN
10785: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
10786: END IF;
10787: ELSE
10788: l_PO_qty := CEIL(l_net_demand);
10789: IF PG_DEBUG in ('Y', 'C') THEN

Line 10790: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

10786: END IF;
10787: ELSE
10788: l_PO_qty := CEIL(l_net_demand);
10789: IF PG_DEBUG in ('Y', 'C') THEN
10790: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
10791: END IF;
10792: END IF;
10793: ELSE
10794: --bug 3904063: Reset the quantity only in case of demand priorit allocated ATP

Line 10802: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

10798: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN --bug3397904
10799:
10800: l_PO_qty := trunc(p_atp_record.quantity_ordered, 6); --5598066
10801: IF PG_DEBUG in ('Y', 'C') THEN
10802: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
10803: END IF;
10804: ELSE
10805: l_PO_qty := trunc(l_net_demand, 6); -- 5598066
10806: IF PG_DEBUG in ('Y', 'C') THEN

Line 10807: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

10803: END IF;
10804: ELSE
10805: l_PO_qty := trunc(l_net_demand, 6); -- 5598066
10806: IF PG_DEBUG in ('Y', 'C') THEN
10807: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
10808: END IF;
10809: END IF;
10810: END IF;
10811: --bug3397904 end

Line 10827: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

10823: l_atp_rec.requested_ship_date := NULL;
10824: l_atp_rec.requested_arrival_date := NULL;
10825:
10826: IF PG_DEBUG in ('Y', 'C') THEN
10827: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
10828: END IF;
10829:
10830: --- 2178544 calculate start date
10831: --diag_atp

Line 10838: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');

10834: l_trunc_started := 2;
10835: IF l_sources.source_type(j) = TRANSFER THEN
10836:
10837: IF PG_DEBUG in ('Y', 'C') THEN
10838: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
10839: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);

Line 10839: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);

10835: IF l_sources.source_type(j) = TRANSFER THEN
10836:
10837: IF PG_DEBUG in ('Y', 'C') THEN
10838: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
10839: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));

Line 10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);

10836:
10837: IF PG_DEBUG in ('Y', 'C') THEN
10838: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
10839: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
10844: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );

Line 10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);

10837: IF PG_DEBUG in ('Y', 'C') THEN
10838: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
10839: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
10844: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10845: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );

Line 10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);

10838: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
10839: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
10844: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10845: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10846: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);

Line 10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));

10839: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
10844: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10845: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10846: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
10847: END IF;

Line 10844: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );

10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
10844: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10845: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10846: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
10847: END IF;
10848:

Line 10845: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );

10841: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
10844: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10845: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10846: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
10847: END IF;
10848:
10849: -- Bug 3782472 - calculate ptf date for lower level

Line 10846: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);

10842: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
10843: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
10844: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10845: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10846: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
10847: END IF;
10848:
10849: -- Bug 3782472 - calculate ptf date for lower level
10850: l_ptf_date_for_child := MSC_CALENDAR.DATE_OFFSET (

Line 10856: msc_sch_wb.atp_debug('ATP_Check: ' ||

10852: p_atp_record.instance_id,
10853: l_parent_ptf_date,
10854: -1 * l_post_pro_lt, -1);
10855: IF PG_DEBUG in ('Y', 'C') THEN
10856: msc_sch_wb.atp_debug('ATP_Check: ' ||
10857: 'After Man. Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10858: END IF;
10859: l_ptf_date_for_child := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(
10860: l_ptf_date_for_child, l_atp_rec.receiving_cal_code, -1,

Line 10864: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );

10860: l_ptf_date_for_child, l_atp_rec.receiving_cal_code, -1,
10861: l_atp_rec.intransit_cal_code, -1 * l_atp_rec.delivery_lead_time, -1,
10862: l_atp_rec.shipping_cal_code, -1, p_atp_record.instance_id);
10863: IF PG_DEBUG in ('Y', 'C') THEN
10864: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10865: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10866: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10867: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
10868: END IF;

Line 10865: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );

10861: l_atp_rec.intransit_cal_code, -1 * l_atp_rec.delivery_lead_time, -1,
10862: l_atp_rec.shipping_cal_code, -1, p_atp_record.instance_id);
10863: IF PG_DEBUG in ('Y', 'C') THEN
10864: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10865: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10866: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10867: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
10868: END IF;
10869:

Line 10866: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );

10862: l_atp_rec.shipping_cal_code, -1, p_atp_record.instance_id);
10863: IF PG_DEBUG in ('Y', 'C') THEN
10864: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10865: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10866: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10867: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
10868: END IF;
10869:
10870: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child,l_ptf_date,MSC_ATP_PVT.g_ptf_date); --5053993

Line 10867: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);

10863: IF PG_DEBUG in ('Y', 'C') THEN
10864: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10865: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
10866: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
10867: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
10868: END IF;
10869:
10870: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child,l_ptf_date,MSC_ATP_PVT.g_ptf_date); --5053993
10871:

Line 10873: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Offset MSC_ATP_PVT.G_PTF_DATE := '

10869:
10870: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child,l_ptf_date,MSC_ATP_PVT.g_ptf_date); --5053993
10871:
10872: IF PG_DEBUG in ('Y', 'C') THEN
10873: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Offset MSC_ATP_PVT.G_PTF_DATE := '
10874: ||MSC_ATP_PVT.G_PTF_DATE );
10875: END IF;
10876:
10877: /* ship_rec_cal changes begin */

Line 10885: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);

10881: l_requested_ship_date,
10882: -1 * l_post_pro_lt, -1);
10883:
10884: IF PG_DEBUG in ('Y', 'C') THEN
10885: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
10886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
10887: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
10888: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);
10889: END IF;

Line 10886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

10882: -1 * l_post_pro_lt, -1);
10883:
10884: IF PG_DEBUG in ('Y', 'C') THEN
10885: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
10886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
10887: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
10888: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);
10889: END IF;
10890:

Line 10887: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');

10883:
10884: IF PG_DEBUG in ('Y', 'C') THEN
10885: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
10886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
10887: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
10888: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);
10889: END IF;
10890:
10891: l_dock_date := MSC_CALENDAR.PREV_WORK_DAY(

Line 10888: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);

10884: IF PG_DEBUG in ('Y', 'C') THEN
10885: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
10886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
10887: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
10888: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);
10889: END IF;
10890:
10891: l_dock_date := MSC_CALENDAR.PREV_WORK_DAY(
10892: l_atp_rec.receiving_cal_code,

Line 10900: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_dock_date);

10896: org modeled as supplier which might come in future*/
10897: l_new_dock_date := l_dock_date;
10898:
10899: IF PG_DEBUG in ('Y', 'C') THEN
10900: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_dock_date);
10901: END IF;
10902:
10903: l_start_date := MSC_CALENDAR.DATE_OFFSET (
10904: l_atp_rec.intransit_cal_code,

Line 10910: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);

10906: l_dock_date,
10907: -1 * l_atp_rec.delivery_lead_time, -1);
10908: -- Bug No 4592289/4667756/5053993 Start
10909: IF PG_DEBUG in ('Y', 'C') THEN
10910: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
10911: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
10912: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
10913: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10914: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);

Line 10911: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);

10907: -1 * l_atp_rec.delivery_lead_time, -1);
10908: -- Bug No 4592289/4667756/5053993 Start
10909: IF PG_DEBUG in ('Y', 'C') THEN
10910: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
10911: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
10912: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
10913: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10914: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10915: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);

Line 10912: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);

10908: -- Bug No 4592289/4667756/5053993 Start
10909: IF PG_DEBUG in ('Y', 'C') THEN
10910: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
10911: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
10912: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
10913: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10914: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10915: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10916: END IF;

Line 10913: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);

10909: IF PG_DEBUG in ('Y', 'C') THEN
10910: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
10911: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
10912: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
10913: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10914: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10915: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10916: END IF;
10917: IF l_PTF_DATE < MSC_ATP_PVT.G_PTF_DATE THEN

Line 10914: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);

10910: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
10911: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
10912: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
10913: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10914: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10915: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10916: END IF;
10917: IF l_PTF_DATE < MSC_ATP_PVT.G_PTF_DATE THEN
10918: MSC_ATP_PVT.G_PTF_DATE := MSC_CALENDAR.DATE_OFFSET (l_atp_rec.intransit_cal_code,

Line 10915: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);

10911: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
10912: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
10913: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
10914: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
10915: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
10916: END IF;
10917: IF l_PTF_DATE < MSC_ATP_PVT.G_PTF_DATE THEN
10918: MSC_ATP_PVT.G_PTF_DATE := MSC_CALENDAR.DATE_OFFSET (l_atp_rec.intransit_cal_code,
10919: p_atp_record.instance_id,

Line 10923: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset : '||MSC_ATP_PVT.G_PTF_DATE);

10919: p_atp_record.instance_id,
10920: MSC_ATP_PVT.G_PTF_DATE ,
10921: -1 * l_atp_rec.delivery_lead_time, -1); -- Bug No: 4592289/4667756
10922: IF PG_DEBUG in ('Y', 'C') THEN
10923: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset : '||MSC_ATP_PVT.G_PTF_DATE);
10924: END IF;
10925: else
10926: G_PTF_DATE := l_PTF_DATE;
10927: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after assign : '||MSC_ATP_PVT.G_PTF_DATE );

Line 10927: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after assign : '||MSC_ATP_PVT.G_PTF_DATE );

10923: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset : '||MSC_ATP_PVT.G_PTF_DATE);
10924: END IF;
10925: else
10926: G_PTF_DATE := l_PTF_DATE;
10927: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after assign : '||MSC_ATP_PVT.G_PTF_DATE );
10928: END IF;
10929: MSC_ATP_PVT.G_PTF_DATE := MSC_CALENDAR.NEXT_WORK_DAY(
10930: l_atp_rec.shipping_cal_code,
10931: p_atp_record.instance_id,

Line 10934: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset(Shipping cal) : '||MSC_ATP_PVT.G_PTF_DATE);

10930: l_atp_rec.shipping_cal_code,
10931: p_atp_record.instance_id,
10932: MSC_ATP_PVT.G_PTF_DATE );
10933: IF PG_DEBUG in ('Y', 'C') THEN
10934: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset(Shipping cal) : '||MSC_ATP_PVT.G_PTF_DATE);
10935: END IF;
10936:
10937: -- Bug No 4592289/4667756/5053993 Ends
10938:

Line 10940: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting DLT using VIC : '||l_start_date);

10936:
10937: -- Bug No 4592289/4667756/5053993 Ends
10938:
10939: IF PG_DEBUG in ('Y', 'C') THEN
10940: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting DLT using VIC : '||l_start_date);
10941: END IF;
10942:
10943: l_atp_rec.requested_ship_date := MSC_CALENDAR.PREV_WORK_DAY(
10944: l_atp_rec.shipping_cal_code,

Line 10955: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC : '||l_atp_rec.requested_ship_date);

10951: l_start_date := l_new_ship_date; -- Bug 3412143 -- Setting the variable that is compared with PTF date
10952: -- This should be source org's ship date.
10953:
10954: IF PG_DEBUG in ('Y', 'C') THEN
10955: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC : '||l_atp_rec.requested_ship_date);
10956: END IF;
10957:
10958: l_order_date := MSC_CALENDAR.DATE_OFFSET (
10959: p_atp_record.manufacturing_cal_code,

Line 10965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);

10961: l_atp_rec.requested_ship_date,
10962: -1 * MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt, -1);
10963:
10964: IF PG_DEBUG in ('Y', 'C') THEN
10965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);
10966: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
10967: END IF;
10968: -- ship_rec_cal changes end
10969:

Line 10966: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');

10962: -1 * MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt, -1);
10963:
10964: IF PG_DEBUG in ('Y', 'C') THEN
10965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);
10966: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
10967: END IF;
10968: -- ship_rec_cal changes end
10969:
10970: IF PG_DEBUG in ('Y', 'C') THEN

Line 10971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date '||l_atp_rec.requested_ship_date);

10967: END IF;
10968: -- ship_rec_cal changes end
10969:
10970: IF PG_DEBUG in ('Y', 'C') THEN
10971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date '||l_atp_rec.requested_ship_date);
10972: END IF;
10973:
10974: IF (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 or p_search = forward_scheduling) and
10975: -- ship_rec_cal

Line 10983: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');

10979: (l_start_date < l_ptf_date or l_order_date < l_trunc_sysdate) THEN
10980:
10981: /* ship_rec_cal changes begin*/
10982: IF PG_DEBUG in ('Y', 'C') THEN
10983: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');
10984: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);
10985: END IF;
10986:
10987: /* Bug 3412143 - Earlier ptf_due_date was calculated as

Line 10984: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);

10980:
10981: /* ship_rec_cal changes begin*/
10982: IF PG_DEBUG in ('Y', 'C') THEN
10983: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');
10984: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);
10985: END IF;
10986:
10987: /* Bug 3412143 - Earlier ptf_due_date was calculated as
10988: ptf_due_date := ptf_date + pre-processing lead time + delivery lead time + post-processing lead time

Line 10998: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_ptf_due_date);

10994: l_ptf_date,
10995: MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt, 1);
10996:
10997: IF PG_DEBUG in ('Y', 'C') THEN
10998: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_ptf_due_date);
10999: END IF;
11000: */
11001:
11002: l_ptf_due_date := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(

Line 11008: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');

11004: l_atp_rec.intransit_cal_code, nvl(l_atp_rec.delivery_lead_time, 0), +1,
11005: l_atp_rec.receiving_cal_code, +1, p_atp_record.instance_id);
11006:
11007: IF PG_DEBUG in ('Y', 'C') THEN
11008: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');
11009: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_ptf_due_date);
11010: END IF;
11011:
11012: l_ptf_due_date := MSC_CALENDAR.DATE_OFFSET (

Line 11009: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_ptf_due_date);

11005: l_atp_rec.receiving_cal_code, +1, p_atp_record.instance_id);
11006:
11007: IF PG_DEBUG in ('Y', 'C') THEN
11008: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');
11009: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_ptf_due_date);
11010: END IF;
11011:
11012: l_ptf_due_date := MSC_CALENDAR.DATE_OFFSET (
11013: p_atp_record.manufacturing_cal_code, -- using OMC destination

Line 11019: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);

11015: l_ptf_due_date,
11016: l_post_pro_lt, 1);
11017:
11018: IF PG_DEBUG in ('Y', 'C') THEN
11019: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11020: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11021: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11022: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11023: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);

Line 11020: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');

11016: l_post_pro_lt, 1);
11017:
11018: IF PG_DEBUG in ('Y', 'C') THEN
11019: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11020: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11021: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11022: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11023: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);
11024: END IF;

Line 11021: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');

11017:
11018: IF PG_DEBUG in ('Y', 'C') THEN
11019: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11020: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11021: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11022: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11023: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);
11024: END IF;
11025:

Line 11022: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');

11018: IF PG_DEBUG in ('Y', 'C') THEN
11019: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11020: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11021: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11022: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11023: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);
11024: END IF;
11025:
11026: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET (

Line 11023: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);

11019: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11020: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11021: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11022: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11023: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);
11024: END IF;
11025:
11026: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET (
11027: p_atp_record.manufacturing_cal_code,

Line 11040: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_lt_due_date);

11036: -- the output of ATP_Check will anyway be validated on OSC.
11037: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_lt_due_date, MSC_ATP_PVT.G_PTF_DATE);
11038:
11039: IF PG_DEBUG in ('Y', 'C') THEN
11040: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_lt_due_date);
11041: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting PTF for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11042: END IF;
11043:
11044: l_lt_due_date := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(

Line 11041: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting PTF for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

11037: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_lt_due_date, MSC_ATP_PVT.G_PTF_DATE);
11038:
11039: IF PG_DEBUG in ('Y', 'C') THEN
11040: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_lt_due_date);
11041: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting PTF for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11042: END IF;
11043:
11044: l_lt_due_date := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(
11045: l_lt_due_date, l_atp_rec.shipping_cal_code, +1,

Line 11050: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');

11046: l_atp_rec.intransit_cal_code, nvl(l_atp_rec.delivery_lead_time, 0), +1,
11047: l_atp_rec.receiving_cal_code, +1, p_atp_record.instance_id);
11048:
11049: IF PG_DEBUG in ('Y', 'C') THEN
11050: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');
11051: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_lt_due_date);
11052: END IF;
11053:
11054: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET (

Line 11051: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_lt_due_date);

11047: l_atp_rec.receiving_cal_code, +1, p_atp_record.instance_id);
11048:
11049: IF PG_DEBUG in ('Y', 'C') THEN
11050: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');
11051: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_lt_due_date);
11052: END IF;
11053:
11054: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET (
11055: p_atp_record.manufacturing_cal_code, -- using OMC destination

Line 11061: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);

11057: l_lt_due_date,
11058: l_post_pro_lt, 1);
11059:
11060: IF PG_DEBUG in ('Y', 'C') THEN
11061: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);
11062: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11063: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11064: END IF;
11065: /* ship_rec_cal end */

Line 11062: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');

11058: l_post_pro_lt, 1);
11059:
11060: IF PG_DEBUG in ('Y', 'C') THEN
11061: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);
11062: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11063: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11064: END IF;
11065: /* ship_rec_cal end */
11066:

Line 11063: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');

11059:
11060: IF PG_DEBUG in ('Y', 'C') THEN
11061: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);
11062: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11063: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11064: END IF;
11065: /* ship_rec_cal end */
11066:
11067: IF PG_DEBUG in ('Y', 'C') THEN

Line 11068: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);

11064: END IF;
11065: /* ship_rec_cal end */
11066:
11067: IF PG_DEBUG in ('Y', 'C') THEN
11068: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
11069: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);
11070: END IF;
11071:
11072:

Line 11069: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);

11065: /* ship_rec_cal end */
11066:
11067: IF PG_DEBUG in ('Y', 'C') THEN
11068: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
11069: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);
11070: END IF;
11071:
11072:
11073: -- Bug 3525582 - Constraint message should be added only if constraint actually exists

Line 11116: msc_sch_wb.atp_debug('ATP_Check: ' || 'last_cap_date: '||l_atp_rec.last_cap_date);

11112: AND s.supplier_id = l_sources.supplier_id(j)
11113: AND NVL(s.supplier_site_id, -1) = NVL(l_sources.supplier_site_id(j), -1);
11114:
11115: IF PG_DEBUG in ('Y', 'C') THEN
11116: msc_sch_wb.atp_debug('ATP_Check: ' || 'last_cap_date: '||l_atp_rec.last_cap_date);
11117: END IF;
11118: /* Enforce Pur LT - changes end */
11119:
11120:

Line 11129: msc_sch_wb.atp_debug('ATP_Check: ' || 'enforce_pur_lead_time: ' || G_PLAN_INFO_REC.enforce_pur_lead_time);

11125: l_requested_ship_date,
11126: -1 * l_post_pro_lt, -1);
11127:
11128: IF PG_DEBUG in ('Y', 'C') THEN
11129: msc_sch_wb.atp_debug('ATP_Check: ' || 'enforce_pur_lead_time: ' || G_PLAN_INFO_REC.enforce_pur_lead_time);
11130: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11131: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_start_date);
11132: END IF;
11133:

Line 11130: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');

11126: -1 * l_post_pro_lt, -1);
11127:
11128: IF PG_DEBUG in ('Y', 'C') THEN
11129: msc_sch_wb.atp_debug('ATP_Check: ' || 'enforce_pur_lead_time: ' || G_PLAN_INFO_REC.enforce_pur_lead_time);
11130: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11131: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_start_date);
11132: END IF;
11133:
11134: /* Enforce Pur LT - check if date is past due. dock date can be past due only if capacity is not defined. */

Line 11131: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_start_date);

11127:
11128: IF PG_DEBUG in ('Y', 'C') THEN
11129: msc_sch_wb.atp_debug('ATP_Check: ' || 'enforce_pur_lead_time: ' || G_PLAN_INFO_REC.enforce_pur_lead_time);
11130: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11131: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_start_date);
11132: END IF;
11133:
11134: /* Enforce Pur LT - check if date is past due. dock date can be past due only if capacity is not defined. */
11135: IF l_start_date < l_trunc_sysdate AND G_PLAN_INFO_REC.enforce_pur_lead_time = 2

Line 11140: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11136: AND l_atp_rec.last_cap_date IS NULL THEN
11137: l_trunc_started := 1;
11138: l_start_date := l_trunc_sysdate;
11139: IF PG_DEBUG in ('Y', 'C') THEN
11140: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11141: END IF;
11142: END IF;
11143:
11144: /* Enforce Pur LT - No need to calculate dates if trunc has started */

Line 11152: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_start_date);

11148: l_atp_rec.receiving_cal_code,
11149: p_atp_record.instance_id,
11150: l_start_date);
11151: IF PG_DEBUG in ('Y', 'C') THEN
11152: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_start_date);
11153: END IF;
11154: /* Enforce Pur LT - check if date is past due. dock date can be past due only
11155: if capacity is not defined. */
11156: IF l_start_date < l_trunc_sysdate AND G_PLAN_INFO_REC.enforce_pur_lead_time = 2

Line 11161: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11157: AND l_atp_rec.last_cap_date IS NULL THEN
11158: l_trunc_started := 1;
11159: l_start_date := l_trunc_sysdate;
11160: IF PG_DEBUG in ('Y', 'C') THEN
11161: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11162: END IF;
11163: END IF;
11164: END IF;
11165:

Line 11170: msc_sch_wb.atp_debug('ATP_Check: ' || 'Dock date : '||l_new_dock_date);

11166: /* populating new_dock_date */
11167: l_new_dock_date := l_start_date;
11168:
11169: IF PG_DEBUG in ('Y', 'C') THEN
11170: msc_sch_wb.atp_debug('ATP_Check: ' || 'Dock date : '||l_new_dock_date);
11171: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11172: END IF;
11173: /* ship_rec_cal changes end */
11174:

Line 11171: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');

11167: l_new_dock_date := l_start_date;
11168:
11169: IF PG_DEBUG in ('Y', 'C') THEN
11170: msc_sch_wb.atp_debug('ATP_Check: ' || 'Dock date : '||l_new_dock_date);
11171: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11172: END IF;
11173: /* ship_rec_cal changes end */
11174:
11175: --diag_atp: we calculate the supplier lead time here.

Line 11186: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Process_lead_time = '|| l_process_lt);

11182:
11183: l_process_lt := MSC_ATP_PVT.G_ITEM_INFO_REC.processing_lt;
11184: l_pre_pro_lt := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
11185: IF PG_DEBUG in ('Y', 'C') THEN
11186: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Process_lead_time = '|| l_process_lt);
11187: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt = ' || l_pre_pro_lt);
11188: END IF;
11189:
11190: IF (l_sources.Supplier_Id(j) <> -99) THEN

Line 11187: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt = ' || l_pre_pro_lt);

11183: l_process_lt := MSC_ATP_PVT.G_ITEM_INFO_REC.processing_lt;
11184: l_pre_pro_lt := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
11185: IF PG_DEBUG in ('Y', 'C') THEN
11186: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Process_lead_time = '|| l_process_lt);
11187: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt = ' || l_pre_pro_lt);
11188: END IF;
11189:
11190: IF (l_sources.Supplier_Id(j) <> -99) THEN
11191: -- Query changed to include lead_time_date

Line 11212: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);

11208: WHEN others THEN
11209: g_sup_cap_cum_date := null;
11210: END;
11211: IF PG_DEBUG in ('Y', 'C') THEN
11212: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11215: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11216: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));

Line 11213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);

11209: g_sup_cap_cum_date := null;
11210: END;
11211: IF PG_DEBUG in ('Y', 'C') THEN
11212: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11215: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11216: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11217: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));

Line 11214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);

11210: END;
11211: IF PG_DEBUG in ('Y', 'C') THEN
11212: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11215: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11216: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11217: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11218:

Line 11215: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);

11211: IF PG_DEBUG in ('Y', 'C') THEN
11212: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11215: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11216: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11217: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11218:
11219: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '

Line 11216: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));

11212: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11215: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11216: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11217: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11218:
11219: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '
11220: || l_process_lt);

Line 11217: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));

11213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11215: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11216: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11217: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11218:
11219: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '
11220: || l_process_lt);
11221: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date = '

Line 11219: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '

11215: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11216: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11217: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11218:
11219: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '
11220: || l_process_lt);
11221: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date = '
11222: || g_sup_cap_cum_date);
11223: END IF;

Line 11221: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date = '

11217: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11218:
11219: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '
11220: || l_process_lt);
11221: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date = '
11222: || g_sup_cap_cum_date);
11223: END IF;
11224: -- Bug 2803195
11225: IF (g_sup_cap_cum_date IS NOT NULL) THEN

Line 11239: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date Next Day offset = '

11235: l_atp_rec.manufacturing_cal_code,
11236: G_PLAN_INFO_REC.sr_instance_id,
11237: g_sup_cap_cum_date + 1);
11238: IF PG_DEBUG in ('Y', 'C') THEN
11239: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date Next Day offset = '
11240: || g_sup_cap_cum_date);
11241: END IF;
11242: END IF;
11243: -- End Bug 2803195

Line 11253: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);

11249: -- Only the processing lead time will be passed back into ATP_Check
11250: l_atp_rec.atp_lead_time := l_process_lt;
11251: -- End Supplier Capacity and Lead Time changes
11252: IF PG_DEBUG in ('Y', 'C') THEN
11253: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
11254: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
11255: END IF;
11256:
11257: -- Bug 3782472 - calculate ptf date for lower level

Line 11254: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);

11250: l_atp_rec.atp_lead_time := l_process_lt;
11251: -- End Supplier Capacity and Lead Time changes
11252: IF PG_DEBUG in ('Y', 'C') THEN
11253: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
11254: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
11255: END IF;
11256:
11257: -- Bug 3782472 - calculate ptf date for lower level
11258: l_ptf_date_for_child := MSC_CALENDAR.DATE_OFFSET (

Line 11270: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');

11266: /* ship_rec_cal changes begin */
11267: -- intransit lead time offset in case of capacity to ship
11268: IF l_sources.sup_cap_type(j) = 1 THEN
11269: IF PG_DEBUG in ('Y', 'C') THEN
11270: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
11271: END IF;
11272:
11273: -- Bug 3782472 - calculate ptf date for lower level
11274: l_ptf_date_for_child := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(

Line 11289: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_supplier_start_date);

11285: l_atp_rec.instance_id,
11286: l_new_dock_date,
11287: (-1 * l_atp_rec.delivery_lead_time), -1);
11288: IF PG_DEBUG in ('Y', 'C') THEN
11289: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_supplier_start_date);
11290: END IF;
11291: /* Enforce Pur LT - check if date is past due. for capacity to ship cases ship date
11292: can be past due only if capacity is not defined. */
11293: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_atp_rec.last_cap_date IS NULL

Line 11298: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11294: AND l_supplier_start_date < l_trunc_sysdate THEN
11295: l_supplier_start_date := l_trunc_sysdate;
11296: l_trunc_started := 1;
11297: IF PG_DEBUG in ('Y', 'C') THEN
11298: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11299: END IF;
11300: END IF;
11301: END IF;
11302:

Line 11311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC : '||l_supplier_start_date);

11307: l_atp_rec.shipping_cal_code,
11308: l_atp_rec.instance_id,
11309: l_supplier_start_date);
11310: IF PG_DEBUG in ('Y', 'C') THEN
11311: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC : '||l_supplier_start_date);
11312: END IF;
11313: /* Enforce Pur LT - check if date is past due. for capacity to ship cases ship date
11314: can be past due only if capacity is not defined. */
11315: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_atp_rec.last_cap_date IS NULL

Line 11320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11316: AND l_supplier_start_date < l_trunc_sysdate THEN
11317: l_supplier_start_date := l_trunc_sysdate;
11318: l_trunc_started := 1;
11319: IF PG_DEBUG in ('Y', 'C') THEN
11320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11321: END IF;
11322: END IF;
11323: END IF;
11324:

Line 11331: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);

11327:
11328: l_atp_rec.requested_ship_date := l_new_ship_date;
11329:
11330: IF PG_DEBUG in ('Y', 'C') THEN
11331: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);
11332: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');
11333: END IF;
11334: ELSE
11335: l_supplier_start_date := l_new_dock_date;

Line 11332: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');

11328: l_atp_rec.requested_ship_date := l_new_ship_date;
11329:
11330: IF PG_DEBUG in ('Y', 'C') THEN
11331: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);
11332: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');
11333: END IF;
11334: ELSE
11335: l_supplier_start_date := l_new_dock_date;
11336: -- supplier intransit LT

Line 11347: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');

11343: p_atp_record.instance_id,
11344: l_ptf_date_for_child);
11345:
11346: IF PG_DEBUG in ('Y', 'C') THEN
11347: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');
11348: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Start Date : '||l_supplier_start_date);
11349: END IF;
11350:
11351: /* populating new_ship_date in Capacity to Dock scenarios also */

Line 11348: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Start Date : '||l_supplier_start_date);

11344: l_ptf_date_for_child);
11345:
11346: IF PG_DEBUG in ('Y', 'C') THEN
11347: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');
11348: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Start Date : '||l_supplier_start_date);
11349: END IF;
11350:
11351: /* populating new_ship_date in Capacity to Dock scenarios also */
11352: /* Enforce Pur LT - Check if date needs to be calculated */

Line 11363: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Calculate ship date ---');

11359: l_start_date,
11360: (-1 * l_atp_rec.delivery_lead_time), -1);
11361:
11362: IF PG_DEBUG in ('Y', 'C') THEN
11363: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Calculate ship date ---');
11364: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_new_ship_date);
11365: END IF;
11366:
11367: /* Enforce Pur LT - check if date is past due.*/

Line 11364: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_new_ship_date);

11360: (-1 * l_atp_rec.delivery_lead_time), -1);
11361:
11362: IF PG_DEBUG in ('Y', 'C') THEN
11363: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Calculate ship date ---');
11364: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_new_ship_date);
11365: END IF;
11366:
11367: /* Enforce Pur LT - check if date is past due.*/
11368: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_new_ship_date < l_trunc_sysdate THEN

Line 11374: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11370: -- Not setting the flag l_trunc_started as dock date may still be more than sysdate
11371: -- and in capacity to dock cases further calculation of dates (start date, order date)
11372: -- is done from dock date.
11373: IF PG_DEBUG in ('Y', 'C') THEN
11374: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11375: END IF;
11376: ELSE
11377: l_new_ship_date := MSC_CALENDAR.PREV_WORK_DAY(
11378: l_atp_rec.shipping_cal_code,

Line 11383: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC :'||l_new_ship_date);

11379: l_atp_rec.instance_id,
11380: l_new_ship_date);
11381:
11382: IF PG_DEBUG in ('Y', 'C') THEN
11383: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC :'||l_new_ship_date);
11384: END IF;
11385:
11386: /* Enforce Pur LT - check if date is past due.*/
11387: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_new_ship_date < l_trunc_sysdate THEN

Line 11390: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11386: /* Enforce Pur LT - check if date is past due.*/
11387: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_new_ship_date < l_trunc_sysdate THEN
11388: l_new_ship_date := l_trunc_sysdate;
11389: IF PG_DEBUG in ('Y', 'C') THEN
11390: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11391: END IF;
11392: END IF;
11393: END IF;
11394:

Line 11398: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);

11394:
11395: END IF;
11396:
11397: IF PG_DEBUG in ('Y', 'C') THEN
11398: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);
11399: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');
11400: END IF;
11401:
11402: END IF;

Line 11399: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');

11395: END IF;
11396:
11397: IF PG_DEBUG in ('Y', 'C') THEN
11398: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);
11399: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');
11400: END IF;
11401:
11402: END IF;
11403:

Line 11414: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after offsetting processing LT on SMC :'||l_supplier_start_date);

11410: G_PLAN_INFO_REC.sr_instance_id,
11411: l_supplier_start_date,
11412: (-1 * l_process_lt), -1);
11413: IF PG_DEBUG in ('Y', 'C') THEN
11414: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after offsetting processing LT on SMC :'||l_supplier_start_date);
11415: END IF;
11416: /* Enforce Pur LT - check if date is past due.*/
11417: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_supplier_start_date < l_trunc_sysdate THEN
11418: l_supplier_start_date := l_trunc_sysdate;

Line 11421: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11417: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_supplier_start_date < l_trunc_sysdate THEN
11418: l_supplier_start_date := l_trunc_sysdate;
11419: l_trunc_started := 1;
11420: IF PG_DEBUG in ('Y', 'C') THEN
11421: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11422: END IF;
11423: END IF;
11424: END IF;
11425:

Line 11436: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_supplier_start_date);

11432: l_atp_rec.instance_id,
11433: l_supplier_start_date,
11434: (-1 * l_pre_pro_lt), -1);
11435: IF PG_DEBUG in ('Y', 'C') THEN
11436: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_supplier_start_date);
11437: END IF;
11438: /* Enforce Pur LT - check if date is past due.*/
11439: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_supplier_start_date < l_trunc_sysdate THEN
11440: l_supplier_start_date := l_trunc_sysdate;

Line 11443: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11439: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_supplier_start_date < l_trunc_sysdate THEN
11440: l_supplier_start_date := l_trunc_sysdate;
11441: l_trunc_started := 1;
11442: IF PG_DEBUG in ('Y', 'C') THEN
11443: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11444: END IF;
11445: END IF;
11446: END IF;
11447:

Line 11454: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');

11450: -- Bug 3782472 - set ptf date for lower level
11451: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child, l_ptf_date);
11452:
11453: IF PG_DEBUG in ('Y', 'C') THEN
11454: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
11455: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
11456: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
11457: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
11458: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

Line 11455: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

11451: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child, l_ptf_date);
11452:
11453: IF PG_DEBUG in ('Y', 'C') THEN
11454: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
11455: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
11456: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
11457: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
11458: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11459: END IF;

Line 11456: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);

11452:
11453: IF PG_DEBUG in ('Y', 'C') THEN
11454: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
11455: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
11456: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
11457: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
11458: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11459: END IF;
11460: /* ship_rec_cal changes end */

Line 11457: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);

11453: IF PG_DEBUG in ('Y', 'C') THEN
11454: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
11455: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
11456: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
11457: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
11458: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11459: END IF;
11460: /* ship_rec_cal changes end */
11461:

Line 11458: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

11454: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
11455: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
11456: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
11457: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
11458: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11459: END IF;
11460: /* ship_rec_cal changes end */
11461:
11462: IF (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 or p_search = FORWARD_SCHEDULING) and

Line 11469: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');

11465: -- l_supplier_start_date < sysdate) THEN -- extraneous call to sysdate
11466:
11467: /* ship_rec_cal changes begin */
11468: IF PG_DEBUG in ('Y', 'C') THEN
11469: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');
11470: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);
11471: END IF;
11472:
11473: IF l_start_date < l_ptf_date and l_post_pro_lt > 0 THEN

Line 11470: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);

11466:
11467: /* ship_rec_cal changes begin */
11468: IF PG_DEBUG in ('Y', 'C') THEN
11469: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');
11470: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);
11471: END IF;
11472:
11473: IF l_start_date < l_ptf_date and l_post_pro_lt > 0 THEN
11474: l_ptf_due_date := MSC_CALENDAR.DATE_OFFSET(

Line 11481: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);

11477: l_ptf_date,
11478: l_post_pro_lt, 1);
11479:
11480: IF PG_DEBUG in ('Y', 'C') THEN
11481: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11482: END IF;
11483: ELSE
11484: --- bug 2771784: earliest due date should be PTF date. Not start date
11485: --l_ptf_due_date := l_start_date;

Line 11505: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_supplier_request_date);

11501: l_atp_rec.instance_id,
11502: l_supplier_request_date);
11503:
11504: IF PG_DEBUG in ('Y', 'C') THEN
11505: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_supplier_request_date);
11506: END IF;
11507:
11508: IF l_sources.sup_cap_type(j) = 1 THEN
11509: -- capacity to be checked on ship date

Line 11516: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_supplier_request_date);

11512: l_atp_rec.instance_id,
11513: l_supplier_request_date,
11514: (-1 * l_atp_rec.delivery_lead_time), -1);
11515: IF PG_DEBUG in ('Y', 'C') THEN
11516: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_supplier_request_date);
11517: END IF;
11518: l_supplier_request_date := MSC_CALENDAR.PREV_WORK_DAY(
11519: l_atp_rec.shipping_cal_code,
11520: l_atp_rec.instance_id,

Line 11529: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');

11525: END IF;
11526: */
11527:
11528: IF PG_DEBUG in ('Y', 'C') THEN
11529: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11530: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);
11531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);
11532: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11533: END IF;

Line 11530: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);

11526: */
11527:
11528: IF PG_DEBUG in ('Y', 'C') THEN
11529: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11530: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);
11531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);
11532: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11533: END IF;
11534: -- IF l_supplier_start_date < l_sysdate and (l_post_pro_lt + l_net_processing_lt) >0 THEN

Line 11531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);

11527:
11528: IF PG_DEBUG in ('Y', 'C') THEN
11529: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11530: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);
11531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);
11532: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11533: END IF;
11534: -- IF l_supplier_start_date < l_sysdate and (l_post_pro_lt + l_net_processing_lt) >0 THEN
11535: IF l_supplier_start_date < l_trunc_sysdate

Line 11532: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');

11528: IF PG_DEBUG in ('Y', 'C') THEN
11529: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11530: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);
11531: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);
11532: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11533: END IF;
11534: -- IF l_supplier_start_date < l_sysdate and (l_post_pro_lt + l_net_processing_lt) >0 THEN
11535: IF l_supplier_start_date < l_trunc_sysdate
11536: and ((l_post_pro_lt + l_net_processing_lt)>0

Line 11557: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding Pre PLT using OMC: '||l_lt_due_date);

11553: --Bug 3821358
11554: l_store_start_date := l_lt_due_date;
11555:
11556: IF PG_DEBUG in ('Y', 'C') THEN
11557: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding Pre PLT using OMC: '||l_lt_due_date);
11558: END IF;
11559:
11560: IF l_process_lt > 0 THEN
11561: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET(

Line 11567: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PLT using SMC: '||l_lt_due_date);

11563: G_PLAN_INFO_REC.sr_instance_id,
11564: l_lt_due_date,
11565: l_process_lt, 1);
11566: IF PG_DEBUG in ('Y', 'C') THEN
11567: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PLT using SMC: '||l_lt_due_date);
11568: END IF;
11569: END IF;
11570:
11571: -- intransit lead time offset in case of capacity to ship

Line 11588: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');

11584: */
11585: l_ptf_date_for_child := l_lt_due_date; -- Bug 3828494 (done with 3828469)
11586:
11587: IF PG_DEBUG in ('Y', 'C') THEN
11588: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
11589: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_lt_due_date);
11590: END IF;
11591:
11592: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET(

Line 11589: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_lt_due_date);

11585: l_ptf_date_for_child := l_lt_due_date; -- Bug 3828494 (done with 3828469)
11586:
11587: IF PG_DEBUG in ('Y', 'C') THEN
11588: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
11589: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_lt_due_date);
11590: END IF;
11591:
11592: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET(
11593: l_atp_rec.intransit_cal_code,

Line 11607: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_lt_due_date);

11603: --Bug 3821358
11604: l_store_dock_date := l_lt_due_date ;
11605:
11606: IF PG_DEBUG in ('Y', 'C') THEN
11607: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_lt_due_date);
11608: END IF;
11609:
11610: ELSE
11611: IF PG_DEBUG in ('Y', 'C') THEN

Line 11612: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');

11608: END IF;
11609:
11610: ELSE
11611: IF PG_DEBUG in ('Y', 'C') THEN
11612: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');
11613: END IF;
11614:
11615: --Bug 3821358
11616: l_lt_due_date := MSC_CALENDAR.NEXT_WORK_DAY(

Line 11650: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_lt_due_date);

11646: l_ptf_date_for_child := l_lt_due_date; -- Bug 3828494 (done with 3828469)
11647: END IF;
11648:
11649: IF PG_DEBUG in ('Y', 'C') THEN
11650: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_lt_due_date);
11651: END IF;
11652:
11653: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET(
11654: p_atp_record.manufacturing_cal_code,

Line 11662: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);

11658:
11659: l_store_due_date := l_lt_due_date;
11660:
11661: IF PG_DEBUG in ('Y', 'C') THEN
11662: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);
11663: END IF;
11664:
11665: --Bug 3821358
11666: l_store_g_ptf_date := l_ptf_date_for_child;

Line 11689: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');

11685: -- PTF for lower level = greatest(sysdate+prePLT, current org's PTF, parent org's PTF)
11686: -- after validating on all applicable calendars.
11687:
11688: IF PG_DEBUG in ('Y', 'C') THEN
11689: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11690: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
11691: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
11692: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11693: END IF;

Line 11690: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);

11686: -- after validating on all applicable calendars.
11687:
11688: IF PG_DEBUG in ('Y', 'C') THEN
11689: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11690: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
11691: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
11692: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11693: END IF;
11694: /* ship_rec_cal changes end */

Line 11691: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);

11687:
11688: IF PG_DEBUG in ('Y', 'C') THEN
11689: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11690: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
11691: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
11692: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11693: END IF;
11694: /* ship_rec_cal changes end */
11695:

Line 11692: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

11688: IF PG_DEBUG in ('Y', 'C') THEN
11689: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11690: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
11691: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
11692: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11693: END IF;
11694: /* ship_rec_cal changes end */
11695:
11696: -- Bug 3525582 - Constraint message should be added only if constraint actually exists

Line 11720: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

11716:
11717: END IF;
11718:
11719: IF PG_DEBUG in ('Y', 'C') THEN
11720: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
11721: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || l_atp_rec.requested_ship_date);
11722: msc_sch_wb.atp_debug('ATP_Check: ' || 'arrival_date := ' || l_atp_rec.requested_arrival_date);
11723: END IF;
11724:

Line 11721: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || l_atp_rec.requested_ship_date);

11717: END IF;
11718:
11719: IF PG_DEBUG in ('Y', 'C') THEN
11720: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
11721: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || l_atp_rec.requested_ship_date);
11722: msc_sch_wb.atp_debug('ATP_Check: ' || 'arrival_date := ' || l_atp_rec.requested_arrival_date);
11723: END IF;
11724:
11725: l_atp_rec.latest_acceptable_date := null;

Line 11722: msc_sch_wb.atp_debug('ATP_Check: ' || 'arrival_date := ' || l_atp_rec.requested_arrival_date);

11718:
11719: IF PG_DEBUG in ('Y', 'C') THEN
11720: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
11721: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || l_atp_rec.requested_ship_date);
11722: msc_sch_wb.atp_debug('ATP_Check: ' || 'arrival_date := ' || l_atp_rec.requested_arrival_date);
11723: END IF;
11724:
11725: l_atp_rec.latest_acceptable_date := null;
11726: l_atp_rec.freight_carrier := null;

Line 11753: msc_sch_wb.atp_debug('ATP_Check: ' || 'ORDER_NUMBER is : ' || l_atp_rec.order_number);

11749:
11750: l_atp_rec.order_number := p_atp_record.order_number;
11751:
11752: IF PG_DEBUG in ('Y', 'C') THEN
11753: msc_sch_wb.atp_debug('ATP_Check: ' || 'ORDER_NUMBER is : ' || l_atp_rec.order_number);
11754: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Source Type is : ' || l_atp_rec.demand_source_type);--cmro
11755: msc_sch_wb.atp_debug('ATP_Check: ' || 'net_demand is : ' || l_net_demand);
11756: END IF;
11757: --- End Enhance CTO Phase 1 Req #16 and #17

Line 11754: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Source Type is : ' || l_atp_rec.demand_source_type);--cmro

11750: l_atp_rec.order_number := p_atp_record.order_number;
11751:
11752: IF PG_DEBUG in ('Y', 'C') THEN
11753: msc_sch_wb.atp_debug('ATP_Check: ' || 'ORDER_NUMBER is : ' || l_atp_rec.order_number);
11754: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Source Type is : ' || l_atp_rec.demand_source_type);--cmro
11755: msc_sch_wb.atp_debug('ATP_Check: ' || 'net_demand is : ' || l_net_demand);
11756: END IF;
11757: --- End Enhance CTO Phase 1 Req #16 and #17
11758:

Line 11755: msc_sch_wb.atp_debug('ATP_Check: ' || 'net_demand is : ' || l_net_demand);

11751:
11752: IF PG_DEBUG in ('Y', 'C') THEN
11753: msc_sch_wb.atp_debug('ATP_Check: ' || 'ORDER_NUMBER is : ' || l_atp_rec.order_number);
11754: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Source Type is : ' || l_atp_rec.demand_source_type);--cmro
11755: msc_sch_wb.atp_debug('ATP_Check: ' || 'net_demand is : ' || l_net_demand);
11756: END IF;
11757: --- End Enhance CTO Phase 1 Req #16 and #17
11758:
11759:

Line 11768: msc_sch_wb.atp_debug('Set Org id null in Supplier case');

11764: MSC_ATP_PVT.G_SUMMARY_FLAG := l_old_summary_flag;
11765: /* rajjain 02/19/2003 Bug 2788302 Begin
11766: * set org to null for Supplier's case. */
11767: IF NVL(l_atp_rec.supplier_id,-1) <> -1 THEN
11768: msc_sch_wb.atp_debug('Set Org id null in Supplier case');
11769: l_src_org_id := NULL;
11770: ELSE
11771: l_src_org_id := l_atp_rec.organization_id;
11772: END IF;

Line 11823: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Id l_transaction_id: ' || l_transaction_id);

11819: -- Asssign the output to local variables.
11820: l_transaction_id := l_supply_rec.transaction_id;
11821: l_return_status := l_supply_rec.return_status;
11822: IF PG_DEBUG in ('Y', 'C') THEN
11823: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Id l_transaction_id: ' || l_transaction_id);
11824: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Type l_supply_rec.supply_type: '
11825: || l_supply_rec.supply_type);
11826: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);
11827: END IF;

Line 11824: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Type l_supply_rec.supply_type: '

11820: l_transaction_id := l_supply_rec.transaction_id;
11821: l_return_status := l_supply_rec.return_status;
11822: IF PG_DEBUG in ('Y', 'C') THEN
11823: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Id l_transaction_id: ' || l_transaction_id);
11824: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Type l_supply_rec.supply_type: '
11825: || l_supply_rec.supply_type);
11826: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);
11827: END IF;
11828: ELSE -- Create Planned Order otherwise.

Line 11826: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);

11822: IF PG_DEBUG in ('Y', 'C') THEN
11823: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Id l_transaction_id: ' || l_transaction_id);
11824: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Type l_supply_rec.supply_type: '
11825: || l_supply_rec.supply_type);
11826: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);
11827: END IF;
11828: ELSE -- Create Planned Order otherwise.
11829:
11830: MSC_ATP_DB_UTILS.Add_Planned_Order(

Line 11872: msc_sch_wb.atp_debug('ATP_Check: ' || 'here the the parent_pegging_id inside the buy/transfer :'||

11868:
11869: -- populate insert rec to pegging tree for this supply
11870:
11871: IF PG_DEBUG in ('Y', 'C') THEN
11872: msc_sch_wb.atp_debug('ATP_Check: ' || 'here the the parent_pegging_id inside the buy/transfer :'||
11873: l_pegging_id);
11874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_pegging_id := ' || l_parent_pegging_id);
11875: END IF;
11876: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;

Line 11874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_pegging_id := ' || l_parent_pegging_id);

11870:
11871: IF PG_DEBUG in ('Y', 'C') THEN
11872: msc_sch_wb.atp_debug('ATP_Check: ' || 'here the the parent_pegging_id inside the buy/transfer :'||
11873: l_pegging_id);
11874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_pegging_id := ' || l_parent_pegging_id);
11875: END IF;
11876: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
11877: l_pegging_rec.order_line_id:= MSC_ATP_PVT.G_ORDER_LINE_ID;
11878: l_pegging_rec.parent_pegging_id:= l_parent_pegging_id;

Line 11980: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add PTF date to pegging');

11976: l_pegging_rec.request_item_id := p_atp_record.request_item_id;
11977:
11978: IF l_start_date < l_ptf_date then
11979: IF PG_DEBUG in ('Y', 'C') THEN
11980: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add PTF date to pegging');
11981: END IF;
11982: l_pegging_rec.ptf_date := l_ptf_date;
11983: END IF;
11984:

Line 12039: msc_sch_wb.atp_debug('buy last good pegging: ' || l_pegging_id);

12035: AND l_pegging_rec.constraint_type IS NULL
12036: THEN
12037: l_last_good_pegging_id := l_pegging_id;
12038: IF PG_DEBUG in ('Y', 'C') THEN
12039: msc_sch_wb.atp_debug('buy last good pegging: ' || l_pegging_id);
12040: END IF;
12041: END IF;
12042:
12043: --s_cto_rearch

Line 12074: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HAVE_MAKE_BUY_PARENT ' || MSC_ATP_PVT.G_HAVE_MAKE_BUY_PARENT);

12070: --e_Cto_rearch
12071:
12072: -- dsting diag_atp
12073: IF PG_DEBUG in ('Y', 'C') THEN
12074: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HAVE_MAKE_BUY_PARENT ' || MSC_ATP_PVT.G_HAVE_MAKE_BUY_PARENT);
12075: END IF;
12076: -- dsting 2819716. we always add planned orders now
12077: -- so we should always add pegging.
12078: /*

Line 12102: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

12098: MSC_ATP_PVT.G_SUMMARY_FLAG := l_new_summary_flag;
12099: -- 2178544:
12100: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date, MSC_ATP_PVT.G_PTF_DATE);
12101: IF PG_DEBUG in ('Y', 'C') THEN
12102: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
12103: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
12104: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12105: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');
12106: END IF;

Line 12103: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);

12099: -- 2178544:
12100: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date, MSC_ATP_PVT.G_PTF_DATE);
12101: IF PG_DEBUG in ('Y', 'C') THEN
12102: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
12103: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
12104: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12105: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');
12106: END IF;
12107:

Line 12104: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

12100: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date, MSC_ATP_PVT.G_PTF_DATE);
12101: IF PG_DEBUG in ('Y', 'C') THEN
12102: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
12103: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
12104: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12105: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');
12106: END IF;
12107:
12108: ---subst: Since we go down so we do not remain in top org. So we set the flags again

Line 12105: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');

12101: IF PG_DEBUG in ('Y', 'C') THEN
12102: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
12103: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
12104: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12105: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');
12106: END IF;
12107:
12108: ---subst: Since we go down so we do not remain in top org. So we set the flags again
12109: l_atp_rec.original_item_flag := p_atp_record.original_item_flag;

Line 12134: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date check failed in case of transfer');

12130: -- dsting 2754446
12131: l_prim_uom_req_date_qty := 0;
12132:
12133: IF PG_DEBUG in ('Y', 'C') THEN
12134: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date check failed in case of transfer');
12135: END IF;
12136: ELSE
12137: l_atp_rec.children_type := NO_MAKE_BUY_CHILDREN;
12138: IF PG_DEBUG in ('Y', 'C') THEN

Line 12139: msc_sch_wb.atp_debug('NO_MAKE_BUY_CHILDREN: pre atp_check');

12135: END IF;
12136: ELSE
12137: l_atp_rec.children_type := NO_MAKE_BUY_CHILDREN;
12138: IF PG_DEBUG in ('Y', 'C') THEN
12139: msc_sch_wb.atp_debug('NO_MAKE_BUY_CHILDREN: pre atp_check');
12140: END IF;
12141:
12142: MSC_ATP_PVT.ATP_Check(l_atp_rec,
12143: l_plan_id,

Line 12162: msc_sch_wb.atp_debug('Error in ATP_CHECK');

12158: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
12159:
12160: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_SRC_MISMATCH THEN
12161: IF PG_DEBUG in ('Y', 'C') THEN
12162: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12163: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12164: END IF;
12165: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
12166: -- dsting 2764213

Line 12163: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');

12159:
12160: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_SRC_MISMATCH THEN
12161: IF PG_DEBUG in ('Y', 'C') THEN
12162: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12163: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12164: END IF;
12165: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
12166: -- dsting 2764213
12167: ELSIF l_return_status = MSC_ATP_PVT.G_NO_PLAN_FOUND THEN

Line 12169: msc_sch_wb.atp_debug('Error in ATP_CHECK');

12165: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
12166: -- dsting 2764213
12167: ELSIF l_return_status = MSC_ATP_PVT.G_NO_PLAN_FOUND THEN
12168: IF PG_DEBUG in ('Y', 'C') THEN
12169: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12170: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12171: END IF;
12172: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
12173: -- krajan 2752705

Line 12170: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');

12166: -- dsting 2764213
12167: ELSIF l_return_status = MSC_ATP_PVT.G_NO_PLAN_FOUND THEN
12168: IF PG_DEBUG in ('Y', 'C') THEN
12169: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12170: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12171: END IF;
12172: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
12173: -- krajan 2752705
12174: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_UNCOLL_ITEM THEN

Line 12176: msc_sch_wb.atp_debug('Error in ATP_CHECK');

12172: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
12173: -- krajan 2752705
12174: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_UNCOLL_ITEM THEN
12175: IF PG_DEBUG in ('Y', 'C') THEN
12176: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12177: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12178: END IF;
12179: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
12180: END IF;

Line 12177: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');

12173: -- krajan 2752705
12174: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_UNCOLL_ITEM THEN
12175: IF PG_DEBUG in ('Y', 'C') THEN
12176: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12177: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12178: END IF;
12179: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
12180: END IF;
12181:

Line 12204: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);

12200: l_prim_uom_req_date_qty := trunc(l_prim_uom_req_date_qty, 6); --5598066
12201: END IF;
12202:
12203: IF PG_DEBUG IN ('Y','C') THEN
12204: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12205: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12206: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12207: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12208: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);

Line 12205: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);

12201: END IF;
12202:
12203: IF PG_DEBUG IN ('Y','C') THEN
12204: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12205: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12206: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12207: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12208: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);
12209: END IF;

Line 12206: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);

12202:
12203: IF PG_DEBUG IN ('Y','C') THEN
12204: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12205: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12206: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12207: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12208: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);
12209: END IF;
12210:

Line 12207: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);

12203: IF PG_DEBUG IN ('Y','C') THEN
12204: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12205: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12206: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12207: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12208: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);
12209: END IF;
12210:
12211: G_HAVE_MAKE_BUY_PARENT := l_have_make_buy_parent;

Line 12208: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);

12204: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12205: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12206: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12207: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12208: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);
12209: END IF;
12210:
12211: G_HAVE_MAKE_BUY_PARENT := l_have_make_buy_parent;
12212: IF (l_atp_rec.children_type = MAKE_BUY_CHILDREN ) THEN

Line 12229: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here, p_search ='||p_search);

12225: greatest(nvl(l_prim_uom_req_date_qty, 0), 0);
12226: -- greatest(nvl(l_atp_rec.requested_date_quantity,0), 0);
12227: END IF;
12228: IF PG_DEBUG in ('Y', 'C') THEN
12229: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here, p_search ='||p_search);
12230: msc_sch_wb.atp_debug('ATP_Check: l_net_demand := ' || l_net_demand);
12231: END IF;
12232: IF (p_search = FORWARD_SCHEDULING) THEN
12233:

Line 12230: msc_sch_wb.atp_debug('ATP_Check: l_net_demand := ' || l_net_demand);

12226: -- greatest(nvl(l_atp_rec.requested_date_quantity,0), 0);
12227: END IF;
12228: IF PG_DEBUG in ('Y', 'C') THEN
12229: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here, p_search ='||p_search);
12230: msc_sch_wb.atp_debug('ATP_Check: l_net_demand := ' || l_net_demand);
12231: END IF;
12232: IF (p_search = FORWARD_SCHEDULING) THEN
12233:
12234: -- bug 1303196, ship date need to consider

Line 12241: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward Scheduling ');

12237: IF l_sources.source_type(j) = TRANSFER THEN
12238:
12239: -- 2463556 : krajan : Added comment
12240: IF PG_DEBUG in ('Y', 'C') THEN
12241: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward Scheduling ');
12242: END IF;
12243:
12244: /* ship_rec_cal changes begin */
12245: -- BEGIN -- removed exception handling from here so that it can be handled in the end

Line 12259: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);

12255: l_atp_rec.ship_date);
12256: l_new_ship_date := l_ship_date;
12257:
12258: IF PG_DEBUG in ('Y', 'C') THEN
12259: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
12260: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
12261: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC: '||l_ship_date);
12262: END IF;
12263:

Line 12260: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');

12256: l_new_ship_date := l_ship_date;
12257:
12258: IF PG_DEBUG in ('Y', 'C') THEN
12259: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
12260: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
12261: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC: '||l_ship_date);
12262: END IF;
12263:
12264: l_ship_date := MSC_CALENDAR.DATE_OFFSET(

Line 12261: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC: '||l_ship_date);

12257:
12258: IF PG_DEBUG in ('Y', 'C') THEN
12259: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
12260: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
12261: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC: '||l_ship_date);
12262: END IF;
12263:
12264: l_ship_date := MSC_CALENDAR.DATE_OFFSET(
12265: l_atp_rec.intransit_cal_code,

Line 12272: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_ship_date);

12268: nvl(l_atp_rec.delivery_lead_time, 0),
12269: +1);
12270:
12271: IF PG_DEBUG in ('Y', 'C') THEN
12272: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_ship_date);
12273: END IF;
12274:
12275: l_ship_date := MSC_CALENDAR.NEXT_WORK_DAY(
12276: l_atp_rec.receiving_cal_code,

Line 12282: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_ship_date);

12278: l_ship_date);
12279: l_new_dock_date := l_ship_date;
12280:
12281: IF PG_DEBUG in ('Y', 'C') THEN
12282: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_ship_date);
12283: END IF;
12284:
12285: -- Bug 3241766 : Back calculate start date and order date
12286: l_sugg_start_date := l_new_ship_date;

Line 12297: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);

12293: -1 * l_pre_pro_lt, -1);
12294: --bug3821358 Moving Order date to non past due non working date on a day closer to the first working day
12295: IF l_order_date < l_trunc_sysdate THEN
12296: IF PG_DEBUG in ('Y', 'C') THEN
12297: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);
12298: --bug 4188385 removed this debug was giving error during concatenation
12299: --msc_sch_wb.atp_debug('ATP_Check: ' || 'Moving Order date to non past due non working date: '||l_sys_next_date - (1)); --Putting 1 in brackets to avoid error.
12300: END IF;
12301: l_order_date := l_sys_next_date - 1;

Line 12299: --msc_sch_wb.atp_debug('ATP_Check: ' || 'Moving Order date to non past due non working date: '||l_sys_next_date - (1)); --Putting 1 in brackets to avoid error.

12295: IF l_order_date < l_trunc_sysdate THEN
12296: IF PG_DEBUG in ('Y', 'C') THEN
12297: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);
12298: --bug 4188385 removed this debug was giving error during concatenation
12299: --msc_sch_wb.atp_debug('ATP_Check: ' || 'Moving Order date to non past due non working date: '||l_sys_next_date - (1)); --Putting 1 in brackets to avoid error.
12300: END IF;
12301: l_order_date := l_sys_next_date - 1;
12302: --bug 4188385 printed the order date
12303: IF PG_DEBUG in ('Y', 'C') THEN

Line 12304: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);

12300: END IF;
12301: l_order_date := l_sys_next_date - 1;
12302: --bug 4188385 printed the order date
12303: IF PG_DEBUG in ('Y', 'C') THEN
12304: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);
12305: END IF;
12306: END IF;
12307: --bug3821358
12308: IF PG_DEBUG in ('Y', 'C') THEN

Line 12309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);

12305: END IF;
12306: END IF;
12307: --bug3821358
12308: IF PG_DEBUG in ('Y', 'C') THEN
12309: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);
12310: END IF;
12311:
12312: l_ship_date := MSC_CALENDAR.DATE_OFFSET (
12313: p_atp_record.manufacturing_cal_code,

Line 12319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);

12315: l_ship_date,
12316: l_post_pro_lt, 1);
12317:
12318: IF PG_DEBUG in ('Y', 'C') THEN
12319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);
12320: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');
12321: END IF;
12322: /*
12323: EXCEPTION

Line 12320: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');

12316: l_post_pro_lt, 1);
12317:
12318: IF PG_DEBUG in ('Y', 'C') THEN
12319: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);
12320: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');
12321: END IF;
12322: /*
12323: EXCEPTION
12324: WHEN others THEN

Line 12326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate not found in Calendar');

12322: /*
12323: EXCEPTION
12324: WHEN others THEN
12325: IF PG_DEBUG in ('Y', 'C') THEN
12326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate not found in Calendar');
12327: END IF;
12328: null;
12329: END;
12330: */

Line 12337: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);

12333: -- buy
12334: /* ship_rec_cal changes begin */
12335:
12336: IF PG_DEBUG in ('Y', 'C') THEN
12337: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
12338: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
12339: END IF;
12340: -- intransit lead time offset in case of capacity to ship
12341: --Bug 3821358

Line 12338: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');

12334: /* ship_rec_cal changes begin */
12335:
12336: IF PG_DEBUG in ('Y', 'C') THEN
12337: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
12338: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
12339: END IF;
12340: -- intransit lead time offset in case of capacity to ship
12341: --Bug 3821358
12342: IF (l_atp_rec.ship_date = l_store_g_ptf_date ) THEN

Line 12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);

12340: -- intransit lead time offset in case of capacity to ship
12341: --Bug 3821358
12342: IF (l_atp_rec.ship_date = l_store_g_ptf_date ) THEN
12343: IF PG_DEBUG in ('Y', 'C') THEN
12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
12345: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
12346: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
12347: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
12348: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);

Line 12345: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);

12341: --Bug 3821358
12342: IF (l_atp_rec.ship_date = l_store_g_ptf_date ) THEN
12343: IF PG_DEBUG in ('Y', 'C') THEN
12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
12345: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
12346: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
12347: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
12348: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
12349: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);

Line 12346: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);

12342: IF (l_atp_rec.ship_date = l_store_g_ptf_date ) THEN
12343: IF PG_DEBUG in ('Y', 'C') THEN
12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
12345: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
12346: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
12347: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
12348: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
12349: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
12350: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);

Line 12347: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);

12343: IF PG_DEBUG in ('Y', 'C') THEN
12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
12345: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
12346: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
12347: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
12348: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
12349: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
12350: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);
12351: END IF;

Line 12348: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);

12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
12345: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
12346: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
12347: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
12348: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
12349: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
12350: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);
12351: END IF;
12352: -- assign the values in l_store* variables..

Line 12349: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);

12345: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
12346: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
12347: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
12348: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
12349: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
12350: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);
12351: END IF;
12352: -- assign the values in l_store* variables..
12353: l_ship_date := l_store_due_date;

Line 12350: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);

12346: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
12347: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
12348: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
12349: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
12350: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);
12351: END IF;
12352: -- assign the values in l_store* variables..
12353: l_ship_date := l_store_due_date;
12354: l_new_dock_date := l_store_dock_date;

Line 12369: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');

12365: l_atp_rec.instance_id,
12366: l_atp_rec.ship_date);
12367:
12368: IF PG_DEBUG in ('Y', 'C') THEN
12369: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
12370: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_ship_date);
12371: END IF;
12372:
12373: l_new_ship_date := l_ship_date; -- Bug 3241766

Line 12370: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_ship_date);

12366: l_atp_rec.ship_date);
12367:
12368: IF PG_DEBUG in ('Y', 'C') THEN
12369: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
12370: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_ship_date);
12371: END IF;
12372:
12373: l_new_ship_date := l_ship_date; -- Bug 3241766
12374:

Line 12382: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_ship_date);

12378: l_ship_date,
12379: l_atp_rec.delivery_lead_time, 1);
12380:
12381: IF PG_DEBUG in ('Y', 'C') THEN
12382: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_ship_date);
12383: END IF;
12384: ELSE
12385:
12386: l_ship_date := l_atp_rec.ship_date;

Line 12389: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');

12385:
12386: l_ship_date := l_atp_rec.ship_date;
12387:
12388: IF PG_DEBUG in ('Y', 'C') THEN
12389: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');
12390: END IF;
12391:
12392: -- Bug 3241766 : back calculate the ship date
12393: l_new_ship_date := MSC_CALENDAR.DATE_OFFSET(

Line 12400: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_new_ship_date);

12396: l_ship_date,
12397: -1 * l_atp_rec.delivery_lead_time, -1);
12398:
12399: IF PG_DEBUG in ('Y', 'C') THEN
12400: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_new_ship_date);
12401: END IF;
12402:
12403: l_new_ship_date := MSC_CALENDAR.PREV_WORK_DAY(
12404: l_atp_rec.shipping_cal_code,

Line 12411: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_new_ship_date);

12407: --Bug 3821358
12408: --l_atp_rec.ship_date);
12409:
12410: IF PG_DEBUG in ('Y', 'C') THEN
12411: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_new_ship_date);
12412: END IF;
12413: END IF;
12414:
12415: l_ship_date := MSC_CALENDAR.NEXT_WORK_DAY(

Line 12423: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_ship_date);

12419:
12420: l_new_dock_date := l_ship_date; -- Bug 3241766
12421:
12422: IF PG_DEBUG in ('Y', 'C') THEN
12423: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_ship_date);
12424: END IF;
12425:
12426: -- Bug 3241766 : Backcalculate start date and order date
12427: -- Bug 3405708 - Enforce Pur LT: Truncate past due dates

Line 12450: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PLT using SMC : '||l_sugg_start_date);

12446: END IF;
12447: END IF;
12448:
12449: IF PG_DEBUG in ('Y', 'C') THEN
12450: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PLT using SMC : '||l_sugg_start_date);
12451: END IF;
12452:
12453: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_sugg_start_date <= l_trunc_sysdate THEN
12454: l_order_date := l_trunc_sysdate;

Line 12468: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);

12464: END IF;
12465: -- Bug 3405708 - changes end
12466:
12467: IF PG_DEBUG in ('Y', 'C') THEN
12468: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);
12469: END IF;
12470:
12471: l_ship_date := MSC_CALENDAR.DATE_OFFSET(
12472: p_atp_record.manufacturing_cal_code,

Line 12478: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);

12474: l_ship_date,
12475: l_post_pro_lt, 1);
12476:
12477: IF PG_DEBUG in ('Y', 'C') THEN
12478: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);
12479: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');
12480: END IF;
12481: -- ship_rec_cal changes end
12482: END IF; --Bug 3821358

Line 12479: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');

12475: l_post_pro_lt, 1);
12476:
12477: IF PG_DEBUG in ('Y', 'C') THEN
12478: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);
12479: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');
12480: END IF;
12481: -- ship_rec_cal changes end
12482: END IF; --Bug 3821358
12483: END IF;

Line 12485: msc_sch_wb.atp_debug ('ATP_Check: ' || 'ship date is '||l_ship_date);

12481: -- ship_rec_cal changes end
12482: END IF; --Bug 3821358
12483: END IF;
12484: IF PG_DEBUG in ('Y', 'C') THEN
12485: msc_sch_wb.atp_debug ('ATP_Check: ' || 'ship date is '||l_ship_date);
12486: msc_sch_wb.atp_debug ('ATP_Check: ' || 'original is '|| p_atp_record.ship_date );
12487: END IF;
12488:
12489: ---bug 2798667: The p_atp_record.ship_date for option item contains ship date for

Line 12486: msc_sch_wb.atp_debug ('ATP_Check: ' || 'original is '|| p_atp_record.ship_date );

12482: END IF; --Bug 3821358
12483: END IF;
12484: IF PG_DEBUG in ('Y', 'C') THEN
12485: msc_sch_wb.atp_debug ('ATP_Check: ' || 'ship date is '||l_ship_date);
12486: msc_sch_wb.atp_debug ('ATP_Check: ' || 'original is '|| p_atp_record.ship_date );
12487: END IF;
12488:
12489: ---bug 2798667: The p_atp_record.ship_date for option item contains ship date for
12490: --- model from earlier source + atp lead time. We should compare with ship date +

Line 12508: msc_sch_wb.atp_debug ('l_atp_lt_offset_ship_date := ' || l_atp_lt_offset_ship_date);

12504: */
12505: l_atp_lt_offset_ship_date := l_ship_date;
12506:
12507: IF PG_DEBUG in ('Y', 'C') THEN
12508: msc_sch_wb.atp_debug ('l_atp_lt_offset_ship_date := ' || l_atp_lt_offset_ship_date);
12509: END IF;
12510:
12511:
12512: -- Bug 1566260, If p_atp_record.ship_date and l_ship_date is null, we assume

Line 12516: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date := ' || p_atp_record.ship_date);

12512: -- Bug 1566260, If p_atp_record.ship_date and l_ship_date is null, we assume
12513: -- that going down is better. This is being done for preserving exploded
12514: -- pegging tree for use by CTO for storing component demands.
12515: IF PG_DEBUG in ('Y', 'C') THEN
12516: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date := ' || p_atp_record.ship_date);
12517: END IF;
12518: --bug 2798667: Compare with l_atp_lt_offset_ship_date
12519: /*IF ((p_atp_record.ship_date IS NULL and l_ship_date IS NULL) OR
12520: (p_atp_record.ship_date IS NOT NULL and (p_atp_record.ship_date <=

Line 12532: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');

12528: -- single level result is better than
12529: -- going down to next level.
12530:
12531: IF PG_DEBUG in ('Y', 'C') THEN
12532: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');
12533: END IF;
12534:
12535: -- dsting ATO 2465370
12536: -- IF NVL(p_atp_record.override_flag, 'N') = 'N'

Line 12550: msc_sch_wb.atp_debug('ATO update details_temp date single lev: ' || p_atp_record.ship_date);

12546: and pegging_id = l_parent_pegging_id
12547: and record_type = 3;
12548:
12549: IF PG_DEBUG in ('Y', 'C') THEN
12550: msc_sch_wb.atp_debug('ATO update details_temp date single lev: ' || p_atp_record.ship_date);
12551: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
12552: END IF;
12553: END IF;
12554:

Line 12551: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);

12547: and record_type = 3;
12548:
12549: IF PG_DEBUG in ('Y', 'C') THEN
12550: msc_sch_wb.atp_debug('ATO update details_temp date single lev: ' || p_atp_record.ship_date);
12551: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
12552: END IF;
12553: END IF;
12554:
12555: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 12569: msc_sch_wb.atp_debug('ATP_Check: ' || 'after copying the data');

12565: C_ITEM_INFO_REC.dest_inv_item_id, -- Bug 3293163
12566: PF_ITEM_INFO_REC.dest_inv_item_id); -- Bug 3293163
12567:
12568: IF PG_DEBUG in ('Y', 'C') THEN
12569: msc_sch_wb.atp_debug('ATP_Check: ' || 'after copying the data');
12570: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||
12571: x_atp_supply_demand.level.count);
12572: END IF;
12573:

Line 12570: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||

12566: PF_ITEM_INFO_REC.dest_inv_item_id); -- Bug 3293163
12567:
12568: IF PG_DEBUG in ('Y', 'C') THEN
12569: msc_sch_wb.atp_debug('ATP_Check: ' || 'after copying the data');
12570: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||
12571: x_atp_supply_demand.level.count);
12572: END IF;
12573:
12574: ELSE

Line 12578: msc_sch_wb.atp_debug('ATP_Check: ' || 'go down is better');

12574: ELSE
12575: -- going down is better than the results
12576: -- in this level
12577: IF PG_DEBUG in ('Y', 'C') THEN
12578: msc_sch_wb.atp_debug('ATP_Check: ' || 'go down is better');
12579: END IF;
12580:
12581: -- dsting ATO 2465370
12582: -- IF NVL(p_atp_record.override_flag, 'N') = 'N'

Line 12596: msc_sch_wb.atp_debug('ATO update details_temp date go down: ' || l_ship_date);

12592: and pegging_id = l_parent_pegging_id
12593: and record_type = 3;
12594:
12595: IF PG_DEBUG in ('Y', 'C') THEN
12596: msc_sch_wb.atp_debug('ATO update details_temp date go down: ' || l_ship_date);
12597: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
12598: END IF;
12599: END IF;
12600:

Line 12597: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);

12593: and record_type = 3;
12594:
12595: IF PG_DEBUG in ('Y', 'C') THEN
12596: msc_sch_wb.atp_debug('ATO update details_temp date go down: ' || l_ship_date);
12597: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
12598: END IF;
12599: END IF;
12600:
12601: -- remove what's bad

Line 12608: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : ' || l_atp_pegging_tab.COUNT);

12604: MSC_ATP_PVT.G_FUTURE_PEGGING_ID := l_pegging_id;
12605: -- remove what's bad
12606:
12607: IF PG_DEBUG in ('Y', 'C') THEN
12608: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : ' || l_atp_pegging_tab.COUNT);
12609: END IF;
12610:
12611: IF l_atp_pegging_tab.COUNT > 0 THEN
12612:

Line 12662: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.quantity_ordered = '||

12658: p_atp_record.atf_date_quantity := 0;
12659: END IF;
12660:
12661: IF PG_DEBUG in ('Y', 'C') THEN
12662: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.quantity_ordered = '||
12663: l_atp_rec.quantity_ordered);
12664: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||
12665: l_atp_rec.available_quantity);
12666: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||

Line 12664: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||

12660:
12661: IF PG_DEBUG in ('Y', 'C') THEN
12662: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.quantity_ordered = '||
12663: l_atp_rec.quantity_ordered);
12664: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||
12665: l_atp_rec.available_quantity);
12666: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||
12667: p_atp_record.available_quantity);
12668: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||

Line 12666: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||

12662: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.quantity_ordered = '||
12663: l_atp_rec.quantity_ordered);
12664: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||
12665: l_atp_rec.available_quantity);
12666: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||
12667: p_atp_record.available_quantity);
12668: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||
12669: p_atp_record.used_available_quantity); --bug3409973
12670:

Line 12668: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||

12664: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||
12665: l_atp_rec.available_quantity);
12666: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||
12667: p_atp_record.available_quantity);
12668: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||
12669: p_atp_record.used_available_quantity); --bug3409973
12670:
12671: -- 2754446
12672: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);

Line 12672: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);

12668: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||
12669: p_atp_record.used_available_quantity); --bug3409973
12670:
12671: -- 2754446
12672: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);
12673: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);
12674: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);
12675: END IF;
12676:

Line 12673: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);

12669: p_atp_record.used_available_quantity); --bug3409973
12670:
12671: -- 2754446
12672: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);
12673: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);
12674: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);
12675: END IF;
12676:
12677: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 12674: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);

12670:
12671: -- 2754446
12672: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);
12673: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);
12674: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);
12675: END IF;
12676:
12677: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
12678: p_plan_id,

Line 12711: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here? we should adjust the planned order');

12707: ELSE
12708:
12709: -- we are in backward part
12710: IF PG_DEBUG in ('Y', 'C') THEN
12711: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here? we should adjust the planned order');
12712: END IF;
12713:
12714: -- cchen: bug 1121227
12715: -- the quantity we want to adjust should not

Line 12729: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);

12725: ELSE
12726: l_update_PO_mode := MSC_ATP_PVT.UNDO;
12727: END IF;
12728: IF PG_DEBUG in ('Y', 'C') THEN
12729: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
12730: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
12731: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
12732: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
12733: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );

Line 12730: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);

12726: l_update_PO_mode := MSC_ATP_PVT.UNDO;
12727: END IF;
12728: IF PG_DEBUG in ('Y', 'C') THEN
12729: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
12730: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
12731: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
12732: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
12733: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );
12734: END IF;

Line 12731: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);

12727: END IF;
12728: IF PG_DEBUG in ('Y', 'C') THEN
12729: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
12730: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
12731: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
12732: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
12733: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );
12734: END IF;
12735:

Line 12732: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);

12728: IF PG_DEBUG in ('Y', 'C') THEN
12729: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
12730: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
12731: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
12732: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
12733: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );
12734: END IF;
12735:
12736: -- dsting diag_atp if we still have sources or diagnostic atp is off

Line 12733: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );

12729: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
12730: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
12731: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
12732: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
12733: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );
12734: END IF;
12735:
12736: -- dsting diag_atp if we still have sources or diagnostic atp is off
12737: -- then we update the planned order. If l_update_PO_mode is INVALID

Line 12750: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);

12746: MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1
12747: THEN
12748:
12749: IF PG_DEBUG in ('Y', 'C') THEN
12750: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
12751: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12752: END IF;
12753:
12754: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 12751: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);

12747: THEN
12748:
12749: IF PG_DEBUG in ('Y', 'C') THEN
12750: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
12751: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12752: END IF;
12753:
12754: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
12755: p_plan_id,

Line 12793: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);

12789: */
12790: --5230396, updating planned order for diag ATP too in Buy case.
12791: ELSIF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
12792: IF PG_DEBUG in ('Y', 'C') THEN
12793: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
12794: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12795: END IF;
12796:
12797: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 12794: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);

12790: --5230396, updating planned order for diag ATP too in Buy case.
12791: ELSIF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
12792: IF PG_DEBUG in ('Y', 'C') THEN
12793: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
12794: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12795: END IF;
12796:
12797: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
12798: p_plan_id,

Line 12854: msc_sch_wb.atp_debug('It is a make case ');

12850: ELSE -- it is a make
12851:
12852: --s_cto_rearch
12853: IF PG_DEBUG in ('Y', 'C') THEN
12854: msc_sch_wb.atp_debug('It is a make case ');
12855: msc_sch_wb.atp_debug('G_MODEL_BOM_IS_COLLECTED := ' || MSC_ATP_CTO.G_MODEL_BOM_IS_COLLECTED);
12856: msc_sch_wb.atp_debug('Bom Item Flag := ' || PF_ITEM_INFO_REC.bom_item_type);
12857: END IF;
12858: l_get_comp_info_rec.line_id := p_atp_record.demand_source_line;

Line 12855: msc_sch_wb.atp_debug('G_MODEL_BOM_IS_COLLECTED := ' || MSC_ATP_CTO.G_MODEL_BOM_IS_COLLECTED);

12851:
12852: --s_cto_rearch
12853: IF PG_DEBUG in ('Y', 'C') THEN
12854: msc_sch_wb.atp_debug('It is a make case ');
12855: msc_sch_wb.atp_debug('G_MODEL_BOM_IS_COLLECTED := ' || MSC_ATP_CTO.G_MODEL_BOM_IS_COLLECTED);
12856: msc_sch_wb.atp_debug('Bom Item Flag := ' || PF_ITEM_INFO_REC.bom_item_type);
12857: END IF;
12858: l_get_comp_info_rec.line_id := p_atp_record.demand_source_line;
12859: l_get_comp_info_rec.bom_item_type := PF_ITEM_INFO_REC.Bom_item_type;

Line 12856: msc_sch_wb.atp_debug('Bom Item Flag := ' || PF_ITEM_INFO_REC.bom_item_type);

12852: --s_cto_rearch
12853: IF PG_DEBUG in ('Y', 'C') THEN
12854: msc_sch_wb.atp_debug('It is a make case ');
12855: msc_sch_wb.atp_debug('G_MODEL_BOM_IS_COLLECTED := ' || MSC_ATP_CTO.G_MODEL_BOM_IS_COLLECTED);
12856: msc_sch_wb.atp_debug('Bom Item Flag := ' || PF_ITEM_INFO_REC.bom_item_type);
12857: END IF;
12858: l_get_comp_info_rec.line_id := p_atp_record.demand_source_line;
12859: l_get_comp_info_rec.bom_item_type := PF_ITEM_INFO_REC.Bom_item_type;
12860: l_get_comp_info_rec.atp_flag := l_atp_flag;

Line 12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');

12881: p_plan_id );
12882:
12883: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12884: IF PG_DEBUG in ('Y', 'C') THEN
12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
12886: END IF;
12887: x_return_status := FND_API.G_RET_STS_ERROR;
12888: RAISE FND_API.G_EXC_ERROR;
12889: END IF;

Line 12933: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

12929: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1
12930: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN --bug3397904
12931: l_PO_qty := CEIL(p_atp_record.quantity_ordered);
12932: IF PG_DEBUG in ('Y', 'C') THEN
12933: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
12934: END IF;
12935: ELSE
12936: l_PO_qty := CEIL(l_net_demand);
12937: IF PG_DEBUG in ('Y', 'C') THEN

Line 12938: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

12934: END IF;
12935: ELSE
12936: l_PO_qty := CEIL(l_net_demand);
12937: IF PG_DEBUG in ('Y', 'C') THEN
12938: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
12939: END IF;
12940: END IF;
12941: ELSE
12942: --bug 3904063: Reset the quantity only in case of demand priorit allocated ATP

Line 12950: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

12946: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN --bug3397904
12947:
12948: l_PO_qty := trunc(p_atp_record.quantity_ordered, 6); --5598066
12949: IF PG_DEBUG in ('Y', 'C') THEN
12950: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
12951: END IF;
12952: ELSE
12953: l_PO_qty := trunc(l_net_demand, 6); --5598066
12954: IF PG_DEBUG in ('Y', 'C') THEN

Line 12955: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

12951: END IF;
12952: ELSE
12953: l_PO_qty := trunc(l_net_demand, 6); --5598066
12954: IF PG_DEBUG in ('Y', 'C') THEN
12955: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
12956: END IF;
12957: END IF;
12958: END IF;
12959: --bug3397904 end

Line 12964: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make');

12960: -- dsting 2764213
12961: l_planned_sources := 1;
12962:
12963: IF PG_DEBUG in ('Y', 'C') THEN
12964: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make');
12965: END IF;
12966: -- insert a plan order for the l_net_demand
12967: --- bug 1941489
12968: --- assign correct pegging-id to co-product pegging id

Line 12973: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_coprod_pegging_id := ' || l_coprod_pegging_id);

12969: --- this pegging id will be used to link the coproduct supply to correct
12970: ---parent
12971: l_coprod_pegging_id := l_parent_pegging_id;
12972: IF PG_DEBUG in ('Y', 'C') THEN
12973: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_coprod_pegging_id := ' || l_coprod_pegging_id);
12974: END IF;
12975: --- bug 2178544
12976: ---- get mso_lead_time factor
12977: l_mso_lead_time_factor := MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR;

Line 12992: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);

12988: -- + l_pre_pro_lt);
12989: -- l_process_lt := CEIL((l_fixed_lt +
12990: -- (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
12991: IF PG_DEBUG in ('Y', 'C') THEN
12992: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
12993: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
12994: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
12995: END IF;
12996: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date;

Line 12993: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);

12989: -- l_process_lt := CEIL((l_fixed_lt +
12990: -- (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
12991: IF PG_DEBUG in ('Y', 'C') THEN
12992: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
12993: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
12994: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
12995: END IF;
12996: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date;
12997: ---diag_ATP

Line 12994: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);

12990: -- (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
12991: IF PG_DEBUG in ('Y', 'C') THEN
12992: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
12993: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
12994: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
12995: END IF;
12996: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date;
12997: ---diag_ATP
12998: IF p_search = BACKWARD_SCHEDULING THEN

Line 13003: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate order date');

12999: l_constraint_flag := 2;
13000: --diag_ATP
13001: IF l_net_processing_lt > 0 THEN
13002: IF PG_DEBUG in ('Y', 'C') THEN
13003: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate order date');
13004: END IF;
13005: /* ship_rec_cal
13006: l_order_date := MSC_CALENDAR.DATE_OFFSET
13007: (p_atp_record.organization_id,

Line 13021: msc_sch_wb.atp_debug('ATP_Check: ' || 'Net process lt is zero');

13017: (-1 * l_net_processing_lt), -1);
13018:
13019: ELSE
13020: IF PG_DEBUG in ('Y', 'C') THEN
13021: msc_sch_wb.atp_debug('ATP_Check: ' || 'Net process lt is zero');
13022: END IF;
13023: l_order_date := l_sysdate;
13024: END IF;
13025:

Line 13027: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_order_date := ' || l_order_date);

13023: l_order_date := l_sysdate;
13024: END IF;
13025:
13026: IF PG_DEBUG in ('Y', 'C') THEN
13027: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_order_date := ' || l_order_date);
13028: END IF;
13029: -- calculate start date only if PTF_flag is enabled for the plan
13030: IF (l_process_lt > 0) THEN
13031: IF PG_DEBUG in ('Y', 'C') THEN

Line 13032: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate start date');

13028: END IF;
13029: -- calculate start date only if PTF_flag is enabled for the plan
13030: IF (l_process_lt > 0) THEN
13031: IF PG_DEBUG in ('Y', 'C') THEN
13032: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate start date');
13033: END IF;
13034: /* ship_rec_cal
13035: l_start_date := MSC_CALENDAR.DATE_OFFSET
13036: (p_atp_record.organization_id,

Line 13049: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF flag is off for the plan or process LT is 0');

13045: (-1 * l_process_lt), -1);
13046: ELSE
13047:
13048: IF PG_DEBUG in ('Y', 'C') THEN
13049: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF flag is off for the plan or process LT is 0');
13050: END IF;
13051: l_start_date := l_ptf_date;
13052: END IF;
13053:

Line 13055: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

13051: l_start_date := l_ptf_date;
13052: END IF;
13053:
13054: IF PG_DEBUG in ('Y', 'C') THEN
13055: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
13056: END IF;
13057: -- bug 2178544
13058:
13059: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN

Line 13097: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);

13093: ELSE
13094: l_ptf_due_date := l_ptf_date;
13095: END IF;
13096: IF PG_DEBUG in ('Y', 'C') THEN
13097: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);
13098: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
13099: END IF;
13100:
13101: ---We marked the most constrained constraint. If both constraint are equally

Line 13098: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);

13094: l_ptf_due_date := l_ptf_date;
13095: END IF;
13096: IF PG_DEBUG in ('Y', 'C') THEN
13097: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);
13098: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
13099: END IF;
13100:
13101: ---We marked the most constrained constraint. If both constraint are equally
13102: -- constrained then we mark PTF constraint.

Line 13158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

13154: ELSE
13155: l_start_date := l_ptf_date;
13156: END IF;
13157: IF PG_DEBUG in ('Y', 'C') THEN
13158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
13159: END IF;
13160: MSC_ATP_PVT.G_FUTURE_START_DATE := GREATEST(l_start_date, MSC_ATP_PVT.G_PTF_DATE);
13161: ---we make sure that PTF for this stage is greatst of Parent's ptf - lead time,
13162: -- current level's PTF and (sysdate + pre processing lt). The last part is the minimum

Line 13203: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_ORDER_DATE :='|| MSC_ATP_PVT.G_FUTURE_ORDER_DATE);

13199: l_ptf_date, l_sysdate);
13200: END IF;
13201:
13202: IF PG_DEBUG in ('Y', 'C') THEN
13203: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_ORDER_DATE :='|| MSC_ATP_PVT.G_FUTURE_ORDER_DATE);
13204: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_START_DATE :='|| MSC_ATP_PVT.G_FUTURE_START_DATE);
13205: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
13206: END IF;
13207: --- if requested_ship_date is less than l_ptf_date then we add ptf_date for this item

Line 13204: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_START_DATE :='|| MSC_ATP_PVT.G_FUTURE_START_DATE);

13200: END IF;
13201:
13202: IF PG_DEBUG in ('Y', 'C') THEN
13203: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_ORDER_DATE :='|| MSC_ATP_PVT.G_FUTURE_ORDER_DATE);
13204: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_START_DATE :='|| MSC_ATP_PVT.G_FUTURE_START_DATE);
13205: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
13206: END IF;
13207: --- if requested_ship_date is less than l_ptf_date then we add ptf_date for this item
13208: -- UI checks this column. If this coulm is populated then UI flags this PO

Line 13205: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

13201:
13202: IF PG_DEBUG in ('Y', 'C') THEN
13203: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_ORDER_DATE :='|| MSC_ATP_PVT.G_FUTURE_ORDER_DATE);
13204: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_START_DATE :='|| MSC_ATP_PVT.G_FUTURE_START_DATE);
13205: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
13206: END IF;
13207: --- if requested_ship_date is less than l_ptf_date then we add ptf_date for this item
13208: -- UI checks this column. If this coulm is populated then UI flags this PO
13209: --diag_atp

Line 13214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add PTF date to pegging');

13210: -- IF l_requested_ship_date < l_start_date or l_requested_ship_date < sysdate THEN
13211: -- Bug 3412143 - Use l_sysdate (in this case validated in OMC) instead of sysdate
13212: IF l_requested_ship_date < l_start_date or l_requested_ship_date < l_sysdate THEN
13213: IF PG_DEBUG in ('Y', 'C') THEN
13214: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add PTF date to pegging');
13215: END IF;
13216: -- Bug 3525582 - PTF constraint should be added only if plan is PTF enabled
13217: IF l_ptf_enabled=2 OR MSC_ATP_PVT.G_FUTURE_ORDER_DATE > l_start_date THEN
13218: l_pegging_rec.constraint_date := MSC_ATP_PVT.G_FUTURE_ORDER_DATE;

Line 13373: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 1');

13369: l_pegging_rec.supply_demand_date:= l_requested_ship_date;
13370: l_pegging_rec.source_type := 2;
13371:
13372: IF PG_DEBUG in ('Y', 'C') THEN
13373: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 1');
13374: END IF;
13375:
13376: -- for demo:1153192
13377: l_pegging_rec.constraint_flag := 'N';

Line 13453: msc_sch_wb.atp_debug('make last good pegging id ' || l_pegging_id);

13449:
13450: -- dsting diag_atp last good peggingfor make
13451: IF l_pegging_rec.constraint_type IS NULL THEN
13452: IF PG_DEBUG in ('Y', 'C') THEN
13453: msc_sch_wb.atp_debug('make last good pegging id ' || l_pegging_id);
13454: END IF;
13455: l_last_good_pegging_id := l_pegging_id;
13456: END IF;
13457:

Line 13468: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);

13464: + l_pre_pro_lt);
13465: l_process_lt := CEIL((l_fixed_lt +
13466: (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
13467: IF PG_DEBUG in ('Y', 'C') THEN
13468: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
13469: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
13470: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
13471: END IF;
13472: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date; */

Line 13469: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);

13465: l_process_lt := CEIL((l_fixed_lt +
13466: (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
13467: IF PG_DEBUG in ('Y', 'C') THEN
13468: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
13469: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
13470: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
13471: END IF;
13472: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date; */
13473:

Line 13470: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);

13466: (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
13467: IF PG_DEBUG in ('Y', 'C') THEN
13468: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
13469: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
13470: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
13471: END IF;
13472: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date; */
13473:
13474: IF PG_DEBUG in ('Y', 'C') THEN

Line 13475: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_search' || p_search);

13471: END IF;
13472: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date; */
13473:
13474: IF PG_DEBUG in ('Y', 'C') THEN
13475: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_search' || p_search);
13476: END IF;
13477: --diag_atp
13478: IF (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 and l_constraint_flag <> 1) OR
13479: (p_search = BACKWARD_SCHEDULING and MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1) THEN

Line 13490: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

13486: ---- and requested_date quantity is set to Zero
13487: --- If Offseted date is > sysdate then we continue as ususal
13488:
13489: IF PG_DEBUG in ('Y', 'C') THEN
13490: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
13491: END IF;
13492: -- bug 2178544
13493:
13494: IF (l_order_date < l_sysdate OR l_start_date < l_ptf_date) THEN

Line 13496: msc_sch_wb.atp_debug('ATP_Check: ' || 'req date - lead time is less than sys or ptf date');

13492: -- bug 2178544
13493:
13494: IF (l_order_date < l_sysdate OR l_start_date < l_ptf_date) THEN
13495: IF PG_DEBUG in ('Y', 'C') THEN
13496: msc_sch_wb.atp_debug('ATP_Check: ' || 'req date - lead time is less than sys or ptf date');
13497: END IF;
13498: l_avail_assembly_qty := 0;
13499: ELSE
13500:

Line 13502: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 2');

13498: l_avail_assembly_qty := 0;
13499: ELSE
13500:
13501: IF PG_DEBUG in ('Y', 'C') THEN
13502: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 2');
13503: END IF;
13504: IF ((l_atp_comp_flag = 'R') OR
13505: (l_atp_comp_flag = 'C')) THEN
13506: IF PG_DEBUG in ('Y', 'C') THEN

Line 13507: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 3');

13503: END IF;
13504: IF ((l_atp_comp_flag = 'R') OR
13505: (l_atp_comp_flag = 'C')) THEN
13506: IF PG_DEBUG in ('Y', 'C') THEN
13507: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 3');
13508: END IF;
13509:
13510: -- get resource requirements first
13511: MSC_ATP_REQ.Get_Res_Requirements(

Line 13563: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 4');

13559: LEAST(l_net_demand, l_avail_assembly_qty) >0 THEN
13560: -- get component requirements first
13561:
13562: IF PG_DEBUG in ('Y', 'C') THEN
13563: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 4');
13564: END IF;
13565:
13566: BEGIN
13567: IF l_avail_assembly_qty < l_net_demand AND

Line 13638: msc_sch_wb.atp_debug('ATP_Check: ' || ' Sourcing Mismatch Error');

13634: -- 2400614: krajan
13635: EXCEPTION
13636: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
13637: IF PG_DEBUG in ('Y', 'C') THEN
13638: msc_sch_wb.atp_debug('ATP_Check: ' || ' Sourcing Mismatch Error');
13639: END IF;
13640: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
13641: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
13642:

Line 13646: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');

13642:
13643: -- dsting 2764213
13644: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
13645: IF PG_DEBUG in ('Y', 'C') THEN
13646: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');
13647: END IF;
13648: --24x7
13649: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
13650: ---2854351

Line 13661: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item Error');

13657: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
13658: -- krajan 2752705
13659: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
13660: IF PG_DEBUG in ('Y', 'C') THEN
13661: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item Error');
13662: END IF;
13663: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
13664: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
13665: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705

Line 13667: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');

13663: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
13664: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
13665: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
13666: IF PG_DEBUG in ('Y', 'C') THEN
13667: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');
13668: END IF;
13669: p_atp_record.error_code := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
13670: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
13671: END;

Line 13710: msc_sch_wb.atp_debug('FLOOR of avail qty for l_avail_PO_qty: '

13706: l_avail_assembly_qty := LEAST(l_avail_assembly_qty, l_res_avail_qty);
13707: END IF;
13708:
13709: IF NVL(C_ITEM_INFO_REC.rounding_control_type, 2) = 1 THEN
13710: msc_sch_wb.atp_debug('FLOOR of avail qty for l_avail_PO_qty: '
13711: || l_avail_assembly_qty);
13712: l_avail_PO_qty := FLOOR(l_avail_assembly_qty);
13713: ELSE
13714: msc_sch_wb.atp_debug('l_avail_PO_qty := avail qty: '

Line 13714: msc_sch_wb.atp_debug('l_avail_PO_qty := avail qty: '

13710: msc_sch_wb.atp_debug('FLOOR of avail qty for l_avail_PO_qty: '
13711: || l_avail_assembly_qty);
13712: l_avail_PO_qty := FLOOR(l_avail_assembly_qty);
13713: ELSE
13714: msc_sch_wb.atp_debug('l_avail_PO_qty := avail qty: '
13715: || l_avail_assembly_qty);
13716: l_avail_PO_qty := trunc(l_avail_assembly_qty, 6); --5598066
13717: END IF;
13718:

Line 13725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);

13721: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
13722: l_avail_assembly_qty := LEAST(l_avail_assembly_qty, l_res_avail_qty);
13723:
13724: IF PG_DEBUG in ('Y', 'C') THEN
13725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
13726: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);
13727: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);
13728: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);
13729: END IF;

Line 13726: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);

13722: l_avail_assembly_qty := LEAST(l_avail_assembly_qty, l_res_avail_qty);
13723:
13724: IF PG_DEBUG in ('Y', 'C') THEN
13725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
13726: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);
13727: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);
13728: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);
13729: END IF;
13730:

Line 13727: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);

13723:
13724: IF PG_DEBUG in ('Y', 'C') THEN
13725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
13726: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);
13727: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);
13728: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);
13729: END IF;
13730:
13731: -- dsting diag_atp

Line 13728: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);

13724: IF PG_DEBUG in ('Y', 'C') THEN
13725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
13726: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);
13727: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);
13728: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);
13729: END IF;
13730:
13731: -- dsting diag_atp
13732: -- If this is the last source we should only update the pegging and not

Line 13781: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty ='||l_avail_assembly_qty);

13777:
13778: ELSIF (l_avail_PO_qty < l_net_demand) THEN
13779: --ELSIF (l_avail_assembly_qty < l_net_demand) THEN
13780: IF PG_DEBUG in ('Y', 'C') THEN
13781: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty ='||l_avail_assembly_qty);
13782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
13783: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 7');
13784: END IF;
13785: IF l_avail_PO_qty > 0 THEN

Line 13782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);

13778: ELSIF (l_avail_PO_qty < l_net_demand) THEN
13779: --ELSIF (l_avail_assembly_qty < l_net_demand) THEN
13780: IF PG_DEBUG in ('Y', 'C') THEN
13781: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty ='||l_avail_assembly_qty);
13782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
13783: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 7');
13784: END IF;
13785: IF l_avail_PO_qty > 0 THEN
13786: --IF l_avail_assembly_qty > 0 THEN

Line 13783: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 7');

13779: --ELSIF (l_avail_assembly_qty < l_net_demand) THEN
13780: IF PG_DEBUG in ('Y', 'C') THEN
13781: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty ='||l_avail_assembly_qty);
13782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
13783: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 7');
13784: END IF;
13785: IF l_avail_PO_qty > 0 THEN
13786: --IF l_avail_assembly_qty > 0 THEN
13787:

Line 13801: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 6');

13797: 0,
13798: l_return_status);
13799:
13800: IF PG_DEBUG in ('Y', 'C') THEN
13801: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 6');
13802: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
13803: END IF;
13804:
13805: -- update/delete the planned order record.

Line 13802: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);

13798: l_return_status);
13799:
13800: IF PG_DEBUG in ('Y', 'C') THEN
13801: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 6');
13802: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
13803: END IF;
13804:
13805: -- update/delete the planned order record.
13806: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 13837: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting G_COMP_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);

13833: -- just to make sure that in case of CTO, we try to get the
13834: -- BOM correctly from msc_bom_temp_table.
13835:
13836: IF PG_DEBUG in ('Y', 'C') THEN
13837: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting G_COMP_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
13838: END IF;
13839:
13840: MSC_ATP_PVT.G_COMP_LINE_ID := MSC_ATP_PVT.G_ASSEMBLY_LINE_ID;
13841:

Line 13846: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);

13842: IF ((l_atp_comp_flag = 'R') OR
13843: (l_atp_comp_flag = 'C')) THEN
13844: -- get resource requirements first
13845: IF PG_DEBUG in ('Y', 'C') THEN
13846: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
13847: END IF;
13848:
13849: -- dsting for nocopy changes
13850: l_res_demand := l_avail_PO_qty; -- 2869830

Line 13966: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sourcing Mismatch Error');

13962: EXCEPTION
13963: -- Raising exception handled below
13964: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
13965: IF PG_DEBUG in ('Y', 'C') THEN
13966: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sourcing Mismatch Error');
13967: END IF;
13968: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
13969: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
13970:

Line 13974: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');

13970:
13971: -- dsting 2764213
13972: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
13973: IF PG_DEBUG in ('Y', 'C') THEN
13974: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');
13975: END IF;
13976: --24x7
13977: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
13978: --bug 2854351:

Line 13988: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item Found');

13984: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
13985: -- krajan : 2752705
13986: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
13987: IF PG_DEBUG in ('Y', 'C') THEN
13988: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item Found');
13989: END IF;
13990: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
13991: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
13992: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705

Line 13994: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');

13990: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
13991: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
13992: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
13993: IF PG_DEBUG in ('Y', 'C') THEN
13994: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');
13995: END IF;
13996: p_atp_record.error_code := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
13997: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
13998: END;

Line 14090: msc_sch_wb.atp_debug('ATP_Check: ' || 'OSFM Coproducts Backward');

14086:
14087:
14088: END IF; -- end if the undo stuff
14089: IF PG_DEBUG in ('Y', 'C') THEN
14090: msc_sch_wb.atp_debug('ATP_Check: ' || 'OSFM Coproducts Backward');
14091: END IF;
14092: --- OSFM Changes: update coproduct supply
14093: l_coproducts_flag := FND_Profile.value('MSC_PLAN_COPRODUCTS');
14094: IF PG_DEBUG in ('Y', 'C') THEN

Line 14095: msc_sch_wb.atp_debug('ATP_Check: ' || 'msc_plan_coproducts = ' || l_coproducts_flag);

14091: END IF;
14092: --- OSFM Changes: update coproduct supply
14093: l_coproducts_flag := FND_Profile.value('MSC_PLAN_COPRODUCTS');
14094: IF PG_DEBUG in ('Y', 'C') THEN
14095: msc_sch_wb.atp_debug('ATP_Check: ' || 'msc_plan_coproducts = ' || l_coproducts_flag);
14096: END IF;
14097: --- set the sumary flag back to summary flag for p_plan_id
14098: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
14099: IF ((l_atp_comp_flag = 'C') OR

Line 14105: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add Coproducts for item '||p_atp_record.inventory_item_id);

14101: l_coproducts_flag = 'Y' AND
14102: l_avail_assembly_qty >0 THEN
14103:
14104: IF PG_DEBUG in ('Y', 'C') THEN
14105: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add Coproducts for item '||p_atp_record.inventory_item_id);
14106: END IF;
14107: MSC_ATP_PROC.Add_Coproducts(
14108: p_plan_id,
14109: p_atp_record.instance_id,

Line 14124: msc_sch_wb.atp_debug('ATP_Check: ' || 'After adding coproducts Backward');

14120: p_refresh_number, -- For summary enhancement
14121: l_transaction_id --3766179
14122: );
14123: IF PG_DEBUG in ('Y', 'C') THEN
14124: msc_sch_wb.atp_debug('ATP_Check: ' || 'After adding coproducts Backward');
14125: END IF;
14126:
14127: END IF;
14128: l_net_demand := l_net_demand-l_avail_assembly_qty;

Line 14141: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside forward_scheduling');

14137: END IF;
14138: ---diag_atp
14139: ELSIF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
14140: IF PG_DEBUG in ('Y', 'C') THEN
14141: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside forward_scheduling');
14142: END IF;
14143: -- p_sched_flag = FORWARD_SCHEDULING
14144:
14145: -- initialize the atp date

Line 14157: --msc_sch_wb.atp_debug('setting G_COMP_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);

14153: -- Bug 1532051, set G_COMP_LINE_ID again to G_ORDER_LINE_ID,
14154: -- just to make sure that in case of CTO, we try to get the
14155: -- BOM correctly from msc_bom_temp_table.
14156:
14157: --msc_sch_wb.atp_debug('setting G_COMP_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
14158:
14159: --MSC_ATP_PVT.G_COMP_LINE_ID := MSC_ATP_PVT.G_ORDER_LINE_ID;
14160:
14161: -- dsting 2754446 adjust l_net_demand according to rounding_control_type

Line 14173: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

14169: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1
14170: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
14171: l_PO_qty := CEIL(p_atp_record.quantity_ordered);
14172: IF PG_DEBUG in ('Y', 'C') THEN
14173: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
14174: END IF;
14175: ELSE
14176: l_PO_qty := CEIL(l_net_demand);
14177: IF PG_DEBUG in ('Y', 'C') THEN

Line 14178: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

14174: END IF;
14175: ELSE
14176: l_PO_qty := CEIL(l_net_demand);
14177: IF PG_DEBUG in ('Y', 'C') THEN
14178: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
14179: END IF;
14180: END IF;
14181: ELSE
14182: --bug 3904063: Reset the quantity only in case of demand priority allocated ATP

Line 14189: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

14185: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1
14186: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
14187: l_PO_qty := trunc(p_atp_record.quantity_ordered, 6); --5598066
14188: IF PG_DEBUG in ('Y', 'C') THEN
14189: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
14190: END IF;
14191: ELSE
14192: l_PO_qty := trunc(l_net_demand, 6); --5598066
14193: IF PG_DEBUG in ('Y', 'C') THEN

Line 14194: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

14190: END IF;
14191: ELSE
14192: l_PO_qty := trunc(l_net_demand, 6); --5598066
14193: IF PG_DEBUG in ('Y', 'C') THEN
14194: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
14195: END IF;
14196: END IF;
14197: END IF;
14198: --bug3397904 end

Line 14203: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside atp_comp_flag R or C');

14199: IF ((l_atp_comp_flag = 'R') OR
14200: (l_atp_comp_flag = 'C')) THEN
14201: -- get resource requirements first
14202: IF PG_DEBUG in ('Y', 'C') THEN
14203: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside atp_comp_flag R or C');
14204: END IF;
14205:
14206: --(ssurendr) Bug 2865389 Call procedure get_process_effectivity
14207: --Details. Derive Item's Start Date by Offsetting

Line 14275: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);

14271: RAISE FND_API.G_EXC_ERROR;
14272: END IF;
14273:
14274: IF PG_DEBUG in ('Y', 'C') THEN
14275: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);
14276: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date = '||l_res_atp_date);
14277: END IF;
14278:
14279: -- Bug 1608755, in case l_res_atp_date is null, set l_comp_atp_date

Line 14276: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date = '||l_res_atp_date);

14272: END IF;
14273:
14274: IF PG_DEBUG in ('Y', 'C') THEN
14275: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);
14276: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date = '||l_res_atp_date);
14277: END IF;
14278:
14279: -- Bug 1608755, in case l_res_atp_date is null, set l_comp_atp_date
14280: -- to NULL so that we return single level better than going down.

Line 14301: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside atp_comp_flag Y or C');

14297:
14298: -- get component requirements first
14299:
14300: IF PG_DEBUG in ('Y', 'C') THEN
14301: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside atp_comp_flag Y or C');
14302: END IF;
14303: BEGIN
14304: MSC_ATP_REQ.Get_Comp_Requirements(
14305: p_atp_record.instance_id,

Line 14344: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch Error');

14340: EXCEPTION
14341: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
14342: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
14343: IF PG_DEBUG in ('Y', 'C') THEN
14344: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch Error');
14345: END IF;
14346: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
14347:
14348: -- dsting 2764213

Line 14351: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');

14347:
14348: -- dsting 2764213
14349: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
14350: IF PG_DEBUG in ('Y', 'C') THEN
14351: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');
14352: END IF;
14353: --24x7
14354: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
14355: --bug 2854351

Line 14366: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item');

14362:
14363: -- krajan : 2752705
14364: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
14365: IF PG_DEBUG in ('Y', 'C') THEN
14366: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item');
14367: END IF;
14368: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
14369: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
14370:

Line 14373: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');

14369: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
14370:
14371: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
14372: IF PG_DEBUG in ('Y', 'C') THEN
14373: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');
14374: END IF;
14375: p_atp_record.error_code := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
14376: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
14377: END;

Line 14380: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);

14376: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
14377: END;
14378:
14379: IF PG_DEBUG in ('Y', 'C') THEN
14380: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);
14381: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date = '||l_comp_atp_date);
14382: END IF;
14383:
14384: -- Bug 1608755, in case l_comp_atp_date is null, set l_res_atp_date

Line 14381: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date = '||l_comp_atp_date);

14377: END;
14378:
14379: IF PG_DEBUG in ('Y', 'C') THEN
14380: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);
14381: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date = '||l_comp_atp_date);
14382: END IF;
14383:
14384: -- Bug 1608755, in case l_comp_atp_date is null, set l_res_atp_date
14385: -- to NULL so that we return single level better than going down.

Line 14402: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);

14398: RAISE FND_API.G_EXC_ERROR;
14399: END IF;
14400:
14401: IF PG_DEBUG in ('Y', 'C') THEN
14402: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);
14403: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);
14404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);
14405: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
14406: END IF;

Line 14403: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);

14399: END IF;
14400:
14401: IF PG_DEBUG in ('Y', 'C') THEN
14402: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);
14403: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);
14404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);
14405: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
14406: END IF;
14407:

Line 14404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);

14400:
14401: IF PG_DEBUG in ('Y', 'C') THEN
14402: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);
14403: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);
14404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);
14405: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
14406: END IF;
14407:
14408: -- Bug 1449555

Line 14405: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);

14401: IF PG_DEBUG in ('Y', 'C') THEN
14402: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);
14403: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);
14404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);
14405: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
14406: END IF;
14407:
14408: -- Bug 1449555
14409: IF l_comp_atp_date is NOT NULL and

Line 14449: msc_sch_wb.atp_debug('l_atp_lt_offset_ship_date := ' || l_atp_lt_offset_ship_date);

14445: */
14446: l_atp_lt_offset_ship_date := l_temp_date;
14447:
14448: IF PG_DEBUG in ('Y', 'C') THEN
14449: msc_sch_wb.atp_debug('l_atp_lt_offset_ship_date := ' || l_atp_lt_offset_ship_date);
14450: END IF;
14451:
14452:
14453: ---bug 2798667: should be comparing with l_atp_lt_offset_ship_date instead of l_temp_date

Line 14469: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');

14465: -- single level result is better than
14466: -- going down to next level.
14467:
14468: IF PG_DEBUG in ('Y', 'C') THEN
14469: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');
14470: END IF;
14471:
14472:
14473: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 14489: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||

14485: --null, -- Bug 3241766
14486: C_ITEM_INFO_REC.dest_inv_item_id, -- Bug 3293163
14487: PF_ITEM_INFO_REC.dest_inv_item_id); -- Bug 3293163
14488: IF PG_DEBUG in ('Y', 'C') THEN
14489: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||
14490: x_atp_supply_demand.level.count);
14491: END IF;
14492:
14493: ELSE

Line 14503: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : ' || l_atp_pegging_tab.COUNT);

14499: --- this pegging in ATP_CHECK_SUBST
14500: MSC_ATP_PVT.G_FUTURE_PEGGING_ID := l_pegging_id;
14501:
14502: IF PG_DEBUG in ('Y', 'C') THEN
14503: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : ' || l_atp_pegging_tab.COUNT);
14504: END IF;
14505:
14506: IF l_atp_pegging_tab.COUNT > 0 THEN
14507:

Line 14547: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);

14543: p_atp_record.ship_date := l_atp_lt_offset_ship_date;
14544:
14545:
14546: IF PG_DEBUG in ('Y', 'C') THEN
14547: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
14548: END IF;
14549: -- we will say the available quantity is
14550: -- exact the quantity we want to order.
14551: -- although this is not correct (

Line 14572: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate order date');

14568: --bug 3755704: Calculate order date and start date based on new date
14569:
14570: IF l_net_processing_lt > 0 THEN
14571: IF PG_DEBUG in ('Y', 'C') THEN
14572: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate order date');
14573: END IF;
14574: -- since it is a make case only calendar being used is
14575: --p_atp_record.manufacturing_cal_code
14576: l_order_date := MSC_CALENDAR.DATE_OFFSET(

Line 14584: msc_sch_wb.atp_debug('ATP_Check: ' || 'Net process lt is zero');

14580: (-1 * l_net_processing_lt), -1);
14581:
14582: ELSE
14583: IF PG_DEBUG in ('Y', 'C') THEN
14584: msc_sch_wb.atp_debug('ATP_Check: ' || 'Net process lt is zero');
14585: END IF;
14586: l_order_date := l_temp_date;
14587: END IF;
14588:

Line 14590: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_order_date := ' || l_order_date);

14586: l_order_date := l_temp_date;
14587: END IF;
14588:
14589: IF PG_DEBUG in ('Y', 'C') THEN
14590: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_order_date := ' || l_order_date);
14591: END IF;
14592: -- calculate start date only if PTF_flag is enabled for the plan
14593: IF (l_process_lt > 0) THEN
14594: IF PG_DEBUG in ('Y', 'C') THEN

Line 14595: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate start date');

14591: END IF;
14592: -- calculate start date only if PTF_flag is enabled for the plan
14593: IF (l_process_lt > 0) THEN
14594: IF PG_DEBUG in ('Y', 'C') THEN
14595: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate start date');
14596: END IF;
14597: l_start_date := MSC_CALENDAR.DATE_OFFSET(
14598: p_atp_record.manufacturing_cal_code,
14599: p_atp_record.instance_id,

Line 14605: msc_sch_wb.atp_debug('ATP_Check: ' || 'process LT is 0');

14601: (-1 * l_process_lt), -1);
14602: ELSE
14603:
14604: IF PG_DEBUG in ('Y', 'C') THEN
14605: msc_sch_wb.atp_debug('ATP_Check: ' || 'process LT is 0');
14606: END IF;
14607: l_start_date := l_temp_date;
14608: END IF;
14609:

Line 14611: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

14607: l_start_date := l_temp_date;
14608: END IF;
14609:
14610: IF PG_DEBUG in ('Y', 'C') THEN
14611: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
14612: END IF;
14613: -- end bug 3755704
14614:
14615: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 14645: msc_sch_wb.atp_debug('ATP_Check: ' || 'OSFM Coproducts Forward ');

14641: l_future_atp_period,
14642: l_future_atp_supply_demand,
14643: l_return_status);
14644: IF PG_DEBUG in ('Y', 'C') THEN
14645: msc_sch_wb.atp_debug('ATP_Check: ' || 'OSFM Coproducts Forward ');
14646: END IF;
14647: --- reset the sumamry flag back to summary flag corresponding to p_plan_id
14648: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
14649: --- OSFM Changes: update coproduct supply

Line 14652: msc_sch_wb.atp_debug('ATP_Check: ' || 'msc_plan_coproducts = ' || l_coproducts_flag);

14648: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
14649: --- OSFM Changes: update coproduct supply
14650: l_coproducts_flag := FND_Profile.value('MSC_PLAN_COPRODUCTS');
14651: IF PG_DEBUG in ('Y', 'C') THEN
14652: msc_sch_wb.atp_debug('ATP_Check: ' || 'msc_plan_coproducts = ' || l_coproducts_flag);
14653: END IF;
14654: IF ((l_atp_comp_flag = 'C') OR
14655: (l_atp_comp_flag = 'Y')) AND
14656: l_coproducts_flag = 'Y' THEN

Line 14659: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add Coproducts for item '||p_atp_record.inventory_item_id);

14655: (l_atp_comp_flag = 'Y')) AND
14656: l_coproducts_flag = 'Y' THEN
14657:
14658: IF PG_DEBUG in ('Y', 'C') THEN
14659: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add Coproducts for item '||p_atp_record.inventory_item_id);
14660: END IF;
14661: MSC_ATP_PROC.Add_Coproducts(
14662: p_plan_id,
14663: p_atp_record.instance_id,

Line 14677: msc_sch_wb.atp_debug('ATP_Check: ' || 'After adding coproducts Forward');

14673: l_transaction_id --3766179
14674: );
14675:
14676: IF PG_DEBUG in ('Y', 'C') THEN
14677: msc_sch_wb.atp_debug('ATP_Check: ' || 'After adding coproducts Forward');
14678: END IF;
14679: END IF;
14680:
14681: END IF;

Line 14702: msc_sch_wb.atp_debug('ATP_Check: ' || 'adding the demand in case ATP qty for substitute is 0 but CTP not zero');

14698: AND (l_index >= 2) ) THEN
14699:
14700: --5283809 , adding the demand in case ATP qty for substitute is 0 but CTP not zero.
14701: IF PG_DEBUG in ('Y', 'C') THEN
14702: msc_sch_wb.atp_debug('ATP_Check: ' || 'adding the demand in case ATP qty for substitute is 0 but CTP not zero');
14703: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP QTY : ' || l_substitutes_rec.sub_atp_qty(l_index) );
14704: msc_sch_wb.atp_debug('ATP_Check: ' || 'CTP QTY : ' || l_atp_ctp_qty );
14705: END IF;
14706:

Line 14703: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP QTY : ' || l_substitutes_rec.sub_atp_qty(l_index) );

14699:
14700: --5283809 , adding the demand in case ATP qty for substitute is 0 but CTP not zero.
14701: IF PG_DEBUG in ('Y', 'C') THEN
14702: msc_sch_wb.atp_debug('ATP_Check: ' || 'adding the demand in case ATP qty for substitute is 0 but CTP not zero');
14703: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP QTY : ' || l_substitutes_rec.sub_atp_qty(l_index) );
14704: msc_sch_wb.atp_debug('ATP_Check: ' || 'CTP QTY : ' || l_atp_ctp_qty );
14705: END IF;
14706:
14707:

Line 14704: msc_sch_wb.atp_debug('ATP_Check: ' || 'CTP QTY : ' || l_atp_ctp_qty );

14700: --5283809 , adding the demand in case ATP qty for substitute is 0 but CTP not zero.
14701: IF PG_DEBUG in ('Y', 'C') THEN
14702: msc_sch_wb.atp_debug('ATP_Check: ' || 'adding the demand in case ATP qty for substitute is 0 but CTP not zero');
14703: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP QTY : ' || l_substitutes_rec.sub_atp_qty(l_index) );
14704: msc_sch_wb.atp_debug('ATP_Check: ' || 'CTP QTY : ' || l_atp_ctp_qty );
14705: END IF;
14706:
14707:
14708: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP,2) <> 1 THEN

Line 14740: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_demand_id );

14736: l_plan_id,
14737: 0,
14738: l_demand_id);
14739: IF PG_DEBUG in ('Y', 'C') THEN
14740: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_demand_id );
14741: END IF;
14742:
14743: --5553953
14744: --in order to update the demand id for the pegging line, otherwise demand will remain in the system

Line 14764: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);

14760: and plan_id = p_plan_id
14761: returning inventory_item_id
14762: into l_inventory_item_id;
14763: IF PG_DEBUG in ('Y', 'C') THEN
14764: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
14765: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
14766: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
14767: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
14768: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));

Line 14765: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);

14761: returning inventory_item_id
14762: into l_inventory_item_id;
14763: IF PG_DEBUG in ('Y', 'C') THEN
14764: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
14765: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
14766: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
14767: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
14768: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
14769: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));

Line 14766: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);

14762: into l_inventory_item_id;
14763: IF PG_DEBUG in ('Y', 'C') THEN
14764: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
14765: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
14766: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
14767: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
14768: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
14769: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));
14770: END IF;

Line 14767: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));

14763: IF PG_DEBUG in ('Y', 'C') THEN
14764: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
14765: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
14766: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
14767: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
14768: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
14769: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));
14770: END IF;
14771: IF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'

Line 14768: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));

14764: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
14765: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
14766: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
14767: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
14768: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
14769: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));
14770: END IF;
14771: IF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
14772: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN

Line 14769: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));

14765: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
14766: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
14767: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
14768: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
14769: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));
14770: END IF;
14771: IF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
14772: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
14773: update msc_alloc_demands

Line 14780: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

14776: --where parent_demand_id = l_demand_id
14777: and plan_id = p_plan_id;
14778: END IF;
14779: IF PG_DEBUG in ('Y', 'C') THEN
14780: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
14781: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
14782: END IF;
14783: -- update summary records removed in ODS case - for summary enhancement
14784: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN

Line 14781: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

14777: and plan_id = p_plan_id;
14778: END IF;
14779: IF PG_DEBUG in ('Y', 'C') THEN
14780: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
14781: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
14782: END IF;
14783: -- update summary records removed in ODS case - for summary enhancement
14784: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
14785: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 14807: msc_sch_wb.atp_debug('Substitute Loop Ends with l_index := ' || l_index);

14803: and sd_date = trunc(l_requested_ship_date);
14804: commit;
14805: END IF;
14806: IF PG_DEBUG in ('Y', 'C') THEN
14807: msc_sch_wb.atp_debug('Substitute Loop Ends with l_index := ' || l_index);
14808: END IF;
14809: END IF;
14810: END IF;
14811: END LOOP; -- for subs array

Line 14831: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);

14827: end if;
14828: -- 4902658/5216528 ends update
14829: -- dsting diag_atp update the last good pegging record to make supply/demand match
14830: IF PG_DEBUG in ('Y', 'C') THEN
14831: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);
14832: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
14833: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);
14834: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);
14835: END IF;

Line 14832: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);

14828: -- 4902658/5216528 ends update
14829: -- dsting diag_atp update the last good pegging record to make supply/demand match
14830: IF PG_DEBUG in ('Y', 'C') THEN
14831: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);
14832: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
14833: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);
14834: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);
14835: END IF;
14836:

Line 14833: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);

14829: -- dsting diag_atp update the last good pegging record to make supply/demand match
14830: IF PG_DEBUG in ('Y', 'C') THEN
14831: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);
14832: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
14833: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);
14834: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);
14835: END IF;
14836:
14837: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'

Line 14834: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);

14830: IF PG_DEBUG in ('Y', 'C') THEN
14831: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);
14832: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
14833: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);
14834: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);
14835: END IF;
14836:
14837: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'
14838: AND l_last_good_pegging_id is NULL

Line 14858: msc_sch_wb.atp_debug('Floor of l_net_demand_qty '||l_net_demand_qty);

14854: l_net_demand_qty := FLOOR(l_net_demand_qty);
14855: l_subst_existing_PO_qty := FLOOR(l_subst_existing_PO_qty);
14856:
14857: IF PG_DEBUG in ('Y', 'C') THEN
14858: msc_sch_wb.atp_debug('Floor of l_net_demand_qty '||l_net_demand_qty);
14859: msc_sch_wb.atp_debug('Floor of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
14860: END IF;
14861: ELSE
14862: l_net_demand_qty := trunc(l_net_demand_qty, 6);

Line 14859: msc_sch_wb.atp_debug('Floor of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);

14855: l_subst_existing_PO_qty := FLOOR(l_subst_existing_PO_qty);
14856:
14857: IF PG_DEBUG in ('Y', 'C') THEN
14858: msc_sch_wb.atp_debug('Floor of l_net_demand_qty '||l_net_demand_qty);
14859: msc_sch_wb.atp_debug('Floor of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
14860: END IF;
14861: ELSE
14862: l_net_demand_qty := trunc(l_net_demand_qty, 6);
14863: l_subst_existing_PO_qty := trunc(l_subst_existing_PO_qty, 6);

Line 14866: msc_sch_wb.atp_debug('trunc of l_net_demand_qty '||l_net_demand_qty);

14862: l_net_demand_qty := trunc(l_net_demand_qty, 6);
14863: l_subst_existing_PO_qty := trunc(l_subst_existing_PO_qty, 6);
14864:
14865: IF PG_DEBUG in ('Y', 'C') THEN
14866: msc_sch_wb.atp_debug('trunc of l_net_demand_qty '||l_net_demand_qty);
14867: msc_sch_wb.atp_debug('trunc of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
14868: END IF;
14869: END IF;
14870:

Line 14867: msc_sch_wb.atp_debug('trunc of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);

14863: l_subst_existing_PO_qty := trunc(l_subst_existing_PO_qty, 6);
14864:
14865: IF PG_DEBUG in ('Y', 'C') THEN
14866: msc_sch_wb.atp_debug('trunc of l_net_demand_qty '||l_net_demand_qty);
14867: msc_sch_wb.atp_debug('trunc of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
14868: END IF;
14869: END IF;
14870:
14871: MSC_ATP_DB_UTILS.Update_Planned_Order(l_last_good_pegging_id,

Line 14888: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

14884: END IF;
14885:
14886: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
14887: IF PG_DEBUG in ('Y', 'C') THEN
14888: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
14889: END IF;
14890:
14891: --- adjust the demand here
14892: IF (l_net_demand > 0) and (p_search =1) and (p_parent_pegging_id is null) THEN

Line 14919: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

14915: l_return_status
14916: );
14917: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14918: IF PG_DEBUG in ('Y', 'C') THEN
14919: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
14920: END IF;
14921: RAISE FND_API.G_EXC_ERROR;
14922: END IF;
14923: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'

Line 14933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check This scenario in backward case');

14929: and plan_id = p_plan_id;
14930: END IF;
14931:
14932: IF PG_DEBUG in ('Y', 'C') THEN
14933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check This scenario in backward case');
14934: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG' || MSC_ATP_PVT.G_SUMMARY_FLAG);
14935: END IF;
14936:
14937: -- update summary records removed in ODS cases - for summary enhancement

Line 14934: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG' || MSC_ATP_PVT.G_SUMMARY_FLAG);

14930: END IF;
14931:
14932: IF PG_DEBUG in ('Y', 'C') THEN
14933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check This scenario in backward case');
14934: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG' || MSC_ATP_PVT.G_SUMMARY_FLAG);
14935: END IF;
14936:
14937: -- update summary records removed in ODS cases - for summary enhancement
14938: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN

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

14936:
14937: -- update summary records removed in ODS cases - for summary enhancement
14938: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
14939: IF PG_DEBUG in ('Y', 'C') THEN
14940: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
14941: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
14942: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
14943: END IF;
14944:

Line 14941: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

14937: -- update summary records removed in ODS cases - for summary enhancement
14938: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
14939: IF PG_DEBUG in ('Y', 'C') THEN
14940: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
14941: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
14942: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
14943: END IF;
14944:
14945: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 14942: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

14938: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
14939: IF PG_DEBUG in ('Y', 'C') THEN
14940: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
14941: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
14942: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
14943: END IF;
14944:
14945: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
14946: p_plan_id,

Line 14996: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:'||

14992: p_atp_record.used_available_quantity :=
14993: l_used_available_quantity;
14994:
14995: IF PG_DEBUG in ('Y', 'C') THEN
14996: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:'||
14997: p_atp_record.requested_date_quantity);
14998: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.combined_requested_date_qty:'||
14999: p_atp_record.combined_requested_date_qty);
15000: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atp_date_quantity_this_level:'||

Line 14998: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.combined_requested_date_qty:'||

14994:
14995: IF PG_DEBUG in ('Y', 'C') THEN
14996: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:'||
14997: p_atp_record.requested_date_quantity);
14998: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.combined_requested_date_qty:'||
14999: p_atp_record.combined_requested_date_qty);
15000: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atp_date_quantity_this_level:'||
15001: l_used_available_quantity);
15002: END IF;

Line 15000: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atp_date_quantity_this_level:'||

14996: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:'||
14997: p_atp_record.requested_date_quantity);
14998: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.combined_requested_date_qty:'||
14999: p_atp_record.combined_requested_date_qty);
15000: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atp_date_quantity_this_level:'||
15001: l_used_available_quantity);
15002: END IF;
15003:
15004: -- now we want to find the future date and quantity

Line 15041: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

15037: l_return_status
15038: );
15039: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15040: IF PG_DEBUG in ('Y', 'C') THEN
15041: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15042: END IF;
15043: RAISE FND_API.G_EXC_ERROR;
15044: END IF;
15045: END IF;

Line 15052: msc_sch_wb.atp_debug('ATP_Check: ' || 'not enough, set G_FIND_FUTURE_DATE=Y');

15048: -- that we can find the future date.
15049:
15050: IF p_search = 1 AND p_parent_pegging_id is null THEN
15051: IF PG_DEBUG in ('Y', 'C') THEN
15052: msc_sch_wb.atp_debug('ATP_Check: ' || 'not enough, set G_FIND_FUTURE_DATE=Y');
15053: END IF;
15054:
15055: -- 1275751
15056: p_atp_record.error_code := ATP_REQ_DATE_FAIL;

Line 15080: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, bacward case 2');

15076: -- same demand as we need.
15077: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
15078: -- adjust the demand record
15079: IF PG_DEBUG in ('Y', 'C') THEN
15080: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, bacward case 2');
15081: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand record, l_parent_pegging_id = '||l_parent_pegging_id);
15082: END IF;
15083: /* bug 1235225
15084: update mrp_atp_details_temp

Line 15081: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand record, l_parent_pegging_id = '||l_parent_pegging_id);

15077: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
15078: -- adjust the demand record
15079: IF PG_DEBUG in ('Y', 'C') THEN
15080: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, bacward case 2');
15081: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand record, l_parent_pegging_id = '||l_parent_pegging_id);
15082: END IF;
15083: /* bug 1235225
15084: update mrp_atp_details_temp
15085: set supply_demand_quantity =

Line 15104: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand quantity, l_demand_id = '||l_demand_id);

15100: null,
15101: (l_peg_qty - l_net_demand));
15102:
15103: IF PG_DEBUG in ('Y', 'C') THEN
15104: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand quantity, l_demand_id = '||l_demand_id);
15105: END IF;
15106:
15107: -- dsting diag_atp do not adjust the demands for diagnostic atp
15108: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN

Line 15131: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');

15127: l_return_status
15128: );
15129: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15130: IF PG_DEBUG in ('Y', 'C') THEN
15131: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');
15132: END IF;
15133: RAISE FND_API.G_EXC_ERROR;
15134: END IF;
15135: --alloc_pp

Line 15146: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this Flag MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

15142: and plan_id = p_plan_id;
15143: END IF;
15144:
15145: IF PG_DEBUG in ('Y', 'C') THEN
15146: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this Flag MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
15147: END IF;
15148:
15149: -- update summary records removed in ODS cases - for summary enhancement
15150: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN

Line 15152: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');

15148:
15149: -- update summary records removed in ODS cases - for summary enhancement
15150: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
15151: IF PG_DEBUG in ('Y', 'C') THEN
15152: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');
15153: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
15154: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15155: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15156: END IF;

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

15149: -- update summary records removed in ODS cases - for summary enhancement
15150: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
15151: IF PG_DEBUG in ('Y', 'C') THEN
15152: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');
15153: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
15154: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15155: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15156: END IF;
15157:

Line 15154: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

15150: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
15151: IF PG_DEBUG in ('Y', 'C') THEN
15152: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');
15153: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
15154: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15155: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15156: END IF;
15157:
15158: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 15155: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

15151: IF PG_DEBUG in ('Y', 'C') THEN
15152: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');
15153: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
15154: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15155: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15156: END IF;
15157:
15158: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15159: p_plan_id,

Line 15189: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);

15185: ELSIF p_search = 2 THEN
15186:
15187:
15188: IF PG_DEBUG in ('Y', 'C') THEN
15189: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);
15190: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);
15191: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||
15192: p_atp_record.quantity_ordered);
15193: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');

Line 15190: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);

15186:
15187:
15188: IF PG_DEBUG in ('Y', 'C') THEN
15189: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);
15190: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);
15191: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||
15192: p_atp_record.quantity_ordered);
15193: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');
15194: END IF;

Line 15191: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||

15187:
15188: IF PG_DEBUG in ('Y', 'C') THEN
15189: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);
15190: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);
15191: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||
15192: p_atp_record.quantity_ordered);
15193: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');
15194: END IF;
15195: -- future case

Line 15193: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');

15189: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);
15190: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);
15191: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||
15192: p_atp_record.quantity_ordered);
15193: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');
15194: END IF;
15195: -- future case
15196:
15197: -- bug 1302394: we should adjust the date

Line 15225: msc_sch_wb.atp_debug('ATO update details_temp 12: ' || l_parent_pegging_id || ' date: ' || p_atp_record.ship_date);

15221: and pegging_id = l_parent_pegging_id
15222: and record_type = 3;
15223:
15224: IF PG_DEBUG in ('Y','C') THEN
15225: msc_sch_wb.atp_debug('ATO update details_temp 12: ' || l_parent_pegging_id || ' date: ' || p_atp_record.ship_date);
15226: END IF;
15227:
15228: UPDATE msc_demands
15229: --SET USING_ASSEMBLY_DEMAND_DATE = NVL(p_atp_record.ship_date,

Line 15279: msc_sch_wb.atp_debug('demand_id: ' || l_demand_id);

15275: WHERE demand_id = l_demand_id
15276: AND plan_id = p_plan_id
15277: returning inventory_item_id into l_inventory_item_id;
15278: IF PG_DEBUG in ('Y', 'C') THEN
15279: msc_sch_wb.atp_debug('demand_id: ' || l_demand_id);
15280: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
15281: END IF;
15282:
15283: /* time_phased_atp*/

Line 15280: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);

15276: AND plan_id = p_plan_id
15277: returning inventory_item_id into l_inventory_item_id;
15278: IF PG_DEBUG in ('Y', 'C') THEN
15279: msc_sch_wb.atp_debug('demand_id: ' || l_demand_id);
15280: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
15281: END IF;
15282:
15283: /* time_phased_atp*/
15284: IF l_time_phased_atp = 'Y' THEN

Line 15299: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');

15295: NULL --bug3397904
15296: );
15297: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15298: IF PG_DEBUG in ('Y', 'C') THEN
15299: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
15300: END IF;
15301: RAISE FND_API.G_EXC_ERROR;
15302: END IF;
15303: --alloc_pp

Line 15313: msc_sch_wb.atp_debug('ATP_Check: ' || 'inventory_item_id := ' || l_inventory_item_id);

15309: and plan_id = p_plan_id;
15310: END IF;
15311:
15312: IF PG_DEBUG in ('Y', 'C') THEN
15313: msc_sch_wb.atp_debug('ATP_Check: ' || 'inventory_item_id := ' || l_inventory_item_id);
15314: END IF;
15315: -- update summary records removed in ODS cases - for summary enhancement
15316: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND ( SQL%ROWCOUNT > 1) AND p_plan_id = -1 THEN
15317:

Line 15319: msc_sch_wb.atp_debug('ATP_Check: ' || 'old and new dates are not same');

15315: -- update summary records removed in ODS cases - for summary enhancement
15316: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND ( SQL%ROWCOUNT > 1) AND p_plan_id = -1 THEN
15317:
15318: IF PG_DEBUG in ('Y', 'C') THEN
15319: msc_sch_wb.atp_debug('ATP_Check: ' || 'old and new dates are not same');
15320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary for old date');
15321: END IF;
15322: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15323: p_plan_id,

Line 15320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary for old date');

15316: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND ( SQL%ROWCOUNT > 1) AND p_plan_id = -1 THEN
15317:
15318: IF PG_DEBUG in ('Y', 'C') THEN
15319: msc_sch_wb.atp_debug('ATP_Check: ' || 'old and new dates are not same');
15320: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary for old date');
15321: END IF;
15322: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15323: p_plan_id,
15324: p_atp_record.organization_id,

Line 15348: msc_sch_wb.atp_debug('ATP_Check: ' || 'update the qty on new date ');

15344: commit;
15345:
15346: --- if record exists then update
15347: IF PG_DEBUG in ('Y', 'C') THEN
15348: msc_sch_wb.atp_debug('ATP_Check: ' || 'update the qty on new date ');
15349: END IF;
15350: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15351: p_plan_id,
15352: p_atp_record.organization_id,

Line 15374: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');

15370:
15371: IF SQL%NOTFOUND THEN
15372: -- record doesn't exists. insert the record
15373: IF PG_DEBUG in ('Y', 'C') THEN
15374: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
15375: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
15376: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15377: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
15378: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);

Line 15375: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);

15371: IF SQL%NOTFOUND THEN
15372: -- record doesn't exists. insert the record
15373: IF PG_DEBUG in ('Y', 'C') THEN
15374: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
15375: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
15376: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15377: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
15378: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
15379: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);

Line 15376: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

15372: -- record doesn't exists. insert the record
15373: IF PG_DEBUG in ('Y', 'C') THEN
15374: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
15375: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
15376: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15377: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
15378: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
15379: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
15380: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);

Line 15377: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);

15373: IF PG_DEBUG in ('Y', 'C') THEN
15374: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
15375: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
15376: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15377: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
15378: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
15379: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
15380: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);
15381: END IF;

Line 15378: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);

15374: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
15375: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
15376: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15377: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
15378: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
15379: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
15380: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);
15381: END IF;
15382: BEGIN

Line 15379: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);

15375: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
15376: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15377: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
15378: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
15379: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
15380: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);
15381: END IF;
15382: BEGIN
15383: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,

Line 15380: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);

15376: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15377: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
15378: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
15379: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
15380: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);
15381: END IF;
15382: BEGIN
15383: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,
15384: p_atp_record.instance_id,

Line 15418: msc_sch_wb.atp_debug('ATP_Check: ' || 'do atp check at a supplier site');

15414: ELSE
15415: -- doing atp check in an vendor site
15416:
15417: IF PG_DEBUG in ('Y', 'C') THEN
15418: msc_sch_wb.atp_debug('ATP_Check: ' || 'do atp check at a supplier site');
15419: END IF;
15420:
15421: l_requested_ship_date := p_atp_record.requested_ship_date;
15422: IF PG_DEBUG in ('Y', 'C') THEN

Line 15423: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

15419: END IF;
15420:
15421: l_requested_ship_date := p_atp_record.requested_ship_date;
15422: IF PG_DEBUG in ('Y', 'C') THEN
15423: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15424: END IF;
15425: -- get the following information
15426: -- requested_date_quantity
15427: -- atp_date_this_level

Line 15449: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);

15445:
15446: END IF;
15447:
15448: IF PG_DEBUG in ('Y', 'C') THEN
15449: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15450: END IF;
15451:
15452: /* Modularize Item and Org Info */
15453:

Line 15456: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_HIERARCHY_PROFILE = 2');

15452: /* Modularize Item and Org Info */
15453:
15454: IF (MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 2) THEN
15455: IF PG_DEBUG in ('Y', 'C') THEN
15456: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_HIERARCHY_PROFILE = 2');
15457: END IF;
15458: p_atp_record.demand_class :=
15459: MSC_AATP_FUNC.Get_Hierarchy_Demand_Class(MSC_ATP_PVT.G_PARTNER_ID,
15460: MSC_ATP_PVT.G_PARTNER_SITE_ID,

Line 15468: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');

15464: l_requested_ship_date,
15465: NULL, -- level_id
15466: p_atp_record.Demand_Class);
15467: IF PG_DEBUG in ('Y', 'C') THEN
15468: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');
15469: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);
15470: END IF;
15471:
15472: --diag_atp

Line 15469: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);

15465: NULL, -- level_id
15466: p_atp_record.Demand_Class);
15467: IF PG_DEBUG in ('Y', 'C') THEN
15468: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');
15469: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);
15470: END IF;
15471:
15472: --diag_atp
15473: l_allocation_rule_name := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;

Line 15483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);

15479: l_sysdate := sysdate;
15480:
15481: l_atp_request_date := l_requested_ship_date;
15482: IF PG_DEBUG in ('Y', 'C') THEN
15483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
15484: END IF;
15485: -- Supplier Capacity and Lead Time (SCLT) changes
15486: -- Fixed + Variable is discontinued, Instead item's processing lead time
15487: -- essentially full_lead_time is used. Initialize local variables.

Line 15520: msc_sch_wb.atp_debug('ATP_Check: ' || 'After pre-process Lead Time Offset ' );

15516: l_sysdate,
15517: l_pre_pro_lt, 1);
15518:
15519: IF PG_DEBUG in ('Y', 'C') THEN
15520: msc_sch_wb.atp_debug('ATP_Check: ' || 'After pre-process Lead Time Offset ' );
15521: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||
15522: to_char(l_dock_date, 'DD-MON-YYYY'));
15523: END IF;
15524: ELSE

Line 15521: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||

15517: l_pre_pro_lt, 1);
15518:
15519: IF PG_DEBUG in ('Y', 'C') THEN
15520: msc_sch_wb.atp_debug('ATP_Check: ' || 'After pre-process Lead Time Offset ' );
15521: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||
15522: to_char(l_dock_date, 'DD-MON-YYYY'));
15523: END IF;
15524: ELSE
15525: l_dock_date := l_sysdate;

Line 15541: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Process Lead Time Offset ' );

15537: l_dock_date,
15538: p_atp_record.atp_lead_time, 1);
15539: END IF;
15540: IF PG_DEBUG in ('Y', 'C') THEN
15541: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Process Lead Time Offset ' );
15542: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||
15543: to_char(l_dock_date, 'DD-MON-YYYY'));
15544: END IF;
15545: -- End Supplier Capacity and Lead Time changes

Line 15542: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||

15538: p_atp_record.atp_lead_time, 1);
15539: END IF;
15540: IF PG_DEBUG in ('Y', 'C') THEN
15541: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Process Lead Time Offset ' );
15542: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||
15543: to_char(l_dock_date, 'DD-MON-YYYY'));
15544: END IF;
15545: -- End Supplier Capacity and Lead Time changes
15546: l_atp_ship_date := GREATEST(l_dock_date, l_requested_ship_date, MSC_ATP_PVT.G_PTF_DATE);

Line 15553: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);

15549: END IF;
15550: END IF;
15551: 3316028 (Enforce Pur LT) - changes end */
15552: IF PG_DEBUG in ('Y', 'C') THEN
15553: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
15554: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_ship_date := ' || l_atp_ship_date);
15555: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
15556: END IF;
15557:

Line 15554: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_ship_date := ' || l_atp_ship_date);

15550: END IF;
15551: 3316028 (Enforce Pur LT) - changes end */
15552: IF PG_DEBUG in ('Y', 'C') THEN
15553: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
15554: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_ship_date := ' || l_atp_ship_date);
15555: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
15556: END IF;
15557:
15558: --diag_atp

Line 15555: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

15551: 3316028 (Enforce Pur LT) - changes end */
15552: IF PG_DEBUG in ('Y', 'C') THEN
15553: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
15554: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_ship_date := ' || l_atp_ship_date);
15555: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
15556: END IF;
15557:
15558: --diag_atp
15559: /* IF p_search = BACKWARD_SCHEDULING AND

Line 15563: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sys date, ptf check failed for supplier');

15559: /* IF p_search = BACKWARD_SCHEDULING AND
15560: ((l_atp_request_date < l_sysdate) OR (l_requested_ship_date < MSC_ATP_PVT.G_PTF_DATE)) THEN
15561: l_requested_date_quantity := 0;
15562: IF PG_DEBUG in ('Y', 'C') THEN
15563: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sys date, ptf check failed for supplier');
15564: END IF;
15565: ELSE
15566: */
15567: -- Supplier Capacity and Lead Time (SCLT) changes

Line 15572: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);

15568: IF (g_sup_cap_cum_date IS NULL) THEN
15569: g_sup_cap_cum_date := MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date;
15570: END IF;
15571: IF PG_DEBUG in ('Y', 'C') THEN
15572: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
15573: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Start Date := ' ||
15574: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date);
15575: msc_sch_wb.atp_debug('ATP_Check: ' || 'g_sup_cap_cum_date := ' || g_sup_cap_cum_date);
15576: END IF;

Line 15573: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Start Date := ' ||

15569: g_sup_cap_cum_date := MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date;
15570: END IF;
15571: IF PG_DEBUG in ('Y', 'C') THEN
15572: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
15573: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Start Date := ' ||
15574: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date);
15575: msc_sch_wb.atp_debug('ATP_Check: ' || 'g_sup_cap_cum_date := ' || g_sup_cap_cum_date);
15576: END IF;
15577:

Line 15575: msc_sch_wb.atp_debug('ATP_Check: ' || 'g_sup_cap_cum_date := ' || g_sup_cap_cum_date);

15571: IF PG_DEBUG in ('Y', 'C') THEN
15572: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
15573: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Start Date := ' ||
15574: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date);
15575: msc_sch_wb.atp_debug('ATP_Check: ' || 'g_sup_cap_cum_date := ' || g_sup_cap_cum_date);
15576: END IF;
15577:
15578:
15579: -- ship_rec_cal changes begin

Line 15626: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);

15622: -- bug 1512366
15623: p_atp_record.requested_ship_date:=l_requested_ship_date;
15624:
15625: IF PG_DEBUG in ('Y', 'C') THEN
15626: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);
15627: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15628: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);
15629: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);
15630: END IF;

Line 15627: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);

15623: p_atp_record.requested_ship_date:=l_requested_ship_date;
15624:
15625: IF PG_DEBUG in ('Y', 'C') THEN
15626: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);
15627: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15628: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);
15629: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);
15630: END IF;
15631: IF l_requested_date_quantity >= p_atp_record.quantity_ordered THEN

Line 15628: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);

15624:
15625: IF PG_DEBUG in ('Y', 'C') THEN
15626: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);
15627: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15628: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);
15629: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);
15630: END IF;
15631: IF l_requested_date_quantity >= p_atp_record.quantity_ordered THEN
15632:

Line 15629: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);

15625: IF PG_DEBUG in ('Y', 'C') THEN
15626: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);
15627: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15628: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);
15629: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);
15630: END IF;
15631: IF l_requested_date_quantity >= p_atp_record.quantity_ordered THEN
15632:
15633: -- we meet the requirements!!!

Line 15672: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_name := ' || l_inv_item_name);

15668: l_inv_item_name := G_ITEM_INFO_REC.item_name;
15669: END IF;
15670:
15671: IF PG_DEBUG in ('Y', 'C') THEN
15672: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_name := ' || l_inv_item_name);
15673: END IF;
15674:
15675: /*l_inv_item_name := MSC_ATP_FUNC.get_inv_item_name(p_atp_record.instance_id,
15676: p_atp_record.inventory_item_id,

Line 15735: msc_sch_wb.atp_debug('set required_date supplier demand');

15731: l_pegging_rec.supply_demand_date:= l_requested_ship_date;
15732:
15733: -- dsting ATO 2465370
15734: IF PG_DEBUG in ('Y','C') THEN
15735: msc_sch_wb.atp_debug('set required_date supplier demand');
15736: END IF;
15737: IF (p_search = BACKWARD_SCHEDULING) THEN
15738: -- Commented for bug 2748730. G_END_OF_DAY not required here.
15739: -- We will do that inside the procedure Add_Pegging

Line 15871: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');

15867: /** code commented for time being. Will be removed after code review
15868: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
15869: IF (p_search = 1) THEN
15870: IF PG_DEBUG in ('Y', 'C') THEN
15871: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
15872: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15873: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15875: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));

Line 15872: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

15868: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
15869: IF (p_search = 1) THEN
15870: IF PG_DEBUG in ('Y', 'C') THEN
15871: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
15872: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15873: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15875: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
15876: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

Line 15873: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);

15869: IF (p_search = 1) THEN
15870: IF PG_DEBUG in ('Y', 'C') THEN
15871: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
15872: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15873: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15875: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
15876: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15877: END IF;

Line 15874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);

15870: IF PG_DEBUG in ('Y', 'C') THEN
15871: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
15872: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15873: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15875: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
15876: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15877: END IF;
15878: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 15875: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));

15871: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
15872: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15873: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15875: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
15876: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15877: END IF;
15878: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15879: p_plan_id,

Line 15876: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

15872: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15873: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15874: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15875: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
15876: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15877: END IF;
15878: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15879: p_plan_id,
15880: null,

Line 15900: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');

15896: and supplier_id = p_atp_record.supplier_id
15897: and supplier_site_id = p_atp_record.supplier_site_id
15898: and sd_date = trunc(l_requested_ship_date);
15899: IF PG_DEBUG in ('Y', 'C') THEN
15900: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');
15901: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);
15902: END IF;
15903:
15904: IF SQL%NOTFOUND THEN

Line 15901: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);

15897: and supplier_site_id = p_atp_record.supplier_site_id
15898: and sd_date = trunc(l_requested_ship_date);
15899: IF PG_DEBUG in ('Y', 'C') THEN
15900: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');
15901: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);
15902: END IF;
15903:
15904: IF SQL%NOTFOUND THEN
15905: IF PG_DEBUG in ('Y', 'C') THEN

Line 15906: msc_sch_wb.atp_debug('ATP_Check: ' || 'update failed, insert a row');

15902: END IF;
15903:
15904: IF SQL%NOTFOUND THEN
15905: IF PG_DEBUG in ('Y', 'C') THEN
15906: msc_sch_wb.atp_debug('ATP_Check: ' || 'update failed, insert a row');
15907: END IF;
15908: BEGIN
15909: insert into /*+ INDEX(msc_atp_summary_sup MSC_ATP_SUMMARY_SUP_U1) *//* msc_atp_summary_sup
15910: (plan_id,

Line 15962: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');

15958: END IF;
15959: commit;
15960: ELSIF l_atp_date_this_level IS NOT NULL THEN
15961: IF PG_DEBUG in ('Y', 'C') THEN
15962: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
15963: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15964: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15966: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);

Line 15963: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

15959: commit;
15960: ELSIF l_atp_date_this_level IS NOT NULL THEN
15961: IF PG_DEBUG in ('Y', 'C') THEN
15962: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
15963: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15964: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15966: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15967: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);

Line 15964: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);

15960: ELSIF l_atp_date_this_level IS NOT NULL THEN
15961: IF PG_DEBUG in ('Y', 'C') THEN
15962: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
15963: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15964: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15966: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15967: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
15968: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

Line 15965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);

15961: IF PG_DEBUG in ('Y', 'C') THEN
15962: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
15963: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15964: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15966: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15967: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
15968: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15969: END IF;

Line 15966: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);

15962: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
15963: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15964: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15966: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15967: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
15968: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15969: END IF;
15970: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 15967: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);

15963: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15964: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15966: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15967: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
15968: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15969: END IF;
15970: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15971: p_plan_id,

Line 15968: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

15964: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
15965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
15966: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
15967: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
15968: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
15969: END IF;
15970: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15971: p_plan_id,
15972: p_atp_record.organization_id,

Line 15992: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');

15988: and supplier_id = p_atp_record.supplier_id
15989: and supplier_site_id = p_atp_record.supplier_site_id
15990: and sd_date = trunc(l_atp_date_this_level);
15991: IF PG_DEBUG in ('Y', 'C') THEN
15992: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');
15993: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);
15994: END IF;
15995:
15996: IF SQL%NOTFOUND THEN

Line 15993: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);

15989: and supplier_site_id = p_atp_record.supplier_site_id
15990: and sd_date = trunc(l_atp_date_this_level);
15991: IF PG_DEBUG in ('Y', 'C') THEN
15992: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');
15993: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);
15994: END IF;
15995:
15996: IF SQL%NOTFOUND THEN
15997: IF PG_DEBUG in ('Y', 'C') THEN

Line 15998: msc_sch_wb.atp_debug('ATP_Check: ' || 'update failed, insert a row');

15994: END IF;
15995:
15996: IF SQL%NOTFOUND THEN
15997: IF PG_DEBUG in ('Y', 'C') THEN
15998: msc_sch_wb.atp_debug('ATP_Check: ' || 'update failed, insert a row');
15999: END IF;
16000: BEGIN
16001: insert /*+ INDEX(msc_atp_summary_sup MSC_ATP_SUMMARY_SUP_U1) *//* into msc_atp_summary_sup
16002: (plan_id,

Line 16064: msc_sch_wb.atp_debug('ATP_Check: ' || 'in get_res_requirements we are here 2');

16060:
16061: END LOOP;
16062:
16063: IF PG_DEBUG in ('Y', 'C') THEN
16064: msc_sch_wb.atp_debug('ATP_Check: ' || 'in get_res_requirements we are here 2');
16065: END IF;
16066:
16067: IF p_atp_record.insert_flag <> 0 THEN
16068: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_pegging_id,

Line 16075: msc_sch_wb.atp_debug('ATP_Check: ' || 'children_type: ' || p_atp_record.children_type);

16071:
16072: END IF;
16073:
16074: IF PG_DEBUG in ('Y', 'C') THEN
16075: msc_sch_wb.atp_debug('ATP_Check: ' || 'children_type: ' || p_atp_record.children_type);
16076: msc_sch_wb.atp_debug('***** End ATP_Check Procedure *****');
16077: END IF;
16078:
16079:

Line 16076: msc_sch_wb.atp_debug('***** End ATP_Check Procedure *****');

16072: END IF;
16073:
16074: IF PG_DEBUG in ('Y', 'C') THEN
16075: msc_sch_wb.atp_debug('ATP_Check: ' || 'children_type: ' || p_atp_record.children_type);
16076: msc_sch_wb.atp_debug('***** End ATP_Check Procedure *****');
16077: END IF;
16078:
16079:
16080: EXCEPTION

Line 16085: msc_sch_wb.atp_debug('ATP_Check: ' || 'Invalid OSS setup detected');

16081:
16082: WHEN MSC_ATP_PVT.INVALID_OSS_SOURCE THEN
16083:
16084: IF PG_DEBUG in ('Y', 'C') THEN
16085: msc_sch_wb.atp_debug('ATP_Check: ' || 'Invalid OSS setup detected');
16086: END IF;
16087: p_atp_record.requested_date_quantity := 0;
16088: p_atp_record.available_quantity := 0;
16089: p_atp_record.ship_date := null;

Line 16097: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0');

16093:
16094: -- 2400614 : krajan: For detecting assignment set mismatch
16095: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
16096: IF PG_DEBUG in ('Y', 'C') THEN
16097: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0');
16098: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch detected');
16099: END IF;
16100: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
16101: x_return_status := MSC_ATP_PVT.G_ATO_SRC_MISMATCH ; --- krajan : indicates mismatch

Line 16098: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch detected');

16094: -- 2400614 : krajan: For detecting assignment set mismatch
16095: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
16096: IF PG_DEBUG in ('Y', 'C') THEN
16097: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0');
16098: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch detected');
16099: END IF;
16100: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
16101: x_return_status := MSC_ATP_PVT.G_ATO_SRC_MISMATCH ; --- krajan : indicates mismatch
16102: --- Primarily for processing in get_comp_requirements

Line 16106: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.1');

16102: --- Primarily for processing in get_comp_requirements
16103: -- dsting 2764213
16104: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
16105: IF PG_DEBUG in ('Y', 'C') THEN
16106: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.1');
16107: msc_sch_wb.atp_debug('ATP_Check: Plan not found for the requested item or component');
16108: END IF;
16109: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
16110: --bug 2854351:

Line 16107: msc_sch_wb.atp_debug('ATP_Check: Plan not found for the requested item or component');

16103: -- dsting 2764213
16104: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
16105: IF PG_DEBUG in ('Y', 'C') THEN
16106: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.1');
16107: msc_sch_wb.atp_debug('ATP_Check: Plan not found for the requested item or component');
16108: END IF;
16109: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
16110: --bug 2854351:
16111: --p_atp_record.error_code := MSC_ATP_PVT.TRY_ATP_LATER;

Line 16121: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.2');

16117:
16118: -- krajan 2752705
16119: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
16120: IF PG_DEBUG in ('Y', 'C') THEN
16121: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.2');
16122: msc_sch_wb.atp_debug('ATP_Check: The item is not collected');
16123: END IF;
16124: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
16125: x_return_status := MSC_ATP_PVT.G_ATO_UNCOLL_ITEM;

Line 16122: msc_sch_wb.atp_debug('ATP_Check: The item is not collected');

16118: -- krajan 2752705
16119: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
16120: IF PG_DEBUG in ('Y', 'C') THEN
16121: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.2');
16122: msc_sch_wb.atp_debug('ATP_Check: The item is not collected');
16123: END IF;
16124: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
16125: x_return_status := MSC_ATP_PVT.G_ATO_UNCOLL_ITEM;
16126:

Line 16129: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');

16125: x_return_status := MSC_ATP_PVT.G_ATO_UNCOLL_ITEM;
16126:
16127: WHEN FND_API.G_EXC_ERROR THEN
16128: IF PG_DEBUG in ('Y', 'C') THEN
16129: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');
16130: END IF;
16131: x_return_status := FND_API.G_RET_STS_ERROR;
16132: IF PG_DEBUG in ('Y', 'C') THEN
16133: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');

Line 16133: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');

16129: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');
16130: END IF;
16131: x_return_status := FND_API.G_RET_STS_ERROR;
16132: IF PG_DEBUG in ('Y', 'C') THEN
16133: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');
16134: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error := ' || SQLerrm);
16135: END IF;
16136:
16137: WHEN NO_MATCHING_DATE_IN_CAL THEN

Line 16134: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error := ' || SQLerrm);

16130: END IF;
16131: x_return_status := FND_API.G_RET_STS_ERROR;
16132: IF PG_DEBUG in ('Y', 'C') THEN
16133: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');
16134: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error := ' || SQLerrm);
16135: END IF;
16136:
16137: WHEN NO_MATCHING_DATE_IN_CAL THEN
16138: IF PG_DEBUG in ('Y', 'C') THEN

Line 16139: msc_sch_wb.atp_debug('MAtching cal date not found, in atp_check');

16135: END IF;
16136:
16137: WHEN NO_MATCHING_DATE_IN_CAL THEN
16138: IF PG_DEBUG in ('Y', 'C') THEN
16139: msc_sch_wb.atp_debug('MAtching cal date not found, in atp_check');
16140: END IF;
16141: p_atp_record.error_code := NO_MATCHING_CAL_DATE;
16142: --x_return_status := FND_API.G_RET_STS_ERROR; --bug3583705
16143: RAISE NO_MATCHING_DATE_IN_CAL;

Line 16148: msc_sch_wb.atp_debug('No ATP Rule for Item and Org., in atp_check');

16144:
16145: /************ Bug 1510853 ATP Rule Check ************/
16146: WHEN EXC_NO_ATP_RULE THEN
16147: IF PG_DEBUG in ('Y', 'C') THEN
16148: msc_sch_wb.atp_debug('No ATP Rule for Item and Org., in atp_check');
16149: END IF;
16150: p_atp_record.error_code := ATP_BAD_RULE;
16151: x_return_status := FND_API.G_RET_STS_ERROR;
16152:

Line 16156: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);

16152:
16153: -- Error Handling Modifications
16154: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
16155: IF PG_DEBUG in ('Y', 'C') THEN
16156: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16157: msc_sch_wb.atp_debug('ATP_Check: Invalid Objects found, sqlcode= '||sqlcode);
16158: END IF;
16159:
16160: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 16157: msc_sch_wb.atp_debug('ATP_Check: Invalid Objects found, sqlcode= '||sqlcode);

16153: -- Error Handling Modifications
16154: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
16155: IF PG_DEBUG in ('Y', 'C') THEN
16156: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16157: msc_sch_wb.atp_debug('ATP_Check: Invalid Objects found, sqlcode= '||sqlcode);
16158: END IF;
16159:
16160: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16161: IF (p_atp_record.error_code IS NULL) or (p_atp_record.error_code IN (0,61,150)) THEN

Line 16173: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);

16169:
16170: -- rajjain 02/20/2003 Bug 2813095
16171: WHEN ALLOC_ATP_INVALID_PROFILE THEN
16172: IF PG_DEBUG in ('Y', 'C') THEN
16173: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16174: END IF;
16175: p_atp_record.error_code := INVALID_ALLOC_PROFILE_SETUP;
16176: x_return_status := FND_API.G_RET_STS_ERROR;
16177:

Line 16180: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');

16176: x_return_status := FND_API.G_RET_STS_ERROR;
16177:
16178: WHEN OTHERS THEN
16179: IF PG_DEBUG in ('Y', 'C') THEN
16180: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');
16181: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16182: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);
16183: END IF;
16184:

Line 16181: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);

16177:
16178: WHEN OTHERS THEN
16179: IF PG_DEBUG in ('Y', 'C') THEN
16180: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');
16181: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16182: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);
16183: END IF;
16184:
16185: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 16182: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);

16178: WHEN OTHERS THEN
16179: IF PG_DEBUG in ('Y', 'C') THEN
16180: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');
16181: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16182: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);
16183: END IF;
16184:
16185: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16186:

Line 16201: msc_sch_wb.atp_debug('ATP_CHECK: NO_MATCHING_CAL_DATE');

16197: IF (p_atp_record.error_code IS NULL) or (p_atp_record.error_code IN (0,61,150)) THEN
16198: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
16199: p_atp_record.error_code := NO_MATCHING_CAL_DATE;
16200: IF PG_DEBUG in ('Y', 'C') THEN
16201: msc_sch_wb.atp_debug('ATP_CHECK: NO_MATCHING_CAL_DATE');
16202: END IF;
16203: ELSE
16204: p_atp_record.error_code := ATP_PROCESSING_ERROR; -- ATP Processing Error
16205: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705

Line 16206: msc_sch_wb.atp_debug('ATP_CHECK: ATP_PROCESSING_ERROR');

16202: END IF;
16203: ELSE
16204: p_atp_record.error_code := ATP_PROCESSING_ERROR; -- ATP Processing Error
16205: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705
16206: msc_sch_wb.atp_debug('ATP_CHECK: ATP_PROCESSING_ERROR');
16207: END IF;
16208: END IF;
16209: END IF;
16210:

Line 16334: msc_sch_wb.atp_debug('***** Begin Call_Schedule Procedure *****');

16330:
16331: BEGIN
16332:
16333: IF PG_DEBUG in ('Y', 'C') THEN
16334: msc_sch_wb.atp_debug('***** Begin Call_Schedule Procedure *****');
16335: END IF;
16336:
16337: -- Initialize global variables to work in a connection pooling env
16338: G_INV_CTP := FND_PROFILE.value('INV_CTP') ;

Line 16366: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: G_INV_CTP : '||G_INV_CTP);

16362: x_return_status := FND_API.G_RET_STS_SUCCESS;
16363:
16364: -- Bug 2356892
16365: IF PG_DEBUG in ('Y', 'C') THEN
16366: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: G_INV_CTP : '||G_INV_CTP);
16367: END IF;
16368: IF (NVL(G_INV_CTP,-1) not in (4,5)) THEN
16369: G_INV_CTP := 5;
16370: IF PG_DEBUG in ('Y', 'C') THEN

Line 16371: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: Setting G_INV_CTP to 5');

16367: END IF;
16368: IF (NVL(G_INV_CTP,-1) not in (4,5)) THEN
16369: G_INV_CTP := 5;
16370: IF PG_DEBUG in ('Y', 'C') THEN
16371: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: Setting G_INV_CTP to 5');
16372: END IF;
16373: END IF;
16374:
16375: --3720018, setting l_global_availability flag based on duplicity of order_line_id.

Line 16390: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);

16386: WHEN no_data_found THEN
16387: l_global_availability := 'N';
16388: IF PG_DEBUG in ('Y', 'C') THEN
16389: --bug4291375 changed debug statements
16390: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);
16391: msc_sch_wb.atp_debug('Setting l_global_availability as No' );
16392: END IF;
16393: WHEN TOO_MANY_ROWS THEN
16394: l_global_availability := 'Y';

Line 16391: msc_sch_wb.atp_debug('Setting l_global_availability as No' );

16387: l_global_availability := 'N';
16388: IF PG_DEBUG in ('Y', 'C') THEN
16389: --bug4291375 changed debug statements
16390: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);
16391: msc_sch_wb.atp_debug('Setting l_global_availability as No' );
16392: END IF;
16393: WHEN TOO_MANY_ROWS THEN
16394: l_global_availability := 'Y';
16395: IF PG_DEBUG in ('Y', 'C') THEN

Line 16397: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);

16393: WHEN TOO_MANY_ROWS THEN
16394: l_global_availability := 'Y';
16395: IF PG_DEBUG in ('Y', 'C') THEN
16396: --bug4291375 changed debug statements
16397: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);
16398: msc_sch_wb.atp_debug('Setting l_global_availability as Yes' );
16399: END IF;
16400: END;
16401:

Line 16398: msc_sch_wb.atp_debug('Setting l_global_availability as Yes' );

16394: l_global_availability := 'Y';
16395: IF PG_DEBUG in ('Y', 'C') THEN
16396: --bug4291375 changed debug statements
16397: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);
16398: msc_sch_wb.atp_debug('Setting l_global_availability as Yes' );
16399: END IF;
16400: END;
16401:
16402: IF PG_DEBUG in ('Y', 'C') THEN

Line 16403: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_global_availability = ' || l_global_availability );

16399: END IF;
16400: END;
16401:
16402: IF PG_DEBUG in ('Y', 'C') THEN
16403: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_global_availability = ' || l_global_availability );
16404: END IF; --3720018
16405:
16406: -- initial null collections so that we can use these
16407: -- collections to initialize collections for next iterations

Line 16410: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_SESSION_ID = '||MSC_ATP_PVT.G_SESSION_ID);

16406: -- initial null collections so that we can use these
16407: -- collections to initialize collections for next iterations
16408: MSC_ATP_PVT.G_SESSION_ID := p_session_id;
16409: IF PG_DEBUG in ('Y', 'C') THEN
16410: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_SESSION_ID = '||MSC_ATP_PVT.G_SESSION_ID);
16411: END IF;
16412:
16413: l_null_atp_table := x_atp_table;
16414: l_null_atp_period := x_atp_period;

Line 16424: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);

16420: MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 THEN
16421:
16422: MSC_ATP_PVT.G_ALLOCATION_METHOD := NVL(FND_PROFILE.VALUE('MSC_ALLOCATION_METHOD'), 2);
16423: IF PG_DEBUG in ('Y', 'C') THEN
16424: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
16425: END IF;
16426: END IF;
16427:
16428: --3720018, call in case of ATP inquiry or global availability from scheduled line of Sales Order pad.

Line 16446: msc_sch_wb.atp_debug('Call_Schedule: l_return_status: ' || l_return_status);

16442: l_delete_atp_rec,
16443: l_return_status);
16444:
16445: IF PG_DEBUG in ('Y', 'C') THEN --3720018
16446: msc_sch_wb.atp_debug('Call_Schedule: l_return_status: ' || l_return_status);
16447: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));
16448: END IF;
16449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
16450: IF PG_DEBUG in ('Y', 'C') THEN

Line 16447: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));

16443: l_return_status);
16444:
16445: IF PG_DEBUG in ('Y', 'C') THEN --3720018
16446: msc_sch_wb.atp_debug('Call_Schedule: l_return_status: ' || l_return_status);
16447: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));
16448: END IF;
16449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
16450: IF PG_DEBUG in ('Y', 'C') THEN
16451: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');

Line 16451: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');

16447: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));
16448: END IF;
16449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
16450: IF PG_DEBUG in ('Y', 'C') THEN
16451: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');
16452: END IF;
16453: x_return_status := FND_API.G_RET_STS_ERROR;
16454: RAISE FND_API.G_EXC_ERROR;
16455: END IF;

Line 16479: msc_sch_wb.atp_debug('Call_Schedule, i='||i);

16475:
16476: i := p_atp_table.Action.FIRST;
16477:
16478: IF PG_DEBUG in ('Y', 'C') THEN
16479: msc_sch_wb.atp_debug('Call_Schedule, i='||i);
16480: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
16481: END IF;
16482:
16483: LOOP

Line 16480: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);

16476: i := p_atp_table.Action.FIRST;
16477:
16478: IF PG_DEBUG in ('Y', 'C') THEN
16479: msc_sch_wb.atp_debug('Call_Schedule, i='||i);
16480: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
16481: END IF;
16482:
16483: LOOP
16484: -- make sure we set the variables to null so that it is clean

Line 16499: msc_sch_wb.atp_debug('Call_Schedule, i='||i);

16495: --e_cto_rearch
16496:
16497:
16498: IF PG_DEBUG in ('Y', 'C') THEN
16499: msc_sch_wb.atp_debug('Call_Schedule, i='||i);
16500: END IF;
16501:
16502: EXIT WHEN i is NULL;
16503: /* ---s_cto_rearch

Line 16519: msc_sch_wb.atp_debug('Process Included item');

16515: IF NOT (l_mand_comp_info_rec.sr_inventory_item_id.count = 0) AND
16516: l_included_item_cntr < l_mand_comp_info_rec.sr_inventory_item_id.count THEN
16517: ---process the included item for non SMC PTO model.
16518: IF PG_DEBUG in ('Y', 'C') THEN
16519: msc_sch_wb.atp_debug('Process Included item');
16520: msc_sch_wb.atp_debug('l_included_item_cntr := ' || l_included_item_cntr);
16521: END IF;
16522:
16523: l_included_item_cntr := nvl(l_included_item_cntr, 0) + 1;

Line 16520: msc_sch_wb.atp_debug('l_included_item_cntr := ' || l_included_item_cntr);

16516: l_included_item_cntr < l_mand_comp_info_rec.sr_inventory_item_id.count THEN
16517: ---process the included item for non SMC PTO model.
16518: IF PG_DEBUG in ('Y', 'C') THEN
16519: msc_sch_wb.atp_debug('Process Included item');
16520: msc_sch_wb.atp_debug('l_included_item_cntr := ' || l_included_item_cntr);
16521: END IF;
16522:
16523: l_included_item_cntr := nvl(l_included_item_cntr, 0) + 1;
16524: MSC_ATP_CTO.G_INCLUDED_ITEM_IS_PRESENT := 1;

Line 16557: msc_sch_wb.atp_debug('Process ordered item');

16553:
16554: EXIT WHEN l_process_included_item_flag = 1;
16555:
16556: IF PG_DEBUG in ('Y', 'C') THEN
16557: msc_sch_wb.atp_debug('Process ordered item');
16558: END IF;
16559:
16560: ---either this is first item or PTO included items have already been ATPed. Null out the table
16561: l_mand_comp_info_rec := l_null_mand_comp_info_rec;

Line 16573: msc_sch_wb.atp_debug('ato model -line is := ' || p_atp_table.ato_model_line_id(j));

16569: --set a flag to tell that a model is present.
16570: -- this flag will be used in put into temp table in results mode to
16571: -- selectively update the data for child lines.
16572: IF PG_DEBUG in ('Y', 'C') THEN
16573: msc_sch_wb.atp_debug('ato model -line is := ' || p_atp_table.ato_model_line_id(j));
16574: END IF;
16575: MSC_ATP_CTO.G_MODEL_IS_PRESENT := 1;
16576: MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET := 1;
16577:

Line 16589: msc_sch_wb.atp_debug('attribute_06 := ' || NVL(p_atp_table.attribute_06(j), -1));

16585: END IF;
16586: END IF;
16587:
16588: IF PG_DEBUG in ('Y', 'C') THEN
16589: msc_sch_wb.atp_debug('attribute_06 := ' || NVL(p_atp_table.attribute_06(j), -1));
16590: msc_sch_wb.atp_debug('Validation Org := ' || NVL(p_atp_table.validation_org(j), -1));
16591: msc_sch_wb.atp_debug('source_organization_id := ' || NVL(p_atp_table.source_organization_id(j), -1));
16592: END IF;
16593:

Line 16590: msc_sch_wb.atp_debug('Validation Org := ' || NVL(p_atp_table.validation_org(j), -1));

16586: END IF;
16587:
16588: IF PG_DEBUG in ('Y', 'C') THEN
16589: msc_sch_wb.atp_debug('attribute_06 := ' || NVL(p_atp_table.attribute_06(j), -1));
16590: msc_sch_wb.atp_debug('Validation Org := ' || NVL(p_atp_table.validation_org(j), -1));
16591: msc_sch_wb.atp_debug('source_organization_id := ' || NVL(p_atp_table.source_organization_id(j), -1));
16592: END IF;
16593:
16594: --- raise invalid item org combo error only for non-aps instance

Line 16591: msc_sch_wb.atp_debug('source_organization_id := ' || NVL(p_atp_table.source_organization_id(j), -1));

16587:
16588: IF PG_DEBUG in ('Y', 'C') THEN
16589: msc_sch_wb.atp_debug('attribute_06 := ' || NVL(p_atp_table.attribute_06(j), -1));
16590: msc_sch_wb.atp_debug('Validation Org := ' || NVL(p_atp_table.validation_org(j), -1));
16591: msc_sch_wb.atp_debug('source_organization_id := ' || NVL(p_atp_table.source_organization_id(j), -1));
16592: END IF;
16593:
16594: --- raise invalid item org combo error only for non-aps instance
16595: IF (p_atp_table.attribute_06(j) is null and NVL(MSC_ATP_PVT.G_CALLING_MODULE, -1) <> 724

Line 16609: msc_sch_wb.atp_debug('Invalid Item Org Combo');

16605: l_count := l_atp_input_table.inventory_item_id.count;
16606:
16607: If p_atp_table.attribute_06(j) is null THEN
16608: IF PG_DEBUG in ('Y', 'C') THEN
16609: msc_sch_wb.atp_debug('Invalid Item Org Combo');
16610: END IF;
16611:
16612:
16613: l_atp_input_table.error_code(l_count) := INVALID_ITEM_ORG_COMBINATION;

Line 16620: msc_sch_wb.atp_debug('Inavlid CTO sourcing');

16616: MSC_ATP_PVT.OSS_ERROR_AT_LOWER_LEVEL,
16617: MSC_ATP_PVT.OSS_ERROR_AT_THIS_LEVEL) THEN
16618:
16619: IF PG_DEBUG in ('Y', 'C') THEN
16620: msc_sch_wb.atp_debug('Inavlid CTO sourcing');
16621: END IF;
16622: l_atp_input_table.error_code(l_count) := p_atp_table.oss_error_code(j);
16623:
16624: ELSE

Line 16640: msc_sch_wb.atp_debug('Explode Included Items');

16636: p_atp_table.pick_components_flag(j) = 'Y' and
16637: p_atp_table.bom_item_type(j) in (1, 2) THEN
16638:
16639: IF PG_DEBUG in ('Y', 'C') THEN
16640: msc_sch_wb.atp_debug('Explode Included Items');
16641: msc_sch_wb.atp_debug('First Do UOM Convesrion');
16642: END IF;
16643:
16644: MSC_ATP_PROC.inv_primary_uom_conversion(p_instance_id,

Line 16641: msc_sch_wb.atp_debug('First Do UOM Convesrion');

16637: p_atp_table.bom_item_type(j) in (1, 2) THEN
16638:
16639: IF PG_DEBUG in ('Y', 'C') THEN
16640: msc_sch_wb.atp_debug('Explode Included Items');
16641: msc_sch_wb.atp_debug('First Do UOM Convesrion');
16642: END IF;
16643:
16644: MSC_ATP_PROC.inv_primary_uom_conversion(p_instance_id,
16645: p_atp_table.validation_org(j),

Line 16652: msc_sch_wb.atp_debug('l_conversion_rate');

16648: l_quantity_uom,
16649: l_conversion_rate);
16650:
16651: IF PG_DEBUG in ('Y', 'C') THEN
16652: msc_sch_wb.atp_debug('l_conversion_rate');
16653: msc_sch_wb.atp_debug('QTY Ordered := ' || p_atp_table.Quantity_Ordered(j));
16654:
16655: END IF;
16656:

Line 16653: msc_sch_wb.atp_debug('QTY Ordered := ' || p_atp_table.Quantity_Ordered(j));

16649: l_conversion_rate);
16650:
16651: IF PG_DEBUG in ('Y', 'C') THEN
16652: msc_sch_wb.atp_debug('l_conversion_rate');
16653: msc_sch_wb.atp_debug('QTY Ordered := ' || p_atp_table.Quantity_Ordered(j));
16654:
16655: END IF;
16656:
16657: l_quantity_ordered := p_atp_table.Quantity_Ordered(j) * l_conversion_rate;

Line 16660: msc_sch_wb.atp_debug('QTY Ordered after conversion:= ' || l_quantity_ordered);

16656:
16657: l_quantity_ordered := p_atp_table.Quantity_Ordered(j) * l_conversion_rate;
16658: l_quantity_ordered := ROUND( l_quantity_ordered, 6); --4562646
16659: IF PG_DEBUG in ('Y', 'C') THEN
16660: msc_sch_wb.atp_debug('QTY Ordered after conversion:= ' || l_quantity_ordered);
16661: msc_sch_wb.atp_debug('Now call Get Mand Comp');
16662: END IF;
16663:
16664: --- included items are not passed. Explode them

Line 16661: msc_sch_wb.atp_debug('Now call Get Mand Comp');

16657: l_quantity_ordered := p_atp_table.Quantity_Ordered(j) * l_conversion_rate;
16658: l_quantity_ordered := ROUND( l_quantity_ordered, 6); --4562646
16659: IF PG_DEBUG in ('Y', 'C') THEN
16660: msc_sch_wb.atp_debug('QTY Ordered after conversion:= ' || l_quantity_ordered);
16661: msc_sch_wb.atp_debug('Now call Get Mand Comp');
16662: END IF;
16663:
16664: --- included items are not passed. Explode them
16665: MSC_ATP_PVT.G_PTF_DATE := sysdate;

Line 16678: msc_sch_wb.atp_debug('After getting included items');

16674: l_mand_comp_info_rec);
16675:
16676: --- if SMC PTO then add to l_atp_input_table else add to l_included_item_table
16677: IF PG_DEBUG in ('Y', 'C') THEN
16678: msc_sch_wb.atp_debug('After getting included items');
16679: msc_sch_wb.atp_debug('Ship set name := ' || NVL(p_atp_table.Ship_Set_Name(j), 'XYZ'));
16680: END IF;
16681:
16682: IF p_atp_table.Ship_Set_Name(j) is not null then

Line 16679: msc_sch_wb.atp_debug('Ship set name := ' || NVL(p_atp_table.Ship_Set_Name(j), 'XYZ'));

16675:
16676: --- if SMC PTO then add to l_atp_input_table else add to l_included_item_table
16677: IF PG_DEBUG in ('Y', 'C') THEN
16678: msc_sch_wb.atp_debug('After getting included items');
16679: msc_sch_wb.atp_debug('Ship set name := ' || NVL(p_atp_table.Ship_Set_Name(j), 'XYZ'));
16680: END IF;
16681:
16682: IF p_atp_table.Ship_Set_Name(j) is not null then
16683:

Line 16687: msc_sch_wb.atp_debug('Comp Count := ' || l_mand_comp_info_rec.sr_inventory_item_id.count);

16683:
16684: --its an SMC PTO or KIT, add to the same set
16685:
16686: IF PG_DEBUG in ('Y', 'C') THEN
16687: msc_sch_wb.atp_debug('Comp Count := ' || l_mand_comp_info_rec.sr_inventory_item_id.count);
16688: msc_sch_wb.atp_debug('SMC or PTO Kit');
16689: END IF;
16690: FOR l_pto_cntr in 1..l_mand_comp_info_rec.sr_inventory_item_id.count LOOP
16691: MSC_ATP_CTO.G_INCLUDED_ITEM_IS_PRESENT := 1;

Line 16688: msc_sch_wb.atp_debug('SMC or PTO Kit');

16684: --its an SMC PTO or KIT, add to the same set
16685:
16686: IF PG_DEBUG in ('Y', 'C') THEN
16687: msc_sch_wb.atp_debug('Comp Count := ' || l_mand_comp_info_rec.sr_inventory_item_id.count);
16688: msc_sch_wb.atp_debug('SMC or PTO Kit');
16689: END IF;
16690: FOR l_pto_cntr in 1..l_mand_comp_info_rec.sr_inventory_item_id.count LOOP
16691: MSC_ATP_CTO.G_INCLUDED_ITEM_IS_PRESENT := 1;
16692: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table,

Line 16697: msc_sch_wb.atp_debug('l_pto_cntr := ' || l_pto_cntr);

16693: j,
16694: l_atp_input_table,
16695: l_return_status );
16696: IF PG_DEBUG in ('Y', 'C') THEN
16697: msc_sch_wb.atp_debug('l_pto_cntr := ' || l_pto_cntr);
16698: END IF;
16699: --cr:ngoel: add seq num as well as UOM code
16700: l_count := l_atp_input_table.inventory_item_id.count;
16701: l_atp_input_table.mandatory_item_flag(l_count) := 1;

Line 16710: msc_sch_wb.atp_debug('Assign Seq num');

16706: l_mand_comp_info_rec.sr_inventory_item_id(l_pto_cntr);
16707:
16708: l_atp_input_table.parent_line_id(l_count) := p_atp_table.identifier(j);
16709: IF PG_DEBUG in ('Y', 'C') THEN
16710: msc_sch_wb.atp_debug('Assign Seq num');
16711: END IF;
16712: ---multiplying by .000001 will make sure that std mand comp are inserted in the
16713: -- table after the parent
16714: begin

Line 16720: msc_sch_wb.atp_debug('Error := ' || SQLERRM);

16716: (1 + (.0001 * l_pto_cntr));
16717: EXCEPTION
16718: when others then
16719: IF PG_DEBUG in ('Y', 'C') THEN
16720: msc_sch_wb.atp_debug('Error := ' || SQLERRM);
16721: END IF;
16722: END;
16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('assign UOM');

Line 16724: msc_sch_wb.atp_debug('assign UOM');

16720: msc_sch_wb.atp_debug('Error := ' || SQLERRM);
16721: END IF;
16722: END;
16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('assign UOM');
16725: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);
16726: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);
16727: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);
16728: END IF;

Line 16725: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);

16721: END IF;
16722: END;
16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('assign UOM');
16725: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);
16726: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);
16727: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);
16728: END IF;
16729: l_atp_input_table.Quantity_UOM(l_count) := l_mand_comp_info_rec.uom_code(l_pto_cntr);

Line 16726: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);

16722: END;
16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('assign UOM');
16725: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);
16726: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);
16727: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);
16728: END IF;
16729: l_atp_input_table.Quantity_UOM(l_count) := l_mand_comp_info_rec.uom_code(l_pto_cntr);
16730: IF p_atp_table.bom_item_type(j) = 4 and p_atp_table.Ship_Set_Name(j) is null THEN

Line 16727: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);

16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('assign UOM');
16725: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);
16726: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);
16727: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);
16728: END IF;
16729: l_atp_input_table.Quantity_UOM(l_count) := l_mand_comp_info_rec.uom_code(l_pto_cntr);
16730: IF p_atp_table.bom_item_type(j) = 4 and p_atp_table.Ship_Set_Name(j) is null THEN
16731: IF PG_DEBUG in ('Y', 'C') THEN

Line 16732: msc_sch_wb.atp_debug('process KIT');

16728: END IF;
16729: l_atp_input_table.Quantity_UOM(l_count) := l_mand_comp_info_rec.uom_code(l_pto_cntr);
16730: IF p_atp_table.bom_item_type(j) = 4 and p_atp_table.Ship_Set_Name(j) is null THEN
16731: IF PG_DEBUG in ('Y', 'C') THEN
16732: msc_sch_wb.atp_debug('process KIT');
16733: END IF;
16734: -- If its a PTO KIt and if ship set name is null then we populate
16735: --shipset name so that whole kit is processed as one entity
16736: l_atp_input_table.Ship_Set_Name(l_parent_idx) := p_atp_table.identifier(j);

Line 16747: msc_sch_wb.atp_debug('This is not SMC PTO');

16743: l_mand_comp_info_rec := l_null_mand_comp_info_rec;
16744: j := p_atp_table.Action.NEXT(j);
16745: ELSE --- IF p_atp_table.Ship_Set_Name(j) is not null then
16746: IF PG_DEBUG in ('Y', 'C') THEN
16747: msc_sch_wb.atp_debug('This is not SMC PTO');
16748: END IF;
16749: --non smc PTO
16750: l_included_item_cntr := 0;
16751: IF l_mand_comp_info_rec.sr_inventory_item_id.count > 0 THEN

Line 16794: msc_sch_wb.atp_debug('Call_Schedule, j='||j);

16790: NVL(p_atp_table.Arrival_Set_Name(i),-99) <> NVL(p_atp_table.Arrival_Set_Name(j),-99);
16791:
16792:
16793: IF PG_DEBUG in ('Y', 'C') THEN
16794: msc_sch_wb.atp_debug('Call_Schedule, j='||j);
16795: END IF;
16796:
16797: -- make sure we are in the same ship set before we assign the value.
16798:

Line 16824: msc_sch_wb.atp_debug('Call_Schedule: ' || 'OE Flag (Before ISO check) : '||l_atp_input_table.OE_flag(m));

16820:
16821: m := l_atp_input_table.Action.FIRST;
16822: IF m is not null THEN
16823: IF PG_DEBUG in ('Y', 'C') THEN
16824: msc_sch_wb.atp_debug('Call_Schedule: ' || 'OE Flag (Before ISO check) : '||l_atp_input_table.OE_flag(m));
16825: END IF;
16826: --Bug 4279623 4333596
16827: IF l_atp_input_table.oe_flag(m) = 'Y' and MSC_ATP_PVT.G_INV_CTP = 4 THEN
16828: l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS'), NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO)); --5564082

Line 16831: msc_sch_wb.atp_debug('Before get_plan_info_call:l_consume_so_profile_value ' || l_consume_so_profile_value);

16827: IF l_atp_input_table.oe_flag(m) = 'Y' and MSC_ATP_PVT.G_INV_CTP = 4 THEN
16828: l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS'), NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO)); --5564082
16829: --l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO);
16830: IF PG_DEBUG in ('Y', 'C') THEN
16831: msc_sch_wb.atp_debug('Before get_plan_info_call:l_consume_so_profile_value ' || l_consume_so_profile_value);
16832: msc_sch_wb.atp_debug('Before get_plan_info_call:MSC_CONSUME_INT_SALES_ORDERS ' || l_consume_so_profile_value);
16833: msc_sch_wb.atp_debug('New profile: '||FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS')); --5564082
16834: END IF;
16835: IF l_consume_so_profile_value = CHECK_ORG_IN_PLAN THEN

Line 16832: msc_sch_wb.atp_debug('Before get_plan_info_call:MSC_CONSUME_INT_SALES_ORDERS ' || l_consume_so_profile_value);

16828: l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS'), NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO)); --5564082
16829: --l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO);
16830: IF PG_DEBUG in ('Y', 'C') THEN
16831: msc_sch_wb.atp_debug('Before get_plan_info_call:l_consume_so_profile_value ' || l_consume_so_profile_value);
16832: msc_sch_wb.atp_debug('Before get_plan_info_call:MSC_CONSUME_INT_SALES_ORDERS ' || l_consume_so_profile_value);
16833: msc_sch_wb.atp_debug('New profile: '||FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS')); --5564082
16834: END IF;
16835: IF l_consume_so_profile_value = CHECK_ORG_IN_PLAN THEN
16836: MSC_ATP_PROC.get_plan_info(p_instance_id,

Line 16833: msc_sch_wb.atp_debug('New profile: '||FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS')); --5564082

16829: --l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO);
16830: IF PG_DEBUG in ('Y', 'C') THEN
16831: msc_sch_wb.atp_debug('Before get_plan_info_call:l_consume_so_profile_value ' || l_consume_so_profile_value);
16832: msc_sch_wb.atp_debug('Before get_plan_info_call:MSC_CONSUME_INT_SALES_ORDERS ' || l_consume_so_profile_value);
16833: msc_sch_wb.atp_debug('New profile: '||FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS')); --5564082
16834: END IF;
16835: IF l_consume_so_profile_value = CHECK_ORG_IN_PLAN THEN
16836: MSC_ATP_PROC.get_plan_info(p_instance_id,
16837: l_atp_input_table.inventory_item_id(m),

Line 16843: msc_sch_wb.atp_debug('After get_plan_info_call:plan_id : ' || x_plan_info_rec.plan_id );

16839: null,
16840: x_plan_info_rec);
16841:
16842: IF PG_DEBUG in ('Y', 'C') THEN
16843: msc_sch_wb.atp_debug('After get_plan_info_call:plan_id : ' || x_plan_info_rec.plan_id );
16844: END IF;
16845:
16846: IF x_plan_info_rec.plan_id > 0 THEN
16847:

Line 16849: msc_sch_wb.atp_debug('Plan found for the item in the source org.');

16845:
16846: IF x_plan_info_rec.plan_id > 0 THEN
16847:
16848: IF PG_DEBUG in ('Y', 'C') THEN
16849: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
16850: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
16851: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
16852: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
16853: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );

Line 16850: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );

16846: IF x_plan_info_rec.plan_id > 0 THEN
16847:
16848: IF PG_DEBUG in ('Y', 'C') THEN
16849: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
16850: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
16851: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
16852: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
16853: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );
16854: END IF;

Line 16851: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );

16847:
16848: IF PG_DEBUG in ('Y', 'C') THEN
16849: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
16850: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
16851: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
16852: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
16853: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );
16854: END IF;
16855:

Line 16852: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );

16848: IF PG_DEBUG in ('Y', 'C') THEN
16849: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
16850: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
16851: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
16852: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
16853: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );
16854: END IF;
16855:
16856: select count(*)

Line 16853: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );

16849: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
16850: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
16851: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
16852: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
16853: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );
16854: END IF;
16855:
16856: select count(*)
16857: into l_same_org_count

Line 16867: msc_sch_wb.atp_debug('Both the Orgs are in the same plan and the item is planned.');

16863:
16864: IF l_same_org_count > 0 THEN
16865: l_atp_input_table.oe_flag(m) := 'Y';
16866: IF PG_DEBUG in ('Y', 'C') THEN
16867: msc_sch_wb.atp_debug('Both the Orgs are in the same plan and the item is planned.');
16868: END IF;
16869: ELSE
16870: IF PG_DEBUG in ('Y', 'C') THEN
16871: msc_sch_wb.atp_debug('Both the Orgs are in NOT the same plan');

Line 16871: msc_sch_wb.atp_debug('Both the Orgs are in NOT the same plan');

16867: msc_sch_wb.atp_debug('Both the Orgs are in the same plan and the item is planned.');
16868: END IF;
16869: ELSE
16870: IF PG_DEBUG in ('Y', 'C') THEN
16871: msc_sch_wb.atp_debug('Both the Orgs are in NOT the same plan');
16872: END IF;
16873: select count(*) into l_feeder_count
16874: from msc_system_items
16875: where plan_id in ( select plans.plan_id input_plan_id

Line 16896: msc_sch_wb.atp_debug('There is a feeder plan which has the item palnned. we need not do ATP');

16892:
16893: IF l_feeder_count > 0 then
16894: l_atp_input_table.oe_flag(m) := 'Y';
16895: IF PG_DEBUG in ('Y', 'C') THEN
16896: msc_sch_wb.atp_debug('There is a feeder plan which has the item palnned. we need not do ATP');
16897: END IF;
16898: ELSE
16899: l_atp_input_table.oe_flag(m) := 'N';
16900: IF PG_DEBUG in ('Y', 'C') THEN

Line 16901: msc_sch_wb.atp_debug('There is no feeder plan too. We have to do ATP');

16897: END IF;
16898: ELSE
16899: l_atp_input_table.oe_flag(m) := 'N';
16900: IF PG_DEBUG in ('Y', 'C') THEN
16901: msc_sch_wb.atp_debug('There is no feeder plan too. We have to do ATP');
16902: END IF;
16903: END IF; -- l_feeder_count > 0
16904: END IF; --if l_same_org_count > 0 then
16905: ELSE

Line 16908: msc_sch_wb.atp_debug('The item is not planned at all. No need to do ATP');

16904: END IF; --if l_same_org_count > 0 then
16905: ELSE
16906: l_atp_input_table.oe_flag(m) := 'Y';
16907: IF PG_DEBUG in ('Y', 'C') THEN
16908: msc_sch_wb.atp_debug('The item is not planned at all. No need to do ATP');
16909: END IF;
16910: END IF; -- x_plan_info_rec.count > 0
16911: ELSIF l_consume_so_profile_value = YES THEN
16912: l_atp_input_table.oe_flag(m) := 'N';

Line 16914: msc_sch_wb.atp_debug('Profile value is set to CHECK ATP. We need to do ATP always.');

16910: END IF; -- x_plan_info_rec.count > 0
16911: ELSIF l_consume_so_profile_value = YES THEN
16912: l_atp_input_table.oe_flag(m) := 'N';
16913: IF PG_DEBUG in ('Y', 'C') THEN
16914: msc_sch_wb.atp_debug('Profile value is set to CHECK ATP. We need to do ATP always.');
16915: END IF;
16916:
16917: END IF; -- nvl(fnd_profile.value('msc_consume_int_sales_orders'), '2') = 3
16918: END IF; -- l_atp_input_table.oe_flag(1) = 'y' and msc_atp_pvt.g_inv_ctp = 4

Line 16920: msc_sch_wb.atp_debug('l_atp_input_table.oe_flag(m) = '||l_atp_input_table.oe_flag(m)); --5564082

16916:
16917: END IF; -- nvl(fnd_profile.value('msc_consume_int_sales_orders'), '2') = 3
16918: END IF; -- l_atp_input_table.oe_flag(1) = 'y' and msc_atp_pvt.g_inv_ctp = 4
16919: --Bug 4279623 4333596
16920: msc_sch_wb.atp_debug('l_atp_input_table.oe_flag(m) = '||l_atp_input_table.oe_flag(m)); --5564082
16921: IF l_atp_input_table.OE_flag(m) = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
16922:
16923: IF PG_DEBUG in ('Y', 'C') THEN
16924: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Internal Sales order import for OM');

Line 16924: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Internal Sales order import for OM');

16920: msc_sch_wb.atp_debug('l_atp_input_table.oe_flag(m) = '||l_atp_input_table.oe_flag(m)); --5564082
16921: IF l_atp_input_table.OE_flag(m) = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
16922:
16923: IF PG_DEBUG in ('Y', 'C') THEN
16924: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Internal Sales order import for OM');
16925: END IF;
16926:
16927: x_atp_table := l_atp_input_table;
16928: BEGIN --bug3583705

Line 16958: msc_sch_wb.atp_debug('delivery lead time is not specified');

16954:
16955: -- dsting dlt
16956: IF (NVL(l_atp_input_table.delivery_lead_time(m), -1) = -1 ) THEN
16957: IF PG_DEBUG IN ('Y', 'C') THEN
16958: msc_sch_wb.atp_debug('delivery lead time is not specified');
16959: END IF;
16960:
16961: l_ship_method := x_atp_table.ship_method(m);
16962: -- Bug 3449812 - Base DLT on internal_org_id if available

Line 17011: --msc_sch_wb.atp_debug('Call_Schedule: ' || 'Lead Time '||l_delivery_lead_time);

17007: -- dsting removed old delivery lead time code
17008: END IF; -- end delivery lead time not specified
17009:
17010: IF PG_DEBUG in ('Y', 'C') THEN
17011: --msc_sch_wb.atp_debug('Call_Schedule: ' || 'Lead Time '||l_delivery_lead_time);
17012: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Lead Time '||x_atp_table.delivery_lead_time(m)); --4430710
17013: END IF;
17014:
17015: -- Bug 3449812 - get receiving cal from ISO's destination org if available

Line 17012: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Lead Time '||x_atp_table.delivery_lead_time(m)); --4430710

17008: END IF; -- end delivery lead time not specified
17009:
17010: IF PG_DEBUG in ('Y', 'C') THEN
17011: --msc_sch_wb.atp_debug('Call_Schedule: ' || 'Lead Time '||l_delivery_lead_time);
17012: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Lead Time '||x_atp_table.delivery_lead_time(m)); --4430710
17013: END IF;
17014:
17015: -- Bug 3449812 - get receiving cal from ISO's destination org if available
17016: -- Bug 3515520, don't use org in case customer/site is populated.

Line 17094: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_USE_SHIP_REC_CAL is N');

17090: ELSE
17091:
17092: -- Bug 3593394
17093: IF PG_DEBUG in ('Y', 'C') THEN
17094: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_USE_SHIP_REC_CAL is N');
17095: END IF;
17096: -- Bug 3737759 - Use receiving org's OMC
17097: IF (x_atp_table.internal_org_id(m) IS NOT NULL) OR
17098: (x_atp_table.organization_id(m) IS NOT NULL AND

Line 17147: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date ' || x_atp_table.ship_date(m) );

17143: l_shipping_cal_code, -1, p_instance_id);
17144: END IF;
17145:
17146: IF PG_DEBUG in ('Y', 'C') THEN
17147: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date ' || x_atp_table.ship_date(m) );
17148: END IF;
17149:
17150: BEGIN -- Bug2031894. Handle Exception here.
17151:

Line 17159: msc_sch_wb.atp_debug('Call_Schedule: ' || 'When Others ');

17155: sysdate);
17156: EXCEPTION
17157: WHEN OTHERS THEN
17158: IF PG_DEBUG in ('Y', 'C') THEN
17159: msc_sch_wb.atp_debug('Call_Schedule: ' || 'When Others ');
17160: END IF;
17161: NULL;
17162: END;
17163: IF PG_DEBUG in ('Y', 'C') THEN

Line 17164: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_sysdate '||l_sysdate);

17160: END IF;
17161: NULL;
17162: END;
17163: IF PG_DEBUG in ('Y', 'C') THEN
17164: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_sysdate '||l_sysdate);
17165: END IF;
17166: IF l_sysdate IS NULL THEN
17167: IF PG_DEBUG in ('Y', 'C') THEN
17168: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Sysdate not found in Calendar');

Line 17168: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Sysdate not found in Calendar');

17164: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_sysdate '||l_sysdate);
17165: END IF;
17166: IF l_sysdate IS NULL THEN
17167: IF PG_DEBUG in ('Y', 'C') THEN
17168: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Sysdate not found in Calendar');
17169: END IF;
17170: x_atp_table.error_code(m) := NO_MATCHING_CAL_DATE;
17171: END IF;
17172:

Line 17187: msc_sch_wb.atp_debug('Call_Schedule: ' || 'prev date for ship date not found in Calendar');

17183: x_atp_table.ship_date(m));
17184:
17185: IF l_prev_work_ship_date IS NULL THEN
17186: IF PG_DEBUG in ('Y', 'C') THEN
17187: msc_sch_wb.atp_debug('Call_Schedule: ' || 'prev date for ship date not found in Calendar');
17188: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date ' || x_atp_table.ship_date(m) );
17189: END IF;
17190: x_atp_table.error_code(m) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
17191: END IF;

Line 17188: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date ' || x_atp_table.ship_date(m) );

17184:
17185: IF l_prev_work_ship_date IS NULL THEN
17186: IF PG_DEBUG in ('Y', 'C') THEN
17187: msc_sch_wb.atp_debug('Call_Schedule: ' || 'prev date for ship date not found in Calendar');
17188: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date ' || x_atp_table.ship_date(m) );
17189: END IF;
17190: x_atp_table.error_code(m) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
17191: END IF;
17192: */

Line 17195: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_ship_date(m) : ' ||

17191: END IF;
17192: */
17193:
17194: IF PG_DEBUG in ('Y', 'C') THEN
17195: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_ship_date(m) : ' ||
17196: to_char(x_atp_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17197: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date(m) : ' ||
17198: to_char(x_atp_table.ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17199: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_arrival_date(m): ' ||

Line 17197: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date(m) : ' ||

17193:
17194: IF PG_DEBUG in ('Y', 'C') THEN
17195: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_ship_date(m) : ' ||
17196: to_char(x_atp_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17197: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date(m) : ' ||
17198: to_char(x_atp_table.ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17199: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_arrival_date(m): ' ||
17200: to_char(x_atp_table.requested_arrival_date(m),'dd/mm/yyyy hh:mi:ss'));
17201: END IF;

Line 17199: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_arrival_date(m): ' ||

17195: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_ship_date(m) : ' ||
17196: to_char(x_atp_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17197: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date(m) : ' ||
17198: to_char(x_atp_table.ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17199: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_arrival_date(m): ' ||
17200: to_char(x_atp_table.requested_arrival_date(m),'dd/mm/yyyy hh:mi:ss'));
17201: END IF;
17202: -- Bug Bug 2232555, 2250456
17203:

Line 17256: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| x_atp_table.group_ship_date(m));

17252: x_atp_table.group_arrival_date(m) := x_atp_table.arrival_date(m);
17253: x_atp_table.ship_method(m) := l_ship_method;
17254: x_atp_table.delivery_lead_time(m) := l_delivery_lead_time;
17255: IF PG_DEBUG in ('Y', 'C') THEN
17256: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| x_atp_table.group_ship_date(m));
17257: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| x_atp_table.group_arrival_date(m));
17258: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_ship_date(m) after : ' ||
17259: to_char(x_atp_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17260: END IF;

Line 17257: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| x_atp_table.group_arrival_date(m));

17253: x_atp_table.ship_method(m) := l_ship_method;
17254: x_atp_table.delivery_lead_time(m) := l_delivery_lead_time;
17255: IF PG_DEBUG in ('Y', 'C') THEN
17256: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| x_atp_table.group_ship_date(m));
17257: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| x_atp_table.group_arrival_date(m));
17258: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_ship_date(m) after : ' ||
17259: to_char(x_atp_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17260: END IF;
17261:

Line 17258: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_ship_date(m) after : ' ||

17254: x_atp_table.delivery_lead_time(m) := l_delivery_lead_time;
17255: IF PG_DEBUG in ('Y', 'C') THEN
17256: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| x_atp_table.group_ship_date(m));
17257: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| x_atp_table.group_arrival_date(m));
17258: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.requested_ship_date(m) after : ' ||
17259: to_char(x_atp_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
17260: END IF;
17261:
17262: -- End Changes

Line 17297: msc_sch_wb.atp_debug('Call_Schedule: NO_MATCHING_CAL_DATE');

17293: IF (x_atp_table.Error_Code(i) IS NULL) or (x_atp_table.Error_Code(i) IN (0,61,150)) THEN
17294: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
17295: x_atp_table.Error_Code(i) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
17296: IF PG_DEBUG in ('Y', 'C') THEN
17297: msc_sch_wb.atp_debug('Call_Schedule: NO_MATCHING_CAL_DATE');
17298: END IF;
17299: ELSE
17300: x_atp_table.Error_Code(i) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error
17301: END IF;

Line 17308: msc_sch_wb.atp_debug('Call_Schedule: ' || 'error := ' || sqlerrm);

17304: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
17305: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'MSC_ATP_PVT');
17306: END IF;
17307: IF PG_DEBUG in ('Y', 'C') THEN
17308: msc_sch_wb.atp_debug('Call_Schedule: ' || 'error := ' || sqlerrm);
17309: END IF;
17310: END;
17311: --bug3583705 end
17312: /* END Bug 2290633 : krajan : 04/05/02 */

Line 17315: msc_sch_wb.atp_debug('Call_Schedule: ' || 'After Assigning values for l_atp_output_table');

17311: --bug3583705 end
17312: /* END Bug 2290633 : krajan : 04/05/02 */
17313:
17314: IF PG_DEBUG in ('Y', 'C') THEN
17315: msc_sch_wb.atp_debug('Call_Schedule: ' || 'After Assigning values for l_atp_output_table');
17316: END IF;
17317:
17318: ELSE -- IF l_atp_input_table.OE_flag(m) = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
17319: -- now call schedule to schedule this line/set.

Line 17326: msc_sch_wb.atp_debug('Call_Schedule, before Schedule ');

17322: -- to users when we cannot satisfy the request on the preferred
17323: -- warehouse and the action is ATP inquiry.
17324:
17325: IF PG_DEBUG in ('Y', 'C') THEN
17326: msc_sch_wb.atp_debug('Call_Schedule, before Schedule ');
17327: END IF;
17328: /* --s_cto_rearch
17329: -- rajjain 02/03/2003 Bug 2766713 Begin
17330: k := l_atp_input_table.error_code.First;

Line 17333: msc_sch_wb.atp_debug ('Call_Schedule: '||'Invalid Item Org Combination : '||k);

17329: -- rajjain 02/03/2003 Bug 2766713 Begin
17330: k := l_atp_input_table.error_code.First;
17331: FOR k in 1.. l_atp_input_table.error_code.COUNT LOOP
17332: IF l_atp_input_table.error_code(k) = INVALID_ITEM_ORG_COMBINATION THEN
17333: msc_sch_wb.atp_debug ('Call_Schedule: '||'Invalid Item Org Combination : '||k);
17334: l_set_fail_flag := 'Y';
17335: EXIT;
17336: END IF;
17337: END LOOP;

Line 17345: msc_sch_wb.atp_debug ('Call_Schedule: '

17341: l_atp_output_table := l_atp_input_table;
17342: /* --s_cto_rearch
17343: k := l_atp_input_table.error_code.First;
17344: IF PG_DEBUG in ('Y','C') THEN
17345: msc_sch_wb.atp_debug ('Call_Schedule: '
17346: || 'This set failed as this has atleast one item with invalid item-org combination');
17347: END IF;
17348: FOR k in 1.. l_atp_input_table.error_code.COUNT LOOP
17349: IF nvl(l_atp_input_table.error_code(k), 0) <> INVALID_ITEM_ORG_COMBINATION THEN

Line 17360: msc_sch_wb.atp_debug ('Calling Schedule with 24x7 related parameters');

17356: ELSE
17357: -- 24x7 Call to schedule. What do we call ?
17358: if (NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'Y' ) then
17359: IF PG_DEBUG in ('Y','C') THEN
17360: msc_sch_wb.atp_debug ('Calling Schedule with 24x7 related parameters');
17361: END IF;
17362:
17363: MSC_ATP_PVT.Schedule(l_atp_input_table,
17364: l_atp_input_table.instance_id(l_atp_input_table.instance_id.FIRST),

Line 17396: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside return status error');

17392:
17393: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
17394:
17395: IF PG_DEBUG in ('Y', 'C') THEN
17396: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside return status error');
17397: END IF;
17398: x_return_status := FND_API.G_RET_STS_ERROR;
17399: k := l_atp_output_table.Calling_Module.First;
17400: FOR k in 1.. l_atp_output_table.Calling_Module.COUNT LOOP

Line 17409: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after setting group error');

17405: l_atp_output_table.Error_Code(k) := GROUPEL_ERROR;
17406: END IF;
17407: END LOOP;
17408: IF PG_DEBUG in ('Y', 'C') THEN
17409: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after setting group error');
17410: END IF;
17411: END IF;
17412: END IF; --IF l_set_fail_flag = 'Y' THEN
17413: -- rajjain 02/03/2003 Bug 2766713 End

Line 17425: msc_sch_wb.atp_debug('requested ship date = '||

17421:
17422: FOR k in 1.. l_atp_output_table.Calling_Module.COUNT
17423: LOOP
17424: IF PG_DEBUG in ('Y', 'C') THEN
17425: msc_sch_wb.atp_debug('requested ship date = '||
17426: to_char( p_atp_table.requested_ship_date(k), 'DD-MON-YYYY HH24:MI:SS'));
17427: msc_sch_wb.atp_debug('requested arrival date = '
17428: ||to_char( p_atp_table.requested_arrival_date(k), 'DD-MON-YYYY HH24:MI:SS'));
17429: msc_sch_wb.atp_debug('group ship date = '

Line 17427: msc_sch_wb.atp_debug('requested arrival date = '

17423: LOOP
17424: IF PG_DEBUG in ('Y', 'C') THEN
17425: msc_sch_wb.atp_debug('requested ship date = '||
17426: to_char( p_atp_table.requested_ship_date(k), 'DD-MON-YYYY HH24:MI:SS'));
17427: msc_sch_wb.atp_debug('requested arrival date = '
17428: ||to_char( p_atp_table.requested_arrival_date(k), 'DD-MON-YYYY HH24:MI:SS'));
17429: msc_sch_wb.atp_debug('group ship date = '
17430: ||to_char( l_atp_output_table.group_Ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17431: msc_sch_wb.atp_debug('group arrival date = '

Line 17429: msc_sch_wb.atp_debug('group ship date = '

17425: msc_sch_wb.atp_debug('requested ship date = '||
17426: to_char( p_atp_table.requested_ship_date(k), 'DD-MON-YYYY HH24:MI:SS'));
17427: msc_sch_wb.atp_debug('requested arrival date = '
17428: ||to_char( p_atp_table.requested_arrival_date(k), 'DD-MON-YYYY HH24:MI:SS'));
17429: msc_sch_wb.atp_debug('group ship date = '
17430: ||to_char( l_atp_output_table.group_Ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17431: msc_sch_wb.atp_debug('group arrival date = '
17432: ||to_char( l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17433: msc_sch_wb.atp_debug('arrival date = '

Line 17431: msc_sch_wb.atp_debug('group arrival date = '

17427: msc_sch_wb.atp_debug('requested arrival date = '
17428: ||to_char( p_atp_table.requested_arrival_date(k), 'DD-MON-YYYY HH24:MI:SS'));
17429: msc_sch_wb.atp_debug('group ship date = '
17430: ||to_char( l_atp_output_table.group_Ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17431: msc_sch_wb.atp_debug('group arrival date = '
17432: ||to_char( l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17433: msc_sch_wb.atp_debug('arrival date = '
17434: ||to_char(l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17435: msc_sch_wb.atp_debug('ship date = '

Line 17433: msc_sch_wb.atp_debug('arrival date = '

17429: msc_sch_wb.atp_debug('group ship date = '
17430: ||to_char( l_atp_output_table.group_Ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17431: msc_sch_wb.atp_debug('group arrival date = '
17432: ||to_char( l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17433: msc_sch_wb.atp_debug('arrival date = '
17434: ||to_char(l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17435: msc_sch_wb.atp_debug('ship date = '
17436: ||to_char(l_atp_output_table.ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17437: END IF;

Line 17435: msc_sch_wb.atp_debug('ship date = '

17431: msc_sch_wb.atp_debug('group arrival date = '
17432: ||to_char( l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17433: msc_sch_wb.atp_debug('arrival date = '
17434: ||to_char(l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17435: msc_sch_wb.atp_debug('ship date = '
17436: ||to_char(l_atp_output_table.ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
17437: END IF;
17438: if((( p_atp_table.requested_ship_date(k)is not null and
17439: (p_atp_table.requested_ship_date(k) <>

Line 17475: msc_sch_wb.atp_debug('Call_Schedule: ' || 'before backlog');

17471: END IF;
17472:
17473: -- this is for backlog: we need to send a message back.
17474: IF PG_DEBUG in ('Y', 'C') THEN
17475: msc_sch_wb.atp_debug('Call_Schedule: ' || 'before backlog');
17476: END IF;
17477:
17478: k := l_atp_output_table.Calling_Module.First;
17479: IF k IS NOT NULL THEN

Line 17484: msc_sch_wb.atp_debug('Call_Schedule: ' || 'for backlog');

17480:
17481: IF NVL(l_atp_output_table.Calling_Module(k), 0) = -1 THEN -- backlog
17482:
17483: IF PG_DEBUG in ('Y', 'C') THEN
17484: msc_sch_wb.atp_debug('Call_Schedule: ' || 'for backlog');
17485: END IF;
17486: --Bug3765793 adding trim functions to remove spaces from db_link
17487: SELECT ltrim(rtrim(M2A_DBLINK))
17488: INTO l_dblink

Line 17492: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after l_dblink : '||l_dblink);

17488: INTO l_dblink
17489: FROM msc_apps_instances
17490: WHERE instance_id = p_instance_id;
17491: IF PG_DEBUG in ('Y', 'C') THEN
17492: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after l_dblink : '||l_dblink);
17493: END IF;
17494:
17495: FOR k in 1..l_atp_output_table.Calling_Module.COUNT LOOP
17496:

Line 17498: msc_sch_wb.atp_debug('Call_Schedule: ' || 'in side for loop for backlog');

17494:
17495: FOR k in 1..l_atp_output_table.Calling_Module.COUNT LOOP
17496:
17497: IF PG_DEBUG in ('Y', 'C') THEN
17498: msc_sch_wb.atp_debug('Call_Schedule: ' || 'in side for loop for backlog');
17499: END IF;
17500: /*
17501: msc_sch_wb.pipe_utility(p_session_id,
17502: 'SEND',

Line 17501: msc_sch_wb.pipe_utility(p_session_id,

17497: IF PG_DEBUG in ('Y', 'C') THEN
17498: msc_sch_wb.atp_debug('Call_Schedule: ' || 'in side for loop for backlog');
17499: END IF;
17500: /*
17501: msc_sch_wb.pipe_utility(p_session_id,
17502: 'SEND',
17503: l_msg_data,
17504: l_msg_count,
17505: x_return_status,

Line 17511: plsql_block := 'BEGIN msc_sch_wb.pipe_utility'

17507: l_msg_count);
17508: */ --bug3520746 pass MSC_ATP_PVT.G_DATABASE_LINK insead of l_dblink
17509: --as global variable already has the right dblink for RAC
17510: IF l_dblink IS NOT NULL THEN
17511: plsql_block := 'BEGIN msc_sch_wb.pipe_utility'
17512: ||'@'||MSC_ATP_PVT.G_DATABASE_LINK||'(:p_session_id,
17513: :p_command,
17514: :l_msg_data,
17515: :l_msg_number,

Line 17521: msc_sch_wb.atp_debug('Call_Schedule: ' || 'plsql_block : '|| plsql_block);

17517: :l_msg_text,
17518: :l_msg_count); END;';
17519:
17520: IF PG_DEBUG in ('Y', 'C') THEN
17521: msc_sch_wb.atp_debug('Call_Schedule: ' || 'plsql_block : '|| plsql_block);
17522: END IF;
17523:
17524: BEGIN
17525: EXECUTE IMMEDIATE plsql_block USING

Line 17534: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after plsql_block');

17530: OUT x_return_status,
17531: OUT l_msg_text,
17532: OUT l_msg_count;
17533: IF PG_DEBUG in ('Y', 'C') THEN
17534: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after plsql_block');
17535: END IF;
17536: EXCEPTION
17537: when others then
17538: IF PG_DEBUG in ('Y', 'C') THEN

Line 17539: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside send exception : '||sqlcode);

17535: END IF;
17536: EXCEPTION
17537: when others then
17538: IF PG_DEBUG in ('Y', 'C') THEN
17539: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside send exception : '||sqlcode);
17540: END IF;
17541: END;
17542:
17543: ELSE --IF l_dblink IS NOT NULL THEN

Line 17544: msc_sch_wb.pipe_utility(p_session_id,

17540: END IF;
17541: END;
17542:
17543: ELSE --IF l_dblink IS NOT NULL THEN
17544: msc_sch_wb.pipe_utility(p_session_id,
17545: 'SEND',
17546: l_msg_data,
17547: l_msg_number,
17548: x_return_status,

Line 17575: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside global availability check and calling remove_invalid_sd_rec');

17571: IF ( l_global_availability = 'Y' )
17572: AND (p_atp_table.source_organization_id(i) <> p_atp_table.source_organization_id(l)) THEN
17573:
17574: IF PG_DEBUG in ('Y', 'C') THEN
17575: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside global availability check and calling remove_invalid_sd_rec');
17576: END IF;
17577: IF ( x_atp_table.Action(1) = ATPQUERY ) THEN
17578: IF ( MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST IS NOT NULL AND MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.Count > 0) THEN
17579: FOR m in 1..MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.COUNT LOOP

Line 17601: msc_sch_wb.atp_debug(x_atp_table.Action(1));

17597:
17598: END LOOP;
17599:
17600: IF PG_DEBUG in ('Y', 'C') THEN
17601: msc_sch_wb.atp_debug(x_atp_table.Action(1));
17602: msc_sch_wb.atp_debug(x_atp_table.calling_module(1));
17603: END IF;
17604:
17605: --3720018, Call to Remove_invalid_SD_rec and Undo_delete_row for the whole_request in case of ATP Inquiry

Line 17602: msc_sch_wb.atp_debug(x_atp_table.calling_module(1));

17598: END LOOP;
17599:
17600: IF PG_DEBUG in ('Y', 'C') THEN
17601: msc_sch_wb.atp_debug(x_atp_table.Action(1));
17602: msc_sch_wb.atp_debug(x_atp_table.calling_module(1));
17603: END IF;
17604:
17605: --3720018, Call to Remove_invalid_SD_rec and Undo_delete_row for the whole_request in case of ATP Inquiry
17606: IF ( x_atp_table.Action(1) = ATPQUERY ) THEN

Line 17608: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Outside global availability check and calling remove_invalid_sdrec');

17604:
17605: --3720018, Call to Remove_invalid_SD_rec and Undo_delete_row for the whole_request in case of ATP Inquiry
17606: IF ( x_atp_table.Action(1) = ATPQUERY ) THEN
17607: IF PG_DEBUG in ('Y', 'C') THEN
17608: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Outside global availability check and calling remove_invalid_sdrec');
17609: END IF;
17610:
17611: IF ( MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST IS NOT NULL AND MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.Count > 0) THEN
17612: FOR m in 1..MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.COUNT LOOP

Line 17670: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_regions_temp : '||sql%rowcount);

17666: DELETE msc_regions_temp
17667: WHERE session_id = p_session_id;
17668:
17669: IF PG_DEBUG in ('Y', 'C') THEN
17670: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_regions_temp : '||sql%rowcount);
17671: END IF;
17672: --bug3940999 Delete records from msc_atp_src_profile_temp before returning
17673: --back to calling application so as to clean up the table
17674: DELETE msc_atp_src_profile_temp

Line 17680: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);

17676:
17677:
17678:
17679: IF PG_DEBUG in ('Y', 'C') THEN
17680: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);
17681: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before calling MSC_ATP_PROC.Delete_Copy_Demand');
17682: END IF;
17683:
17684: -- Summary enhancement - Delete the copy demands that were created in this transaction if refresh number has moved.

Line 17681: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before calling MSC_ATP_PROC.Delete_Copy_Demand');

17677:
17678:
17679: IF PG_DEBUG in ('Y', 'C') THEN
17680: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);
17681: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before calling MSC_ATP_PROC.Delete_Copy_Demand');
17682: END IF;
17683:
17684: -- Summary enhancement - Delete the copy demands that were created in this transaction if refresh number has moved.
17685: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN --bug4291375 Delete_Copy_Demand should be called when summary is ON.

Line 17698: msc_sch_wb.atp_debug('Call_Schedule: G_OFF_DEM_TRANS_ID.count ' || G_OFF_DEM_TRANS_ID.count);

17694: --Bug 3629191: Insert Offset Record to MRP_ATP_DETAILS_TEMP with record_type = 3
17695: -- and these will be inserted with NULL in all the three pegging_id columns
17696:
17697: IF PG_DEBUG in ('Y', 'C') THEN
17698: msc_sch_wb.atp_debug('Call_Schedule: G_OFF_DEM_TRANS_ID.count ' || G_OFF_DEM_TRANS_ID.count);
17699: for i in 1..G_OFF_DEM_TRANS_ID.count LOOP
17700: msc_sch_wb.atp_debug('Call_Schedule: ' ||G_OFF_INSTANCE_ID(i) ||',' || G_OFF_PLAN_ID(i)||','||G_OFF_DEM_TRANS_ID(i));
17701: END LOOP;
17702: END IF;

Line 17700: msc_sch_wb.atp_debug('Call_Schedule: ' ||G_OFF_INSTANCE_ID(i) ||',' || G_OFF_PLAN_ID(i)||','||G_OFF_DEM_TRANS_ID(i));

17696:
17697: IF PG_DEBUG in ('Y', 'C') THEN
17698: msc_sch_wb.atp_debug('Call_Schedule: G_OFF_DEM_TRANS_ID.count ' || G_OFF_DEM_TRANS_ID.count);
17699: for i in 1..G_OFF_DEM_TRANS_ID.count LOOP
17700: msc_sch_wb.atp_debug('Call_Schedule: ' ||G_OFF_INSTANCE_ID(i) ||',' || G_OFF_PLAN_ID(i)||','||G_OFF_DEM_TRANS_ID(i));
17701: END LOOP;
17702: END IF;
17703:
17704: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN

Line 17731: msc_sch_wb.atp_debug('Call_Schedule: ' || 'WF Profile:' || l_wf_profile);

17727: * Restructured Exception/WF Notification code */
17728: l_wf_profile := NVL(G_ATP_WORKFLOW,
17729: NVL(fnd_profile.value('MSC_ALLOCATED_ATP_WORKFLOW'), 'N'));
17730: IF PG_DEBUG in ('Y', 'C') THEN
17731: msc_sch_wb.atp_debug('Call_Schedule: ' || 'WF Profile:' || l_wf_profile);
17732: END IF;
17733:
17734: k := x_atp_table.Calling_Module.First;
17735: -- Generate exceptions only if action is not ATP query.

Line 17744: msc_sch_wb.atp_debug('Call_Schedule: ' || 'k := '||k);

17740: l_wf_start := NULL;
17741: l_exception_rec.demand_id := NULL;
17742:
17743: IF PG_DEBUG in ('Y', 'C') THEN
17744: msc_sch_wb.atp_debug('Call_Schedule: ' || 'k := '||k);
17745: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Override_flag : '||x_atp_table.Override_Flag(k));
17746: END IF;
17747:
17748: /* rajjain code specific to workflow generation begin*/

Line 17745: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Override_flag : '||x_atp_table.Override_Flag(k));

17741: l_exception_rec.demand_id := NULL;
17742:
17743: IF PG_DEBUG in ('Y', 'C') THEN
17744: msc_sch_wb.atp_debug('Call_Schedule: ' || 'k := '||k);
17745: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Override_flag : '||x_atp_table.Override_Flag(k));
17746: END IF;
17747:
17748: /* rajjain code specific to workflow generation begin*/
17749: IF NVL(l_wf_profile, 'N') = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 17752: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin Workflow Notification ***');

17748: /* rajjain code specific to workflow generation begin*/
17749: IF NVL(l_wf_profile, 'N') = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
17750: -- generate workflow notification only in case of PDS.
17751: IF PG_DEBUG in ('Y', 'C') THEN
17752: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin Workflow Notification ***');
17753: msc_sch_wb.atp_debug('Call_Schedule: ' || 'qty ordered : '||x_atp_table.Quantity_Ordered(k));
17754: msc_sch_wb.atp_debug('Call_Schedule: ' || 'req_date_qty : '||x_atp_table.Requested_Date_Quantity(k));
17755: END IF;
17756:

Line 17753: msc_sch_wb.atp_debug('Call_Schedule: ' || 'qty ordered : '||x_atp_table.Quantity_Ordered(k));

17749: IF NVL(l_wf_profile, 'N') = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
17750: -- generate workflow notification only in case of PDS.
17751: IF PG_DEBUG in ('Y', 'C') THEN
17752: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin Workflow Notification ***');
17753: msc_sch_wb.atp_debug('Call_Schedule: ' || 'qty ordered : '||x_atp_table.Quantity_Ordered(k));
17754: msc_sch_wb.atp_debug('Call_Schedule: ' || 'req_date_qty : '||x_atp_table.Requested_Date_Quantity(k));
17755: END IF;
17756:
17757: IF (nvl(x_atp_table.Error_Code(k),-1) = 0) AND (NVL(x_atp_table.Override_Flag(k), 'N') = 'Y') THEN

Line 17754: msc_sch_wb.atp_debug('Call_Schedule: ' || 'req_date_qty : '||x_atp_table.Requested_Date_Quantity(k));

17750: -- generate workflow notification only in case of PDS.
17751: IF PG_DEBUG in ('Y', 'C') THEN
17752: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin Workflow Notification ***');
17753: msc_sch_wb.atp_debug('Call_Schedule: ' || 'qty ordered : '||x_atp_table.Quantity_Ordered(k));
17754: msc_sch_wb.atp_debug('Call_Schedule: ' || 'req_date_qty : '||x_atp_table.Requested_Date_Quantity(k));
17755: END IF;
17756:
17757: IF (nvl(x_atp_table.Error_Code(k),-1) = 0) AND (NVL(x_atp_table.Override_Flag(k), 'N') = 'Y') THEN
17758: BEGIN

Line 17774: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting Available Date for WF *****');

17770: WHEN no_data_found THEN
17771: l_avail_date := NULL;
17772: WHEN others THEN
17773: IF PG_DEBUG in ('Y', 'C') THEN
17774: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting Available Date for WF *****');
17775: END IF;
17776: l_avail_date := NULL;
17777: END;
17778:

Line 17783: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_avail_date : '||l_avail_date);

17779: l_wf_start := 'Y';
17780: END IF; --IF x_atp_table.Override_Flag ... THEN
17781:
17782: IF PG_DEBUG in ('Y', 'C') THEN
17783: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_avail_date : '||l_avail_date);
17784: END IF;
17785: IF (nvl(x_atp_table.Error_Code(k),-1) IN (0,53)) AND MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
17786:
17787: IF PG_DEBUG in ('Y', 'C') THEN

Line 17788: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for Action : '||

17784: END IF;
17785: IF (nvl(x_atp_table.Error_Code(k),-1) IN (0,53)) AND MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
17786:
17787: IF PG_DEBUG in ('Y', 'C') THEN
17788: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for Action : '||
17789: x_atp_table.Action(k));
17790: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for calling Module : '||
17791: x_atp_table.Calling_Module(k));
17792: END IF;

Line 17790: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for calling Module : '||

17786:
17787: IF PG_DEBUG in ('Y', 'C') THEN
17788: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for Action : '||
17789: x_atp_table.Action(k));
17790: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for calling Module : '||
17791: x_atp_table.Calling_Module(k));
17792: END IF;
17793:
17794: BEGIN

Line 17810: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting stealing qty for WF *****');

17806: WHEN no_data_found THEN
17807: l_stealing_qty := 0;
17808: WHEN others THEN
17809: IF PG_DEBUG in ('Y', 'C') THEN
17810: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting stealing qty for WF *****');
17811: END IF;
17812: l_stealing_qty := -1;
17813: END;
17814:

Line 17816: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_stealing_qty : '||l_stealing_qty);

17812: l_stealing_qty := -1;
17813: END;
17814:
17815: IF PG_DEBUG in ('Y', 'C') THEN
17816: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_stealing_qty : '||l_stealing_qty);
17817: END IF;
17818:
17819: l_wf_start := 'Y';
17820: END IF; --IF MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN

Line 17847: msc_sch_wb.atp_debug('Call_Schedule: ' || 'No Data Found getting item key for WF');

17843:
17844: EXCEPTION
17845: WHEN no_data_found THEN
17846: IF PG_DEBUG in ('Y', 'C') THEN
17847: msc_sch_wb.atp_debug('Call_Schedule: ' || 'No Data Found getting item key for WF');
17848: END IF;
17849: l_wf_item_key := NULL;
17850: WHEN others THEN
17851: IF PG_DEBUG in ('Y', 'C') THEN

Line 17852: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting item key for WF *****');

17848: END IF;
17849: l_wf_item_key := NULL;
17850: WHEN others THEN
17851: IF PG_DEBUG in ('Y', 'C') THEN
17852: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting item key for WF *****');
17853: END IF;
17854: l_wf_item_key := NULL;
17855: END;
17856:

Line 17858: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_wf_item_key : '||l_wf_item_key);

17854: l_wf_item_key := NULL;
17855: END;
17856:
17857: IF PG_DEBUG in ('Y', 'C') THEN
17858: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_wf_item_key : '||l_wf_item_key);
17859: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
17860: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
17861: END IF;
17862:

Line 17859: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);

17855: END;
17856:
17857: IF PG_DEBUG in ('Y', 'C') THEN
17858: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_wf_item_key : '||l_wf_item_key);
17859: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
17860: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
17861: END IF;
17862:
17863: IF ((nvl(x_atp_table.Requested_Date_Quantity(k),0) < nvl(x_atp_table.Quantity_Ordered(k),0)) OR

Line 17860: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);

17856:
17857: IF PG_DEBUG in ('Y', 'C') THEN
17858: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_wf_item_key : '||l_wf_item_key);
17859: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
17860: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
17861: END IF;
17862:
17863: IF ((nvl(x_atp_table.Requested_Date_Quantity(k),0) < nvl(x_atp_table.Quantity_Ordered(k),0)) OR
17864: (nvl(l_stealing_qty, 0) > 0)) AND (MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND

Line 17868: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before Allocated ATP Workflow');

17864: (nvl(l_stealing_qty, 0) > 0)) AND (MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND
17865: (l_wf_item_key IS NOT NULL) THEN
17866:
17867: IF PG_DEBUG in ('Y', 'C') THEN
17868: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before Allocated ATP Workflow');
17869: END IF;
17870: --bug 2463556: wrap workflow call with begin end so that if any exception
17871: ---occurs in workflow generation then ATP continues as normal
17872:

Line 17888: msc_sch_wb.atp_debug('Call_Schedule: ' || ' Allocated ATP WF notification generation failed');

17884: x_atp_table.Customer_Site_Id(k),x_atp_table.Order_Number(k));
17885: EXCEPTION
17886: WHEN OTHERS THEN
17887: IF PG_DEBUG in ('Y', 'C') THEN
17888: msc_sch_wb.atp_debug('Call_Schedule: ' || ' Allocated ATP WF notification generation failed');
17889: END IF;
17890: END;
17891:
17892: END IF;

Line 17899: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before ATP Override Workflow');

17895: (nvl(x_atp_table.Override_Flag(k), 'N') = 'Y')) AND
17896: (l_wf_item_key IS NOT NULL) THEN
17897:
17898: IF PG_DEBUG in ('Y', 'C') THEN
17899: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before ATP Override Workflow');
17900: END IF;
17901: --bug 2463556: wrap workflow call with begin end so that if any exception
17902: ---occurs in workflow generation then ATP continues as normal
17903:

Line 17919: msc_sch_wb.atp_debug('Call_Schedule: ' || 'ATP Override WF Notification Generation Failed');

17915: x_atp_table.Customer_Site_Id(k),x_atp_table.Order_Number(k), x_atp_table.Identifier(k));
17916: EXCEPTION
17917: WHEN OTHERS THEN
17918: IF PG_DEBUG in ('Y', 'C') THEN
17919: msc_sch_wb.atp_debug('Call_Schedule: ' || 'ATP Override WF Notification Generation Failed');
17920: END IF;
17921:
17922: END;
17923: END IF;

Line 17936: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before ATP Override Exception');

17932: -- bug 2795053-reopen (ssurendr): Generate exception only if set is successful
17933: AND (nvl(x_atp_table.Error_Code(k),-1) = 0)
17934: THEN
17935: IF PG_DEBUG in ('Y', 'C') THEN
17936: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before ATP Override Exception');
17937: END IF;
17938:
17939: -- 24x7
17940: if (NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'Y' ) then

Line 17951: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Using Instance ID : ' || l_instance_id);

17947: else
17948: l_instance_id := p_instance_id;
17949: end if;
17950: IF PG_DEBUG in ('Y', 'C') THEN
17951: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Using Instance ID : ' || l_instance_id);
17952: END IF;
17953: -- End 24x7
17954:
17955: If l_exception_rec.demand_id is null THEN

Line 17973: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Exception: No data found');

17969:
17970: EXCEPTION
17971: WHEN no_data_found THEN
17972: IF PG_DEBUG in ('Y', 'C') THEN
17973: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Exception: No data found');
17974: END IF;
17975: l_exception_rec.demand_id := NULL;
17976: WHEN others THEN
17977: IF PG_DEBUG in ('Y', 'C') THEN

Line 17978: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting demand_id for generating exception *****');

17974: END IF;
17975: l_exception_rec.demand_id := NULL;
17976: WHEN others THEN
17977: IF PG_DEBUG in ('Y', 'C') THEN
17978: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting demand_id for generating exception *****');
17979: END IF;
17980: l_exception_rec.demand_id := NULL;
17981: END;
17982:

Line 17984: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);

17980: l_exception_rec.demand_id := NULL;
17981: END;
17982:
17983: IF PG_DEBUG in ('Y', 'C') THEN
17984: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
17985: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
17986: END IF;
17987: END IF;
17988: IF (l_plan_id is not null) AND

Line 17985: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);

17981: END;
17982:
17983: IF PG_DEBUG in ('Y', 'C') THEN
17984: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
17985: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
17986: END IF;
17987: END IF;
17988: IF (l_plan_id is not null) AND
17989: (l_exception_rec.demand_id is not null) THEN

Line 17994: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin ATP Override Exception ***');

17990: -- bug 2795053-reopen (ssurendr): do not generate exception for non-ATPable items.
17991: -- In case of non-ATPable there will be no pegging record.
17992: -- generate exception only in case of PDS. In case of ODS ATP l_plan_id will be null
17993: IF PG_DEBUG in ('Y', 'C') THEN
17994: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin ATP Override Exception ***');
17995: END IF;
17996:
17997: l_exception_rec.exception_type := 68; -- Overcommitment of Sales Order
17998: l_exception_rec.quantity := -1 * x_atp_table.quantity_ordered(k);

Line 18014: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error occured while selecting inventory_item_id : ' || sqlerrm);

18010: and sr_inventory_item_id = NVL(x_atp_table.match_item_id(k), x_atp_table.inventory_item_id(k));
18011: EXCEPTION
18012: WHEN OTHERS THEN
18013: IF PG_DEBUG in ('Y', 'C') THEN
18014: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error occured while selecting inventory_item_id : ' || sqlerrm);
18015: END IF;
18016: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
18017: END;
18018:

Line 18020: msc_sch_wb.atp_debug('Call_Schedule: Inventory Item Id : ' || l_inventory_item_id);

18016: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
18017: END;
18018:
18019: IF PG_DEBUG in ('Y', 'C') THEN
18020: msc_sch_wb.atp_debug('Call_Schedule: Inventory Item Id : ' || l_inventory_item_id);
18021: END IF;
18022: l_exception_rec.exception_group := 5;
18023: l_exception_rec.plan_id := l_plan_id;
18024: l_exception_rec.organization_id := x_atp_table.source_organization_id(k);

Line 18038: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Return Status After adding exception : '||

18034: l_exception_rec.quantity_satisfied := x_atp_table.Requested_Date_Quantity(k);
18035:
18036: MSC_ATP_EXCEPTIONS.Add_ATP_Exception(p_session_id, l_exception_rec, l_exception_return_status);
18037: IF PG_DEBUG in ('Y', 'C') THEN
18038: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Return Status After adding exception : '||
18039: l_exception_return_status);
18040: END IF;
18041: END IF;
18042: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** End ATP Override Exception ***');

Line 18042: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** End ATP Override Exception ***');

18038: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Return Status After adding exception : '||
18039: l_exception_return_status);
18040: END IF;
18041: END IF;
18042: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** End ATP Override Exception ***');
18043: END IF;
18044: /* rajjain code specific to ATP Override Exception end*/
18045:
18046: k := x_atp_table.Calling_Module.Next(k);

Line 18052: msc_sch_wb.atp_debug('***** End Call_Schedule Procedure *****');

18048: END IF;
18049: /* rajjain 02/27/2003 Bug 2824700 End*/
18050:
18051: IF PG_DEBUG in ('Y', 'C') THEN
18052: msc_sch_wb.atp_debug('***** End Call_Schedule Procedure *****');
18053: END IF;
18054:
18055: END Call_Schedule;
18056:

Line 18117: msc_sch_wb.set_session_id(p_session_id);

18113: select ltrim(rtrim(substr(value, instr(value,',',-1,1)+1)))
18114: into x_session_loc_des
18115: from v$parameter where name= 'utl_file_dir';
18116: END IF;
18117: msc_sch_wb.set_session_id(p_session_id);
18118: --bug3940999 This code used to be down, moved it up
18119: IF order_sch_wb.mr_debug in ('T','C') THEN
18120: IF PG_DEBUG in ('Y', 'C') THEN
18121: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');

Line 18121: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');

18117: msc_sch_wb.set_session_id(p_session_id);
18118: --bug3940999 This code used to be down, moved it up
18119: IF order_sch_wb.mr_debug in ('T','C') THEN
18120: IF PG_DEBUG in ('Y', 'C') THEN
18121: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');
18122: END IF;
18123: C := DBMS_SQL.OPEN_CURSOR;
18124: -- STATEMENT := 'ALTER SESSION SET SQL_TRACE=TRUE';
18125: STATEMENT := 'ALTER SESSION SET events ' || '''' || '10046 trace name context forever, level 12' || '''' ;

Line 18144: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'spid: ' || l_spid);

18140: from v$parameter
18141: WHERE name = 'user_dump_dest'; --ATP Debug Workflow
18142:
18143: IF PG_DEBUG in ('Y', 'C') THEN
18144: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'spid: ' || l_spid);
18145: END IF;
18146:
18147: END IF;
18148:

Line 18150: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);

18146:
18147: END IF;
18148:
18149: IF PG_DEBUG in ('Y', 'C') THEN --bug3940999
18150: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
18151: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18152: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );

Line 18151: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');

18147: END IF;
18148:
18149: IF PG_DEBUG in ('Y', 'C') THEN --bug3940999
18150: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
18151: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18152: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
18155: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );

Line 18152: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );

18148:
18149: IF PG_DEBUG in ('Y', 'C') THEN --bug3940999
18150: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
18151: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18152: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
18155: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
18156: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );

Line 18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );

18149: IF PG_DEBUG in ('Y', 'C') THEN --bug3940999
18150: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
18151: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18152: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
18155: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
18156: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
18157: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );

Line 18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );

18150: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
18151: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18152: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
18155: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
18156: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
18157: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );
18158: END IF;

Line 18155: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );

18151: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18152: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
18155: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
18156: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
18157: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );
18158: END IF;
18159:

Line 18156: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );

18152: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
18155: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
18156: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
18157: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );
18158: END IF;
18159:
18160: --bug3520746 start

Line 18157: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );

18153: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
18154: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
18155: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
18156: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
18157: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );
18158: END IF;
18159:
18160: --bug3520746 start
18161: l_dblink := null;

Line 18174: msc_sch_wb.atp_debug('Did not get records in rac case');

18170: EXCEPTION
18171: WHEN OTHERS THEN
18172: l_dblink := null;
18173: IF PG_DEBUG in ('Y', 'C') THEN
18174: msc_sch_wb.atp_debug('Did not get records in rac case');
18175: END IF;
18176: END;
18177: ELSE --6697106
18178: ---bug 2301524: read summary flag

Line 18192: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');

18188: FROM msc_apps_instances
18189: WHERE instance_id = p_instance_id;
18190:
18191: IF PG_DEBUG in ('Y', 'C') THEN
18192: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
18193: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
18194: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
18195: END IF;
18196:

Line 18193: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);

18189: WHERE instance_id = p_instance_id;
18190:
18191: IF PG_DEBUG in ('Y', 'C') THEN
18192: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
18193: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
18194: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
18195: END IF;
18196:
18197: --bug3940999 start honor profile options passed from the source

Line 18194: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);

18190:
18191: IF PG_DEBUG in ('Y', 'C') THEN
18192: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
18193: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
18194: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
18195: END IF;
18196:
18197: --bug3940999 start honor profile options passed from the source
18198: -- We have passed atp debug mode profile seperately so that debug mode

Line 18214: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || l_profile_name(j) || ' : ' || l_profile_value(j));

18210:
18211: FOR j in 1..l_profile_name.count LOOP
18212:
18213: IF PG_DEBUG in ('Y', 'C') THEN
18214: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || l_profile_name(j) || ' : ' || l_profile_value(j));
18215: END IF;
18216:
18217: IF l_profile_name(j) = 'MSC_ALLOCATION_METHOD' THEN
18218:

Line 18256: msc_sch_wb.atp_debug('Call_Schedule_Remote: Inside Else No match Got');

18252:
18253: ELSE
18254:
18255: IF PG_DEBUG in ('Y', 'C') THEN
18256: msc_sch_wb.atp_debug('Call_Schedule_Remote: Inside Else No match Got');
18257: END IF;
18258: END IF;
18259:
18260: END LOOP;

Line 18269: msc_sch_wb.set_session_id(p_session_id);

18265: FND_PROFILE.put('MSC_ATP_DEBUG', p_atp_debug_flag);
18266: PG_DEBUG := p_atp_debug_flag;
18267: END IF;
18268:
18269: msc_sch_wb.set_session_id(p_session_id);
18270: IF PG_DEBUG in ('Y', 'C') THEN
18271: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
18272: END IF;
18273:

Line 18271: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);

18267: END IF;
18268:
18269: msc_sch_wb.set_session_id(p_session_id);
18270: IF PG_DEBUG in ('Y', 'C') THEN
18271: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
18272: END IF;
18273:
18274: -- Fixed as part of Fix for Bug 3444096, need to set profile value as it is queried again in msc_wf_alloc_atp.start_mscatp_wf
18275: IF p_atp_workflow IS NOT NULL THEN

Line 18284: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');

18280: -- Bug 2387242 : krajan
18281: -- Set Sql Trace.
18282: IF order_sch_wb.mr_debug in ('T','C') THEN
18283: IF PG_DEBUG in ('Y', 'C') THEN
18284: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');
18285: END IF;
18286: C := DBMS_SQL.OPEN_CURSOR;
18287: -- STATEMENT := 'ALTER SESSION SET SQL_TRACE=TRUE';
18288: STATEMENT := 'ALTER SESSION SET events ' || '''' || '10046 trace name context forever, level 12' || '''' ;

Line 18300: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'spid: ' || l_spid);

18296: FROM v$process
18297: WHERE addr = (SELECT paddr FROM v$session
18298: WHERE audsid=userenv('SESSIONID'));
18299: IF PG_DEBUG in ('Y', 'C') THEN
18300: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'spid: ' || l_spid);
18301: END IF;
18302:
18303: END IF;
18304:

Line 18312: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');

18308: MSC_ATP_PVT.G_SR_ASSIGN_SET := NVL(p_def_assign_set_id, 0);
18309: -- changes for bug 2368426 ends
18310:
18311: IF PG_DEBUG in ('Y', 'C') THEN
18312: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18313: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id);
18314: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_use_ship_rec : ' || p_use_ship_rec);
18315: END IF;
18316: --bug3520746 start

Line 18313: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id);

18309: -- changes for bug 2368426 ends
18310:
18311: IF PG_DEBUG in ('Y', 'C') THEN
18312: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18313: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id);
18314: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_use_ship_rec : ' || p_use_ship_rec);
18315: END IF;
18316: --bug3520746 start
18317: l_dblink := null;

Line 18314: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_use_ship_rec : ' || p_use_ship_rec);

18310:
18311: IF PG_DEBUG in ('Y', 'C') THEN
18312: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
18313: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id);
18314: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_use_ship_rec : ' || p_use_ship_rec);
18315: END IF;
18316: --bug3520746 start
18317: l_dblink := null;
18318: IF p_node_id is not null THEN

Line 18330: msc_sch_wb.atp_debug('Did not get records in rac case');

18326: EXCEPTION
18327: WHEN OTHERS THEN
18328: l_dblink := null;
18329: IF PG_DEBUG in ('Y', 'C') THEN
18330: msc_sch_wb.atp_debug('Did not get records in rac case');
18331: END IF;
18332: END;
18333: ELSE --6697106
18334: ---bug 2301524: read summary flag

Line 18347: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');

18343: INTO l_summary_flag, MSC_ATP_PVT.G_APPS_VER
18344: FROM msc_apps_instances
18345: WHERE instance_id = p_instance_id;
18346: IF PG_DEBUG in ('Y', 'C') THEN
18347: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
18348: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
18349: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
18350: END IF;
18351: */ --bug3940999 end

Line 18348: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);

18344: FROM msc_apps_instances
18345: WHERE instance_id = p_instance_id;
18346: IF PG_DEBUG in ('Y', 'C') THEN
18347: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
18348: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
18349: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
18350: END IF;
18351: */ --bug3940999 end
18352: MSC_ATP_PVT.G_SR_ASSIGN_SET := NVL(p_def_assign_set_id, 0);

Line 18349: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);

18345: WHERE instance_id = p_instance_id;
18346: IF PG_DEBUG in ('Y', 'C') THEN
18347: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
18348: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
18349: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
18350: END IF;
18351: */ --bug3940999 end
18352: MSC_ATP_PVT.G_SR_ASSIGN_SET := NVL(p_def_assign_set_id, 0);
18353: MSC_ATP_PVT.G_DATABASE_LINK := l_dblink;

Line 18373: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get_from_temp_table'||p_atp_table.action.count);

18369: x_msg_count,
18370: 2);
18371:
18372: IF PG_DEBUG in ('Y', 'C') THEN
18373: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get_from_temp_table'||p_atp_table.action.count);
18374: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'before Call_Schedule');
18375: END IF;
18376:
18377: --- 2301524: Summary mode is not supported for backlog workbench.

Line 18374: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'before Call_Schedule');

18370: 2);
18371:
18372: IF PG_DEBUG in ('Y', 'C') THEN
18373: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get_from_temp_table'||p_atp_table.action.count);
18374: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'before Call_Schedule');
18375: END IF;
18376:
18377: --- 2301524: Summary mode is not supported for backlog workbench.
18378: IF PG_DEBUG in ('Y', 'C') THEN

Line 18379: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

18375: END IF;
18376:
18377: --- 2301524: Summary mode is not supported for backlog workbench.
18378: IF PG_DEBUG in ('Y', 'C') THEN
18379: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
18380: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
18381: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'calling_module := '|| p_atp_table.calling_module(1));
18382: END IF;
18383: IF NVL(p_atp_table.calling_module(1), -99) = -1 and NVL(l_summary_flag, -1) <> 200 AND MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y'

Line 18380: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);

18376:
18377: --- 2301524: Summary mode is not supported for backlog workbench.
18378: IF PG_DEBUG in ('Y', 'C') THEN
18379: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
18380: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
18381: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'calling_module := '|| p_atp_table.calling_module(1));
18382: END IF;
18383: IF NVL(p_atp_table.calling_module(1), -99) = -1 and NVL(l_summary_flag, -1) <> 200 AND MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y'
18384: and MSC_ATP_PVT.G_ALLOCATED_ATP = 'N' AND MSC_ATP_PVT.G_INV_CTP = 5 THEN -- INV_CTP check added for summary enhancement

Line 18381: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'calling_module := '|| p_atp_table.calling_module(1));

18377: --- 2301524: Summary mode is not supported for backlog workbench.
18378: IF PG_DEBUG in ('Y', 'C') THEN
18379: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
18380: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
18381: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'calling_module := '|| p_atp_table.calling_module(1));
18382: END IF;
18383: IF NVL(p_atp_table.calling_module(1), -99) = -1 and NVL(l_summary_flag, -1) <> 200 AND MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y'
18384: and MSC_ATP_PVT.G_ALLOCATED_ATP = 'N' AND MSC_ATP_PVT.G_INV_CTP = 5 THEN -- INV_CTP check added for summary enhancement
18385: --- if backlog workbench is used then set the summary falg to 200 for ODS cases

Line 18387: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Site is using backlog workbench, update tables and turnoff ODS summary');

18383: IF NVL(p_atp_table.calling_module(1), -99) = -1 and NVL(l_summary_flag, -1) <> 200 AND MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y'
18384: and MSC_ATP_PVT.G_ALLOCATED_ATP = 'N' AND MSC_ATP_PVT.G_INV_CTP = 5 THEN -- INV_CTP check added for summary enhancement
18385: --- if backlog workbench is used then set the summary falg to 200 for ODS cases
18386: IF PG_DEBUG in ('Y', 'C') THEN
18387: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Site is using backlog workbench, update tables and turnoff ODS summary');
18388: END IF;
18389:
18390: update msc_apps_instances
18391: set summary_flag = 200;

Line 18397: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Site is using backlog workbench, turnoff ODS summary');

18393: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
18394: ELSIF l_summary_flag = 200 AND MSC_ATP_PVT.G_INV_CTP = 5 THEN -- INV_CTP check added for summary enhancement
18395: --site is using backlog workbench, turn off the summary flag for ODS cases;
18396: IF PG_DEBUG in ('Y', 'C') THEN
18397: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Site is using backlog workbench, turnoff ODS summary');
18398: END IF;
18399: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
18400: END IF;
18401:

Line 18409: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_USE_SHIP_REC_CAL doesnt match');

18405: IF l_use_ship_rec <> MSC_ATP_PVT.G_USE_SHIP_REC_CAL THEN --bug3593394
18406:
18407: --bug3593394
18408: IF PG_DEBUG in ('Y', 'C') THEN
18409: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_USE_SHIP_REC_CAL doesnt match');
18410: END IF;
18411: x_atp_table := p_atp_table;
18412: i := x_atp_table.action.FIRST;
18413: WHILE i IS NOT NULL LOOP

Line 18424: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'error_code(' || i || ') : ' || x_atp_table.error_code(i));

18420: -- Part of a set. Error code should be
18421: x_atp_table.error_code(i) := MSC_ATP_PVT.GROUPEL_ERROR;
18422: END IF;
18423: IF PG_DEBUG in ('Y', 'C') THEN
18424: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'error_code(' || i || ') : ' || x_atp_table.error_code(i));
18425: END IF;
18426: i := p_atp_table.Action.NEXT(i);
18427: END LOOP;
18428:

Line 18432: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Source INV_CTP not in sync with destination ');

18428:
18429: ELSIF MSC_ATP_PVT.G_INV_CTP_SOURCE <> MSC_ATP_PVT.G_INV_CTP THEN
18430:
18431: IF PG_DEBUG in ('Y', 'C') THEN
18432: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Source INV_CTP not in sync with destination ');
18433: END IF;
18434: x_atp_table := p_atp_table;
18435: i := x_atp_table.action.FIRST;
18436: WHILE i IS NOT NULL LOOP

Line 18447: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'error_code(' || i || ') : ' || x_atp_table.error_code(i));

18443: -- Part of a set. Error code should be
18444: x_atp_table.error_code(i) := MSC_ATP_PVT.GROUPEL_ERROR;
18445: END IF;
18446: IF PG_DEBUG in ('Y', 'C') THEN
18447: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'error_code(' || i || ') : ' || x_atp_table.error_code(i));
18448: END IF;
18449: i := p_atp_table.Action.NEXT(i);
18450: END LOOP;
18451:

Line 18468: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after Call_Schedule');

18464: x_atp_period,
18465: x_atp_details);
18466:
18467: IF PG_DEBUG in ('Y', 'C') THEN
18468: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after Call_Schedule');
18469: END IF;
18470:
18471: END IF;
18472:

Line 18486: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'here');

18482: x_msg_data,
18483: x_msg_count);
18484:
18485: IF PG_DEBUG in ('Y', 'C') THEN
18486: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'here');
18487: END IF;
18488: IF l_dblink IS NOT NULL THEN
18489: MSC_ATP_UTILS.Transfer_mrp_atp_details_temp(l_dblink, p_session_id);
18490: END IF;

Line 18496: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace disabled');

18492: -- Bug 2387242 : krajan
18493: -- Set Sql Trace.
18494: IF order_sch_wb.mr_debug in ('T','C') THEN
18495: IF PG_DEBUG in ('Y', 'C') THEN
18496: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace disabled');
18497: END IF;
18498: C := DBMS_SQL.OPEN_CURSOR;
18499: STATEMENT := 'ALTER SESSION SET SQL_TRACE=FALSE';
18500: DBMS_SQL.PARSE(C, STATEMENT, DBMS_SQL.NATIVE);

Line 18506: msc_sch_wb.atp_debug('***** End Call_Schedule_Remote Procedure *****');

18502: DBMS_SQL.CLOSE_CURSOR(C);
18503: END IF;
18504:
18505: IF PG_DEBUG in ('Y', 'C') THEN
18506: msc_sch_wb.atp_debug('***** End Call_Schedule_Remote Procedure *****');
18507: END IF;
18508:
18509: END Call_Schedule_Remote;
18510: PROCEDURE Process_Time_Stamp_Errors (l_atp_table IN OUT NOCOPY MRP_ATP_PUB.ATP_Rec_Typ,

Line 18516: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');

18512: IS
18513: BEGIN
18514:
18515: IF PG_DEBUG in ('Y', 'C') THEN
18516: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
18517: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18518: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18519: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
18520: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);

Line 18517: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

18513: BEGIN
18514:
18515: IF PG_DEBUG in ('Y', 'C') THEN
18516: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
18517: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18518: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18519: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
18520: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);
18521: END IF;

Line 18518: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

18514:
18515: IF PG_DEBUG in ('Y', 'C') THEN
18516: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
18517: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18518: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18519: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
18520: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);
18521: END IF;
18522: IF MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP = 'Y' and MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET = 'N' THEN

Line 18519: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);

18515: IF PG_DEBUG in ('Y', 'C') THEN
18516: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
18517: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18518: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18519: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
18520: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);
18521: END IF;
18522: IF MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP = 'Y' and MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET = 'N' THEN
18523: IF l_atp_table.requested_ship_date(i) is not null then

Line 18520: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);

18516: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
18517: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18518: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18519: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
18520: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);
18521: END IF;
18522: IF MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP = 'Y' and MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET = 'N' THEN
18523: IF l_atp_table.requested_ship_date(i) is not null then
18524: l_atp_table.ship_date(i) := l_atp_table.ship_date(i) +

Line 18554: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

18550: NVL(l_atp_table.ship_date(i), MSC_ATP_PROC.G_latest_ship_date_set));
18551: MSC_ATP_PROC.G_latest_arr_date_set := GREATEST(NVL(MSC_ATP_PROC.G_latest_arr_date_set, l_atp_table.arrival_date(i)),
18552: NVL(l_atp_table.arrival_date(i), MSC_ATP_PROC.G_latest_arr_date_set));
18553: IF PG_DEBUG in ('Y', 'C') THEN
18554: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18555: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18556: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18557: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');
18558: END IF;

Line 18555: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));

18551: MSC_ATP_PROC.G_latest_arr_date_set := GREATEST(NVL(MSC_ATP_PROC.G_latest_arr_date_set, l_atp_table.arrival_date(i)),
18552: NVL(l_atp_table.arrival_date(i), MSC_ATP_PROC.G_latest_arr_date_set));
18553: IF PG_DEBUG in ('Y', 'C') THEN
18554: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18555: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18556: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18557: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');
18558: END IF;
18559: END Process_Time_Stamp_Errors;

Line 18556: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

18552: NVL(l_atp_table.arrival_date(i), MSC_ATP_PROC.G_latest_arr_date_set));
18553: IF PG_DEBUG in ('Y', 'C') THEN
18554: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18555: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18556: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18557: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');
18558: END IF;
18559: END Process_Time_Stamp_Errors;
18560: -- Comment

Line 18557: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');

18553: IF PG_DEBUG in ('Y', 'C') THEN
18554: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18555: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18556: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
18557: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');
18558: END IF;
18559: END Process_Time_Stamp_Errors;
18560: -- Comment
18561: END MSC_ATP_PVT;