DBA Data[Home] [Help]

APPS.MSC_ATP_PVT dependencies on MSC_SCH_WB

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

337: l_org_collected NUMBER; --13032665
338: BEGIN
339:
340: IF PG_DEBUG in ('Y', 'C') THEN
341: msc_sch_wb.atp_debug('**********IN Schedule Procedure************');
342: END IF;
343: --initialize ATP_SET_FLAG TO NO --4460369
344: MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := 'N';
345: -- initialize API return status to success

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

346: x_return_status := FND_API.G_RET_STS_SUCCESS;
347:
348: MSC_ATP_PVT.G_RES_CONSUME := NVL(FND_PROFILE.value('MSC_ATP_RES_CONSUME'), 'Y');
349: IF PG_DEBUG in ('Y', 'C') THEN
350: msc_sch_wb.atp_debug('Schedule: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);
351: END IF;
352:
353: MSC_ATP_PVT.G_PARTNER_ID := NULL;
354: MSC_ATP_PVT.G_PARTNER_SITE_ID := NULL;

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

360: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
361: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
362: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
363: IF PG_DEBUG in ('Y', 'C') THEN
364: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 15');
365: END IF;
366:
367: END IF;
368:

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

372: l_DEMAND_CLASS_ATP_FLAG.DELETE;
373: l_REQ_ATP_DATE.DELETE;
374: l_REQ_DATE_QTY.DELETE;
375: IF PG_DEBUG in ('Y', 'C') THEN
376: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 15.0');
377: END IF;
378: END IF;
379:
380: --- BUG: 1777496

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

397:
398: l_plan_id := -1;
399:
400: IF PG_DEBUG in ('Y', 'C') THEN
401: msc_sch_wb.atp_debug('Schedule: ' || 'count :='|| p_atp_table.attribute_02.count);
402: END IF;
403: ---diag_atp: Enable diagnostic ATP only if calling module tells us to do so and for ATP inquiry only
404: ---Also Diag ATP is supported for PDS.
405: IF ((p_atp_table.Action(1) = ATPQUERY) AND (NVL(p_atp_table.attribute_02(1), 2) = 1)

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

412: MSC_ATP_PVT.G_DIAGNOSTIC_ATP := 2;
413:
414: END IF;
415: IF PG_DEBUG in ('Y', 'C') THEN
416: msc_sch_wb.atp_debug('Schedule: ' || 'G_DIAGNOSTIC_ATP := ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);
417: END IF;
418:
419: /************ Bug 2085071 Assignment set changes ************/
420: IF NVL(p_atp_table.Calling_Module(1), -1) = 724 THEN

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

418:
419: /************ Bug 2085071 Assignment set changes ************/
420: IF NVL(p_atp_table.Calling_Module(1), -1) = 724 THEN
421: IF PG_DEBUG in ('Y', 'C') THEN
422: msc_sch_wb.atp_debug('Schedule: ' || '724');
423: END IF;
424: lv_assign_set_id := p_assign_set_id; -- Use new local variable
425: ELSE
426: -- convert the assignment set id from mrp to msc

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

424: lv_assign_set_id := p_assign_set_id; -- Use new local variable
425: ELSE
426: -- convert the assignment set id from mrp to msc
427: IF PG_DEBUG in ('Y', 'C') THEN
428: msc_sch_wb.atp_debug('Schedule: ' || ' not 724');
429: END IF;
430:
431: -- Need to conver assignment set only if it is NOT NULL. If NULL, do nothing.
432: IF p_assign_set_id IS NOT NULL THEN

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

431: -- Need to conver assignment set only if it is NOT NULL. If NULL, do nothing.
432: IF p_assign_set_id IS NOT NULL THEN
433:
434: IF PG_DEBUG in ('Y', 'C') THEN
435: msc_sch_wb.atp_debug('Schedule: p_atp_table.calling_module: ' || p_atp_table.calling_module(1));
436: msc_sch_wb.atp_debug('Schedule: p_atp_table.action: ' || p_atp_table.action(1));
437: END IF;
438:
439: --4567833 , in case of ATP inquiry from source with Org_id as NULL,

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

432: IF p_assign_set_id IS NOT NULL THEN
433:
434: IF PG_DEBUG in ('Y', 'C') THEN
435: msc_sch_wb.atp_debug('Schedule: p_atp_table.calling_module: ' || p_atp_table.calling_module(1));
436: msc_sch_wb.atp_debug('Schedule: p_atp_table.action: ' || p_atp_table.action(1));
437: END IF;
438:
439: --4567833 , in case of ATP inquiry from source with Org_id as NULL,
440: -- ATP UI is passing assignment set id of destination so no need to convert it.

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

442:
443: lv_assign_set_id := p_assign_set_id;
444:
445: IF PG_DEBUG in ('Y', 'C') THEN
446: msc_sch_wb.atp_debug('Schedule: ' || 'source side ATP inquiry with Org_id as NULL');
447: END IF;
448:
449: ELSE --4567833 end*/
450: -- Commented the code changes made in bug4567833 for the bug 12711659

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

455: where sr_instance_id = p_instance_id
456: and sr_assignment_set_id = p_assign_set_id;
457:
458: IF PG_DEBUG in ('Y', 'C') THEN
459: msc_sch_wb.atp_debug('Schedule: ' || 'source side ATP inquiry with Org_id as not NULL');
460: msc_sch_wb.atp_debug('Schedule: ' || 'lv_assign_set_id value converted = ' || lv_assign_set_id);
461: END IF;
462:
463: exception

Line 460: msc_sch_wb.atp_debug('Schedule: ' || 'lv_assign_set_id value converted = ' || lv_assign_set_id);

456: and sr_assignment_set_id = p_assign_set_id;
457:
458: IF PG_DEBUG in ('Y', 'C') THEN
459: msc_sch_wb.atp_debug('Schedule: ' || 'source side ATP inquiry with Org_id as not NULL');
460: msc_sch_wb.atp_debug('Schedule: ' || 'lv_assign_set_id value converted = ' || lv_assign_set_id);
461: END IF;
462:
463: exception
464: when no_data_found then

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

485: lv_assign_set_id := FND_PROFILE.value('MSC_ATP_ASSIGN_SET');
486: END IF;
487:
488: IF PG_DEBUG in ('Y', 'C') THEN
489: msc_sch_wb.atp_debug('Schedule: ' || 'after converting the assign set id');
490: END IF;
491: END IF;
492: l_assign_set_id := lv_assign_set_id; -- Set the original local variable
493: /************ Bug 2085071 Assignment set changes ************/

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

492: l_assign_set_id := lv_assign_set_id; -- Set the original local variable
493: /************ Bug 2085071 Assignment set changes ************/
494:
495: IF PG_DEBUG in ('Y', 'C') THEN
496: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
497: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id = '||l_plan_id);
498: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
499: END IF;
500:

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

493: /************ Bug 2085071 Assignment set changes ************/
494:
495: IF PG_DEBUG in ('Y', 'C') THEN
496: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
497: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id = '||l_plan_id);
498: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
499: END IF;
500:
501: IF p_atp_table.Ship_Set_Name(1) IS NOT NULL THEN

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

494:
495: IF PG_DEBUG in ('Y', 'C') THEN
496: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
497: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id = '||l_plan_id);
498: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
499: END IF;
500:
501: IF p_atp_table.Ship_Set_Name(1) IS NOT NULL THEN
502: l_ship_count := p_atp_table.Action.COUNT;

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

518: /* Modularize Item and Org Info */
519:
520: l_stmt := 20;
521: IF PG_DEBUG in ('Y', 'C') THEN
522: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
523:
524: -- make sure we get the right record of tables
525: i := p_atp_table.Action.FIRST;
526: WHILE i IS NOT NULL LOOP

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

523:
524: -- make sure we get the right record of tables
525: i := p_atp_table.Action.FIRST;
526: WHILE i IS NOT NULL LOOP
527: msc_sch_wb.atp_debug('Schedule: ' || 'Inventory_Item_Id:' || to_char(p_atp_table.Inventory_Item_Id(i))
528: || 'Source_Organization_Id:' || to_char(p_atp_table.Source_Organization_Id(i))
529: || 'Quantity_Ordered:' || to_char(p_atp_table.Quantity_Ordered(i))
530: || ' old_source organzation id : ' || p_atp_table.old_Source_Organization_Id(i));
531: i := p_atp_table.Action.NEXT(i);

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

538: -- we won't do any validation here due to ato impacts.
539:
540: l_stmt := 30;
541: IF PG_DEBUG in ('Y', 'C') THEN
542: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
543: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
544: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
545: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
546: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||

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

539:
540: l_stmt := 30;
541: IF PG_DEBUG in ('Y', 'C') THEN
542: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
543: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
544: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
545: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
546: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||
547: MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);

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

540: l_stmt := 30;
541: IF PG_DEBUG in ('Y', 'C') THEN
542: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
543: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
544: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
545: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
546: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||
547: MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
548: END IF;

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

541: IF PG_DEBUG in ('Y', 'C') THEN
542: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
543: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
544: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
545: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
546: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||
547: MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
548: END IF;
549: IF ((MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND (MSC_ATP_PVT.G_DATABASE_LINK IS NULL) AND

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

542: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
543: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
544: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
545: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
546: msc_sch_wb.atp_debug('Schedule: ' || 'G_HP_DEMAND_BUCKETING_PREF := ' ||
547: MSC_ATP_PVT.G_HP_DEMAND_BUCKETING_PREF);
548: END IF;
549: IF ((MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND (MSC_ATP_PVT.G_DATABASE_LINK IS NULL) AND
550: (MSC_ATP_PVT.G_ALLOCATED_ATP = 'N')) THEN

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

559:
560: ---bug 2301524:
561: --- 2301524: Summary mode is not supported for backlog workbench.
562: IF PG_DEBUG in ('Y', 'C') THEN
563: msc_sch_wb.atp_debug('Schedule: ' || 'calling_module := ' || p_atp_table.calling_module(1));
564: msc_sch_wb.atp_debug('Schedule: ' || ' l_summary_flag := ' || l_summary_flag);
565: msc_sch_wb.atp_debug('Schedule: ' || ' G_DATABASE_LINK := ' || NVL(MSC_ATP_PVT.G_DATABASE_LINK,'NULL'));
566: END IF;
567:

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

560: ---bug 2301524:
561: --- 2301524: Summary mode is not supported for backlog workbench.
562: IF PG_DEBUG in ('Y', 'C') THEN
563: msc_sch_wb.atp_debug('Schedule: ' || 'calling_module := ' || p_atp_table.calling_module(1));
564: msc_sch_wb.atp_debug('Schedule: ' || ' l_summary_flag := ' || l_summary_flag);
565: msc_sch_wb.atp_debug('Schedule: ' || ' G_DATABASE_LINK := ' || NVL(MSC_ATP_PVT.G_DATABASE_LINK,'NULL'));
566: END IF;
567:
568: -- After summary enhancement summary ATP is supported for BWB as well - except for ODS case

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

561: --- 2301524: Summary mode is not supported for backlog workbench.
562: IF PG_DEBUG in ('Y', 'C') THEN
563: msc_sch_wb.atp_debug('Schedule: ' || 'calling_module := ' || p_atp_table.calling_module(1));
564: msc_sch_wb.atp_debug('Schedule: ' || ' l_summary_flag := ' || l_summary_flag);
565: msc_sch_wb.atp_debug('Schedule: ' || ' G_DATABASE_LINK := ' || NVL(MSC_ATP_PVT.G_DATABASE_LINK,'NULL'));
566: END IF;
567:
568: -- After summary enhancement summary ATP is supported for BWB as well - except for ODS case
569: 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 572: msc_sch_wb.atp_debug('Schedule: ' || 'Site is using backlog workbench, update tables and turnoff summary for ODS case');

568: -- After summary enhancement summary ATP is supported for BWB as well - except for ODS case
569: 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
570: --- if backlog workbench is used then set the summary falg to 200
571: IF PG_DEBUG in ('Y', 'C') THEN
572: msc_sch_wb.atp_debug('Schedule: ' || 'Site is using backlog workbench, update tables and turnoff summary for ODS case');
573: END IF;
574:
575: update msc_apps_instances
576: set summary_flag = 200;

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

578: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
579: ELSIF NVL(l_summary_flag, -1) = 200 AND MSC_ATP_PVT.G_INV_CTP = 5 THEN
580: --site is using backlog workbench, turn off the summary flag - only for ODS case - summary enhancement
581: IF PG_DEBUG in ('Y', 'C') THEN
582: msc_sch_wb.atp_debug('Schedule: ' || 'Site is using backlog workbench, turnoff summary');
583: END IF;
584: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
585: END IF;
586:

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

589: ---- After summary enhancement summary will be supported for distributed cases as well - except for ODS case
590: IF MSC_ATP_PVT.G_DATABASE_LINK IS NOT NULL AND MSC_ATP_PVT.G_INV_CTP = 5 THEN
591: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
592: IF PG_DEBUG in ('Y', 'C') THEN
593: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed scenario + ODS, turning summary flag off');
594: END IF;
595: END IF;
596: -- specify l_atp_table here so that for undemand we have a
597: -- place to store the error code.

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

606:
607: IF MSC_ATP_PVT.G_INV_CTP_SOURCE <> MSC_ATP_PVT.G_INV_CTP THEN
608:
609: IF PG_DEBUG in ('Y', 'C') THEN
610: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP ' || MSC_ATP_PVT.G_INV_CTP_SOURCE);
611: msc_sch_wb.atp_debug('Schedule: ' || 'Destination INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
612: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP not in sync with destination ');
613: END IF;
614: -- apply the error code in l_atp_table

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

607: IF MSC_ATP_PVT.G_INV_CTP_SOURCE <> MSC_ATP_PVT.G_INV_CTP THEN
608:
609: IF PG_DEBUG in ('Y', 'C') THEN
610: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP ' || MSC_ATP_PVT.G_INV_CTP_SOURCE);
611: msc_sch_wb.atp_debug('Schedule: ' || 'Destination INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
612: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP not in sync with destination ');
613: END IF;
614: -- apply the error code in l_atp_table
615:

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

608:
609: IF PG_DEBUG in ('Y', 'C') THEN
610: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP ' || MSC_ATP_PVT.G_INV_CTP_SOURCE);
611: msc_sch_wb.atp_debug('Schedule: ' || 'Destination INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
612: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP not in sync with destination ');
613: END IF;
614: -- apply the error code in l_atp_table
615:
616: FOR l_counter IN 1..l_atp_table.error_code.COUNT LOOP

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

623: RAISE NO_DATA_FOUND;
624:
625: ELSE
626: IF PG_DEBUG in ('Y', 'C') THEN
627: msc_sch_wb.atp_debug('Schedule: ' || 'Source INV_CTP is in sync with destination ');
628: END IF;
629: END IF;
630:
631: END IF;

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

653:
654: For m in 1..p_atp_table.action.count LOOP
655: IF p_atp_table.ato_model_line_id(m) IS NOT NULL THEN
656: IF PG_DEBUG in ('Y', 'C') THEN
657: msc_sch_wb.atp_debug('Schedule: p_atp_table.Identifier(m)' ||
658: p_atp_table.Identifier(m));
659: msc_sch_wb.atp_debug('Schedule: ' ||
660: 'p_atp_table.Config_item_line_id(m)' ||
661: p_atp_table.Config_item_line_id(m));

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

655: IF p_atp_table.ato_model_line_id(m) IS NOT NULL THEN
656: IF PG_DEBUG in ('Y', 'C') THEN
657: msc_sch_wb.atp_debug('Schedule: p_atp_table.Identifier(m)' ||
658: p_atp_table.Identifier(m));
659: msc_sch_wb.atp_debug('Schedule: ' ||
660: 'p_atp_table.Config_item_line_id(m)' ||
661: p_atp_table.Config_item_line_id(m));
662: END IF;
663: END IF;

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

667: p_atp_table.inventory_item_id(m),
668: p_atp_table.old_source_organization_id(m));
669: --l_old_org_id(m) := l_atp_table.old_source_organization_id(m);
670: IF PG_DEBUG in ('Y', 'C') THEN
671: msc_sch_wb.atp_debug('Schedule: ' || 'Inventory item_id := ' || l_atp_table.inventory_item_id(m));
672: msc_sch_wb.atp_debug('Schedule: ' || 'PF item id := ' || l_pf_item_id(m));
673: END IF;
674: END IF;
675: END LOOP;

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

668: p_atp_table.old_source_organization_id(m));
669: --l_old_org_id(m) := l_atp_table.old_source_organization_id(m);
670: IF PG_DEBUG in ('Y', 'C') THEN
671: msc_sch_wb.atp_debug('Schedule: ' || 'Inventory item_id := ' || l_atp_table.inventory_item_id(m));
672: msc_sch_wb.atp_debug('Schedule: ' || 'PF item id := ' || l_pf_item_id(m));
673: END IF;
674: END IF;
675: END LOOP;
676: END IF;

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

695: l_delete_atp_rec,
696: l_return_status);
697:
698: IF PG_DEBUG in ('Y', 'C') THEN --3720018
699: msc_sch_wb.atp_debug('Schedule: l_return_status: ' || l_return_status);
700: END IF;
701:
702: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
703: IF PG_DEBUG in ('Y', 'C') THEN

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

700: END IF;
701:
702: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
703: IF PG_DEBUG in ('Y', 'C') THEN
704: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');
705: END IF;
706: x_return_status := FND_API.G_RET_STS_ERROR;
707: RAISE FND_API.G_EXC_ERROR;
708: END IF;

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

713: RAISE NO_DATA_FOUND;
714: END IF;
715: END IF;
716: IF PG_DEBUG in ('Y', 'C') THEN --3720018
717: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);
718: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);
719: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);
720: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);
721: END IF;

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

714: END IF;
715: END IF;
716: IF PG_DEBUG in ('Y', 'C') THEN --3720018
717: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);
718: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);
719: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);
720: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);
721: END IF;
722:

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

715: END IF;
716: IF PG_DEBUG in ('Y', 'C') THEN --3720018
717: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);
718: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);
719: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);
720: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);
721: END IF;
722:
723: --3720018, error_code, attribute_07(plan_name) and old_plan_id are populated back to local variables.

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

716: IF PG_DEBUG in ('Y', 'C') THEN --3720018
717: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_demand_instance_id.count ' || l_delete_atp_rec.off_demand_instance_id.count);
718: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_supply_instance_id.count ' || l_delete_atp_rec.off_supply_instance_id.count);
719: msc_sch_wb.atp_debug('Schedule:l_delete_atp_rec.off_res_instance_id.count ' || l_delete_atp_rec.off_res_instance_id.count);
720: msc_sch_wb.atp_debug('Schedule: ' || 'l_old_plan_id.count = '||l_old_plan_id.count);
721: END IF;
722:
723: --3720018, error_code, attribute_07(plan_name) and old_plan_id are populated back to local variables.
724: l_atp_table.error_code := l_delete_atp_rec.error_code; --3720018

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

727:
728:
729: l_stmt := 40;
730: IF PG_DEBUG in ('Y', 'C') THEN
731: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
732: END IF;
733:
734: -- bug 1382994: if action is demand, quantity should not be 0.
735: -- otherwise we also treat it as undemand.

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

750: -- will explain later.
751:
752: l_stmt := 50;
753: IF PG_DEBUG in ('Y', 'C') THEN
754: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
755: END IF;
756:
757: -- cchen: disable complete scatp for now
758: -- l_complete_scatp := NVL(FND_PROFILE.value('MRP_COMPLETE_SCATP'), 'N');

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

756:
757: -- cchen: disable complete scatp for now
758: -- l_complete_scatp := NVL(FND_PROFILE.value('MRP_COMPLETE_SCATP'), 'N');
759: -- l_complete_scatp := 'Y';
760: -- msc_sch_wb.atp_debug('l_complete_scatp = '||l_complete_scatp);
761:
762: -- we may need to loop through every supply source until we succeed
763: -- if action is atp, depending on profile option mrp_complete_scatp
764: -- we do things differently:

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

776: k := 1;
777:
778: l_stmt := 60;
779: IF PG_DEBUG in ('Y', 'C') THEN
780: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
781: END IF;
782:
783: IF ((p_atp_table.action(k) <> ATPQUERY) OR
784: (p_atp_table.action(k) = ATPQUERY AND l_complete_scatp = 'N')) THEN

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

791:
792: -- loop through the items in the arrival set.
793: l_stmt := 70;
794: IF PG_DEBUG in ('Y', 'C') THEN
795: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
796: END IF;
797:
798:
799: -- 1873918: PDS-ODS fix

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

804: l_allocated_atp := MSC_ATP_PVT.G_ALLOCATED_ATP;
805: l_allocation_method := NVL(MSC_ATP_PVT.G_ALLOCATION_METHOD, 2);
806: --5221865 If ODS ATP then set initial value as No else read whatever is set.
807: IF PG_DEBUG in ('Y', 'C') THEN
808: msc_sch_wb.atp_debug('Schedule: G_INV_CTP = '||G_INV_CTP);
809: msc_sch_wb.atp_debug('Schedule: G_FORWARD_ATP = '||G_FORWARD_ATP);
810: END IF;
811: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
812: l_forward_atp := MSC_ATP_PVT.G_FORWARD_ATP;

Line 809: msc_sch_wb.atp_debug('Schedule: G_FORWARD_ATP = '||G_FORWARD_ATP);

805: l_allocation_method := NVL(MSC_ATP_PVT.G_ALLOCATION_METHOD, 2);
806: --5221865 If ODS ATP then set initial value as No else read whatever is set.
807: IF PG_DEBUG in ('Y', 'C') THEN
808: msc_sch_wb.atp_debug('Schedule: G_INV_CTP = '||G_INV_CTP);
809: msc_sch_wb.atp_debug('Schedule: G_FORWARD_ATP = '||G_FORWARD_ATP);
810: END IF;
811: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN
812: l_forward_atp := MSC_ATP_PVT.G_FORWARD_ATP;
813: ELSE

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

815: END IF;
816:
817: -- savirine, Sep 05, 2001: call get_regions to get regions info which will be used for ATP request.
818:
819: msc_sch_wb.atp_debug('p_atp_table.delivery_lead_time: ' || p_atp_table.delivery_lead_time(1));
820:
821: IF (p_atp_table.Source_Organization_id(1) IS NULL or p_atp_table.ship_method(1) IS NULL or
822: p_atp_table.delivery_lead_time(1) IS NULL) and (p_atp_table.Calling_Module(1) = 724)
823: and (NVL(p_atp_table.Customer_Site_Id(1), -1) <> NVL(G_SR_PARTNER_SITE_ID, -1)) THEN

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

841: G_SR_PARTY_SITE_ID := p_atp_table.party_site_id(1);
842: G_SR_CUSTOMER_COUNTRY := p_atp_table.customer_country(1);
843:
844: IF PG_DEBUG in ('Y', 'C') THEN
845: msc_sch_wb.atp_debug('Schedule: ' || 'Get_Regions, return status : ' || l_return_status);
846: END IF;
847:
848: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
849: -- something wrong so we want to rollback;

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

847:
848: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
849: -- something wrong so we want to rollback;
850: IF PG_DEBUG in ('Y', 'C') THEN
851: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');
852: END IF;
853: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
854: IF PG_DEBUG in ('Y', 'C') THEN
855: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');

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

851: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');
852: END IF;
853: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
854: IF PG_DEBUG in ('Y', 'C') THEN
855: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');
856: END IF;
857: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
858: END IF;
859:

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

867: -- default the plan_id to -1 and adjust it later.
868:
869: -- 1873918: PDS-ODS fix
870: IF PG_DEBUG in ('Y', 'C') THEN
871: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
872: END IF;
873: MSC_ATP_PVT.G_INV_CTP := l_inv_ctp;
874: -- ATP4drp re-set using original profile value.
875: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

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

879: MSC_ATP_PVT.G_FORWARD_ATP := l_forward_atp;
880: l_plan_id := -1;
881: IF NVL(p_atp_table.Calling_Module(1), -1) = 724 THEN
882: IF PG_DEBUG in ('Y', 'C') THEN
883: msc_sch_wb.atp_debug('Schedule: ' || '724');
884: END IF;
885: l_assign_set_id := p_assign_set_id;
886: ELSE
887: -- convert the assignment set id from mrp to msc

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

885: l_assign_set_id := p_assign_set_id;
886: ELSE
887: -- convert the assignment set id from mrp to msc
888: IF PG_DEBUG in ('Y', 'C') THEN
889: msc_sch_wb.atp_debug('Schedule: ' || ' not 724');
890: END IF;
891: /************ Bug 2085071 Assignment set changes ************/
892: /* Remove duplicate query
893: //begin

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

903: //end;
904: */
905: l_assign_set_id := lv_assign_set_id; -- Use new variable instead
906: IF PG_DEBUG in ('Y', 'C') THEN
907: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
908: END IF;
909: /************ Bug 2085071 Assignment set changes ************/
910: IF PG_DEBUG in ('Y', 'C') THEN
911: msc_sch_wb.atp_debug('Schedule: ' || 'after converting the assign set id');

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

907: msc_sch_wb.atp_debug('Schedule: ' || 'l_assign_set_id = '||l_assign_set_id);
908: END IF;
909: /************ Bug 2085071 Assignment set changes ************/
910: IF PG_DEBUG in ('Y', 'C') THEN
911: msc_sch_wb.atp_debug('Schedule: ' || 'after converting the assign set id');
912: END IF;
913:
914: END IF;
915:

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

919: l_process_org_id := p_atp_table.Source_Organization_Id(k);
920: l_request_org_id := p_atp_table.organization_id(k);
921:
922: IF PG_DEBUG in ('Y', 'C') THEN
923: msc_sch_wb.atp_debug('Schedule: ' || 'requesting org id := ' || l_request_org_id);
924: END IF;
925: -- for bug 1052654
926: -- l_atp_table := p_atp_table;
927:

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

941:
942: IF l_arrival_count > 1 THEN
943: l_stmt := 150;
944: IF PG_DEBUG in ('Y', 'C') THEN
945: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
946: END IF;
947:
948: -- arrival set exists
949: l_atp_table := x_atp_table; -- this is to null out l_atp_table;

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

952: l_atp_table, l_return_status );
953: ELSE
954: l_stmt := 160;
955: IF PG_DEBUG in ('Y', 'C') THEN
956: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
957: END IF;
958:
959: l_atp_table := p_atp_table;
960:

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

975: FROM msc_apps_instances
976: WHERE instance_id = p_instance_id;
977:
978: IF PG_DEBUG in ('Y', 'C') THEN
979: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
980: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = ' || l_summary_flag);
981: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_APPS_VER = ' || MSC_ATP_PVT.G_APPS_VER);
982: END IF; -- 2300767
983:

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

976: WHERE instance_id = p_instance_id;
977:
978: IF PG_DEBUG in ('Y', 'C') THEN
979: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
980: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = ' || l_summary_flag);
981: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_APPS_VER = ' || MSC_ATP_PVT.G_APPS_VER);
982: END IF; -- 2300767
983:
984:

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

977:
978: IF PG_DEBUG in ('Y', 'C') THEN
979: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
980: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = ' || l_summary_flag);
981: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_APPS_VER = ' || MSC_ATP_PVT.G_APPS_VER);
982: END IF; -- 2300767
983:
984:
985: IF NVL(l_so_tbl_status, 1) = 2 THEN

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

984:
985: IF NVL(l_so_tbl_status, 1) = 2 THEN
986: -- not available for atp
987: IF PG_DEBUG in ('Y', 'C') THEN
988: msc_sch_wb.atp_debug('Schedule: ' || 'ATP not available');
989: END IF;
990:
991: l_atp_table.error_code(1) := TRY_ATP_LATER;
992: RAISE NO_DATA_FOUND;

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

993:
994: ELSIF l_summary_flag = 1 THEN
995: ---- summary table is not ready. Switch to detail tables
996: IF PG_DEBUG in ('Y', 'C') THEN
997: msc_sch_wb.atp_debug('Schedule: ' || ' summary table is not ready. Switch to detail tables');
998: END IF;
999: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
1000:
1001: ELSIF l_summary_flag = 2 THEN

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

1000:
1001: ELSIF l_summary_flag = 2 THEN
1002:
1003: IF PG_DEBUG in ('Y', 'C') THEN
1004: msc_sch_wb.atp_debug('Schedule: ' || 'Summary Concurrent program is running');
1005: END IF;
1006: l_atp_table.error_code(1) := SUMM_CONC_PROG_RUNNING;
1007: RAISE NO_DATA_FOUND;
1008: END IF;

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

1013: -- if specified, use it. otherwise, get it from sourcing rules
1014:
1015: l_stmt := 80;
1016: IF PG_DEBUG in ('Y', 'C') THEN
1017: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1018: END IF;
1019:
1020:
1021: IF p_atp_table.Source_Organization_Id(k) is null THEN

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

1034: -- if this is actually an ship set, then get the common
1035: -- warehouses for the whole ship set instead of this item.
1036:
1037: IF PG_DEBUG in ('Y', 'C') THEN
1038: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1039: msc_sch_wb.atp_debug('Schedule: ' || 'Before Atp_Sources');
1040: END IF;
1041:
1042: l_item_sourcing_info_rec.sr_inventory_item_id := l_atp_table.inventory_item_id;

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

1035: -- warehouses for the whole ship set instead of this item.
1036:
1037: IF PG_DEBUG in ('Y', 'C') THEN
1038: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1039: msc_sch_wb.atp_debug('Schedule: ' || 'Before Atp_Sources');
1040: END IF;
1041:
1042: l_item_sourcing_info_rec.sr_inventory_item_id := l_atp_table.inventory_item_id;
1043: l_item_sourcing_info_rec.line_id := l_atp_table.identifier;

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

1056: IF l_ship_count > 1 THEN
1057:
1058: l_stmt := 100;
1059: IF PG_DEBUG in ('Y', 'C') THEN
1060: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1061: END IF;
1062:
1063:
1064: MSC_ATP_PROC.Atp_Sources(p_instance_id,

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

1080: ELSE
1081:
1082: l_stmt := 110;
1083: IF PG_DEBUG in ('Y', 'C') THEN
1084: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1085: END IF;
1086:
1087: MSC_ATP_PROC.Atp_Sources(p_instance_id,
1088: l_plan_id,

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

1103: END IF;
1104:
1105: l_stmt := 120;
1106: IF PG_DEBUG in ('Y', 'C') THEN
1107: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1108: msc_sch_wb.atp_debug('Schedule: ' || 'After Atp_Sources');
1109: msc_sch_wb.atp_debug('Schedule: ' || 'l_sources.source_type.count = '||
1110: to_char(l_sources.source_type.count));
1111: END IF;

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

1104:
1105: l_stmt := 120;
1106: IF PG_DEBUG in ('Y', 'C') THEN
1107: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1108: msc_sch_wb.atp_debug('Schedule: ' || 'After Atp_Sources');
1109: msc_sch_wb.atp_debug('Schedule: ' || 'l_sources.source_type.count = '||
1110: to_char(l_sources.source_type.count));
1111: END IF;
1112:

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

1105: l_stmt := 120;
1106: IF PG_DEBUG in ('Y', 'C') THEN
1107: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1108: msc_sch_wb.atp_debug('Schedule: ' || 'After Atp_Sources');
1109: msc_sch_wb.atp_debug('Schedule: ' || 'l_sources.source_type.count = '||
1110: to_char(l_sources.source_type.count));
1111: END IF;
1112:
1113: -- check the return status

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

1114: IF l_return_status <> FND_API.G_RET_STS_SUCCESS OR
1115: l_sources.source_type.count = 0 THEN
1116:
1117: IF PG_DEBUG in ('Y', 'C') THEN
1118: msc_sch_wb.atp_debug('Schedule: ' || 'atp source fails');
1119: END IF;
1120: x_return_status := FND_API.G_RET_STS_ERROR;
1121:
1122: IF PG_DEBUG in ('Y', 'C') THEN

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

1119: END IF;
1120: x_return_status := FND_API.G_RET_STS_ERROR;
1121:
1122: IF PG_DEBUG in ('Y', 'C') THEN
1123: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Customer_Id.COUNT :='||l_atp_table.Customer_Id.COUNT);
1124: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code.COUNT :='||l_atp_table.Error_Code.COUNT);
1125: END IF;
1126: --4091487 In case no records in msc_item_id_lid
1127: --raise seperate error item not collected in case item not found in

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

1120: x_return_status := FND_API.G_RET_STS_ERROR;
1121:
1122: IF PG_DEBUG in ('Y', 'C') THEN
1123: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Customer_Id.COUNT :='||l_atp_table.Customer_Id.COUNT);
1124: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code.COUNT :='||l_atp_table.Error_Code.COUNT);
1125: END IF;
1126: --4091487 In case no records in msc_item_id_lid
1127: --raise seperate error item not collected in case item not found in
1128:

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

1148: -- assume it is a transfer as well
1149:
1150: l_stmt := 130;
1151: IF PG_DEBUG in ('Y', 'C') THEN
1152: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1153: msc_sch_wb.atp_debug('G_MODEL_IS_PRESENT_IN_SET := ' || MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET);
1154: END IF;
1155:
1156: --s_cto_rearch

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

1149:
1150: l_stmt := 130;
1151: IF PG_DEBUG in ('Y', 'C') THEN
1152: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1153: msc_sch_wb.atp_debug('G_MODEL_IS_PRESENT_IN_SET := ' || MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET);
1154: END IF;
1155:
1156: --s_cto_rearch
1157: IF NVL(MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET, 2) = 1 THEN

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

1175: VALUES
1176: (p_atp_table.inventory_item_id(l_count),
1177: p_atp_table.identifier(l_count));
1178: IF PG_DEBUG in ('Y', 'C') THEN
1179: msc_sch_wb.atp_debug('Rows inserted in MSC_SHIP_SET_TEMP := ' || SQL%ROWCOUNT);
1180: END IF;
1181: END IF;
1182:
1183:

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

1206: END IF;
1207:
1208: l_stmt := 140;
1209: IF PG_DEBUG in ('Y', 'C') THEN
1210: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1211: END IF;
1212:
1213: -- go over each sources: j is the index for sources (warehouses)
1214: j := 1;

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

1217: * so moved this chunk up before exception can be raised
1218: IF l_arrival_count > 1 THEN
1219: l_stmt := 150;
1220: IF PG_DEBUG in ('Y', 'C') THEN
1221: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1222: END IF;
1223:
1224: -- arrival set exists
1225: l_atp_table := x_atp_table; -- this is to null out l_atp_table;

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

1228: l_atp_table, l_return_status );
1229: ELSE
1230: l_stmt := 160;
1231: IF PG_DEBUG in ('Y', 'C') THEN
1232: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1233: END IF;
1234:
1235: l_atp_table := p_atp_table;
1236:

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

1238: */
1239:
1240: l_stmt := 170;
1241: IF PG_DEBUG in ('Y', 'C') THEN
1242: msc_sch_wb.atp_debug('Schedule: Stmt = ' ||l_stmt || ' : '||j || 'status : '|| l_overall_status);
1243: END IF;
1244:
1245: -- 2902265 do sane var initialization
1246: l_date_higher_src := 'N';

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

1259: l_ship_method := p_atp_table.ship_method(k);
1260: l_delivery_lead_time := p_atp_table.delivery_lead_time(k);
1261: --4386906
1262: IF PG_DEBUG in ('Y', 'C') THEN
1263: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);
1264: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);
1265: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906
1266: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906
1267: END IF;

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

1260: l_delivery_lead_time := p_atp_table.delivery_lead_time(k);
1261: --4386906
1262: IF PG_DEBUG in ('Y', 'C') THEN
1263: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);
1264: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);
1265: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906
1266: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906
1267: END IF;
1268:

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

1261: --4386906
1262: IF PG_DEBUG in ('Y', 'C') THEN
1263: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);
1264: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);
1265: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906
1266: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906
1267: END IF;
1268:
1269: /* ship_rec_cal

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

1262: IF PG_DEBUG in ('Y', 'C') THEN
1263: msc_sch_wb.atp_debug('Schedule: ' || 'l_sourcing_org_id :=' || l_sourcing_org_id);
1264: msc_sch_wb.atp_debug('Schedule: ' || 'p_instance_id := ' || p_instance_id);
1265: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_method := ' || l_ship_method); --4386906
1266: msc_sch_wb.atp_debug('Schedule: ' || 'l_delivery_lead_tim := ' || l_delivery_lead_time); --4386906
1267: END IF;
1268:
1269: /* ship_rec_cal
1270: -- ngoel 9/25/2001, wrapped since this function raises an exception which needs to be handled.

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

1279: END;
1280:
1281: IF l_sys_next_date IS NULL THEN
1282: IF PG_DEBUG in ('Y', 'C') THEN
1283: msc_sch_wb.atp_debug('Schedule: ' || 'Sysdate not found in Calendar');
1284: END IF;
1285: l_atp_table.error_code(1) := NO_MATCHING_CAL_DATE;
1286: RAISE NO_DATA_FOUND;
1287: END IF;

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

1287: END IF;
1288:
1289: l_stmt := 180;
1290: IF PG_DEBUG in ('Y', 'C') THEN
1291: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1292: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1293: END IF;*/
1294:
1295: -- initialize the group date in case it is a ship set

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

1288:
1289: l_stmt := 180;
1290: IF PG_DEBUG in ('Y', 'C') THEN
1291: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1292: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1293: END IF;*/
1294:
1295: -- initialize the group date in case it is a ship set
1296: -- Bug 2259824

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

1295: -- initialize the group date in case it is a ship set
1296: -- Bug 2259824
1297: l_group_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
1298: IF PG_DEBUG in ('Y', 'C') THEN
1299: msc_sch_wb.atp_debug('Schedule: 2259824 l_group_date = '||
1300: to_char(l_group_date, 'DD-MON-YYYY HH24:MI:SS'));
1301: END IF;
1302:
1303: -- initialize the # of element success in a set.

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

1327: l_atp_table.delivery_lead_time(i) :=l_delivery_lead_time;
1328: --4386906
1329: -- 1873918: PDS-ODS fix
1330: IF PG_DEBUG in ('Y', 'C') THEN
1331: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1332: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
1333: msc_sch_wb.atp_debug('Schedule: Reinitialize global org/item/plan recs');
1334: END IF;
1335: MSC_ATP_PVT.G_INV_CTP := l_inv_ctp;

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

1328: --4386906
1329: -- 1873918: PDS-ODS fix
1330: IF PG_DEBUG in ('Y', 'C') THEN
1331: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1332: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
1333: msc_sch_wb.atp_debug('Schedule: Reinitialize global org/item/plan recs');
1334: END IF;
1335: MSC_ATP_PVT.G_INV_CTP := l_inv_ctp;
1336: -- ATP4drp re-set using original profile value

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

1329: -- 1873918: PDS-ODS fix
1330: IF PG_DEBUG in ('Y', 'C') THEN
1331: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1332: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
1333: msc_sch_wb.atp_debug('Schedule: Reinitialize global org/item/plan recs');
1334: END IF;
1335: MSC_ATP_PVT.G_INV_CTP := l_inv_ctp;
1336: -- ATP4drp re-set using original profile value
1337: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

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

1346:
1347: --diag_atp: Reset the allocation rule name varibale as it may get reset.
1348: MSC_ATP_PVT.G_ALLOCATION_RULE_NAME := null;
1349: IF PG_DEBUG in ('Y', 'C') THEN
1350: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP '||G_INV_CTP|| ' G_ALLOCATED_ATP '||G_ALLOCATED_ATP);
1351: END IF;
1352:
1353: -- ship_rec_cal
1354: -- MSC_ATP_PVT.G_CALENDAR_CONSTRAINT := 'N';

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

1382: AND MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' -- user defined allocated ATP
1383: AND MSC_ATP_PVT.G_ALLOCATION_METHOD <> 1
1384: ) THEN
1385: IF PG_DEBUG in ('Y', 'C') THEN
1386: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||
1387: 'always do ATP against details table');
1388: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1389: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1390: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);

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

1384: ) THEN
1385: IF PG_DEBUG in ('Y', 'C') THEN
1386: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||
1387: 'always do ATP against details table');
1388: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1389: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1390: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
1391: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);
1392: END IF;

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

1385: IF PG_DEBUG in ('Y', 'C') THEN
1386: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||
1387: 'always do ATP against details table');
1388: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1389: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1390: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
1391: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);
1392: END IF;
1393: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';

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

1386: msc_sch_wb.atp_debug('Schedule: ' || 'Distributed environment+BWB+ODS or rule-based-allocated-ATP+PDS, ' ||
1387: 'always do ATP against details table');
1388: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1389: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1390: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
1391: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);
1392: END IF;
1393: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
1394: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 THEN

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

1387: 'always do ATP against details table');
1388: msc_sch_wb.atp_debug('Schedule: ' || 'G_DATABASE_LINK := ' || MSC_ATP_PVT.G_DATABASE_LINK);
1389: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
1390: msc_sch_wb.atp_debug('Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
1391: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag := ' || l_summary_flag);
1392: END IF;
1393: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
1394: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 THEN
1395: --- we re-read this summary profile option because it might get changed with plan

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

1395: --- we re-read this summary profile option because it might get changed with plan
1396: MSC_ATP_PVT.G_SUMMARY_FLAG := NVL(FND_PROFILE.VALUE('MSC_ENABLE_ATP_SUMMARY'), 'N');
1397: END IF;
1398: IF PG_DEBUG in ('Y', 'C') THEN
1399: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
1400: END IF;
1401:
1402: MSC_ATP_PVT.G_ORDER_LINE_ID := l_atp_table.Identifier(i);
1403: MSC_ATP_PVT.G_ASSEMBLY_LINE_ID := l_atp_table.Identifier(i);

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

1407:
1408: -- krajan : 2408902 - populate global variable (for use with CTO items)
1409: MSC_ATP_PVT.G_ATP_DEMAND_CLASS := l_atp_table.Demand_class(i);
1410: IF PG_DEBUG in ('Y', 'C') THEN
1411: msc_sch_wb.atp_debug('Schedule: ' || 'Setting global Demand_Class variable to : '|| MSC_ATP_PVT.G_ATP_DEMAND_CLASS );
1412: END IF;
1413:
1414: -- 9/24/2001, ngoel added to identify if current line is a MATO line, initializing here.
1415: MSC_ATP_PVT.G_CTO_LINE := 'N';

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

1459: IF MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID IS NOT NULL AND
1460: (NVL(l_atp_table.attribute_06(i), 'N') <> 'N' OR NVL(l_atp_table.atp_components_flag(i), 'N') <> 'N') THEN
1461:
1462: IF PG_DEBUG in ('Y', 'C') THEN
1463: msc_sch_wb.atp_debug('Schedule: ' || 'Item not found : ' || MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID);
1464: END IF;
1465:
1466: FOR l_count in 1..l_atp_table.error_code.count LOOP
1467: IF l_atp_table.inventory_item_id(l_count) = MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID THEN

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

1476:
1477: END IF;
1478:
1479: IF PG_DEBUG in ('Y', 'C') THEN
1480: msc_sch_wb.atp_debug('Schedule: ' || 'ship_method: ' || l_atp_table.ship_method(i));
1481: msc_sch_wb.atp_debug('Schedule: ' || 'internal_org_id: ' || l_atp_table.internal_org_id(i)); --13032665
1482: END IF;
1483: -- dsting dlt
1484: --13032665 start check if the internal/destination org has been collected.

Line 1481: msc_sch_wb.atp_debug('Schedule: ' || 'internal_org_id: ' || l_atp_table.internal_org_id(i)); --13032665

1477: END IF;
1478:
1479: IF PG_DEBUG in ('Y', 'C') THEN
1480: msc_sch_wb.atp_debug('Schedule: ' || 'ship_method: ' || l_atp_table.ship_method(i));
1481: msc_sch_wb.atp_debug('Schedule: ' || 'internal_org_id: ' || l_atp_table.internal_org_id(i)); --13032665
1482: END IF;
1483: -- dsting dlt
1484: --13032665 start check if the internal/destination org has been collected.
1485: IF (l_atp_table.internal_org_id(i) IS NOT NULL) THEN

Line 1493: msc_sch_wb.atp_debug('Schedule: ' || 'l_org_collected: ' || l_org_collected);

1489: and sr_instance_id = p_instance_id
1490: and partner_type = 3;
1491:
1492: IF PG_DEBUG in ('Y', 'C') THEN
1493: msc_sch_wb.atp_debug('Schedule: ' || 'l_org_collected: ' || l_org_collected);
1494: END IF;
1495: --Fall back on customer will be done if org is set to null
1496: IF l_org_collected = 0 THEN
1497: l_atp_table.internal_org_id(i) := NULL;

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

1508: l_atp_table.customer_site_id(1) IS NULL AND
1509: l_atp_table.party_site_id(1) IS NULL AND --2814895
1510: l_atp_table.customer_country(1) IS NULL) THEN --2814895
1511: IF PG_DEBUG in ('Y', 'C') THEN
1512: msc_sch_wb.atp_debug('Schedule: ' || 'Inside Org code');
1513: END IF;
1514: MSC_ATP_PROC.get_delivery_lead_time(
1515: l_sourcing_org_id,
1516: NULL, -- from location id

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

1533: );
1534:
1535: ELSIF (l_atp_table.customer_site_id(1) IS NOT NULL) THEN
1536: IF PG_DEBUG in ('Y', 'C') THEN
1537: msc_sch_wb.atp_debug('Schedule: ' || 'Inside customer_site_id code');
1538: END IF;
1539: MSC_ATP_PROC.get_delivery_lead_time(
1540: l_sourcing_org_id,
1541: NULL, -- from location id

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

1558: );
1559:
1560: ELSIF ( l_atp_table.party_site_id(1) IS NOT NULL ) THEN --2814895
1561: IF PG_DEBUG in ('Y', 'C') THEN
1562: msc_sch_wb.atp_debug('Schedule: ' || 'Inside party_site_id code');
1563: END IF;
1564: MSC_ATP_PROC.get_delivery_lead_time(
1565: l_sourcing_org_id,
1566: NULL, -- from location id

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

1583: );
1584:
1585: ELSIF ( l_atp_table.customer_country(1) IS NOT NULL) THEN --2814895
1586: IF PG_DEBUG in ('Y', 'C') THEN
1587: msc_sch_wb.atp_debug('Schedule: ' || 'Inside address parameter code');
1588: END IF;
1589: MSC_ATP_PROC.get_delivery_lead_time(
1590: l_sourcing_org_id,
1591: NULL, -- from location id

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

1633: MSC_ATP_PVT.G_PARTNER_ID := NULL;
1634: END IF;
1635:
1636: IF PG_DEBUG in ('Y', 'C') THEN
1637: msc_sch_wb.atp_debug('Schedule: ' || 'G_PARTNER_ID = '||MSC_ATP_PVT.G_PARTNER_ID);
1638: END IF;
1639:
1640: IF l_atp_table.customer_site_id(i) IS NOT NULL THEN
1641: -- bug3593394 - Run this SQL only if customer site has changed.

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

1657: MSC_ATP_PVT.G_PARTNER_SITE_ID := NULL;
1658: END IF;
1659:
1660: IF PG_DEBUG in ('Y', 'C') THEN
1661: msc_sch_wb.atp_debug('Schedule: ' || 'G_PARTNER_SITE_ID = '||MSC_ATP_PVT.G_PARTNER_SITE_ID);
1662: END IF;
1663:
1664: -- ship_rec_cal changes begin
1665: IF PG_DEBUG in ('Y', 'C') THEN

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

1662: END IF;
1663:
1664: -- ship_rec_cal changes begin
1665: IF PG_DEBUG in ('Y', 'C') THEN
1666: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1667: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1668: msc_sch_wb.atp_debug('* ');
1669: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );

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

1663:
1664: -- ship_rec_cal changes begin
1665: IF PG_DEBUG in ('Y', 'C') THEN
1666: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1667: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1668: msc_sch_wb.atp_debug('* ');
1669: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );

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

1664: -- ship_rec_cal changes begin
1665: IF PG_DEBUG in ('Y', 'C') THEN
1666: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1667: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1668: msc_sch_wb.atp_debug('* ');
1669: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1672: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );

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

1665: IF PG_DEBUG in ('Y', 'C') THEN
1666: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1667: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1668: msc_sch_wb.atp_debug('* ');
1669: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1672: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1673: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );

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

1666: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
1667: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1668: msc_sch_wb.atp_debug('* ');
1669: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1672: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1673: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1674: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );

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

1667: msc_sch_wb.atp_debug('* ___________________Input_____________________');
1668: msc_sch_wb.atp_debug('* ');
1669: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1672: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1673: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1674: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1675: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );

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

1668: msc_sch_wb.atp_debug('* ');
1669: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1672: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1673: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1674: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1675: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );
1676: END IF;

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

1669: msc_sch_wb.atp_debug('* Source Cust ID : '|| l_atp_table.customer_id(i) );
1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1672: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1673: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1674: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1675: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );
1676: END IF;
1677: -- Bug 3449812 - get receiving cal from ISO's destination org if available

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

1670: msc_sch_wb.atp_debug('* Partner ID : '|| MSC_ATP_PVT.G_PARTNER_ID );
1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1672: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1673: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1674: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1675: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );
1676: END IF;
1677: -- Bug 3449812 - get receiving cal from ISO's destination org if available
1678: -- Bug 3515520, don't use org in case customer/site is populated.

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

1671: msc_sch_wb.atp_debug('* Partner Site ID : '|| MSC_ATP_PVT.G_PARTNER_SITE_ID );
1672: msc_sch_wb.atp_debug('* Ship Method : '|| l_atp_table.ship_method(i) );
1673: msc_sch_wb.atp_debug('* Org ID : '|| l_atp_table.organization_id(i) );
1674: msc_sch_wb.atp_debug('* Internal Org ID : '|| l_atp_table.internal_org_id(i) );
1675: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sourcing_org_id );
1676: END IF;
1677: -- Bug 3449812 - get receiving cal from ISO's destination org if available
1678: -- Bug 3515520, don't use org in case customer/site is populated.
1679: -- IF NVL(l_atp_table.internal_org_id(i), l_atp_table.organization_id(i)) IS NOT NULL THEN

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

1701: MSC_CALENDAR.ORC);
1702: ELSE
1703: l_receiving_cal_code := l_atp_table.receiving_cal_code(i-1);
1704: IF PG_DEBUG in ('Y', 'C') THEN
1705: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for ORC');
1706: END IF;
1707: END IF;
1708: ELSIF l_atp_table.customer_id(i) IS NOT NULL AND MSC_ATP_PVT.G_USE_SHIP_REC_CAL='Y' THEN
1709: -- Bug 3647208 - Call CRC only if using ship/rec cal

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

1725: MSC_CALENDAR.CRC);
1726: ELSE
1727: l_receiving_cal_code := l_atp_table.receiving_cal_code(i-1);
1728: IF PG_DEBUG in ('Y', 'C') THEN
1729: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for CRC');
1730: END IF;
1731: END IF;
1732: ELSE
1733: -- Neither org nor customer provided

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

1750: MSC_CALENDAR.VIC);
1751: ELSE
1752: l_intransit_cal_code := l_atp_table.intransit_cal_code(i-1);
1753: IF PG_DEBUG in ('Y', 'C') THEN
1754: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for VIC');
1755: END IF;
1756: END IF;
1757: ELSE
1758: l_intransit_cal_code := MSC_CALENDAR.FOC;

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

1775: MSC_CALENDAR.OSC);
1776: ELSE
1777: l_shipping_cal_code := l_atp_table.shipping_cal_code(i-1);
1778: IF PG_DEBUG in ('Y', 'C') THEN
1779: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for OSC');
1780: END IF;
1781: END IF;
1782:
1783:

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

1805: -- End ATP4drp
1806: ELSE
1807: l_manufacturing_cal_code := l_atp_table.manufacturing_cal_code(i-1);
1808: IF PG_DEBUG in ('Y', 'C') THEN
1809: msc_sch_wb.atp_debug('Schedule: ' || 'Calendar parameters have not changed for OMC');
1810: END IF;
1811: END IF;
1812:
1813: IF PG_DEBUG in ('Y', 'C') THEN

Line 1814: msc_sch_wb.atp_debug(' ');

1810: END IF;
1811: END IF;
1812:
1813: IF PG_DEBUG in ('Y', 'C') THEN
1814: msc_sch_wb.atp_debug(' ');
1815: msc_sch_wb.atp_debug('* ___________________Output____________________');
1816: msc_sch_wb.atp_debug('* ');
1817: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1818: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);

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

1811: END IF;
1812:
1813: IF PG_DEBUG in ('Y', 'C') THEN
1814: msc_sch_wb.atp_debug(' ');
1815: msc_sch_wb.atp_debug('* ___________________Output____________________');
1816: msc_sch_wb.atp_debug('* ');
1817: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1818: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1819: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);

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

1812:
1813: IF PG_DEBUG in ('Y', 'C') THEN
1814: msc_sch_wb.atp_debug(' ');
1815: msc_sch_wb.atp_debug('* ___________________Output____________________');
1816: msc_sch_wb.atp_debug('* ');
1817: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1818: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1819: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1820: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);

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

1813: IF PG_DEBUG in ('Y', 'C') THEN
1814: msc_sch_wb.atp_debug(' ');
1815: msc_sch_wb.atp_debug('* ___________________Output____________________');
1816: msc_sch_wb.atp_debug('* ');
1817: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1818: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1819: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1820: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1821: msc_sch_wb.atp_debug('**************************************************************');

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

1814: msc_sch_wb.atp_debug(' ');
1815: msc_sch_wb.atp_debug('* ___________________Output____________________');
1816: msc_sch_wb.atp_debug('* ');
1817: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1818: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1819: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1820: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1821: msc_sch_wb.atp_debug('**************************************************************');
1822: END IF;

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

1815: msc_sch_wb.atp_debug('* ___________________Output____________________');
1816: msc_sch_wb.atp_debug('* ');
1817: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1818: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1819: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1820: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1821: msc_sch_wb.atp_debug('**************************************************************');
1822: END IF;
1823:

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

1816: msc_sch_wb.atp_debug('* ');
1817: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1818: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1819: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1820: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1821: msc_sch_wb.atp_debug('**************************************************************');
1822: END IF;
1823:
1824: -- Add the calendar codes to l_atp_table

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

1817: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_receiving_cal_code);
1818: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_intransit_cal_code);
1819: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_shipping_cal_code);
1820: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_manufacturing_cal_code);
1821: msc_sch_wb.atp_debug('**************************************************************');
1822: END IF;
1823:
1824: -- Add the calendar codes to l_atp_table
1825: l_atp_table.receiving_cal_code(i) := l_receiving_cal_code;

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

1866: null;
1867: END;
1868:
1869: IF PG_DEBUG in ('Y', 'C') THEN
1870: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1871: msc_sch_wb.atp_debug('Schedule: ' || 'l_sysdate_orc = ' || l_sysdate_orc); --bug3439591
1872: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_omc_date = ' || l_sys_next_omc_date);
1873: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1874: END IF;

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

1867: END;
1868:
1869: IF PG_DEBUG in ('Y', 'C') THEN
1870: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1871: msc_sch_wb.atp_debug('Schedule: ' || 'l_sysdate_orc = ' || l_sysdate_orc); --bug3439591
1872: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_omc_date = ' || l_sys_next_omc_date);
1873: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1874: END IF;
1875:

Line 1872: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_omc_date = ' || l_sys_next_omc_date);

1868:
1869: IF PG_DEBUG in ('Y', 'C') THEN
1870: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1871: msc_sch_wb.atp_debug('Schedule: ' || 'l_sysdate_orc = ' || l_sysdate_orc); --bug3439591
1872: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_omc_date = ' || l_sys_next_omc_date);
1873: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1874: END IF;
1875:
1876: IF l_sys_next_date IS NULL THEN

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

1869: IF PG_DEBUG in ('Y', 'C') THEN
1870: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_date = ' || l_sys_next_date);
1871: msc_sch_wb.atp_debug('Schedule: ' || 'l_sysdate_orc = ' || l_sysdate_orc); --bug3439591
1872: msc_sch_wb.atp_debug('Schedule: ' || 'l_sys_next_omc_date = ' || l_sys_next_omc_date);
1873: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
1874: END IF;
1875:
1876: IF l_sys_next_date IS NULL THEN
1877: IF PG_DEBUG in ('Y', 'C') THEN

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

1874: END IF;
1875:
1876: IF l_sys_next_date IS NULL THEN
1877: IF PG_DEBUG in ('Y', 'C') THEN
1878: msc_sch_wb.atp_debug('Schedule: ' || 'Sysdate not found in Calendar');
1879: END IF;
1880: l_atp_table.error_code(1) := NO_MATCHING_CAL_DATE;
1881: RAISE NO_DATA_FOUND;
1882: END IF;

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

1891: IF (MSC_ATP_PVT.G_INV_CTP = 5) OR
1892: (MSC_ATP_PVT.G_INV_CTP = 4 AND
1893: NVL(l_atp_table.old_source_organization_id(i), -1) <> l_process_org_id ) THEN
1894: IF PG_DEBUG in ('Y', 'C') THEN
1895: msc_sch_wb.atp_debug('Schedule: ' || 'Either old source ors is null or is not same as l_process_org_id');
1896: msc_sch_wb.atp_debug('Schedule: ' || 'Old org :=' || l_atp_table.old_source_organization_id(i));
1897: END IF;
1898: --- we get PF item id only if its a case of new schedulling
1899: -- if its a reschedulling then we mayalready have got the id just for deleting

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

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

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

1904: l_process_org_id);
1905: ELSE
1906: IF l_arrival_count > 1 THEN
1907: IF PG_DEBUG in ('Y', 'C') THEN
1908: msc_sch_wb.atp_debug('Schedule: ' || 'Arrival Set');
1909: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(k) := ' || l_pf_item_id(k));
1910: END IF;
1911: l_process_item_id := l_pf_item_id(k);
1912: ELSE

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

1905: ELSE
1906: IF l_arrival_count > 1 THEN
1907: IF PG_DEBUG in ('Y', 'C') THEN
1908: msc_sch_wb.atp_debug('Schedule: ' || 'Arrival Set');
1909: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(k) := ' || l_pf_item_id(k));
1910: END IF;
1911: l_process_item_id := l_pf_item_id(k);
1912: ELSE
1913: IF PG_DEBUG in ('Y', 'C') THEN

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

1910: END IF;
1911: l_process_item_id := l_pf_item_id(k);
1912: ELSE
1913: IF PG_DEBUG in ('Y', 'C') THEN
1914: msc_sch_wb.atp_debug('Schedule: ' || 'Ship Set');
1915: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(i) := ' || l_pf_item_id(i));
1916: END IF;
1917: l_process_item_id := l_pf_item_id(i);
1918: END IF;

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

1911: l_process_item_id := l_pf_item_id(k);
1912: ELSE
1913: IF PG_DEBUG in ('Y', 'C') THEN
1914: msc_sch_wb.atp_debug('Schedule: ' || 'Ship Set');
1915: msc_sch_wb.atp_debug('Schedule: ' || 'l_pf_item_id(i) := ' || l_pf_item_id(i));
1916: END IF;
1917: l_process_item_id := l_pf_item_id(i);
1918: END IF;
1919: END IF;

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

1917: l_process_item_id := l_pf_item_id(i);
1918: END IF;
1919: END IF;
1920: IF PG_DEBUG in ('Y', 'C') THEN
1921: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id := ' || l_process_item_id);
1922: END IF;
1923:
1924: IF (l_process_item_id <> l_requested_item_id) and (l_atp_flag = 'N') then
1925: --For Product family based ATP we will flag an error if request comes for a

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

1924: IF (l_process_item_id <> l_requested_item_id) and (l_atp_flag = 'N') then
1925: --For Product family based ATP we will flag an error if request comes for a
1926: -- member item which has ATP flag = 'N'. For other members we will continue as usual
1927: IF PG_DEBUG in ('Y', 'C') THEN
1928: msc_sch_wb.atp_debug('Schedule: ' || 'Member item is not atpable');
1929: END IF;
1930: x_return_status := FND_API.G_RET_STS_ERROR;
1931: l_atp_table.Error_Code(i):= PF_MEMBER_ITEM_NOT_ATPABLE;
1932: RAISE NO_DATA_FOUND;

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

1965: */
1966: --s_cto_reach
1967: l_plan_found_for_match := 2;
1968: IF PG_DEBUG in ('Y', 'C') THEN
1969: msc_sch_wb.atp_debug('Schedule: matc_id.count := ' || l_atp_table.match_item_id.count);
1970: msc_sch_wb.atp_debug('Schedule: bom_item_type count := ' || l_atp_table.bom_item_type.count);
1971: msc_sch_wb.atp_debug('match item is := ' || l_atp_table.match_item_id(i));
1972: END IF;
1973: IF l_atp_table.match_item_id(i) is not null and l_atp_table.bom_item_type(i) = 1 THEN

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

1966: --s_cto_reach
1967: l_plan_found_for_match := 2;
1968: IF PG_DEBUG in ('Y', 'C') THEN
1969: msc_sch_wb.atp_debug('Schedule: matc_id.count := ' || l_atp_table.match_item_id.count);
1970: msc_sch_wb.atp_debug('Schedule: bom_item_type count := ' || l_atp_table.bom_item_type.count);
1971: msc_sch_wb.atp_debug('match item is := ' || l_atp_table.match_item_id(i));
1972: END IF;
1973: IF l_atp_table.match_item_id(i) is not null and l_atp_table.bom_item_type(i) = 1 THEN
1974:

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

1967: l_plan_found_for_match := 2;
1968: IF PG_DEBUG in ('Y', 'C') THEN
1969: msc_sch_wb.atp_debug('Schedule: matc_id.count := ' || l_atp_table.match_item_id.count);
1970: msc_sch_wb.atp_debug('Schedule: bom_item_type count := ' || l_atp_table.bom_item_type.count);
1971: msc_sch_wb.atp_debug('match item is := ' || l_atp_table.match_item_id(i));
1972: END IF;
1973: IF l_atp_table.match_item_id(i) is not null and l_atp_table.bom_item_type(i) = 1 THEN
1974:
1975: IF PG_DEBUG in ('Y', 'C') THEN

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

1972: END IF;
1973: IF l_atp_table.match_item_id(i) is not null and l_atp_table.bom_item_type(i) = 1 THEN
1974:
1975: IF PG_DEBUG in ('Y', 'C') THEN
1976: msc_sch_wb.atp_debug('Match Found, find plan for matched item');
1977: END IF;
1978:
1979: /* time_phased_atp changes begin*/
1980: l_match_item_family_id := MSC_ATP_PF.Get_PF_Atp_Item_Id(

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

1998: );
1999:
2000: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2001: IF PG_DEBUG in ('Y', 'C') THEN
2002: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2003: END IF;
2004: x_return_status := FND_API.G_RET_STS_ERROR;
2005: RAISE FND_API.G_EXC_ERROR;
2006: END IF;

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

2018:
2019: IF MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id is not null and
2020: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id, -1) <> -1 then
2021: IF PG_DEBUG in ('Y', 'C') THEN
2022: msc_sch_wb.atp_debug('plan found for matched item');
2023: END IF;
2024: l_plan_found_for_match := 1;
2025: l_atp_table.base_model_id(i) := l_process_item_id;
2026: l_process_item_id := l_match_item_family_id;

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

2042: l_atp_table.matched_item_name(i) := l_item_attribute_rec.item_name;
2043:
2044: ELSE
2045: IF PG_DEBUG in ('Y', 'C') THEN
2046: msc_sch_wb.atp_debug('plan not found for matched item');
2047: END IF;
2048: l_plan_found_for_match := 2;
2049: l_atp_table.match_item_id(i) := null;
2050:

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

2054: END IF;
2055: END IF;
2056:
2057: IF PG_DEBUG in ('Y', 'C') THEN
2058: msc_sch_wb.atp_debug('Schedule: l_plan_found_for_match := ' || l_plan_found_for_match);
2059: END IF;
2060: IF l_plan_found_for_match = 2 THEN
2061: /* time_phased_atp changes begin
2062: Call new procedure Get_PF_Plan_Info*/

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

2073: );
2074:
2075: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2076: IF PG_DEBUG in ('Y', 'C') THEN
2077: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2078: END IF;
2079: x_return_status := FND_API.G_RET_STS_ERROR;
2080: RAISE FND_API.G_EXC_ERROR;
2081: END IF;

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

2085: -- time_phased_atp - Reset variables
2086: l_process_item_id := l_requested_item_id;
2087: MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id;
2088: IF PG_DEBUG in ('Y', 'C') THEN
2089: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2090: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2091: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2092: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2093: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);

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

2086: l_process_item_id := l_requested_item_id;
2087: MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id;
2088: IF PG_DEBUG in ('Y', 'C') THEN
2089: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2090: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2091: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2092: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2093: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2094: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

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

2087: MSC_ATP_PVT.G_ITEM_INFO_REC.product_family_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id;
2088: IF PG_DEBUG in ('Y', 'C') THEN
2089: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2090: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2091: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2092: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2093: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2094: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2095: END IF;

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

2088: IF PG_DEBUG in ('Y', 'C') THEN
2089: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2090: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2091: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2092: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2093: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2094: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2095: END IF;
2096: ELSE

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

2089: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2090: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2091: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2092: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2093: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2094: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2095: END IF;
2096: ELSE
2097: IF l_atf_date is not null THEN

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

2090: msc_sch_wb.atp_debug('Schedule: ' || 'PF and Allocated ATP not applicable for DRP plans');
2091: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2092: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_item_id ' || l_requested_item_id);
2093: msc_sch_wb.atp_debug('Schedule: ' || 'l_process_item_id ' || l_process_item_id);
2094: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2095: END IF;
2096: ELSE
2097: IF l_atf_date is not null THEN
2098: l_time_phased_atp := 'Y';

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

2123: -- 1873918: PDS-ODS fix
2124: -- PDS-ODS fix
2125: IF l_plan_id is NULL THEN
2126: IF PG_DEBUG in ('Y', 'C') THEN
2127: msc_sch_wb.atp_debug('Schedule: ' || 'no plan available');
2128: END IF;
2129: x_return_status := FND_API.G_RET_STS_ERROR;
2130: --bug 2854351: Raise plan down time error
2131: --l_atp_table.Error_Code(i):= PLAN_NOT_FOUND;

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

2132: l_atp_table.Error_Code(i):= MSC_ATP_PVT.PLAN_DOWN_TIME;
2133: RAISE NO_DATA_FOUND;
2134: ELSIF l_plan_id = -100 THEN
2135: IF PG_DEBUG in ('Y', 'C') THEN
2136: msc_sch_wb.atp_debug('Schedule: ' || 'Summary Concurrent program is running');
2137: END IF;
2138: x_return_status := FND_API.G_RET_STS_ERROR;
2139: l_atp_table.Error_Code(i):= SUMM_CONC_PROG_RUNNING;
2140: RAISE NO_DATA_FOUND;

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

2139: l_atp_table.Error_Code(i):= SUMM_CONC_PROG_RUNNING;
2140: RAISE NO_DATA_FOUND;
2141: ELSIF l_plan_id = -200 THEN
2142: IF PG_DEBUG in ('Y', 'C') THEN
2143: msc_sch_wb.atp_debug('Schedule: ' || 'Post Plan Alloc progranm has not been run');
2144: END IF;
2145: x_return_status := FND_API.G_RET_STS_ERROR;
2146: l_atp_table.Error_Code(i):= RUN_POST_PLAN_ALLOC;
2147: RAISE NO_DATA_FOUND;

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

2148:
2149: -- 24x7 ATP
2150: ELSIF l_plan_id = -300 THEN
2151: if PG_DEBUG in ('Y','C') THEN
2152: msc_sch_wb.atp_debug ('Schedule: ' || 'ATP Downtime . 24x7 ATP');
2153: END IF;
2154: x_return_status := FND_API.G_RET_STS_ERROR;
2155: --- bug 2854351: Show planned down time error
2156: --l_atp_table.Error_Code(i) := TRY_ATP_LATER;

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

2158: RAISE NO_DATA_FOUND;
2159:
2160: ELSIF l_plan_id = -1 THEN
2161: IF PG_DEBUG in ('Y', 'C') THEN
2162: msc_sch_wb.atp_debug('Schedule: ' || 'no plan available, switch to ods');
2163: END IF;
2164:
2165: l_atp_table.Error_Code(i):= PDS_TO_ODS_SWITCH;
2166: IF PG_DEBUG in ('Y', 'C') THEN

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

2163: END IF;
2164:
2165: l_atp_table.Error_Code(i):= PDS_TO_ODS_SWITCH;
2166: IF PG_DEBUG in ('Y', 'C') THEN
2167: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code(i)='||l_atp_table.Error_Code(i));
2168: END IF;
2169: MSC_ATP_PVT.G_INV_CTP := 5;
2170: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2171: MSC_ATP_PVT.G_ALLOCATION_METHOD := 2;

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

2203: FROM msc_apps_instances
2204: WHERE instance_id = p_instance_id;
2205:
2206: IF PG_DEBUG in ('Y', 'C') THEN
2207: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
2208: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);
2209: END IF;
2210:
2211: -- Doing PDS-ODS switch. Summary will be diabled in all cases because ODS summary

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

2204: WHERE instance_id = p_instance_id;
2205:
2206: IF PG_DEBUG in ('Y', 'C') THEN
2207: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
2208: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);
2209: END IF;
2210:
2211: -- Doing PDS-ODS switch. Summary will be diabled in all cases because ODS summary
2212: -- will commit even PDS data from previous lines

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

2209: END IF;
2210:
2211: -- Doing PDS-ODS switch. Summary will be diabled in all cases because ODS summary
2212: -- will commit even PDS data from previous lines
2213: msc_sch_wb.atp_debug('Schedule: ' || 'Summary will be disabled');
2214: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
2215:
2216: IF NVL(l_so_tbl_status, 1) = 2 THEN
2217: -- not available for atp

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

2215:
2216: IF NVL(l_so_tbl_status, 1) = 2 THEN
2217: -- not available for atp
2218: IF PG_DEBUG in ('Y', 'C') THEN
2219: msc_sch_wb.atp_debug('Schedule: ' || 'ods not available');
2220: END IF;
2221:
2222: l_atp_table.error_code(1) := TRY_ATP_LATER;
2223: RAISE NO_DATA_FOUND;

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

2236: FROM msc_apps_instances
2237: WHERE instance_id = p_instance_id;
2238:
2239: IF PG_DEBUG in ('Y', 'C') THEN
2240: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
2241: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);
2242: END IF;
2243:
2244: IF NVL(l_so_tbl_status, 1) = 2 THEN

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

2237: WHERE instance_id = p_instance_id;
2238:
2239: IF PG_DEBUG in ('Y', 'C') THEN
2240: msc_sch_wb.atp_debug('Schedule: ' || 'l_so_tbl_status = '||l_so_tbl_status);
2241: msc_sch_wb.atp_debug('Schedule: ' || 'l_summary_flag = '||l_summary_flag);
2242: END IF;
2243:
2244: IF NVL(l_so_tbl_status, 1) = 2 THEN
2245: -- not available for atp

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

2243:
2244: IF NVL(l_so_tbl_status, 1) = 2 THEN
2245: -- not available for atp
2246: IF PG_DEBUG in ('Y', 'C') THEN
2247: msc_sch_wb.atp_debug('Schedule: ' || 'ATP not available');
2248: END IF;
2249:
2250: l_atp_table.error_code(1) := TRY_ATP_LATER;
2251: RAISE NO_DATA_FOUND;

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

2256:
2257: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
2258:
2259: IF PG_DEBUG in ('Y', 'C') THEN
2260: msc_sch_wb.atp_debug('Schedule: ' || 'Summary will be disabled');
2261: END IF;
2262:
2263: END IF;
2264: END IF;

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

2271: l_process_org_id); */
2272:
2273: l_stmt := 200;
2274: IF PG_DEBUG in ('Y', 'C') THEN
2275: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
2276: END IF;
2277:
2278: -- reinitialize some elements in l_atp_rec
2279: l_atp_rec.error_code := ALLSUCCESS;

Line 2368: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search Start____');

2364:
2365: LOOP
2366: EXIT WHEN l_low_seqnum > l_high_seqnum; --both are null for first time.
2367: IF PG_DEBUG in ('Y', 'C') THEN
2368: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search Start____');
2369: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2370: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2371: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2372: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count start : ' || l_loop_count);

Line 2369: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);

2365: LOOP
2366: EXIT WHEN l_low_seqnum > l_high_seqnum; --both are null for first time.
2367: IF PG_DEBUG in ('Y', 'C') THEN
2368: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search Start____');
2369: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2370: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2371: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2372: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count start : ' || l_loop_count);
2373: END IF;

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

2366: EXIT WHEN l_low_seqnum > l_high_seqnum; --both are null for first time.
2367: IF PG_DEBUG in ('Y', 'C') THEN
2368: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search Start____');
2369: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2370: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2371: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2372: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count start : ' || l_loop_count);
2373: END IF;
2374: --5211558 initialized global variable to use inside ATP_Check

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

2367: IF PG_DEBUG in ('Y', 'C') THEN
2368: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search Start____');
2369: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2370: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2371: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2372: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count start : ' || l_loop_count);
2373: END IF;
2374: --5211558 initialized global variable to use inside ATP_Check
2375: IF l_time_phased_atp = 'Y' AND G_FORWARD_ATP = 'Y' THEN

Line 2372: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count start : ' || l_loop_count);

2368: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search Start____');
2369: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2370: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2371: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2372: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count start : ' || l_loop_count);
2373: END IF;
2374: --5211558 initialized global variable to use inside ATP_Check
2375: IF l_time_phased_atp = 'Y' AND G_FORWARD_ATP = 'Y' THEN
2376: G_LOOP_COUNT := l_loop_count;

Line 2378: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT start : ' || G_LOOP_COUNT);

2374: --5211558 initialized global variable to use inside ATP_Check
2375: IF l_time_phased_atp = 'Y' AND G_FORWARD_ATP = 'Y' THEN
2376: G_LOOP_COUNT := l_loop_count;
2377: IF PG_DEBUG in ('Y', 'C') THEN
2378: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT start : ' || G_LOOP_COUNT);
2379: END IF;
2380: END IF;
2381: --If more iteration are needed then go inside this if condition.
2382: --First time we will not go inside as loop count will be 1.

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

2384: IF (MSC_ATP_PVT.G_OPTIONAL_FW is null) AND l_loop_count = 2
2385: AND (Nvl(l_atp_rec.requested_date_quantity,0) < l_atp_rec.quantity_ordered)
2386: THEN
2387: IF PG_DEBUG in ('Y', 'C') THEN
2388: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2389: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2390: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
2391: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2392: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);

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

2385: AND (Nvl(l_atp_rec.requested_date_quantity,0) < l_atp_rec.quantity_ordered)
2386: THEN
2387: IF PG_DEBUG in ('Y', 'C') THEN
2388: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2389: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2390: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
2391: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2392: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2393: END IF;

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

2386: THEN
2387: IF PG_DEBUG in ('Y', 'C') THEN
2388: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2389: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2390: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
2391: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2392: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2393: END IF;
2394:

Line 2391: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);

2387: IF PG_DEBUG in ('Y', 'C') THEN
2388: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2389: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2390: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
2391: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2392: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2393: END IF;
2394:
2395: MSC_ATP_PVT.G_OPTIONAL_FW := 1;

Line 2392: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);

2388: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2389: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
2390: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
2391: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2392: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2393: END IF;
2394:
2395: MSC_ATP_PVT.G_OPTIONAL_FW := 1;
2396:

Line 2418: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);

2414: l_atp_rec.combined_requested_date_qty := NULL;
2415: l_atp_rec.atf_date_quantity := NULL;
2416:
2417: IF PG_DEBUG in ('Y', 'C') THEN
2418: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2419: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2420: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2421: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2422: END IF;

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

2415: l_atp_rec.atf_date_quantity := NULL;
2416:
2417: IF PG_DEBUG in ('Y', 'C') THEN
2418: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2419: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2420: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2421: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2422: END IF;
2423: --for OPTIONAL FW PASS cases initialize it to ITF

Line 2420: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);

2416:
2417: IF PG_DEBUG in ('Y', 'C') THEN
2418: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2419: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2420: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2421: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2422: END IF;
2423: --for OPTIONAL FW PASS cases initialize it to ITF
2424: MSC_ATP_PROC.get_infinite_time_fence_date(l_atp_rec.instance_id,

Line 2421: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);

2417: IF PG_DEBUG in ('Y', 'C') THEN
2418: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2419: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
2420: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2421: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
2422: END IF;
2423: --for OPTIONAL FW PASS cases initialize it to ITF
2424: MSC_ATP_PROC.get_infinite_time_fence_date(l_atp_rec.instance_id,
2425: l_atp_rec.request_item_id,

Line 2444: msc_sch_wb.atp_debug('Schedule: ' || 'l_first_date: ' || l_first_date);

2440: l_atp_rec.shipping_cal_code,
2441: l_atp_rec.instance_id,
2442: l_last_date);
2443: IF PG_DEBUG in ('Y', 'C') THEN
2444: msc_sch_wb.atp_debug('Schedule: ' || 'l_first_date: ' || l_first_date);
2445: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2446: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
2447: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
2448: END IF;

Line 2445: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);

2441: l_atp_rec.instance_id,
2442: l_last_date);
2443: IF PG_DEBUG in ('Y', 'C') THEN
2444: msc_sch_wb.atp_debug('Schedule: ' || 'l_first_date: ' || l_first_date);
2445: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2446: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
2447: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
2448: END IF;
2449: END IF;

Line 2446: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);

2442: l_last_date);
2443: IF PG_DEBUG in ('Y', 'C') THEN
2444: msc_sch_wb.atp_debug('Schedule: ' || 'l_first_date: ' || l_first_date);
2445: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2446: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
2447: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
2448: END IF;
2449: END IF;
2450:

Line 2447: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);

2443: IF PG_DEBUG in ('Y', 'C') THEN
2444: msc_sch_wb.atp_debug('Schedule: ' || 'l_first_date: ' || l_first_date);
2445: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_OPTIONAL_FW: ' || MSC_ATP_PVT.G_OPTIONAL_FW);
2446: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
2447: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
2448: END IF;
2449: END IF;
2450:
2451: --For each iteration these should be set to original values

Line 2472: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);

2468: l_atp_rec.shipping_cal_code,
2469: l_atp_rec.instance_id
2470: );
2471: IF PG_DEBUG in ('Y', 'C') THEN
2472: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
2473: END IF;
2474: l_high_seqnum := msc_atp_pvt.get_seq_num(l_last_date,
2475: l_atp_rec.shipping_cal_code,
2476: l_atp_rec.instance_id

Line 2479: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);

2475: l_atp_rec.shipping_cal_code,
2476: l_atp_rec.instance_id
2477: );
2478: IF PG_DEBUG in ('Y', 'C') THEN
2479: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
2480: END IF;
2481:
2482: l_middle_seqnum := floor((l_low_seqnum + l_high_seqnum)/2);
2483:

Line 2485: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);

2481:
2482: l_middle_seqnum := floor((l_low_seqnum + l_high_seqnum)/2);
2483:
2484: IF PG_DEBUG in ('Y', 'C') THEN
2485: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);
2486: END IF;
2487:
2488: l_atp_rec.requested_ship_date := msc_atp_pvt.get_date_from_seqnum(
2489: l_middle_seqnum,

Line 2497: msc_sch_wb.atp_debug('Schedule: ' || 'l_number_of_iterations: ' || l_number_of_iterations);

2493: IF l_loop_count = 2 THEN
2494: l_number_of_iterations := floor(LOG(2,((l_high_seqnum-l_low_seqnum) + 1))) + 1;
2495:
2496: IF PG_DEBUG in ('Y', 'C') THEN
2497: msc_sch_wb.atp_debug('Schedule: ' || 'l_number_of_iterations: ' || l_number_of_iterations);
2498: END IF;
2499: --5211558 Store the number of iterations to know which is the last pass
2500: IF l_time_phased_atp = 'Y' AND G_FORWARD_ATP = 'Y' THEN
2501: G_NUMBER_OF_ITERATIONS := l_number_of_iterations;

Line 2504: msc_sch_wb.atp_debug('Schedule: ' || 'G_NUMBER_OF_ITERATIONS: ' || G_NUMBER_OF_ITERATIONS);

2500: IF l_time_phased_atp = 'Y' AND G_FORWARD_ATP = 'Y' THEN
2501: G_NUMBER_OF_ITERATIONS := l_number_of_iterations;
2502:
2503: IF PG_DEBUG in ('Y', 'C') THEN
2504: msc_sch_wb.atp_debug('Schedule: ' || 'G_NUMBER_OF_ITERATIONS: ' || G_NUMBER_OF_ITERATIONS);
2505: END IF;
2506: END IF;
2507: END IF;
2508:

Line 2510: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);

2506: END IF;
2507: END IF;
2508:
2509: IF PG_DEBUG in ('Y', 'C') THEN
2510: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
2511: END IF;
2512: END IF;
2513: --optional_fw end
2514: /* ship_rec_cal changes begin

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

2514: /* ship_rec_cal changes begin
2515: If ship date is provided validate it on OSC
2516: If arrival date is provided validate it on ORC, offset using VIC, validate it on OSC*/
2517: IF PG_DEBUG in ('Y', 'C') THEN
2518: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');
2519: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);
2520: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);
2521: msc_sch_wb.atp_debug('Schedule: ');
2522: END IF;

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

2515: If ship date is provided validate it on OSC
2516: If arrival date is provided validate it on ORC, offset using VIC, validate it on OSC*/
2517: IF PG_DEBUG in ('Y', 'C') THEN
2518: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');
2519: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);
2520: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);
2521: msc_sch_wb.atp_debug('Schedule: ');
2522: END IF;
2523: -- Bug3593394 - Recalculate date only if parameters have changed

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

2516: If arrival date is provided validate it on ORC, offset using VIC, validate it on OSC*/
2517: IF PG_DEBUG in ('Y', 'C') THEN
2518: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');
2519: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);
2520: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);
2521: msc_sch_wb.atp_debug('Schedule: ');
2522: END IF;
2523: -- Bug3593394 - Recalculate date only if parameters have changed
2524: IF (i=1)

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

2517: IF PG_DEBUG in ('Y', 'C') THEN
2518: msc_sch_wb.atp_debug('Schedule: ' || '___________________Start Offset___________________');
2519: msc_sch_wb.atp_debug('Schedule: ' || 'Req Ship Date: ' || l_atp_rec.requested_ship_date);
2520: msc_sch_wb.atp_debug('Schedule: ' || 'Req Arrival Date: ' || l_atp_rec.requested_arrival_date);
2521: msc_sch_wb.atp_debug('Schedule: ');
2522: END IF;
2523: -- Bug3593394 - Recalculate date only if parameters have changed
2524: IF (i=1)
2525: OR (MSC_ATP_PVT.G_OPTIONAL_FW is null)

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

2549: l_atp_rec.instance_id,
2550: l_atp_rec.requested_arrival_date);
2551:
2552: IF PG_DEBUG in ('Y', 'C') THEN
2553: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on ORC/CRC: ' || l_requested_ship_date);
2554: END IF;
2555:
2556: IF trunc(l_requested_ship_date) <> trunc(l_atp_rec.requested_arrival_date) THEN
2557: G_CALENDAR_CONSTRAINT := 'Y';

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

2565: -1 * nvl(l_atp_rec.delivery_lead_time, 0),
2566: -1);
2567:
2568: IF PG_DEBUG in ('Y', 'C') THEN
2569: msc_sch_wb.atp_debug('Schedule: ' || 'Date after subtracting intransit LT using VIC: ' || l_requested_ship_date);
2570: END IF;
2571:
2572: l_requested_ship_date := MSC_CALENDAR.PREV_WORK_DAY(
2573: l_atp_rec.shipping_cal_code,

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

2586: END IF;
2587: END IF;
2588:
2589: IF PG_DEBUG in ('Y', 'C') THEN
2590: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);
2591: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2592: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2593: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2594: END IF;

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

2587: END IF;
2588:
2589: IF PG_DEBUG in ('Y', 'C') THEN
2590: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);
2591: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2592: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2593: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2594: END IF;
2595:

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

2588:
2589: IF PG_DEBUG in ('Y', 'C') THEN
2590: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);
2591: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2592: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2593: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2594: END IF;
2595:
2596: IF l_requested_ship_date is NULL THEN

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

2589: IF PG_DEBUG in ('Y', 'C') THEN
2590: msc_sch_wb.atp_debug('Schedule: ' || 'Date after validating on OSC: ' || l_requested_ship_date);
2591: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2592: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2593: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2594: END IF;
2595:
2596: IF l_requested_ship_date is NULL THEN
2597: l_atp_table.error_code(i) := MSC_ATP_PVT.ATP_INVALID_DATE;

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

2601: --bug 3322846: Move past due ship date to the first working day after sysdate
2602: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929
2603: L_MOVE_PAST_DUE_TO_SYSDATE := MSC_ATP_PVT.G_MOV_PAST_DUE_SYSDATE_PROF;--6316476
2604: IF PG_DEBUG in ('Y', 'C') THEN
2605: msc_sch_wb.atp_debug('Schedule: ' || 'MOVE_PAST_DUE_TO_SYS_DATE :'|| L_MOVE_PAST_DUE_TO_SYSDATE);
2606: END IF;
2607: if L_MOVE_PAST_DUE_TO_SYSDATE = 'Y' THEN -- Bug 5584634/5618929
2608: IF l_requested_ship_date < l_sys_next_date THEN
2609:

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

2607: if L_MOVE_PAST_DUE_TO_SYSDATE = 'Y' THEN -- Bug 5584634/5618929
2608: IF l_requested_ship_date < l_sys_next_date THEN
2609:
2610: IF PG_DEBUG in ('Y', 'C') THEN
2611: msc_sch_wb.atp_debug('Schedule: ' || 'Request date is less than sysdate');
2612: END IF;
2613: l_requested_ship_date := MSC_CALENDAR.NEXT_WORK_DAY(
2614: l_atp_rec.shipping_cal_code,
2615: l_atp_rec.instance_id,

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

2616: l_sys_next_date);
2617:
2618: l_past_due_ship_date := 1; --bug4291375 setting for past due ship date
2619: IF PG_DEBUG in ('Y', 'C') THEN
2620: msc_sch_wb.atp_debug('Schedule: ' || 'New l_requested_ship_date := ' || l_requested_ship_date);
2621: END IF;
2622: END IF;
2623: END IF; -- Bug 5584634/5618929
2624:

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

2628: END IF;
2629:
2630: ELSE -- Bug3593394
2631: IF PG_DEBUG in ('Y', 'C') THEN
2632: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');
2633: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2634: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2635: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2636: END IF;

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

2629:
2630: ELSE -- Bug3593394
2631: IF PG_DEBUG in ('Y', 'C') THEN
2632: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');
2633: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2634: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2635: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2636: END IF;
2637: END IF; -- Bug3593394

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

2630: ELSE -- Bug3593394
2631: IF PG_DEBUG in ('Y', 'C') THEN
2632: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');
2633: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2634: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2635: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2636: END IF;
2637: END IF; -- Bug3593394
2638:

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

2631: IF PG_DEBUG in ('Y', 'C') THEN
2632: msc_sch_wb.atp_debug('Schedule: ' || 'Ship date parameters have not changed.');
2633: msc_sch_wb.atp_debug('Schedule: ' || 'l_requested_ship_date: ' || l_requested_ship_date);
2634: msc_sch_wb.atp_debug('Schedule: ' || 'G_CALENDAR_CONSTRAINT: ' || G_CALENDAR_CONSTRAINT);
2635: msc_sch_wb.atp_debug('Schedule: ' || '___________________End Offset___________________');
2636: END IF;
2637: END IF; -- Bug3593394
2638:
2639: l_atp_rec.requested_ship_date := l_requested_ship_date;

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

2679: --END IF;
2680: -- ATP Override rajjain begin
2681: IF l_atp_table.Action(i) = ATPQUERY THEN
2682: IF PG_DEBUG in ('Y', 'C') THEN
2683: msc_sch_wb.atp_debug('Schedule: ' || 'Override Flag: '||l_atp_rec.override_flag);
2684: END IF;
2685:
2686: l_atp_rec.override_flag := 'N';
2687:

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

2685:
2686: l_atp_rec.override_flag := 'N';
2687:
2688: IF PG_DEBUG in ('Y', 'C') THEN
2689: msc_sch_wb.atp_debug('Schedule: ' || 'ATPQUERY - Setting the Override Flag to : '||l_atp_rec.override_flag);
2690: END IF;
2691: ELSE
2692: l_atp_rec.override_flag := l_atp_table.Override_Flag(i);
2693:

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

2714: -- for multi_level/ multi_org cto support
2715: l_atp_rec.calling_module := l_atp_table.calling_module(i);
2716: l_stmt := 210;
2717: IF PG_DEBUG in ('Y', 'C') THEN
2718: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
2719: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Inventory_Item_Id:' || to_char(l_atp_rec.Inventory_Item_Id)
2720: ||' l_atp_rec.request_item_id:' || to_char(l_atp_rec.request_item_id)
2721: ||' l_atp_rec.organization_id:' || to_char(l_atp_rec.organization_id) );
2722: END IF;

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

2715: l_atp_rec.calling_module := l_atp_table.calling_module(i);
2716: l_stmt := 210;
2717: IF PG_DEBUG in ('Y', 'C') THEN
2718: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
2719: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Inventory_Item_Id:' || to_char(l_atp_rec.Inventory_Item_Id)
2720: ||' l_atp_rec.request_item_id:' || to_char(l_atp_rec.request_item_id)
2721: ||' l_atp_rec.organization_id:' || to_char(l_atp_rec.organization_id) );
2722: END IF;
2723:

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

2740: -- CTO_PF_PRJ_2 changes for CTO PF Cross Project Impacts
2741: -- Set the default to No PF ATP Items being processed.
2742: MSC_ATP_PVT.G_CTO_PF_ATP := 'N';
2743: IF PG_DEBUG in ('Y', 'C') THEN
2744: msc_sch_wb.atp_debug('Schedule: ' || 'Before ATP_Check for this l_atp_rec ');
2745: msc_sch_wb.atp_debug('Schedule: Init G_CTO_PF_ATP to ' ||
2746: MSC_ATP_PVT.G_CTO_PF_ATP);
2747: END IF;
2748: -- End CTO_PF_PRJ_2 changes for CTO PF Cross Project Impacts

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

2741: -- Set the default to No PF ATP Items being processed.
2742: MSC_ATP_PVT.G_CTO_PF_ATP := 'N';
2743: IF PG_DEBUG in ('Y', 'C') THEN
2744: msc_sch_wb.atp_debug('Schedule: ' || 'Before ATP_Check for this l_atp_rec ');
2745: msc_sch_wb.atp_debug('Schedule: Init G_CTO_PF_ATP to ' ||
2746: MSC_ATP_PVT.G_CTO_PF_ATP);
2747: END IF;
2748: -- End CTO_PF_PRJ_2 changes for CTO PF Cross Project Impacts
2749:

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

2749:
2750: --- subst
2751:
2752: IF PG_DEBUG in ('Y', 'C') THEN
2753: msc_sch_wb.atp_debug('Schedule: ' || 'G_PLAN_SUBST_FLAG := ' || MSC_ATP_PVT.G_PLAN_SUBST_FLAG);
2754: END IF;
2755:
2756: IF MSC_ATP_PVT.G_INV_CTP = 4 AND
2757: NVL(MSC_ATP_PVT.G_PLAN_SUBST_FLAG, 2) = 1 THEN

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

2755:
2756: IF MSC_ATP_PVT.G_INV_CTP = 4 AND
2757: NVL(MSC_ATP_PVT.G_PLAN_SUBST_FLAG, 2) = 1 THEN
2758: IF PG_DEBUG in ('Y', 'C') THEN
2759: msc_sch_wb.atp_debug('Schedule: ' || 'count := ' || l_item_substitute_rec.inventory_item_id.count);
2760: msc_sch_wb.atp_debug('Schedule: ' || 'G_CREATE_SUPPLY_FLAG := ' || MSC_ATP_SUBST.G_CREATE_SUPPLY_FLAG);
2761: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2762: END IF;
2763:

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

2756: IF MSC_ATP_PVT.G_INV_CTP = 4 AND
2757: NVL(MSC_ATP_PVT.G_PLAN_SUBST_FLAG, 2) = 1 THEN
2758: IF PG_DEBUG in ('Y', 'C') THEN
2759: msc_sch_wb.atp_debug('Schedule: ' || 'count := ' || l_item_substitute_rec.inventory_item_id.count);
2760: msc_sch_wb.atp_debug('Schedule: ' || 'G_CREATE_SUPPLY_FLAG := ' || MSC_ATP_SUBST.G_CREATE_SUPPLY_FLAG);
2761: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2762: END IF;
2763:
2764: -- check if one and only one of the requested_ship_date and

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

2757: NVL(MSC_ATP_PVT.G_PLAN_SUBST_FLAG, 2) = 1 THEN
2758: IF PG_DEBUG in ('Y', 'C') THEN
2759: msc_sch_wb.atp_debug('Schedule: ' || 'count := ' || l_item_substitute_rec.inventory_item_id.count);
2760: msc_sch_wb.atp_debug('Schedule: ' || 'G_CREATE_SUPPLY_FLAG := ' || MSC_ATP_SUBST.G_CREATE_SUPPLY_FLAG);
2761: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2762: END IF;
2763:
2764: -- check if one and only one of the requested_ship_date and
2765: -- requested_arrival_date is provided

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

2781:
2782: RAISE FND_API.G_EXC_ERROR;
2783: END IF;
2784: IF PG_DEBUG in ('Y', 'C') THEN
2785: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2786: END IF;
2787:
2788: -- old dlt code
2789:

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

2793: -- item we need to do the offset. The reason of doing this is to avoid
2794: -- database hit.
2795:
2796: IF PG_DEBUG in ('Y', 'C') THEN
2797: msc_sch_wb.atp_debug('Schedule: ' || 'Point 3');
2798: END IF;
2799:
2800: l_atp_rec.delivery_lead_time := l_delivery_lead_time;
2801: l_atp_rec.ship_method := l_ship_method;

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

2801: l_atp_rec.ship_method := l_ship_method;
2802: l_atp_rec.requested_ship_date := l_requested_ship_date;
2803: l_atp_rec.requested_arrival_date := null;
2804: IF PG_DEBUG in ('Y', 'C') THEN
2805: msc_sch_wb.atp_debug('Schedule: ' || 'ship_method = '||l_ship_method ||' lead time = '||l_delivery_lead_time);
2806: END IF;
2807:
2808: -----------
2809: /* Modularize Item and Org Info */

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

2822: l_post_pro_lt := G_ITEM_INFO_REC.post_pro_lt;
2823: l_inventory_item_id := G_ITEM_INFO_REC.dest_inv_item_id;
2824: l_item_name := G_ITEM_INFO_REC.item_name;
2825: IF PG_DEBUG in ('Y', 'C') THEN
2826: msc_sch_wb.atp_debug('Schedule: ' || ' Create supply flag :=' ||
2827: G_ITEM_INFO_REC.create_supply_flag);
2828: END IF;
2829: /* Modularize Item and Org Info */
2830:

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

2829: /* Modularize Item and Org Info */
2830:
2831: l_substitution_type := l_atp_table.substitution_typ_code(i);
2832: IF PG_DEBUG in ('Y', 'C') THEN
2833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2835: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2836: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2837: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

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

2830:
2831: l_substitution_type := l_atp_table.substitution_typ_code(i);
2832: IF PG_DEBUG in ('Y', 'C') THEN
2833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2835: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2836: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2837: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2838: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);

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

2831: l_substitution_type := l_atp_table.substitution_typ_code(i);
2832: IF PG_DEBUG in ('Y', 'C') THEN
2833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2835: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2836: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2837: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2838: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2839: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);

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

2832: IF PG_DEBUG in ('Y', 'C') THEN
2833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2835: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2836: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2837: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2838: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2839: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);
2840: END IF;

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

2833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_flag := ' || l_atp_flag);
2834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2835: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2836: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2837: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2838: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2839: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);
2840: END IF;
2841: ---bug 2341073 : null out the l_item_substitute_rec else values for last item might get used again

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

2834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_comp_flag := ' || l_atp_comp_flag);
2835: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2836: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2837: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2838: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2839: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);
2840: END IF;
2841: ---bug 2341073 : null out the l_item_substitute_rec else values for last item might get used again
2842: l_item_substitute_rec := l_null_item_sub_rec;

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

2835: msc_sch_wb.atp_debug('Schedule: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
2836: msc_sch_wb.atp_debug('Schedule: ' || 'l_fixed_lt := ' || l_fixed_lt);
2837: msc_sch_wb.atp_debug('Schedule: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
2838: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_name :=' || l_item_name);
2839: msc_sch_wb.atp_debug('Schedule: ' || 'l_substitution_type := ' || l_substitution_type);
2840: END IF;
2841: ---bug 2341073 : null out the l_item_substitute_rec else values for last item might get used again
2842: l_item_substitute_rec := l_null_item_sub_rec;
2843:

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

2856: l_atp_rec.organization_id);
2857: END IF;
2858:
2859: IF PG_DEBUG in ('Y', 'C') THEN
2860: msc_sch_wb.atp_debug('Schedule: ' || ' subst count := ' || l_item_substitute_rec.inventory_item_id.count);
2861: END IF;
2862:
2863: IF l_item_substitute_rec.inventory_item_id.count > 0 AND
2864: (NVL(l_substitution_type, 4) = 4 OR

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

2868: --- if item has substitutes but we dont want to do any substitution then
2869: --- we will do breadth first search. But we dont want to use any substitutes.
2870: --- Therefore we remove all the substitutes from the table
2871: IF PG_DEBUG in ('Y', 'C') THEN
2872: msc_sch_wb.atp_debug('Schedule: ' || 'Substitution defined but not doing substitution');
2873: END IF;
2874: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'Y';
2875: l_highest_rev := l_item_substitute_rec.highest_revision_item_id(1);
2876: l_item_substitute_rec := l_null_item_sub_rec;

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

2877:
2878: ELSIF NVL(l_substitution_type, 4) = 4 or
2879: (l_item_substitute_rec.inventory_item_id.count = 0) THEN
2880: IF PG_DEBUG in ('Y', 'C') THEN
2881: msc_sch_wb.atp_debug('Schedule: ' || 'Substitute not defined');
2882: END IF;
2883: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'N';
2884: ELSE
2885: IF PG_DEBUG in ('Y', 'C') THEN

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

2882: END IF;
2883: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'N';
2884: ELSE
2885: IF PG_DEBUG in ('Y', 'C') THEN
2886: msc_sch_wb.atp_debug('Schedule: ' || 'Substitution defined and doing substitution');
2887: END IF;
2888: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'Y';
2889: END IF;
2890:

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

2896: ELSE
2897: -- Modular re-use of info.
2898: l_create_supply_on_orig_item := G_ITEM_INFO_REC.create_supply_flag;
2899: IF PG_DEBUG in ('Y', 'C') THEN
2900: msc_sch_wb.atp_debug('Schedule: ' || ' Re-use Create supply flag :=' ||
2901: G_ITEM_INFO_REC.create_supply_flag);
2902: END IF;
2903: -- Modular re-use of info.
2904:

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

2907:
2908: --- now add the original item
2909: l_count := l_item_substitute_rec.inventory_item_id.count;
2910: IF PG_DEBUG in ('Y', 'C') THEN
2911: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
2912: END IF;
2913: MSC_ATP_SUBST.Extend_Item_Info_Rec_Typ(l_item_substitute_rec, l_return_status);
2914: IF PG_DEBUG in ('Y', 'C') THEN
2915: msc_sch_wb.atp_debug('Schedule: ' || 'After extending Item info');

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

2911: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
2912: END IF;
2913: MSC_ATP_SUBST.Extend_Item_Info_Rec_Typ(l_item_substitute_rec, l_return_status);
2914: IF PG_DEBUG in ('Y', 'C') THEN
2915: msc_sch_wb.atp_debug('Schedule: ' || 'After extending Item info');
2916: END IF;
2917: l_count := l_item_substitute_rec.inventory_item_id.count;
2918: IF PG_DEBUG in ('Y', 'C') THEN
2919: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);

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

2915: msc_sch_wb.atp_debug('Schedule: ' || 'After extending Item info');
2916: END IF;
2917: l_count := l_item_substitute_rec.inventory_item_id.count;
2918: IF PG_DEBUG in ('Y', 'C') THEN
2919: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
2920: END IF;
2921: l_item_substitute_rec.inventory_item_id(l_count) := l_inventory_item_id;
2922: --l_item_substitute_rec.sr_inventory_item_id(l_count) := l_atp_rec.inventory_item_id;
2923: --l_requested_item_id has member_item_id.l_atp_rec.inventory_item_id has family id.

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

2981:
2982: --l_item_substitute_rec.requested_ship_date(l_count) := l_requested_ship_date;
2983: FOR i in 1..l_item_substitute_rec.inventory_item_id.count LOOP
2984: IF PG_DEBUG in ('Y', 'C') THEN
2985: msc_sch_wb.atp_debug('Schedule: ' || 'Item ' || i || ' := ' || l_item_substitute_rec.inventory_item_id(i));
2986: END IF;
2987: END LOOP;
2988:
2989:

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

2987: END LOOP;
2988:
2989:
2990: IF PG_DEBUG in ('Y', 'C') THEN
2991: msc_sch_wb.atp_debug('Schedule: ' || 'l_item_count := ' || l_item_substitute_rec.inventory_item_id.count);
2992: END IF;
2993: END IF;
2994:
2995: ELSE

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

2997: MSC_ATP_PVT.G_SUBSTITUTION_FLAG := 'N';
2998:
2999: END IF;
3000: IF PG_DEBUG in ('Y', 'C') THEN
3001: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUBSTITUTION_FLAG := ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3002: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id := ' || l_plan_id);
3003: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP);
3004: msc_sch_wb.atp_debug('Schedule: ' || 'l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3005: END IF;

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

2998:
2999: END IF;
3000: IF PG_DEBUG in ('Y', 'C') THEN
3001: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUBSTITUTION_FLAG := ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3002: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id := ' || l_plan_id);
3003: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP);
3004: msc_sch_wb.atp_debug('Schedule: ' || 'l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3005: END IF;
3006:

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

2999: END IF;
3000: IF PG_DEBUG in ('Y', 'C') THEN
3001: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUBSTITUTION_FLAG := ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3002: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id := ' || l_plan_id);
3003: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP);
3004: msc_sch_wb.atp_debug('Schedule: ' || 'l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3005: END IF;
3006:
3007: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 3004: msc_sch_wb.atp_debug('Schedule: ' || 'l_g_inv_ctp := ' || l_g_inv_ctp); --5158454

3000: IF PG_DEBUG in ('Y', 'C') THEN
3001: msc_sch_wb.atp_debug('Schedule: ' || 'G_SUBSTITUTION_FLAG := ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3002: msc_sch_wb.atp_debug('Schedule: ' || 'l_plan_id := ' || l_plan_id);
3003: msc_sch_wb.atp_debug('Schedule: ' || 'G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP);
3004: msc_sch_wb.atp_debug('Schedule: ' || 'l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3005: END IF;
3006:
3007: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
3008:

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

3026: l_atp_supply_demand,
3027: l_return_status);
3028: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3029: IF PG_DEBUG in ('Y', 'C') THEN
3030: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
3031: END IF;
3032: x_return_status := FND_API.G_RET_STS_ERROR;
3033: --2741997
3034: l_atp_table.Error_Code(i):= l_atp_rec.Error_Code;

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

3046: l_bkwd_pass_atf_date_qty := l_atp_rec.atf_date_quantity;
3047: END IF;
3048:
3049: IF PG_DEBUG in ('Y', 'C') THEN
3050: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);
3051: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
3052: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
3053: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);
3054: END IF;

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

3047: END IF;
3048:
3049: IF PG_DEBUG in ('Y', 'C') THEN
3050: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);
3051: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
3052: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
3053: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);
3054: END IF;
3055: --bug3467631 end

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

3048:
3049: IF PG_DEBUG in ('Y', 'C') THEN
3050: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);
3051: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
3052: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
3053: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);
3054: END IF;
3055: --bug3467631 end
3056:

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

3049: IF PG_DEBUG in ('Y', 'C') THEN
3050: msc_sch_wb.atp_debug('Schedule: ' || 'l_atf_date = '||l_atf_date);
3051: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
3052: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
3053: msc_sch_wb.atp_debug('Schedule: ' || 'l_bkwd_pass_atf_date_qty = '||l_bkwd_pass_atf_date_qty);
3054: END IF;
3055: --bug3467631 end
3056:
3057: ---- add this item to MSC_ATP_PVT.G_PEGGING_FOR_SET as this is used to remove the demands if needed

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

3066: --- As a result we are loosing time component. So we restore the date back.
3067: IF l_atp_table.requested_ship_date(i) is not null THEN
3068: l_atp_rec.requested_ship_date := l_atp_table.requested_ship_date(i);
3069: IF PG_DEBUG in ('Y', 'C') THEN
3070: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_table.requested_ship_date(i), 'mm-dd-yy hh:mm:ss'));
3071: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the ship date bug 2361283');
3072: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_rec.requested_ship_date, 'mm-dd-yy hh:mm:ss'));
3073: END IF;
3074: END IF;

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

3067: IF l_atp_table.requested_ship_date(i) is not null THEN
3068: l_atp_rec.requested_ship_date := l_atp_table.requested_ship_date(i);
3069: IF PG_DEBUG in ('Y', 'C') THEN
3070: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_table.requested_ship_date(i), 'mm-dd-yy hh:mm:ss'));
3071: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the ship date bug 2361283');
3072: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_rec.requested_ship_date, 'mm-dd-yy hh:mm:ss'));
3073: END IF;
3074: END IF;
3075:

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

3068: l_atp_rec.requested_ship_date := l_atp_table.requested_ship_date(i);
3069: IF PG_DEBUG in ('Y', 'C') THEN
3070: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_table.requested_ship_date(i), 'mm-dd-yy hh:mm:ss'));
3071: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the ship date bug 2361283');
3072: msc_sch_wb.atp_debug('Schedule: ' || 'Orig Date := ' || to_char(l_atp_rec.requested_ship_date, 'mm-dd-yy hh:mm:ss'));
3073: END IF;
3074: END IF;
3075:
3076: -- Commented for bug 2748730. G_END_OF_DAY not required here.

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

3078: -- for bug 2259824, add end of day to ship date
3079: IF l_atp_rec.ship_date IS NOT NULL THEN
3080: l_atp_rec.ship_date := TRUNC(l_atp_rec.ship_date) + MSC_ATP_PVT.G_END_OF_DAY ;
3081: IF PG_DEBUG in ('Y', 'C') THEN
3082: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||
3083: to_char(l_atp_rec.ship_date, 'DD-MON-YYYY HH24:MI:SS'));
3084: END IF;
3085: END IF;
3086: */

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

3112: l_atp_rec.override_flag :=l_atp_table.override_flag(i); --plan by request date
3113:
3114:
3115: IF PG_DEBUG in ('Y', 'C') THEN
3116: msc_sch_wb.atp_debug('Call ATP_Check');
3117: END IF;
3118: --e_cto_rearch
3119: MSC_ATP_PVT.ATP_Check(l_atp_rec,
3120: l_plan_id,

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

3132: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;
3133:
3134: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3135: IF PG_DEBUG in ('Y', 'C') THEN
3136: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
3137: END IF;
3138: x_return_status := FND_API.G_RET_STS_ERROR;
3139: --2741997
3140: -- l_atp_table.Error_Code(k):= l_atp_rec.Error_Code;

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

3142: RAISE NO_DATA_FOUND;
3143: END IF;
3144:
3145: IF PG_DEBUG in ('Y', 'C') THEN
3146: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
3147: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
3148: END IF;
3149: -- No NVL is needed on atf_date_quantity bug3555084
3150: --l_atp_rec.atf_date_quantity := GREATEST(NVL(l_atp_rec.atf_date_quantity, 0), 0);

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

3143: END IF;
3144:
3145: IF PG_DEBUG in ('Y', 'C') THEN
3146: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date_quantity = '||l_atp_rec.atf_date_quantity);
3147: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.used_available_quantity = '||l_atp_rec.used_available_quantity);
3148: END IF;
3149: -- No NVL is needed on atf_date_quantity bug3555084
3150: --l_atp_rec.atf_date_quantity := GREATEST(NVL(l_atp_rec.atf_date_quantity, 0), 0);
3151: --bug3397904 start

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

3164: -- for bug 2259824, add end of day to ship date
3165: IF l_atp_rec.ship_date IS NOT NULL THEN
3166: l_atp_rec.ship_date := TRUNC(l_atp_rec.ship_date) + MSC_ATP_PVT.G_END_OF_DAY ;
3167: IF PG_DEBUG in ('Y', 'C') THEN
3168: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||
3169: to_char(l_atp_rec.ship_date, 'DD-MON-YYYY HH24:MI:SS'));
3170: END IF;
3171: END IF;
3172: */

Line 3208: msc_sch_wb.atp_debug('Schedule: ' || 'l_g_inv_ctp = '||l_g_inv_ctp );

3204: MSC_ATP_PVT.G_PTF_DATE := l_sys_next_date;
3205:
3206: --9239406
3207: IF PG_DEBUG in ('Y', 'C') THEN
3208: msc_sch_wb.atp_debug('Schedule: ' || 'l_g_inv_ctp = '||l_g_inv_ctp );
3209: END IF;
3210: IF (l_g_inv_ctp = 5) then -- -- If it is set to one, PDS-ODS switch has happened, otherwise no.
3211:
3212: MSC_ATP_PVT.G_INV_CTP := 5;

Line 3221: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the profiles in case of PSD-ODS switch' );

3217: MSC_ATP_PVT.G_HYBRID_ALLOC_ATP := 'N'; -- ALLOC ATP CHANGES, 12973673
3218: MSC_ATP_PVT.G_FORWARD_ATP := 'N';
3219:
3220: IF PG_DEBUG in ('Y', 'C') THEN
3221: msc_sch_wb.atp_debug('Schedule: ' || 'Reset the profiles in case of PSD-ODS switch' );
3222: END IF;
3223:
3224: END IF;
3225:

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

3223:
3224: END IF;
3225:
3226: IF PG_DEBUG in ('Y', 'C') THEN
3227: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ='||MSC_ATP_PVT.G_INV_CTP );
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.quantity_ordered ='||l_future_atp_rec.quantity_ordered );
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity ='||l_atp_rec.requested_date_quantity);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty ='||l_atp_rec.combined_requested_date_qty);
3231: END IF;

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

3224: END IF;
3225:
3226: IF PG_DEBUG in ('Y', 'C') THEN
3227: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ='||MSC_ATP_PVT.G_INV_CTP );
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.quantity_ordered ='||l_future_atp_rec.quantity_ordered );
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity ='||l_atp_rec.requested_date_quantity);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty ='||l_atp_rec.combined_requested_date_qty);
3231: END IF;
3232:

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

3225:
3226: IF PG_DEBUG in ('Y', 'C') THEN
3227: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ='||MSC_ATP_PVT.G_INV_CTP );
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.quantity_ordered ='||l_future_atp_rec.quantity_ordered );
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity ='||l_atp_rec.requested_date_quantity);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty ='||l_atp_rec.combined_requested_date_qty);
3231: END IF;
3232:
3233: MSC_ATP_PVT.ATP_Check(l_future_atp_rec,

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

3226: IF PG_DEBUG in ('Y', 'C') THEN
3227: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ='||MSC_ATP_PVT.G_INV_CTP );
3228: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.quantity_ordered ='||l_future_atp_rec.quantity_ordered );
3229: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity ='||l_atp_rec.requested_date_quantity);
3230: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty ='||l_atp_rec.combined_requested_date_qty);
3231: END IF;
3232:
3233: MSC_ATP_PVT.ATP_Check(l_future_atp_rec,
3234: l_plan_id,

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

3250: MSC_ATP_PVT.G_ATO_UNCOLL_ITEM,
3251: MSC_ATP_PVT.G_NO_PLAN_FOUND)
3252: THEN
3253: IF PG_DEBUG in ('Y', 'C') THEN
3254: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails in future case');
3255: END IF;
3256: --2741997
3257: x_return_status := FND_API.G_RET_STS_ERROR;
3258: l_atp_rec.error_code := l_future_atp_rec.Error_code;

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

3265: -- for bug 2259824, add end of day to ship date
3266: l_atp_rec.ship_date := TRUNC(l_future_atp_rec.ship_date) + MSC_ATP_PVT.G_END_OF_DAY ;
3267:
3268: IF PG_DEBUG in ('Y', 'C') THEN
3269: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_rec.ship_date = '||
3270: to_char(l_atp_rec.ship_date, 'DD-MON-YYYY HH24:MI:SS'));
3271: END IF;
3272: */
3273:

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

3275: -- make sure we won't ouput any available_quantity which is
3276: -- greater than the infinite number
3277:
3278: IF PG_DEBUG in ('Y', 'C') THEN
3279: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.available_quantity = '||
3280: to_char(nvl(l_future_atp_rec.available_quantity, -99)));
3281: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||
3282: l_future_atp_rec.used_available_quantity); --bug3409973
3283: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||

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

3277:
3278: IF PG_DEBUG in ('Y', 'C') THEN
3279: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.available_quantity = '||
3280: to_char(nvl(l_future_atp_rec.available_quantity, -99)));
3281: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||
3282: l_future_atp_rec.used_available_quantity); --bug3409973
3283: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||
3284: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
3285: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||

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

3279: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.available_quantity = '||
3280: to_char(nvl(l_future_atp_rec.available_quantity, -99)));
3281: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||
3282: l_future_atp_rec.used_available_quantity); --bug3409973
3283: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||
3284: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
3285: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||
3286: to_char(nvl(l_atp_rec.requested_date_quantity, -99)));
3287: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);

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

3281: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.used_available_quantity = '||
3282: l_future_atp_rec.used_available_quantity); --bug3409973
3283: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||
3284: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
3285: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||
3286: to_char(nvl(l_atp_rec.requested_date_quantity, -99)));
3287: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);
3288: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.atf_date_quantity = '||l_future_atp_rec.atf_date_quantity);
3289: END IF;

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

3283: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty = '||
3284: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
3285: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||
3286: to_char(nvl(l_atp_rec.requested_date_quantity, -99)));
3287: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);
3288: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.atf_date_quantity = '||l_future_atp_rec.atf_date_quantity);
3289: END IF;
3290:
3291: IF (l_future_atp_rec.atf_date_quantity is null) and (l_future_atp_rec.ship_date <= l_atf_date) THEN

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

3284: to_char(nvl(l_atp_rec.combined_requested_date_qty, -99)));
3285: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.requested_date_quantity = '||
3286: to_char(nvl(l_atp_rec.requested_date_quantity, -99)));
3287: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity before adding qty from future = '||l_atp_rec.atf_date_quantity);
3288: msc_sch_wb.atp_debug('Schedule: ' || 'l_future_atp_rec.atf_date_quantity = '||l_future_atp_rec.atf_date_quantity);
3289: END IF;
3290:
3291: IF (l_future_atp_rec.atf_date_quantity is null) and (l_future_atp_rec.ship_date <= l_atf_date) THEN
3292: l_future_atp_rec.atf_date_quantity := l_future_atp_rec.quantity_ordered;

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

3303: GREATEST(NVL(l_future_atp_rec.atf_date_quantity, 0), 0);
3304: END IF;
3305:
3306: IF PG_DEBUG in ('Y', 'C') THEN
3307: msc_sch_wb.atp_debug('Schedule: ' || 'atf_date_quantity after adding qty from future = '||l_atp_rec.atf_date_quantity);
3308: END IF;
3309:
3310: -- cchen 1238941
3311: -- 1411818 : add greatest

Line 3359: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search End ____');

3355: END IF;
3356: END IF; -- IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4
3357: --optional_fw start
3358: IF PG_DEBUG in ('Y', 'C') THEN
3359: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search End ____');
3360: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_last_search: ' || l_last_search);
3361: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_low_seqnum: ' || l_low_seqnum);
3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);
3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);

Line 3360: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_last_search: ' || l_last_search);

3356: END IF; -- IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4
3357: --optional_fw start
3358: IF PG_DEBUG in ('Y', 'C') THEN
3359: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search End ____');
3360: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_last_search: ' || l_last_search);
3361: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_low_seqnum: ' || l_low_seqnum);
3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);
3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);
3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);

Line 3361: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_low_seqnum: ' || l_low_seqnum);

3357: --optional_fw start
3358: IF PG_DEBUG in ('Y', 'C') THEN
3359: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search End ____');
3360: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_last_search: ' || l_last_search);
3361: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_low_seqnum: ' || l_low_seqnum);
3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);
3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);
3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);

Line 3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);

3358: IF PG_DEBUG in ('Y', 'C') THEN
3359: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search End ____');
3360: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_last_search: ' || l_last_search);
3361: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_low_seqnum: ' || l_low_seqnum);
3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);
3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);
3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);

Line 3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);

3359: msc_sch_wb.atp_debug('Schedule: ' || '___OPTIONAL FW PASS Binary Search End ____');
3360: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_last_search: ' || l_last_search);
3361: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_low_seqnum: ' || l_low_seqnum);
3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);
3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);
3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);

Line 3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);

3360: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_last_search: ' || l_last_search);
3361: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_low_seqnum: ' || l_low_seqnum);
3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);
3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);
3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);

Line 3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);

3361: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_low_seqnum: ' || l_low_seqnum);
3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);
3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);
3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);
3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);

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

3362: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_high_seqnum: ' || l_high_seqnum);
3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);
3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);
3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3370: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_DIAGNOSTIC_ATP: ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);

Line 3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);

3363: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_middle_seqnum: ' || l_middle_seqnum);
3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);
3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3370: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_DIAGNOSTIC_ATP: ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);
3371: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP); --5158454

Line 3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);

3364: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_ship_date: ' || l_atp_rec.requested_ship_date);
3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);
3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3370: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_DIAGNOSTIC_ATP: ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);
3371: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP); --5158454
3372: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_g_inv_ctp := ' || l_g_inv_ctp); --5158454

Line 3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);

3365: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.requested_date_quantity: ' || l_atp_rec.requested_date_quantity);
3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);
3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3370: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_DIAGNOSTIC_ATP: ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);
3371: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP); --5158454
3372: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3373: END IF;

Line 3370: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_DIAGNOSTIC_ATP: ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);

3366: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_atp_rec.quantity_ordered: ' || l_atp_rec.quantity_ordered);
3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);
3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3370: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_DIAGNOSTIC_ATP: ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);
3371: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP); --5158454
3372: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3373: END IF;
3374: IF MSC_ATP_PVT.G_OPTIONAL_FW is null THEN

Line 3371: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP); --5158454

3367: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);
3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3370: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_DIAGNOSTIC_ATP: ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);
3371: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP); --5158454
3372: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3373: END IF;
3374: IF MSC_ATP_PVT.G_OPTIONAL_FW is null THEN
3375: IF PG_DEBUG in ('Y', 'C') THEN

Line 3372: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_g_inv_ctp := ' || l_g_inv_ctp); --5158454

3368: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_FORWARD_ATP: ' || MSC_ATP_PVT.G_FORWARD_ATP);
3369: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_SUBSTITUTION_FLAG: ' || MSC_ATP_PVT.G_SUBSTITUTION_FLAG);
3370: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_DIAGNOSTIC_ATP: ' || MSC_ATP_PVT.G_DIAGNOSTIC_ATP);
3371: msc_sch_wb.atp_debug('Schedule: ' || 'End: MSC_ATP_PVT.G_INV_CTP := ' || MSC_ATP_PVT.G_INV_CTP); --5158454
3372: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3373: END IF;
3374: IF MSC_ATP_PVT.G_OPTIONAL_FW is null THEN
3375: IF PG_DEBUG in ('Y', 'C') THEN
3376: msc_sch_wb.atp_debug('Schedule: ' || 'Inside IF condition of binary search loop');

Line 3376: msc_sch_wb.atp_debug('Schedule: ' || 'Inside IF condition of binary search loop');

3372: msc_sch_wb.atp_debug('Schedule: ' || 'End: l_g_inv_ctp := ' || l_g_inv_ctp); --5158454
3373: END IF;
3374: IF MSC_ATP_PVT.G_OPTIONAL_FW is null THEN
3375: IF PG_DEBUG in ('Y', 'C') THEN
3376: msc_sch_wb.atp_debug('Schedule: ' || 'Inside IF condition of binary search loop');
3377: END IF;
3378: --If I have got the quantity then I don't need to go for more passes
3379: IF ( (l_atp_rec.quantity_ordered <= l_atp_rec.requested_date_quantity)
3380: OR (MSC_ATP_PVT.G_ATP_COMP_FLAG = 'N')

Line 3385: msc_sch_wb.atp_debug('Schedule: ' || 'Exiting the loop from G_FORWARD_ATP is yes ');

3381: )AND MSC_ATP_PVT.G_FORWARD_ATP = 'Y'
3382: THEN --for first iteration this will be one
3383:
3384: IF PG_DEBUG in ('Y', 'C') THEN
3385: msc_sch_wb.atp_debug('Schedule: ' || 'Exiting the loop from G_FORWARD_ATP is yes ');
3386: END IF;
3387: EXIT;
3388: ELSIF MSC_ATP_PVT.G_FORWARD_ATP = 'N' OR MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'
3389: OR MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1

Line 3396: msc_sch_wb.atp_debug('Schedule: ' || 'Exiting the loop from G_FORWARD_ATP is no ');

3392: --inside the loop when if profile value is again accessed then it is
3393: --reset to 4 again.
3394: THEN
3395: IF PG_DEBUG in ('Y', 'C') THEN
3396: msc_sch_wb.atp_debug('Schedule: ' || 'Exiting the loop from G_FORWARD_ATP is no ');
3397: END IF;
3398: EXIT;
3399: END IF;
3400: ELSIF l_atp_rec.requested_date_quantity >=

Line 3404: msc_sch_wb.atp_debug('Schedule: ' || 'Inside successful elsif condition of binary search loop');

3400: ELSIF l_atp_rec.requested_date_quantity >=
3401: l_atp_rec.quantity_ordered THEN
3402:
3403: IF PG_DEBUG in ('Y', 'C') THEN
3404: msc_sch_wb.atp_debug('Schedule: ' || 'Inside successful elsif condition of binary search loop');
3405: END IF;
3406: --o-- Delete the old hidden data i.e s/d/r for previous successful run.
3407: --o-- Hide the new successful data i.e s/d/r for this successful run.
3408:

Line 3413: msc_sch_wb.atp_debug('Schedule: ' || 'Inside deleting the old successful records');

3409: ---- (For performace) First successful case we need not to delete it
3410: IF l_second_good_run = 1 then
3411:
3412: IF PG_DEBUG in ('Y', 'C') THEN
3413: msc_sch_wb.atp_debug('Schedule: ' || 'Inside deleting the old successful records');
3414: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_peg_id : ' || l_atp_peg_id);
3415: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);
3416: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count :' || l_ctp_parent_peg_id.count);
3417: END IF;

Line 3414: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_peg_id : ' || l_atp_peg_id);

3410: IF l_second_good_run = 1 then
3411:
3412: IF PG_DEBUG in ('Y', 'C') THEN
3413: msc_sch_wb.atp_debug('Schedule: ' || 'Inside deleting the old successful records');
3414: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_peg_id : ' || l_atp_peg_id);
3415: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);
3416: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count :' || l_ctp_parent_peg_id.count);
3417: END IF;
3418:

Line 3415: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);

3411:
3412: IF PG_DEBUG in ('Y', 'C') THEN
3413: msc_sch_wb.atp_debug('Schedule: ' || 'Inside deleting the old successful records');
3414: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_peg_id : ' || l_atp_peg_id);
3415: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);
3416: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count :' || l_ctp_parent_peg_id.count);
3417: END IF;
3418:
3419: MSC_ATP_DB_UTILS.Delete_Pegging(l_atp_peg_id);

Line 3416: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count :' || l_ctp_parent_peg_id.count);

3412: IF PG_DEBUG in ('Y', 'C') THEN
3413: msc_sch_wb.atp_debug('Schedule: ' || 'Inside deleting the old successful records');
3414: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_peg_id : ' || l_atp_peg_id);
3415: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);
3416: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count :' || l_ctp_parent_peg_id.count);
3417: END IF;
3418:
3419: MSC_ATP_DB_UTILS.Delete_Pegging(l_atp_peg_id);
3420:

Line 3426: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Delete_SD_Rec');

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

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

3428: END IF;
3429: END IF;
3430:
3431: IF PG_DEBUG in ('Y', 'C') THEN
3432: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3433: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3434: END IF;
3435:
3436: IF l_steal_atp_peg_id.count > 0 and MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' then

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

3429: END IF;
3430:
3431: IF PG_DEBUG in ('Y', 'C') THEN
3432: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3433: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3434: END IF;
3435:
3436: IF l_steal_atp_peg_id.count > 0 and MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' then
3437: --Remove stealing records/pegging

Line 3441: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Delete_SD_Rec');

3437: --Remove stealing records/pegging
3438: MSC_ATP_DB_UTILS.Delete_SD_Rec(l_steal_atp_peg_id,l_return_status);
3439: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3440: IF PG_DEBUG in ('Y', 'C') THEN
3441: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Delete_SD_Rec');
3442: END IF;
3443: END IF;
3444: END IF;
3445:

Line 3457: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);

3453: l_high_seqnum := l_middle_seqnum - 1;
3454:
3455: IF l_high_seqnum >= l_low_seqnum THEN
3456: IF PG_DEBUG in ('Y', 'C') THEN
3457: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3458: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3459: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3460: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3461: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 3458: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);

3454:
3455: IF l_high_seqnum >= l_low_seqnum THEN
3456: IF PG_DEBUG in ('Y', 'C') THEN
3457: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3458: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3459: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3460: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3461: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3462: END IF;

Line 3459: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);

3455: IF l_high_seqnum >= l_low_seqnum THEN
3456: IF PG_DEBUG in ('Y', 'C') THEN
3457: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3458: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3459: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3460: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3461: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3462: END IF;
3463:

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

3456: IF PG_DEBUG in ('Y', 'C') THEN
3457: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3458: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3459: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3460: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3461: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3462: END IF;
3463:
3464: IF G_FW_STEAL_PEGGING_ID.COUNT > 0 and MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN

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

3457: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3458: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3459: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3460: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3461: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3462: END IF;
3463:
3464: IF G_FW_STEAL_PEGGING_ID.COUNT > 0 and MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
3465:

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

3465:
3466: --Hide the forward stealing records with -1*inventory_item_id
3467: FOR i in 1..MSC_ATP_PVT.G_FW_STEAL_PEGGING_ID.COUNT LOOP
3468: IF PG_DEBUG in ('Y', 'C') THEN
3469: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3470: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));
3471: END IF;
3472: IF G_FW_STEAL_PEGGING_ID(i) is not null THEN
3473: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_STEAL_PEGGING_ID(i),l_return_status);

Line 3470: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));

3466: --Hide the forward stealing records with -1*inventory_item_id
3467: FOR i in 1..MSC_ATP_PVT.G_FW_STEAL_PEGGING_ID.COUNT LOOP
3468: IF PG_DEBUG in ('Y', 'C') THEN
3469: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3470: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));
3471: END IF;
3472: IF G_FW_STEAL_PEGGING_ID(i) is not null THEN
3473: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_STEAL_PEGGING_ID(i),l_return_status);
3474: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 3476: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Hide_SD_Rec');

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

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

3481: END IF;
3482:
3483: FOR i in 1..MSC_ATP_PVT.G_FW_CTP_PEGGING_ID.COUNT LOOP
3484: IF PG_DEBUG in ('Y', 'C') THEN
3485: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3486: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID ' || G_FW_CTP_PEGGING_ID(i));
3487: END IF;
3488: IF G_FW_CTP_PEGGING_ID(i) is not null THEN
3489: --Hide the CTP records with -1*inventory_item_id

Line 3486: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID ' || G_FW_CTP_PEGGING_ID(i));

3482:
3483: FOR i in 1..MSC_ATP_PVT.G_FW_CTP_PEGGING_ID.COUNT LOOP
3484: IF PG_DEBUG in ('Y', 'C') THEN
3485: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3486: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID ' || G_FW_CTP_PEGGING_ID(i));
3487: END IF;
3488: IF G_FW_CTP_PEGGING_ID(i) is not null THEN
3489: --Hide the CTP records with -1*inventory_item_id
3490: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_CTP_PEGGING_ID(i),l_return_status);

Line 3493: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Hide_SD_Rec');

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

Line 3509: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);

3505:
3506: l_last_successful_date := l_atp_rec.requested_ship_date;
3507:
3508: IF PG_DEBUG in ('Y', 'C') THEN
3509: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3510: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3511: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3512: END IF;
3513:

Line 3510: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);

3506: l_last_successful_date := l_atp_rec.requested_ship_date;
3507:
3508: IF PG_DEBUG in ('Y', 'C') THEN
3509: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3510: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3511: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3512: END IF;
3513:
3514: IF (l_low_seqnum = l_high_seqnum) AND (l_last_successful_date = l_last_date) THEN

Line 3511: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);

3507:
3508: IF PG_DEBUG in ('Y', 'C') THEN
3509: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3510: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3511: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3512: END IF;
3513:
3514: IF (l_low_seqnum = l_high_seqnum) AND (l_last_successful_date = l_last_date) THEN
3515: IF PG_DEBUG in ('Y', 'C') THEN

Line 3516: msc_sch_wb.atp_debug('Schedule: ' || 'Inside first l_low_seqnum = l_high_seqnum of binary search loop');

3512: END IF;
3513:
3514: IF (l_low_seqnum = l_high_seqnum) AND (l_last_successful_date = l_last_date) THEN
3515: IF PG_DEBUG in ('Y', 'C') THEN
3516: msc_sch_wb.atp_debug('Schedule: ' || 'Inside first l_low_seqnum = l_high_seqnum of binary search loop');
3517: END IF;
3518: l_last_search := 1;
3519: l_atp_rec.requested_ship_date := l_last_successful_date;
3520: END IF;

Line 3526: msc_sch_wb.atp_debug('Schedule: ' || 'Inside unsuccessful elsif condition of binary search loop');

3522: ELSIF l_atp_rec.requested_date_quantity <
3523: l_atp_rec.quantity_ordered THEN
3524:
3525: IF PG_DEBUG in ('Y', 'C') THEN
3526: msc_sch_wb.atp_debug('Schedule: ' || 'Inside unsuccessful elsif condition of binary search loop');
3527: msc_sch_wb.atp_debug('Schedule: ' || 'Before call to Remove_Invalid_SD_Rec');
3528: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3529: END IF;
3530:

Line 3527: msc_sch_wb.atp_debug('Schedule: ' || 'Before call to Remove_Invalid_SD_Rec');

3523: l_atp_rec.quantity_ordered THEN
3524:
3525: IF PG_DEBUG in ('Y', 'C') THEN
3526: msc_sch_wb.atp_debug('Schedule: ' || 'Inside unsuccessful elsif condition of binary search loop');
3527: msc_sch_wb.atp_debug('Schedule: ' || 'Before call to Remove_Invalid_SD_Rec');
3528: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3529: END IF;
3530:
3531: MSC_ATP_DB_UTILS.Delete_Pegging(G_FW_PEGGING_ID);

Line 3528: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);

3524:
3525: IF PG_DEBUG in ('Y', 'C') THEN
3526: msc_sch_wb.atp_debug('Schedule: ' || 'Inside unsuccessful elsif condition of binary search loop');
3527: msc_sch_wb.atp_debug('Schedule: ' || 'Before call to Remove_Invalid_SD_Rec');
3528: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_PEGGING_ID ' || G_FW_PEGGING_ID);
3529: END IF;
3530:
3531: MSC_ATP_DB_UTILS.Delete_Pegging(G_FW_PEGGING_ID);
3532:

Line 3534: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);

3530:
3531: MSC_ATP_DB_UTILS.Delete_Pegging(G_FW_PEGGING_ID);
3532:
3533: IF PG_DEBUG in ('Y', 'C') THEN
3534: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3535: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3536: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3537: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3538: END IF;

Line 3535: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);

3531: MSC_ATP_DB_UTILS.Delete_Pegging(G_FW_PEGGING_ID);
3532:
3533: IF PG_DEBUG in ('Y', 'C') THEN
3534: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3535: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3536: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3537: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3538: END IF;
3539:

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

3532:
3533: IF PG_DEBUG in ('Y', 'C') THEN
3534: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3535: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3536: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3537: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3538: END IF;
3539:
3540: IF G_FW_STEAL_PEGGING_ID.COUNT > 0 AND MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN

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

3533: IF PG_DEBUG in ('Y', 'C') THEN
3534: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID.COUNT ' || G_FW_STEAL_PEGGING_ID.COUNT);
3535: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID.COUNT ' || G_FW_CTP_PEGGING_ID.COUNT);
3536: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
3537: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3538: END IF;
3539:
3540: IF G_FW_STEAL_PEGGING_ID.COUNT > 0 AND MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
3541: FOR i in 1..MSC_ATP_PVT.G_FW_STEAL_PEGGING_ID.COUNT LOOP

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

3539:
3540: IF G_FW_STEAL_PEGGING_ID.COUNT > 0 AND MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
3541: FOR i in 1..MSC_ATP_PVT.G_FW_STEAL_PEGGING_ID.COUNT LOOP
3542: IF PG_DEBUG in ('Y', 'C') THEN
3543: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3544: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));
3545: END IF;
3546: IF G_FW_STEAL_PEGGING_ID(i) is not null THEN
3547: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

Line 3544: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));

3540: IF G_FW_STEAL_PEGGING_ID.COUNT > 0 AND MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
3541: FOR i in 1..MSC_ATP_PVT.G_FW_STEAL_PEGGING_ID.COUNT LOOP
3542: IF PG_DEBUG in ('Y', 'C') THEN
3543: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3544: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));
3545: END IF;
3546: IF G_FW_STEAL_PEGGING_ID(i) is not null THEN
3547: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
3548: G_FW_STEAL_PEGGING_ID(i),

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

3556: END IF;
3557:
3558: FOR i in 1..MSC_ATP_PVT.G_FW_CTP_PEGGING_ID.COUNT LOOP
3559: IF PG_DEBUG in ('Y', 'C') THEN
3560: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3561: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID ' || G_FW_CTP_PEGGING_ID(i));
3562: END IF;
3563:
3564: IF G_FW_CTP_PEGGING_ID(i) is not null THEN

Line 3561: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID ' || G_FW_CTP_PEGGING_ID(i));

3557:
3558: FOR i in 1..MSC_ATP_PVT.G_FW_CTP_PEGGING_ID.COUNT LOOP
3559: IF PG_DEBUG in ('Y', 'C') THEN
3560: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
3561: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_CTP_PEGGING_ID ' || G_FW_CTP_PEGGING_ID(i));
3562: END IF;
3563:
3564: IF G_FW_CTP_PEGGING_ID(i) is not null THEN
3565: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(

Line 3576: msc_sch_wb.atp_debug('Schedule: ' || 'Inside second l_low_seqnum = l_high_seqnum condition of binary search loop');

3572: END IF;
3573: END LOOP;
3574: IF l_low_seqnum = l_high_seqnum THEN
3575: IF PG_DEBUG in ('Y', 'C') THEN
3576: msc_sch_wb.atp_debug('Schedule: ' || 'Inside second l_low_seqnum = l_high_seqnum condition of binary search loop');
3577: END IF;
3578: l_last_search := 1;
3579: l_atp_rec.requested_ship_date := l_last_successful_date;
3580: ELSE

Line 3591: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);

3587: );
3588: END IF;
3589: END IF;
3590: IF PG_DEBUG in ('Y', 'C') THEN
3591: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
3592: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3593: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);
3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);

Line 3592: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);

3588: END IF;
3589: END IF;
3590: IF PG_DEBUG in ('Y', 'C') THEN
3591: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
3592: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3593: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);
3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3596: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT end: ' || G_LOOP_COUNT); --5211558

Line 3593: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);

3589: END IF;
3590: IF PG_DEBUG in ('Y', 'C') THEN
3591: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
3592: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3593: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);
3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3596: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT end: ' || G_LOOP_COUNT); --5211558
3597: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count end: ' || l_loop_count);

Line 3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);

3590: IF PG_DEBUG in ('Y', 'C') THEN
3591: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
3592: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3593: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);
3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3596: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT end: ' || G_LOOP_COUNT); --5211558
3597: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count end: ' || l_loop_count);
3598: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);

Line 3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);

3591: msc_sch_wb.atp_debug('Schedule: ' || 'l_low_seqnum: ' || l_low_seqnum);
3592: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3593: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);
3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3596: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT end: ' || G_LOOP_COUNT); --5211558
3597: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count end: ' || l_loop_count);
3598: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3599: END IF;

Line 3596: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT end: ' || G_LOOP_COUNT); --5211558

3592: msc_sch_wb.atp_debug('Schedule: ' || 'l_high_seqnum: ' || l_high_seqnum);
3593: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);
3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3596: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT end: ' || G_LOOP_COUNT); --5211558
3597: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count end: ' || l_loop_count);
3598: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3599: END IF;
3600: l_loop_count := l_loop_count + 1;

Line 3597: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count end: ' || l_loop_count);

3593: msc_sch_wb.atp_debug('Schedule: ' || 'l_middle_seqnum: ' || l_middle_seqnum);
3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3596: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT end: ' || G_LOOP_COUNT); --5211558
3597: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count end: ' || l_loop_count);
3598: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3599: END IF;
3600: l_loop_count := l_loop_count + 1;
3601: --If this is the last search then we need to exit the loop and restore the s/d records and dates

Line 3598: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);

3594: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_successful_date: ' || l_last_successful_date);
3595: msc_sch_wb.atp_debug('Schedule: ' || 'l_last_date: ' || l_last_date);
3596: msc_sch_wb.atp_debug('Schedule: ' || 'G_LOOP_COUNT end: ' || G_LOOP_COUNT); --5211558
3597: msc_sch_wb.atp_debug('Schedule: ' || 'l_loop_count end: ' || l_loop_count);
3598: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ATP_COMP_FLAG: ' || MSC_ATP_PVT.G_ATP_COMP_FLAG);
3599: END IF;
3600: l_loop_count := l_loop_count + 1;
3601: --If this is the last search then we need to exit the loop and restore the s/d records and dates
3602: IF l_last_search = 1 THEN

Line 3604: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_peg_id : ' || l_atp_peg_id);

3600: l_loop_count := l_loop_count + 1;
3601: --If this is the last search then we need to exit the loop and restore the s/d records and dates
3602: IF l_last_search = 1 THEN
3603: IF PG_DEBUG in ('Y', 'C') THEN
3604: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_peg_id : ' || l_atp_peg_id);
3605: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count : ' || l_ctp_parent_peg_id.count);
3606: END IF;
3607:
3608: IF l_ctp_parent_peg_id.count > 0 then

Line 3605: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count : ' || l_ctp_parent_peg_id.count);

3601: --If this is the last search then we need to exit the loop and restore the s/d records and dates
3602: IF l_last_search = 1 THEN
3603: IF PG_DEBUG in ('Y', 'C') THEN
3604: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_peg_id : ' || l_atp_peg_id);
3605: msc_sch_wb.atp_debug('Schedule: ' || 'l_ctp_parent_peg_id.count : ' || l_ctp_parent_peg_id.count);
3606: END IF;
3607:
3608: IF l_ctp_parent_peg_id.count > 0 then
3609: --Restore the details from pegging, org is negative

Line 3613: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Restore_SD_Rec');

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

Line 3619: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);

3615: END IF;
3616: END IF;
3617:
3618: IF PG_DEBUG in ('Y', 'C') THEN
3619: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);
3620: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3621: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP :' || MSC_ATP_PVT.G_INV_CTP);
3622: END IF;
3623:

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

3616: END IF;
3617:
3618: IF PG_DEBUG in ('Y', 'C') THEN
3619: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);
3620: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3621: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP :' || MSC_ATP_PVT.G_INV_CTP);
3622: END IF;
3623:
3624: IF l_steal_atp_peg_id.count > 0 AND MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN

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

3617:
3618: IF PG_DEBUG in ('Y', 'C') THEN
3619: msc_sch_wb.atp_debug('Schedule: ' || 'l_steal_atp_peg_id.count :' || l_steal_atp_peg_id.count);
3620: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
3621: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_INV_CTP :' || MSC_ATP_PVT.G_INV_CTP);
3622: END IF;
3623:
3624: IF l_steal_atp_peg_id.count > 0 AND MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
3625: MSC_ATP_DB_UTILS.Restore_SD_Rec(l_steal_atp_peg_id,l_return_status);

Line 3628: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Restore_SD_Rec');

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

Line 3642: msc_sch_wb.atp_debug('Schedule: Resetting after loop of optional_fw');

3638: END LOOP;
3639: --After the loop completes we need to reset these to correct values
3640: --only needed in f/w pass as in b/w pass all will be set correctly.
3641: IF PG_DEBUG in ('Y', 'C') THEN
3642: msc_sch_wb.atp_debug('Schedule: Resetting after loop of optional_fw');
3643: msc_sch_wb.atp_debug('Schedule: ' || 'l_quan_ordered: ' || l_quan_ordered);
3644: msc_sch_wb.atp_debug('Schedule: ' || 'G_REQUESTED_SHIP_DATE: ' || G_REQUESTED_SHIP_DATE);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
3646: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.available_quantity: ' || l_atp_rec.available_quantity);

Line 3643: msc_sch_wb.atp_debug('Schedule: ' || 'l_quan_ordered: ' || l_quan_ordered);

3639: --After the loop completes we need to reset these to correct values
3640: --only needed in f/w pass as in b/w pass all will be set correctly.
3641: IF PG_DEBUG in ('Y', 'C') THEN
3642: msc_sch_wb.atp_debug('Schedule: Resetting after loop of optional_fw');
3643: msc_sch_wb.atp_debug('Schedule: ' || 'l_quan_ordered: ' || l_quan_ordered);
3644: msc_sch_wb.atp_debug('Schedule: ' || 'G_REQUESTED_SHIP_DATE: ' || G_REQUESTED_SHIP_DATE);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
3646: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.available_quantity: ' || l_atp_rec.available_quantity);
3647: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);

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

3640: --only needed in f/w pass as in b/w pass all will be set correctly.
3641: IF PG_DEBUG in ('Y', 'C') THEN
3642: msc_sch_wb.atp_debug('Schedule: Resetting after loop of optional_fw');
3643: msc_sch_wb.atp_debug('Schedule: ' || 'l_quan_ordered: ' || l_quan_ordered);
3644: msc_sch_wb.atp_debug('Schedule: ' || 'G_REQUESTED_SHIP_DATE: ' || G_REQUESTED_SHIP_DATE);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
3646: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.available_quantity: ' || l_atp_rec.available_quantity);
3647: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
3648: END IF;

Line 3645: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);

3641: IF PG_DEBUG in ('Y', 'C') THEN
3642: msc_sch_wb.atp_debug('Schedule: Resetting after loop of optional_fw');
3643: msc_sch_wb.atp_debug('Schedule: ' || 'l_quan_ordered: ' || l_quan_ordered);
3644: msc_sch_wb.atp_debug('Schedule: ' || 'G_REQUESTED_SHIP_DATE: ' || G_REQUESTED_SHIP_DATE);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
3646: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.available_quantity: ' || l_atp_rec.available_quantity);
3647: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
3648: END IF;
3649: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null then

Line 3646: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.available_quantity: ' || l_atp_rec.available_quantity);

3642: msc_sch_wb.atp_debug('Schedule: Resetting after loop of optional_fw');
3643: msc_sch_wb.atp_debug('Schedule: ' || 'l_quan_ordered: ' || l_quan_ordered);
3644: msc_sch_wb.atp_debug('Schedule: ' || 'G_REQUESTED_SHIP_DATE: ' || G_REQUESTED_SHIP_DATE);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
3646: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.available_quantity: ' || l_atp_rec.available_quantity);
3647: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
3648: END IF;
3649: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null then
3650: l_atp_rec.quantity_ordered := l_quan_ordered;

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

3643: msc_sch_wb.atp_debug('Schedule: ' || 'l_quan_ordered: ' || l_quan_ordered);
3644: msc_sch_wb.atp_debug('Schedule: ' || 'G_REQUESTED_SHIP_DATE: ' || G_REQUESTED_SHIP_DATE);
3645: msc_sch_wb.atp_debug('Schedule: ' || 'l_request_date_qty: ' || l_request_date_qty);
3646: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.available_quantity: ' || l_atp_rec.available_quantity);
3647: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.combined_requested_date_qty: ' || l_atp_rec.combined_requested_date_qty);
3648: END IF;
3649: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null then
3650: l_atp_rec.quantity_ordered := l_quan_ordered;
3651: l_atp_rec.requested_ship_date := G_REQUESTED_SHIP_DATE;

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

3657: END IF;
3658: --optional_fw end the loop for dates
3659:
3660: IF PG_DEBUG in ('Y', 'C') THEN
3661: msc_sch_wb.atp_debug('Schedule: ' || 'After ATP_Check for this l_atp_rec ');
3662: END IF;
3663: -- check the return status
3664: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
3665: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;

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

3682: END IF;
3683:
3684: l_stmt := 220;
3685: IF PG_DEBUG in ('Y', 'C') THEN
3686: msc_sch_wb.atp_debug('Schedule: Stmt = '||l_stmt);
3687: END IF;
3688:
3689:
3690: -- now we get the results back and we need to analyze them

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

3720: -NVL(l_atp_rec.atp_lead_time, 0));
3721: */
3722: --e_cto_rearch
3723: IF PG_DEBUG in ('Y', 'C') THEN
3724: msc_sch_wb.atp_debug('Schedule: ' || 'l_dmd_satisfied_date: ' || l_dmd_satisfied_date);
3725: END IF;
3726:
3727: IF ( (NVL(l_atp_rec.Override_Flag, 'N') = 'Y')
3728: AND l_atp_rec.Action <> ATPQUERY ) THEN

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

3728: AND l_atp_rec.Action <> ATPQUERY ) THEN
3729:
3730: /* ship_rec_cal changes begin */
3731: IF PG_DEBUG in ('Y', 'C') THEN
3732: msc_sch_wb.atp_debug('Schedule: ' || '_______________Override Scenario_______________ ');
3733: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_ship_date(i): ' || l_atp_table.requested_ship_date(i));
3734: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_arrival_date(i): ' || l_atp_table.requested_arrival_date(i));
3735: END IF;
3736: IF (l_atp_table.requested_ship_date(i) IS NOT NULL) THEN

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

3729:
3730: /* ship_rec_cal changes begin */
3731: IF PG_DEBUG in ('Y', 'C') THEN
3732: msc_sch_wb.atp_debug('Schedule: ' || '_______________Override Scenario_______________ ');
3733: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_ship_date(i): ' || l_atp_table.requested_ship_date(i));
3734: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_arrival_date(i): ' || l_atp_table.requested_arrival_date(i));
3735: END IF;
3736: IF (l_atp_table.requested_ship_date(i) IS NOT NULL) THEN
3737: l_atp_rec.ship_date := l_atp_table.requested_ship_date(i);

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

3730: /* ship_rec_cal changes begin */
3731: IF PG_DEBUG in ('Y', 'C') THEN
3732: msc_sch_wb.atp_debug('Schedule: ' || '_______________Override Scenario_______________ ');
3733: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_ship_date(i): ' || l_atp_table.requested_ship_date(i));
3734: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.requested_arrival_date(i): ' || l_atp_table.requested_arrival_date(i));
3735: END IF;
3736: IF (l_atp_table.requested_ship_date(i) IS NOT NULL) THEN
3737: l_atp_rec.ship_date := l_atp_table.requested_ship_date(i);
3738:

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

3751: l_atp_rec.intransit_cal_code, -1 * nvl(l_atp_rec.delivery_lead_time, 0), -1,
3752: l_atp_rec.shipping_cal_code, -1, p_instance_id);
3753: END IF;
3754: IF PG_DEBUG in ('Y', 'C') THEN
3755: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3756: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.arrival_date: ' || l_atp_rec.arrival_date);
3757: END IF;
3758:
3759: /* If ship date returned is greater than requested ship date move it to OSC */

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

3752: l_atp_rec.shipping_cal_code, -1, p_instance_id);
3753: END IF;
3754: IF PG_DEBUG in ('Y', 'C') THEN
3755: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3756: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.arrival_date: ' || l_atp_rec.arrival_date);
3757: END IF;
3758:
3759: /* If ship date returned is greater than requested ship date move it to OSC */
3760: ELSIF trunc(l_atp_rec.ship_date) > trunc(l_atp_rec.requested_ship_date) THEN

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

3762: l_atp_rec.shipping_cal_code,
3763: p_instance_id,
3764: l_atp_rec.ship_date);
3765: IF PG_DEBUG in ('Y', 'C') THEN
3766: msc_sch_wb.atp_debug('Schedule: ' || 'ship_date > req_ship_date');
3767: msc_sch_wb.atp_debug('Schedule: ' || '_______________After validating ship date on OSC_______________ ');
3768: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3769: END IF;
3770: END IF;

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

3763: p_instance_id,
3764: l_atp_rec.ship_date);
3765: IF PG_DEBUG in ('Y', 'C') THEN
3766: msc_sch_wb.atp_debug('Schedule: ' || 'ship_date > req_ship_date');
3767: msc_sch_wb.atp_debug('Schedule: ' || '_______________After validating ship date on OSC_______________ ');
3768: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3769: END IF;
3770: END IF;
3771: /* ship_rec_cal changes end */

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

3764: l_atp_rec.ship_date);
3765: IF PG_DEBUG in ('Y', 'C') THEN
3766: msc_sch_wb.atp_debug('Schedule: ' || 'ship_date > req_ship_date');
3767: msc_sch_wb.atp_debug('Schedule: ' || '_______________After validating ship date on OSC_______________ ');
3768: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.ship_date: ' || l_atp_rec.ship_date);
3769: END IF;
3770: END IF;
3771: /* ship_rec_cal changes end */
3772:

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

3787: l_atp_rec.arrival_date));--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
3788: END IF;
3789:
3790: IF PG_DEBUG in ('Y', 'C') THEN
3791: msc_sch_wb.atp_debug('Schedule: l_atp_rec.arrival_date = '||
3792: to_char(l_atp_rec.arrival_date, 'DD-MON-YYYY HH24:MI:SS'));
3793: END IF;
3794:
3795: END IF;

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

3806: -- date type is arrival
3807: l_original_req_arrival_date := NVL(l_atp_rec.original_request_date,l_atp_rec.requested_arrival_date);
3808: END IF;
3809: IF PG_DEBUG in ('Y', 'C') THEN
3810: msc_sch_wb.atp_debug('Schedule: request arrival date = '||
3811: to_char(l_atp_rec.requested_arrival_date, 'DD-MON-YYYY HH24:MI:SS'));
3812: END IF;
3813: l_req_arr_date(i) := l_original_req_arrival_date;
3814: /*plan by request date changes end */

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

3813: l_req_arr_date(i) := l_original_req_arrival_date;
3814: /*plan by request date changes end */
3815: -- populate the output info l_atp_table
3816: IF PG_DEBUG in ('Y', 'C') THEN
3817: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3818: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3819: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3820: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3821: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);

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

3814: /*plan by request date changes end */
3815: -- populate the output info l_atp_table
3816: IF PG_DEBUG in ('Y', 'C') THEN
3817: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3818: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3819: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3820: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3821: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3822: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);

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

3815: -- populate the output info l_atp_table
3816: IF PG_DEBUG in ('Y', 'C') THEN
3817: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3818: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3819: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3820: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3821: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3822: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3823: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);

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

3816: IF PG_DEBUG in ('Y', 'C') THEN
3817: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3818: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3819: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3820: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3821: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3822: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3823: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3824: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||

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

3817: msc_sch_wb.atp_debug('Schedule: ' || 'Before Assigning the values to l_atp_table');
3818: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3819: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3820: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3821: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3822: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3823: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3824: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3825: l_atp_rec.Available_Quantity);

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

3818: msc_sch_wb.atp_debug('Schedule: ' || 'i = '||to_char(i));
3819: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3820: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3821: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3822: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3823: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3824: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3825: l_atp_rec.Available_Quantity);
3826: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||

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

3819: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3820: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3821: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3822: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3823: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3824: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3825: l_atp_rec.Available_Quantity);
3826: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3827: l_atp_rec.Requested_Date_Quantity);

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

3820: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.org_id='|| l_atp_rec.Organization_Id);
3821: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Method='|| l_atp_rec.Ship_Method);
3822: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3823: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3824: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3825: l_atp_rec.Available_Quantity);
3826: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3827: l_atp_rec.Requested_Date_Quantity);
3828: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);

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

3822: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Delivery_Lead_Time='|| l_atp_rec.Delivery_Lead_Time);
3823: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Ship_Date='||l_atp_rec.Ship_Date);
3824: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3825: l_atp_rec.Available_Quantity);
3826: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3827: l_atp_rec.Requested_Date_Quantity);
3828: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3829: --bug3709707 added debug messages
3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);

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

3824: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Available_Quantity='||
3825: l_atp_rec.Available_Quantity);
3826: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3827: l_atp_rec.Requested_Date_Quantity);
3828: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3829: --bug3709707 added debug messages
3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3831: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3832: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);

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

3826: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.Requested_Date_Quantity='||
3827: l_atp_rec.Requested_Date_Quantity);
3828: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3829: --bug3709707 added debug messages
3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3831: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3832: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);

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

3827: l_atp_rec.Requested_Date_Quantity);
3828: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3829: --bug3709707 added debug messages
3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3831: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3832: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);
3835: END IF;

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

3828: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.error_code='||l_atp_rec.error_code);
3829: --bug3709707 added debug messages
3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3831: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3832: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);
3835: END IF;
3836: --- subst

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

3829: --bug3709707 added debug messages
3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3831: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3832: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);
3835: END IF;
3836: --- subst
3837: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' THEN

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

3830: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.request_item_name='||l_atp_rec.request_item_name);
3831: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.inventory_item_name='||l_atp_rec.inventory_item_name);
3832: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.original_item_name='||l_atp_rec.original_item_name);
3833: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_item_id(i)='||l_atp_table.Inventory_item_id(i));
3834: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_rec.atf_date='||l_atp_rec.atf_date);
3835: END IF;
3836: --- subst
3837: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' THEN
3838:

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

3851: l_atp_table.Inventory_item_id(i) := l_atp_rec.inventory_item_id;
3852: END IF;
3853:
3854: IF PG_DEBUG in ('Y', 'C') THEN
3855: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Inventory_Item_Name(i) '||l_atp_table.Inventory_Item_Name(i));
3856: END IF;
3857: --bug3709707 used original item id and name
3858: --l_atp_table.Inventory_item_id(i) := l_atp_rec.inventory_item_id;
3859: --l_atp_table.request_item_id(i) := l_atp_rec.request_item_id;

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

3867: -- Bug 2259824
3868: l_atp_table.req_item_available_date(i) := TRUNC(l_atp_rec.req_item_available_date) ;
3869: --4460369+ MSC_ATP_PVT.G_END_OF_DAY;
3870: IF PG_DEBUG in ('Y', 'C') THEN
3871: msc_sch_wb.atp_debug('Schedule: 2259824 l_atp_table.req_item_available_date(i) = '||
3872: to_char(l_atp_table.req_item_available_date(i), 'DD-MON-YYYY HH24:MI:SS'));
3873: END IF;
3874:
3875: l_atp_table.req_item_available_date_qty(i) := l_atp_rec.req_item_available_date_qty;

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

3900: l_atp_table.Inventory_Item_Name(i)) ;
3901: END IF;
3902: /* Modularize Item and Org Info */
3903: IF PG_DEBUG in ('Y', 'C') THEN
3904: msc_sch_wb.atp_debug ('Schedule: ' || 'after item name');
3905: END IF;
3906: END IF; --- IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'
3907: l_atp_table.Source_Organization_Id(i):=
3908: l_atp_rec.organization_id;

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

3906: END IF; --- IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'
3907: l_atp_table.Source_Organization_Id(i):=
3908: l_atp_rec.organization_id;
3909: IF PG_DEBUG in ('Y', 'C') THEN
3910: msc_sch_wb.atp_debug ('Schedule: ' || 'after source org id ');
3911: END IF;
3912:
3913: -- since we do a uom conversion, so we need to repopulate
3914: -- the primary uom and primary uom quantity back

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

3923: /*l_atp_table.Source_Organization_Code(i):=
3924: MSC_ATP_FUNC.get_org_code(p_instance_id, l_atp_rec.organization_id);
3925: Modularize Item and Org Info */
3926: IF PG_DEBUG in ('Y', 'C') THEN
3927: msc_sch_wb.atp_debug ('Schedule: ' || 'after code');
3928: END IF;
3929:
3930: l_atp_table.Ship_Method(i) := l_atp_rec.ship_method;
3931: l_atp_table.Delivery_Lead_Time(i) := l_atp_rec.delivery_lead_time;

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

3971: -- old bad code was here
3972: IF l_multi_scenario = 0 THEN
3973: -- case 2
3974: IF PG_DEBUG in ('Y', 'C') THEN
3975: msc_sch_wb.atp_debug('Schedule: ' || 'In case 2: l_multi_scenario = 0 ');
3976: END IF;
3977: -- since case 2 is what oe wants, we can always set this
3978: -- flag to 'Y'
3979: l_atp_table.OE_Flag(i) := 'Y';

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

4001: ---diag_atp
4002: ---In diagnostic ATP we continue as if we are able to meet the demand on request date
4003: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
4004: IF PG_DEBUG in ('Y', 'C') THEN
4005: msc_sch_wb.atp_debug('Schedule: ' || 'Reset The error code for diag ATP mode');
4006: END IF;
4007: l_atp_rec.error_code := ALLSUCCESS;
4008: --here we mark the constraint path for UI so that they can show the constraiend nodes
4009: ---bug 27744106: Improve the query for performance

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

4049: END IF;
4050:
4051: ---bug 1819638: Compare ship_date with greatest of lat_acceptable_date and l_sys_next_date
4052: IF PG_DEBUG in ('Y', 'C') THEN
4053: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
4054: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
4055: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
4056: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
4057: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);

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

4050:
4051: ---bug 1819638: Compare ship_date with greatest of lat_acceptable_date and l_sys_next_date
4052: IF PG_DEBUG in ('Y', 'C') THEN
4053: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
4054: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
4055: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
4056: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
4057: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);
4058: END IF;

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

4051: ---bug 1819638: Compare ship_date with greatest of lat_acceptable_date and l_sys_next_date
4052: IF PG_DEBUG in ('Y', 'C') THEN
4053: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
4054: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
4055: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
4056: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
4057: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);
4058: END IF;
4059:

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

4052: IF PG_DEBUG in ('Y', 'C') THEN
4053: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
4054: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
4055: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
4056: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
4057: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);
4058: END IF;
4059:
4060: -- dsting setproc

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

4053: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - Before IF l_atp_rec.error_code = ALLSUCCESS: ' ||l_latest_acceptable_date);
4054: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - error_code: ' ||l_atp_rec.error_code);
4055: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_latest_acceptable_date: ' ||l_latest_acceptable_date);
4056: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.override_flag: ' || l_atp_rec.override_flag);
4057: msc_sch_wb.atp_debug('Schedule: ' || 'stmt16 - l_atp_rec.action: ' || l_atp_rec.action);
4058: END IF;
4059:
4060: -- dsting setproc
4061: l_atp_table.instance_id(i) := p_instance_id;

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

4092: END IF;
4093: END IF;*/
4094:
4095: IF PG_DEBUG in ('Y', 'C') THEN
4096: msc_sch_wb.atp_debug('override ship_date: ' || l_atp_table.ship_date(i));
4097: msc_sch_wb.atp_debug('override arrival_date: ' || l_atp_table.arrival_date(i));
4098: END IF;
4099: ELSE
4100: -- xxx dsting hack to make sure things don't ship before sysdate

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

4093: END IF;*/
4094:
4095: IF PG_DEBUG in ('Y', 'C') THEN
4096: msc_sch_wb.atp_debug('override ship_date: ' || l_atp_table.ship_date(i));
4097: msc_sch_wb.atp_debug('override arrival_date: ' || l_atp_table.arrival_date(i));
4098: END IF;
4099: ELSE
4100: -- xxx dsting hack to make sure things don't ship before sysdate
4101: -- for an overridden ship set with req_arrival_date

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

4107: sysdate);
4108: END IF; -- override
4109:
4110: IF PG_DEBUG in ('Y', 'C') THEN
4111: msc_sch_wb.atp_debug('ship_date: ' || l_atp_table.ship_date(i));
4112: msc_sch_wb.atp_debug('arrival_date: ' || l_atp_table.arrival_date(i));
4113: END IF;
4114: --bug3439591 start
4115: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929

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

4108: END IF; -- override
4109:
4110: IF PG_DEBUG in ('Y', 'C') THEN
4111: msc_sch_wb.atp_debug('ship_date: ' || l_atp_table.ship_date(i));
4112: msc_sch_wb.atp_debug('arrival_date: ' || l_atp_table.arrival_date(i));
4113: END IF;
4114: --bug3439591 start
4115: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929
4116: L_MOVE_PAST_DUE_TO_SYSDATE := MSC_ATP_PVT.G_MOV_PAST_DUE_SYSDATE_PROF;--6316476

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

4114: --bug3439591 start
4115: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929
4116: L_MOVE_PAST_DUE_TO_SYSDATE := MSC_ATP_PVT.G_MOV_PAST_DUE_SYSDATE_PROF;--6316476
4117: IF PG_DEBUG in ('Y', 'C') THEN
4118: msc_sch_wb.atp_debug('Schedule: ' || 'MOVE_PAST_DUE_TO_SYS_DATE :'|| L_MOVE_PAST_DUE_TO_SYSDATE);
4119: END IF;
4120: if L_MOVE_PAST_DUE_TO_SYSDATE = 'Y' THEN -- Bug 5584634/5618929
4121: IF l_atp_table.requested_ship_date(i) IS NOT NULL THEN
4122: l_atp_table.latest_acceptable_date(i) := GREATEST(NVL(l_atp_table.latest_acceptable_date(i),

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

4151: END IF;
4152: END IF;
4153:
4154: IF PG_DEBUG in ('Y', 'C') THEN
4155: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
4156: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
4157: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
4158: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
4159: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375

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

4152: END IF;
4153:
4154: IF PG_DEBUG in ('Y', 'C') THEN
4155: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
4156: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
4157: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
4158: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
4159: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
4160: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));

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

4153:
4154: IF PG_DEBUG in ('Y', 'C') THEN
4155: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
4156: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
4157: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
4158: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
4159: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
4160: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
4161: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));

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

4154: IF PG_DEBUG in ('Y', 'C') THEN
4155: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
4156: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
4157: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
4158: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
4159: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
4160: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
4161: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));
4162: END IF;

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

4155: msc_sch_wb.atp_debug('LAD: ' || l_atp_table.latest_acceptable_date(i));
4156: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
4157: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
4158: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
4159: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
4160: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
4161: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));
4162: END IF;
4163: --bug3439591 end

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

4156: msc_sch_wb.atp_debug('l_sysdate_orc: ' || l_sysdate_orc);
4157: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
4158: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
4159: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
4160: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
4161: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));
4162: END IF;
4163: --bug3439591 end
4164: -- dsting setproc

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

4157: msc_sch_wb.atp_debug('l_sysdate_osc: ' || l_sys_next_date);
4158: msc_sch_wb.atp_debug('l_sysdate_orc_new: ' || l_sysdate_orc_new); --bug4291375
4159: msc_sch_wb.atp_debug('l_past_due_ship_date : ' || l_past_due_ship_date); --bug4291375
4160: msc_sch_wb.atp_debug('requested_arrival_date: ' || l_atp_table.requested_arrival_date(i));
4161: msc_sch_wb.atp_debug('requested_ship_date: ' || l_atp_table.requested_ship_date(i));
4162: END IF;
4163: --bug3439591 end
4164: -- dsting setproc
4165: MSC_ATP_PROC.Process_Set_Line(l_atp_table, i, l_line_status);

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

4163: --bug3439591 end
4164: -- dsting setproc
4165: MSC_ATP_PROC.Process_Set_Line(l_atp_table, i, l_line_status);
4166: Process_Time_Stamp_Errors(l_atp_table,i);
4167: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
4168: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
4169: IF l_ship_count = 1 and l_arrival_count = 1 THEN
4170: l_set_status := l_line_status;
4171: END iF;

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

4164: -- dsting setproc
4165: MSC_ATP_PROC.Process_Set_Line(l_atp_table, i, l_line_status);
4166: Process_Time_Stamp_Errors(l_atp_table,i);
4167: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
4168: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
4169: IF l_ship_count = 1 and l_arrival_count = 1 THEN
4170: l_set_status := l_line_status;
4171: END iF;
4172: -- 2902129

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

4175: END IF;
4176: IF l_line_status = ALLSUCCESS THEN
4177: l_stmt := 260;
4178: IF PG_DEBUG in ('Y', 'C') THEN
4179: msc_sch_wb.atp_debug('Schedule: ' || 'inside the range in case 2');
4180: END IF;
4181:
4182: -- we are inside the latest acceptable range
4183: -- remember, l_atp_rec.error_code = ALLSUCCESS means

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

4200: (l_ship_count > 1 AND i = l_ship_count) OR
4201: (l_ship_count = 1 AND l_arrival_count = 1)) THEN
4202:
4203: IF PG_DEBUG in ('Y', 'C') THEN
4204: msc_sch_wb.atp_debug('Schedule: ' || 'bug 1225631');
4205: END IF;
4206: --3720018 , Global array MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC is used to append records
4207: -- in case of ATP Inquiry. This global array will be used to call remove_invalid_sd_rec
4208: -- From request level (Call_schedule)

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

4212: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PLAN_ID_REQUEST.extend(MSC_ATP_PVT.G_PEGGING_FOR_SET.count);
4213: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_DC_ATP_FLAG_REQUEST.extend(MSC_ATP_PVT.G_PEGGING_FOR_SET.count);
4214: FOR m in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4215: IF PG_DEBUG in ('Y', 'C') THEN
4216: msc_sch_wb.atp_debug('Schedule: ' || MSC_ATP_PVT.G_PEGGING_FOR_SET(m));
4217: END IF;
4218: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST(l_count + m) := MSC_ATP_PVT.G_PEGGING_FOR_SET(m);
4219: MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PLAN_ID_REQUEST(l_count + m) := l_plan_id;
4220: 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 4227: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');

4223:
4224: /* --3720018, donot call remove_invalid_sd_rec here
4225: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4226: IF PG_DEBUG in ('Y', 'C') THEN
4227: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4228: END IF;
4229: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4230: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4231: p_instance_id,

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

4241:
4242: IF l_atp_rec.error_code = ATP_REQ_DATE_FAIL THEN
4243: l_sd_qty := l_atp_rec.quantity_ordered;
4244: IF PG_DEBUG in ('Y', 'C') THEN
4245: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
4246: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_DATE_QTY(i) := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(i));
4247: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_ATP_DATE(i) := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(i));
4248: END IF;
4249: -- rajjain begin 01/30/2003 Bug 2777661

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

4242: IF l_atp_rec.error_code = ATP_REQ_DATE_FAIL THEN
4243: l_sd_qty := l_atp_rec.quantity_ordered;
4244: IF PG_DEBUG in ('Y', 'C') THEN
4245: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
4246: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_DATE_QTY(i) := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(i));
4247: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_ATP_DATE(i) := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(i));
4248: END IF;
4249: -- rajjain begin 01/30/2003 Bug 2777661
4250: -- bug 2795053-reopen (ssurendr): Do date offset for override case as well

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

4243: l_sd_qty := l_atp_rec.quantity_ordered;
4244: IF PG_DEBUG in ('Y', 'C') THEN
4245: msc_sch_wb.atp_debug('Schedule: ' || 'i := ' || i);
4246: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_DATE_QTY(i) := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(i));
4247: msc_sch_wb.atp_debug('Schedule: ' || 'MSC_ATP_PVT.G_REQ_ATP_DATE(i) := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(i));
4248: END IF;
4249: -- rajjain begin 01/30/2003 Bug 2777661
4250: -- bug 2795053-reopen (ssurendr): Do date offset for override case as well
4251: -- IF NVL(l_atp_rec.override_flag, 'N') = 'Y' THEN

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

4268: l_order_date_type := 1;
4269: END IF;
4270:
4271: IF PG_DEBUG in ('Y', 'C') THEN
4272: msc_sch_wb.atp_debug('Schedule: ' || 'l_order_date_type : ' || l_order_date_type);
4273: END IF;
4274:
4275: --Bug 3226083
4276: l_atp_insert_rec := l_atp_rec;

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

4310: IF ((l_atp_table.Action(i) = ATPQUERY) AND
4311: ((l_atp_table.Error_Code(i) = ATP_NOT_APPL) OR
4312: (l_atp_table.Error_Code(i) = PDS_TO_ODS_SWITCH))) THEN
4313: IF PG_DEBUG in ('Y', 'C') THEN
4314: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code(i)='||l_atp_table.Error_Code(i));
4315: END IF;
4316: ELSE
4317: l_atp_table.Error_Code(i) := ALLSUCCESS;
4318: END IF;

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

4325:
4326: -- need to do something for the set if we are done
4327: -- with this set
4328: IF PG_DEBUG in ('Y', 'C') THEN
4329: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count := ' ||l_ship_count);
4330: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);
4331: msc_sch_wb.atp_debug('Schedule: ' || 'stmt - l_set_element_success := ' || l_set_element_success);
4332: END IF;
4333: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN

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

4326: -- need to do something for the set if we are done
4327: -- with this set
4328: IF PG_DEBUG in ('Y', 'C') THEN
4329: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count := ' ||l_ship_count);
4330: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);
4331: msc_sch_wb.atp_debug('Schedule: ' || 'stmt - l_set_element_success := ' || l_set_element_success);
4332: END IF;
4333: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN
4334:

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

4327: -- with this set
4328: IF PG_DEBUG in ('Y', 'C') THEN
4329: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count := ' ||l_ship_count);
4330: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);
4331: msc_sch_wb.atp_debug('Schedule: ' || 'stmt - l_set_element_success := ' || l_set_element_success);
4332: END IF;
4333: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN
4334:
4335: l_stmt := 290;

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

4333: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN
4334:
4335: l_stmt := 290;
4336: IF PG_DEBUG in ('Y', 'C') THEN
4337: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt:= ' || l_stmt);
4338: END IF;
4339:
4340: -- this is a set, make sure this set is successful
4341:

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

4349:
4350: l_stmt := 300;
4351:
4352: IF PG_DEBUG in ('Y', 'C') THEN
4353: msc_sch_wb.atp_debug('Schedule: ' || 'stmt17');
4354: END IF;
4355:
4356: MSC_ATP_PROC.Update_Set_SD_Dates(l_atp_table,l_req_arr_date);
4357: END IF;

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

4382: WHEN OTHERS THEN
4383: l_ship_arrival_date_rec.demand_id := null;
4384: END;
4385: IF PG_DEBUG in ('Y', 'C') THEN
4386: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_arrival_date_rec.demand_id = ' || l_ship_arrival_date_rec.demand_id);
4387: END IF;
4388:
4389: /* Determine order date type*/
4390: IF l_atp_table.requested_arrival_date(i) is not null THEN

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

4396: IF (G_INV_CTP = 4)THEN
4397: MSC_ATP_DB_UTILS.Flush_Data_In_Pds(l_ship_arrival_date_rec, l_return_status);
4398: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4399: IF PG_DEBUG in ('Y', 'C') THEN
4400: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
4401: END IF;
4402: END IF;
4403: ELSE
4404: MSC_ATP_DB_UTILS.Flush_Data_In_Ods(l_ship_arrival_date_rec, l_return_status);

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

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

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

4411: END IF;
4412:
4413: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4414: IF PG_DEBUG in ('Y', 'C') THEN
4415: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
4416: END IF;
4417: RAISE FND_API.G_EXC_ERROR;
4418: END IF;
4419: END IF;

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

4427: END IF;
4428:
4429: l_stmt := 360;
4430: IF PG_DEBUG in ('Y', 'C') THEN
4431: msc_sch_wb.atp_debug('Schedule: ' || 'l_stmt := ' || l_stmt);
4432: END IF;
4433:
4434: -- Added by NGOEL for BUG 1533251, in case ship_date is <= requested_date
4435: -- and G_FIND_FUTURE = Y, copy available quantity into request_date quantity.

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

4444: (l_atp_rec.requested_arrival_date IS NOT NULL) AND
4445: (l_atp_rec.ship_date+NVL(l_atp_rec.delivery_lead_time,0)
4446: <= l_atp_rec.requested_arrival_date))) THEN
4447: IF PG_DEBUG in ('Y', 'C') THEN
4448: msc_sch_wb.atp_debug ('Schedule: ' || 'Bug 1533251');
4449: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||
4450: l_atp_rec.requested_date_quantity);
4451: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||
4452: l_atp_rec.combined_requested_date_qty);

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

4445: (l_atp_rec.ship_date+NVL(l_atp_rec.delivery_lead_time,0)
4446: <= l_atp_rec.requested_arrival_date))) THEN
4447: IF PG_DEBUG in ('Y', 'C') THEN
4448: msc_sch_wb.atp_debug ('Schedule: ' || 'Bug 1533251');
4449: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||
4450: l_atp_rec.requested_date_quantity);
4451: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||
4452: l_atp_rec.combined_requested_date_qty);
4453: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.available_quantity : '||

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

4447: IF PG_DEBUG in ('Y', 'C') THEN
4448: msc_sch_wb.atp_debug ('Schedule: ' || 'Bug 1533251');
4449: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||
4450: l_atp_rec.requested_date_quantity);
4451: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||
4452: l_atp_rec.combined_requested_date_qty);
4453: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.available_quantity : '||
4454: l_atp_rec.available_quantity);
4455: END IF;

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

4449: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.requested_date_quantity : '||
4450: l_atp_rec.requested_date_quantity);
4451: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.combined_requested_date_qty : '||
4452: l_atp_rec.combined_requested_date_qty);
4453: msc_sch_wb.atp_debug ('Schedule: ' || 'l_atp_rec.available_quantity : '||
4454: l_atp_rec.available_quantity);
4455: END IF;
4456:
4457: l_atp_rec.requested_date_quantity := l_atp_rec.available_quantity;

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

4460:
4461: --diag_atp
4462: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
4463: IF PG_DEBUG in ('Y', 'C') THEN
4464: msc_sch_wb.atp_debug('Schedule: ' || 'Reset The error code for diag ATP mode 2');
4465: END IF;
4466: l_atp_table.Error_Code(i) := MSC_ATP_PVT.DIAGNOSTIC_ATP_ENABLED;
4467: END IF;
4468: ELSE --- bug 1104565

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

4468: ELSE --- bug 1104565
4469:
4470: -- The request_date fails
4471: IF PG_DEBUG in ('Y', 'C') THEN
4472: msc_sch_wb.atp_debug('Schedule: ' || 'Date requirements fail vivek');
4473: END IF;
4474: -- Bug 2266808 : krajan
4475: -- dsting setproc
4476: IF l_ship_count > 1 AND i = l_ship_count THEN

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

4493: -- 1580127
4494: IF (l_atp_rec.error_code = ATP_REQ_DATE_FAIL) THEN
4495:
4496: IF PG_DEBUG in ('Y', 'C') THEN
4497: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);
4498: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);
4499: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);
4500: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);
4501: END IF;

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

4494: IF (l_atp_rec.error_code = ATP_REQ_DATE_FAIL) THEN
4495:
4496: IF PG_DEBUG in ('Y', 'C') THEN
4497: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);
4498: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);
4499: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);
4500: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);
4501: END IF;
4502:

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

4495:
4496: IF PG_DEBUG in ('Y', 'C') THEN
4497: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);
4498: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);
4499: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);
4500: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);
4501: END IF;
4502:
4503: l_sd_qty := l_atp_rec.quantity_ordered;

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

4496: IF PG_DEBUG in ('Y', 'C') THEN
4497: msc_sch_wb.atp_debug('Schedule: ' || 'Inside ATP_REQ_DATE_FAIL, i : ' || i);
4498: msc_sch_wb.atp_debug('Schedule: ' || 'quantity_ordered : ' || l_atp_rec.quantity_ordered);
4499: msc_sch_wb.atp_debug('Schedule: ' || 'combined qty : ' || l_atp_rec.combined_requested_date_qty);
4500: msc_sch_wb.atp_debug('Schedule: ' || 'order line : ' || l_atp_rec.demand_source_line);
4501: END IF;
4502:
4503: l_sd_qty := l_atp_rec.quantity_ordered;
4504: IF PG_DEBUG in ('Y', 'C') THEN

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

4501: END IF;
4502:
4503: l_sd_qty := l_atp_rec.quantity_ordered;
4504: IF PG_DEBUG in ('Y', 'C') THEN
4505: msc_sch_wb.atp_debug('Schedule: ' || 'quantity : ' || l_sd_qty);
4506: END IF;
4507:
4508: /* ship_rec_cal Determine order date type*/
4509: IF l_atp_table.requested_arrival_date(i) is not null THEN

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

4511: ELSE
4512: l_order_date_type := 1;
4513: END IF;
4514: IF PG_DEBUG in ('Y', 'C') THEN
4515: msc_sch_wb.atp_debug('Schedule: ' || 'l_order_date_type : ' || l_order_date_type);
4516: END IF;
4517:
4518: --Bug 3226083
4519: l_atp_insert_rec := l_atp_rec;

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

4564:
4565: -- IF (l_atp_rec.error_code = ATP_REQ_DATE_FAIL) THEN
4566: IF (l_atp_table.error_code(i) = ATP_REQ_DATE_FAIL) THEN
4567: IF PG_DEBUG in ('Y', 'C') THEN
4568: msc_sch_wb.atp_debug('Schedule: ' || 'in case 2, not in acceptable range');
4569: END IF;
4570: l_atp_table.Error_Code(i) := ATP_ACCEPT_FAIL;
4571:
4572: END IF;

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

4572: END IF;
4573: END IF; --- IF l_atp_rec.error_code = "ALLSUCCESS"
4574:
4575: IF PG_DEBUG in ('Y', 'C') THEN
4576: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
4577: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
4578: msc_sch_wb.atp_debug('i: ' || i);
4579: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);

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

4573: END IF; --- IF l_atp_rec.error_code = "ALLSUCCESS"
4574:
4575: IF PG_DEBUG in ('Y', 'C') THEN
4576: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
4577: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
4578: msc_sch_wb.atp_debug('i: ' || i);
4579: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
4581: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);

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

4574:
4575: IF PG_DEBUG in ('Y', 'C') THEN
4576: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
4577: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
4578: msc_sch_wb.atp_debug('i: ' || i);
4579: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
4581: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
4582: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);

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

4575: IF PG_DEBUG in ('Y', 'C') THEN
4576: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
4577: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
4578: msc_sch_wb.atp_debug('i: ' || i);
4579: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
4581: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
4582: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
4583: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);

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

4576: msc_sch_wb.atp_debug('arrival cntr k: ' || k);
4577: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
4578: msc_sch_wb.atp_debug('i: ' || i);
4579: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
4581: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
4582: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
4583: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
4584: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);

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

4577: msc_sch_wb.atp_debug('fst src peg count: ' || l_fst_src_pegging_ids.count);
4578: msc_sch_wb.atp_debug('i: ' || i);
4579: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
4581: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
4582: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
4583: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
4584: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);
4585: END IF;

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

4578: msc_sch_wb.atp_debug('i: ' || i);
4579: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
4581: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
4582: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
4583: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
4584: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);
4585: END IF;
4586:

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

4579: msc_sch_wb.atp_debug('p cnt: ' ||MSC_ATP_PVT.G_pegging_for_set.count);
4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
4581: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
4582: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
4583: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
4584: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);
4585: END IF;
4586:
4587: IF i = l_ship_count THEN

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

4580: msc_sch_wb.atp_debug('f cnt: ' ||MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count);
4581: msc_sch_wb.atp_debug('d cnt: ' ||MSC_ATP_PVT.G_REQ_ATP_DATE.count);
4582: msc_sch_wb.atp_debug('q cnt: ' ||MSC_ATP_PVT.G_REQ_DATE_QTY.count);
4583: msc_sch_wb.atp_debug('l_date_higher_src: ' || l_date_higher_src);
4584: msc_sch_wb.atp_debug('l_overall_status: ' || l_overall_status);
4585: END IF;
4586:
4587: IF i = l_ship_count THEN
4588:

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

4591: (l_date_higher_src = 'N' and l_overall_status
4592: in (ATP_REQ_DATE_FAIL, ATP_ACCEPT_FAIL, GROUPEL_ERROR))
4593: THEN
4594: IF PG_DEBUG in ('Y', 'C') THEN
4595: msc_sch_wb.atp_debug('used src for fst_src_peg');
4596: END IF;
4597:
4598: IF j > 1 THEN
4599: FOR l_peg_count in k..l_fst_src_pegging_ids.count loop

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

4611: l_req_date_qty.trim(l_fst_src_pegging_ids.count - k + 1);
4612: l_demand_class_atp_flag.trim(l_fst_src_pegging_ids.count - k + 1);
4613: END IF;
4614:
4615: msc_sch_wb.atp_debug('adding to fst_src_peg p');
4616: MSC_ATP_PROC.number_arr_cat(l_fst_src_pegging_ids, MSC_ATP_PVT.G_PEGGING_FOR_SET);
4617: msc_sch_wb.atp_debug('adding to fst_src_peg d');
4618: MSC_ATP_PROC.date_arr_cat(l_req_atp_date, MSC_ATP_PVT.G_REQ_ATP_DATE);
4619: msc_sch_wb.atp_debug('adding to fst_src_peg q');

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

4613: END IF;
4614:
4615: msc_sch_wb.atp_debug('adding to fst_src_peg p');
4616: MSC_ATP_PROC.number_arr_cat(l_fst_src_pegging_ids, MSC_ATP_PVT.G_PEGGING_FOR_SET);
4617: msc_sch_wb.atp_debug('adding to fst_src_peg d');
4618: MSC_ATP_PROC.date_arr_cat(l_req_atp_date, MSC_ATP_PVT.G_REQ_ATP_DATE);
4619: msc_sch_wb.atp_debug('adding to fst_src_peg q');
4620: MSC_ATP_PROC.number_arr_cat(l_req_date_qty, MSC_ATP_PVT.G_REQ_DATE_QTY);
4621: msc_sch_wb.atp_debug('adding to fst_src_peg f');

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

4615: msc_sch_wb.atp_debug('adding to fst_src_peg p');
4616: MSC_ATP_PROC.number_arr_cat(l_fst_src_pegging_ids, MSC_ATP_PVT.G_PEGGING_FOR_SET);
4617: msc_sch_wb.atp_debug('adding to fst_src_peg d');
4618: MSC_ATP_PROC.date_arr_cat(l_req_atp_date, MSC_ATP_PVT.G_REQ_ATP_DATE);
4619: msc_sch_wb.atp_debug('adding to fst_src_peg q');
4620: MSC_ATP_PROC.number_arr_cat(l_req_date_qty, MSC_ATP_PVT.G_REQ_DATE_QTY);
4621: msc_sch_wb.atp_debug('adding to fst_src_peg f');
4622: MSC_ATP_PROC.number_arr_cat(l_demand_class_atp_flag, MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG);
4623:

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

4617: msc_sch_wb.atp_debug('adding to fst_src_peg d');
4618: MSC_ATP_PROC.date_arr_cat(l_req_atp_date, MSC_ATP_PVT.G_REQ_ATP_DATE);
4619: msc_sch_wb.atp_debug('adding to fst_src_peg q');
4620: MSC_ATP_PROC.number_arr_cat(l_req_date_qty, MSC_ATP_PVT.G_REQ_DATE_QTY);
4621: msc_sch_wb.atp_debug('adding to fst_src_peg f');
4622: MSC_ATP_PROC.number_arr_cat(l_demand_class_atp_flag, MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG);
4623:
4624: IF l_overall_status in (MSC_ATP_PVT.ALLSUCCESS,
4625: MSC_ATP_PVT.ATP_REQ_DATE_FAIL,

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

4626: MSC_ATP_PVT.GROUPEL_ERROR,
4627: MSC_ATP_PVT.ATP_ACCEPT_FAIL)
4628: THEN
4629: l_date_higher_src := 'Y';
4630: msc_sch_wb.atp_debug('have date. l_date_higher_src: ' || l_date_higher_src);
4631: END IF;
4632: -- cleanup only if not arrival set
4633: --3720018 , Global array MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC is used to append records
4634: -- in case of ATP Inquiry. This global array will be used to call remove_invalid_sd_rec

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

4667: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4668:
4669: IF j = l_sources.source_type.count THEN
4670: IF PG_DEBUG in ('Y', 'C') THEN
4671: msc_sch_wb.atp_debug('Schedule: ' || 'l_fst_src_pegging_ids.count'|| l_fst_src_pegging_ids.count);
4672: END IF;
4673:
4674: -- dsting 2741997
4675: IF l_ship_count > 1 THEN

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

4689: -- dsting case 1 => multi_scenario = 1.
4690: -- multi_scenario is always 0 since complete_scatp is disabled
4691: -- case 1
4692: IF PG_DEBUG in ('Y', 'C') THEN
4693: msc_sch_wb.atp_debug('Schedule: ' || 'In case 1');
4694: END IF;
4695: IF ((l_atp_rec.error_code = ALLSUCCESS) AND
4696: (l_sources.Preferred(j) = 1))
4697: OR (l_atp_rec.error_code = ATP_NOT_APPL) THEN

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

4704: IF (l_arrival_count > 1 AND k = l_arrival_count) OR
4705: (l_ship_count > 1 AND i = l_ship_count) OR
4706: (l_ship_count = 1 AND l_arrival_count = 1) THEN
4707: IF PG_DEBUG in ('Y', 'C') THEN
4708: msc_sch_wb.atp_debug('Schedule: ' || 'bug 1225631');
4709: END IF;
4710:
4711: -- ROLLBACK to SAVEPOINT start_atp;
4712: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP

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

4710:
4711: -- ROLLBACK to SAVEPOINT start_atp;
4712: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4713: IF PG_DEBUG in ('Y', 'C') THEN
4714: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4715: END IF;
4716: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4717: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4718: p_instance_id,

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

4727: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4728: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4729: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4730: IF PG_DEBUG in ('Y', 'C') THEN
4731: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 7');
4732: END IF;
4733:
4734: END IF;
4735: END IF;

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

4814: -- 1072816 need to do something to undo
4815:
4816: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4817: IF PG_DEBUG in ('Y', 'C') THEN
4818: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4819: END IF;
4820: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4821: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4822: p_instance_id,

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

4831: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4832: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4833: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4834: IF PG_DEBUG in ('Y', 'C') THEN
4835: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 8');
4836: END IF;
4837:
4838: END IF;
4839: END IF;

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

4882: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4883: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4884: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4885: IF PG_DEBUG in ('Y', 'C') THEN
4886: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 9');
4887: END IF;
4888: END IF;
4889:
4890: IF (i = l_ship_count) AND (l_ship_count > 1 ) THEN

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

4899: -- 1072816 need to do something to undo
4900:
4901: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
4902: IF PG_DEBUG in ('Y', 'C') THEN
4903: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop');
4904: END IF;
4905: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(
4906: MSC_ATP_PVT.G_PEGGING_FOR_SET(i) ,
4907: p_instance_id,

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

4916: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
4917: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
4918: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
4919: IF PG_DEBUG in ('Y', 'C') THEN
4920: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 10');
4921: END IF;
4922:
4923: END IF;
4924:

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

4946: IF i = l_ship_count THEN
4947: IF l_overall_status = ALLSUCCESS THEN
4948:
4949: IF PG_DEBUG in ('Y', 'C') THEN
4950: msc_sch_wb.atp_debug('Schedule: ' || 'l_overall_status = ALLSUCCESS');
4951: END IF;
4952:
4953: l_temp_atp_table := l_atp_table;
4954:

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

4955: IF l_ship_count > 1 THEN
4956: -- ship set case
4957: -- the curr one is sucessful
4958: IF PG_DEBUG in ('Y', 'C') THEN
4959: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count > 1');
4960: END IF;
4961:
4962: l_temp_atp_period := l_curr_atp_period;
4963: l_temp_atp_supply_demand := l_curr_atp_supply_demand;

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

4962: l_temp_atp_period := l_curr_atp_period;
4963: l_temp_atp_supply_demand := l_curr_atp_supply_demand;
4964: ELSE
4965: IF PG_DEBUG in ('Y', 'C') THEN
4966: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of (l_ship_count > 1)');
4967: END IF;
4968:
4969: -- single line (do not need to consider arrival set here)
4970: l_temp_atp_period := l_atp_period;

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

4977: -- we need to know if we got a date or not, and we need to know
4978: -- if l_temp_atp_table is empty or not
4979:
4980: IF PG_DEBUG in ('Y', 'C') THEN
4981: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of l_overall_status = ALLSUCCESS');
4982: END IF;
4983:
4984: IF l_ship_count > 1 THEN
4985:

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

4983:
4984: IF l_ship_count > 1 THEN
4985:
4986: IF PG_DEBUG in ('Y', 'C') THEN
4987: msc_sch_wb.atp_debug('Schedule: ' || 'l_ship_count > 1');
4988: END IF;
4989:
4990: -- this is a set
4991: IF (l_group_date IS NOT NULL) AND

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

4991: IF (l_group_date IS NOT NULL) AND
4992: (l_arr_no_date = 'Y') THEN
4993:
4994: IF PG_DEBUG in ('Y', 'C') THEN
4995: msc_sch_wb.atp_debug('Schedule: ' || 'in the l_group_date is not null and l_arr_no_date = Y');
4996: END IF;
4997: l_temp_atp_table := l_atp_table;
4998: l_temp_atp_period := l_curr_atp_period;
4999: l_temp_atp_supply_demand := l_curr_atp_supply_demand;

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

4999: l_temp_atp_supply_demand := l_curr_atp_supply_demand;
5000: l_arr_no_date := 'N';
5001: ELSIF j = 1 THEN -- this is the first warehouse
5002: IF PG_DEBUG in ('Y', 'C') THEN
5003: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSIF j = 1 of (l_group_date is not null and l_arr_no_date = Y)');
5004: END IF;
5005: l_temp_atp_table := l_atp_table;
5006: l_temp_atp_period := l_curr_atp_period;
5007: l_temp_atp_supply_demand := l_curr_atp_supply_demand;

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

5010:
5011: ELSE
5012:
5013: IF PG_DEBUG in ('Y', 'C') THEN
5014: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSE of (l_ship_count > 1)');
5015: END IF;
5016:
5017: -- this is a line
5018: IF (l_atp_rec.ship_date IS NOT NULL) AND

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

5017: -- this is a line
5018: IF (l_atp_rec.ship_date IS NOT NULL) AND
5019: (l_arr_no_date = 'Y') THEN
5020: IF PG_DEBUG in ('Y', 'C') THEN
5021: msc_sch_wb.atp_debug('Schedule: ' || 'in the l_atp_rec.ship_date is not null and l_arr_no_date = Y');
5022: END IF;
5023: l_temp_atp_table := l_atp_table;
5024: l_temp_atp_period := l_atp_period;
5025: l_temp_atp_supply_demand := l_atp_supply_demand;

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

5025: l_temp_atp_supply_demand := l_atp_supply_demand;
5026: l_arr_no_date := 'N';
5027: ELSIF j = 1 THEN -- this is the first warehouse
5028: IF PG_DEBUG in ('Y', 'C') THEN
5029: msc_sch_wb.atp_debug('Schedule: ' || 'in the ELSIF j = 1 of (l_group_date is not null and l_arr_no_date = Y)');
5030: END IF;
5031: l_temp_atp_table := l_atp_table;
5032: l_temp_atp_period := l_atp_period;
5033: l_temp_atp_supply_demand := l_atp_supply_demand;

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

5069: MSC_ATP_PVT.G_ALLOCATION_METHOD := l_allocation_method;
5070: --5221865 in the end of i loop we should re-set by original value.
5071: MSC_ATP_PVT.G_FORWARD_ATP := l_forward_atp;
5072: IF PG_DEBUG in ('Y', 'C') THEN
5073: msc_sch_wb.atp_debug('Schedule: ' || 'Reset Destination INV_CTP '
5074: || MSC_ATP_PVT.G_INV_CTP);
5075: --5221865
5076: msc_sch_wb.atp_debug('Schedule: ' || 'Reset Destination G_FORWARD_ATP '
5077: || MSC_ATP_PVT.G_FORWARD_ATP);

Line 5076: msc_sch_wb.atp_debug('Schedule: ' || 'Reset Destination G_FORWARD_ATP '

5072: IF PG_DEBUG in ('Y', 'C') THEN
5073: msc_sch_wb.atp_debug('Schedule: ' || 'Reset Destination INV_CTP '
5074: || MSC_ATP_PVT.G_INV_CTP);
5075: --5221865
5076: msc_sch_wb.atp_debug('Schedule: ' || 'Reset Destination G_FORWARD_ATP '
5077: || MSC_ATP_PVT.G_FORWARD_ATP);
5078: END IF;
5079: -- The local variables were assigned at the beginning of the Loop
5080: -- Values should be reset after every ship-set row.

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

5104:
5105: IF (l_temp_atp_table.Action.COUNT > 0) THEN
5106:
5107: IF PG_DEBUG in ('Y', 'C') THEN
5108: msc_sch_wb.atp_debug('Schedule: ' || 'I am here!!!');
5109: END IF;
5110: -- we need to assign oe_flag for oe to indicate which
5111: -- scenario they should show to users if we return multiple
5112: -- scenarios. Now we need to pick one which is inside the

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

5190: END IF;
5191: END IF;
5192:
5193: IF PG_DEBUG in ('Y', 'C') THEN
5194: msc_sch_wb.atp_debug('Schedule: ' || 'before k := p_atp_table.Arrival_Set_Name.NEXT(i)');
5195: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
5196: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
5197: END IF;
5198:

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

5191: END IF;
5192:
5193: IF PG_DEBUG in ('Y', 'C') THEN
5194: msc_sch_wb.atp_debug('Schedule: ' || 'before k := p_atp_table.Arrival_Set_Name.NEXT(i)');
5195: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
5196: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
5197: END IF;
5198:
5199: IF l_arrival_count > 1 THEN

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

5192:
5193: IF PG_DEBUG in ('Y', 'C') THEN
5194: msc_sch_wb.atp_debug('Schedule: ' || 'before k := p_atp_table.Arrival_Set_Name.NEXT(i)');
5195: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
5196: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
5197: END IF;
5198:
5199: IF l_arrival_count > 1 THEN
5200: k := p_atp_table.Arrival_Set_Name.NEXT(k);

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

5202: k := null;
5203: END IF;
5204:
5205: IF PG_DEBUG in ('Y', 'C') THEN
5206: msc_sch_wb.atp_debug('Schedule: ' || 'after k := p_atp_table.Arrival_Set_Name.NEXT(i)');
5207: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
5208: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
5209: END IF;
5210:

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

5203: END IF;
5204:
5205: IF PG_DEBUG in ('Y', 'C') THEN
5206: msc_sch_wb.atp_debug('Schedule: ' || 'after k := p_atp_table.Arrival_Set_Name.NEXT(i)');
5207: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
5208: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
5209: END IF;
5210:
5211: l_temp_atp_supply_demand := l_null_atp_supply_demand;

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

5204:
5205: IF PG_DEBUG in ('Y', 'C') THEN
5206: msc_sch_wb.atp_debug('Schedule: ' || 'after k := p_atp_table.Arrival_Set_Name.NEXT(i)');
5207: msc_sch_wb.atp_debug ('Schedule: ' || 'k :='||to_char(k));
5208: msc_sch_wb.atp_debug ('Schedule: ' || 'i :='||to_char(i));
5209: END IF;
5210:
5211: l_temp_atp_supply_demand := l_null_atp_supply_demand;
5212: l_temp_atp_period := l_null_atp_period;

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

5239: IF l_arrival_count > 1 and p_atp_table.quantity_ordered(1) <> 0 THEN
5240: -- Bug 2259824
5241: l_group_date := TRUNC(sysdate);--4460369 + MSC_ATP_PVT.G_END_OF_DAY;
5242: IF PG_DEBUG in ('Y', 'C') THEN
5243: msc_sch_wb.atp_debug('Schedule: 2259824 l_group_date = '||
5244: to_char(l_group_date, 'DD-MON-YYYY HH24:MI:SS'));
5245: END IF;
5246:
5247: IF l_multi_scenario = 1 THEN

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

5246:
5247: IF l_multi_scenario = 1 THEN
5248:
5249: IF PG_DEBUG in ('Y', 'C') THEN
5250: msc_sch_wb.atp_debug('Schedule: ' || 'print data from l_temp_arr_atp_table');
5251: i := l_temp_arr_atp_table.Action.FIRST;
5252: WHILE i IS NOT NULL LOOP
5253: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||
5254: to_char(i) || '):'|| to_char(l_temp_arr_atp_table.Inventory_Item_Id(i)) );

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

5249: IF PG_DEBUG in ('Y', 'C') THEN
5250: msc_sch_wb.atp_debug('Schedule: ' || 'print data from l_temp_arr_atp_table');
5251: i := l_temp_arr_atp_table.Action.FIRST;
5252: WHILE i IS NOT NULL LOOP
5253: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||
5254: to_char(i) || '):'|| to_char(l_temp_arr_atp_table.Inventory_Item_Id(i)) );
5255: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||
5256: to_char(l_temp_arr_atp_table.Source_Organization_Id(i)) );
5257: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||

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

5251: i := l_temp_arr_atp_table.Action.FIRST;
5252: WHILE i IS NOT NULL LOOP
5253: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||
5254: to_char(i) || '):'|| to_char(l_temp_arr_atp_table.Inventory_Item_Id(i)) );
5255: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||
5256: to_char(l_temp_arr_atp_table.Source_Organization_Id(i)) );
5257: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||
5258: to_char(l_temp_arr_atp_table.Quantity_Ordered(i)) );
5259: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.OE_FLAG:' ||

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

5253: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Inventory_Item_Id( ' ||
5254: to_char(i) || '):'|| to_char(l_temp_arr_atp_table.Inventory_Item_Id(i)) );
5255: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||
5256: to_char(l_temp_arr_atp_table.Source_Organization_Id(i)) );
5257: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||
5258: to_char(l_temp_arr_atp_table.Quantity_Ordered(i)) );
5259: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.OE_FLAG:' ||
5260: l_temp_arr_atp_table.OE_FLAG(i) );
5261: i := l_temp_arr_atp_table.Action.NEXT(i);

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

5255: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Source_Organization_Id:' ||
5256: to_char(l_temp_arr_atp_table.Source_Organization_Id(i)) );
5257: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.Quantity_Ordered:' ||
5258: to_char(l_temp_arr_atp_table.Quantity_Ordered(i)) );
5259: msc_sch_wb.atp_debug('Schedule: ' || 'l_temp_arr_atp_table.OE_FLAG:' ||
5260: l_temp_arr_atp_table.OE_FLAG(i) );
5261: i := l_temp_arr_atp_table.Action.NEXT(i);
5262: END LOOP;
5263: END IF;

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

5289: END LOOP;
5290:
5291: -- first scenario: populate group date
5292: IF PG_DEBUG in ('Y', 'C') THEN
5293: msc_sch_wb.atp_debug('Schedule: ' || 'working on group date');
5294: END IF;
5295: FOR i in 1..x_atp_table.Action.COUNT LOOP
5296: x_atp_table.Scenario_Id(i) := 1;
5297: END LOOP;

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

5368: -- multi_scenario = 0
5369: -- this is the OE case
5370: -- get the group date.
5371: IF PG_DEBUG in ('Y', 'C') THEN
5372: msc_sch_wb.atp_debug('Schedule: ' || 'in arrival set, oe case');
5373: END IF;
5374:
5375: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_temp_arr_atp_table,
5376: x_atp_table,

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

5396:
5397: -- 1072816 need to do something to undo
5398:
5399: IF PG_DEBUG in ('Y', 'C') THEN
5400: msc_sch_wb.atp_debug('Schedule: ' || 'l_group_date ='||
5401: to_char(l_group_date, 'DD-MON-YYYY HH24:MI:SS'));
5402: msc_sch_wb.atp_debug('Schedule: ' || 'p_atp_table.Requested_Arrival_Date(1) = '||
5403: to_char(p_atp_table.Requested_Arrival_Date(1), 'DD-MON-YYYY HH24:MI:SS'));
5404: END IF;

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

5398:
5399: IF PG_DEBUG in ('Y', 'C') THEN
5400: msc_sch_wb.atp_debug('Schedule: ' || 'l_group_date ='||
5401: to_char(l_group_date, 'DD-MON-YYYY HH24:MI:SS'));
5402: msc_sch_wb.atp_debug('Schedule: ' || 'p_atp_table.Requested_Arrival_Date(1) = '||
5403: to_char(p_atp_table.Requested_Arrival_Date(1), 'DD-MON-YYYY HH24:MI:SS'));
5404: END IF;
5405: -- dsting setproc
5406:

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

5417: IF l_set_status <> ALLSUCCESS OR x_atp_table.action(1) = ATPQUERY
5418: THEN
5419: -- arrival set fails/ we need to remove demands
5420: IF PG_DEBUG in ('Y', 'C') THEN
5421: msc_sch_wb.atp_debug('Schedule: ' || 'before removing the data for arrival set');
5422: END IF;
5423:
5424: -- 2902265
5425: MSC_ATP_PROC.cleanup_set(p_instance_id,

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

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

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

5444: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
5445: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
5446: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
5447: IF PG_DEBUG in ('Y', 'C') THEN
5448: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 12');
5449: END IF;
5450: ELSE
5451: IF PG_DEBUG in ('Y', 'C') THEN
5452: msc_sch_wb.atp_debug('arrival set succeeded');

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

5448: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 12');
5449: END IF;
5450: ELSE
5451: IF PG_DEBUG in ('Y', 'C') THEN
5452: msc_sch_wb.atp_debug('arrival set succeeded');
5453: END IF;
5454: -- dsting setproc
5455:
5456: -- 2902265

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

5485: -- preserved back, as it was updated to 0 in the begining in case of reschedule.
5486:
5487: ---bug 2384224
5488: IF PG_DEBUG in ('Y', 'C') THEN
5489: msc_sch_wb.atp_debug('Schedule: Debug l_inv_ctp ' || l_inv_ctp);
5490: msc_sch_wb.atp_debug('Schedule: Debug G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
5491: msc_sch_wb.atp_debug('Schedule: Debug x_atp_table.Action(1)' || x_atp_table.Action(1));
5492: END IF;
5493: IF /*(l_inv_ctp = 4) AND */ (x_atp_table.Action(1) = DEMANDMODIFY OR --3720018, commented for support of rescheduling in ODS

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

5486:
5487: ---bug 2384224
5488: IF PG_DEBUG in ('Y', 'C') THEN
5489: msc_sch_wb.atp_debug('Schedule: Debug l_inv_ctp ' || l_inv_ctp);
5490: msc_sch_wb.atp_debug('Schedule: Debug G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
5491: msc_sch_wb.atp_debug('Schedule: Debug x_atp_table.Action(1)' || x_atp_table.Action(1));
5492: END IF;
5493: IF /*(l_inv_ctp = 4) AND */ (x_atp_table.Action(1) = DEMANDMODIFY OR --3720018, commented for support of rescheduling in ODS
5494: x_atp_table.Action(1) = DEMANDADD OR

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

5487: ---bug 2384224
5488: IF PG_DEBUG in ('Y', 'C') THEN
5489: msc_sch_wb.atp_debug('Schedule: Debug l_inv_ctp ' || l_inv_ctp);
5490: msc_sch_wb.atp_debug('Schedule: Debug G_INV_CTP ' || MSC_ATP_PVT.G_INV_CTP);
5491: msc_sch_wb.atp_debug('Schedule: Debug x_atp_table.Action(1)' || x_atp_table.Action(1));
5492: END IF;
5493: IF /*(l_inv_ctp = 4) AND */ (x_atp_table.Action(1) = DEMANDMODIFY OR --3720018, commented for support of rescheduling in ODS
5494: x_atp_table.Action(1) = DEMANDADD OR
5495: x_atp_table.Action(1) = DMDRSVADD) THEN

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

5506: END LOOP; */
5507:
5508: IF NVL(x_atp_table.error_code(1), -1) not in (0, 61) THEN --3720018
5509: IF PG_DEBUG in ('Y', 'C') THEN
5510: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5511: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5512: END IF;
5513:
5514: -- rajjain single call to Undo_Delete_Row procedure --3720018

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

5507:
5508: IF NVL(x_atp_table.error_code(1), -1) not in (0, 61) THEN --3720018
5509: IF PG_DEBUG in ('Y', 'C') THEN
5510: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5511: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5512: END IF;
5513:
5514: -- rajjain single call to Undo_Delete_Row procedure --3720018
5515: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

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

5541: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
5542: );
5543:
5544: IF PG_DEBUG in ('Y', 'C') THEN
5545: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
5546: END IF;
5547:
5548: ELSE -- For summary enhancement
5549:

Line 5566: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5562:
5563: --Changes for Bug 3629191 : Population of Offset data in Global Records.
5564:
5565: IF PG_DEBUG in ('Y', 'C') THEN
5566: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5567: END IF;
5568:
5569: IF l_delete_atp_rec.del_demand_ids IS NOT NULL and l_delete_atp_rec.del_demand_ids.COUNT > 0 THEN
5570: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5575: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_demand_ids ' || l_delete_atp_rec.del_demand_ids.count);

5571: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_demand_ids.count);
5572: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_demand_ids.count);
5573: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_demand_ids.count);
5574: IF PG_DEBUG in ('Y', 'C') THEN
5575: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_demand_ids ' || l_delete_atp_rec.del_demand_ids.count);
5576: END IF;
5577: FOR i in 1..l_delete_atp_rec.del_demand_ids.count LOOP
5578: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := p_instance_id;
5579: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_demand_ids(i);

Line 5585: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5581: END LOOP;
5582: END IF;
5583:
5584: IF PG_DEBUG in ('Y', 'C') THEN
5585: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5586: END IF;
5587:
5588: IF l_delete_atp_rec.del_atp_peg_demands IS NOT NULL and l_delete_atp_rec.del_atp_peg_demands.COUNT > 0 THEN
5589: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5594: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_demands.count ' || l_delete_atp_rec.del_atp_peg_demands.count);

5590: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_demands.count);
5591: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_demands.count);
5592: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_demands.count);
5593: IF PG_DEBUG in ('Y', 'C') THEN
5594: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_demands.count ' || l_delete_atp_rec.del_atp_peg_demands.count);
5595: END IF;
5596: FOR i in 1..l_delete_atp_rec.del_atp_peg_demands.count LOOP
5597: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_demand_instance_id(i);
5598: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_demands(i);

Line 5604: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5600: END LOOP;
5601: END IF;
5602:
5603: IF PG_DEBUG in ('Y', 'C') THEN
5604: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5605: END IF;
5606:
5607: IF l_delete_atp_rec.del_atp_peg_supplies IS NOT NULL and l_delete_atp_rec.del_atp_peg_supplies.COUNT > 0 THEN
5608: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5613: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_supplies.count ' || l_delete_atp_rec.del_atp_peg_supplies.count );

5609: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_supplies.count);
5610: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_supplies.count);
5611: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_supplies.count);
5612: IF PG_DEBUG in ('Y', 'C') THEN
5613: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_supplies.count ' || l_delete_atp_rec.del_atp_peg_supplies.count );
5614: END IF;
5615: FOR i in 1..l_delete_atp_rec.del_atp_peg_supplies.count LOOP
5616: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_supply_instance_id(i);
5617: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_supplies(i);

Line 5623: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5619: END LOOP;
5620: END IF;
5621:
5622: IF PG_DEBUG in ('Y', 'C') THEN
5623: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5624: END IF;
5625:
5626: 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
5627: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5632: 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 );

5628: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5629: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5630: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5631: IF PG_DEBUG in ('Y', 'C') THEN
5632: 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 );
5633: END IF;
5634: FOR i in 1..l_delete_atp_rec.del_atp_peg_res_reqs.count LOOP
5635: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_res_instance_id(i);
5636: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_res_reqs(i);

Line 5643: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5639: END IF;
5640: --3720018
5641:
5642: IF PG_DEBUG in ('Y', 'C') THEN
5643: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5644: END IF;
5645:
5646: --Changes for Bug 3629191: Population of Offset data in Global record ends.
5647:

Line 5653: msc_sch_wb.atp_debug('Schedule: ' || 'Model present in Set Creating ATP Pegging');

5649: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET = 1 THEN
5650:
5651: -- ATP request successfull, create atp pegging
5652: IF PG_DEBUG in ('Y', 'C') THEN
5653: msc_sch_wb.atp_debug('Schedule: ' || 'Model present in Set Creating ATP Pegging');
5654: END IF;
5655:
5656: FOR i in 1..x_atp_table.inventory_item_id.COUNT LOOP
5657: IF ((x_atp_table.ATO_Model_Line_Id(i) IS NOT NULL) AND

Line 5668: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');

5664: -- plan_id > 0 and pegging has been generated.
5665: (x_atp_table.End_Pegging_Id(i) IS NOT NULL) ) THEN
5666:
5667: IF PG_DEBUG in ('Y', 'C') THEN
5668: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5669: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5670: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5671: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5672: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));

Line 5669: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );

5665: (x_atp_table.End_Pegging_Id(i) IS NOT NULL) ) THEN
5666:
5667: IF PG_DEBUG in ('Y', 'C') THEN
5668: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5669: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5670: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5671: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5672: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5673: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));

Line 5670: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));

5666:
5667: IF PG_DEBUG in ('Y', 'C') THEN
5668: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5669: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5670: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5671: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5672: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5673: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));
5674: END IF;

Line 5671: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));

5667: IF PG_DEBUG in ('Y', 'C') THEN
5668: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5669: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5670: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5671: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5672: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5673: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));
5674: END IF;
5675:

Line 5672: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));

5668: msc_sch_wb.atp_debug('Schedule: Before Call to Create_Atp_Pegging ');
5669: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5670: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5671: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5672: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5673: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));
5674: END IF;
5675:
5676: MSC_ATP_PEG.Create_Atp_Pegging (

Line 5673: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));

5669: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5670: msc_sch_wb.atp_debug('Schedule: Pegging_id : '|| x_atp_table.End_Pegging_id(i));
5671: msc_sch_wb.atp_debug('Schedule: Match Item : '|| x_atp_table.match_item_id(i));
5672: msc_sch_wb.atp_debug('Schedule: Item Id : '|| x_atp_table.Inventory_Item_Id(i));
5673: msc_sch_wb.atp_debug('Schedule: Req Item : '|| x_atp_table.request_item_id(i));
5674: END IF;
5675:
5676: MSC_ATP_PEG.Create_Atp_Pegging (
5677: x_atp_table.End_Pegging_Id(i),

Line 5687: msc_sch_wb.atp_debug('Schedule: No Call to Create_Atp_Pegging ');

5683: l_return_status
5684: );
5685: ELSE
5686: IF PG_DEBUG in ('Y', 'C') THEN
5687: msc_sch_wb.atp_debug('Schedule: No Call to Create_Atp_Pegging ');
5688: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5689: END IF;
5690:
5691: -- End Bug 3334643

Line 5688: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );

5684: );
5685: ELSE
5686: IF PG_DEBUG in ('Y', 'C') THEN
5687: msc_sch_wb.atp_debug('Schedule: No Call to Create_Atp_Pegging ');
5688: msc_sch_wb.atp_debug('Schedule: Plan_id : '|| x_atp_table.plan_id(i) );
5689: END IF;
5690:
5691: -- End Bug 3334643
5692:

Line 5731: msc_sch_wb.atp_debug('Schedule: Unscheduling...');

5727: -- Mark moved ELSE and END IF to here from the previous MARK point.
5728: ELSE
5729:
5730: IF PG_DEBUG in ('Y', 'C') THEN
5731: msc_sch_wb.atp_debug('Schedule: Unscheduling...');
5732: END IF;
5733:
5734: --Changes for Bug 3629191 : Population of Offset data in Global Records.
5735:

Line 5739: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5735:
5736: --3720018, arrays to be refered from l_delete_atp_rec.
5737:
5738: IF PG_DEBUG in ('Y', 'C') THEN
5739: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5740: END IF;
5741:
5742: IF l_delete_atp_rec.del_demand_ids IS NOT NULL and l_delete_atp_rec.del_demand_ids.COUNT > 0 THEN
5743: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5748: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_demand_ids ' || l_delete_atp_rec.del_demand_ids.count);

5744: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_demand_ids.count);
5745: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_demand_ids.count);
5746: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_demand_ids.count);
5747: IF PG_DEBUG in ('Y', 'C') THEN
5748: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_demand_ids ' || l_delete_atp_rec.del_demand_ids.count);
5749: END IF;
5750: FOR i in 1..l_delete_atp_rec.del_demand_ids.count LOOP
5751: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := p_instance_id;
5752: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_demand_ids(i);

Line 5759: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5755: END IF;
5756:
5757:
5758: IF PG_DEBUG in ('Y', 'C') THEN
5759: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5760: END IF;
5761:
5762: IF l_delete_atp_rec.del_atp_peg_demands IS NOT NULL and l_delete_atp_rec.del_atp_peg_demands.COUNT > 0 THEN
5763: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5768: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_demands.count ' || l_delete_atp_rec.del_atp_peg_demands.count);

5764: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_demands.count);
5765: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_demands.count);
5766: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_demands.count);
5767: IF PG_DEBUG in ('Y', 'C') THEN
5768: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_demands.count ' || l_delete_atp_rec.del_atp_peg_demands.count);
5769: END IF;
5770: FOR i in 1..l_delete_atp_rec.del_atp_peg_demands.count LOOP
5771: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_demand_instance_id(i);
5772: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_demands(i);

Line 5779: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5775: END IF;
5776:
5777:
5778: IF PG_DEBUG in ('Y', 'C') THEN
5779: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5780: END IF;
5781:
5782: IF l_delete_atp_rec.del_atp_peg_supplies IS NOT NULL and l_delete_atp_rec.del_atp_peg_supplies.COUNT > 0 THEN
5783: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5788: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_supplies.count ' || l_delete_atp_rec.del_atp_peg_supplies.count );

5784: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_supplies.count);
5785: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_supplies.count);
5786: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_supplies.count);
5787: IF PG_DEBUG in ('Y', 'C') THEN
5788: msc_sch_wb.atp_debug('Schedule: l_delete_atp_rec.del_atp_peg_supplies.count ' || l_delete_atp_rec.del_atp_peg_supplies.count );
5789: END IF;
5790: FOR i in 1..l_delete_atp_rec.del_atp_peg_supplies.count LOOP
5791: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_supply_instance_id(i);
5792: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_supplies(i);

Line 5799: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5795: END IF;
5796:
5797:
5798: IF PG_DEBUG in ('Y', 'C') THEN
5799: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5800: END IF;
5801:
5802: 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
5803: l_count := MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count;

Line 5808: 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 );

5804: MSC_ATP_PVT.G_OFF_INSTANCE_ID.extend(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5805: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.EXTEND(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5806: MSC_ATP_PVT.G_OFF_PLAN_ID.EXTEND(l_delete_atp_rec.del_atp_peg_res_reqs.count);
5807: IF PG_DEBUG in ('Y', 'C') THEN
5808: 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 );
5809: END IF;
5810: FOR i in 1..l_delete_atp_rec.del_atp_peg_res_reqs.count LOOP
5811: MSC_ATP_PVT.G_OFF_INSTANCE_ID(l_count + i) := l_delete_atp_rec.off_res_instance_id(i);
5812: MSC_ATP_PVT.G_OFF_DEM_TRANS_ID(l_count + i) := l_delete_atp_rec.del_atp_peg_res_reqs(i);

Line 5817: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );

5813: MSC_ATP_PVT.G_OFF_PLAN_ID(l_count + i) := l_delete_atp_rec.atp_peg_res_reqs_plan_ids(i);
5814: END LOOP;
5815: END IF;
5816: IF PG_DEBUG in ('Y', 'C') THEN
5817: msc_sch_wb.atp_debug('Schedule: G_OFF_DEM_TRANS_ID.count ' || MSC_ATP_PVT.G_OFF_DEM_TRANS_ID.count );
5818: END IF;
5819: --3720018
5820:
5821: --Changes for Bug 3629191: Population of Offset data in Global record ends.

Line 5832: msc_sch_wb.atp_debug('Schedule: Model in set : ' ||

5828: IF (x_atp_table.Action(1) = DEMANDMODIFY OR
5829: x_atp_table.Action(1) = DEMANDADD OR
5830: x_atp_table.Action(1) = DMDRSVADD) THEN
5831: IF PG_DEBUG in ('Y', 'C') THEN
5832: msc_sch_wb.atp_debug('Schedule: Model in set : ' ||
5833: MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET);
5834: END IF;
5835:
5836: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET = 1 THEN

Line 5845: msc_sch_wb.atp_debug('End Pegging Id Pegging Identifier : ' ||

5841: (x_atp_table.identifier(i) = NVL(x_atp_table.ATO_Model_Line_Id(i), 0))) THEN
5842:
5843:
5844: IF PG_DEBUG in ('Y', 'C') THEN
5845: msc_sch_wb.atp_debug('End Pegging Id Pegging Identifier : ' ||
5846: x_atp_table.End_Pegging_Id(i));
5847: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
5848: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5849: x_atp_table.ATO_Model_Line_Id(i));

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

5843:
5844: IF PG_DEBUG in ('Y', 'C') THEN
5845: msc_sch_wb.atp_debug('End Pegging Id Pegging Identifier : ' ||
5846: x_atp_table.End_Pegging_Id(i));
5847: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
5848: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5849: x_atp_table.ATO_Model_Line_Id(i));
5850: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||
5851: x_atp_table.Config_item_line_id(i));

Line 5848: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||

5844: IF PG_DEBUG in ('Y', 'C') THEN
5845: msc_sch_wb.atp_debug('End Pegging Id Pegging Identifier : ' ||
5846: x_atp_table.End_Pegging_Id(i));
5847: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
5848: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5849: x_atp_table.ATO_Model_Line_Id(i));
5850: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||
5851: x_atp_table.Config_item_line_id(i));
5852: msc_sch_wb.atp_debug('Old Plan Id : ' || l_old_plan_id(i));

Line 5850: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||

5846: x_atp_table.End_Pegging_Id(i));
5847: msc_sch_wb.atp_debug('Instance Id p_instance_id : ' || p_instance_id);
5848: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5849: x_atp_table.ATO_Model_Line_Id(i));
5850: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||
5851: x_atp_table.Config_item_line_id(i));
5852: msc_sch_wb.atp_debug('Old Plan Id : ' || l_old_plan_id(i));
5853: END IF;
5854:

Line 5852: msc_sch_wb.atp_debug('Old Plan Id : ' || l_old_plan_id(i));

5848: msc_sch_wb.atp_debug('Model Line Id Model_order_line_id : ' ||
5849: x_atp_table.ATO_Model_Line_Id(i));
5850: msc_sch_wb.atp_debug('Config. Line Id Config_order_line_id : ' ||
5851: x_atp_table.Config_item_line_id(i));
5852: msc_sch_wb.atp_debug('Old Plan Id : ' || l_old_plan_id(i));
5853: END IF;
5854:
5855: DELETE from msc_atp_pegging
5856: WHERE plan_id = l_old_plan_id(i)

Line 5862: msc_sch_wb.atp_debug('Schedule: Number of rows deleted '||

5858: NVL( x_atp_table.Config_item_line_id(i), -1),
5859: x_atp_table.ATO_Model_Line_Id(i) );
5860:
5861: IF PG_DEBUG in ('Y', 'C') THEN
5862: msc_sch_wb.atp_debug('Schedule: Number of rows deleted '||
5863: ' from Atp Pegging ' || SQL%ROWCOUNT);
5864: END IF;
5865: END IF;
5866: END LOOP;

Line 5875: msc_sch_wb.atp_debug('**********End Schedule Procedure************');

5871:
5872: END IF; -- end if action = ATPQUERY or DEMANDADD or DEMANDMODIFY
5873: -- commit;
5874: IF PG_DEBUG in ('Y', 'C') THEN
5875: msc_sch_wb.atp_debug('**********End Schedule Procedure************');
5876: END IF;
5877:
5878: EXCEPTION
5879:

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

5881: x_return_status := FND_API.G_RET_STS_ERROR;
5882:
5883: -- Resetting global variables for additional issue encountered while bug 3295831
5884: IF PG_DEBUG in ('Y', 'C') THEN
5885: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
5886: END IF;
5887: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
5888: -- ATP4drp re-set using original profile value
5889: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 5903: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

5899: -- 2625800: krajan
5900: ---agilent arrival set bug
5901: IF l_arrival_count > 1 THEN
5902: IF PG_DEBUG in ('Y', 'C') THEN
5903: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
5904: END IF;
5905: --for arrivalset l_atp_table contains only the record that we are processing
5906: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
5907: ---first we add the record we have processed so far

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

5910: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
5911: --now we assign rest of the record.
5912: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
5913: IF PG_DEBUG in ('Y', 'C') THEN
5914: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
5915: END IF;
5916: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
5917: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
5918: END LOOP;

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

5920: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status );
5921: END IF;
5922:
5923: IF PG_DEBUG in ('Y', 'C') THEN
5924: msc_sch_wb.atp_debug('Schedule: NO_DATA_FOUND: Stmt = '||l_stmt);
5925: END IF;
5926: -- 1072816 need to do something to undo
5927:
5928: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP

Line 5930: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop, i:='||i);

5926: -- 1072816 need to do something to undo
5927:
5928: FOR i in 1..MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT LOOP
5929: IF PG_DEBUG in ('Y', 'C') THEN
5930: msc_sch_wb.atp_debug('Schedule: ' || 'in the loop, i:='||i);
5931: END IF;
5932: MSC_ATP_DB_UTILS.Remove_Invalid_SD_Rec(MSC_ATP_PVT.G_PEGGING_FOR_SET(i), p_instance_id,
5933: l_plan_id, UNDO, MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(i),l_return_status);
5934: END LOOP;

Line 5947: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 13');

5943: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.DELETE;
5944: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
5945: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
5946: IF PG_DEBUG in ('Y', 'C') THEN
5947: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 13');
5948: msc_sch_wb.atp_debug('Schedule: ' || 'after the fix to remove the data');
5949: END IF;
5950:
5951: -- Bug 1661545, if scheduling was unsuccessful, make sure that old demand record is

Line 5948: msc_sch_wb.atp_debug('Schedule: ' || 'after the fix to remove the data');

5944: MSC_ATP_PVT.G_REQ_ATP_DATE.DELETE;
5945: MSC_ATP_PVT.G_REQ_DATE_QTY.DELETE;
5946: IF PG_DEBUG in ('Y', 'C') THEN
5947: msc_sch_wb.atp_debug('Schedule: ' || 'Do I come here 13');
5948: msc_sch_wb.atp_debug('Schedule: ' || 'after the fix to remove the data');
5949: END IF;
5950:
5951: -- Bug 1661545, if scheduling was unsuccessful, make sure that old demand record is
5952: -- preserved back, as it was updated to 0 in the begining in case of reschedule.

Line 5959: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

5955: x_atp_table.Action(1) = DEMANDADD OR
5956: x_atp_table.Action(1) = DMDRSVADD) THEN
5957:
5958: IF PG_DEBUG in ('Y', 'C') THEN
5959: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
5960: END IF;
5961:
5962: -- Loop thru the whole set to check if any of the records had failed Scheduling
5963: -- Update demands to reset the quantity and date in such cases

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

5964: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
5965:
5966: --bug 2384224: un delete only those demands which are deleted
5967: IF PG_DEBUG in ('Y', 'C') THEN
5968: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5969: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5970: END IF;
5971:
5972: -- rajjain single call to Undo_Delete_Row procedure

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

5965:
5966: --bug 2384224: un delete only those demands which are deleted
5967: IF PG_DEBUG in ('Y', 'C') THEN
5968: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
5969: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
5970: END IF;
5971:
5972: -- rajjain single call to Undo_Delete_Row procedure
5973: --3720018,changes to refer all the records from l_delete_atp_rec

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

6000: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
6001: );
6002:
6003: IF PG_DEBUG in ('Y', 'C') THEN
6004: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
6005: END IF;
6006:
6007: /* --s_cto_rearch
6008: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

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

6020: x_return_status := FND_API.G_RET_STS_ERROR;
6021:
6022: -- Resetting global variables for additional issue encountered while bug 3295831
6023: IF PG_DEBUG in ('Y', 'C') THEN
6024: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
6025: END IF;
6026: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
6027: -- ATP4drp re-set using original profile value
6028: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 6039: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

6035: -- 2625800: krajan
6036: ---agilent arrival set bug
6037: IF l_arrival_count > 1 THEN
6038: IF PG_DEBUG in ('Y', 'C') THEN
6039: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
6040: END IF;
6041: --for arrivalset l_atp_table contains only the record that we are processing
6042: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
6043: ---first we add the record we have processed so far

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

6046: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
6047: --now we assign rest of the record.
6048: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
6049: IF PG_DEBUG in ('Y', 'C') THEN
6050: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
6051: END IF;
6052: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
6053: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
6054: END LOOP;

Line 6083: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

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

Line 6102: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

6098: x_atp_table.Action(1) = DEMANDADD OR
6099: x_atp_table.Action(1) = DMDRSVADD) THEN
6100:
6101: IF PG_DEBUG in ('Y', 'C') THEN
6102: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
6103: END IF;
6104:
6105: -- Loop thru the whole set to check if any of the records had failed Scheduling
6106: -- Update demands to reset the quantity and date in such cases

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

6107: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
6108:
6109: --bug 2384224: un delete only those demands which are deleted
6110: IF PG_DEBUG in ('Y', 'C') THEN
6111: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
6112: msc_sch_wb.atp_debug('Schedule: ' || 'single call to Undo_Delete_Row');
6113: END IF;
6114: -- rajjain single call to Undo_Delete_Row procedure
6115: --3720018,changes to refer all the records from l_delete_atp_rec

Line 6112: msc_sch_wb.atp_debug('Schedule: ' || 'single call to Undo_Delete_Row');

6108:
6109: --bug 2384224: un delete only those demands which are deleted
6110: IF PG_DEBUG in ('Y', 'C') THEN
6111: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
6112: msc_sch_wb.atp_debug('Schedule: ' || 'single call to Undo_Delete_Row');
6113: END IF;
6114: -- rajjain single call to Undo_Delete_Row procedure
6115: --3720018,changes to refer all the records from l_delete_atp_rec
6116: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

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

6142: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
6143: );
6144:
6145: IF PG_DEBUG in ('Y', 'C') THEN
6146: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
6147: END IF;
6148:
6149: /* --s_cto_rearch
6150: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 6166: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

6162: -- Error Handling Insert krajan
6163: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
6164:
6165: IF PG_DEBUG in ('Y', 'C') THEN
6166: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6167: msc_sch_wb.atp_debug('Schedule: Invalid Object Found. In it');
6168: END IF;
6169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6170:

Line 6167: msc_sch_wb.atp_debug('Schedule: Invalid Object Found. In it');

6163: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
6164:
6165: IF PG_DEBUG in ('Y', 'C') THEN
6166: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6167: msc_sch_wb.atp_debug('Schedule: Invalid Object Found. In it');
6168: END IF;
6169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6170:
6171: -- Resetting global variables for additional issue encountered while bug 3295831

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

6169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6170:
6171: -- Resetting global variables for additional issue encountered while bug 3295831
6172: IF PG_DEBUG in ('Y', 'C') THEN
6173: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
6174: END IF;
6175: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
6176: -- ATP4drp re-set using original profile value
6177: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 6188: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

6184: -- 2625800: krajan
6185: ---agilent arrival set bug
6186: IF l_arrival_count > 1 THEN
6187: IF PG_DEBUG in ('Y', 'C') THEN
6188: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
6189: END IF;
6190: --for arrivalset l_atp_table contains only the record that we are processing
6191: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
6192: ---first we add the record we have processed so far

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

6195: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
6196: --now we assign rest of the record.
6197: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
6198: IF PG_DEBUG in ('Y', 'C') THEN
6199: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
6200: END IF;
6201: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
6202: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
6203: END LOOP;

Line 6226: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR :invalid obj');

6222: AND record_type in (3,4);
6223: EXCEPTION
6224: WHEN others then
6225: IF PG_DEBUG in ('Y', 'C') THEN
6226: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR :invalid obj');
6227: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6228: END IF;
6229: l_tmp_pegging_id := -1; --Setting to error
6230: END;

Line 6227: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

6223: EXCEPTION
6224: WHEN others then
6225: IF PG_DEBUG in ('Y', 'C') THEN
6226: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR :invalid obj');
6227: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6228: END IF;
6229: l_tmp_pegging_id := -1; --Setting to error
6230: END;
6231: IF PG_DEBUG in ('Y', 'C') THEN

Line 6232: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);

6228: END IF;
6229: l_tmp_pegging_id := -1; --Setting to error
6230: END;
6231: IF PG_DEBUG in ('Y', 'C') THEN
6232: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
6233: END IF;
6234: IF (NVL(l_tmp_pegging_id, -1) <> -1) THEN
6235: IF PG_DEBUG in ('Y', 'C') THEN
6236: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

Line 6236: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

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

Line 6253: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

6249: x_atp_table.Action(1) = DEMANDADD OR
6250: x_atp_table.Action(1) = DMDRSVADD) THEN
6251:
6252: IF PG_DEBUG in ('Y', 'C') THEN
6253: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
6254: END IF;
6255:
6256: -- Loop thru the whole set to check if any of the records had failed Scheduling
6257: -- Update demands to reset the quantity and date in such cases

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

6258: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
6259:
6260: --bug 2384224: un delete only those demands which are deleted
6261: IF PG_DEBUG in ('Y', 'C') THEN
6262: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
6263: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6264: END IF;
6265: -- rajjain single call to Undo_Delete_Row procedure
6266: --3720018,changes to refer all the records from l_delete_atp_rec

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

6259:
6260: --bug 2384224: un delete only those demands which are deleted
6261: IF PG_DEBUG in ('Y', 'C') THEN
6262: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
6263: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6264: END IF;
6265: -- rajjain single call to Undo_Delete_Row procedure
6266: --3720018,changes to refer all the records from l_delete_atp_rec
6267: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

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

6293: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
6294: );
6295:
6296: IF PG_DEBUG in ('Y', 'C') THEN
6297: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
6298: END IF;
6299:
6300: /*--s_cto_rearch
6301: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 6310: msc_sch_wb.atp_debug('Schedule: Invalid object encountered in schedule');

6306: --e_cto_rearch
6307: */
6308: END IF;
6309: IF PG_DEBUG in ('Y', 'C') THEN
6310: msc_sch_wb.atp_debug('Schedule: Invalid object encountered in schedule');
6311: END IF;
6312:
6313: -- Added to handle calendar exceptions : ship_rec_cal
6314: WHEN NO_MATCHING_DATE_IN_CAL THEN

Line 6316: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

6312:
6313: -- Added to handle calendar exceptions : ship_rec_cal
6314: WHEN NO_MATCHING_DATE_IN_CAL THEN
6315: IF PG_DEBUG in ('Y', 'C') THEN
6316: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6317: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
6318: END IF;
6319: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6320:

Line 6317: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');

6313: -- Added to handle calendar exceptions : ship_rec_cal
6314: WHEN NO_MATCHING_DATE_IN_CAL THEN
6315: IF PG_DEBUG in ('Y', 'C') THEN
6316: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6317: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
6318: END IF;
6319: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6320:
6321: -- Resetting global variables for additional issue encountered while bug 3295831

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

6319: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6320:
6321: -- Resetting global variables for additional issue encountered while bug 3295831
6322: IF PG_DEBUG in ('Y', 'C') THEN
6323: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
6324: END IF;
6325: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
6326: -- ATP4drp re-set using original profile value
6327: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 6342: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

6338: -- 2625800: krajan
6339: ---agilent arrival set bug
6340: IF l_arrival_count > 1 THEN
6341: IF PG_DEBUG in ('Y', 'C') THEN
6342: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
6343: END IF;
6344: --for arrivalset l_atp_table contains only the record that we are processing
6345: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
6346: ---first we add the record we have processed so far

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

6349: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
6350: --now we assign rest of the record.
6351: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
6352: IF PG_DEBUG in ('Y', 'C') THEN
6353: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
6354: END IF;
6355: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
6356: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
6357: END LOOP;

Line 6382: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');

6378: AND record_type in (3,4);
6379: EXCEPTION
6380: WHEN others then
6381: IF PG_DEBUG in ('Y', 'C') THEN
6382: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
6383: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6384: END IF;
6385: l_tmp_pegging_id := -1; --Setting to error
6386: END;

Line 6383: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

6379: EXCEPTION
6380: WHEN others then
6381: IF PG_DEBUG in ('Y', 'C') THEN
6382: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
6383: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6384: END IF;
6385: l_tmp_pegging_id := -1; --Setting to error
6386: END;
6387: IF PG_DEBUG in ('Y', 'C') THEN

Line 6388: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);

6384: END IF;
6385: l_tmp_pegging_id := -1; --Setting to error
6386: END;
6387: IF PG_DEBUG in ('Y', 'C') THEN
6388: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
6389: END IF;
6390: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
6391: IF PG_DEBUG in ('Y', 'C') THEN
6392: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

Line 6392: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

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

Line 6407: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

6403: x_atp_table.Action(1) = DEMANDADD OR
6404: x_atp_table.Action(1) = DMDRSVADD) THEN
6405:
6406: IF PG_DEBUG in ('Y', 'C') THEN
6407: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
6408: END IF;
6409:
6410: -- Loop thru the whole set to check if any of the records had failed Scheduling
6411: -- Update demands to reset the quantity and date in such cases

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

6412: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
6413:
6414: --bug 2384224: un delete only those demands which are deleted
6415: IF PG_DEBUG in ('Y', 'C') THEN
6416: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
6417: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6418: END IF;
6419: -- rajjain single call to Undo_Delete_Row procedure
6420: --3720018,changes to refer all the records from l_delete_atp_rec

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

6413:
6414: --bug 2384224: un delete only those demands which are deleted
6415: IF PG_DEBUG in ('Y', 'C') THEN
6416: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
6417: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6418: END IF;
6419: -- rajjain single call to Undo_Delete_Row procedure
6420: --3720018,changes to refer all the records from l_delete_atp_rec
6421: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

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

6447: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
6448: );
6449:
6450: IF PG_DEBUG in ('Y', 'C') THEN
6451: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
6452: END IF;
6453:
6454: /* --s_cto_rearch
6455: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 6467: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

6463: END IF;
6464:
6465: WHEN OTHERS THEN
6466: IF PG_DEBUG in ('Y', 'C') THEN
6467: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6468: END IF;
6469: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6470:
6471: -- Resetting global variables for additional issue encountered while bug 3295831

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

6469: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6470:
6471: -- Resetting global variables for additional issue encountered while bug 3295831
6472: IF PG_DEBUG in ('Y', 'C') THEN
6473: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );
6474: END IF;
6475: MSC_ATP_PVT.G_INV_CTP := NVL(l_inv_ctp, MSC_ATP_PVT.G_INV_CTP);
6476: -- ATP4drp re-set using original profile value
6477: --MSC_ATP_PVT.G_ALLOCATED_ATP := NVL(l_allocated_atp, MSC_ATP_PVT.G_ALLOCATED_ATP);

Line 6492: msc_sch_wb.atp_debug('Schedule: ' || 'l_msg_name := ' || l_msg_name);

6488: l_msg_name := NULL;
6489: ELSE
6490: fnd_message.parse_encoded(l_encoded_text, l_msg_app, l_msg_name);
6491: IF PG_DEBUG in ('Y', 'C') THEN
6492: msc_sch_wb.atp_debug('Schedule: ' || 'l_msg_name := ' || l_msg_name);
6493: END IF;
6494: END IF;
6495: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
6496: l_error_code := NO_MATCHING_CAL_DATE;

Line 6498: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_CAL_DATE ' );

6494: END IF;
6495: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
6496: l_error_code := NO_MATCHING_CAL_DATE;
6497: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705
6498: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_CAL_DATE ' );
6499: END IF;
6500: ELSE
6501: l_error_code := ATP_PROCESSING_ERROR;
6502: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705

Line 6503: msc_sch_wb.atp_debug('Schedule: ' || 'ATP_PROCESSING_ERROR ' );

6499: END IF;
6500: ELSE
6501: l_error_code := ATP_PROCESSING_ERROR;
6502: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705
6503: msc_sch_wb.atp_debug('Schedule: ' || 'ATP_PROCESSING_ERROR ' );
6504: END IF;
6505: END IF;
6506:
6507: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 6515: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');

6511: -- 2625800: krajan
6512: ---agilent arrival set bug
6513: IF l_arrival_count > 1 THEN
6514: IF PG_DEBUG in ('Y', 'C') THEN
6515: msc_sch_wb.atp_debug ('Schedule: ' || 'Inside arrival set error processing');
6516: END IF;
6517: --for arrivalset l_atp_table contains only the record that we are processing
6518: --- so we need to make sure that we add all the records in arrival set to x_atp_tbale
6519: ---first we add the record we have processed so far

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

6522: MSC_SATP_FUNC.Assign_Atp_Output_Rec(l_atp_table, x_atp_table, l_return_status);
6523: --now we assign rest of the record.
6524: l_count := l_temp_arr_atp_table.inventory_item_id.count + 2;
6525: IF PG_DEBUG in ('Y', 'C') THEN
6526: msc_sch_wb.atp_debug('Schedule: ' || 'l_count := ' || l_count);
6527: END IF;
6528: FOR i in l_count..p_atp_table.inventory_item_id.count LOOP
6529: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table, i, x_atp_table, l_return_status);
6530: END LOOP;

Line 6556: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR: others ');

6552: AND record_type in (3,4);
6553: EXCEPTION
6554: WHEN others then
6555: IF PG_DEBUG in ('Y', 'C') THEN
6556: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR: others ');
6557: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6558: END IF;
6559: l_tmp_pegging_id := -1; --Setting to error
6560: END;

Line 6557: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);

6553: EXCEPTION
6554: WHEN others then
6555: IF PG_DEBUG in ('Y', 'C') THEN
6556: msc_sch_wb.atp_debug('Schedule: ' || 'Select EXCEPTION KR: others ');
6557: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6558: END IF;
6559: l_tmp_pegging_id := -1; --Setting to error
6560: END;
6561: IF PG_DEBUG in ('Y', 'C') THEN

Line 6562: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);

6558: END IF;
6559: l_tmp_pegging_id := -1; --Setting to error
6560: END;
6561: IF PG_DEBUG in ('Y', 'C') THEN
6562: msc_sch_wb.atp_debug('Schedule: ' || 'l_tmp_pegging_id is ' || l_tmp_pegging_id);
6563: END IF;
6564: IF (NVL(l_tmp_pegging_id,-1) <> -1) THEN
6565: IF PG_DEBUG in ('Y', 'C') THEN
6566: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

Line 6566: msc_sch_wb.atp_debug('Schedule: ' || 'Now deleting- calling remove invalid SD REC');

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

Line 6581: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');

6577: x_atp_table.Action(1) = DEMANDADD OR
6578: x_atp_table.Action(1) = DMDRSVADD) THEN
6579:
6580: IF PG_DEBUG in ('Y', 'C') THEN
6581: msc_sch_wb.atp_debug('Schedule: ' || 'check if need to reset demands when scheduling failed');
6582: END IF;
6583:
6584: -- Loop thru the whole set to check if any of the records had failed Scheduling
6585: -- Update demands to reset the quantity and date in such cases

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

6586: -- Not needed if error_code is ALLSUCCESS or ATP_NOT_APPL.
6587:
6588: --bug 2384224: un delete only those demands which are deleted
6589: IF PG_DEBUG in ('Y', 'C') THEN
6590: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
6591: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6592: END IF;
6593: -- rajjain single call to Undo_Delete_Row procedure
6594: --3720018,changes to refer all the records from l_delete_atp_rec

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

6587:
6588: --bug 2384224: un delete only those demands which are deleted
6589: IF PG_DEBUG in ('Y', 'C') THEN
6590: msc_sch_wb.atp_debug('Schedule: ' || 'before resetting the demands when scheduling failed');
6591: msc_sch_wb.atp_debug('Schedule: ' || 'rajjain - Single call to Undo_Delete_Row');
6592: END IF;
6593: -- rajjain single call to Undo_Delete_Row procedure
6594: --3720018,changes to refer all the records from l_delete_atp_rec
6595: MSC_ATP_DB_UTILS.Undo_Delete_Row(l_delete_atp_rec.del_identifiers,

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

6621: l_delete_atp_rec.del_ods_cto_atp_refresh_no --3720018, added for support of rescheduling in ODS
6622: );
6623:
6624: IF PG_DEBUG in ('Y', 'C') THEN
6625: msc_sch_wb.atp_debug('Schedule: ' || 'after resetting the demands when scheduling failed');
6626: END IF;
6627:
6628: /* --s_cto_rearch
6629: IF MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET =1 and NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'N' THEN

Line 6907: msc_sch_wb.atp_debug('**********Begin ATP_Check Procedure************');

6903: l_alloc_atp VARCHAR2(1); --ALLOC ATP CHANGES, 12973673
6904:
6905: BEGIN
6906: IF PG_DEBUG in ('Y', 'C') THEN
6907: msc_sch_wb.atp_debug('**********Begin ATP_Check Procedure************');
6908: END IF;
6909:
6910: -- initialize API return status to success
6911: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 6916: msc_sch_wb.atp_debug('in atp_check');

6912:
6913: -- initialize the error_code to ALLSUCCESS
6914: p_atp_record.error_code := ALLSUCCESS;
6915: IF PG_DEBUG in ('Y', 'C') THEN
6916: msc_sch_wb.atp_debug('in atp_check');
6917: END IF;
6918:
6919: -- print the record
6920: IF PG_DEBUG in ('Y', 'C') THEN

Line 6921: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');

6917: END IF;
6918:
6919: -- print the record
6920: IF PG_DEBUG in ('Y', 'C') THEN
6921: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6922: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6923: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );

Line 6922: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );

6918:
6919: -- print the record
6920: IF PG_DEBUG in ('Y', 'C') THEN
6921: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6922: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6923: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );

Line 6923: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );

6919: -- print the record
6920: IF PG_DEBUG in ('Y', 'C') THEN
6921: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6922: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6923: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );

Line 6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );

6920: IF PG_DEBUG in ('Y', 'C') THEN
6921: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6922: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6923: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );

Line 6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );

6921: msc_sch_wb.atp_debug('ATP_Check: ' || '********** INPUT DATA: p_atp_record **********');
6922: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6923: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );

Line 6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );

6922: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inventory_Item_Id:' || to_char(p_atp_record.Inventory_Item_Id) );
6923: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );

Line 6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );

6923: msc_sch_wb.atp_debug('ATP_Check: ' || 'request_item_id:' || to_char(p_atp_record.request_item_id) );
6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );

Line 6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );

6924: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id:' || to_char(p_atp_record.organization_id) );
6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );

Line 6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );

6925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_Ordered:' || to_char(p_atp_record.Quantity_Ordered) );
6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );

Line 6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );

6926: msc_sch_wb.atp_debug('ATP_Check: ' || 'Quantity_UOM:' || p_atp_record.Quantity_UOM );
6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );

Line 6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );

6927: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Ship_Date:' || to_char(p_atp_record.Requested_Ship_Date) );
6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );

Line 6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );

6928: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Arrival_Date:' || to_char(p_atp_record.Requested_Arrival_Date) );
6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );

Line 6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );

6929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Latest_Acceptable_Date:' || to_char(p_atp_record.Latest_Acceptable_Date) );
6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );

Line 6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );

6930: msc_sch_wb.atp_debug('ATP_Check: ' || 'Delivery_Lead_Time:' || to_char(p_atp_record.Delivery_Lead_Time) );
6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973

Line 6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );

6931: msc_sch_wb.atp_debug('ATP_Check: ' || 'Freight_Carrier:' || p_atp_record.Freight_Carrier );
6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );

Line 6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );

6932: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Method:' || p_atp_record.Ship_Method );
6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );

Line 6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );

6933: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand_Class:' || p_atp_record.Demand_Class );
6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );

Line 6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973

6934: msc_sch_wb.atp_debug('ATP_Check: ' || 'Override_Flag:' || p_atp_record.Override_Flag );
6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );

Line 6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );

6935: msc_sch_wb.atp_debug('ATP_Check: ' || 'Action:' || to_char(p_atp_record.Action) );
6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );

Line 6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );

6936: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_Date:' || to_char(p_atp_record.Ship_Date) );
6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );

Line 6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );

6937: msc_sch_wb.atp_debug('ATP_Check: ' || 'Available_Quantity:' || to_char(p_atp_record.Available_Quantity) );
6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

Line 6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );

6938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Used_available_Quantity:' || to_char(p_atp_record.used_available_quantity) ); --bug3409973
6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);

Line 6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );

6939: msc_sch_wb.atp_debug('ATP_Check: ' || 'Requested_Date_Quantity:' || to_char(p_atp_record.Requested_Date_Quantity) );
6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6947: -- 2462661 : krajan

Line 6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );

6940: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_id:' || to_char(p_atp_record.supplier_id) );
6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6947: -- 2462661 : krajan
6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);

Line 6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

6941: msc_sch_wb.atp_debug('ATP_Check: ' || 'supplier_site_id:' || to_char(p_atp_record.supplier_site_id) );
6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6947: -- 2462661 : krajan
6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);

Line 6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);

6942: msc_sch_wb.atp_debug('ATP_Check: ' || 'Insert_Flag:' || to_char(p_atp_record.Insert_Flag) );
6943: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error_Code:' || to_char(p_atp_record.Error_Code) );
6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6947: -- 2462661 : krajan
6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);

Line 6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);

6944: msc_sch_wb.atp_debug('ATP_Check: ' || 'Order_Number:' || to_char(p_atp_record.Order_Number) );
6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6947: -- 2462661 : krajan
6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);

Line 6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);

6945: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6947: -- 2462661 : krajan
6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);

Line 6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);

6946: msc_sch_wb.atp_debug('ATP_Check: ' || 'original_item_flag := ' || p_atp_record.original_item_flag);
6947: -- 2462661 : krajan
6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);

Line 6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);

6947: -- 2462661 : krajan
6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);

Line 6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);

6948: msc_sch_wb.atp_debug('ATP_Check: ' || 'SRC_ATP_FLAG := ' || p_atp_record.src_atp_flag);
6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);

Line 6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);

6949: msc_sch_wb.atp_debug('ATP_Check: ' || 'Line Id := ' || p_atp_record.demand_source_line);
6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);

Line 6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);

6950: msc_sch_wb.atp_debug('ATP_Check: ' || 'Top_Model_line_id := ' || p_atp_record.Top_Model_line_id);
6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);

Line 6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);

6951: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Parent_Model_Line_Id := ' || p_atp_record.ATO_Parent_Model_Line_Id);
6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);

Line 6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);

6952: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATO_Model_Line_Id := ' || p_atp_record.ATO_Model_Line_Id);
6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);

Line 6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);

6953: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent_line_id := ' || p_atp_record.Parent_line_id);
6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);

Line 6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);

6954: msc_sch_wb.atp_debug('ATP_Check: ' || 'wip_supply_type := ' || p_atp_record.wip_supply_type);
6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);

Line 6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);

6955: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_flag := ' || p_atp_record.parent_atp_flag);
6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);

Line 6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);

6956: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_atp_comp_flag := ' || p_atp_record.parent_atp_comp_flag);
6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);

Line 6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);

6957: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_repl_order_flag := ' || p_atp_record.parent_repl_order_flag);
6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6965: -- ship_rec_cal

Line 6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);

6958: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_bom_item_type := ' || p_atp_record.parent_bom_item_type);
6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6965: -- ship_rec_cal
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);

Line 6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);

6959: msc_sch_wb.atp_debug('ATP_Check: ' || 'mand_comp_flag := ' || p_atp_record.mand_comp_flag);
6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6965: -- ship_rec_cal
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);

Line 6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);

6960: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent_so_quantity := ' || p_atp_record.parent_so_quantity);
6961: msc_sch_wb.atp_debug('ATP_Check: ' || 'base_model_id := ' || p_atp_record.base_model_id);
6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6965: -- ship_rec_cal
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);

Line 6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);

6962: msc_sch_wb.atp_debug('ATP_Check: ' || 'rep_ord_flag := ' || p_atp_record.rep_ord_flag);
6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6965: -- ship_rec_cal
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro

Line 6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);

6963: msc_sch_wb.atp_debug('ATP_Check: ' || 'bom_item_type := '|| p_atp_record.bom_item_type);
6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6965: -- ship_rec_cal
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6971: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

Line 6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);

6964: msc_sch_wb.atp_debug('ATP_Check: ' || 'parent item id := ' || p_atp_record.parent_item_id);
6965: -- ship_rec_cal
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6971: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6972: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012

Line 6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);

6965: -- ship_rec_cal
6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6971: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6972: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6973: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');

Line 6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro

6966: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code := ' || p_atp_record.receiving_cal_code);
6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6971: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6972: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6973: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');
6974: END IF;

Line 6971: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

6967: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code := ' || p_atp_record.intransit_cal_code);
6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6971: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6972: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6973: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');
6974: END IF;
6975:

Line 6972: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012

6968: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code := ' || p_atp_record.shipping_cal_code);
6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6971: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6972: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6973: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');
6974: END IF;
6975:
6976: -- dsting

Line 6973: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');

6969: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code := ' || p_atp_record.manufacturing_cal_code);
6970: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand_source_type := ' || p_atp_record.demand_source_type);--cmro
6971: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
6972: msc_sch_wb.atp_debug('ATP_Check: ' || 'bill_seq_id := ' || p_atp_record.bill_seq_id); --4741012
6973: msc_sch_wb.atp_debug('ATP_Check: ' || 'after printing the values');
6974: END IF;
6975:
6976: -- dsting
6977: p_atp_record.children_type := NO_MAKE_BUY_CHILDREN;

Line 6982: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_HYBRID_ALLOC_ATP is Y');

6978:
6979: -- Alloc ATP changes, 12973673
6980: IF (MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_HYBRID_ALLOC_ATP = 'Y') THEN
6981: IF PG_DEBUG in ('Y', 'C') THEN
6982: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_HYBRID_ALLOC_ATP is Y');
6983: END IF;
6984:
6985: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_FUNC.check_alloc_exists(p_atp_record.instance_id,
6986: -1, --PLAN_ID

Line 6992: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP = '||MSC_ATP_PVT.G_ALLOCATED_ATP);

6988: p_atp_record.organization_id,
6989: nvl(p_atp_record.Requested_Arrival_Date, p_atp_record.Requested_Ship_Date));
6990:
6991: IF PG_DEBUG in ('Y', 'C') THEN
6992: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_ALLOCATED_ATP = '||MSC_ATP_PVT.G_ALLOCATED_ATP);
6993: END IF;
6994: END IF;
6995:
6996: -- check if one and only one of the requested_ship_date and

Line 7016: msc_sch_wb.atp_debug('ATP_Check: Sys Next Date is: ' || l_sys_next_date);

7012: l_sys_next_date := MSC_CALENDAR.NEXT_WORK_DAY(p_atp_record.manufacturing_cal_code, -- use OMC
7013: p_atp_record.instance_id,
7014: l_trunc_sysdate);
7015: IF PG_DEBUG in ('Y', 'C') THEN
7016: msc_sch_wb.atp_debug('ATP_Check: Sys Next Date is: ' || l_sys_next_date);
7017: END IF;
7018: /* To support new logic for dependent demands allocation in time phased PF rule based AATP scenarios
7019: Reset global variable*/
7020: MSC_ATP_PVT.G_TIME_PHASED_PF_ENABLED := 'N';

Line 7026: msc_sch_wb.atp_debug('ATP_Check: ' || 'do atp check at an inventory org');

7022: IF (NVL(p_atp_record.supplier_id, -1) = -1) THEN
7023: -- doing atp check in an inventory org
7024:
7025: IF PG_DEBUG in ('Y', 'C') THEN
7026: msc_sch_wb.atp_debug('ATP_Check: ' || 'do atp check at an inventory org');
7027: END IF;
7028:
7029: -- krajan : 2462661 : post fix
7030: -- set the global variable to null

Line 7053: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Time Phased ATP for this item *** ');

7049: -- If dealing with Time Phased ATP Item set the global for CTO_PF
7050: MSC_ATP_PVT.G_CTO_PF_ATP := 'Y';
7051:
7052: IF PG_DEBUG in ('Y', 'C') THEN
7053: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Time Phased ATP for this item *** ');
7054: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATF Date := ' || p_atp_record.atf_date);
7055: msc_sch_wb.atp_debug('ATP_Check: Re-set G_CTO_PF_ATP to ' ||
7056: MSC_ATP_PVT.G_CTO_PF_ATP);
7057: END IF;

Line 7054: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATF Date := ' || p_atp_record.atf_date);

7050: MSC_ATP_PVT.G_CTO_PF_ATP := 'Y';
7051:
7052: IF PG_DEBUG in ('Y', 'C') THEN
7053: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Time Phased ATP for this item *** ');
7054: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATF Date := ' || p_atp_record.atf_date);
7055: msc_sch_wb.atp_debug('ATP_Check: Re-set G_CTO_PF_ATP to ' ||
7056: MSC_ATP_PVT.G_CTO_PF_ATP);
7057: END IF;
7058: -- CTO_PF_PRJ changes for CTO PF Cross Project Impacts

Line 7055: msc_sch_wb.atp_debug('ATP_Check: Re-set G_CTO_PF_ATP to ' ||

7051:
7052: IF PG_DEBUG in ('Y', 'C') THEN
7053: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Time Phased ATP for this item *** ');
7054: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATF Date := ' || p_atp_record.atf_date);
7055: msc_sch_wb.atp_debug('ATP_Check: Re-set G_CTO_PF_ATP to ' ||
7056: MSC_ATP_PVT.G_CTO_PF_ATP);
7057: END IF;
7058: -- CTO_PF_PRJ changes for CTO PF Cross Project Impacts
7059: ELSE

Line 7065: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Product Family(non-time phased) ATP for this item *** ');

7061: l_time_phased_atp := 'N';
7062: l_request_item_id := p_atp_record.inventory_item_id;
7063:
7064: IF PG_DEBUG in ('Y', 'C') THEN
7065: msc_sch_wb.atp_debug('ATP_Check: ' || '*** Perform Product Family(non-time phased) ATP for this item *** ');
7066: END IF;
7067: END IF;
7068: END IF;
7069:

Line 7071: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_TIME_PHASED_PF_ENABLED := ' || MSC_ATP_PVT.G_TIME_PHASED_PF_ENABLED);

7067: END IF;
7068: END IF;
7069:
7070: IF PG_DEBUG in ('Y', 'C') THEN
7071: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_TIME_PHASED_PF_ENABLED := ' || MSC_ATP_PVT.G_TIME_PHASED_PF_ENABLED);
7072: END IF;
7073:
7074: /* Now we store member item's info in G_ITEM_INFO_REC (C_ITEM_INFO_REC)
7075: PF_ITEM_INFO_REC is used to store family item's info*/

Line 7087: msc_sch_wb.atp_debug('This models atp flag = Y. We are coming here for second time');

7083: IF NVL(p_atp_record.parent_item_id, -1) = p_atp_record.inventory_item_id THEN
7084: -- if we are rechecking model as atp flag = 'Y' then
7085: -- we should recheck model's attribute so that model flags are set correctly.
7086: IF PG_DEBUG in ('Y', 'C') THEN
7087: msc_sch_wb.atp_debug('This models atp flag = Y. We are coming here for second time');
7088: END IF;
7089: MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id := null;
7090: END IF;
7091: --e_cto_rearch

Line 7106: msc_sch_wb.atp_debug('ATP_Check: ' || 'Local Rec Inst. '||PF_ITEM_INFO_REC.instance_id);

7102: /* Now get family item's info*/
7103: IF (l_family_item_id = G_ITEM_INFO_REC.sr_inv_item_id) THEN
7104: PF_ITEM_INFO_REC := G_ITEM_INFO_REC;
7105: IF PG_DEBUG in ('Y', 'C') THEN
7106: msc_sch_wb.atp_debug('ATP_Check: ' || 'Local Rec Inst. '||PF_ITEM_INFO_REC.instance_id);
7107: END IF;
7108: ELSE
7109: --s_cto_rearch
7110: PF_ITEM_INFO_REC.parent_pegging_id := p_parent_pegging_id;

Line 7154: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);

7150:
7151: /* Modularize Item and Org Info */
7152:
7153: IF PG_DEBUG in ('Y', 'C') THEN
7154: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
7155: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
7156: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
7157: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
7158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);

Line 7155: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);

7151: /* Modularize Item and Org Info */
7152:
7153: IF PG_DEBUG in ('Y', 'C') THEN
7154: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
7155: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
7156: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
7157: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
7158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
7159: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);

Line 7156: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);

7152:
7153: IF PG_DEBUG in ('Y', 'C') THEN
7154: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
7155: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
7156: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
7157: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
7158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
7159: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
7160: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149

Line 7157: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);

7153: IF PG_DEBUG in ('Y', 'C') THEN
7154: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
7155: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
7156: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
7157: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
7158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
7159: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
7160: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149
7161: END IF;

Line 7158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);

7154: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP flag is '||l_atp_flag);
7155: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
7156: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
7157: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
7158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
7159: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
7160: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149
7161: END IF;
7162:

Line 7159: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);

7155: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP components flag is ' ||l_atp_comp_flag);
7156: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
7157: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
7158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
7159: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
7160: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149
7161: END IF;
7162:
7163: -- 2462661 : krajan

Line 7160: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149

7156: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt := ' || l_pre_pro_lt);
7157: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_fixed_lt := ' || l_fixed_lt);
7158: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_variable_lt := ' || l_variable_lt);
7159: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_post_pro_lt := ' || l_post_pro_lt);
7160: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt); -- 5438149
7161: END IF;
7162:
7163: -- 2462661 : krajan
7164: -- Check to see if the item is uncollected.

Line 7168: msc_sch_wb.atp_debug ('Checking for uncollected item ' );

7164: -- Check to see if the item is uncollected.
7165: -- If we get here, then it means that the item is not ATPABle.
7166: -- If we defer, then error out
7167: IF PG_DEBUG in ('Y', 'C') THEN
7168: msc_sch_wb.atp_debug ('Checking for uncollected item ' );
7169: end if;
7170: if (MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID is not NULL) AND
7171: (NVL(p_atp_record.src_atp_flag,'N') <> 'N') then
7172: IF PG_DEBUG in ('Y', 'C') THEN

Line 7173: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Not Collected as flags differ');

7169: end if;
7170: if (MSC_ATP_PVT.G_SR_INVENTORY_ITEM_ID is not NULL) AND
7171: (NVL(p_atp_record.src_atp_flag,'N') <> 'N') then
7172: IF PG_DEBUG in ('Y', 'C') THEN
7173: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Not Collected as flags differ');
7174: END IF;
7175: p_atp_record.error_code := ATP_ITEM_NOT_COLLECTED;
7176:
7177: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;

Line 7184: msc_sch_wb.atp_debug('ATP_Check: ' || 'C_ITEM_INFO_REC atp_rule_id := '

7180: /************ Bug 1510853 ATP Rule Check ************/
7181: -- Initialize the rule flag
7182: G_ATP_RULE_FLAG := 'Y';
7183: IF PG_DEBUG in ('Y', 'C') THEN
7184: msc_sch_wb.atp_debug('ATP_Check: ' || 'C_ITEM_INFO_REC atp_rule_id := '
7185: || NVL(C_ITEM_INFO_REC.atp_rule_id, 0));
7186: END IF;
7187: IF ((G_INV_CTP = 5) AND (C_ITEM_INFO_REC.atp_rule_id IS NULL)) THEN
7188: G_ATP_RULE_FLAG := 'N'; -- Rule not found at item level.

Line 7190: msc_sch_wb.atp_debug('ATP_Check: ' || ' NO ATP RULE FOR ITEM ');

7186: END IF;
7187: IF ((G_INV_CTP = 5) AND (C_ITEM_INFO_REC.atp_rule_id IS NULL)) THEN
7188: G_ATP_RULE_FLAG := 'N'; -- Rule not found at item level.
7189: IF PG_DEBUG in ('Y', 'C') THEN
7190: msc_sch_wb.atp_debug('ATP_Check: ' || ' NO ATP RULE FOR ITEM ');
7191: END IF;
7192: END IF;
7193: /************ Bug 1510853 ATP Rule Check ************/
7194:

Line 7203: msc_sch_wb.atp_debug('delivery lead time is not specified');

7199: -- get the default delivery_lead_time if it is not specified.
7200: -- dsting dlt
7201: IF (NVL(p_atp_record.delivery_lead_time, -1) = -1 ) THEN
7202:
7203: msc_sch_wb.atp_debug('delivery lead time is not specified');
7204:
7205: -- if we can not get the lead time from sourcing,
7206: -- we need to find the default between locations.
7207:

Line 7239: msc_sch_wb.atp_debug('ATP_Check: Nothing passed');

7235: l_order_line_id := NULL;
7236: l_location_id := p_atp_record.to_location_id;
7237: ELSE
7238: IF PG_DEBUG in ('Y', 'C') THEN
7239: msc_sch_wb.atp_debug('ATP_Check: Nothing passed');
7240: END IF;
7241: END IF;
7242:
7243: -- cchen : changes for ship method

Line 7269: msc_sch_wb.atp_debug('rounded l_delivery_lead_time: ' || l_delivery_lead_time);

7265:
7266: -- dsting dlt Round delivery lead time up
7267: l_delivery_lead_time := CEIL(l_delivery_lead_time);
7268: IF PG_DEBUG in ('Y', 'C') THEN
7269: msc_sch_wb.atp_debug('rounded l_delivery_lead_time: ' || l_delivery_lead_time);
7270: END IF;
7271:
7272: -- BUG 1621816- We offset the delivery lead time instead of
7273: -- reducing it. To off set we use calender code of the target_org

Line 7312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_original_req_ship_date: '||l_original_req_ship_date);

7308: the request date
7309: */
7310: l_original_req_ship_date := nvl(p_atp_record.original_request_date,l_requested_ship_date);
7311: IF PG_DEBUG in ('Y', 'C') THEN
7312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_original_req_ship_date: '||l_original_req_ship_date);
7313: END IF;
7314:
7315: l_summary_flag := MSC_ATP_PVT.G_SUMMARY_FLAG;
7316: --- postprocess summary

Line 7325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find out ATP_DEMAND_class flag for that item ');

7321: IF ((p_search = 1) and (p_parent_pegging_id is null)) THEN
7322: IF (MSC_ATP_PVT.G_INV_CTP = 5) AND (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN
7323: --- THIS IS OSD case, backward case, and top demand
7324: IF PG_DEBUG in ('Y', 'C') THEN
7325: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find out ATP_DEMAND_class flag for that item ');
7326: END IF;
7327:
7328: BEGIN
7329: SELECT NVL(r.demand_class_atp_flag, 0)

Line 7345: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_demand_class_flag : = ' || l_demand_class_flag);

7341: AND I.sr_instance_id = R.sr_instance_id
7342: AND R.rule_id = NVL(I.atp_rule_id, P.default_atp_rule_id);
7343:
7344: IF PG_DEBUG in ('Y', 'C') THEN
7345: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_demand_class_flag : = ' || l_demand_class_flag);
7346: END IF;
7347: EXCEPTION
7348: WHEN OTHERS THEN
7349: l_demand_class_flag := 0;

Line 7359: 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);

7355: END IF;
7356: --- now extend the array which holds the demand_class atp_flag and add l_demand_class_flag to it
7357: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.EXTEND;
7358: IF PG_DEBUG in ('Y', 'C') THEN
7359: 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);
7360: END IF;
7361: MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG( MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG.count) := l_demand_class_flag;
7362: END IF;
7363:

Line 7421: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sysdate ='||l_sysdate);

7417: p_atp_record.instance_id,
7418: sysdate), sysdate); */
7419:
7420: IF PG_DEBUG in ('Y', 'C') THEN
7421: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sysdate ='||l_sysdate);
7422: END IF;
7423: --END IF; Comment out atp_flag block
7424: -- Bugs 2020607, 2104018, 2031894, 1869748
7425:

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

7426: p_atp_record.delivery_lead_time := l_delivery_lead_time;
7427: p_atp_record.ship_method := l_ship_method;
7428:
7429: IF PG_DEBUG in ('Y', 'C') THEN
7430: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_method = '||l_ship_method ||' lead time = '||l_delivery_lead_time);
7431: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date :=' || l_requested_ship_date);
7432: END IF;
7433:
7434: IF (l_atp_flag = 'N') and (l_atp_comp_flag = 'N') THEN

Line 7431: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date :=' || l_requested_ship_date);

7427: p_atp_record.ship_method := l_ship_method;
7428:
7429: IF PG_DEBUG in ('Y', 'C') THEN
7430: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_method = '||l_ship_method ||' lead time = '||l_delivery_lead_time);
7431: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date :=' || l_requested_ship_date);
7432: END IF;
7433:
7434: IF (l_atp_flag = 'N') and (l_atp_comp_flag = 'N') THEN
7435: IF PG_DEBUG in ('Y', 'C') THEN

Line 7436: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_flag and l_atp_comp_flag are both N');

7432: END IF;
7433:
7434: IF (l_atp_flag = 'N') and (l_atp_comp_flag = 'N') THEN
7435: IF PG_DEBUG in ('Y', 'C') THEN
7436: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_flag and l_atp_comp_flag are both N');
7437: END IF;
7438: p_atp_record.error_code := ATP_NOT_APPL;
7439:
7440: -- Bug 1916086, modified Schedule procedure to extend G_PEGGING_FOR_SET in case of

Line 7446: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');

7442: -- l_fst_src_pegging_ids would have same number of records.
7443:
7444: IF p_parent_pegging_id is null THEN
7445: IF PG_DEBUG in ('Y', 'C') THEN
7446: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
7447: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7448: END IF;
7449:
7450: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;

Line 7447: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

7443:
7444: IF p_parent_pegging_id is null THEN
7445: IF PG_DEBUG in ('Y', 'C') THEN
7446: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
7447: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7448: END IF;
7449:
7450: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
7451: IF PG_DEBUG in ('Y', 'C') THEN

Line 7452: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

7448: END IF;
7449:
7450: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
7451: IF PG_DEBUG in ('Y', 'C') THEN
7452: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7453: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
7454: END IF;
7455:
7456: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := null;

Line 7453: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');

7449:
7450: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
7451: IF PG_DEBUG in ('Y', 'C') THEN
7452: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7453: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
7454: END IF;
7455:
7456: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := null;
7457:

Line 7483: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

7479: -- Bug 2625791, 2623816: If it is a transfer case then We should take
7480: -- into consideration PTF date passed to us from the top organization.
7481: -- We should satisfy the damand as per the PTF date from the top org.
7482: IF PG_DEBUG in ('Y', 'C') THEN
7483: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
7484: END IF;
7485:
7486: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on
7487: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');

Line 7490: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);

7486: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on
7487: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');
7488:
7489: IF PG_DEBUG in ('Y', 'C') THEN
7490: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);
7491: END IF;
7492:
7493: IF MSC_ATP_PVT.G_INV_CTP = 5 and C_ITEM_INFO_REC.bom_item_type = 1
7494: and C_ITEM_INFO_REC.replenish_to_ord_flag = 'Y'

Line 7514: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date < l_sysdate');

7510: --5160663, commenting out.
7511: /*
7512: IF l_requested_ship_date < GREATEST(l_sysdate,l_ato_date) THEN
7513: IF PG_DEBUG in ('Y', 'C') THEN
7514: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date < l_sysdate');
7515: END IF;
7516: p_atp_record.requested_date_quantity := 0.0;
7517: p_atp_record.ship_date := GREATEST(l_sysdate, MSC_ATP_PVT.G_PTF_DATE, l_ato_date);
7518: ELSE

Line 7520: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date >= l_sysdate');

7516: p_atp_record.requested_date_quantity := 0.0;
7517: p_atp_record.ship_date := GREATEST(l_sysdate, MSC_ATP_PVT.G_PTF_DATE, l_ato_date);
7518: ELSE
7519: IF PG_DEBUG in ('Y', 'C') THEN
7520: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date >= l_sysdate');
7521: END IF;
7522: p_atp_record.requested_date_quantity :=
7523: p_atp_record.quantity_ordered;
7524: p_atp_record.ship_date := GREATEST(l_requested_ship_date, MSC_ATP_PVT.G_PTF_DATE);

Line 7558: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date:='||

7554: END IF;
7555: */
7556:
7557: IF PG_DEBUG in ('Y', 'C') THEN
7558: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date:='||
7559: p_atp_record.ship_date );
7560: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:='||
7561: p_atp_record.requested_date_quantity);
7562: END IF;

Line 7560: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:='||

7556:
7557: IF PG_DEBUG in ('Y', 'C') THEN
7558: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date:='||
7559: p_atp_record.ship_date );
7560: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:='||
7561: p_atp_record.requested_date_quantity);
7562: END IF;
7563: p_atp_record.available_quantity := p_atp_record.quantity_ordered;
7564:

Line 7575: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.Calling_Module : '||p_atp_record.Calling_Module);

7571: -- shall always be yes in case of CTO, this situation may only occur at
7572: -- components level.
7573:
7574: IF PG_DEBUG in ('Y', 'C') THEN
7575: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.Calling_Module : '||p_atp_record.Calling_Module);
7576: END IF;
7577:
7578: --s_cto_rearch
7579: /* bug 3564511: We do not need to add demand and pegging for non-atpable items

Line 7600: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');

7596: IF p_parent_pegging_id is null THEN
7597:
7598: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
7599: IF PG_DEBUG in ('Y', 'C') THEN
7600: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
7601: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7602: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7603: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
7604: END IF;

Line 7601: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

7597:
7598: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
7599: IF PG_DEBUG in ('Y', 'C') THEN
7600: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
7601: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7602: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7603: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
7604: END IF;
7605:

Line 7602: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

7598: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
7599: IF PG_DEBUG in ('Y', 'C') THEN
7600: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
7601: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7602: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7603: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
7604: END IF;
7605:
7606: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := null;

Line 7603: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');

7599: IF PG_DEBUG in ('Y', 'C') THEN
7600: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
7601: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7602: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
7603: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting null pegging id for Non-ATPable items');
7604: END IF;
7605:
7606: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := null;
7607:

Line 7693: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||

7689: p_plan_id,
7690: l_demand_class_flag,
7691: l_demand_id);
7692: IF PG_DEBUG in ('Y', 'C') THEN
7693: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||
7694: l_demand_id);
7695: END IF;
7696:
7697:

Line 7714: msc_sch_wb.atp_debug('ATP_Check: ' || 'customer class or demand class : same calls');

7710: -- hierarchy changes due to arrival set
7711:
7712: IF (MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') THEN
7713: IF PG_DEBUG in ('Y', 'C') THEN
7714: msc_sch_wb.atp_debug('ATP_Check: ' || 'customer class or demand class : same calls');
7715: END IF;
7716:
7717: /* Modularize Item and Org Info */
7718: -- Re-Use info instead of making unnecessary call.

Line 7740: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Set_Alloc_Rule_Variables');

7736: l_return_status
7737: );
7738: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
7739: IF PG_DEBUG in ('Y', 'C') THEN
7740: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Set_Alloc_Rule_Variables');
7741: END IF;
7742: RAISE FND_API.G_EXC_ERROR;
7743: END IF;
7744:

Line 7762: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date = '||l_requested_ship_date);

7758: ELSE
7759: l_item_to_use := l_inv_item_id;
7760: END IF;
7761: IF PG_DEBUG in ('Y', 'C') THEN
7762: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date = '||l_requested_ship_date);
7763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item to be used = '||l_item_to_use);
7764: END IF;
7765: /* New allocation logic for time_phased_atp changes end */
7766:

Line 7763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item to be used = '||l_item_to_use);

7759: l_item_to_use := l_inv_item_id;
7760: END IF;
7761: IF PG_DEBUG in ('Y', 'C') THEN
7762: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date = '||l_requested_ship_date);
7763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item to be used = '||l_item_to_use);
7764: END IF;
7765: /* New allocation logic for time_phased_atp changes end */
7766:
7767: p_atp_record.demand_class :=

Line 7780: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');

7776: p_atp_record.Demand_Class);
7777: --diag_atp
7778: l_allocation_rule_name := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
7779: IF PG_DEBUG in ('Y', 'C') THEN
7780: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');
7781: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);
7782: END IF;
7783:
7784: END IF;

Line 7781: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);

7777: --diag_atp
7778: l_allocation_rule_name := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
7779: IF PG_DEBUG in ('Y', 'C') THEN
7780: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');
7781: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);
7782: END IF;
7783:
7784: END IF;
7785: ---subst

Line 7794: msc_sch_wb.atp_debug('ATP_Check: ' || 'Original item, substitution');

7790: ---1) Backward case- we do not want to look for top item's availability as it is already been
7791: --- taken care of during breadth level item availability search in Check_atp-subst
7792: ---2) Forward: we do not want to look for item's availability in top org
7793: IF PG_DEBUG in ('Y', 'C') THEN
7794: msc_sch_wb.atp_debug('ATP_Check: ' || 'Original item, substitution');
7795: END IF;
7796: IF l_atp_comp_flag = 'N' THEN
7797: --- if ATP components flag is "N' and if it top level item then
7798: --- we cant make anything. Therefore, we set the l_re_date_qty to be zero

Line 7807: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward sch and not a top org, add demand');

7803: IF p_search = BACKWARD_SCHEDULING and NVL(p_atp_record.top_tier_org_flag, 2) = 2 THEN
7804: -- we add demand for only second tier org. Demand for first tier org has
7805: --- already been created while looking for substitute availability
7806: IF PG_DEBUG in ('Y', 'C') THEN
7807: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward sch and not a top org, add demand');
7808: END IF;
7809: l_atp_insert_rec.instance_id := p_atp_record.instance_id;
7810: /* Modularize Item and Org Info */
7811: -- time_phased_atp changes begin

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

7838: IF (NVL(p_atp_record.parent_item_id, p_atp_record.inventory_item_id) <> p_atp_record.inventory_item_id AND
7839: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN
7840: l_atp_insert_rec.origination_type := 47;
7841: IF PG_DEBUG in ('Y', 'C') THEN
7842: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7843: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7844: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7845: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7846: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 7843: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);

7839: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN
7840: l_atp_insert_rec.origination_type := 47;
7841: IF PG_DEBUG in ('Y', 'C') THEN
7842: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7843: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7844: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7845: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7846: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7847: END IF;

Line 7844: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);

7840: l_atp_insert_rec.origination_type := 47;
7841: IF PG_DEBUG in ('Y', 'C') THEN
7842: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7843: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7844: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7845: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7846: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7847: END IF;
7848: ELSE

Line 7845: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);

7841: IF PG_DEBUG in ('Y', 'C') THEN
7842: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7843: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7844: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7845: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7846: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7847: END IF;
7848: ELSE
7849: l_atp_insert_rec.origination_type := 1;

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

7842: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7843: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
7844: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
7845: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
7846: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
7847: END IF;
7848: ELSE
7849: l_atp_insert_rec.origination_type := 1;
7850: END IF;

Line 7896: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||

7892: l_demand_class_flag,
7893: l_demand_id);
7894:
7895: IF PG_DEBUG in ('Y', 'C') THEN
7896: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||
7897: l_demand_id);
7898: END IF;
7899:
7900: -- populate insert rec to pegging tree for this demand

Line 7990: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand := ' || l_net_demand);

7986:
7987: END IF;
7988: END IF;
7989: IF PG_DEBUG in ('Y', 'C') THEN
7990: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand := ' || l_net_demand);
7991: END IF;
7992:
7993: IF NVL(p_atp_record.top_tier_org_flag, 2) = 1 THEN
7994: --for top tier org l_pegging_id should be mapped to demand in

Line 8070: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id := ' || l_pegging_id);

8066: l_demand_id := p_atp_record.subs_demand_id; --5088719
8067:
8068: END IF;
8069: IF PG_DEBUG in ('Y', 'C') THEN
8070: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id := ' || l_pegging_id);
8071: END IF;
8072: /* Modularize Item and Org Info */
8073: -- Re-Use info instead of making unnecessary call.
8074: l_inv_item_name := C_ITEM_INFO_REC.item_name;

Line 8129: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE from parent := ' || MSC_ATP_PVT.G_PTF_DATE);

8125: --- availabilty on greatest of (PTF of parent , req_date)
8126: --- Here PTF_date is ptf date for parent i.e if we came here from get_comp_req then
8127: --- it is PTF for parent item. If we came here for transfer then PTF will be that of last org
8128: IF PG_DEBUG in ('Y', 'C') THEN
8129: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE from parent := ' || MSC_ATP_PVT.G_PTF_DATE);
8130: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
8131: END IF;
8132:
8133: --diag_atp

Line 8130: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);

8126: --- Here PTF_date is ptf date for parent i.e if we came here from get_comp_req then
8127: --- it is PTF for parent item. If we came here for transfer then PTF will be that of last org
8128: IF PG_DEBUG in ('Y', 'C') THEN
8129: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE from parent := ' || MSC_ATP_PVT.G_PTF_DATE);
8130: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
8131: END IF;
8132:
8133: --diag_atp
8134: l_get_mat_in_rec.rounding_control_flag := l_rounding_control_flag;

Line 8163: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);

8159: */
8160:
8161: l_parent_peg_forward := p_parent_pegging_id;
8162: IF PG_DEBUG in ('Y', 'C') THEN
8163: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);
8164: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);
8165: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8166: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);
8167: END IF;

Line 8164: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);

8160:
8161: l_parent_peg_forward := p_parent_pegging_id;
8162: IF PG_DEBUG in ('Y', 'C') THEN
8163: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);
8164: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);
8165: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8166: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);
8167: END IF;
8168:

Line 8165: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);

8161: l_parent_peg_forward := p_parent_pegging_id;
8162: IF PG_DEBUG in ('Y', 'C') THEN
8163: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);
8164: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);
8165: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8166: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);
8167: END IF;
8168:
8169: l_get_mat_in_rec.parent_bom_item_type := p_atp_record.parent_bom_item_type;

Line 8166: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);

8162: IF PG_DEBUG in ('Y', 'C') THEN
8163: msc_sch_wb.atp_debug('ATP_Check: ' || 'Parent Pegging Id :' || l_parent_peg_forward);
8164: msc_sch_wb.atp_debug('ATP_Check: ' || 'Future Pegging Id :' || l_future_pegging_id);
8165: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id :' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8166: msc_sch_wb.atp_debug('ATP_Check: ' || 'Global Future Pegging Id :' || MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG);
8167: END IF;
8168:
8169: l_get_mat_in_rec.parent_bom_item_type := p_atp_record.parent_bom_item_type;
8170: l_get_mat_in_rec.bom_item_type := C_ITEM_INFO_REC.bom_item_type;

Line 8229: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Forward_Material_Atp **********');

8225:
8226: --- End Enhance CTO Phase 1 Req #17
8227: -- print the results from Get_Forward_Material_Atp
8228: IF PG_DEBUG in ('Y', 'C') THEN
8229: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Forward_Material_Atp **********');
8230: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
8231: END IF;
8232:
8233: ELSE -- IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1

Line 8230: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973

8226: --- End Enhance CTO Phase 1 Req #17
8227: -- print the results from Get_Forward_Material_Atp
8228: IF PG_DEBUG in ('Y', 'C') THEN
8229: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Forward_Material_Atp **********');
8230: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
8231: END IF;
8232:
8233: ELSE -- IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1
8234: -- time_phased_atp changes begin

Line 8283: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Material_Atp_Info **********');

8279: l_used_available_quantity := l_mat_atp_info_rec.atp_date_quantity_this_level;
8280:
8281: -- print the results from Get_Material_Atp_Info
8282: IF PG_DEBUG in ('Y', 'C') THEN
8283: msc_sch_wb.atp_debug('ATP_Check: ' || '********** Result from Get_Material_Atp_Info **********');
8284: END IF;
8285:
8286: END IF; -- IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1
8287:

Line 8290: msc_sch_wb.atp_debug('p_search '||p_search);

8286: END IF; -- IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1
8287:
8288: -- Bug 3782472
8289: IF PG_DEBUG in ('Y', 'C') THEN
8290: msc_sch_wb.atp_debug('p_search '||p_search);
8291: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
8292: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
8293: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
8294: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);

Line 8291: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);

8287:
8288: -- Bug 3782472
8289: IF PG_DEBUG in ('Y', 'C') THEN
8290: msc_sch_wb.atp_debug('p_search '||p_search);
8291: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
8292: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
8293: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
8294: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);
8295: END IF;

Line 8292: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);

8288: -- Bug 3782472
8289: IF PG_DEBUG in ('Y', 'C') THEN
8290: msc_sch_wb.atp_debug('p_search '||p_search);
8291: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
8292: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
8293: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
8294: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);
8295: END IF;
8296: IF p_search = FORWARD_SCHEDULING AND

Line 8293: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);

8289: IF PG_DEBUG in ('Y', 'C') THEN
8290: msc_sch_wb.atp_debug('p_search '||p_search);
8291: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
8292: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
8293: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
8294: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);
8295: END IF;
8296: IF p_search = FORWARD_SCHEDULING AND
8297: l_requested_date_quantity >= p_atp_record.quantity_ordered and

Line 8294: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);

8290: msc_sch_wb.atp_debug('p_search '||p_search);
8291: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_PTF_DATE '||MSC_ATP_PVT.G_PTF_DATE);
8292: msc_sch_wb.atp_debug('l_ptf_date '||l_ptf_date);
8293: msc_sch_wb.atp_debug('l_requested_ship_date '||l_requested_ship_date);
8294: msc_sch_wb.atp_debug('l_net_demand '||l_net_demand);
8295: END IF;
8296: IF p_search = FORWARD_SCHEDULING AND
8297: l_requested_date_quantity >= p_atp_record.quantity_ordered and
8298: MSC_ATP_PVT.G_PTF_DATE > l_requested_ship_date THEN

Line 8308: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);

8304: greatest(l_requested_date_quantity, 0);
8305: END IF;
8306:
8307: IF PG_DEBUG in ('Y', 'C') THEN
8308: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
8309: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
8310: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);

Line 8309: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);

8305: END IF;
8306:
8307: IF PG_DEBUG in ('Y', 'C') THEN
8308: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
8309: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
8310: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8313: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);

Line 8310: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);

8306:
8307: IF PG_DEBUG in ('Y', 'C') THEN
8308: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
8309: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
8310: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8313: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
8314: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);

Line 8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);

8307: IF PG_DEBUG in ('Y', 'C') THEN
8308: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
8309: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
8310: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8313: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
8314: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
8315: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);

Line 8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);

8308: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_return_status : '|| l_return_status);
8309: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
8310: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8313: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
8314: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
8315: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
8316: END IF;

Line 8313: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);

8309: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date : '|| l_requested_ship_date);
8310: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8313: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
8314: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
8315: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
8316: END IF;
8317: ELSE

Line 8314: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);

8310: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '|| l_requested_date_quantity);
8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8313: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
8314: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
8315: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
8316: END IF;
8317: ELSE
8318: IF PG_DEBUG in ('Y', 'C') THEN

Line 8315: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);

8311: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8312: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8313: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity);
8314: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : '|| l_atf_date_qty);
8315: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
8316: END IF;
8317: ELSE
8318: IF PG_DEBUG in ('Y', 'C') THEN
8319: msc_sch_wb.atp_debug('ATP_Check: ' || 'did not call get_material_atp_info');

Line 8319: msc_sch_wb.atp_debug('ATP_Check: ' || 'did not call get_material_atp_info');

8315: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : '|| l_atp_pegging_tab.COUNT);
8316: END IF;
8317: ELSE
8318: IF PG_DEBUG in ('Y', 'C') THEN
8319: msc_sch_wb.atp_debug('ATP_Check: ' || 'did not call get_material_atp_info');
8320: END IF;
8321: l_net_demand := p_atp_record.quantity_ordered;
8322: l_requested_date_quantity := 0.0; -- cchen 08/31
8323:

Line 8336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Initialize atp_date and atp_quantity_this_level');

8332: -- Bug 1566260, Initialize atp_date_this_level and atp_date_quantity_this_level to
8333: -- infinite_time_fence_date and INFINITE_NUMBER to avoid them to be null later on.
8334:
8335: IF PG_DEBUG in ('Y', 'C') THEN
8336: msc_sch_wb.atp_debug('ATP_Check: ' || 'Initialize atp_date and atp_quantity_this_level');
8337: END IF;
8338:
8339: /* s_cto_rearch: chnage call to MSC_ATP_PROC.get_infinite_time_fence_date procedure
8340: l_atp_date_this_level := GREATEST(MSC_ATP_FUNC.get_infinite_time_fence_date(

Line 8368: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);

8364: l_requested_date_quantity := 0.0;
8365: END IF;
8366:
8367: IF PG_DEBUG in ('Y', 'C') THEN
8368: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8369: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8370: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
8371: END IF;
8372:

Line 8369: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);

8365: END IF;
8366:
8367: IF PG_DEBUG in ('Y', 'C') THEN
8368: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8369: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8370: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
8371: END IF;
8372:
8373: END IF;

Line 8370: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973

8366:
8367: IF PG_DEBUG in ('Y', 'C') THEN
8368: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level : '|| l_atp_date_this_level);
8369: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level : '|| l_atp_date_quantity_this_level);
8370: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity : '|| l_used_available_quantity); --bug3409973
8371: END IF;
8372:
8373: END IF;
8374:

Line 8377: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand : '|| to_char(l_net_demand));

8373: END IF;
8374:
8375: -- print the net_demand
8376: IF PG_DEBUG in ('Y', 'C') THEN
8377: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand : '|| to_char(l_net_demand));
8378: END IF;
8379:
8380: -- cchen 1238941
8381:

Line 8483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||

8479: p_atp_record.parent_item_id is null)) THEN
8480: l_atp_insert_rec.quantity_ordered := LEAST(GREATEST(l_requested_date_quantity, 0),
8481: p_atp_record.quantity_ordered);
8482: IF PG_DEBUG in ('Y', 'C') THEN
8483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
8484: l_atp_insert_rec.quantity_ordered);
8485: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
8486: p_atp_record.quantity_ordered);
8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||

Line 8485: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||

8481: p_atp_record.quantity_ordered);
8482: IF PG_DEBUG in ('Y', 'C') THEN
8483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
8484: l_atp_insert_rec.quantity_ordered);
8485: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
8486: p_atp_record.quantity_ordered);
8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||
8488: l_requested_date_quantity);
8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp condition : ' );

Line 8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||

8483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
8484: l_atp_insert_rec.quantity_ordered);
8485: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
8486: p_atp_record.quantity_ordered);
8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||
8488: l_requested_date_quantity);
8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp condition : ' );
8490: END IF;
8491: ELSE

Line 8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp condition : ' );

8485: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
8486: p_atp_record.quantity_ordered);
8487: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity : '||
8488: l_requested_date_quantity);
8489: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp condition : ' );
8490: END IF;
8491: ELSE
8492: --5220357
8493: /*

Line 8500: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside comp substitution ');

8496: and MSC_ATP_PVT.G_SUB_COMP = 'Y')
8497: --5192094 added check to see if actually we have calculated material availiability
8498: and (l_atp_flag = 'Y') THEN
8499: IF PG_DEBUG in ('Y', 'C') THEN
8500: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside comp substitution ');
8501: END IF;
8502:
8503: l_atp_insert_rec.quantity_ordered := LEAST(GREATEST(l_requested_date_quantity, 0),
8504: p_atp_record.quantity_ordered);

Line 8511: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||

8507: END IF;
8508: */
8509: l_atp_insert_rec.quantity_ordered := p_atp_record.quantity_ordered;
8510: IF PG_DEBUG in ('Y', 'C') THEN
8511: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
8512: l_atp_insert_rec.quantity_ordered);
8513: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
8514: p_atp_record.quantity_ordered);
8515: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp Else : ' );

Line 8513: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||

8509: l_atp_insert_rec.quantity_ordered := p_atp_record.quantity_ordered;
8510: IF PG_DEBUG in ('Y', 'C') THEN
8511: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
8512: l_atp_insert_rec.quantity_ordered);
8513: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
8514: p_atp_record.quantity_ordered);
8515: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp Else : ' );
8516: END IF;
8517: END IF;

Line 8515: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp Else : ' );

8511: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.quantity_ordered : '||
8512: l_atp_insert_rec.quantity_ordered);
8513: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.quantity_ordered : '||
8514: p_atp_record.quantity_ordered);
8515: msc_sch_wb.atp_debug('ATP_Check: ' || 'steal_before_ctp Else : ' );
8516: END IF;
8517: END IF;
8518:
8519: l_atp_insert_rec.requested_ship_date := l_requested_ship_date;

Line 8535: msc_sch_wb.atp_debug('Either ODS based ATP or top level demand. Add as a SO Demand');

8531: -- this is top level demand, which we should consider it
8532: -- as sales order demand.
8533:
8534: IF PG_DEBUG in ('Y', 'C') THEN
8535: msc_sch_wb.atp_debug('Either ODS based ATP or top level demand. Add as a SO Demand');
8536: END IF;
8537:
8538: -- Modified by ngoel on 1/12/2001 for origination_type = 30
8539: --l_atp_insert_rec.origination_type := 6;

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

8551: IF (NVL(p_atp_record.parent_item_id, p_atp_record.inventory_item_id) <> p_atp_record.inventory_item_id AND
8552: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN
8553: l_atp_insert_rec.origination_type := 47;
8554: IF PG_DEBUG in ('Y', 'C') THEN
8555: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8556: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
8557: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
8558: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
8559: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 8556: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);

8552: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5) THEN
8553: l_atp_insert_rec.origination_type := 47;
8554: IF PG_DEBUG in ('Y', 'C') THEN
8555: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8556: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
8557: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
8558: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
8559: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8560: END IF;

Line 8557: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);

8553: l_atp_insert_rec.origination_type := 47;
8554: IF PG_DEBUG in ('Y', 'C') THEN
8555: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8556: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
8557: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
8558: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
8559: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8560: END IF;
8561: ELSE

Line 8558: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);

8554: IF PG_DEBUG in ('Y', 'C') THEN
8555: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8556: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
8557: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
8558: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
8559: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8560: END IF;
8561: ELSE
8562: l_atp_insert_rec.origination_type := 1;

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

8555: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8556: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
8557: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP parent_item_id ='|| p_atp_record.parent_item_id);
8558: msc_sch_wb.atp_debug('ATP_Check: ' || 'DRP child_item_id ='|| p_atp_record.inventory_item_id);
8559: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
8560: END IF;
8561: ELSE
8562: l_atp_insert_rec.origination_type := 1;
8563: END IF;

Line 8606: msc_sch_wb.atp_debug('ATP_Check: ' || 'temp l_net_demand : '|| l_net_demand);

8602:
8603:
8604: -- temporary
8605: IF PG_DEBUG in ('Y', 'C') THEN
8606: msc_sch_wb.atp_debug('ATP_Check: ' || 'temp l_net_demand : '|| l_net_demand);
8607: END IF;
8608: --optional_fw Only in first iteration code should come here or while adding POD lower level
8609: IF ((p_search = 1) AND (MSC_ATP_PVT.G_OPTIONAL_FW is null )) OR
8610: ((p_search= 2 AND p_parent_pegging_id is not null)

Line 8627: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.latest_acceptable_date);

8623: l_atp_insert_rec.ship_set_name := p_atp_record.ship_set_name;
8624: l_atp_insert_rec.arrival_set_name := p_atp_record.arrival_set_name;
8625: l_atp_insert_rec.original_request_ship_date :=l_original_req_ship_date;
8626: IF PG_DEBUG in ('Y', 'C') THEN
8627: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.latest_acceptable_date);
8628: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.original_request_ship_date);
8629: END IF;
8630: l_atp_insert_rec.wip_supply_type := p_atp_record.mand_comp_flag;
8631: --e_cto_rearch

Line 8628: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.original_request_ship_date);

8624: l_atp_insert_rec.arrival_set_name := p_atp_record.arrival_set_name;
8625: l_atp_insert_rec.original_request_ship_date :=l_original_req_ship_date;
8626: IF PG_DEBUG in ('Y', 'C') THEN
8627: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.latest_acceptable_date);
8628: msc_sch_wb.atp_debug('ATP_Check: ' || 'latest_acceptable_date: '|| l_atp_insert_rec.original_request_ship_date);
8629: END IF;
8630: l_atp_insert_rec.wip_supply_type := p_atp_record.mand_comp_flag;
8631: --e_cto_rearch
8632:

Line 8642: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.ship_method : '|| l_atp_insert_rec.ship_method);

8638: l_atp_insert_rec.ship_method := null;
8639: END IF;
8640: END IF;
8641: IF PG_DEBUG in ('Y', 'C') THEN
8642: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_insert_rec.ship_method : '|| l_atp_insert_rec.ship_method);
8643: END IF;
8644: l_atp_insert_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
8645: l_atp_insert_rec.delivery_lead_time := l_delivery_lead_time;
8646:

Line 8660: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||

8656: l_demand_id);
8657: END IF;
8658:
8659: IF PG_DEBUG in ('Y', 'C') THEN
8660: msc_sch_wb.atp_debug('ATP_Check: ' || 'after calling Add_Mat_Demand, l_demand_id ='||
8661: l_demand_id);
8662: END IF;
8663:
8664: -- populate insert rec to pegging tree for this demand

Line 8786: msc_sch_wb.atp_debug('ATP_Check: ' || 'before assigning from G_DEMAND_ID, G_DEMAND_ID ='||

8782: -- we need the value in l_demand_id of originally inserted SO demand.
8783: IF l_time_phased_atp = 'Y' AND G_FORWARD_ATP = 'Y' THEN
8784:
8785: IF PG_DEBUG in ('Y', 'C') THEN
8786: msc_sch_wb.atp_debug('ATP_Check: ' || 'before assigning from G_DEMAND_ID, G_DEMAND_ID ='||
8787: G_DEMAND_ID);
8788: END IF;
8789: l_demand_id := NVL(l_demand_id,G_DEMAND_ID);
8790:

Line 8792: msc_sch_wb.atp_debug('ATP_Check: ' || 'after assigning from G_DEMAND_ID, l_demand_id ='||

8788: END IF;
8789: l_demand_id := NVL(l_demand_id,G_DEMAND_ID);
8790:
8791: IF PG_DEBUG in ('Y', 'C') THEN
8792: msc_sch_wb.atp_debug('ATP_Check: ' || 'after assigning from G_DEMAND_ID, l_demand_id ='||
8793: l_demand_id);
8794: END IF;
8795: END IF;
8796: --dsting Stealing was here but commented out 10/17/02.

Line 8803: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id for Forward Stealing is : ' || l_pegging_id);

8799: --for demand priority forward ATP we have already set l_pegging_id after get_forward
8800: /*
8801: l_pegging_id := MSC_ATP_PVT.G_CTO_FORWARD_DMD_PEG;
8802: IF PG_DEBUG in ('Y', 'C') THEN
8803: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Pegging Id for Forward Stealing is : ' || l_pegging_id);
8804: END IF;
8805:
8806: */
8807: IF p_parent_pegging_id is not null THEN

Line 8821: msc_sch_wb.atp_debug('ATP_Check: ' || 'Right before pegging');

8817: END IF;
8818: --- End Enhance CTO Phase 1 Req #17
8819:
8820: IF PG_DEBUG in ('Y', 'C') THEN
8821: msc_sch_wb.atp_debug('ATP_Check: ' || 'Right before pegging');
8822: END IF;
8823: --optional_fw first iteration we should come here
8824: IF (p_parent_pegging_id is null) AND (p_search = 1) AND MSC_ATP_PVT.G_OPTIONAL_FW is null THEN
8825: IF PG_DEBUG in ('Y', 'C') THEN

Line 8826: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');

8822: END IF;
8823: --optional_fw first iteration we should come here
8824: IF (p_parent_pegging_id is null) AND (p_search = 1) AND MSC_ATP_PVT.G_OPTIONAL_FW is null THEN
8825: IF PG_DEBUG in ('Y', 'C') THEN
8826: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
8827: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8828: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8829: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8830: END IF;

Line 8827: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

8823: --optional_fw first iteration we should come here
8824: IF (p_parent_pegging_id is null) AND (p_search = 1) AND MSC_ATP_PVT.G_OPTIONAL_FW is null THEN
8825: IF PG_DEBUG in ('Y', 'C') THEN
8826: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
8827: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8828: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8829: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8830: END IF;
8831:

Line 8828: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);

8824: IF (p_parent_pegging_id is null) AND (p_search = 1) AND MSC_ATP_PVT.G_OPTIONAL_FW is null THEN
8825: IF PG_DEBUG in ('Y', 'C') THEN
8826: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
8827: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8828: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8829: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8830: END IF;
8831:
8832: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;

Line 8829: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);

8825: IF PG_DEBUG in ('Y', 'C') THEN
8826: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_parent_pegging_id is null');
8827: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8828: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8829: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8830: END IF;
8831:
8832: MSC_ATP_PVT.G_PEGGING_FOR_SET.Extend;
8833: MSC_ATP_PVT.G_REQ_ATP_DATE.EXTEND;

Line 8837: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);

8833: MSC_ATP_PVT.G_REQ_ATP_DATE.EXTEND;
8834: MSC_ATP_PVT.G_REQ_DATE_QTY.EXTEND;
8835:
8836: IF PG_DEBUG in ('Y', 'C') THEN
8837: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8838: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8839: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8840: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );
8841: END IF;

Line 8838: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);

8834: MSC_ATP_PVT.G_REQ_DATE_QTY.EXTEND;
8835:
8836: IF PG_DEBUG in ('Y', 'C') THEN
8837: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8838: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8839: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8840: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );
8841: END IF;
8842:

Line 8839: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);

8835:
8836: IF PG_DEBUG in ('Y', 'C') THEN
8837: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8838: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8839: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8840: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );
8841: END IF;
8842:
8843:

Line 8840: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );

8836: IF PG_DEBUG in ('Y', 'C') THEN
8837: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PEGGING_FOR_SET.COUNT = ' ||MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT);
8838: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_ATP_DATE.COUNT = ' || MSC_ATP_PVT.G_REQ_ATP_DATE.COUNT);
8839: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQ_DATE_QTY.COUNT = ' || MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT);
8840: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id );
8841: END IF;
8842:
8843:
8844: MSC_ATP_PVT.G_PEGGING_FOR_SET(MSC_ATP_PVT.G_PEGGING_FOR_SET.COUNT) := l_pegging_id;

Line 8850: msc_sch_wb.atp_debug('ATP_Check: ' || 'Right after pegging');

8846: MSC_ATP_PVT.G_REQ_DATE_QTY(MSC_ATP_PVT.G_REQ_DATE_QTY.COUNT) := p_atp_record.Quantity_Ordered;
8847:
8848: END IF;
8849: IF PG_DEBUG in ('Y', 'C') THEN
8850: msc_sch_wb.atp_debug('ATP_Check: ' || 'Right after pegging');
8851: END IF;
8852: -- dsting: 9/19/2002 component substitute check moved to
8853: -- after move_sd_temp_to_mrp_details.
8854: --optional_fw we need to come here for condition added

Line 8941: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQUESTED_SHIP_DATE = '||G_REQUESTED_SHIP_DATE);

8937: --5151678 no need for assigning with global variable.
8938: /*
8939: --optional_fw added correct required date in pegging
8940: IF PG_DEBUG in ('Y', 'C') THEN
8941: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_REQUESTED_SHIP_DATE = '||G_REQUESTED_SHIP_DATE);
8942: END IF;
8943: l_pegging_rec.required_quantity:= p_atp_record.quantity_ordered;
8944: l_pegging_rec.required_date := G_REQUESTED_SHIP_DATE; --l_requested_ship_date;
8945: */

Line 8983: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');

8979:
8980: l_pegging_rec.demand_class := p_atp_record.demand_class;
8981: -- Bug 3826234
8982: IF PG_DEBUG in ('Y', 'C') THEN
8983: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8984: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8985: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8986: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8987: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);

Line 8984: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);

8980: l_pegging_rec.demand_class := p_atp_record.demand_class;
8981: -- Bug 3826234
8982: IF PG_DEBUG in ('Y', 'C') THEN
8983: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8984: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8985: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8986: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8987: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);
8988: END IF;

Line 8985: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);

8981: -- Bug 3826234
8982: IF PG_DEBUG in ('Y', 'C') THEN
8983: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8984: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8985: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8986: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8987: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);
8988: END IF;
8989: IF p_parent_pegging_id is null then

Line 8986: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);

8982: IF PG_DEBUG in ('Y', 'C') THEN
8983: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8984: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8985: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8986: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8987: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);
8988: END IF;
8989: IF p_parent_pegging_id is null then
8990: l_pegging_rec.shipping_cal_code := p_atp_record.shipping_cal_code;

Line 8987: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);

8983: msc_sch_wb.atp_debug('ATP_Check: ' || '----------- Calendars passed to Pegging -----------------');
8984: msc_sch_wb.atp_debug('ATP_Check: ' || 'shipping_cal_code = ' ||p_atp_record.shipping_cal_code);
8985: msc_sch_wb.atp_debug('ATP_Check: ' || 'receiving_cal_code = ' ||p_atp_record.receiving_cal_code);
8986: msc_sch_wb.atp_debug('ATP_Check: ' || 'intransit_cal_code = ' ||p_atp_record.intransit_cal_code);
8987: msc_sch_wb.atp_debug('ATP_Check: ' || 'manufacturing_cal_code = ' ||p_atp_record.manufacturing_cal_code);
8988: END IF;
8989: IF p_parent_pegging_id is null then
8990: l_pegging_rec.shipping_cal_code := p_atp_record.shipping_cal_code;
8991: l_pegging_rec.receiving_cal_code := p_atp_record.receiving_cal_code;

Line 8995: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside IF');

8991: l_pegging_rec.receiving_cal_code := p_atp_record.receiving_cal_code;
8992: l_pegging_rec.intransit_cal_code := p_atp_record.intransit_cal_code;
8993: l_pegging_rec.manufacturing_cal_code := p_atp_record.manufacturing_cal_code;
8994: IF PG_DEBUG in ('Y', 'C') THEN
8995: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside IF');
8996: END IF;
8997: ELSIF NVL(p_atp_record.to_organization_id,p_atp_record.organization_id)
8998: <> p_atp_record.organization_id THEN
8999:

Line 9005: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside ELSIF');

9001: l_pegging_rec.receiving_cal_code := p_atp_record.receiving_cal_code;
9002: l_pegging_rec.intransit_cal_code := p_atp_record.intransit_cal_code;
9003: l_pegging_rec.manufacturing_cal_code := NULL;
9004: IF PG_DEBUG in ('Y', 'C') THEN
9005: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside ELSIF');
9006: END IF;
9007: ELSE
9008: l_pegging_rec.manufacturing_cal_code := p_atp_record.manufacturing_cal_code;
9009: l_pegging_rec.shipping_cal_code := NULL;

Line 9013: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside ELSE');

9009: l_pegging_rec.shipping_cal_code := NULL;
9010: l_pegging_rec.receiving_cal_code := NULL;
9011: l_pegging_rec.intransit_cal_code := NULL;
9012: IF PG_DEBUG in ('Y', 'C') THEN
9013: msc_sch_wb.atp_debug('ATP_Check: ' || 'Inside ELSE');
9014: END IF;
9015: END IF;
9016: -- Bug 3826234
9017:

Line 9034: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting G_FW_PEGGING_ID for ATP supply line ' || G_FW_PEGGING_ID);

9030: --optional_fw store the the supply line pegging id for forward pass
9031: IF (MSC_ATP_PVT.G_OPTIONAL_FW is not null and p_parent_pegging_id is null) THEN
9032: G_FW_PEGGING_ID := l_atp_pegging_id;
9033: IF PG_DEBUG in ('Y', 'C') THEN
9034: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting G_FW_PEGGING_ID for ATP supply line ' || G_FW_PEGGING_ID);
9035: END IF;
9036: END IF;
9037:
9038: FOR i in 1..l_atp_period.Level.COUNT LOOP

Line 9063: msc_sch_wb.atp_debug('ATP_Check: ' || 'Before check substitutes call:'||

9059: -- Nagaraj
9060: IF ( p_search = BACKWARD_SCHEDULING) and (p_parent_pegging_id is not null --5006799
9061: and l_net_demand > 0 and MSC_ATP_PVT.G_SUB_COMP = 'Y') THEN
9062: IF PG_DEBUG in ('Y', 'C') THEN
9063: msc_sch_wb.atp_debug('ATP_Check: ' || 'Before check substitutes call:'||
9064: to_char(p_parent_pegging_id) || ':' || to_char(l_net_demand));
9065: END IF;
9066:
9067: -- Setup new g_atp_record during each loop, we should not

Line 9164: msc_sch_wb.atp_debug('From Substitute Array Item : '|| l_substitutes_rec.inventory_item_id(ii));

9160: p_atp_record.quantity_ordered);
9161: IF PG_DEBUG in ('Y', 'C') THEN
9162: for ii in 1..l_substitutes_rec.inventory_item_id.count
9163: loop
9164: msc_sch_wb.atp_debug('From Substitute Array Item : '|| l_substitutes_rec.inventory_item_id(ii));
9165: msc_sch_wb.atp_debug('From Substitute Array Pegging: '|| l_substitutes_rec.pegging_id(ii));
9166: msc_sch_wb.atp_debug('From Substitute Array ATP QTY: '|| l_substitutes_rec.sub_atp_qty(ii));
9167: end loop;
9168: END IF;

Line 9165: msc_sch_wb.atp_debug('From Substitute Array Pegging: '|| l_substitutes_rec.pegging_id(ii));

9161: IF PG_DEBUG in ('Y', 'C') THEN
9162: for ii in 1..l_substitutes_rec.inventory_item_id.count
9163: loop
9164: msc_sch_wb.atp_debug('From Substitute Array Item : '|| l_substitutes_rec.inventory_item_id(ii));
9165: msc_sch_wb.atp_debug('From Substitute Array Pegging: '|| l_substitutes_rec.pegging_id(ii));
9166: msc_sch_wb.atp_debug('From Substitute Array ATP QTY: '|| l_substitutes_rec.sub_atp_qty(ii));
9167: end loop;
9168: END IF;
9169: --4902658/5216528 end

Line 9166: msc_sch_wb.atp_debug('From Substitute Array ATP QTY: '|| l_substitutes_rec.sub_atp_qty(ii));

9162: for ii in 1..l_substitutes_rec.inventory_item_id.count
9163: loop
9164: msc_sch_wb.atp_debug('From Substitute Array Item : '|| l_substitutes_rec.inventory_item_id(ii));
9165: msc_sch_wb.atp_debug('From Substitute Array Pegging: '|| l_substitutes_rec.pegging_id(ii));
9166: msc_sch_wb.atp_debug('From Substitute Array ATP QTY: '|| l_substitutes_rec.sub_atp_qty(ii));
9167: end loop;
9168: END IF;
9169: --4902658/5216528 end
9170: -- cchen : 1238941

Line 9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);

9173: greatest(l_net_demand, 0);
9174:
9175: --4570421
9176: IF PG_DEBUG in ('Y', 'C') THEN
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);
9179: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);
9180: 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);
9181: END IF;

Line 9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);

9174:
9175: --4570421
9176: IF PG_DEBUG in ('Y', 'C') THEN
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);
9179: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);
9180: 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);
9181: END IF;
9182: IF ( ( MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND p_atp_record.scaling_type = 2) OR

Line 9179: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);

9175: --4570421
9176: IF PG_DEBUG in ('Y', 'C') THEN
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);
9179: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);
9180: 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);
9181: END IF;
9182: IF ( ( MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND p_atp_record.scaling_type = 2) OR
9183: (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND p_atp_record.scaling_type IN (0,2))) AND l_net_demand = 0 then

Line 9180: 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);

9176: IF PG_DEBUG in ('Y', 'C') THEN
9177: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand:'|| l_net_demand);
9178: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity:'|| l_sub_requested_date_quantity);
9179: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.scaling_type'|| p_atp_record.scaling_type);
9180: 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);
9181: END IF;
9182: IF ( ( MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND p_atp_record.scaling_type = 2) OR
9183: (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND p_atp_record.scaling_type IN (0,2))) AND l_net_demand = 0 then
9184: -- Delete the supply pegging of the main component, if substitute can satisfy the lot-size.

Line 9198: msc_sch_wb.atp_debug('ATP_Check: ' || 'After check substitutes:'||

9194: END IF;
9195: END IF;
9196:
9197: IF PG_DEBUG in ('Y', 'C') THEN
9198: msc_sch_wb.atp_debug('ATP_Check: ' || 'After check substitutes:'||
9199: to_char(l_net_demand));
9200: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity : '||
9201: to_char(l_sub_requested_date_quantity));
9202: END IF;

Line 9200: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity : '||

9196:
9197: IF PG_DEBUG in ('Y', 'C') THEN
9198: msc_sch_wb.atp_debug('ATP_Check: ' || 'After check substitutes:'||
9199: to_char(l_net_demand));
9200: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_sub_requested_date_quantity : '||
9201: to_char(l_sub_requested_date_quantity));
9202: END IF;
9203:
9204: -- In order to show the correct demand quantity that got considered

Line 9222: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update POD for Primary Component');

9218: -- we do the substitute now.
9219: --5220357 start
9220: IF l_sub_requested_date_quantity > 0 THEN
9221: IF PG_DEBUG in ('Y', 'C') THEN
9222: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update POD for Primary Component');
9223: END IF;
9224: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP,2) <> 1 THEN
9225: MSC_ATP_DB_UTILS.Update_Pegging(l_pegging_id,
9226: null,

Line 9240: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);

9236: and plan_id = p_plan_id
9237: returning inventory_item_id into l_inventory_item_id;
9238:
9239: IF PG_DEBUG in ('Y', 'C') THEN
9240: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
9241: END IF;
9242: /* time_phased_atp
9243: need to check this while UT*/
9244: IF l_time_phased_atp = 'Y' THEN

Line 9258: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

9254: l_return_status
9255: );
9256: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9257: IF PG_DEBUG in ('Y', 'C') THEN
9258: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9259: END IF;
9260: RAISE FND_API.G_EXC_ERROR;
9261: END IF;
9262: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'

Line 9271: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);

9267: where parent_demand_id = l_demand_id --updating for primary only
9268: and plan_id = p_plan_id;
9269:
9270: IF PG_DEBUG in ('Y', 'C') THEN
9271: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
9272: END IF;
9273: END IF;
9274: IF PG_DEBUG in ('Y', 'C') THEN
9275: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

Line 9275: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

9271: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
9272: END IF;
9273: END IF;
9274: IF PG_DEBUG in ('Y', 'C') THEN
9275: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
9276: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
9277: END IF;
9278:
9279: -- update summary records removed in ODS case - for summary enhancement

Line 9276: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

9272: END IF;
9273: END IF;
9274: IF PG_DEBUG in ('Y', 'C') THEN
9275: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
9276: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
9277: END IF;
9278:
9279: -- update summary records removed in ODS case - for summary enhancement
9280: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN

Line 9392: msc_sch_wb.atp_debug('ATP_Check: ' || 'Start stealing in backward case, before CTP');

9388: END IF;
9389: --- End Enhance CTO Phase 1 Req #17
9390:
9391: IF PG_DEBUG in ('Y', 'C') THEN
9392: msc_sch_wb.atp_debug('ATP_Check: ' || 'Start stealing in backward case, before CTP');
9393: END IF;
9394: -- AATP: here we need to do the stealing.
9395: -- Only do stealing if ATP flag for the item is Yes.
9396: g_atp_record.error_code := ALLSUCCESS;

Line 9481: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);

9477: l_stealing_qty := l_stealing_requested_date_qty -
9478: greatest(l_net_demand, 0);
9479:
9480: IF PG_DEBUG in ('Y', 'C') THEN
9481: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);
9482: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);
9483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);
9484: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);
9485: END IF;

Line 9482: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);

9478: greatest(l_net_demand, 0);
9479:
9480: IF PG_DEBUG in ('Y', 'C') THEN
9481: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);
9482: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);
9483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);
9484: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);
9485: END IF;
9486:

Line 9483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);

9479:
9480: IF PG_DEBUG in ('Y', 'C') THEN
9481: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);
9482: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);
9483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);
9484: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);
9485: END IF;
9486:
9487: -- using the pegging_id to find the demand_id and plan_id

Line 9484: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);

9480: IF PG_DEBUG in ('Y', 'C') THEN
9481: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_qty = '||l_stealing_qty);
9482: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mem_stealing_qty = '||l_mem_stealing_qty);
9483: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pf_stealing_qty = '||l_pf_stealing_qty);
9484: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand = ' || l_net_demand);
9485: END IF;
9486:
9487: -- using the pegging_id to find the demand_id and plan_id
9488: ---demandxyz

Line 9512: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

9508: l_return_status
9509: );
9510: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9511: IF PG_DEBUG in ('Y', 'C') THEN
9512: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9513: END IF;
9514: RAISE FND_API.G_EXC_ERROR;
9515: END IF;
9516: /* update atf date quantity */

Line 9545: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Stealing :'|| l_net_demand);

9541:
9542: l_net_demand := greatest(l_net_demand, 0);
9543:
9544: IF PG_DEBUG in ('Y', 'C') THEN
9545: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Stealing :'|| l_net_demand);
9546: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_requested_date_qty = '||
9547: l_stealing_requested_date_qty);
9548: END IF;
9549: /* bug 1680212

Line 9546: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_requested_date_qty = '||

9542: l_net_demand := greatest(l_net_demand, 0);
9543:
9544: IF PG_DEBUG in ('Y', 'C') THEN
9545: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Stealing :'|| l_net_demand);
9546: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_stealing_requested_date_qty = '||
9547: l_stealing_requested_date_qty);
9548: END IF;
9549: /* bug 1680212
9550: -- In order to show the correct demand quantity that got

Line 9568: msc_sch_wb.atp_debug('ATP_Check: ' || 'Look forward to meet the remaining shortage of comp');

9564: IF (p_search = FORWARD_SCHEDULING) AND
9565: (p_parent_pegging_id IS NOT NULL) AND
9566: (MSC_ATP_PVT.G_PTF_DATE > l_requested_ship_date) THEN
9567: IF PG_DEBUG in ('Y', 'C') THEN
9568: msc_sch_wb.atp_debug('ATP_Check: ' || 'Look forward to meet the remaining shortage of comp');
9569: END IF;
9570: --Bug2682094 Do not reset the demand
9571: --l_net_demand := p_atp_record.quantity_ordered;
9572: l_req_date_qty := 0;

Line 9598: msc_sch_wb.atp_debug('l_check_model_capacity := ' || l_check_model_capacity);

9594: l_sr_inv_item_id,
9595: l_check_model_capacity);
9596:
9597: IF PG_DEBUG in ('Y', 'C') THEN
9598: msc_sch_wb.atp_debug('l_check_model_capacity := ' || l_check_model_capacity);
9599: END IF;
9600: IF l_check_model_capacity = 1 THEN
9601: --- we set comp flag to Y so that it goes into the logic of make
9602: l_atp_comp_flag := 'Y';

Line 9613: msc_sch_wb.atp_debug('Demabnd is Met');

9609: END IF;
9610:
9611: IF l_net_demand <= 0 THEN
9612: IF PG_DEBUG in ('Y', 'C') THEN
9613: msc_sch_wb.atp_debug('Demabnd is Met');
9614: msc_sch_wb.atp_debug('Requested Date quantity := ' || l_requested_date_quantity);
9615: END IF;
9616: -- we meet the requirements!!!
9617: --commenting for bug3550292

Line 9614: msc_sch_wb.atp_debug('Requested Date quantity := ' || l_requested_date_quantity);

9610:
9611: IF l_net_demand <= 0 THEN
9612: IF PG_DEBUG in ('Y', 'C') THEN
9613: msc_sch_wb.atp_debug('Demabnd is Met');
9614: msc_sch_wb.atp_debug('Requested Date quantity := ' || l_requested_date_quantity);
9615: END IF;
9616: -- we meet the requirements!!!
9617: --commenting for bug3550292
9618: /*p_atp_record.requested_date_quantity:= l_requested_date_quantity

Line 9649: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity = '||p_atp_record.atf_date_quantity);

9645: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null THEN
9646: p_atp_record.error_code := ATP_REQ_DATE_FAIL;
9647: END IF;
9648: IF PG_DEBUG in ('Y', 'C') THEN
9649: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity = '||p_atp_record.atf_date_quantity);
9650: msc_sch_wb.atp_debug('ATP_Check: ' || 'after insert row, 1');
9651: END IF;
9652: --diag_atp
9653: ELSIF (l_atp_comp_flag = 'N') AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN

Line 9650: msc_sch_wb.atp_debug('ATP_Check: ' || 'after insert row, 1');

9646: p_atp_record.error_code := ATP_REQ_DATE_FAIL;
9647: END IF;
9648: IF PG_DEBUG in ('Y', 'C') THEN
9649: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity = '||p_atp_record.atf_date_quantity);
9650: msc_sch_wb.atp_debug('ATP_Check: ' || 'after insert row, 1');
9651: END IF;
9652: --diag_atp
9653: ELSIF (l_atp_comp_flag = 'N') AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
9654: IF PG_DEBUG in ('Y', 'C') THEN

Line 9655: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Component flag = N');

9651: END IF;
9652: --diag_atp
9653: ELSIF (l_atp_comp_flag = 'N') AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
9654: IF PG_DEBUG in ('Y', 'C') THEN
9655: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Component flag = N');
9656: END IF;
9657:
9658: -- we cannot meet the requirements, so we provide
9659: -- the information at this level

Line 9678: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');

9674: --support forward stealing for all levels
9675: AND p_parent_pegging_id IS NULL
9676: THEN
9677: IF PG_DEBUG in ('Y', 'C') THEN
9678: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');
9679: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);
9680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
9681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
9682: END IF;

Line 9679: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);

9675: AND p_parent_pegging_id IS NULL
9676: THEN
9677: IF PG_DEBUG in ('Y', 'C') THEN
9678: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');
9679: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);
9680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
9681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
9682: END IF;
9683:

Line 9680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);

9676: THEN
9677: IF PG_DEBUG in ('Y', 'C') THEN
9678: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');
9679: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);
9680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
9681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
9682: END IF;
9683:
9684: update msc_demands

Line 9681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);

9677: IF PG_DEBUG in ('Y', 'C') THEN
9678: msc_sch_wb.atp_debug('ATP_Check: ' || 'Get forward mat...');
9679: msc_sch_wb.atp_debug('ATP_Check: ' || 'requested_date quantity: ' || l_requested_date_quantity);
9680: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_demand: ' || l_net_demand);
9681: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id: ' || l_demand_id);
9682: END IF;
9683:
9684: update msc_demands
9685: set using_requirement_quantity = MSC_ATP_UTILS.Truncate_Demand(p_atp_record.requested_date_quantity + l_stealing_requested_date_qty)

Line 9705: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

9701: l_return_status
9702: );
9703: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9704: IF PG_DEBUG in ('Y', 'C') THEN
9705: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9706: END IF;
9707: RAISE FND_API.G_EXC_ERROR;
9708: END IF;
9709: ELSE

Line 9780: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);

9776: p_atp_record.atf_date_quantity := NVL(p_atp_record.atf_date_quantity, 0) + NVL(l_atf_date_qty, 0);
9777: END IF;
9778:
9779: IF PG_DEBUG in ('Y', 'C') THEN
9780: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9781: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9783: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9784: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);

Line 9781: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);

9777: END IF;
9778:
9779: IF PG_DEBUG in ('Y', 'C') THEN
9780: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9781: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9783: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9784: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);
9785: END IF;

Line 9782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973

9778:
9779: IF PG_DEBUG in ('Y', 'C') THEN
9780: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9781: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9783: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9784: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);
9785: END IF;
9786:

Line 9783: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);

9779: IF PG_DEBUG in ('Y', 'C') THEN
9780: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9781: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9783: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9784: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);
9785: END IF;
9786:
9787: ELSE

Line 9784: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);

9780: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_date_this_level: ' || l_atp_date_this_level);
9781: msc_sch_wb.atp_debug('ATP_Check: ' || 'atp_qty_this_level: ' || l_atp_date_quantity_this_level);
9782: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_used_available_quantity: ' || l_used_available_quantity); --bug3409973
9783: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atf_date_qty : ' || l_atf_date_qty);
9784: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atf_date_quantity : ' || p_atp_record.atf_date_quantity);
9785: END IF;
9786:
9787: ELSE
9788: IF (l_stealing_requested_date_qty > 0) AND

Line 9797: msc_sch_wb.atp_debug('ATP_Check: ' || 'Do a Second pass to find better date for Qty:' || l_requested_quantity);

9793: --as stealing has happened.
9794: l_requested_quantity := p_atp_record.quantity_ordered -
9795: l_stealing_requested_date_qty;
9796: IF PG_DEBUG in ('Y', 'C') THEN
9797: msc_sch_wb.atp_debug('ATP_Check: ' || 'Do a Second pass to find better date for Qty:' || l_requested_quantity);
9798: msc_sch_wb.atp_debug('ATP_Check: ' || 'Count:' || l_atp_period_first.period_start_date.COUNT);
9799: END IF;
9800:
9801: FOR i in 1..l_atp_period_first.period_start_date.COUNT LOOP

Line 9798: msc_sch_wb.atp_debug('ATP_Check: ' || 'Count:' || l_atp_period_first.period_start_date.COUNT);

9794: l_requested_quantity := p_atp_record.quantity_ordered -
9795: l_stealing_requested_date_qty;
9796: IF PG_DEBUG in ('Y', 'C') THEN
9797: msc_sch_wb.atp_debug('ATP_Check: ' || 'Do a Second pass to find better date for Qty:' || l_requested_quantity);
9798: msc_sch_wb.atp_debug('ATP_Check: ' || 'Count:' || l_atp_period_first.period_start_date.COUNT);
9799: END IF;
9800:
9801: FOR i in 1..l_atp_period_first.period_start_date.COUNT LOOP
9802: IF i <> l_atp_period_first.period_start_date.COUNT THEN

Line 9826: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Date II pass is ' || l_atp_date_this_level);

9822: END IF;
9823: END IF;
9824: END LOOP;
9825: IF PG_DEBUG in ('Y', 'C') THEN
9826: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Date II pass is ' || l_atp_date_this_level);
9827: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Qty II Pass is ' || l_atp_date_quantity_this_level);
9828: END IF;
9829: --End Changes bug2471377 pumehta
9830: END IF;

Line 9827: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Qty II Pass is ' || l_atp_date_quantity_this_level);

9823: END IF;
9824: END LOOP;
9825: IF PG_DEBUG in ('Y', 'C') THEN
9826: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Date II pass is ' || l_atp_date_this_level);
9827: msc_sch_wb.atp_debug('ATP_Check: ' || 'Avail Qty II Pass is ' || l_atp_date_quantity_this_level);
9828: END IF;
9829: --End Changes bug2471377 pumehta
9830: END IF;
9831:

Line 9878: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);

9874: l_atp_date_this_level);
9875: END IF;
9876:
9877: IF PG_DEBUG in ('Y', 'C') THEN
9878: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9879: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9880: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9881: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9882: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);

Line 9879: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);

9875: END IF;
9876:
9877: IF PG_DEBUG in ('Y', 'C') THEN
9878: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9879: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9880: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9881: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9882: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9883: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);

Line 9880: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973

9876:
9877: IF PG_DEBUG in ('Y', 'C') THEN
9878: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9879: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9880: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9881: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9882: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9883: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);
9884: END IF;

Line 9881: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);

9877: IF PG_DEBUG in ('Y', 'C') THEN
9878: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9879: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9880: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9881: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9882: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9883: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);
9884: END IF;
9885: -- p_atp_record.available_quantity:=l_atp_date_quantity_this_level;

Line 9882: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);

9878: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date' || p_atp_record.ship_date);
9879: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9880: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9881: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9882: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9883: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);
9884: END IF;
9885: -- p_atp_record.available_quantity:=l_atp_date_quantity_this_level;
9886: IF p_atp_record.ship_date IS NOT NULL THEN

Line 9883: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);

9879: msc_sch_wb.atp_debug('ATP_Check: ' || 'avail qty: ' || p_atp_record.available_quantity);
9880: msc_sch_wb.atp_debug('ATP_Check: ' || 'used avail qty: ' || p_atp_record.used_available_quantity); --bug3409973
9881: msc_sch_wb.atp_debug('ATP_Check: ' || 'qty level: ' || l_atp_date_quantity_this_level);
9882: msc_sch_wb.atp_debug('ATP_Check: ' || 'stealing qty level: ' || l_stealing_qty);
9883: msc_sch_wb.atp_debug('ATP_Check: ' || 'atf date qty: ' || p_atp_record.atf_date_quantity);
9884: END IF;
9885: -- p_atp_record.available_quantity:=l_atp_date_quantity_this_level;
9886: IF p_atp_record.ship_date IS NOT NULL THEN
9887: p_atp_record.error_code := ATP_REQ_DATE_FAIL;

Line 9939: msc_sch_wb.atp_debug('ATO update details_temp 1: ' || l_pegging_id || ' date: ' || l_atp_date_this_level);

9935: and pegging_id = l_pegging_id
9936: and record_type = 3;
9937:
9938: IF PG_DEBUG in ('Y', 'C') THEN
9939: msc_sch_wb.atp_debug('ATO update details_temp 1: ' || l_pegging_id || ' date: ' || l_atp_date_this_level);
9940: msc_sch_wb.atp_debug('Update demand with demand id := ' || l_demand_id);
9941: msc_sch_wb.atp_debug('Update demand on date : = ' || l_atp_date_this_level);
9942: END IF;
9943:

Line 9940: msc_sch_wb.atp_debug('Update demand with demand id := ' || l_demand_id);

9936: and record_type = 3;
9937:
9938: IF PG_DEBUG in ('Y', 'C') THEN
9939: msc_sch_wb.atp_debug('ATO update details_temp 1: ' || l_pegging_id || ' date: ' || l_atp_date_this_level);
9940: msc_sch_wb.atp_debug('Update demand with demand id := ' || l_demand_id);
9941: msc_sch_wb.atp_debug('Update demand on date : = ' || l_atp_date_this_level);
9942: END IF;
9943:
9944: -- bug 1302394: we should adjust the date

Line 9941: msc_sch_wb.atp_debug('Update demand on date : = ' || l_atp_date_this_level);

9937:
9938: IF PG_DEBUG in ('Y', 'C') THEN
9939: msc_sch_wb.atp_debug('ATO update details_temp 1: ' || l_pegging_id || ' date: ' || l_atp_date_this_level);
9940: msc_sch_wb.atp_debug('Update demand with demand id := ' || l_demand_id);
9941: msc_sch_wb.atp_debug('Update demand on date : = ' || l_atp_date_this_level);
9942: END IF;
9943:
9944: -- bug 1302394: we should adjust the date
9945: -- of the demand which causes this planned order

Line 10008: msc_sch_wb.atp_debug('ATP_Check: ' || 'I come here 123');

10004:
10005:
10006: -- time_phased_atp changes begin
10007: IF l_time_phased_atp = 'Y' THEN
10008: msc_sch_wb.atp_debug('ATP_Check: ' || 'I come here 123');
10009: --bug3397904 start
10010: IF p_atp_record.requested_ship_date <= p_atp_record.atf_date THEN
10011: l_bkwd_pass_atf_date_qty := GREATEST(NVL(p_atp_record.combined_requested_date_qty,
10012: p_atp_record.requested_date_quantity), 0);

Line 10032: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');

10028: l_bkwd_pass_atf_date_qty --bug3397904
10029: );
10030: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10031: IF PG_DEBUG in ('Y', 'C') THEN
10032: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
10033: END IF;
10034: RAISE FND_API.G_EXC_ERROR;
10035: END IF;
10036: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'

Line 10048: msc_sch_wb.atp_debug('ATP_Check: ' || 'update old date demand');

10044:
10045: -- update summary records removed in ODS cases - for summary enhancement
10046: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' and (p_parent_pegging_id is not null) AND p_plan_id = -1 THEN
10047: IF PG_DEBUG in ('Y', 'C') THEN
10048: msc_sch_wb.atp_debug('ATP_Check: ' || 'update old date demand');
10049: END IF;
10050: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
10051: p_plan_id,
10052: p_atp_record.organization_id,

Line 10086: msc_sch_wb.atp_debug('ATP_Check: ' || 'update demand on new date');

10082: 2);
10083:
10084:
10085: IF PG_DEBUG in ('Y', 'C') THEN
10086: msc_sch_wb.atp_debug('ATP_Check: ' || 'update demand on new date');
10087: END IF;
10088: update /*+ INDEX(msc_atp_summary_sd MSC_ATP_SUMMARY_SD_U1) */ msc_atp_summary_sd
10089: set sd_qty = sd_qty - p_atp_record.quantity_ordered
10090: where plan_id = p_plan_id

Line 10098: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert demand on new date');

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

Line 10178: msc_sch_wb.atp_debug('ATP_Check: ' || 'Qty := ' || l_pegging_rec.supply_demand_quantity);

10174: l_pegging_rec.supply_demand_date:= l_atp_date_this_level;
10175: l_pegging_rec.actual_supply_demand_date:= l_atp_date_this_level;
10176: l_pegging_rec.supply_demand_type:= 2;
10177: IF PG_DEBUG in ('Y', 'C') THEN
10178: msc_sch_wb.atp_debug('ATP_Check: ' || 'Qty := ' || l_pegging_rec.supply_demand_quantity);
10179: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date := ' || l_pegging_rec.supply_demand_date);
10180: END IF;
10181: l_pegging_rec.source_type := 0;
10182:

Line 10179: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date := ' || l_pegging_rec.supply_demand_date);

10175: l_pegging_rec.actual_supply_demand_date:= l_atp_date_this_level;
10176: l_pegging_rec.supply_demand_type:= 2;
10177: IF PG_DEBUG in ('Y', 'C') THEN
10178: msc_sch_wb.atp_debug('ATP_Check: ' || 'Qty := ' || l_pegging_rec.supply_demand_quantity);
10179: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date := ' || l_pegging_rec.supply_demand_date);
10180: END IF;
10181: l_pegging_rec.source_type := 0;
10182:
10183: -- for demo:1153192

Line 10205: msc_sch_wb.atp_debug('Forward ATP, add pegging constriant');

10201: AND l_requested_date_quantity < p_atp_record.quantity_ordered
10202: AND G_FORWARD_ATP = 'N' THEN --optional_fw
10203: -- Bug 3828469 - Add constraint only if it exists
10204: IF PG_DEBUG in ('Y', 'C') THEN
10205: msc_sch_wb.atp_debug('Forward ATP, add pegging constriant');
10206: END IF;
10207: l_pegging_rec.constraint_type := 1;
10208: END IF;
10209: --e_cto_rearch

Line 10345: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured while getting PTF : ' || sqlerrm);

10341: and pl.sr_instance_id = itm.sr_instance_id;
10342: EXCEPTION
10343: WHEN OTHERS THEN
10344: IF PG_DEBUG in ('Y', 'C') THEN
10345: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured while getting PTF : ' || sqlerrm);
10346: END IF;
10347: l_ptf_date := l_ptf_date; -- Bug 3535999 - l_sysdate;
10348: END;
10349: END IF;

Line 10351: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);

10347: l_ptf_date := l_ptf_date; -- Bug 3535999 - l_sysdate;
10348: END;
10349: END IF;
10350: IF PG_DEBUG in ('Y', 'C') THEN
10351: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
10352: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_enabled := ' || l_ptf_enabled);
10353: END IF;
10354: -- for bug 1124538: do not pass down the demand to the
10355: -- next level if it is backward scheduling and

Line 10352: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_enabled := ' || l_ptf_enabled);

10348: END;
10349: END IF;
10350: IF PG_DEBUG in ('Y', 'C') THEN
10351: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
10352: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_enabled := ' || l_ptf_enabled);
10353: END IF;
10354: -- for bug 1124538: do not pass down the demand to the
10355: -- next level if it is backward scheduling and
10356: -- requested_ship_date is less than sysdate.

Line 10364: msc_sch_wb.atp_debug('ATP_Check: ' || 'backward, request ship date

10360: --(l_requested_ship_date < GREATEST(l_sysdate, l_ptf_date))) THEN
10361: --diag_atp: we dont want to stop in case of diag ATP. We still want to explode sources
10362: (l_requested_ship_date < l_sysdate ) AND (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2)) THEN
10363: IF PG_DEBUG in ('Y', 'C') THEN
10364: msc_sch_wb.atp_debug('ATP_Check: ' || 'backward, request ship date 10365: END IF;
10366: p_atp_record.requested_date_quantity:=0.0;
10367: -- cchen : 1238941
10368: p_atp_record.combined_requested_date_qty := 0.0;

Line 10372: msc_sch_wb.atp_debug('ATP_Check: ' || 'top level, set future date Y');

10368: p_atp_record.combined_requested_date_qty := 0.0;
10369:
10370: IF p_parent_pegging_id is null THEN
10371: IF PG_DEBUG in ('Y', 'C') THEN
10372: msc_sch_wb.atp_debug('ATP_Check: ' || 'top level, set future date Y');
10373: END IF;
10374: MSC_ATP_PVT.G_FIND_FUTURE_DATE := 'Y';
10375: MSC_ATP_PVT.G_ASSEMBLY_LINE_ID := p_atp_record.Identifier;
10376: MSC_ATP_PVT.G_COMP_LINE_ID := p_atp_record.Identifier;

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

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

Line 10404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

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

Line 10405: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

10401: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
10402: IF PG_DEBUG in ('Y', 'C') THEN
10403: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
10404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
10405: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
10406: END IF;
10407:
10408: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
10409: p_plan_id,

Line 10433: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand updated for demand id = '|| l_demand_id);

10429: commit;
10430: END IF;
10431:
10432: IF PG_DEBUG in ('Y', 'C') THEN
10433: msc_sch_wb.atp_debug('ATP_Check: ' || 'demand updated for demand id = '|| l_demand_id);
10434: END IF;
10435:
10436: END IF;
10437: ELSE

Line 10445: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside net_demand > 0');

10441: -- components.
10442: -- first we check the supply chain bill
10443:
10444: IF PG_DEBUG in ('Y', 'C') THEN
10445: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside net_demand > 0');
10446: END IF;
10447: -- for bug 1094773
10448: IF (p_search = FORWARD_SCHEDULING) AND
10449: --subst : for top org in case of subst we do not add pegg

Line 10457: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward ATP Qty := ' || l_atp_date_quantity_this_level);

10453: -- assume the atp date and quantity to be single level.
10454: -- this is the worst that we can get.
10455:
10456: IF PG_DEBUG in ('Y', 'C') THEN
10457: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward ATP Qty := ' || l_atp_date_quantity_this_level);
10458: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Date : FUTURE : ' || l_atp_date_this_level);
10459: END IF;
10460:
10461: p_atp_record.available_quantity:= l_atp_date_quantity_this_level;

Line 10458: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Date : FUTURE : ' || l_atp_date_this_level);

10454: -- this is the worst that we can get.
10455:
10456: IF PG_DEBUG in ('Y', 'C') THEN
10457: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward ATP Qty := ' || l_atp_date_quantity_this_level);
10458: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Date : FUTURE : ' || l_atp_date_this_level);
10459: END IF;
10460:
10461: p_atp_record.available_quantity:= l_atp_date_quantity_this_level;
10462: p_atp_record.used_available_quantity:= l_used_available_quantity;--bug3409973

Line 10487: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date : ' || p_atp_record.ship_date);

10483: p_atp_record.instance_id,
10484: l_atp_date_this_level);
10485:
10486: IF PG_DEBUG in ('Y', 'C') THEN
10487: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date : ' || p_atp_record.ship_date);
10488: END IF;
10489:
10490: -- Planned Pegging Based AATP Changes
10491: --enable forward pegging for all cases.

Line 10516: msc_sch_wb.atp_debug('ATP_Check: ' || 'Already added future supply pegging : '|| l_atp_pegging_tab.COUNT);

10512: -- Already Called MSC_AATP_REQ.Get_Forward_Material_Atp, thus don't add
10513: -- pegging for future case here as its already added.
10514:
10515: IF PG_DEBUG in ('Y', 'C') THEN
10516: msc_sch_wb.atp_debug('ATP_Check: ' || 'Already added future supply pegging : '|| l_atp_pegging_tab.COUNT);
10517: END IF;
10518: ELSE
10519: l_future_atp_period := l_atp_period;
10520: l_future_atp_supply_demand := l_atp_supply_demand;

Line 10566: msc_sch_wb.atp_debug('ATP_Check: p_atp_record_available_qty : ' || p_atp_record.available_quantity);

10562: IF nvl(l_req_date_qty, -1) = 0 THEN
10563: l_pegging_rec.supply_demand_quantity:= p_atp_record.available_quantity;
10564: ELSE
10565: IF PG_DEBUG in ('Y', 'C') THEN
10566: msc_sch_wb.atp_debug('ATP_Check: p_atp_record_available_qty : ' || p_atp_record.available_quantity);
10567: msc_sch_wb.atp_debug('ATP_Check: requested_day_quantity : ' || p_atp_record.available_quantity);
10568: END IF;
10569: IF(p_atp_record.available_quantity <> INFINITE_NUMBER) THEN
10570: IF PG_DEBUG in ('Y', 'C') THEN

Line 10567: msc_sch_wb.atp_debug('ATP_Check: requested_day_quantity : ' || p_atp_record.available_quantity);

10563: l_pegging_rec.supply_demand_quantity:= p_atp_record.available_quantity;
10564: ELSE
10565: IF PG_DEBUG in ('Y', 'C') THEN
10566: msc_sch_wb.atp_debug('ATP_Check: p_atp_record_available_qty : ' || p_atp_record.available_quantity);
10567: msc_sch_wb.atp_debug('ATP_Check: requested_day_quantity : ' || p_atp_record.available_quantity);
10568: END IF;
10569: IF(p_atp_record.available_quantity <> INFINITE_NUMBER) THEN
10570: IF PG_DEBUG in ('Y', 'C') THEN
10571: msc_sch_wb.atp_debug('ATP_Check: Available Quantity is not INFINITE, subtracting requested_day_qty');

Line 10571: msc_sch_wb.atp_debug('ATP_Check: Available Quantity is not INFINITE, subtracting requested_day_qty');

10567: msc_sch_wb.atp_debug('ATP_Check: requested_day_quantity : ' || p_atp_record.available_quantity);
10568: END IF;
10569: IF(p_atp_record.available_quantity <> INFINITE_NUMBER) THEN
10570: IF PG_DEBUG in ('Y', 'C') THEN
10571: msc_sch_wb.atp_debug('ATP_Check: Available Quantity is not INFINITE, subtracting requested_day_qty');
10572: END IF;
10573: l_pegging_rec.supply_demand_quantity:=
10574: p_atp_record.available_quantity - greatest(0, l_requested_date_quantity);
10575: ELSE

Line 10577: msc_sch_wb.atp_debug('ATP_Check: Available Quantity INFINITE');

10573: l_pegging_rec.supply_demand_quantity:=
10574: p_atp_record.available_quantity - greatest(0, l_requested_date_quantity);
10575: ELSE
10576: IF PG_DEBUG in ('Y', 'C') THEN
10577: msc_sch_wb.atp_debug('ATP_Check: Available Quantity INFINITE');
10578: END IF;
10579: l_pegging_rec.supply_demand_quantity:= p_atp_record.available_quantity;
10580: END IF;
10581: END IF;

Line 10629: msc_sch_wb.atp_debug('Forward ATP, add pegging constriant');

10625:
10626: --s_cto_rearch
10627: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP, 2) = 2 THEN
10628: IF PG_DEBUG in ('Y', 'C') THEN
10629: msc_sch_wb.atp_debug('Forward ATP, add pegging constriant');
10630: END IF;
10631: l_pegging_rec.constraint_type := 1;
10632: END IF;
10633: l_pegging_rec.dest_inv_item_id := C_ITEM_INFO_REC.dest_inv_item_id;

Line 10674: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);

10670: -- that we know how to peg to the demand for the planned
10671: -- order that we are going to create for each child.
10672: --4902658/5216528
10673: IF PG_DEBUG in ('Y', 'C') THEN
10674: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
10675: END IF;
10676:
10677: l_parent_pegging_id := l_pegging_id;
10678: -- Bug 2814872

Line 10680: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);

10676:
10677: l_parent_pegging_id := l_pegging_id;
10678: -- Bug 2814872
10679: IF PG_DEBUG in ('Y', 'C') THEN
10680: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
10681: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
10682: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
10683: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
10684: l_atp_date_quantity_this_level);

Line 10681: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);

10677: l_parent_pegging_id := l_pegging_id;
10678: -- Bug 2814872
10679: IF PG_DEBUG in ('Y', 'C') THEN
10680: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
10681: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
10682: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
10683: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
10684: l_atp_date_quantity_this_level);
10685: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||

Line 10682: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);

10678: -- Bug 2814872
10679: IF PG_DEBUG in ('Y', 'C') THEN
10680: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
10681: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
10682: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
10683: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
10684: l_atp_date_quantity_this_level);
10685: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
10686: l_used_available_quantity);

Line 10683: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||

10679: IF PG_DEBUG in ('Y', 'C') THEN
10680: msc_sch_wb.atp_debug('l_parent_pegging_id := ' || l_parent_pegging_id);
10681: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
10682: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
10683: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
10684: l_atp_date_quantity_this_level);
10685: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
10686: l_used_available_quantity);
10687: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||

Line 10685: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||

10681: msc_sch_wb.atp_debug('l_pegging_id := ' || l_pegging_id);
10682: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_this_level ' || l_atp_date_this_level);
10683: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
10684: l_atp_date_quantity_this_level);
10685: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
10686: l_used_available_quantity);
10687: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||
10688: p_atp_record.Quantity_Ordered);
10689: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );

Line 10687: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||

10683: msc_sch_wb.atp_debug('ATP_Check: l_atp_date_quantity_this_level ' ||
10684: l_atp_date_quantity_this_level);
10685: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
10686: l_used_available_quantity);
10687: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||
10688: p_atp_record.Quantity_Ordered);
10689: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );
10690: msc_sch_wb.atp_debug('ATP_Check: Count of Subs Items '|| l_substitutes_rec.inventory_item_id.count );
10691: END IF;

Line 10689: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );

10685: msc_sch_wb.atp_debug('ATP_Check: l_used_available_quantity ' ||
10686: l_used_available_quantity);
10687: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||
10688: p_atp_record.Quantity_Ordered);
10689: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );
10690: msc_sch_wb.atp_debug('ATP_Check: Count of Subs Items '|| l_substitutes_rec.inventory_item_id.count );
10691: END IF;
10692: l_tmp_parent_pegging_id := l_parent_pegging_id;
10693: --4902658/5216528

Line 10690: msc_sch_wb.atp_debug('ATP_Check: Count of Subs Items '|| l_substitutes_rec.inventory_item_id.count );

10686: l_used_available_quantity);
10687: msc_sch_wb.atp_debug('ATP_Check: p_atp_record.Quantity_Ordered '||
10688: p_atp_record.Quantity_Ordered);
10689: msc_sch_wb.atp_debug('ATP_Check: l_temp_net_demand '|| l_net_demand );
10690: msc_sch_wb.atp_debug('ATP_Check: Count of Subs Items '|| l_substitutes_rec.inventory_item_id.count );
10691: END IF;
10692: l_tmp_parent_pegging_id := l_parent_pegging_id;
10693: --4902658/5216528
10694: for l_index in 1..l_substitutes_rec.inventory_item_id.count

Line 10699: msc_sch_wb.atp_debug('Substitute Loop Starts with l_index := ' || l_index);

10695: LOOP
10696:
10697: IF l_substitutes_rec.inventory_item_id.count > 1 THEN
10698: IF PG_DEBUG in ('Y', 'C') THEN
10699: msc_sch_wb.atp_debug('Substitute Loop Starts with l_index := ' || l_index);
10700: END IF;
10701: END IF;
10702:
10703: IF (l_net_demand <= 0) then

Line 10730: msc_sch_wb.atp_debug('ATP_Check: ' ||

10726: (l_atp_date_quantity_this_level >= p_atp_record.Quantity_Ordered) AND
10727: (l_atp_date_this_level = l_sysdate ) AND (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2)) THEN
10728: --diag_atp: we dont want to stop in case of diag ATP. We still want to explode sources
10729: IF PG_DEBUG in ('Y', 'C') THEN
10730: msc_sch_wb.atp_debug('ATP_Check: ' ||
10731: 'Past Due Order Satisfied on Sysdate, Stop unless dia_atp ');
10732: END IF;
10733: p_atp_record.error_code := ATP_REQ_DATE_FAIL;
10734: --END IF;

Line 10743: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');

10739: ELSIF NOT (p_search = BACKWARD_SCHEDULING AND l_requested_ship_date < l_ptf_date
10740: AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2) THEN
10741:
10742: IF PG_DEBUG in ('Y', 'C') THEN
10743: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');
10744: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10745: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);
10746: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10747: END IF;

Line 10744: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);

10740: AND MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2) THEN
10741:
10742: IF PG_DEBUG in ('Y', 'C') THEN
10743: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');
10744: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10745: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);
10746: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10747: END IF;
10748: --s_cto_rearch

Line 10745: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);

10741:
10742: IF PG_DEBUG in ('Y', 'C') THEN
10743: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');
10744: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10745: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);
10746: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10747: END IF;
10748: --s_cto_rearch
10749: l_item_sourcing_info_rec := l_null_item_sourcing_info_rec;

Line 10746: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);

10742: IF PG_DEBUG in ('Y', 'C') THEN
10743: msc_sch_wb.atp_debug('ATP_Check: ' || 'Find Sources');
10744: msc_sch_wb.atp_debug('bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
10745: msc_sch_wb.atp_debug('wip_supply_type := ' || p_atp_record.wip_supply_type);
10746: msc_sch_wb.atp_debug('replenish_to_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
10747: END IF;
10748: --s_cto_rearch
10749: l_item_sourcing_info_rec := l_null_item_sourcing_info_rec;
10750: l_item_sourcing_info_rec.sr_inventory_item_id.extend;

Line 10768: msc_sch_wb.atp_debug('ATP_Check: ' || 'ods atp, we always make');

10764:
10765: --if ods ATP and ATO model/item or if checking base model's capacity then we only make
10766: IF MSC_ATP_PVT.G_INV_CTP = 5 or l_check_model_capacity = 1 THEN
10767: IF PG_DEBUG in ('Y', 'C') THEN
10768: msc_sch_wb.atp_debug('ATP_Check: ' || 'ods atp, we always make');
10769: END IF;
10770:
10771: --we should come here only for ATO models or ATO items
10772: l_sources.Source_Type := MRP_ATP_PUB.number_arr(2); -- make

Line 10807: msc_sch_wb.atp_debug('ATP_Check: ' || 'after atp_sources');

10803:
10804: END IF;
10805: --e_cto_rearch
10806: IF PG_DEBUG in ('Y', 'C') THEN
10807: msc_sch_wb.atp_debug('ATP_Check: ' || 'after atp_sources');
10808: END IF;
10809:
10810: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR Then
10811: --- Model has option specific sources which do not match with sourcing of model

Line 10826: msc_sch_wb.atp_debug('ATP_Check: ' || 'no sources');

10822: l_sources.source_type.count = 0 THEN
10823: -- no sources in supply chain bill, then we assume
10824: -- it has "make at" type
10825: IF PG_DEBUG in ('Y', 'C') THEN
10826: msc_sch_wb.atp_debug('ATP_Check: ' || 'no sources');
10827: END IF;
10828: --- select make buy code to decide if we want to make it or buy it
10829: --EFTC Changes
10830: BEGIN

Line 10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'make-buy Code = '|| l_make_buy_cd);

10836: I.sr_instance_id = p_atp_record.instance_id and
10837: I.organization_id = p_atp_record.organization_id and
10838: I.plan_id = p_plan_id ;
10839: IF PG_DEBUG in ('Y', 'C') THEN
10840: msc_sch_wb.atp_debug('ATP_Check: ' || 'make-buy Code = '|| l_make_buy_cd);
10841: END IF;
10842: EXCEPTION
10843: WHEN OTHERS THEN
10844: l_make_buy_cd := 1; --- make 'make' default

Line 10868: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have buy source');

10864: l_sources.Sup_Cap_Type := MRP_ATP_PUB.number_arr(2); -- ship_rec_cal
10865:
10866: -- dsting
10867: IF PG_DEBUG in ('Y', 'C') THEN
10868: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have buy source');
10869: END IF;
10870: p_atp_record.children_type := MAKE_BUY_CHILDREN;
10871: ELSE
10872: l_sources.Source_Type := MRP_ATP_PUB.number_arr(2); -- make

Line 10888: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have make source');

10884: l_sources.Sup_Cap_Type := MRP_ATP_PUB.number_arr(2); -- ship_rec_cal
10885:
10886: -- dsting
10887: IF PG_DEBUG in ('Y', 'C') THEN
10888: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have make source');
10889: END IF;
10890: p_atp_record.children_type := MAKE_BUY_CHILDREN;
10891: END IF;
10892:

Line 10902: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_ptf_date := ' || l_parent_ptf_date);

10898:
10899: --- we store parent_ptf in a local varibale as it might get changed
10900: l_parent_ptf_date := NVL(MSC_ATP_PVT.G_PTF_DATE, l_ptf_date);
10901: IF PG_DEBUG in ('Y', 'C') THEN
10902: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_ptf_date := ' || l_parent_ptf_date);
10903: END IF;
10904: WHILE (j IS NOT NULL) LOOP
10905:
10906: -- Bug 3667729 - Reset G_ITEM_INFO_REC as it may have changed in last source.

Line 10921: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside more than source');

10917: G_FW_CTP_PEGGING_ID.EXTEND;
10918: G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT) := NULL;
10919:
10920: IF PG_DEBUG in ('Y', 'C') THEN
10921: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside more than source');
10922: END IF;
10923: END IF;
10924:
10925: --bug 2178544: Since the ptf flag may be chnaged by transfer org, we reassign it for the curent plan

Line 10929: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside while loop for the children');

10925: --bug 2178544: Since the ptf flag may be chnaged by transfer org, we reassign it for the curent plan
10926: MSC_ATP_PVT.G_PTF_DATE := l_parent_ptf_date;
10927:
10928: IF PG_DEBUG in ('Y', 'C') THEN
10929: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside while loop for the children');
10930: END IF;
10931:
10932: /* ship_rec_cal changes begin */
10933: -- populate calendar codes in l_atp_rec

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

10931:
10932: /* ship_rec_cal changes begin */
10933: -- populate calendar codes in l_atp_rec
10934: IF PG_DEBUG in ('Y', 'C') THEN
10935: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10936: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10937: msc_sch_wb.atp_debug('* ');
10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );

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

10932: /* ship_rec_cal changes begin */
10933: -- populate calendar codes in l_atp_rec
10934: IF PG_DEBUG in ('Y', 'C') THEN
10935: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10936: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10937: msc_sch_wb.atp_debug('* ');
10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );

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

10933: -- populate calendar codes in l_atp_rec
10934: IF PG_DEBUG in ('Y', 'C') THEN
10935: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10936: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10937: msc_sch_wb.atp_debug('* ');
10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );

Line 10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );

10934: IF PG_DEBUG in ('Y', 'C') THEN
10935: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10936: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10937: msc_sch_wb.atp_debug('* ');
10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );

Line 10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );

10935: msc_sch_wb.atp_debug('**************** Calendar Codes ******************************');
10936: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10937: msc_sch_wb.atp_debug('* ');
10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );

Line 10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );

10936: msc_sch_wb.atp_debug('* ___________________Input_____________________');
10937: msc_sch_wb.atp_debug('* ');
10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );

Line 10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );

10937: msc_sch_wb.atp_debug('* ');
10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );

Line 10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );

10938: msc_sch_wb.atp_debug('* Source Type : '|| l_sources.source_type(j) );
10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10946: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );

Line 10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );

10939: msc_sch_wb.atp_debug('* Sup Cap Type : '|| l_sources.sup_cap_type(j) );
10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10946: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10947: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );

Line 10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );

10940: msc_sch_wb.atp_debug('* Instance ID : '|| p_atp_record.instance_id );
10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10946: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10947: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10948: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );

Line 10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );

10941: msc_sch_wb.atp_debug('* Source Instance ID : '|| l_sources.instance_id(j) );
10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10946: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10947: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10948: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );
10949: END IF;

Line 10946: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );

10942: msc_sch_wb.atp_debug('* Source Org ID : '|| l_sources.organization_id(j) );
10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10946: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10947: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10948: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );
10949: END IF;
10950:

Line 10947: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );

10943: msc_sch_wb.atp_debug('* Receiving Org ID : '|| p_atp_record.organization_id );
10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10946: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10947: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10948: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );
10949: END IF;
10950:
10951: IF l_sources.source_type(j) = MAKE THEN

Line 10948: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );

10944: msc_sch_wb.atp_debug('* Plan ID : '|| p_plan_id );
10945: msc_sch_wb.atp_debug('* Inv Item ID : '|| p_atp_record.inventory_item_id );
10946: msc_sch_wb.atp_debug('* Supplier ID : '|| l_sources.supplier_id(j) );
10947: msc_sch_wb.atp_debug('* Supplier Site ID : '|| l_sources.supplier_site_id(j) );
10948: msc_sch_wb.atp_debug('* Ship Method : '|| l_sources.Ship_Method(j) );
10949: END IF;
10950:
10951: IF l_sources.source_type(j) = MAKE THEN
10952:

Line 10991: msc_sch_wb.atp_debug('Lead time := ' || l_atp_rec.delivery_lead_time);

10987: l_sources.Ship_Method(j) := l_atp_rec.ship_method;
10988: l_sources.lead_time(j) := l_atp_rec.delivery_lead_time;
10989:
10990: IF PG_DEBUG in ('Y', 'C') THEN
10991: msc_sch_wb.atp_debug('Lead time := ' || l_atp_rec.delivery_lead_time);
10992: msc_sch_wb.atp_debug('Ship Method := ' || l_atp_rec.ship_method);
10993: END IF;
10994: END IF;
10995:

Line 10992: msc_sch_wb.atp_debug('Ship Method := ' || l_atp_rec.ship_method);

10988: l_sources.lead_time(j) := l_atp_rec.delivery_lead_time;
10989:
10990: IF PG_DEBUG in ('Y', 'C') THEN
10991: msc_sch_wb.atp_debug('Lead time := ' || l_atp_rec.delivery_lead_time);
10992: msc_sch_wb.atp_debug('Ship Method := ' || l_atp_rec.ship_method);
10993: END IF;
10994: END IF;
10995:
10996: -- Bug 3737759 - Moved from below

Line 11046: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_USE_SHIP_REC_CAL is N');

11042: MSC_CALENDAR.OSC);
11043: ELSE
11044: -- Bug 3593394
11045: IF PG_DEBUG in ('Y', 'C') THEN
11046: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_USE_SHIP_REC_CAL is N');
11047: END IF;
11048: -- Bug 3737759 - Use receiving org's OMC - l_atp_rec.receiving_cal_code := MSC_CALENDAR.FOC;
11049: l_atp_rec.receiving_cal_code := p_atp_record.manufacturing_cal_code;
11050: l_atp_rec.intransit_cal_code := MSC_CALENDAR.FOC;

Line 11112: msc_sch_wb.atp_debug('ATP_Check: Use SMC irrespective of profile G_USE_SHIP_REC_CAL');

11108: l_atp_rec.ship_method,
11109: l_atp_rec.delivery_lead_time);
11110:
11111: IF PG_DEBUG in ('Y', 'C') THEN
11112: msc_sch_wb.atp_debug('ATP_Check: Use SMC irrespective of profile G_USE_SHIP_REC_CAL');
11113: END IF;
11114: --l_atp_rec.manufacturing_cal_code := p_atp_record.manufacturing_cal_code;
11115: --Bug 3687353: Use SMC irrespective of profile MSC_ATP_PVT.G_USE_SHIP_REC_CAL
11116:

Line 11190: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_USE_SHIP_REC_CAL is N');

11186: ELSE
11187:
11188: -- Bug 3593394
11189: IF PG_DEBUG in ('Y', 'C') THEN
11190: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_USE_SHIP_REC_CAL is N');
11191: END IF;
11192: -- Bug 3737759 - Use receiving org's OMC - l_atp_rec.receiving_cal_code := MSC_CALENDAR.FOC;
11193: l_atp_rec.receiving_cal_code := p_atp_record.manufacturing_cal_code;
11194: l_atp_rec.intransit_cal_code := MSC_CALENDAR.FOC;

Line 11203: msc_sch_wb.atp_debug(' ');

11199:
11200: END IF;
11201: END IF;
11202: IF PG_DEBUG in ('Y', 'C') THEN
11203: msc_sch_wb.atp_debug(' ');
11204: msc_sch_wb.atp_debug('* ___________________Output____________________');
11205: msc_sch_wb.atp_debug('* ');
11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);

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

11200: END IF;
11201: END IF;
11202: IF PG_DEBUG in ('Y', 'C') THEN
11203: msc_sch_wb.atp_debug(' ');
11204: msc_sch_wb.atp_debug('* ___________________Output____________________');
11205: msc_sch_wb.atp_debug('* ');
11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
11208: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);

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

11201: END IF;
11202: IF PG_DEBUG in ('Y', 'C') THEN
11203: msc_sch_wb.atp_debug(' ');
11204: msc_sch_wb.atp_debug('* ___________________Output____________________');
11205: msc_sch_wb.atp_debug('* ');
11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
11208: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
11209: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);

Line 11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);

11202: IF PG_DEBUG in ('Y', 'C') THEN
11203: msc_sch_wb.atp_debug(' ');
11204: msc_sch_wb.atp_debug('* ___________________Output____________________');
11205: msc_sch_wb.atp_debug('* ');
11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
11208: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
11209: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
11210: msc_sch_wb.atp_debug('**************************************************************');

Line 11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);

11203: msc_sch_wb.atp_debug(' ');
11204: msc_sch_wb.atp_debug('* ___________________Output____________________');
11205: msc_sch_wb.atp_debug('* ');
11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
11208: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
11209: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
11210: msc_sch_wb.atp_debug('**************************************************************');
11211: END IF;

Line 11208: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);

11204: msc_sch_wb.atp_debug('* ___________________Output____________________');
11205: msc_sch_wb.atp_debug('* ');
11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
11208: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
11209: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
11210: msc_sch_wb.atp_debug('**************************************************************');
11211: END IF;
11212:

Line 11209: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);

11205: msc_sch_wb.atp_debug('* ');
11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
11208: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
11209: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
11210: msc_sch_wb.atp_debug('**************************************************************');
11211: END IF;
11212:
11213: /* planned order due date as per OMC-D */

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

11206: msc_sch_wb.atp_debug('* Receiving calendar code : ' || l_atp_rec.receiving_cal_code);
11207: msc_sch_wb.atp_debug('* Intransit calendar code : ' || l_atp_rec.intransit_cal_code);
11208: msc_sch_wb.atp_debug('* Shipping calendar code : ' || l_atp_rec.shipping_cal_code);
11209: msc_sch_wb.atp_debug('* Manufacturing calendar code : ' || l_atp_rec.manufacturing_cal_code);
11210: msc_sch_wb.atp_debug('**************************************************************');
11211: END IF;
11212:
11213: /* planned order due date as per OMC-D */
11214: l_planned_order_date := MSC_CALENDAR.PREV_WORK_DAY(

Line 11219: msc_sch_wb.atp_debug('* Planned Order Due Date as per OMC-D: ' || l_planned_order_date);

11215: p_atp_record.manufacturing_cal_code,
11216: p_atp_record.instance_id,
11217: l_requested_ship_date);
11218: IF PG_DEBUG in ('Y', 'C') THEN
11219: msc_sch_wb.atp_debug('* Planned Order Due Date as per OMC-D: ' || l_planned_order_date);
11220: END IF;
11221: -- ship_rec_cal changes end
11222:
11223: IF ((l_sources.source_type(j) = MAKE) or

Line 11228: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have make/buy source');

11224: (l_sources.source_type(j) = BUY))
11225: THEN
11226: -- dsting
11227: IF PG_DEBUG in ('Y', 'C') THEN
11228: msc_sch_wb.atp_debug('ATP_Check: ' || 'MAKE_BUY_CHILDREN: have make/buy source');
11229: END IF;
11230: p_atp_record.children_type := MAKE_BUY_CHILDREN;
11231: G_HAVE_MAKE_BUY_PARENT := 1;
11232: END IF;

Line 11351: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PLAN_INFO_REC.sr_instance_id: ' || G_PLAN_INFO_REC.sr_instance_id);

11347: --diag_atp
11348: l_atp_rec.plan_name := p_atp_record.plan_name;
11349: --Bug 5651914 start
11350: IF PG_DEBUG in ('Y', 'C') THEN
11351: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PLAN_INFO_REC.sr_instance_id: ' || G_PLAN_INFO_REC.sr_instance_id);
11352: END IF;
11353: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.sr_instance_id,-1) = -1 THEN
11354: IF PG_DEBUG in ('Y', 'C') THEN
11355: msc_sch_wb.atp_debug('ATP_Check: ' || 'Re-calculating global plan information');

Line 11355: msc_sch_wb.atp_debug('ATP_Check: ' || 'Re-calculating global plan information');

11351: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PLAN_INFO_REC.sr_instance_id: ' || G_PLAN_INFO_REC.sr_instance_id);
11352: END IF;
11353: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.sr_instance_id,-1) = -1 THEN
11354: IF PG_DEBUG in ('Y', 'C') THEN
11355: msc_sch_wb.atp_debug('ATP_Check: ' || 'Re-calculating global plan information');
11356: END IF;
11357: SELECT trunc(cutoff_date),
11358: DECODE(plan_type, 4, 1,
11359: DECODE(daily_material_constraints, 1, NVL(enforce_pur_lt_constraints, 2),

Line 11387: msc_Sch_wb.atp_debug('Transfer case: bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);

11383:
11384: ELSE
11385: --s_cto_rearch
11386: IF PG_DEBUG in ('Y', 'C') THEN
11387: msc_Sch_wb.atp_debug('Transfer case: bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
11388: msc_Sch_wb.atp_debug('Transfer case: parent_repl_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
11389:
11390: END IF;
11391: IF C_ITEM_INFO_REC.bom_item_type in (1, 2) and C_ITEM_INFO_REC.replenish_to_ord_flag = 'Y' THEN

Line 11388: msc_Sch_wb.atp_debug('Transfer case: parent_repl_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);

11384: ELSE
11385: --s_cto_rearch
11386: IF PG_DEBUG in ('Y', 'C') THEN
11387: msc_Sch_wb.atp_debug('Transfer case: bom_item_type := ' || C_ITEM_INFO_REC.bom_item_type);
11388: msc_Sch_wb.atp_debug('Transfer case: parent_repl_ord_flag := ' || C_ITEM_INFO_REC.replenish_to_ord_flag);
11389:
11390: END IF;
11391: IF C_ITEM_INFO_REC.bom_item_type in (1, 2) and C_ITEM_INFO_REC.replenish_to_ord_flag = 'Y' THEN
11392: IF PG_DEBUG in ('Y', 'C') THEN

Line 11393: msc_Sch_wb.atp_debug('This is model entity. Pass Line IDs');

11389:
11390: END IF;
11391: IF C_ITEM_INFO_REC.bom_item_type in (1, 2) and C_ITEM_INFO_REC.replenish_to_ord_flag = 'Y' THEN
11392: IF PG_DEBUG in ('Y', 'C') THEN
11393: msc_Sch_wb.atp_debug('This is model entity. Pass Line IDs');
11394: END IF;
11395: --if model then pass the
11396: l_atp_rec.Top_Model_line_id := p_atp_record.Top_Model_line_id;
11397: l_atp_rec.ATO_Parent_Model_Line_Id := p_atp_record.ATO_Parent_Model_Line_Id;

Line 11463: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');

11459: );
11460:
11461: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
11462: IF PG_DEBUG in ('Y', 'C') THEN
11463: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
11464: END IF;
11465: x_return_status := FND_API.G_RET_STS_ERROR;
11466: RAISE FND_API.G_EXC_ERROR;
11467: END IF;

Line 11501: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan not found for : '||

11497: -- 24x7 ATP
11498: -- IF (l_plan_id is NULL) or (l_plan_id = -100) THEN
11499: IF NVL(l_plan_id, -1) = -1 or (l_plan_id = -100 ) THEN
11500: IF PG_DEBUG in ('Y', 'C') THEN
11501: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan not found for : '||
11502: l_atp_rec.inventory_item_id
11503: ||' in org : '||l_atp_rec.organization_id);
11504: END IF;
11505: ELSIF l_plan_id = -300 then

Line 11507: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime in plan for' ||

11503: ||' in org : '||l_atp_rec.organization_id);
11504: END IF;
11505: ELSIF l_plan_id = -300 then
11506: IF PG_DEBUG in ('Y', 'C') THEN
11507: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime in plan for' ||
11508: l_atp_rec.inventory_item_id
11509: ||' in org : '||l_atp_rec.organization_id);
11510: END IF;
11511: --bug 2854351

Line 11540: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

11536: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN --bug3397904
11537:
11538: l_PO_qty := CEIL(p_atp_record.quantity_ordered);
11539: IF PG_DEBUG in ('Y', 'C') THEN
11540: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
11541: END IF;
11542: ELSE
11543: l_PO_qty := CEIL(l_net_demand);
11544: IF PG_DEBUG in ('Y', 'C') THEN

Line 11545: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

11541: END IF;
11542: ELSE
11543: l_PO_qty := CEIL(l_net_demand);
11544: IF PG_DEBUG in ('Y', 'C') THEN
11545: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
11546: END IF;
11547: END IF;
11548: ELSE
11549: --bug 3904063: Reset the quantity only in case of demand priorit allocated ATP

Line 11557: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

11553: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN --bug3397904
11554:
11555: l_PO_qty := trunc(p_atp_record.quantity_ordered, 6); --5598066
11556: IF PG_DEBUG in ('Y', 'C') THEN
11557: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
11558: END IF;
11559: ELSE
11560: l_PO_qty := trunc(l_net_demand, 6); -- 5598066
11561: IF PG_DEBUG in ('Y', 'C') THEN

Line 11562: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

11558: END IF;
11559: ELSE
11560: l_PO_qty := trunc(l_net_demand, 6); -- 5598066
11561: IF PG_DEBUG in ('Y', 'C') THEN
11562: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
11563: END IF;
11564: END IF;
11565: END IF;
11566: --bug3397904 end

Line 11582: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

11578: l_atp_rec.requested_ship_date := NULL;
11579: l_atp_rec.requested_arrival_date := NULL;
11580:
11581: IF PG_DEBUG in ('Y', 'C') THEN
11582: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
11583: END IF;
11584:
11585: --- 2178544 calculate start date
11586: --diag_atp

Line 11593: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');

11589: l_trunc_started := 2;
11590: IF l_sources.source_type(j) = TRANSFER THEN
11591:
11592: IF PG_DEBUG in ('Y', 'C') THEN
11593: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
11594: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11595: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);

Line 11594: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);

11590: IF l_sources.source_type(j) = TRANSFER THEN
11591:
11592: IF PG_DEBUG in ('Y', 'C') THEN
11593: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
11594: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11595: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));

Line 11595: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);

11591:
11592: IF PG_DEBUG in ('Y', 'C') THEN
11593: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
11594: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11595: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
11599: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );

Line 11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);

11592: IF PG_DEBUG in ('Y', 'C') THEN
11593: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
11594: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11595: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
11599: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11600: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );

Line 11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);

11593: msc_sch_wb.atp_debug('ATP_Check: ' || 'Backward Scheduling ');
11594: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11595: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
11599: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11600: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11601: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);

Line 11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));

11594: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11595: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
11599: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11600: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11601: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
11602: END IF;

Line 11599: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );

11595: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
11599: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11600: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11601: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
11602: END IF;
11603:

Line 11600: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );

11596: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
11599: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11600: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11601: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
11602: END IF;
11603:
11604: -- Bug 3782472 - calculate ptf date for lower level

Line 11601: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);

11597: msc_sch_wb.atp_debug('ATP_Check: ' || 'PPLT '||l_post_pro_lt);
11598: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship_method := ' || l_sources.ship_method(j));
11599: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11600: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11601: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
11602: END IF;
11603:
11604: -- Bug 3782472 - calculate ptf date for lower level
11605: l_ptf_date_for_child := MSC_CALENDAR.DATE_OFFSET (

Line 11611: msc_sch_wb.atp_debug('ATP_Check: ' ||

11607: p_atp_record.instance_id,
11608: l_parent_ptf_date,
11609: -1 * l_post_pro_lt, -1);
11610: IF PG_DEBUG in ('Y', 'C') THEN
11611: msc_sch_wb.atp_debug('ATP_Check: ' ||
11612: 'After Man. Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11613: END IF;
11614: l_ptf_date_for_child := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(
11615: l_ptf_date_for_child, l_atp_rec.receiving_cal_code, -1,

Line 11619: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );

11615: l_ptf_date_for_child, l_atp_rec.receiving_cal_code, -1,
11616: l_atp_rec.intransit_cal_code, -1 * l_atp_rec.delivery_lead_time, -1,
11617: l_atp_rec.shipping_cal_code, -1, p_atp_record.instance_id);
11618: IF PG_DEBUG in ('Y', 'C') THEN
11619: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11620: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
11623: END IF;

Line 11620: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );

11616: l_atp_rec.intransit_cal_code, -1 * l_atp_rec.delivery_lead_time, -1,
11617: l_atp_rec.shipping_cal_code, -1, p_atp_record.instance_id);
11618: IF PG_DEBUG in ('Y', 'C') THEN
11619: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11620: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
11623: END IF;
11624:

Line 11621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );

11617: l_atp_rec.shipping_cal_code, -1, p_atp_record.instance_id);
11618: IF PG_DEBUG in ('Y', 'C') THEN
11619: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11620: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
11623: END IF;
11624:
11625: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child,l_ptf_date,MSC_ATP_PVT.g_ptf_date); --5053993

Line 11622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);

11618: IF PG_DEBUG in ('Y', 'C') THEN
11619: msc_sch_wb.atp_debug('ATP_Check: ' || 'After 3 Set Cal Offset l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11620: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' ||MSC_ATP_PVT.G_PTF_DATE );
11621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' ||l_ptf_date_for_child );
11622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' ||l_ptf_date);
11623: END IF;
11624:
11625: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child,l_ptf_date,MSC_ATP_PVT.g_ptf_date); --5053993
11626:

Line 11628: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Offset MSC_ATP_PVT.G_PTF_DATE := '

11624:
11625: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child,l_ptf_date,MSC_ATP_PVT.g_ptf_date); --5053993
11626:
11627: IF PG_DEBUG in ('Y', 'C') THEN
11628: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Offset MSC_ATP_PVT.G_PTF_DATE := '
11629: ||MSC_ATP_PVT.G_PTF_DATE );
11630: END IF;
11631:
11632: /* ship_rec_cal changes begin */

Line 11640: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);

11636: l_requested_ship_date,
11637: -1 * l_post_pro_lt, -1);
11638:
11639: IF PG_DEBUG in ('Y', 'C') THEN
11640: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
11641: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11642: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11643: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);
11644: END IF;

Line 11641: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

11637: -1 * l_post_pro_lt, -1);
11638:
11639: IF PG_DEBUG in ('Y', 'C') THEN
11640: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
11641: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11642: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11643: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);
11644: END IF;
11645:

Line 11642: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');

11638:
11639: IF PG_DEBUG in ('Y', 'C') THEN
11640: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
11641: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11642: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11643: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);
11644: END IF;
11645:
11646: l_dock_date := MSC_CALENDAR.PREV_WORK_DAY(

Line 11643: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);

11639: IF PG_DEBUG in ('Y', 'C') THEN
11640: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
11641: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11642: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11643: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_dock_date);
11644: END IF;
11645:
11646: l_dock_date := MSC_CALENDAR.PREV_WORK_DAY(
11647: l_atp_rec.receiving_cal_code,

Line 11655: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_dock_date);

11651: org modeled as supplier which might come in future*/
11652: l_new_dock_date := l_dock_date;
11653:
11654: IF PG_DEBUG in ('Y', 'C') THEN
11655: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_dock_date);
11656: END IF;
11657:
11658: l_start_date := MSC_CALENDAR.DATE_OFFSET (
11659: l_atp_rec.intransit_cal_code,

Line 11665: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);

11661: l_dock_date,
11662: -1 * l_atp_rec.delivery_lead_time, -1);
11663: -- Bug No 4592289/4667756/5053993 Start
11664: IF PG_DEBUG in ('Y', 'C') THEN
11665: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
11666: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
11667: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
11668: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11669: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);

Line 11666: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);

11662: -1 * l_atp_rec.delivery_lead_time, -1);
11663: -- Bug No 4592289/4667756/5053993 Start
11664: IF PG_DEBUG in ('Y', 'C') THEN
11665: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
11666: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
11667: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
11668: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11669: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11670: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);

Line 11667: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);

11663: -- Bug No 4592289/4667756/5053993 Start
11664: IF PG_DEBUG in ('Y', 'C') THEN
11665: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
11666: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
11667: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
11668: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11669: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11670: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11671: END IF;

Line 11668: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);

11664: IF PG_DEBUG in ('Y', 'C') THEN
11665: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
11666: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
11667: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
11668: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11669: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11670: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11671: END IF;
11672: IF l_PTF_DATE < MSC_ATP_PVT.G_PTF_DATE THEN

Line 11669: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);

11665: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE before offset : '||MSC_ATP_PVT.G_PTF_DATE);
11666: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
11667: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
11668: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11669: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11670: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11671: END IF;
11672: IF l_PTF_DATE < MSC_ATP_PVT.G_PTF_DATE THEN
11673: MSC_ATP_PVT.G_PTF_DATE := MSC_CALENDAR.DATE_OFFSET (l_atp_rec.intransit_cal_code,

Line 11670: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);

11666: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_PTF_DATE before offset : '||l_PTF_DATE);
11667: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_START_DATE before offset : '||l_START_DATE);
11668: msc_sch_wb.atp_debug('ATP_Check: ' || 'From Org : '|| l_atp_rec.organization_id);
11669: msc_sch_wb.atp_debug('ATP_Check: ' || 'To Org : '|| p_atp_record.organization_id);
11670: msc_sch_wb.atp_debug('ATP_Check: ' || 'Lead Time : '|| l_atp_rec.delivery_lead_time);
11671: END IF;
11672: IF l_PTF_DATE < MSC_ATP_PVT.G_PTF_DATE THEN
11673: MSC_ATP_PVT.G_PTF_DATE := MSC_CALENDAR.DATE_OFFSET (l_atp_rec.intransit_cal_code,
11674: p_atp_record.instance_id,

Line 11678: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset : '||MSC_ATP_PVT.G_PTF_DATE);

11674: p_atp_record.instance_id,
11675: MSC_ATP_PVT.G_PTF_DATE ,
11676: -1 * l_atp_rec.delivery_lead_time, -1); -- Bug No: 4592289/4667756
11677: IF PG_DEBUG in ('Y', 'C') THEN
11678: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset : '||MSC_ATP_PVT.G_PTF_DATE);
11679: END IF;
11680: else
11681: G_PTF_DATE := l_PTF_DATE;
11682: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after assign : '||MSC_ATP_PVT.G_PTF_DATE );

Line 11682: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after assign : '||MSC_ATP_PVT.G_PTF_DATE );

11678: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset : '||MSC_ATP_PVT.G_PTF_DATE);
11679: END IF;
11680: else
11681: G_PTF_DATE := l_PTF_DATE;
11682: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after assign : '||MSC_ATP_PVT.G_PTF_DATE );
11683: END IF;
11684: MSC_ATP_PVT.G_PTF_DATE := MSC_CALENDAR.NEXT_WORK_DAY(
11685: l_atp_rec.shipping_cal_code,
11686: p_atp_record.instance_id,

Line 11689: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset(Shipping cal) : '||MSC_ATP_PVT.G_PTF_DATE);

11685: l_atp_rec.shipping_cal_code,
11686: p_atp_record.instance_id,
11687: MSC_ATP_PVT.G_PTF_DATE );
11688: IF PG_DEBUG in ('Y', 'C') THEN
11689: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE after offset(Shipping cal) : '||MSC_ATP_PVT.G_PTF_DATE);
11690: END IF;
11691:
11692: -- Bug No 4592289/4667756/5053993 Ends
11693:

Line 11695: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting DLT using VIC : '||l_start_date);

11691:
11692: -- Bug No 4592289/4667756/5053993 Ends
11693:
11694: IF PG_DEBUG in ('Y', 'C') THEN
11695: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting DLT using VIC : '||l_start_date);
11696: END IF;
11697:
11698: l_atp_rec.requested_ship_date := MSC_CALENDAR.PREV_WORK_DAY(
11699: l_atp_rec.shipping_cal_code,

Line 11710: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC : '||l_atp_rec.requested_ship_date);

11706: l_start_date := l_new_ship_date; -- Bug 3412143 -- Setting the variable that is compared with PTF date
11707: -- This should be source org's ship date.
11708:
11709: IF PG_DEBUG in ('Y', 'C') THEN
11710: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC : '||l_atp_rec.requested_ship_date);
11711: END IF;
11712:
11713: l_order_date := MSC_CALENDAR.DATE_OFFSET (
11714: p_atp_record.manufacturing_cal_code,

Line 11720: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);

11716: l_atp_rec.requested_ship_date,
11717: -1 * MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt, -1);
11718:
11719: IF PG_DEBUG in ('Y', 'C') THEN
11720: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);
11721: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
11722: END IF;
11723: -- ship_rec_cal changes end
11724:

Line 11721: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');

11717: -1 * MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt, -1);
11718:
11719: IF PG_DEBUG in ('Y', 'C') THEN
11720: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);
11721: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
11722: END IF;
11723: -- ship_rec_cal changes end
11724:
11725: IF PG_DEBUG in ('Y', 'C') THEN

Line 11726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date '||l_atp_rec.requested_ship_date);

11722: END IF;
11723: -- ship_rec_cal changes end
11724:
11725: IF PG_DEBUG in ('Y', 'C') THEN
11726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date '||l_atp_rec.requested_ship_date);
11727: END IF;
11728:
11729: IF (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 or p_search = forward_scheduling) and
11730: -- ship_rec_cal

Line 11738: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');

11734: (l_start_date < l_ptf_date or l_order_date < l_trunc_sysdate) THEN
11735:
11736: /* ship_rec_cal changes begin*/
11737: IF PG_DEBUG in ('Y', 'C') THEN
11738: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');
11739: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);
11740: END IF;
11741:
11742: /* Bug 3412143 - Earlier ptf_due_date was calculated as

Line 11739: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);

11735:
11736: /* ship_rec_cal changes begin*/
11737: IF PG_DEBUG in ('Y', 'C') THEN
11738: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');
11739: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);
11740: END IF;
11741:
11742: /* Bug 3412143 - Earlier ptf_due_date was calculated as
11743: ptf_due_date := ptf_date + pre-processing lead time + delivery lead time + post-processing lead time

Line 11753: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_ptf_due_date);

11749: l_ptf_date,
11750: MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt, 1);
11751:
11752: IF PG_DEBUG in ('Y', 'C') THEN
11753: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_ptf_due_date);
11754: END IF;
11755: */
11756:
11757: l_ptf_due_date := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(

Line 11763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');

11759: l_atp_rec.intransit_cal_code, nvl(l_atp_rec.delivery_lead_time, 0), +1,
11760: l_atp_rec.receiving_cal_code, +1, p_atp_record.instance_id);
11761:
11762: IF PG_DEBUG in ('Y', 'C') THEN
11763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');
11764: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_ptf_due_date);
11765: END IF;
11766:
11767: l_ptf_due_date := MSC_CALENDAR.DATE_OFFSET (

Line 11764: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_ptf_due_date);

11760: l_atp_rec.receiving_cal_code, +1, p_atp_record.instance_id);
11761:
11762: IF PG_DEBUG in ('Y', 'C') THEN
11763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');
11764: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_ptf_due_date);
11765: END IF;
11766:
11767: l_ptf_due_date := MSC_CALENDAR.DATE_OFFSET (
11768: p_atp_record.manufacturing_cal_code, -- using OMC destination

Line 11774: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);

11770: l_ptf_due_date,
11771: l_post_pro_lt, 1);
11772:
11773: IF PG_DEBUG in ('Y', 'C') THEN
11774: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11775: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11776: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11777: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11778: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);

Line 11775: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');

11771: l_post_pro_lt, 1);
11772:
11773: IF PG_DEBUG in ('Y', 'C') THEN
11774: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11775: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11776: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11777: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11778: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);
11779: END IF;

Line 11776: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');

11772:
11773: IF PG_DEBUG in ('Y', 'C') THEN
11774: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11775: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11776: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11777: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11778: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);
11779: END IF;
11780:

Line 11777: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');

11773: IF PG_DEBUG in ('Y', 'C') THEN
11774: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11775: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11776: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11777: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11778: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);
11779: END IF;
11780:
11781: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET (

Line 11778: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);

11774: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
11775: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
11776: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11777: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
11778: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||sysdate);
11779: END IF;
11780:
11781: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET (
11782: p_atp_record.manufacturing_cal_code,

Line 11795: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_lt_due_date);

11791: -- the output of ATP_Check will anyway be validated on OSC.
11792: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_lt_due_date, MSC_ATP_PVT.G_PTF_DATE);
11793:
11794: IF PG_DEBUG in ('Y', 'C') THEN
11795: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_lt_due_date);
11796: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting PTF for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11797: END IF;
11798:
11799: l_lt_due_date := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(

Line 11796: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting PTF for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

11792: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_lt_due_date, MSC_ATP_PVT.G_PTF_DATE);
11793:
11794: IF PG_DEBUG in ('Y', 'C') THEN
11795: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding pre PLT using OMC: '||l_lt_due_date);
11796: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting PTF for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
11797: END IF;
11798:
11799: l_lt_due_date := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(
11800: l_lt_due_date, l_atp_rec.shipping_cal_code, +1,

Line 11805: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');

11801: l_atp_rec.intransit_cal_code, nvl(l_atp_rec.delivery_lead_time, 0), +1,
11802: l_atp_rec.receiving_cal_code, +1, p_atp_record.instance_id);
11803:
11804: IF PG_DEBUG in ('Y', 'C') THEN
11805: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');
11806: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_lt_due_date);
11807: END IF;
11808:
11809: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET (

Line 11806: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_lt_due_date);

11802: l_atp_rec.receiving_cal_code, +1, p_atp_record.instance_id);
11803:
11804: IF PG_DEBUG in ('Y', 'C') THEN
11805: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC, adding intransit LT using VIC and ');
11806: msc_sch_wb.atp_debug('ATP_Check: ' || ' validating on ORC: '||l_lt_due_date);
11807: END IF;
11808:
11809: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET (
11810: p_atp_record.manufacturing_cal_code, -- using OMC destination

Line 11816: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);

11812: l_lt_due_date,
11813: l_post_pro_lt, 1);
11814:
11815: IF PG_DEBUG in ('Y', 'C') THEN
11816: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);
11817: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11818: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11819: END IF;
11820: /* ship_rec_cal end */

Line 11817: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');

11813: l_post_pro_lt, 1);
11814:
11815: IF PG_DEBUG in ('Y', 'C') THEN
11816: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);
11817: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11818: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11819: END IF;
11820: /* ship_rec_cal end */
11821:

Line 11818: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');

11814:
11815: IF PG_DEBUG in ('Y', 'C') THEN
11816: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);
11817: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
11818: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11819: END IF;
11820: /* ship_rec_cal end */
11821:
11822: IF PG_DEBUG in ('Y', 'C') THEN

Line 11823: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);

11819: END IF;
11820: /* ship_rec_cal end */
11821:
11822: IF PG_DEBUG in ('Y', 'C') THEN
11823: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
11824: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);
11825: END IF;
11826:
11827:

Line 11824: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);

11820: /* ship_rec_cal end */
11821:
11822: IF PG_DEBUG in ('Y', 'C') THEN
11823: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
11824: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);
11825: END IF;
11826:
11827:
11828: -- Bug 3525582 - Constraint message should be added only if constraint actually exists

Line 11871: msc_sch_wb.atp_debug('ATP_Check: ' || 'last_cap_date: '||l_atp_rec.last_cap_date);

11867: AND s.supplier_id = l_sources.supplier_id(j)
11868: AND NVL(s.supplier_site_id, -1) = NVL(l_sources.supplier_site_id(j), -1);
11869:
11870: IF PG_DEBUG in ('Y', 'C') THEN
11871: msc_sch_wb.atp_debug('ATP_Check: ' || 'last_cap_date: '||l_atp_rec.last_cap_date);
11872: END IF;
11873: /* Enforce Pur LT - changes end */
11874:
11875:

Line 11884: msc_sch_wb.atp_debug('ATP_Check: ' || 'enforce_pur_lead_time: ' || G_PLAN_INFO_REC.enforce_pur_lead_time);

11880: l_requested_ship_date,
11881: -1 * l_post_pro_lt, -1);
11882:
11883: IF PG_DEBUG in ('Y', 'C') THEN
11884: msc_sch_wb.atp_debug('ATP_Check: ' || 'enforce_pur_lead_time: ' || G_PLAN_INFO_REC.enforce_pur_lead_time);
11885: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_start_date);
11887: END IF;
11888:

Line 11885: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');

11881: -1 * l_post_pro_lt, -1);
11882:
11883: IF PG_DEBUG in ('Y', 'C') THEN
11884: msc_sch_wb.atp_debug('ATP_Check: ' || 'enforce_pur_lead_time: ' || G_PLAN_INFO_REC.enforce_pur_lead_time);
11885: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_start_date);
11887: END IF;
11888:
11889: /* Enforce Pur LT - check if date is past due. dock date can be past due only if capacity is not defined. */

Line 11886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_start_date);

11882:
11883: IF PG_DEBUG in ('Y', 'C') THEN
11884: msc_sch_wb.atp_debug('ATP_Check: ' || 'enforce_pur_lead_time: ' || G_PLAN_INFO_REC.enforce_pur_lead_time);
11885: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
11886: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PPLT using OMC: '||l_start_date);
11887: END IF;
11888:
11889: /* Enforce Pur LT - check if date is past due. dock date can be past due only if capacity is not defined. */
11890: IF l_start_date < l_trunc_sysdate AND G_PLAN_INFO_REC.enforce_pur_lead_time = 2

Line 11895: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11891: AND l_atp_rec.last_cap_date IS NULL THEN
11892: l_trunc_started := 1;
11893: l_start_date := l_trunc_sysdate;
11894: IF PG_DEBUG in ('Y', 'C') THEN
11895: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11896: END IF;
11897: END IF;
11898:
11899: /* Enforce Pur LT - No need to calculate dates if trunc has started */

Line 11907: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_start_date);

11903: l_atp_rec.receiving_cal_code,
11904: p_atp_record.instance_id,
11905: l_start_date);
11906: IF PG_DEBUG in ('Y', 'C') THEN
11907: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_start_date);
11908: END IF;
11909: /* Enforce Pur LT - check if date is past due. dock date can be past due only
11910: if capacity is not defined. */
11911: IF l_start_date < l_trunc_sysdate AND G_PLAN_INFO_REC.enforce_pur_lead_time = 2

Line 11916: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

11912: AND l_atp_rec.last_cap_date IS NULL THEN
11913: l_trunc_started := 1;
11914: l_start_date := l_trunc_sysdate;
11915: IF PG_DEBUG in ('Y', 'C') THEN
11916: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
11917: END IF;
11918: END IF;
11919: END IF;
11920:

Line 11925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Dock date : '||l_new_dock_date);

11921: /* populating new_dock_date */
11922: l_new_dock_date := l_start_date;
11923:
11924: IF PG_DEBUG in ('Y', 'C') THEN
11925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Dock date : '||l_new_dock_date);
11926: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11927: END IF;
11928: /* ship_rec_cal changes end */
11929:

Line 11926: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');

11922: l_new_dock_date := l_start_date;
11923:
11924: IF PG_DEBUG in ('Y', 'C') THEN
11925: msc_sch_wb.atp_debug('ATP_Check: ' || 'Dock date : '||l_new_dock_date);
11926: msc_sch_wb.atp_debug('ATP_Check: ' || ' ');
11927: END IF;
11928: /* ship_rec_cal changes end */
11929:
11930: --diag_atp: we calculate the supplier lead time here.

Line 11941: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Process_lead_time = '|| l_process_lt);

11937:
11938: l_process_lt := MSC_ATP_PVT.G_ITEM_INFO_REC.processing_lt;
11939: l_pre_pro_lt := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
11940: IF PG_DEBUG in ('Y', 'C') THEN
11941: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Process_lead_time = '|| l_process_lt);
11942: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt = ' || l_pre_pro_lt);
11943: END IF;
11944:
11945: IF (l_sources.Supplier_Id(j) <> -99) THEN

Line 11942: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt = ' || l_pre_pro_lt);

11938: l_process_lt := MSC_ATP_PVT.G_ITEM_INFO_REC.processing_lt;
11939: l_pre_pro_lt := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
11940: IF PG_DEBUG in ('Y', 'C') THEN
11941: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Process_lead_time = '|| l_process_lt);
11942: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pre_pro_lt = ' || l_pre_pro_lt);
11943: END IF;
11944:
11945: IF (l_sources.Supplier_Id(j) <> -99) THEN
11946: -- Query changed to include lead_time_date

Line 11967: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);

11963: WHEN others THEN
11964: g_sup_cap_cum_date := null;
11965: END;
11966: IF PG_DEBUG in ('Y', 'C') THEN
11967: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11968: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11969: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11970: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));

Line 11968: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);

11964: g_sup_cap_cum_date := null;
11965: END;
11966: IF PG_DEBUG in ('Y', 'C') THEN
11967: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11968: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11969: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11970: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11972: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));

Line 11969: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);

11965: END;
11966: IF PG_DEBUG in ('Y', 'C') THEN
11967: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11968: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11969: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11970: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11972: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11973:

Line 11970: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);

11966: IF PG_DEBUG in ('Y', 'C') THEN
11967: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11968: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11969: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11970: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11972: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11973:
11974: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '

Line 11971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));

11967: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id = ' || p_plan_id);
11968: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11969: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11970: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11972: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11973:
11974: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '
11975: || l_process_lt);

Line 11972: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));

11968: msc_sch_wb.atp_debug('ATP_Check: ' || 'Instance Id = ' || p_atp_record.instance_id);
11969: msc_sch_wb.atp_debug('ATP_Check: ' || 'Organization Id = ' || p_atp_record.organization_id);
11970: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11972: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11973:
11974: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '
11975: || l_process_lt);
11976: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date = '

Line 11974: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '

11970: msc_sch_wb.atp_debug('ATP_Check: ' || 'Item Id = ' || l_inv_item_id);
11971: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Id = ' || l_sources.Supplier_Id(j));
11972: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11973:
11974: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '
11975: || l_process_lt);
11976: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date = '
11977: || g_sup_cap_cum_date);
11978: END IF;

Line 11976: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date = '

11972: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Site Id = ' || l_sources.Supplier_site_Id(j));
11973:
11974: msc_sch_wb.atp_debug('ATP_Check: ' || 'Process lead time after ASL query = '
11975: || l_process_lt);
11976: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date = '
11977: || g_sup_cap_cum_date);
11978: END IF;
11979: -- Bug 2803195
11980: IF (g_sup_cap_cum_date IS NOT NULL) THEN

Line 11994: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date Next Day offset = '

11990: l_atp_rec.manufacturing_cal_code,
11991: G_PLAN_INFO_REC.sr_instance_id,
11992: g_sup_cap_cum_date + 1);
11993: IF PG_DEBUG in ('Y', 'C') THEN
11994: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Lead Time Date Next Day offset = '
11995: || g_sup_cap_cum_date);
11996: END IF;
11997: END IF;
11998: -- End Bug 2803195

Line 12008: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);

12004: -- Only the processing lead time will be passed back into ATP_Check
12005: l_atp_rec.atp_lead_time := l_process_lt;
12006: -- End Supplier Capacity and Lead Time changes
12007: IF PG_DEBUG in ('Y', 'C') THEN
12008: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
12009: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
12010: END IF;
12011:
12012: -- Bug 3782472 - calculate ptf date for lower level

Line 12009: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);

12005: l_atp_rec.atp_lead_time := l_process_lt;
12006: -- End Supplier Capacity and Lead Time changes
12007: IF PG_DEBUG in ('Y', 'C') THEN
12008: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
12009: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
12010: END IF;
12011:
12012: -- Bug 3782472 - calculate ptf date for lower level
12013: l_ptf_date_for_child := MSC_CALENDAR.DATE_OFFSET (

Line 12025: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');

12021: /* ship_rec_cal changes begin */
12022: -- intransit lead time offset in case of capacity to ship
12023: IF l_sources.sup_cap_type(j) = 1 THEN
12024: IF PG_DEBUG in ('Y', 'C') THEN
12025: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
12026: END IF;
12027:
12028: -- Bug 3782472 - calculate ptf date for lower level
12029: l_ptf_date_for_child := MSC_CALENDAR.THREE_STEP_CAL_OFFSET_DATE(

Line 12044: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_supplier_start_date);

12040: l_atp_rec.instance_id,
12041: l_new_dock_date,
12042: (-1 * l_atp_rec.delivery_lead_time), -1);
12043: IF PG_DEBUG in ('Y', 'C') THEN
12044: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_supplier_start_date);
12045: END IF;
12046: /* Enforce Pur LT - check if date is past due. for capacity to ship cases ship date
12047: can be past due only if capacity is not defined. */
12048: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_atp_rec.last_cap_date IS NULL

Line 12053: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

12049: AND l_supplier_start_date < l_trunc_sysdate THEN
12050: l_supplier_start_date := l_trunc_sysdate;
12051: l_trunc_started := 1;
12052: IF PG_DEBUG in ('Y', 'C') THEN
12053: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
12054: END IF;
12055: END IF;
12056: END IF;
12057:

Line 12066: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC : '||l_supplier_start_date);

12062: l_atp_rec.shipping_cal_code,
12063: l_atp_rec.instance_id,
12064: l_supplier_start_date);
12065: IF PG_DEBUG in ('Y', 'C') THEN
12066: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC : '||l_supplier_start_date);
12067: END IF;
12068: /* Enforce Pur LT - check if date is past due. for capacity to ship cases ship date
12069: can be past due only if capacity is not defined. */
12070: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_atp_rec.last_cap_date IS NULL

Line 12075: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

12071: AND l_supplier_start_date < l_trunc_sysdate THEN
12072: l_supplier_start_date := l_trunc_sysdate;
12073: l_trunc_started := 1;
12074: IF PG_DEBUG in ('Y', 'C') THEN
12075: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
12076: END IF;
12077: END IF;
12078: END IF;
12079:

Line 12086: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);

12082:
12083: l_atp_rec.requested_ship_date := l_new_ship_date;
12084:
12085: IF PG_DEBUG in ('Y', 'C') THEN
12086: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);
12087: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');
12088: END IF;
12089: ELSE
12090: l_supplier_start_date := l_new_dock_date;

Line 12087: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');

12083: l_atp_rec.requested_ship_date := l_new_ship_date;
12084:
12085: IF PG_DEBUG in ('Y', 'C') THEN
12086: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);
12087: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');
12088: END IF;
12089: ELSE
12090: l_supplier_start_date := l_new_dock_date;
12091: -- supplier intransit LT

Line 12102: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');

12098: p_atp_record.instance_id,
12099: l_ptf_date_for_child);
12100:
12101: IF PG_DEBUG in ('Y', 'C') THEN
12102: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');
12103: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Start Date : '||l_supplier_start_date);
12104: END IF;
12105:
12106: /* populating new_ship_date in Capacity to Dock scenarios also */

Line 12103: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Start Date : '||l_supplier_start_date);

12099: l_ptf_date_for_child);
12100:
12101: IF PG_DEBUG in ('Y', 'C') THEN
12102: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');
12103: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier Start Date : '||l_supplier_start_date);
12104: END IF;
12105:
12106: /* populating new_ship_date in Capacity to Dock scenarios also */
12107: /* Enforce Pur LT - Check if date needs to be calculated */

Line 12118: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Calculate ship date ---');

12114: l_start_date,
12115: (-1 * l_atp_rec.delivery_lead_time), -1);
12116:
12117: IF PG_DEBUG in ('Y', 'C') THEN
12118: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Calculate ship date ---');
12119: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_new_ship_date);
12120: END IF;
12121:
12122: /* Enforce Pur LT - check if date is past due.*/

Line 12119: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_new_ship_date);

12115: (-1 * l_atp_rec.delivery_lead_time), -1);
12116:
12117: IF PG_DEBUG in ('Y', 'C') THEN
12118: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Calculate ship date ---');
12119: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_new_ship_date);
12120: END IF;
12121:
12122: /* Enforce Pur LT - check if date is past due.*/
12123: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_new_ship_date < l_trunc_sysdate THEN

Line 12129: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

12125: -- Not setting the flag l_trunc_started as dock date may still be more than sysdate
12126: -- and in capacity to dock cases further calculation of dates (start date, order date)
12127: -- is done from dock date.
12128: IF PG_DEBUG in ('Y', 'C') THEN
12129: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
12130: END IF;
12131: ELSE
12132: l_new_ship_date := MSC_CALENDAR.PREV_WORK_DAY(
12133: l_atp_rec.shipping_cal_code,

Line 12138: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC :'||l_new_ship_date);

12134: l_atp_rec.instance_id,
12135: l_new_ship_date);
12136:
12137: IF PG_DEBUG in ('Y', 'C') THEN
12138: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC :'||l_new_ship_date);
12139: END IF;
12140:
12141: /* Enforce Pur LT - check if date is past due.*/
12142: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_new_ship_date < l_trunc_sysdate THEN

Line 12145: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

12141: /* Enforce Pur LT - check if date is past due.*/
12142: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_new_ship_date < l_trunc_sysdate THEN
12143: l_new_ship_date := l_trunc_sysdate;
12144: IF PG_DEBUG in ('Y', 'C') THEN
12145: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
12146: END IF;
12147: END IF;
12148: END IF;
12149:

Line 12153: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);

12149:
12150: END IF;
12151:
12152: IF PG_DEBUG in ('Y', 'C') THEN
12153: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);
12154: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');
12155: END IF;
12156:
12157: END IF;

Line 12154: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');

12150: END IF;
12151:
12152: IF PG_DEBUG in ('Y', 'C') THEN
12153: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship date :'||l_new_ship_date);
12154: msc_sch_wb.atp_debug('ATP_Check: ' || '---------------------------');
12155: END IF;
12156:
12157: END IF;
12158:

Line 12169: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after offsetting processing LT on SMC :'||l_supplier_start_date);

12165: G_PLAN_INFO_REC.sr_instance_id,
12166: l_supplier_start_date,
12167: (-1 * l_process_lt), -1);
12168: IF PG_DEBUG in ('Y', 'C') THEN
12169: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after offsetting processing LT on SMC :'||l_supplier_start_date);
12170: END IF;
12171: /* Enforce Pur LT - check if date is past due.*/
12172: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_supplier_start_date < l_trunc_sysdate THEN
12173: l_supplier_start_date := l_trunc_sysdate;

Line 12176: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

12172: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_supplier_start_date < l_trunc_sysdate THEN
12173: l_supplier_start_date := l_trunc_sysdate;
12174: l_trunc_started := 1;
12175: IF PG_DEBUG in ('Y', 'C') THEN
12176: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
12177: END IF;
12178: END IF;
12179: END IF;
12180:

Line 12191: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_supplier_start_date);

12187: l_atp_rec.instance_id,
12188: l_supplier_start_date,
12189: (-1 * l_pre_pro_lt), -1);
12190: IF PG_DEBUG in ('Y', 'C') THEN
12191: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_supplier_start_date);
12192: END IF;
12193: /* Enforce Pur LT - check if date is past due.*/
12194: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_supplier_start_date < l_trunc_sysdate THEN
12195: l_supplier_start_date := l_trunc_sysdate;

Line 12198: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);

12194: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_supplier_start_date < l_trunc_sysdate THEN
12195: l_supplier_start_date := l_trunc_sysdate;
12196: l_trunc_started := 1;
12197: IF PG_DEBUG in ('Y', 'C') THEN
12198: msc_sch_wb.atp_debug('ATP_Check: ' || 'Past due date truncated to: '||l_trunc_sysdate);
12199: END IF;
12200: END IF;
12201: END IF;
12202:

Line 12209: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');

12205: -- Bug 3782472 - set ptf date for lower level
12206: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child, l_ptf_date);
12207:
12208: IF PG_DEBUG in ('Y', 'C') THEN
12209: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
12210: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12211: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
12212: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
12213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

Line 12210: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

12206: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date_for_child, l_ptf_date);
12207:
12208: IF PG_DEBUG in ('Y', 'C') THEN
12209: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
12210: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12211: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
12212: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
12213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
12214: END IF;

Line 12211: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);

12207:
12208: IF PG_DEBUG in ('Y', 'C') THEN
12209: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
12210: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12211: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
12212: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
12213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
12214: END IF;
12215: /* ship_rec_cal changes end */

Line 12212: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);

12208: IF PG_DEBUG in ('Y', 'C') THEN
12209: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
12210: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12211: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
12212: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
12213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
12214: END IF;
12215: /* ship_rec_cal changes end */
12216:

Line 12213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

12209: msc_sch_wb.atp_debug('ATP_Check: ' || '____________________End Offset____________________');
12210: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12211: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_supplier_start_date := ' || l_supplier_start_date);
12212: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child := ' || l_ptf_date_for_child);
12213: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
12214: END IF;
12215: /* ship_rec_cal changes end */
12216:
12217: IF (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 or p_search = FORWARD_SCHEDULING) and

Line 12224: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');

12220: -- l_supplier_start_date < sysdate) THEN -- extraneous call to sysdate
12221:
12222: /* ship_rec_cal changes begin */
12223: IF PG_DEBUG in ('Y', 'C') THEN
12224: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');
12225: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);
12226: END IF;
12227:
12228: IF l_start_date < l_ptf_date and l_post_pro_lt > 0 THEN

Line 12225: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);

12221:
12222: /* ship_rec_cal changes begin */
12223: IF PG_DEBUG in ('Y', 'C') THEN
12224: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc PTF Due Date___________________');
12225: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date: '||l_ptf_date);
12226: END IF;
12227:
12228: IF l_start_date < l_ptf_date and l_post_pro_lt > 0 THEN
12229: l_ptf_due_date := MSC_CALENDAR.DATE_OFFSET(

Line 12236: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);

12232: l_ptf_date,
12233: l_post_pro_lt, 1);
12234:
12235: IF PG_DEBUG in ('Y', 'C') THEN
12236: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ptf_due_date);
12237: END IF;
12238: ELSE
12239: --- bug 2771784: earliest due date should be PTF date. Not start date
12240: --l_ptf_due_date := l_start_date;

Line 12260: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_supplier_request_date);

12256: l_atp_rec.instance_id,
12257: l_supplier_request_date);
12258:
12259: IF PG_DEBUG in ('Y', 'C') THEN
12260: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC : '||l_supplier_request_date);
12261: END IF;
12262:
12263: IF l_sources.sup_cap_type(j) = 1 THEN
12264: -- capacity to be checked on ship date

Line 12271: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_supplier_request_date);

12267: l_atp_rec.instance_id,
12268: l_supplier_request_date,
12269: (-1 * l_atp_rec.delivery_lead_time), -1);
12270: IF PG_DEBUG in ('Y', 'C') THEN
12271: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting intransit LT using VIC : '||l_supplier_request_date);
12272: END IF;
12273: l_supplier_request_date := MSC_CALENDAR.PREV_WORK_DAY(
12274: l_atp_rec.shipping_cal_code,
12275: l_atp_rec.instance_id,

Line 12284: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');

12280: END IF;
12281: */
12282:
12283: IF PG_DEBUG in ('Y', 'C') THEN
12284: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
12285: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);
12286: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);
12287: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
12288: END IF;

Line 12285: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);

12281: */
12282:
12283: IF PG_DEBUG in ('Y', 'C') THEN
12284: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
12285: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);
12286: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);
12287: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
12288: END IF;
12289: -- IF l_supplier_start_date < l_sysdate and (l_post_pro_lt + l_net_processing_lt) >0 THEN

Line 12286: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);

12282:
12283: IF PG_DEBUG in ('Y', 'C') THEN
12284: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
12285: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);
12286: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);
12287: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
12288: END IF;
12289: -- IF l_supplier_start_date < l_sysdate and (l_post_pro_lt + l_net_processing_lt) >0 THEN
12290: IF l_supplier_start_date < l_trunc_sysdate

Line 12287: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');

12283: IF PG_DEBUG in ('Y', 'C') THEN
12284: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc PTF Due Date___________________');
12285: msc_sch_wb.atp_debug('ATP_Check: ' || ' l_ptf_due_date := ' || l_ptf_due_date);
12286: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate: '||l_trunc_sysdate);
12287: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Calc LT Due Date___________________');
12288: END IF;
12289: -- IF l_supplier_start_date < l_sysdate and (l_post_pro_lt + l_net_processing_lt) >0 THEN
12290: IF l_supplier_start_date < l_trunc_sysdate
12291: and ((l_post_pro_lt + l_net_processing_lt)>0

Line 12312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding Pre PLT using OMC: '||l_lt_due_date);

12308: --Bug 3821358
12309: l_store_start_date := l_lt_due_date;
12310:
12311: IF PG_DEBUG in ('Y', 'C') THEN
12312: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding Pre PLT using OMC: '||l_lt_due_date);
12313: END IF;
12314:
12315: IF l_process_lt > 0 THEN
12316: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET(

Line 12322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PLT using SMC: '||l_lt_due_date);

12318: G_PLAN_INFO_REC.sr_instance_id,
12319: l_lt_due_date,
12320: l_process_lt, 1);
12321: IF PG_DEBUG in ('Y', 'C') THEN
12322: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PLT using SMC: '||l_lt_due_date);
12323: END IF;
12324: END IF;
12325:
12326: -- intransit lead time offset in case of capacity to ship

Line 12343: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');

12339: */
12340: l_ptf_date_for_child := l_lt_due_date; -- Bug 3828494 (done with 3828469)
12341:
12342: IF PG_DEBUG in ('Y', 'C') THEN
12343: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_lt_due_date);
12345: END IF;
12346:
12347: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET(

Line 12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_lt_due_date);

12340: l_ptf_date_for_child := l_lt_due_date; -- Bug 3828494 (done with 3828469)
12341:
12342: IF PG_DEBUG in ('Y', 'C') THEN
12343: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
12344: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_lt_due_date);
12345: END IF;
12346:
12347: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET(
12348: l_atp_rec.intransit_cal_code,

Line 12362: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_lt_due_date);

12358: --Bug 3821358
12359: l_store_dock_date := l_lt_due_date ;
12360:
12361: IF PG_DEBUG in ('Y', 'C') THEN
12362: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_lt_due_date);
12363: END IF;
12364:
12365: ELSE
12366: IF PG_DEBUG in ('Y', 'C') THEN

Line 12367: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');

12363: END IF;
12364:
12365: ELSE
12366: IF PG_DEBUG in ('Y', 'C') THEN
12367: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');
12368: END IF;
12369:
12370: --Bug 3821358
12371: l_lt_due_date := MSC_CALENDAR.NEXT_WORK_DAY(

Line 12405: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_lt_due_date);

12401: l_ptf_date_for_child := l_lt_due_date; -- Bug 3828494 (done with 3828469)
12402: END IF;
12403:
12404: IF PG_DEBUG in ('Y', 'C') THEN
12405: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_lt_due_date);
12406: END IF;
12407:
12408: l_lt_due_date := MSC_CALENDAR.DATE_OFFSET(
12409: p_atp_record.manufacturing_cal_code,

Line 12417: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);

12413:
12414: l_store_due_date := l_lt_due_date;
12415:
12416: IF PG_DEBUG in ('Y', 'C') THEN
12417: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_lt_due_date);
12418: END IF;
12419:
12420: --Bug 3821358
12421: l_store_g_ptf_date := l_ptf_date_for_child;

Line 12444: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');

12440: -- PTF for lower level = greatest(sysdate+prePLT, current org's PTF, parent org's PTF)
12441: -- after validating on all applicable calendars.
12442:
12443: IF PG_DEBUG in ('Y', 'C') THEN
12444: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
12445: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
12446: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
12447: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
12448: END IF;

Line 12445: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);

12441: -- after validating on all applicable calendars.
12442:
12443: IF PG_DEBUG in ('Y', 'C') THEN
12444: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
12445: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
12446: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
12447: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
12448: END IF;
12449: /* ship_rec_cal changes end */

Line 12446: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);

12442:
12443: IF PG_DEBUG in ('Y', 'C') THEN
12444: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
12445: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
12446: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
12447: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
12448: END IF;
12449: /* ship_rec_cal changes end */
12450:

Line 12447: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);

12443: IF PG_DEBUG in ('Y', 'C') THEN
12444: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Calc LT Due Date___________________');
12445: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
12446: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date_for_child: '||l_ptf_date_for_child);
12447: msc_sch_wb.atp_debug('ATP_Check: ' || 'Setting ptf_date for lower level: '||MSC_ATP_PVT.G_PTF_DATE);
12448: END IF;
12449: /* ship_rec_cal changes end */
12450:
12451: -- Bug 3525582 - Constraint message should be added only if constraint actually exists

Line 12475: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

12471:
12472: END IF;
12473:
12474: IF PG_DEBUG in ('Y', 'C') THEN
12475: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12476: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || l_atp_rec.requested_ship_date);
12477: msc_sch_wb.atp_debug('ATP_Check: ' || 'arrival_date := ' || l_atp_rec.requested_arrival_date);
12478: END IF;
12479:

Line 12476: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || l_atp_rec.requested_ship_date);

12472: END IF;
12473:
12474: IF PG_DEBUG in ('Y', 'C') THEN
12475: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12476: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || l_atp_rec.requested_ship_date);
12477: msc_sch_wb.atp_debug('ATP_Check: ' || 'arrival_date := ' || l_atp_rec.requested_arrival_date);
12478: END IF;
12479:
12480: l_atp_rec.latest_acceptable_date := null;

Line 12477: msc_sch_wb.atp_debug('ATP_Check: ' || 'arrival_date := ' || l_atp_rec.requested_arrival_date);

12473:
12474: IF PG_DEBUG in ('Y', 'C') THEN
12475: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12476: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || l_atp_rec.requested_ship_date);
12477: msc_sch_wb.atp_debug('ATP_Check: ' || 'arrival_date := ' || l_atp_rec.requested_arrival_date);
12478: END IF;
12479:
12480: l_atp_rec.latest_acceptable_date := null;
12481: l_atp_rec.freight_carrier := null;

Line 12508: msc_sch_wb.atp_debug('ATP_Check: ' || 'ORDER_NUMBER is : ' || l_atp_rec.order_number);

12504:
12505: l_atp_rec.order_number := p_atp_record.order_number;
12506:
12507: IF PG_DEBUG in ('Y', 'C') THEN
12508: msc_sch_wb.atp_debug('ATP_Check: ' || 'ORDER_NUMBER is : ' || l_atp_rec.order_number);
12509: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Source Type is : ' || l_atp_rec.demand_source_type);--cmro
12510: msc_sch_wb.atp_debug('ATP_Check: ' || 'net_demand is : ' || l_net_demand);
12511: END IF;
12512: --- End Enhance CTO Phase 1 Req #16 and #17

Line 12509: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Source Type is : ' || l_atp_rec.demand_source_type);--cmro

12505: l_atp_rec.order_number := p_atp_record.order_number;
12506:
12507: IF PG_DEBUG in ('Y', 'C') THEN
12508: msc_sch_wb.atp_debug('ATP_Check: ' || 'ORDER_NUMBER is : ' || l_atp_rec.order_number);
12509: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Source Type is : ' || l_atp_rec.demand_source_type);--cmro
12510: msc_sch_wb.atp_debug('ATP_Check: ' || 'net_demand is : ' || l_net_demand);
12511: END IF;
12512: --- End Enhance CTO Phase 1 Req #16 and #17
12513:

Line 12510: msc_sch_wb.atp_debug('ATP_Check: ' || 'net_demand is : ' || l_net_demand);

12506:
12507: IF PG_DEBUG in ('Y', 'C') THEN
12508: msc_sch_wb.atp_debug('ATP_Check: ' || 'ORDER_NUMBER is : ' || l_atp_rec.order_number);
12509: msc_sch_wb.atp_debug('ATP_Check: ' || 'Demand Source Type is : ' || l_atp_rec.demand_source_type);--cmro
12510: msc_sch_wb.atp_debug('ATP_Check: ' || 'net_demand is : ' || l_net_demand);
12511: END IF;
12512: --- End Enhance CTO Phase 1 Req #16 and #17
12513:
12514:

Line 12523: msc_sch_wb.atp_debug('Set Org id null in Supplier case');

12519: MSC_ATP_PVT.G_SUMMARY_FLAG := l_old_summary_flag;
12520: /* rajjain 02/19/2003 Bug 2788302 Begin
12521: * set org to null for Supplier's case. */
12522: IF NVL(l_atp_rec.supplier_id,-1) <> -1 THEN
12523: msc_sch_wb.atp_debug('Set Org id null in Supplier case');
12524: l_src_org_id := NULL;
12525: ELSE
12526: l_src_org_id := l_atp_rec.organization_id;
12527: END IF;

Line 12578: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Id l_transaction_id: ' || l_transaction_id);

12574: -- Asssign the output to local variables.
12575: l_transaction_id := l_supply_rec.transaction_id;
12576: l_return_status := l_supply_rec.return_status;
12577: IF PG_DEBUG in ('Y', 'C') THEN
12578: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Id l_transaction_id: ' || l_transaction_id);
12579: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Type l_supply_rec.supply_type: '
12580: || l_supply_rec.supply_type);
12581: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);
12582: END IF;

Line 12579: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Type l_supply_rec.supply_type: '

12575: l_transaction_id := l_supply_rec.transaction_id;
12576: l_return_status := l_supply_rec.return_status;
12577: IF PG_DEBUG in ('Y', 'C') THEN
12578: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Id l_transaction_id: ' || l_transaction_id);
12579: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Type l_supply_rec.supply_type: '
12580: || l_supply_rec.supply_type);
12581: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);
12582: END IF;
12583: ELSE -- Create Planned Order otherwise.

Line 12581: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);

12577: IF PG_DEBUG in ('Y', 'C') THEN
12578: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Id l_transaction_id: ' || l_transaction_id);
12579: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supply Type l_supply_rec.supply_type: '
12580: || l_supply_rec.supply_type);
12581: msc_sch_wb.atp_debug('ATP_Check: ' || 'Return Status l_return_status: ' || l_return_status);
12582: END IF;
12583: ELSE -- Create Planned Order otherwise.
12584:
12585: MSC_ATP_DB_UTILS.Add_Planned_Order(

Line 12627: msc_sch_wb.atp_debug('ATP_Check: ' || 'here the the parent_pegging_id inside the buy/transfer :'||

12623:
12624: -- populate insert rec to pegging tree for this supply
12625:
12626: IF PG_DEBUG in ('Y', 'C') THEN
12627: msc_sch_wb.atp_debug('ATP_Check: ' || 'here the the parent_pegging_id inside the buy/transfer :'||
12628: l_pegging_id);
12629: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_pegging_id := ' || l_parent_pegging_id);
12630: END IF;
12631: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;

Line 12629: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_pegging_id := ' || l_parent_pegging_id);

12625:
12626: IF PG_DEBUG in ('Y', 'C') THEN
12627: msc_sch_wb.atp_debug('ATP_Check: ' || 'here the the parent_pegging_id inside the buy/transfer :'||
12628: l_pegging_id);
12629: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_parent_pegging_id := ' || l_parent_pegging_id);
12630: END IF;
12631: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
12632: l_pegging_rec.order_line_id:= MSC_ATP_PVT.G_ORDER_LINE_ID;
12633: l_pegging_rec.parent_pegging_id:= l_parent_pegging_id;

Line 12735: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add PTF date to pegging');

12731: l_pegging_rec.request_item_id := p_atp_record.request_item_id;
12732:
12733: IF l_start_date < l_ptf_date then
12734: IF PG_DEBUG in ('Y', 'C') THEN
12735: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add PTF date to pegging');
12736: END IF;
12737: l_pegging_rec.ptf_date := l_ptf_date;
12738: END IF;
12739:

Line 12794: msc_sch_wb.atp_debug('buy last good pegging: ' || l_pegging_id);

12790: AND l_pegging_rec.constraint_type IS NULL
12791: THEN
12792: l_last_good_pegging_id := l_pegging_id;
12793: IF PG_DEBUG in ('Y', 'C') THEN
12794: msc_sch_wb.atp_debug('buy last good pegging: ' || l_pegging_id);
12795: END IF;
12796: END IF;
12797:
12798: --s_cto_rearch

Line 12829: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HAVE_MAKE_BUY_PARENT ' || MSC_ATP_PVT.G_HAVE_MAKE_BUY_PARENT);

12825: --e_Cto_rearch
12826:
12827: -- dsting diag_atp
12828: IF PG_DEBUG in ('Y', 'C') THEN
12829: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_HAVE_MAKE_BUY_PARENT ' || MSC_ATP_PVT.G_HAVE_MAKE_BUY_PARENT);
12830: END IF;
12831: -- dsting 2819716. we always add planned orders now
12832: -- so we should always add pegging.
12833: /*

Line 12853: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '

12849: MSC_ATP_DB_UTILS.Add_Pegging(l_pegging_rec, l_pegging_id);
12850: -- END IF;
12851: --optional_fw Buy/Transfer PO should be set for top level
12852: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
12853: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
12854: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12855: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12856: ELSIF PG_DEBUG in ('Y', 'C') THEN
12857: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

Line 12855: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

12851: --optional_fw Buy/Transfer PO should be set for top level
12852: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
12853: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
12854: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12855: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12856: ELSIF PG_DEBUG in ('Y', 'C') THEN
12857: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12858: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
12859: END IF;

Line 12857: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

12853: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
12854: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12855: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12856: ELSIF PG_DEBUG in ('Y', 'C') THEN
12857: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12858: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
12859: END IF;
12860: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null
12861: AND (G_FW_CTP_PEGGING_ID.COUNT = 0 --Means top level, for next source value = null

Line 12858: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);

12854: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12855: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12856: ELSIF PG_DEBUG in ('Y', 'C') THEN
12857: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12858: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
12859: END IF;
12860: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null
12861: AND (G_FW_CTP_PEGGING_ID.COUNT = 0 --Means top level, for next source value = null
12862: OR G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT) is null) then

Line 12868: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '

12864: G_FW_CTP_PEGGING_ID.EXTEND;
12865: END IF;
12866: G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT) := l_pegging_id;
12867: IF PG_DEBUG in ('Y', 'C') THEN
12868: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
12869: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12870: END IF;
12871: END IF;
12872: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN

Line 12873: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '

12869: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12870: END IF;
12871: END IF;
12872: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
12873: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
12874: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12875: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12876: ELSIF PG_DEBUG in ('Y', 'C') THEN
12877: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

Line 12875: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

12871: END IF;
12872: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
12873: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
12874: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12875: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12876: ELSIF PG_DEBUG in ('Y', 'C') THEN
12877: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12878: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
12879: END IF;

Line 12877: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

12873: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
12874: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12875: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12876: ELSIF PG_DEBUG in ('Y', 'C') THEN
12877: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12878: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
12879: END IF;
12880: --- now chnage back the summary flag for new plan
12881: MSC_ATP_PVT.G_SUMMARY_FLAG := l_new_summary_flag;

Line 12878: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);

12874: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
12875: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12876: ELSIF PG_DEBUG in ('Y', 'C') THEN
12877: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
12878: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
12879: END IF;
12880: --- now chnage back the summary flag for new plan
12881: MSC_ATP_PVT.G_SUMMARY_FLAG := l_new_summary_flag;
12882: -- 2178544:

Line 12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

12881: MSC_ATP_PVT.G_SUMMARY_FLAG := l_new_summary_flag;
12882: -- 2178544:
12883: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date, MSC_ATP_PVT.G_PTF_DATE);
12884: IF PG_DEBUG in ('Y', 'C') THEN
12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
12886: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
12887: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12888: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');
12889: END IF;

Line 12886: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);

12882: -- 2178544:
12883: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date, MSC_ATP_PVT.G_PTF_DATE);
12884: IF PG_DEBUG in ('Y', 'C') THEN
12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
12886: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
12887: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12888: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');
12889: END IF;
12890:

Line 12887: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

12883: MSC_ATP_PVT.G_PTF_DATE := GREATEST(l_ptf_date, MSC_ATP_PVT.G_PTF_DATE);
12884: IF PG_DEBUG in ('Y', 'C') THEN
12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
12886: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
12887: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12888: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');
12889: END IF;
12890:
12891: ---subst: Since we go down so we do not remain in top org. So we set the flags again

Line 12888: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');

12884: IF PG_DEBUG in ('Y', 'C') THEN
12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
12886: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_date := ' || l_ptf_date);
12887: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
12888: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside buy/transfer');
12889: END IF;
12890:
12891: ---subst: Since we go down so we do not remain in top org. So we set the flags again
12892: l_atp_rec.original_item_flag := p_atp_record.original_item_flag;

Line 12917: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date check failed in case of transfer');

12913: -- dsting 2754446
12914: l_prim_uom_req_date_qty := 0;
12915:
12916: IF PG_DEBUG in ('Y', 'C') THEN
12917: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF Date check failed in case of transfer');
12918: END IF;
12919: ELSE
12920: l_atp_rec.children_type := NO_MAKE_BUY_CHILDREN;
12921: IF PG_DEBUG in ('Y', 'C') THEN

Line 12922: msc_sch_wb.atp_debug('NO_MAKE_BUY_CHILDREN: pre atp_check');

12918: END IF;
12919: ELSE
12920: l_atp_rec.children_type := NO_MAKE_BUY_CHILDREN;
12921: IF PG_DEBUG in ('Y', 'C') THEN
12922: msc_sch_wb.atp_debug('NO_MAKE_BUY_CHILDREN: pre atp_check');
12923: END IF;
12924:
12925: l_alloc_atp := MSC_ATP_PVT.G_ALLOCATED_ATP; --ALLOC ATP CHANGES, 12973673
12926:

Line 12950: msc_sch_wb.atp_debug('Error in ATP_CHECK');

12946: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
12947:
12948: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_SRC_MISMATCH THEN
12949: IF PG_DEBUG in ('Y', 'C') THEN
12950: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12951: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12952: END IF;
12953: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
12954: -- dsting 2764213

Line 12951: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');

12947:
12948: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_SRC_MISMATCH THEN
12949: IF PG_DEBUG in ('Y', 'C') THEN
12950: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12951: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12952: END IF;
12953: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
12954: -- dsting 2764213
12955: ELSIF l_return_status = MSC_ATP_PVT.G_NO_PLAN_FOUND THEN

Line 12957: msc_sch_wb.atp_debug('Error in ATP_CHECK');

12953: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
12954: -- dsting 2764213
12955: ELSIF l_return_status = MSC_ATP_PVT.G_NO_PLAN_FOUND THEN
12956: IF PG_DEBUG in ('Y', 'C') THEN
12957: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12958: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12959: END IF;
12960: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
12961: -- krajan 2752705

Line 12958: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');

12954: -- dsting 2764213
12955: ELSIF l_return_status = MSC_ATP_PVT.G_NO_PLAN_FOUND THEN
12956: IF PG_DEBUG in ('Y', 'C') THEN
12957: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12958: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12959: END IF;
12960: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
12961: -- krajan 2752705
12962: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_UNCOLL_ITEM THEN

Line 12964: msc_sch_wb.atp_debug('Error in ATP_CHECK');

12960: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
12961: -- krajan 2752705
12962: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_UNCOLL_ITEM THEN
12963: IF PG_DEBUG in ('Y', 'C') THEN
12964: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12966: END IF;
12967: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
12968: END IF;

Line 12965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');

12961: -- krajan 2752705
12962: ELSIF l_return_status = MSC_ATP_PVT.G_ATO_UNCOLL_ITEM THEN
12963: IF PG_DEBUG in ('Y', 'C') THEN
12964: msc_sch_wb.atp_debug('Error in ATP_CHECK');
12965: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error in lower level component check');
12966: END IF;
12967: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
12968: END IF;
12969:

Line 12992: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);

12988: l_prim_uom_req_date_qty := trunc(l_prim_uom_req_date_qty, 6); --5598066
12989: END IF;
12990:
12991: IF PG_DEBUG IN ('Y','C') THEN
12992: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12993: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12994: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12995: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12996: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);

Line 12993: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);

12989: END IF;
12990:
12991: IF PG_DEBUG IN ('Y','C') THEN
12992: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12993: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12994: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12995: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12996: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);
12997: END IF;

Line 12994: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);

12990:
12991: IF PG_DEBUG IN ('Y','C') THEN
12992: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12993: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12994: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12995: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12996: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);
12997: END IF;
12998:

Line 12995: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);

12991: IF PG_DEBUG IN ('Y','C') THEN
12992: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12993: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12994: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12995: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12996: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);
12997: END IF;
12998:
12999: G_HAVE_MAKE_BUY_PARENT := l_have_make_buy_parent;

Line 12996: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);

12992: msc_sch_wb.atp_debug('prim_uom_avail_qty: ' || l_prim_uom_avail_qty);
12993: msc_sch_wb.atp_debug('prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
12994: msc_sch_wb.atp_debug('l_conversion_rate: ' || l_conversion_rate);
12995: msc_sch_wb.atp_debug('resetting make_buy_parent : ' || G_HAVE_MAKE_BUY_PARENT || ' -> ' || l_have_make_buy_parent);
12996: msc_sch_wb.atp_debug('req date qty := ' || l_atp_rec.requested_date_quantity);
12997: END IF;
12998:
12999: G_HAVE_MAKE_BUY_PARENT := l_have_make_buy_parent;
13000: IF (l_atp_rec.children_type = MAKE_BUY_CHILDREN ) THEN

Line 13017: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here, p_search ='||p_search);

13013: greatest(nvl(l_prim_uom_req_date_qty, 0), 0);
13014: -- greatest(nvl(l_atp_rec.requested_date_quantity,0), 0);
13015: END IF;
13016: IF PG_DEBUG in ('Y', 'C') THEN
13017: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here, p_search ='||p_search);
13018: msc_sch_wb.atp_debug('ATP_Check: l_net_demand := ' || l_net_demand);
13019: END IF;
13020: IF (p_search = FORWARD_SCHEDULING) THEN
13021:

Line 13018: msc_sch_wb.atp_debug('ATP_Check: l_net_demand := ' || l_net_demand);

13014: -- greatest(nvl(l_atp_rec.requested_date_quantity,0), 0);
13015: END IF;
13016: IF PG_DEBUG in ('Y', 'C') THEN
13017: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here, p_search ='||p_search);
13018: msc_sch_wb.atp_debug('ATP_Check: l_net_demand := ' || l_net_demand);
13019: END IF;
13020: IF (p_search = FORWARD_SCHEDULING) THEN
13021:
13022: -- bug 1303196, ship date need to consider

Line 13029: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward Scheduling ');

13025: IF l_sources.source_type(j) = TRANSFER THEN
13026:
13027: -- 2463556 : krajan : Added comment
13028: IF PG_DEBUG in ('Y', 'C') THEN
13029: msc_sch_wb.atp_debug('ATP_Check: ' || 'Forward Scheduling ');
13030: END IF;
13031:
13032: /* ship_rec_cal changes begin */
13033: -- BEGIN -- removed exception handling from here so that it can be handled in the end

Line 13047: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);

13043: l_atp_rec.ship_date);
13044: l_new_ship_date := l_ship_date;
13045:
13046: IF PG_DEBUG in ('Y', 'C') THEN
13047: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
13048: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
13049: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC: '||l_ship_date);
13050: END IF;
13051:

Line 13048: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');

13044: l_new_ship_date := l_ship_date;
13045:
13046: IF PG_DEBUG in ('Y', 'C') THEN
13047: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
13048: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
13049: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC: '||l_ship_date);
13050: END IF;
13051:
13052: l_ship_date := MSC_CALENDAR.DATE_OFFSET(

Line 13049: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC: '||l_ship_date);

13045:
13046: IF PG_DEBUG in ('Y', 'C') THEN
13047: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
13048: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
13049: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on OSC: '||l_ship_date);
13050: END IF;
13051:
13052: l_ship_date := MSC_CALENDAR.DATE_OFFSET(
13053: l_atp_rec.intransit_cal_code,

Line 13060: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_ship_date);

13056: nvl(l_atp_rec.delivery_lead_time, 0),
13057: +1);
13058:
13059: IF PG_DEBUG in ('Y', 'C') THEN
13060: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_ship_date);
13061: END IF;
13062:
13063: l_ship_date := MSC_CALENDAR.NEXT_WORK_DAY(
13064: l_atp_rec.receiving_cal_code,

Line 13070: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_ship_date);

13066: l_ship_date);
13067: l_new_dock_date := l_ship_date;
13068:
13069: IF PG_DEBUG in ('Y', 'C') THEN
13070: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_ship_date);
13071: END IF;
13072:
13073: -- Bug 3241766 : Back calculate start date and order date
13074: l_sugg_start_date := l_new_ship_date;

Line 13085: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);

13081: -1 * l_pre_pro_lt, -1);
13082: --bug3821358 Moving Order date to non past due non working date on a day closer to the first working day
13083: IF l_order_date < l_trunc_sysdate THEN
13084: IF PG_DEBUG in ('Y', 'C') THEN
13085: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);
13086: --bug 4188385 removed this debug was giving error during concatenation
13087: --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.
13088: END IF;
13089: l_order_date := l_sys_next_date - 1;

Line 13087: --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.

13083: IF l_order_date < l_trunc_sysdate THEN
13084: IF PG_DEBUG in ('Y', 'C') THEN
13085: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);
13086: --bug 4188385 removed this debug was giving error during concatenation
13087: --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.
13088: END IF;
13089: l_order_date := l_sys_next_date - 1;
13090: --bug 4188385 printed the order date
13091: IF PG_DEBUG in ('Y', 'C') THEN

Line 13092: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);

13088: END IF;
13089: l_order_date := l_sys_next_date - 1;
13090: --bug 4188385 printed the order date
13091: IF PG_DEBUG in ('Y', 'C') THEN
13092: msc_sch_wb.atp_debug('ATP_Check: ' || 'Back Calculated Order date is less then sysdate: '||l_order_date);
13093: END IF;
13094: END IF;
13095: --bug3821358
13096: IF PG_DEBUG in ('Y', 'C') THEN

Line 13097: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);

13093: END IF;
13094: END IF;
13095: --bug3821358
13096: IF PG_DEBUG in ('Y', 'C') THEN
13097: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);
13098: END IF;
13099:
13100: l_ship_date := MSC_CALENDAR.DATE_OFFSET (
13101: p_atp_record.manufacturing_cal_code,

Line 13107: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);

13103: l_ship_date,
13104: l_post_pro_lt, 1);
13105:
13106: IF PG_DEBUG in ('Y', 'C') THEN
13107: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);
13108: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');
13109: END IF;
13110: /*
13111: EXCEPTION

Line 13108: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');

13104: l_post_pro_lt, 1);
13105:
13106: IF PG_DEBUG in ('Y', 'C') THEN
13107: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);
13108: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');
13109: END IF;
13110: /*
13111: EXCEPTION
13112: WHEN others THEN

Line 13114: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate not found in Calendar');

13110: /*
13111: EXCEPTION
13112: WHEN others THEN
13113: IF PG_DEBUG in ('Y', 'C') THEN
13114: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sysdate not found in Calendar');
13115: END IF;
13116: null;
13117: END;
13118: */

Line 13125: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);

13121: -- buy
13122: /* ship_rec_cal changes begin */
13123:
13124: IF PG_DEBUG in ('Y', 'C') THEN
13125: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
13126: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
13127: END IF;
13128: -- intransit lead time offset in case of capacity to ship
13129: --Bug 3821358

Line 13126: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');

13122: /* ship_rec_cal changes begin */
13123:
13124: IF PG_DEBUG in ('Y', 'C') THEN
13125: msc_sch_wb.atp_debug('ATP_Check: ' || 'Ship Date: ' || l_atp_rec.ship_date);
13126: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________Start Offset___________________');
13127: END IF;
13128: -- intransit lead time offset in case of capacity to ship
13129: --Bug 3821358
13130: IF (l_atp_rec.ship_date = l_store_g_ptf_date ) THEN

Line 13132: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);

13128: -- intransit lead time offset in case of capacity to ship
13129: --Bug 3821358
13130: IF (l_atp_rec.ship_date = l_store_g_ptf_date ) THEN
13131: IF PG_DEBUG in ('Y', 'C') THEN
13132: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
13133: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
13134: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
13135: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
13136: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);

Line 13133: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);

13129: --Bug 3821358
13130: IF (l_atp_rec.ship_date = l_store_g_ptf_date ) THEN
13131: IF PG_DEBUG in ('Y', 'C') THEN
13132: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
13133: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
13134: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
13135: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
13136: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
13137: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);

Line 13134: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);

13130: IF (l_atp_rec.ship_date = l_store_g_ptf_date ) THEN
13131: IF PG_DEBUG in ('Y', 'C') THEN
13132: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
13133: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
13134: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
13135: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
13136: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
13137: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
13138: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);

Line 13135: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);

13131: IF PG_DEBUG in ('Y', 'C') THEN
13132: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
13133: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
13134: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
13135: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
13136: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
13137: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
13138: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);
13139: END IF;

Line 13136: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);

13132: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_rec.ship_date' || l_atp_rec.ship_date);
13133: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
13134: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
13135: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
13136: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
13137: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
13138: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);
13139: END IF;
13140: -- assign the values in l_store* variables..

Line 13137: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);

13133: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_g_ptf_date' || l_store_g_ptf_date);
13134: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
13135: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
13136: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
13137: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
13138: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);
13139: END IF;
13140: -- assign the values in l_store* variables..
13141: l_ship_date := l_store_due_date;

Line 13138: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);

13134: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_dock_date' || l_store_dock_date);
13135: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_ship_date' || l_store_ship_date);
13136: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_start_date' || l_store_start_date);
13137: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_order_date' || l_store_order_date);
13138: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_store_due_date' || l_store_due_date);
13139: END IF;
13140: -- assign the values in l_store* variables..
13141: l_ship_date := l_store_due_date;
13142: l_new_dock_date := l_store_dock_date;

Line 13157: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');

13153: l_atp_rec.instance_id,
13154: l_atp_rec.ship_date);
13155:
13156: IF PG_DEBUG in ('Y', 'C') THEN
13157: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
13158: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_ship_date);
13159: END IF;
13160:
13161: l_new_ship_date := l_ship_date; -- Bug 3241766

Line 13158: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_ship_date);

13154: l_atp_rec.ship_date);
13155:
13156: IF PG_DEBUG in ('Y', 'C') THEN
13157: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Ship ---');
13158: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_ship_date);
13159: END IF;
13160:
13161: l_new_ship_date := l_ship_date; -- Bug 3241766
13162:

Line 13170: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_ship_date);

13166: l_ship_date,
13167: l_atp_rec.delivery_lead_time, 1);
13168:
13169: IF PG_DEBUG in ('Y', 'C') THEN
13170: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_ship_date);
13171: END IF;
13172: ELSE
13173:
13174: l_ship_date := l_atp_rec.ship_date;

Line 13177: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');

13173:
13174: l_ship_date := l_atp_rec.ship_date;
13175:
13176: IF PG_DEBUG in ('Y', 'C') THEN
13177: msc_sch_wb.atp_debug('ATP_Check: ' || '--- Capacity to Dock ---');
13178: END IF;
13179:
13180: -- Bug 3241766 : back calculate the ship date
13181: l_new_ship_date := MSC_CALENDAR.DATE_OFFSET(

Line 13188: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_new_ship_date);

13184: l_ship_date,
13185: -1 * l_atp_rec.delivery_lead_time, -1);
13186:
13187: IF PG_DEBUG in ('Y', 'C') THEN
13188: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding intransit LT using VIC: '||l_new_ship_date);
13189: END IF;
13190:
13191: l_new_ship_date := MSC_CALENDAR.PREV_WORK_DAY(
13192: l_atp_rec.shipping_cal_code,

Line 13199: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_new_ship_date);

13195: --Bug 3821358
13196: --l_atp_rec.ship_date);
13197:
13198: IF PG_DEBUG in ('Y', 'C') THEN
13199: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on SSC: '||l_new_ship_date);
13200: END IF;
13201: END IF;
13202:
13203: l_ship_date := MSC_CALENDAR.NEXT_WORK_DAY(

Line 13211: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_ship_date);

13207:
13208: l_new_dock_date := l_ship_date; -- Bug 3241766
13209:
13210: IF PG_DEBUG in ('Y', 'C') THEN
13211: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after validating on ORC: '||l_ship_date);
13212: END IF;
13213:
13214: -- Bug 3241766 : Backcalculate start date and order date
13215: -- Bug 3405708 - Enforce Pur LT: Truncate past due dates

Line 13238: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PLT using SMC : '||l_sugg_start_date);

13234: END IF;
13235: END IF;
13236:
13237: IF PG_DEBUG in ('Y', 'C') THEN
13238: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting PLT using SMC : '||l_sugg_start_date);
13239: END IF;
13240:
13241: IF G_PLAN_INFO_REC.enforce_pur_lead_time = 2 AND l_sugg_start_date <= l_trunc_sysdate THEN
13242: l_order_date := l_trunc_sysdate;

Line 13256: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);

13252: END IF;
13253: -- Bug 3405708 - changes end
13254:
13255: IF PG_DEBUG in ('Y', 'C') THEN
13256: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after subtracting pre PLT using OMC : '||l_order_date);
13257: END IF;
13258:
13259: l_ship_date := MSC_CALENDAR.DATE_OFFSET(
13260: p_atp_record.manufacturing_cal_code,

Line 13266: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);

13262: l_ship_date,
13263: l_post_pro_lt, 1);
13264:
13265: IF PG_DEBUG in ('Y', 'C') THEN
13266: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);
13267: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');
13268: END IF;
13269: -- ship_rec_cal changes end
13270: END IF; --Bug 3821358

Line 13267: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');

13263: l_post_pro_lt, 1);
13264:
13265: IF PG_DEBUG in ('Y', 'C') THEN
13266: msc_sch_wb.atp_debug('ATP_Check: ' || 'Date after adding PPLT using OMC: '||l_ship_date);
13267: msc_sch_wb.atp_debug('ATP_Check: ' || '___________________End Offset___________________');
13268: END IF;
13269: -- ship_rec_cal changes end
13270: END IF; --Bug 3821358
13271: END IF;

Line 13273: msc_sch_wb.atp_debug ('ATP_Check: ' || 'ship date is '||l_ship_date);

13269: -- ship_rec_cal changes end
13270: END IF; --Bug 3821358
13271: END IF;
13272: IF PG_DEBUG in ('Y', 'C') THEN
13273: msc_sch_wb.atp_debug ('ATP_Check: ' || 'ship date is '||l_ship_date);
13274: msc_sch_wb.atp_debug ('ATP_Check: ' || 'original is '|| p_atp_record.ship_date );
13275: END IF;
13276:
13277: ---bug 2798667: The p_atp_record.ship_date for option item contains ship date for

Line 13274: msc_sch_wb.atp_debug ('ATP_Check: ' || 'original is '|| p_atp_record.ship_date );

13270: END IF; --Bug 3821358
13271: END IF;
13272: IF PG_DEBUG in ('Y', 'C') THEN
13273: msc_sch_wb.atp_debug ('ATP_Check: ' || 'ship date is '||l_ship_date);
13274: msc_sch_wb.atp_debug ('ATP_Check: ' || 'original is '|| p_atp_record.ship_date );
13275: END IF;
13276:
13277: ---bug 2798667: The p_atp_record.ship_date for option item contains ship date for
13278: --- model from earlier source + atp lead time. We should compare with ship date +

Line 13296: msc_sch_wb.atp_debug ('l_atp_lt_offset_ship_date := ' || l_atp_lt_offset_ship_date);

13292: */
13293: l_atp_lt_offset_ship_date := l_ship_date;
13294:
13295: IF PG_DEBUG in ('Y', 'C') THEN
13296: msc_sch_wb.atp_debug ('l_atp_lt_offset_ship_date := ' || l_atp_lt_offset_ship_date);
13297: END IF;
13298:
13299:
13300: -- Bug 1566260, If p_atp_record.ship_date and l_ship_date is null, we assume

Line 13304: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date := ' || p_atp_record.ship_date);

13300: -- Bug 1566260, If p_atp_record.ship_date and l_ship_date is null, we assume
13301: -- that going down is better. This is being done for preserving exploded
13302: -- pegging tree for use by CTO for storing component demands.
13303: IF PG_DEBUG in ('Y', 'C') THEN
13304: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date := ' || p_atp_record.ship_date);
13305: END IF;
13306: --bug 2798667: Compare with l_atp_lt_offset_ship_date
13307: /*IF ((p_atp_record.ship_date IS NULL and l_ship_date IS NULL) OR
13308: (p_atp_record.ship_date IS NOT NULL and (p_atp_record.ship_date <=

Line 13320: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');

13316: -- single level result is better than
13317: -- going down to next level.
13318:
13319: IF PG_DEBUG in ('Y', 'C') THEN
13320: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');
13321: END IF;
13322:
13323: -- dsting ATO 2465370
13324: -- IF NVL(p_atp_record.override_flag, 'N') = 'N'

Line 13338: msc_sch_wb.atp_debug('ATO update details_temp date single lev: ' || p_atp_record.ship_date);

13334: and pegging_id = l_parent_pegging_id
13335: and record_type = 3;
13336:
13337: IF PG_DEBUG in ('Y', 'C') THEN
13338: msc_sch_wb.atp_debug('ATO update details_temp date single lev: ' || p_atp_record.ship_date);
13339: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
13340: END IF;
13341: END IF;
13342:

Line 13339: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);

13335: and record_type = 3;
13336:
13337: IF PG_DEBUG in ('Y', 'C') THEN
13338: msc_sch_wb.atp_debug('ATO update details_temp date single lev: ' || p_atp_record.ship_date);
13339: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
13340: END IF;
13341: END IF;
13342:
13343: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 13357: msc_sch_wb.atp_debug('ATP_Check: ' || 'after copying the data');

13353: C_ITEM_INFO_REC.dest_inv_item_id, -- Bug 3293163
13354: PF_ITEM_INFO_REC.dest_inv_item_id); -- Bug 3293163
13355:
13356: IF PG_DEBUG in ('Y', 'C') THEN
13357: msc_sch_wb.atp_debug('ATP_Check: ' || 'after copying the data');
13358: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||
13359: x_atp_supply_demand.level.count);
13360: END IF;
13361:

Line 13358: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||

13354: PF_ITEM_INFO_REC.dest_inv_item_id); -- Bug 3293163
13355:
13356: IF PG_DEBUG in ('Y', 'C') THEN
13357: msc_sch_wb.atp_debug('ATP_Check: ' || 'after copying the data');
13358: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||
13359: x_atp_supply_demand.level.count);
13360: END IF;
13361:
13362: ELSE

Line 13366: msc_sch_wb.atp_debug('ATP_Check: ' || 'go down is better');

13362: ELSE
13363: -- going down is better than the results
13364: -- in this level
13365: IF PG_DEBUG in ('Y', 'C') THEN
13366: msc_sch_wb.atp_debug('ATP_Check: ' || 'go down is better');
13367: END IF;
13368:
13369: -- dsting ATO 2465370
13370: -- IF NVL(p_atp_record.override_flag, 'N') = 'N'

Line 13384: msc_sch_wb.atp_debug('ATO update details_temp date go down: ' || l_ship_date);

13380: and pegging_id = l_parent_pegging_id
13381: and record_type = 3;
13382:
13383: IF PG_DEBUG in ('Y', 'C') THEN
13384: msc_sch_wb.atp_debug('ATO update details_temp date go down: ' || l_ship_date);
13385: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
13386: END IF;
13387: END IF;
13388:

Line 13385: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);

13381: and record_type = 3;
13382:
13383: IF PG_DEBUG in ('Y', 'C') THEN
13384: msc_sch_wb.atp_debug('ATO update details_temp date go down: ' || l_ship_date);
13385: msc_sch_wb.atp_debug('pegging id: ' || l_parent_pegging_id);
13386: END IF;
13387: END IF;
13388:
13389: -- remove what's bad

Line 13396: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : ' || l_atp_pegging_tab.COUNT);

13392: MSC_ATP_PVT.G_FUTURE_PEGGING_ID := l_pegging_id;
13393: -- remove what's bad
13394:
13395: IF PG_DEBUG in ('Y', 'C') THEN
13396: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : ' || l_atp_pegging_tab.COUNT);
13397: END IF;
13398:
13399: IF l_atp_pegging_tab.COUNT > 0 THEN
13400:

Line 13450: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.quantity_ordered = '||

13446: p_atp_record.atf_date_quantity := 0;
13447: END IF;
13448:
13449: IF PG_DEBUG in ('Y', 'C') THEN
13450: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.quantity_ordered = '||
13451: l_atp_rec.quantity_ordered);
13452: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||
13453: l_atp_rec.available_quantity);
13454: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||

Line 13452: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||

13448:
13449: IF PG_DEBUG in ('Y', 'C') THEN
13450: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.quantity_ordered = '||
13451: l_atp_rec.quantity_ordered);
13452: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||
13453: l_atp_rec.available_quantity);
13454: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||
13455: p_atp_record.available_quantity);
13456: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||

Line 13454: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||

13450: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.quantity_ordered = '||
13451: l_atp_rec.quantity_ordered);
13452: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||
13453: l_atp_rec.available_quantity);
13454: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||
13455: p_atp_record.available_quantity);
13456: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||
13457: p_atp_record.used_available_quantity); --bug3409973
13458:

Line 13456: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||

13452: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: l_atp_rec.available_quantity = '||
13453: l_atp_rec.available_quantity);
13454: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.available_quantity = '||
13455: p_atp_record.available_quantity);
13456: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||
13457: p_atp_record.used_available_quantity); --bug3409973
13458:
13459: -- 2754446
13460: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);

Line 13460: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);

13456: msc_sch_wb.atp_debug('ATP_Check: ' || 'question: p_atp_record.used_available_quantity = '||
13457: p_atp_record.used_available_quantity); --bug3409973
13458:
13459: -- 2754446
13460: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);
13461: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);
13462: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);
13463: END IF;
13464:

Line 13461: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);

13457: p_atp_record.used_available_quantity); --bug3409973
13458:
13459: -- 2754446
13460: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);
13461: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);
13462: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);
13463: END IF;
13464:
13465: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 13462: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);

13458:
13459: -- 2754446
13460: msc_sch_wb.atp_debug('l_prim_uom_avail_qty: ' ||l_prim_uom_avail_qty);
13461: msc_sch_wb.atp_debug('l_PO_qty: ' ||l_PO_qty);
13462: msc_sch_wb.atp_debug('l_conversion_rate:' || l_conversion_rate);
13463: END IF;
13464:
13465: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
13466: p_plan_id,

Line 13499: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here? we should adjust the planned order');

13495: ELSE
13496:
13497: -- we are in backward part
13498: IF PG_DEBUG in ('Y', 'C') THEN
13499: msc_sch_wb.atp_debug('ATP_Check: ' || 'Are we here? we should adjust the planned order');
13500: END IF;
13501:
13502: --5183022 further iterations error code should be set 53
13503: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null THEN

Line 13521: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);

13517: ELSE
13518: l_update_PO_mode := MSC_ATP_PVT.UNDO;
13519: END IF;
13520: IF PG_DEBUG in ('Y', 'C') THEN
13521: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
13522: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
13523: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
13524: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
13525: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );

Line 13522: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);

13518: l_update_PO_mode := MSC_ATP_PVT.UNDO;
13519: END IF;
13520: IF PG_DEBUG in ('Y', 'C') THEN
13521: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
13522: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
13523: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
13524: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
13525: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );
13526: END IF;

Line 13523: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);

13519: END IF;
13520: IF PG_DEBUG in ('Y', 'C') THEN
13521: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
13522: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
13523: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
13524: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
13525: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );
13526: END IF;
13527:

Line 13524: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);

13520: IF PG_DEBUG in ('Y', 'C') THEN
13521: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
13522: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
13523: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
13524: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
13525: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );
13526: END IF;
13527:
13528: -- dsting diag_atp if we still have sources or diagnostic atp is off

Line 13525: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );

13521: msc_sch_wb.atp_debug('ATP_Check: ' || 'set l_update_PO_mode ' || l_update_PO_mode);
13522: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_children ' || l_atp_rec.children_type);
13523: msc_sch_wb.atp_debug('ATP_Check: ' || 'make_buy_parent ' || l_have_make_buy_parent);
13524: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
13525: msc_sch_wb.atp_debug('constraint_flag: ' || l_constraint_flag );
13526: END IF;
13527:
13528: -- dsting diag_atp if we still have sources or diagnostic atp is off
13529: -- then we update the planned order. If l_update_PO_mode is INVALID

Line 13542: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);

13538: MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1
13539: THEN
13540:
13541: IF PG_DEBUG in ('Y', 'C') THEN
13542: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
13543: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
13544: END IF;
13545:
13546: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 13543: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);

13539: THEN
13540:
13541: IF PG_DEBUG in ('Y', 'C') THEN
13542: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
13543: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
13544: END IF;
13545:
13546: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
13547: p_plan_id,

Line 13585: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);

13581: */
13582: --5230396, updating planned order for diag ATP too in Buy case.
13583: ELSIF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
13584: IF PG_DEBUG in ('Y', 'C') THEN
13585: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
13586: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
13587: END IF;
13588:
13589: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 13586: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);

13582: --5230396, updating planned order for diag ATP too in Buy case.
13583: ELSIF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
13584: IF PG_DEBUG in ('Y', 'C') THEN
13585: msc_sch_wb.atp_debug('l_PO_qty: ' || l_PO_qty);
13586: msc_sch_wb.atp_debug('l_prim_uom_req_date_qty: ' || l_prim_uom_req_date_qty);
13587: END IF;
13588:
13589: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,
13590: p_plan_id,

Line 13646: msc_sch_wb.atp_debug('It is a make case ');

13642: ELSE -- it is a make
13643:
13644: --s_cto_rearch
13645: IF PG_DEBUG in ('Y', 'C') THEN
13646: msc_sch_wb.atp_debug('It is a make case ');
13647: msc_sch_wb.atp_debug('G_MODEL_BOM_IS_COLLECTED := ' || MSC_ATP_CTO.G_MODEL_BOM_IS_COLLECTED);
13648: msc_sch_wb.atp_debug('Bom Item Flag := ' || PF_ITEM_INFO_REC.bom_item_type);
13649: END IF;
13650: l_get_comp_info_rec.line_id := p_atp_record.demand_source_line;

Line 13647: msc_sch_wb.atp_debug('G_MODEL_BOM_IS_COLLECTED := ' || MSC_ATP_CTO.G_MODEL_BOM_IS_COLLECTED);

13643:
13644: --s_cto_rearch
13645: IF PG_DEBUG in ('Y', 'C') THEN
13646: msc_sch_wb.atp_debug('It is a make case ');
13647: msc_sch_wb.atp_debug('G_MODEL_BOM_IS_COLLECTED := ' || MSC_ATP_CTO.G_MODEL_BOM_IS_COLLECTED);
13648: msc_sch_wb.atp_debug('Bom Item Flag := ' || PF_ITEM_INFO_REC.bom_item_type);
13649: END IF;
13650: l_get_comp_info_rec.line_id := p_atp_record.demand_source_line;
13651: l_get_comp_info_rec.bom_item_type := PF_ITEM_INFO_REC.Bom_item_type;

Line 13648: msc_sch_wb.atp_debug('Bom Item Flag := ' || PF_ITEM_INFO_REC.bom_item_type);

13644: --s_cto_rearch
13645: IF PG_DEBUG in ('Y', 'C') THEN
13646: msc_sch_wb.atp_debug('It is a make case ');
13647: msc_sch_wb.atp_debug('G_MODEL_BOM_IS_COLLECTED := ' || MSC_ATP_CTO.G_MODEL_BOM_IS_COLLECTED);
13648: msc_sch_wb.atp_debug('Bom Item Flag := ' || PF_ITEM_INFO_REC.bom_item_type);
13649: END IF;
13650: l_get_comp_info_rec.line_id := p_atp_record.demand_source_line;
13651: l_get_comp_info_rec.bom_item_type := PF_ITEM_INFO_REC.Bom_item_type;
13652: l_get_comp_info_rec.atp_flag := l_atp_flag;

Line 13678: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');

13674: p_plan_id );
13675:
13676: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13677: IF PG_DEBUG in ('Y', 'C') THEN
13678: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
13679: END IF;
13680: x_return_status := FND_API.G_RET_STS_ERROR;
13681: RAISE FND_API.G_EXC_ERROR;
13682: END IF;

Line 13727: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

13723: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1
13724: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN --bug3397904
13725: l_PO_qty := CEIL(p_atp_record.quantity_ordered);
13726: IF PG_DEBUG in ('Y', 'C') THEN
13727: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
13728: END IF;
13729: ELSE
13730: l_PO_qty := CEIL(l_net_demand);
13731: IF PG_DEBUG in ('Y', 'C') THEN

Line 13732: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

13728: END IF;
13729: ELSE
13730: l_PO_qty := CEIL(l_net_demand);
13731: IF PG_DEBUG in ('Y', 'C') THEN
13732: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
13733: END IF;
13734: END IF;
13735: ELSE
13736: --bug 3904063: Reset the quantity only in case of demand priorit allocated ATP

Line 13744: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

13740: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN --bug3397904
13741:
13742: l_PO_qty := trunc(p_atp_record.quantity_ordered, 6); --5598066
13743: IF PG_DEBUG in ('Y', 'C') THEN
13744: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
13745: END IF;
13746: ELSE
13747: l_PO_qty := trunc(l_net_demand, 6); --5598066
13748: IF PG_DEBUG in ('Y', 'C') THEN

Line 13749: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

13745: END IF;
13746: ELSE
13747: l_PO_qty := trunc(l_net_demand, 6); --5598066
13748: IF PG_DEBUG in ('Y', 'C') THEN
13749: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
13750: END IF;
13751: END IF;
13752: END IF;
13753: --bug3397904 end

Line 13758: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make');

13754: -- dsting 2764213
13755: l_planned_sources := 1;
13756:
13757: IF PG_DEBUG in ('Y', 'C') THEN
13758: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make');
13759: END IF;
13760: -- insert a plan order for the l_net_demand
13761: --- bug 1941489
13762: --- assign correct pegging-id to co-product pegging id

Line 13769: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_coprod_pegging_id := ' || l_coprod_pegging_id);

13765: --5216821 commenting and setting it down
13766: /*
13767: l_coprod_pegging_id := l_parent_pegging_id;
13768: IF PG_DEBUG in ('Y', 'C') THEN
13769: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_coprod_pegging_id := ' || l_coprod_pegging_id);
13770: END IF;
13771: */
13772: --- bug 2178544
13773: ---- get mso_lead_time factor

Line 13789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);

13785: -- + l_pre_pro_lt);
13786: -- l_process_lt := CEIL((l_fixed_lt +
13787: -- (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
13788: IF PG_DEBUG in ('Y', 'C') THEN
13789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
13790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
13791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
13792: END IF;
13793: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date;

Line 13790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);

13786: -- l_process_lt := CEIL((l_fixed_lt +
13787: -- (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
13788: IF PG_DEBUG in ('Y', 'C') THEN
13789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
13790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
13791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
13792: END IF;
13793: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date;
13794: ---diag_ATP

Line 13791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);

13787: -- (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
13788: IF PG_DEBUG in ('Y', 'C') THEN
13789: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
13790: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
13791: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
13792: END IF;
13793: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date;
13794: ---diag_ATP
13795: IF p_search = BACKWARD_SCHEDULING THEN

Line 13800: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate order date');

13796: l_constraint_flag := 2;
13797: --diag_ATP
13798: IF l_net_processing_lt > 0 THEN
13799: IF PG_DEBUG in ('Y', 'C') THEN
13800: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate order date');
13801: END IF;
13802: /* ship_rec_cal
13803: l_order_date := MSC_CALENDAR.DATE_OFFSET
13804: (p_atp_record.organization_id,

Line 13818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Net process lt is zero');

13814: (-1 * l_net_processing_lt), -1);
13815:
13816: ELSE
13817: IF PG_DEBUG in ('Y', 'C') THEN
13818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Net process lt is zero');
13819: END IF;
13820: l_order_date := l_sysdate;
13821: END IF;
13822:

Line 13824: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_order_date := ' || l_order_date);

13820: l_order_date := l_sysdate;
13821: END IF;
13822:
13823: IF PG_DEBUG in ('Y', 'C') THEN
13824: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_order_date := ' || l_order_date);
13825: END IF;
13826: -- calculate start date only if PTF_flag is enabled for the plan
13827: IF (l_process_lt > 0) THEN
13828: IF PG_DEBUG in ('Y', 'C') THEN

Line 13829: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate start date');

13825: END IF;
13826: -- calculate start date only if PTF_flag is enabled for the plan
13827: IF (l_process_lt > 0) THEN
13828: IF PG_DEBUG in ('Y', 'C') THEN
13829: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate start date');
13830: END IF;
13831: /* ship_rec_cal
13832: l_start_date := MSC_CALENDAR.DATE_OFFSET
13833: (p_atp_record.organization_id,

Line 13846: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF flag is off for the plan or process LT is 0');

13842: (-1 * l_process_lt), -1);
13843: ELSE
13844:
13845: IF PG_DEBUG in ('Y', 'C') THEN
13846: msc_sch_wb.atp_debug('ATP_Check: ' || 'PTF flag is off for the plan or process LT is 0');
13847: END IF;
13848: l_start_date := l_ptf_date;
13849: END IF;
13850:

Line 13852: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

13848: l_start_date := l_ptf_date;
13849: END IF;
13850:
13851: IF PG_DEBUG in ('Y', 'C') THEN
13852: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
13853: END IF;
13854: -- bug 2178544
13855:
13856: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN

Line 13894: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);

13890: ELSE
13891: l_ptf_due_date := l_ptf_date;
13892: END IF;
13893: IF PG_DEBUG in ('Y', 'C') THEN
13894: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);
13895: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
13896: END IF;
13897:
13898: ---We marked the most constrained constraint. If both constraint are equally

Line 13895: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);

13891: l_ptf_due_date := l_ptf_date;
13892: END IF;
13893: IF PG_DEBUG in ('Y', 'C') THEN
13894: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_ptf_due_date := ' || l_ptf_due_date);
13895: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_lt_due_date := ' || l_lt_due_date);
13896: END IF;
13897:
13898: ---We marked the most constrained constraint. If both constraint are equally
13899: -- constrained then we mark PTF constraint.

Line 13955: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

13951: ELSE
13952: l_start_date := l_ptf_date;
13953: END IF;
13954: IF PG_DEBUG in ('Y', 'C') THEN
13955: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
13956: END IF;
13957: MSC_ATP_PVT.G_FUTURE_START_DATE := GREATEST(l_start_date, MSC_ATP_PVT.G_PTF_DATE);
13958: ---we make sure that PTF for this stage is greatst of Parent's ptf - lead time,
13959: -- current level's PTF and (sysdate + pre processing lt). The last part is the minimum

Line 14000: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_ORDER_DATE :='|| MSC_ATP_PVT.G_FUTURE_ORDER_DATE);

13996: l_ptf_date, l_sysdate);
13997: END IF;
13998:
13999: IF PG_DEBUG in ('Y', 'C') THEN
14000: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_ORDER_DATE :='|| MSC_ATP_PVT.G_FUTURE_ORDER_DATE);
14001: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_START_DATE :='|| MSC_ATP_PVT.G_FUTURE_START_DATE);
14002: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
14003: END IF;
14004: --- if requested_ship_date is less than l_ptf_date then we add ptf_date for this item

Line 14001: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_START_DATE :='|| MSC_ATP_PVT.G_FUTURE_START_DATE);

13997: END IF;
13998:
13999: IF PG_DEBUG in ('Y', 'C') THEN
14000: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_ORDER_DATE :='|| MSC_ATP_PVT.G_FUTURE_ORDER_DATE);
14001: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_START_DATE :='|| MSC_ATP_PVT.G_FUTURE_START_DATE);
14002: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
14003: END IF;
14004: --- if requested_ship_date is less than l_ptf_date then we add ptf_date for this item
14005: -- UI checks this column. If this coulm is populated then UI flags this PO

Line 14002: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

13998:
13999: IF PG_DEBUG in ('Y', 'C') THEN
14000: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_ORDER_DATE :='|| MSC_ATP_PVT.G_FUTURE_ORDER_DATE);
14001: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FUTURE_START_DATE :='|| MSC_ATP_PVT.G_FUTURE_START_DATE);
14002: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
14003: END IF;
14004: --- if requested_ship_date is less than l_ptf_date then we add ptf_date for this item
14005: -- UI checks this column. If this coulm is populated then UI flags this PO
14006: --diag_atp

Line 14011: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add PTF date to pegging');

14007: -- IF l_requested_ship_date < l_start_date or l_requested_ship_date < sysdate THEN
14008: -- Bug 3412143 - Use l_sysdate (in this case validated in OMC) instead of sysdate
14009: IF l_requested_ship_date < l_start_date or l_requested_ship_date < l_sysdate THEN
14010: IF PG_DEBUG in ('Y', 'C') THEN
14011: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add PTF date to pegging');
14012: END IF;
14013: -- Bug 3525582 - PTF constraint should be added only if plan is PTF enabled
14014: IF l_ptf_enabled=2 OR MSC_ATP_PVT.G_FUTURE_ORDER_DATE > l_start_date THEN
14015: l_pegging_rec.constraint_date := MSC_ATP_PVT.G_FUTURE_ORDER_DATE;

Line 14170: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 1');

14166: l_pegging_rec.supply_demand_date:= l_requested_ship_date;
14167: l_pegging_rec.source_type := 2;
14168:
14169: IF PG_DEBUG in ('Y', 'C') THEN
14170: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 1');
14171: END IF;
14172:
14173: -- for demo:1153192
14174: l_pegging_rec.constraint_flag := 'N';

Line 14250: msc_sch_wb.atp_debug('make last good pegging id ' || l_pegging_id);

14246:
14247: -- dsting diag_atp last good peggingfor make
14248: IF l_pegging_rec.constraint_type IS NULL THEN
14249: IF PG_DEBUG in ('Y', 'C') THEN
14250: msc_sch_wb.atp_debug('make last good pegging id ' || l_pegging_id);
14251: END IF;
14252: l_last_good_pegging_id := l_pegging_id;
14253: END IF;
14254: --5216821 Set co prod peg id to PO peg id

Line 14258: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_coprod_pegging_id : ' || l_coprod_pegging_id);

14254: --5216821 Set co prod peg id to PO peg id
14255: l_coprod_pegging_id := l_pegging_id;
14256:
14257: IF PG_DEBUG in ('Y', 'C') THEN
14258: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_coprod_pegging_id : ' || l_coprod_pegging_id);
14259: END IF;
14260: --optional_fw Make PO should be set for top level
14261: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
14262: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '

Line 14262: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '

14258: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_coprod_pegging_id : ' || l_coprod_pegging_id);
14259: END IF;
14260: --optional_fw Make PO should be set for top level
14261: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
14262: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
14263: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14264: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14265: ELSIF PG_DEBUG in ('Y', 'C') THEN
14266: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

Line 14264: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

14260: --optional_fw Make PO should be set for top level
14261: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
14262: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
14263: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14264: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14265: ELSIF PG_DEBUG in ('Y', 'C') THEN
14266: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14267: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
14268: END IF;

Line 14266: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

14262: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
14263: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14264: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14265: ELSIF PG_DEBUG in ('Y', 'C') THEN
14266: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14267: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
14268: END IF;
14269: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null
14270: AND (G_FW_CTP_PEGGING_ID.COUNT = 0 --Means top level, for next source value = null

Line 14267: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);

14263: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14264: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14265: ELSIF PG_DEBUG in ('Y', 'C') THEN
14266: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14267: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
14268: END IF;
14269: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null
14270: AND (G_FW_CTP_PEGGING_ID.COUNT = 0 --Means top level, for next source value = null
14271: OR G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT) is null) then

Line 14277: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '

14273: G_FW_CTP_PEGGING_ID.EXTEND;
14274: END IF;
14275: G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT) := l_pegging_id;
14276: IF PG_DEBUG in ('Y', 'C') THEN
14277: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
14278: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14279: END IF;
14280: END IF;
14281: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN

Line 14282: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '

14278: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14279: END IF;
14280: END IF;
14281: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
14282: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
14283: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14284: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14285: ELSIF PG_DEBUG in ('Y', 'C') THEN
14286: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

Line 14284: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

14280: END IF;
14281: IF PG_DEBUG in ('Y', 'C') AND G_FW_CTP_PEGGING_ID.COUNT >0 THEN
14282: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
14283: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14284: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14285: ELSIF PG_DEBUG in ('Y', 'C') THEN
14286: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14287: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
14288: END IF;

Line 14286: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);

14282: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_CTP_PEGGING_ID := '
14283: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14284: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14285: ELSIF PG_DEBUG in ('Y', 'C') THEN
14286: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14287: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
14288: END IF;
14289: /*--- bug 2178544
14290: ---- get mso_lead_time factor

Line 14287: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);

14283: || G_FW_CTP_PEGGING_ID(G_FW_CTP_PEGGING_ID.COUNT));
14284: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14285: ELSIF PG_DEBUG in ('Y', 'C') THEN
14286: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_OPTIONAL_FW := ' || G_OPTIONAL_FW);
14287: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_FW_PEGGING_ID := ' || G_FW_PEGGING_ID);
14288: END IF;
14289: /*--- bug 2178544
14290: ---- get mso_lead_time factor
14291: l_mso_lead_time_factor := MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR;

Line 14299: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);

14295: + l_pre_pro_lt);
14296: l_process_lt := CEIL((l_fixed_lt +
14297: (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
14298: IF PG_DEBUG in ('Y', 'C') THEN
14299: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
14300: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
14301: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
14302: END IF;
14303: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date; */

Line 14300: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);

14296: l_process_lt := CEIL((l_fixed_lt +
14297: (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
14298: IF PG_DEBUG in ('Y', 'C') THEN
14299: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
14300: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
14301: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
14302: END IF;
14303: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date; */
14304:

Line 14301: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);

14297: (l_variable_lt * l_net_demand))*(1 + l_mso_lead_time_factor));
14298: IF PG_DEBUG in ('Y', 'C') THEN
14299: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_mso_lead_time_factor := ' || l_mso_lead_time_factor);
14300: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_net_processing_lt := ' || l_net_processing_lt);
14301: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_process_lt := ' || l_process_lt);
14302: END IF;
14303: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date; */
14304:
14305: IF PG_DEBUG in ('Y', 'C') THEN

Line 14306: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_search' || p_search);

14302: END IF;
14303: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL := l_ptf_date; */
14304:
14305: IF PG_DEBUG in ('Y', 'C') THEN
14306: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_search' || p_search);
14307: END IF;
14308: --diag_atp
14309: IF (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 and l_constraint_flag <> 1) OR
14310: (p_search = BACKWARD_SCHEDULING and MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1) THEN

Line 14321: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

14317: ---- and requested_date quantity is set to Zero
14318: --- If Offseted date is > sysdate then we continue as ususal
14319:
14320: IF PG_DEBUG in ('Y', 'C') THEN
14321: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
14322: END IF;
14323: -- bug 2178544
14324: -- bug 12672787, validate l_order_date against l_sys_next_omc_date and not l_sysdate
14325: -- as l_sysdate is derived from ship_cal and omc_date is derived from manufact_val

Line 14328: msc_sch_wb.atp_debug('ATP_Check: ' || 'req date - lead time is less than sys or ptf date');

14324: -- bug 12672787, validate l_order_date against l_sys_next_omc_date and not l_sysdate
14325: -- as l_sysdate is derived from ship_cal and omc_date is derived from manufact_val
14326: IF (l_order_date < l_sys_next_omc_date OR l_start_date < l_ptf_date) THEN
14327: IF PG_DEBUG in ('Y', 'C') THEN
14328: msc_sch_wb.atp_debug('ATP_Check: ' || 'req date - lead time is less than sys or ptf date');
14329: END IF;
14330: l_avail_assembly_qty := 0;
14331: ELSE
14332:

Line 14334: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 2');

14330: l_avail_assembly_qty := 0;
14331: ELSE
14332:
14333: IF PG_DEBUG in ('Y', 'C') THEN
14334: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 2');
14335: END IF;
14336: IF ((l_atp_comp_flag = 'R') OR
14337: (l_atp_comp_flag = 'C')) THEN
14338: IF PG_DEBUG in ('Y', 'C') THEN

Line 14339: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 3');

14335: END IF;
14336: IF ((l_atp_comp_flag = 'R') OR
14337: (l_atp_comp_flag = 'C')) THEN
14338: IF PG_DEBUG in ('Y', 'C') THEN
14339: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 3');
14340: END IF;
14341:
14342: -- get resource requirements first
14343: MSC_ATP_REQ.Get_Res_Requirements(

Line 14399: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 4');

14395: LEAST(l_net_demand, l_avail_assembly_qty) >0 THEN
14396: -- get component requirements first
14397:
14398: IF PG_DEBUG in ('Y', 'C') THEN
14399: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 4');
14400: END IF;
14401:
14402: BEGIN
14403: IF l_avail_assembly_qty < l_net_demand AND

Line 14474: msc_sch_wb.atp_debug('ATP_Check: ' || ' Sourcing Mismatch Error');

14470: -- 2400614: krajan
14471: EXCEPTION
14472: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
14473: IF PG_DEBUG in ('Y', 'C') THEN
14474: msc_sch_wb.atp_debug('ATP_Check: ' || ' Sourcing Mismatch Error');
14475: END IF;
14476: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
14477: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
14478:

Line 14482: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');

14478:
14479: -- dsting 2764213
14480: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
14481: IF PG_DEBUG in ('Y', 'C') THEN
14482: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');
14483: END IF;
14484: --24x7
14485: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
14486: ---2854351

Line 14497: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item Error');

14493: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
14494: -- krajan 2752705
14495: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
14496: IF PG_DEBUG in ('Y', 'C') THEN
14497: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item Error');
14498: END IF;
14499: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
14500: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
14501: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705

Line 14503: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');

14499: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
14500: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
14501: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
14502: IF PG_DEBUG in ('Y', 'C') THEN
14503: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');
14504: END IF;
14505: p_atp_record.error_code := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
14506: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
14507: END;

Line 14550: msc_sch_wb.atp_debug('FLOOR of avail qty for l_avail_PO_qty: '

14546: l_avail_assembly_qty := LEAST(l_avail_assembly_qty, l_res_avail_qty);
14547: END IF;
14548:
14549: IF NVL(C_ITEM_INFO_REC.rounding_control_type, 2) = 1 THEN
14550: msc_sch_wb.atp_debug('FLOOR of avail qty for l_avail_PO_qty: '
14551: || l_avail_assembly_qty);
14552: l_avail_PO_qty := FLOOR(l_avail_assembly_qty);
14553: ELSE
14554: msc_sch_wb.atp_debug('l_avail_PO_qty := avail qty: '

Line 14554: msc_sch_wb.atp_debug('l_avail_PO_qty := avail qty: '

14550: msc_sch_wb.atp_debug('FLOOR of avail qty for l_avail_PO_qty: '
14551: || l_avail_assembly_qty);
14552: l_avail_PO_qty := FLOOR(l_avail_assembly_qty);
14553: ELSE
14554: msc_sch_wb.atp_debug('l_avail_PO_qty := avail qty: '
14555: || l_avail_assembly_qty);
14556: l_avail_PO_qty := trunc(l_avail_assembly_qty, 6); --5598066
14557: END IF;
14558:

Line 14565: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);

14561: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
14562: l_avail_assembly_qty := LEAST(l_avail_assembly_qty, l_res_avail_qty);
14563:
14564: IF PG_DEBUG in ('Y', 'C') THEN
14565: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
14566: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);
14567: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);
14568: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);
14569: END IF;

Line 14566: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);

14562: l_avail_assembly_qty := LEAST(l_avail_assembly_qty, l_res_avail_qty);
14563:
14564: IF PG_DEBUG in ('Y', 'C') THEN
14565: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
14566: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);
14567: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);
14568: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);
14569: END IF;
14570:

Line 14567: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);

14563:
14564: IF PG_DEBUG in ('Y', 'C') THEN
14565: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
14566: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);
14567: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);
14568: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);
14569: END IF;
14570:
14571: -- dsting diag_atp

Line 14568: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);

14564: IF PG_DEBUG in ('Y', 'C') THEN
14565: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
14566: msc_sch_wb.atp_debug('last good pegging: ' || l_pegging_id);
14567: msc_sch_wb.atp_debug('qty ' || l_avail_assembly_qty);
14568: msc_sch_wb.atp_debug('PO qty ' || l_avail_PO_qty);
14569: END IF;
14570:
14571: -- dsting diag_atp
14572: -- If this is the last source we should only update the pegging and not

Line 14621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty ='||l_avail_assembly_qty);

14617:
14618: ELSIF (l_avail_PO_qty < l_net_demand) THEN
14619: --ELSIF (l_avail_assembly_qty < l_net_demand) THEN
14620: IF PG_DEBUG in ('Y', 'C') THEN
14621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty ='||l_avail_assembly_qty);
14622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
14623: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 7');
14624: END IF;
14625: IF l_avail_PO_qty > 0 THEN

Line 14622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);

14618: ELSIF (l_avail_PO_qty < l_net_demand) THEN
14619: --ELSIF (l_avail_assembly_qty < l_net_demand) THEN
14620: IF PG_DEBUG in ('Y', 'C') THEN
14621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty ='||l_avail_assembly_qty);
14622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
14623: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 7');
14624: END IF;
14625: IF l_avail_PO_qty > 0 THEN
14626: --IF l_avail_assembly_qty > 0 THEN

Line 14623: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 7');

14619: --ELSIF (l_avail_assembly_qty < l_net_demand) THEN
14620: IF PG_DEBUG in ('Y', 'C') THEN
14621: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty ='||l_avail_assembly_qty);
14622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
14623: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 7');
14624: END IF;
14625: IF l_avail_PO_qty > 0 THEN
14626: --IF l_avail_assembly_qty > 0 THEN
14627:

Line 14641: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 6');

14637: 0,
14638: l_return_status);
14639:
14640: IF PG_DEBUG in ('Y', 'C') THEN
14641: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 6');
14642: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
14643: END IF;
14644:
14645: -- update/delete the planned order record.

Line 14642: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);

14638: l_return_status);
14639:
14640: IF PG_DEBUG in ('Y', 'C') THEN
14641: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside make 6');
14642: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_pegging_id = '||l_pegging_id);
14643: END IF;
14644:
14645: -- update/delete the planned order record.
14646: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 14677: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting G_COMP_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);

14673: -- just to make sure that in case of CTO, we try to get the
14674: -- BOM correctly from msc_bom_temp_table.
14675:
14676: IF PG_DEBUG in ('Y', 'C') THEN
14677: msc_sch_wb.atp_debug('ATP_Check: ' || 'setting G_COMP_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
14678: END IF;
14679:
14680: MSC_ATP_PVT.G_COMP_LINE_ID := MSC_ATP_PVT.G_ASSEMBLY_LINE_ID;
14681:

Line 14686: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);

14682: IF ((l_atp_comp_flag = 'R') OR
14683: (l_atp_comp_flag = 'C')) THEN
14684: -- get resource requirements first
14685: IF PG_DEBUG in ('Y', 'C') THEN
14686: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty := ' || l_avail_assembly_qty);
14687: END IF;
14688:
14689: -- dsting for nocopy changes
14690: l_res_demand := l_avail_PO_qty; -- 2869830

Line 14806: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sourcing Mismatch Error');

14802: EXCEPTION
14803: -- Raising exception handled below
14804: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
14805: IF PG_DEBUG in ('Y', 'C') THEN
14806: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sourcing Mismatch Error');
14807: END IF;
14808: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
14809: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
14810:

Line 14814: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');

14810:
14811: -- dsting 2764213
14812: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
14813: IF PG_DEBUG in ('Y', 'C') THEN
14814: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');
14815: END IF;
14816: --24x7
14817: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
14818: --bug 2854351:

Line 14828: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item Found');

14824: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
14825: -- krajan : 2752705
14826: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
14827: IF PG_DEBUG in ('Y', 'C') THEN
14828: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item Found');
14829: END IF;
14830: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
14831: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
14832: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705

Line 14834: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');

14830: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
14831: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
14832: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
14833: IF PG_DEBUG in ('Y', 'C') THEN
14834: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');
14835: END IF;
14836: p_atp_record.error_code := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
14837: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
14838: END;

Line 14930: msc_sch_wb.atp_debug('ATP_Check: ' || 'OSFM Coproducts Backward');

14926:
14927:
14928: END IF; -- end if the undo stuff
14929: IF PG_DEBUG in ('Y', 'C') THEN
14930: msc_sch_wb.atp_debug('ATP_Check: ' || 'OSFM Coproducts Backward');
14931: END IF;
14932: --- OSFM Changes: update coproduct supply
14933: l_coproducts_flag := FND_Profile.value('MSC_PLAN_COPRODUCTS');
14934: IF PG_DEBUG in ('Y', 'C') THEN

Line 14935: msc_sch_wb.atp_debug('ATP_Check: ' || 'msc_plan_coproducts = ' || l_coproducts_flag);

14931: END IF;
14932: --- OSFM Changes: update coproduct supply
14933: l_coproducts_flag := FND_Profile.value('MSC_PLAN_COPRODUCTS');
14934: IF PG_DEBUG in ('Y', 'C') THEN
14935: msc_sch_wb.atp_debug('ATP_Check: ' || 'msc_plan_coproducts = ' || l_coproducts_flag);
14936: END IF;
14937: --- set the sumary flag back to summary flag for p_plan_id
14938: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
14939: IF ((l_atp_comp_flag = 'C') OR

Line 14945: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add Coproducts for item '||p_atp_record.inventory_item_id);

14941: l_coproducts_flag = 'Y' AND
14942: l_avail_assembly_qty >0 THEN
14943:
14944: IF PG_DEBUG in ('Y', 'C') THEN
14945: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add Coproducts for item '||p_atp_record.inventory_item_id);
14946: END IF;
14947: MSC_ATP_PROC.Add_Coproducts(
14948: p_plan_id,
14949: p_atp_record.instance_id,

Line 14964: msc_sch_wb.atp_debug('ATP_Check: ' || 'After adding coproducts Backward');

14960: p_refresh_number, -- For summary enhancement
14961: l_transaction_id --3766179
14962: );
14963: IF PG_DEBUG in ('Y', 'C') THEN
14964: msc_sch_wb.atp_debug('ATP_Check: ' || 'After adding coproducts Backward');
14965: END IF;
14966:
14967: END IF;
14968: l_net_demand := l_net_demand-l_avail_assembly_qty;

Line 14981: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside forward_scheduling');

14977: END IF;
14978: ---diag_atp
14979: ELSIF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
14980: IF PG_DEBUG in ('Y', 'C') THEN
14981: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside forward_scheduling');
14982: END IF;
14983: -- p_sched_flag = FORWARD_SCHEDULING
14984:
14985: -- initialize the atp date

Line 14997: --msc_sch_wb.atp_debug('setting G_COMP_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);

14993: -- Bug 1532051, set G_COMP_LINE_ID again to G_ORDER_LINE_ID,
14994: -- just to make sure that in case of CTO, we try to get the
14995: -- BOM correctly from msc_bom_temp_table.
14996:
14997: --msc_sch_wb.atp_debug('setting G_COMP_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
14998:
14999: --MSC_ATP_PVT.G_COMP_LINE_ID := MSC_ATP_PVT.G_ORDER_LINE_ID;
15000:
15001: -- dsting 2754446 adjust l_net_demand according to rounding_control_type

Line 15013: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

15009: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1
15010: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
15011: l_PO_qty := CEIL(p_atp_record.quantity_ordered);
15012: IF PG_DEBUG in ('Y', 'C') THEN
15013: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
15014: END IF;
15015: ELSE
15016: l_PO_qty := CEIL(l_net_demand);
15017: IF PG_DEBUG in ('Y', 'C') THEN

Line 15018: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

15014: END IF;
15015: ELSE
15016: l_PO_qty := CEIL(l_net_demand);
15017: IF PG_DEBUG in ('Y', 'C') THEN
15018: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
15019: END IF;
15020: END IF;
15021: ELSE
15022: --bug 3904063: Reset the quantity only in case of demand priority allocated ATP

Line 15029: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);

15025: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1
15026: AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
15027: l_PO_qty := trunc(p_atp_record.quantity_ordered, 6); --5598066
15028: IF PG_DEBUG in ('Y', 'C') THEN
15029: msc_sch_wb.atp_debug('If l_PO_qty: ' || l_PO_qty);
15030: END IF;
15031: ELSE
15032: l_PO_qty := trunc(l_net_demand, 6); --5598066
15033: IF PG_DEBUG in ('Y', 'C') THEN

Line 15034: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);

15030: END IF;
15031: ELSE
15032: l_PO_qty := trunc(l_net_demand, 6); --5598066
15033: IF PG_DEBUG in ('Y', 'C') THEN
15034: msc_sch_wb.atp_debug('Else l_PO_qty: ' || l_PO_qty);
15035: END IF;
15036: END IF;
15037: END IF;
15038: --bug3397904 end

Line 15043: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside atp_comp_flag R or C');

15039: IF ((l_atp_comp_flag = 'R') OR
15040: (l_atp_comp_flag = 'C')) THEN
15041: -- get resource requirements first
15042: IF PG_DEBUG in ('Y', 'C') THEN
15043: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside atp_comp_flag R or C');
15044: END IF;
15045:
15046: --(ssurendr) Bug 2865389 Call procedure get_process_effectivity
15047: --Details. Derive Item's Start Date by Offsetting

Line 15115: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);

15111: RAISE FND_API.G_EXC_ERROR;
15112: END IF;
15113:
15114: IF PG_DEBUG in ('Y', 'C') THEN
15115: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);
15116: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date = '||l_res_atp_date);
15117: END IF;
15118:
15119: -- Bug 1608755, in case l_res_atp_date is null, set l_comp_atp_date

Line 15116: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date = '||l_res_atp_date);

15112: END IF;
15113:
15114: IF PG_DEBUG in ('Y', 'C') THEN
15115: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);
15116: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date = '||l_res_atp_date);
15117: END IF;
15118:
15119: -- Bug 1608755, in case l_res_atp_date is null, set l_comp_atp_date
15120: -- to NULL so that we return single level better than going down.

Line 15141: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside atp_comp_flag Y or C');

15137:
15138: -- get component requirements first
15139:
15140: IF PG_DEBUG in ('Y', 'C') THEN
15141: msc_sch_wb.atp_debug('ATP_Check: ' || 'inside atp_comp_flag Y or C');
15142: END IF;
15143: BEGIN
15144: MSC_ATP_REQ.Get_Comp_Requirements(
15145: p_atp_record.instance_id,

Line 15184: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch Error');

15180: EXCEPTION
15181: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
15182: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
15183: IF PG_DEBUG in ('Y', 'C') THEN
15184: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch Error');
15185: END IF;
15186: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
15187:
15188: -- dsting 2764213

Line 15191: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');

15187:
15188: -- dsting 2764213
15189: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
15190: IF PG_DEBUG in ('Y', 'C') THEN
15191: msc_sch_wb.atp_debug('ATP_Check: Plan not found Error');
15192: END IF;
15193: --24x7
15194: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
15195: --bug 2854351

Line 15206: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item');

15202:
15203: -- krajan : 2752705
15204: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
15205: IF PG_DEBUG in ('Y', 'C') THEN
15206: msc_sch_wb.atp_debug('ATP_Check: Uncollected Item');
15207: END IF;
15208: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
15209: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
15210:

Line 15213: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');

15209: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
15210:
15211: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
15212: IF PG_DEBUG in ('Y', 'C') THEN
15213: msc_sch_wb.atp_debug ('ATP_Check:NO_MATCHING_DATE_IN_CAL');
15214: END IF;
15215: p_atp_record.error_code := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
15216: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
15217: END;

Line 15220: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);

15216: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
15217: END;
15218:
15219: IF PG_DEBUG in ('Y', 'C') THEN
15220: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);
15221: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date = '||l_comp_atp_date);
15222: END IF;
15223:
15224: -- Bug 1608755, in case l_comp_atp_date is null, set l_res_atp_date

Line 15221: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date = '||l_comp_atp_date);

15217: END;
15218:
15219: IF PG_DEBUG in ('Y', 'C') THEN
15220: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);
15221: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date = '||l_comp_atp_date);
15222: END IF;
15223:
15224: -- Bug 1608755, in case l_comp_atp_date is null, set l_res_atp_date
15225: -- to NULL so that we return single level better than going down.

Line 15242: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);

15238: RAISE FND_API.G_EXC_ERROR;
15239: END IF;
15240:
15241: IF PG_DEBUG in ('Y', 'C') THEN
15242: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);
15243: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);
15244: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);
15245: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
15246: END IF;

Line 15243: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);

15239: END IF;
15240:
15241: IF PG_DEBUG in ('Y', 'C') THEN
15242: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);
15243: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);
15244: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);
15245: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
15246: END IF;
15247:

Line 15244: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);

15240:
15241: IF PG_DEBUG in ('Y', 'C') THEN
15242: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);
15243: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);
15244: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);
15245: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
15246: END IF;
15247:
15248: -- Bug 1449555

Line 15245: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);

15241: IF PG_DEBUG in ('Y', 'C') THEN
15242: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);
15243: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_comp_atp_date ='||l_comp_atp_date);
15244: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_res_atp_date ='||l_res_atp_date);
15245: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
15246: END IF;
15247:
15248: -- Bug 1449555
15249: IF l_comp_atp_date is NOT NULL and

Line 15289: msc_sch_wb.atp_debug('l_atp_lt_offset_ship_date := ' || l_atp_lt_offset_ship_date);

15285: */
15286: l_atp_lt_offset_ship_date := l_temp_date;
15287:
15288: IF PG_DEBUG in ('Y', 'C') THEN
15289: msc_sch_wb.atp_debug('l_atp_lt_offset_ship_date := ' || l_atp_lt_offset_ship_date);
15290: END IF;
15291:
15292:
15293: ---bug 2798667: should be comparing with l_atp_lt_offset_ship_date instead of l_temp_date

Line 15309: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');

15305: -- single level result is better than
15306: -- going down to next level.
15307:
15308: IF PG_DEBUG in ('Y', 'C') THEN
15309: msc_sch_wb.atp_debug('ATP_Check: ' || 'single level results is better than multi-level');
15310: END IF;
15311:
15312:
15313: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 15329: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||

15325: --null, -- Bug 3241766
15326: C_ITEM_INFO_REC.dest_inv_item_id, -- Bug 3293163
15327: PF_ITEM_INFO_REC.dest_inv_item_id); -- Bug 3293163
15328: IF PG_DEBUG in ('Y', 'C') THEN
15329: msc_sch_wb.atp_debug('ATP_Check: ' || 'x_atp_supply_demand.level.count = '||
15330: x_atp_supply_demand.level.count);
15331: END IF;
15332:
15333: ELSE

Line 15343: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : ' || l_atp_pegging_tab.COUNT);

15339: --- this pegging in ATP_CHECK_SUBST
15340: MSC_ATP_PVT.G_FUTURE_PEGGING_ID := l_pegging_id;
15341:
15342: IF PG_DEBUG in ('Y', 'C') THEN
15343: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_pegging_tab : ' || l_atp_pegging_tab.COUNT);
15344: END IF;
15345:
15346: IF l_atp_pegging_tab.COUNT > 0 THEN
15347:

Line 15387: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);

15383: p_atp_record.ship_date := l_atp_lt_offset_ship_date;
15384:
15385:
15386: IF PG_DEBUG in ('Y', 'C') THEN
15387: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.ship_date ='||p_atp_record.ship_date);
15388: END IF;
15389: -- we will say the available quantity is
15390: -- exact the quantity we want to order.
15391: -- although this is not correct (

Line 15412: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate order date');

15408: --bug 3755704: Calculate order date and start date based on new date
15409:
15410: IF l_net_processing_lt > 0 THEN
15411: IF PG_DEBUG in ('Y', 'C') THEN
15412: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate order date');
15413: END IF;
15414: -- since it is a make case only calendar being used is
15415: --p_atp_record.manufacturing_cal_code
15416: l_order_date := MSC_CALENDAR.DATE_OFFSET(

Line 15424: msc_sch_wb.atp_debug('ATP_Check: ' || 'Net process lt is zero');

15420: (-1 * l_net_processing_lt), -1);
15421:
15422: ELSE
15423: IF PG_DEBUG in ('Y', 'C') THEN
15424: msc_sch_wb.atp_debug('ATP_Check: ' || 'Net process lt is zero');
15425: END IF;
15426: l_order_date := l_temp_date;
15427: END IF;
15428:

Line 15430: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_order_date := ' || l_order_date);

15426: l_order_date := l_temp_date;
15427: END IF;
15428:
15429: IF PG_DEBUG in ('Y', 'C') THEN
15430: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_order_date := ' || l_order_date);
15431: END IF;
15432: -- calculate start date only if PTF_flag is enabled for the plan
15433: IF (l_process_lt > 0) THEN
15434: IF PG_DEBUG in ('Y', 'C') THEN

Line 15435: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate start date');

15431: END IF;
15432: -- calculate start date only if PTF_flag is enabled for the plan
15433: IF (l_process_lt > 0) THEN
15434: IF PG_DEBUG in ('Y', 'C') THEN
15435: msc_sch_wb.atp_debug('ATP_Check: ' || 'Calculate start date');
15436: END IF;
15437: l_start_date := MSC_CALENDAR.DATE_OFFSET(
15438: p_atp_record.manufacturing_cal_code,
15439: p_atp_record.instance_id,

Line 15445: msc_sch_wb.atp_debug('ATP_Check: ' || 'process LT is 0');

15441: (-1 * l_process_lt), -1);
15442: ELSE
15443:
15444: IF PG_DEBUG in ('Y', 'C') THEN
15445: msc_sch_wb.atp_debug('ATP_Check: ' || 'process LT is 0');
15446: END IF;
15447: l_start_date := l_temp_date;
15448: END IF;
15449:

Line 15451: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);

15447: l_start_date := l_temp_date;
15448: END IF;
15449:
15450: IF PG_DEBUG in ('Y', 'C') THEN
15451: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_start_date := ' || l_start_date);
15452: END IF;
15453: -- end bug 3755704
15454:
15455: MSC_ATP_DB_UTILS.Update_Planned_Order(l_pegging_id,

Line 15485: msc_sch_wb.atp_debug('ATP_Check: ' || 'OSFM Coproducts Forward ');

15481: l_future_atp_period,
15482: l_future_atp_supply_demand,
15483: l_return_status);
15484: IF PG_DEBUG in ('Y', 'C') THEN
15485: msc_sch_wb.atp_debug('ATP_Check: ' || 'OSFM Coproducts Forward ');
15486: END IF;
15487: --- reset the sumamry flag back to summary flag corresponding to p_plan_id
15488: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
15489: --- OSFM Changes: update coproduct supply

Line 15492: msc_sch_wb.atp_debug('ATP_Check: ' || 'msc_plan_coproducts = ' || l_coproducts_flag);

15488: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
15489: --- OSFM Changes: update coproduct supply
15490: l_coproducts_flag := FND_Profile.value('MSC_PLAN_COPRODUCTS');
15491: IF PG_DEBUG in ('Y', 'C') THEN
15492: msc_sch_wb.atp_debug('ATP_Check: ' || 'msc_plan_coproducts = ' || l_coproducts_flag);
15493: END IF;
15494: IF ((l_atp_comp_flag = 'C') OR
15495: (l_atp_comp_flag = 'Y')) AND
15496: l_coproducts_flag = 'Y' THEN

Line 15499: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add Coproducts for item '||p_atp_record.inventory_item_id);

15495: (l_atp_comp_flag = 'Y')) AND
15496: l_coproducts_flag = 'Y' THEN
15497:
15498: IF PG_DEBUG in ('Y', 'C') THEN
15499: msc_sch_wb.atp_debug('ATP_Check: ' || 'Add Coproducts for item '||p_atp_record.inventory_item_id);
15500: END IF;
15501: MSC_ATP_PROC.Add_Coproducts(
15502: p_plan_id,
15503: p_atp_record.instance_id,

Line 15517: msc_sch_wb.atp_debug('ATP_Check: ' || 'After adding coproducts Forward');

15513: l_transaction_id --3766179
15514: );
15515:
15516: IF PG_DEBUG in ('Y', 'C') THEN
15517: msc_sch_wb.atp_debug('ATP_Check: ' || 'After adding coproducts Forward');
15518: END IF;
15519: END IF;
15520:
15521: END IF;

Line 15542: msc_sch_wb.atp_debug('ATP_Check: ' || 'adding the demand in case ATP qty for substitute is 0 but CTP not zero');

15538: AND (l_index >= 2) ) THEN
15539:
15540: --5283809 , adding the demand in case ATP qty for substitute is 0 but CTP not zero.
15541: IF PG_DEBUG in ('Y', 'C') THEN
15542: msc_sch_wb.atp_debug('ATP_Check: ' || 'adding the demand in case ATP qty for substitute is 0 but CTP not zero');
15543: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP QTY : ' || l_substitutes_rec.sub_atp_qty(l_index) );
15544: msc_sch_wb.atp_debug('ATP_Check: ' || 'CTP QTY : ' || l_atp_ctp_qty );
15545: END IF;
15546:

Line 15543: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP QTY : ' || l_substitutes_rec.sub_atp_qty(l_index) );

15539:
15540: --5283809 , adding the demand in case ATP qty for substitute is 0 but CTP not zero.
15541: IF PG_DEBUG in ('Y', 'C') THEN
15542: msc_sch_wb.atp_debug('ATP_Check: ' || 'adding the demand in case ATP qty for substitute is 0 but CTP not zero');
15543: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP QTY : ' || l_substitutes_rec.sub_atp_qty(l_index) );
15544: msc_sch_wb.atp_debug('ATP_Check: ' || 'CTP QTY : ' || l_atp_ctp_qty );
15545: END IF;
15546:
15547:

Line 15544: msc_sch_wb.atp_debug('ATP_Check: ' || 'CTP QTY : ' || l_atp_ctp_qty );

15540: --5283809 , adding the demand in case ATP qty for substitute is 0 but CTP not zero.
15541: IF PG_DEBUG in ('Y', 'C') THEN
15542: msc_sch_wb.atp_debug('ATP_Check: ' || 'adding the demand in case ATP qty for substitute is 0 but CTP not zero');
15543: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP QTY : ' || l_substitutes_rec.sub_atp_qty(l_index) );
15544: msc_sch_wb.atp_debug('ATP_Check: ' || 'CTP QTY : ' || l_atp_ctp_qty );
15545: END IF;
15546:
15547:
15548: IF NVL(MSC_ATP_PVT.G_DIAGNOSTIC_ATP,2) <> 1 THEN

Line 15581: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_demand_id );

15577: nvl(l_plan_id,p_plan_id), -- bug#10428207
15578: 0,
15579: l_demand_id);
15580: IF PG_DEBUG in ('Y', 'C') THEN
15581: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_demand_id );
15582: END IF;
15583:
15584: --5553953
15585: --in order to update the demand id for the pegging line, otherwise demand will remain in the system

Line 15605: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);

15601: and plan_id = p_plan_id
15602: returning inventory_item_id
15603: into l_inventory_item_id;
15604: IF PG_DEBUG in ('Y', 'C') THEN
15605: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
15606: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
15607: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
15608: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
15609: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));

Line 15606: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);

15602: returning inventory_item_id
15603: into l_inventory_item_id;
15604: IF PG_DEBUG in ('Y', 'C') THEN
15605: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
15606: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
15607: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
15608: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
15609: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
15610: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));

Line 15607: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);

15603: into l_inventory_item_id;
15604: IF PG_DEBUG in ('Y', 'C') THEN
15605: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
15606: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
15607: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
15608: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
15609: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
15610: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));
15611: END IF;

Line 15608: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));

15604: IF PG_DEBUG in ('Y', 'C') THEN
15605: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
15606: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
15607: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
15608: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
15609: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
15610: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));
15611: END IF;
15612: --5217510 demand id should be used from substitute record

Line 15609: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));

15605: msc_sch_wb.atp_debug('ATP_Check : l_atp_ctp_qty :' || l_atp_ctp_qty);
15606: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
15607: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
15608: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
15609: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
15610: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));
15611: END IF;
15612: --5217510 demand id should be used from substitute record
15613: IF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'

Line 15610: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));

15606: msc_sch_wb.atp_debug('ATP_Check : l_tem_net_dem :' || l_temp_net_demand);
15607: msc_sch_wb.atp_debug('ATP_Check : l_net_demand :' || l_net_demand);
15608: msc_sch_wb.atp_debug('ATP_Check : l_sub_atp_qty :' || l_substitutes_rec.sub_atp_qty(l_index));
15609: msc_sch_wb.atp_debug('ATP_Check : pegging_id :' || l_substitutes_rec.pegging_id(l_index));
15610: msc_sch_wb.atp_debug('ATP_Check : demand id :' || l_substitutes_rec.demand_id(l_index));
15611: END IF;
15612: --5217510 demand id should be used from substitute record
15613: IF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
15614: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN

Line 15622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

15618: --where parent_demand_id = l_demand_id
15619: and plan_id = p_plan_id;
15620: END IF;
15621: IF PG_DEBUG in ('Y', 'C') THEN
15622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15623: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
15624: END IF;
15625: -- update summary records removed in ODS case - for summary enhancement
15626: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN

Line 15623: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

15619: and plan_id = p_plan_id;
15620: END IF;
15621: IF PG_DEBUG in ('Y', 'C') THEN
15622: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15623: msc_sch_wb.atp_debug('ATP_Check: ' || ' MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
15624: END IF;
15625: -- update summary records removed in ODS case - for summary enhancement
15626: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
15627: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 15649: msc_sch_wb.atp_debug('Substitute Loop Ends with l_index := ' || l_index);

15645: and sd_date = trunc(l_requested_ship_date);
15646: commit;
15647: END IF;
15648: IF PG_DEBUG in ('Y', 'C') THEN
15649: msc_sch_wb.atp_debug('Substitute Loop Ends with l_index := ' || l_index);
15650: END IF;
15651: END IF;
15652: END IF;
15653: END LOOP; -- for subs array

Line 15673: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);

15669: end if;
15670: -- 4902658/5216528 ends update
15671: -- dsting diag_atp update the last good pegging record to make supply/demand match
15672: IF PG_DEBUG in ('Y', 'C') THEN
15673: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);
15674: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
15675: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);
15676: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);
15677: END IF;

Line 15674: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);

15670: -- 4902658/5216528 ends update
15671: -- dsting diag_atp update the last good pegging record to make supply/demand match
15672: IF PG_DEBUG in ('Y', 'C') THEN
15673: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);
15674: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
15675: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);
15676: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);
15677: END IF;
15678:

Line 15675: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);

15671: -- dsting diag_atp update the last good pegging record to make supply/demand match
15672: IF PG_DEBUG in ('Y', 'C') THEN
15673: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);
15674: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
15675: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);
15676: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);
15677: END IF;
15678:
15679: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'

Line 15676: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);

15672: IF PG_DEBUG in ('Y', 'C') THEN
15673: msc_sch_wb.atp_debug('diag_atp l_pegging_id ' || l_pegging_id);
15674: msc_sch_wb.atp_debug('last good pegging ' || l_last_good_pegging_id);
15675: msc_sch_wb.atp_debug('net_demand ' || l_net_demand);
15676: msc_sch_wb.atp_debug('subst last good pegging ' || MSC_ATP_SUBST.G_TOP_LAST_PO_PEGGING);
15677: END IF;
15678:
15679: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y'
15680: AND l_last_good_pegging_id is NULL

Line 15700: msc_sch_wb.atp_debug('Floor of l_net_demand_qty '||l_net_demand_qty);

15696: l_net_demand_qty := FLOOR(l_net_demand_qty);
15697: l_subst_existing_PO_qty := FLOOR(l_subst_existing_PO_qty);
15698:
15699: IF PG_DEBUG in ('Y', 'C') THEN
15700: msc_sch_wb.atp_debug('Floor of l_net_demand_qty '||l_net_demand_qty);
15701: msc_sch_wb.atp_debug('Floor of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
15702: END IF;
15703: ELSE
15704: l_net_demand_qty := trunc(l_net_demand_qty, 6);

Line 15701: msc_sch_wb.atp_debug('Floor of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);

15697: l_subst_existing_PO_qty := FLOOR(l_subst_existing_PO_qty);
15698:
15699: IF PG_DEBUG in ('Y', 'C') THEN
15700: msc_sch_wb.atp_debug('Floor of l_net_demand_qty '||l_net_demand_qty);
15701: msc_sch_wb.atp_debug('Floor of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
15702: END IF;
15703: ELSE
15704: l_net_demand_qty := trunc(l_net_demand_qty, 6);
15705: l_subst_existing_PO_qty := trunc(l_subst_existing_PO_qty, 6);

Line 15708: msc_sch_wb.atp_debug('trunc of l_net_demand_qty '||l_net_demand_qty);

15704: l_net_demand_qty := trunc(l_net_demand_qty, 6);
15705: l_subst_existing_PO_qty := trunc(l_subst_existing_PO_qty, 6);
15706:
15707: IF PG_DEBUG in ('Y', 'C') THEN
15708: msc_sch_wb.atp_debug('trunc of l_net_demand_qty '||l_net_demand_qty);
15709: msc_sch_wb.atp_debug('trunc of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
15710: END IF;
15711: END IF;
15712:

Line 15709: msc_sch_wb.atp_debug('trunc of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);

15705: l_subst_existing_PO_qty := trunc(l_subst_existing_PO_qty, 6);
15706:
15707: IF PG_DEBUG in ('Y', 'C') THEN
15708: msc_sch_wb.atp_debug('trunc of l_net_demand_qty '||l_net_demand_qty);
15709: msc_sch_wb.atp_debug('trunc of l_subst_existing_PO_qty '||l_subst_existing_PO_qty);
15710: END IF;
15711: END IF;
15712:
15713: MSC_ATP_DB_UTILS.Update_Planned_Order(l_last_good_pegging_id,

Line 15730: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

15726: END IF;
15727:
15728: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
15729: IF PG_DEBUG in ('Y', 'C') THEN
15730: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
15731: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id := ' || l_demand_id); --5211558
15732: END IF;
15733:
15734: --- adjust the demand here

Line 15731: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id := ' || l_demand_id); --5211558

15727:
15728: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
15729: IF PG_DEBUG in ('Y', 'C') THEN
15730: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
15731: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_demand_id := ' || l_demand_id); --5211558
15732: END IF;
15733:
15734: --- adjust the demand here
15735: IF (l_net_demand > 0) and (p_search =1) and (p_parent_pegging_id is null) THEN

Line 15763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

15759: l_return_status
15760: );
15761: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15762: IF PG_DEBUG in ('Y', 'C') THEN
15763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15764: END IF;
15765: RAISE FND_API.G_EXC_ERROR;
15766: END IF;
15767: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'

Line 15777: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check This scenario in backward case');

15773: and plan_id = p_plan_id;
15774: END IF;
15775:
15776: IF PG_DEBUG in ('Y', 'C') THEN
15777: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check This scenario in backward case');
15778: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG' || MSC_ATP_PVT.G_SUMMARY_FLAG);
15779: END IF;
15780:
15781: -- update summary records removed in ODS cases - for summary enhancement

Line 15778: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG' || MSC_ATP_PVT.G_SUMMARY_FLAG);

15774: END IF;
15775:
15776: IF PG_DEBUG in ('Y', 'C') THEN
15777: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check This scenario in backward case');
15778: msc_sch_wb.atp_debug('ATP_Check: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG' || MSC_ATP_PVT.G_SUMMARY_FLAG);
15779: END IF;
15780:
15781: -- update summary records removed in ODS cases - for summary enhancement
15782: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN

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

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

Line 15785: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

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

Line 15786: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

15782: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
15783: IF PG_DEBUG in ('Y', 'C') THEN
15784: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
15785: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
15786: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
15787: END IF;
15788:
15789: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
15790: p_plan_id,

Line 15840: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:'||

15836: p_atp_record.used_available_quantity :=
15837: l_used_available_quantity;
15838:
15839: IF PG_DEBUG in ('Y', 'C') THEN
15840: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:'||
15841: p_atp_record.requested_date_quantity);
15842: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.combined_requested_date_qty:'||
15843: p_atp_record.combined_requested_date_qty);
15844: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atp_date_quantity_this_level:'||

Line 15842: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.combined_requested_date_qty:'||

15838:
15839: IF PG_DEBUG in ('Y', 'C') THEN
15840: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:'||
15841: p_atp_record.requested_date_quantity);
15842: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.combined_requested_date_qty:'||
15843: p_atp_record.combined_requested_date_qty);
15844: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atp_date_quantity_this_level:'||
15845: l_used_available_quantity);
15846: END IF;

Line 15844: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atp_date_quantity_this_level:'||

15840: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.requested_date_quantity:'||
15841: p_atp_record.requested_date_quantity);
15842: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.combined_requested_date_qty:'||
15843: p_atp_record.combined_requested_date_qty);
15844: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.atp_date_quantity_this_level:'||
15845: l_used_available_quantity);
15846: END IF;
15847:
15848: -- now we want to find the future date and quantity

Line 15890: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');

15886: l_return_status
15887: );
15888: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15889: IF PG_DEBUG in ('Y', 'C') THEN
15890: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15891: END IF;
15892: RAISE FND_API.G_EXC_ERROR;
15893: END IF;
15894: END IF;

Line 15901: msc_sch_wb.atp_debug('ATP_Check: ' || 'not enough, set G_FIND_FUTURE_DATE=Y');

15897: -- that we can find the future date.
15898:
15899: IF p_search = 1 AND p_parent_pegging_id is null THEN
15900: IF PG_DEBUG in ('Y', 'C') THEN
15901: msc_sch_wb.atp_debug('ATP_Check: ' || 'not enough, set G_FIND_FUTURE_DATE=Y');
15902: END IF;
15903:
15904: -- 1275751
15905: p_atp_record.error_code := ATP_REQ_DATE_FAIL;

Line 15929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, bacward case 2');

15925: -- same demand as we need.
15926: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
15927: -- adjust the demand record
15928: IF PG_DEBUG in ('Y', 'C') THEN
15929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, bacward case 2');
15930: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand record, l_parent_pegging_id = '||l_parent_pegging_id);
15931: END IF;
15932: /* bug 1235225
15933: update mrp_atp_details_temp

Line 15930: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand record, l_parent_pegging_id = '||l_parent_pegging_id);

15926: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN
15927: -- adjust the demand record
15928: IF PG_DEBUG in ('Y', 'C') THEN
15929: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, bacward case 2');
15930: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand record, l_parent_pegging_id = '||l_parent_pegging_id);
15931: END IF;
15932: /* bug 1235225
15933: update mrp_atp_details_temp
15934: set supply_demand_quantity =

Line 15953: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand quantity, l_demand_id = '||l_demand_id);

15949: null,
15950: (l_peg_qty - l_net_demand));
15951:
15952: IF PG_DEBUG in ('Y', 'C') THEN
15953: msc_sch_wb.atp_debug('ATP_Check: ' || 'adjust demand quantity, l_demand_id = '||l_demand_id);
15954: END IF;
15955:
15956: -- dsting diag_atp do not adjust the demands for diagnostic atp
15957: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP <> 1 THEN

Line 15981: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');

15977: l_return_status
15978: );
15979: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15980: IF PG_DEBUG in ('Y', 'C') THEN
15981: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');
15982: END IF;
15983: RAISE FND_API.G_EXC_ERROR;
15984: END IF;
15985: --alloc_pp

Line 15996: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this Flag MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

15992: and plan_id = p_plan_id;
15993: END IF;
15994:
15995: IF PG_DEBUG in ('Y', 'C') THEN
15996: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this Flag MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
15997: END IF;
15998:
15999: -- update summary records removed in ODS cases - for summary enhancement
16000: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN

Line 16002: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');

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

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

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

Line 16004: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

16000: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND p_plan_id = -1 THEN
16001: IF PG_DEBUG in ('Y', 'C') THEN
16002: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');
16003: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
16004: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16005: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16006: END IF;
16007:
16008: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 16005: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

16001: IF PG_DEBUG in ('Y', 'C') THEN
16002: msc_sch_wb.atp_debug('ATP_Check: ' || 'update sd table for component');
16003: msc_sch_wb.atp_debug('ATP_Check: ' || 'in sumary mode, update msc-demands');
16004: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16005: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16006: END IF;
16007:
16008: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
16009: p_plan_id,

Line 16039: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);

16035: ELSIF p_search = 2 THEN
16036:
16037:
16038: IF PG_DEBUG in ('Y', 'C') THEN
16039: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);
16040: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);
16041: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||
16042: p_atp_record.quantity_ordered);
16043: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');

Line 16040: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);

16036:
16037:
16038: IF PG_DEBUG in ('Y', 'C') THEN
16039: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);
16040: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);
16041: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||
16042: p_atp_record.quantity_ordered);
16043: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');
16044: END IF;

Line 16041: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||

16037:
16038: IF PG_DEBUG in ('Y', 'C') THEN
16039: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);
16040: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);
16041: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||
16042: p_atp_record.quantity_ordered);
16043: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');
16044: END IF;
16045: -- future case

Line 16043: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');

16039: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward l_net_demand = '||l_net_demand);
16040: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.ship_date = '||p_atp_record.ship_date);
16041: msc_sch_wb.atp_debug('ATP_Check: ' || 'forward p_atp_record.quantity_ordered = '||
16042: p_atp_record.quantity_ordered);
16043: msc_sch_wb.atp_debug('ATP_Check: ' || 'Check this scenario, forward case');
16044: END IF;
16045: -- future case
16046:
16047: -- bug 1302394: we should adjust the date

Line 16075: msc_sch_wb.atp_debug('ATO update details_temp 12: ' || l_parent_pegging_id || ' date: ' || p_atp_record.ship_date);

16071: and pegging_id = l_parent_pegging_id
16072: and record_type = 3;
16073:
16074: IF PG_DEBUG in ('Y','C') THEN
16075: msc_sch_wb.atp_debug('ATO update details_temp 12: ' || l_parent_pegging_id || ' date: ' || p_atp_record.ship_date);
16076: END IF;
16077:
16078: UPDATE msc_demands
16079: --SET USING_ASSEMBLY_DEMAND_DATE = NVL(p_atp_record.ship_date,

Line 16129: msc_sch_wb.atp_debug('demand_id: ' || l_demand_id);

16125: WHERE demand_id = l_demand_id
16126: AND plan_id = p_plan_id
16127: returning inventory_item_id into l_inventory_item_id;
16128: IF PG_DEBUG in ('Y', 'C') THEN
16129: msc_sch_wb.atp_debug('demand_id: ' || l_demand_id);
16130: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
16131: END IF;
16132:
16133: /* time_phased_atp*/

Line 16130: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);

16126: AND plan_id = p_plan_id
16127: returning inventory_item_id into l_inventory_item_id;
16128: IF PG_DEBUG in ('Y', 'C') THEN
16129: msc_sch_wb.atp_debug('demand_id: ' || l_demand_id);
16130: msc_sch_wb.atp_debug('ATP_Check: ' || 'number of rows updated := ' || SQL%ROWCOUNT);
16131: END IF;
16132:
16133: /* time_phased_atp*/
16134: --5211558 not needed here as this is executed in forward pass

Line 16150: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');

16146: NULL --bug3397904
16147: );
16148: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
16149: IF PG_DEBUG in ('Y', 'C') THEN
16150: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
16151: END IF;
16152: RAISE FND_API.G_EXC_ERROR;
16153: END IF;
16154: --alloc_pp

Line 16164: msc_sch_wb.atp_debug('ATP_Check: ' || 'inventory_item_id := ' || l_inventory_item_id);

16160: and plan_id = p_plan_id;
16161: END IF;
16162:
16163: IF PG_DEBUG in ('Y', 'C') THEN
16164: msc_sch_wb.atp_debug('ATP_Check: ' || 'inventory_item_id := ' || l_inventory_item_id);
16165: END IF;
16166: -- update summary records removed in ODS cases - for summary enhancement
16167: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND ( SQL%ROWCOUNT > 1) AND p_plan_id = -1 THEN
16168:

Line 16170: msc_sch_wb.atp_debug('ATP_Check: ' || 'old and new dates are not same');

16166: -- update summary records removed in ODS cases - for summary enhancement
16167: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND ( SQL%ROWCOUNT > 1) AND p_plan_id = -1 THEN
16168:
16169: IF PG_DEBUG in ('Y', 'C') THEN
16170: msc_sch_wb.atp_debug('ATP_Check: ' || 'old and new dates are not same');
16171: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary for old date');
16172: END IF;
16173: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
16174: p_plan_id,

Line 16171: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary for old date');

16167: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') AND ( SQL%ROWCOUNT > 1) AND p_plan_id = -1 THEN
16168:
16169: IF PG_DEBUG in ('Y', 'C') THEN
16170: msc_sch_wb.atp_debug('ATP_Check: ' || 'old and new dates are not same');
16171: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary for old date');
16172: END IF;
16173: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
16174: p_plan_id,
16175: p_atp_record.organization_id,

Line 16199: msc_sch_wb.atp_debug('ATP_Check: ' || 'update the qty on new date ');

16195: commit;
16196:
16197: --- if record exists then update
16198: IF PG_DEBUG in ('Y', 'C') THEN
16199: msc_sch_wb.atp_debug('ATP_Check: ' || 'update the qty on new date ');
16200: END IF;
16201: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
16202: p_plan_id,
16203: p_atp_record.organization_id,

Line 16225: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');

16221:
16222: IF SQL%NOTFOUND THEN
16223: -- record doesn't exists. insert the record
16224: IF PG_DEBUG in ('Y', 'C') THEN
16225: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
16226: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
16227: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16228: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
16229: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);

Line 16226: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);

16222: IF SQL%NOTFOUND THEN
16223: -- record doesn't exists. insert the record
16224: IF PG_DEBUG in ('Y', 'C') THEN
16225: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
16226: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
16227: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16228: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
16229: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
16230: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);

Line 16227: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);

16223: -- record doesn't exists. insert the record
16224: IF PG_DEBUG in ('Y', 'C') THEN
16225: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
16226: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
16227: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16228: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
16229: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
16230: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
16231: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);

Line 16228: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);

16224: IF PG_DEBUG in ('Y', 'C') THEN
16225: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
16226: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
16227: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16228: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
16229: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
16230: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
16231: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);
16232: END IF;

Line 16229: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);

16225: msc_sch_wb.atp_debug('ATP_Check: ' || 'insert qty on new date');
16226: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
16227: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16228: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
16229: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
16230: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
16231: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);
16232: END IF;
16233: BEGIN

Line 16230: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);

16226: msc_sch_wb.atp_debug('ATP_Check: ' || 'plan_id := ' || p_plan_id);
16227: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inventory_item_id := ' || l_inventory_item_id);
16228: msc_sch_wb.atp_debug('ATP_Check: ' || 'organization_id := ' || p_atp_record.organization_id);
16229: msc_sch_wb.atp_debug('ATP_Check: ' || 'instance_id := ' || p_atp_record.instance_id);
16230: msc_sch_wb.atp_debug('ATP_Check: ' || 'ship_date := ' || p_atp_record.ship_date);
16231: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);
16232: END IF;
16233: BEGIN
16234: MSC_ATP_DB_UTILS.INSERT_SUMMARY_SD_ROW(p_plan_id,

Line 16231: msc_sch_wb.atp_debug('ATP_Check: ' || 'quantity_ordered := ' || p_atp_record.quantity_ordered);

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

Line 16269: msc_sch_wb.atp_debug('ATP_Check: ' || 'do atp check at a supplier site');

16265: ELSE
16266: -- doing atp check in an vendor site
16267:
16268: IF PG_DEBUG in ('Y', 'C') THEN
16269: msc_sch_wb.atp_debug('ATP_Check: ' || 'do atp check at a supplier site');
16270: END IF;
16271:
16272: l_requested_ship_date := p_atp_record.requested_ship_date;
16273: IF PG_DEBUG in ('Y', 'C') THEN

Line 16274: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

16270: END IF;
16271:
16272: l_requested_ship_date := p_atp_record.requested_ship_date;
16273: IF PG_DEBUG in ('Y', 'C') THEN
16274: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16275: END IF;
16276: -- get the following information
16277: -- requested_date_quantity
16278: -- atp_date_this_level

Line 16300: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);

16296:
16297: END IF;
16298:
16299: IF PG_DEBUG in ('Y', 'C') THEN
16300: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16301: END IF;
16302:
16303: /* Modularize Item and Org Info */
16304:

Line 16307: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_HIERARCHY_PROFILE = 2');

16303: /* Modularize Item and Org Info */
16304:
16305: IF (MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 2) THEN
16306: IF PG_DEBUG in ('Y', 'C') THEN
16307: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_HIERARCHY_PROFILE = 2');
16308: END IF;
16309: p_atp_record.demand_class :=
16310: MSC_AATP_FUNC.Get_Hierarchy_Demand_Class(MSC_ATP_PVT.G_PARTNER_ID,
16311: MSC_ATP_PVT.G_PARTNER_SITE_ID,

Line 16319: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');

16315: l_requested_ship_date,
16316: NULL, -- level_id
16317: p_atp_record.Demand_Class);
16318: IF PG_DEBUG in ('Y', 'C') THEN
16319: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');
16320: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);
16321: END IF;
16322:
16323: --diag_atp

Line 16320: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);

16316: NULL, -- level_id
16317: p_atp_record.Demand_Class);
16318: IF PG_DEBUG in ('Y', 'C') THEN
16319: msc_sch_wb.atp_debug('ATP_Check: ' || 'after getting the dummy demand class');
16320: msc_sch_wb.atp_debug('ATP_Check: ' || 'p_atp_record.demand_class = '||p_atp_record.demand_class);
16321: END IF;
16322:
16323: --diag_atp
16324: l_allocation_rule_name := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;

Line 16334: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);

16330: l_sysdate := sysdate;
16331:
16332: l_atp_request_date := l_requested_ship_date;
16333: IF PG_DEBUG in ('Y', 'C') THEN
16334: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
16335: END IF;
16336: -- Supplier Capacity and Lead Time (SCLT) changes
16337: -- Fixed + Variable is discontinued, Instead item's processing lead time
16338: -- essentially full_lead_time is used. Initialize local variables.

Line 16371: msc_sch_wb.atp_debug('ATP_Check: ' || 'After pre-process Lead Time Offset ' );

16367: l_sysdate,
16368: l_pre_pro_lt, 1);
16369:
16370: IF PG_DEBUG in ('Y', 'C') THEN
16371: msc_sch_wb.atp_debug('ATP_Check: ' || 'After pre-process Lead Time Offset ' );
16372: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||
16373: to_char(l_dock_date, 'DD-MON-YYYY'));
16374: END IF;
16375: ELSE

Line 16372: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||

16368: l_pre_pro_lt, 1);
16369:
16370: IF PG_DEBUG in ('Y', 'C') THEN
16371: msc_sch_wb.atp_debug('ATP_Check: ' || 'After pre-process Lead Time Offset ' );
16372: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||
16373: to_char(l_dock_date, 'DD-MON-YYYY'));
16374: END IF;
16375: ELSE
16376: l_dock_date := l_sysdate;

Line 16392: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Process Lead Time Offset ' );

16388: l_dock_date,
16389: p_atp_record.atp_lead_time, 1);
16390: END IF;
16391: IF PG_DEBUG in ('Y', 'C') THEN
16392: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Process Lead Time Offset ' );
16393: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||
16394: to_char(l_dock_date, 'DD-MON-YYYY'));
16395: END IF;
16396: -- End Supplier Capacity and Lead Time changes

Line 16393: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||

16389: p_atp_record.atp_lead_time, 1);
16390: END IF;
16391: IF PG_DEBUG in ('Y', 'C') THEN
16392: msc_sch_wb.atp_debug('ATP_Check: ' || 'After Process Lead Time Offset ' );
16393: msc_sch_wb.atp_debug('ATP_Check: ' || 'After atp dock date = '||
16394: to_char(l_dock_date, 'DD-MON-YYYY'));
16395: END IF;
16396: -- End Supplier Capacity and Lead Time changes
16397: l_atp_ship_date := GREATEST(l_dock_date, l_requested_ship_date, MSC_ATP_PVT.G_PTF_DATE);

Line 16404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);

16400: END IF;
16401: END IF;
16402: 3316028 (Enforce Pur LT) - changes end */
16403: IF PG_DEBUG in ('Y', 'C') THEN
16404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
16405: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_ship_date := ' || l_atp_ship_date);
16406: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
16407: END IF;
16408:

Line 16405: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_ship_date := ' || l_atp_ship_date);

16401: END IF;
16402: 3316028 (Enforce Pur LT) - changes end */
16403: IF PG_DEBUG in ('Y', 'C') THEN
16404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
16405: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_ship_date := ' || l_atp_ship_date);
16406: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
16407: END IF;
16408:
16409: --diag_atp

Line 16406: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

16402: 3316028 (Enforce Pur LT) - changes end */
16403: IF PG_DEBUG in ('Y', 'C') THEN
16404: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_request_date := ' || l_atp_request_date);
16405: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_ship_date := ' || l_atp_ship_date);
16406: msc_sch_wb.atp_debug('ATP_Check: ' || 'G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
16407: END IF;
16408:
16409: --diag_atp
16410: /* IF p_search = BACKWARD_SCHEDULING AND

Line 16414: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sys date, ptf check failed for supplier');

16410: /* IF p_search = BACKWARD_SCHEDULING AND
16411: ((l_atp_request_date < l_sysdate) OR (l_requested_ship_date < MSC_ATP_PVT.G_PTF_DATE)) THEN
16412: l_requested_date_quantity := 0;
16413: IF PG_DEBUG in ('Y', 'C') THEN
16414: msc_sch_wb.atp_debug('ATP_Check: ' || 'Sys date, ptf check failed for supplier');
16415: END IF;
16416: ELSE
16417: */
16418: -- Supplier Capacity and Lead Time (SCLT) changes

Line 16423: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);

16419: IF (g_sup_cap_cum_date IS NULL) THEN
16420: g_sup_cap_cum_date := MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date;
16421: END IF;
16422: IF PG_DEBUG in ('Y', 'C') THEN
16423: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
16424: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Start Date := ' ||
16425: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date);
16426: msc_sch_wb.atp_debug('ATP_Check: ' || 'g_sup_cap_cum_date := ' || g_sup_cap_cum_date);
16427: END IF;

Line 16424: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Start Date := ' ||

16420: g_sup_cap_cum_date := MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date;
16421: END IF;
16422: IF PG_DEBUG in ('Y', 'C') THEN
16423: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
16424: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Start Date := ' ||
16425: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date);
16426: msc_sch_wb.atp_debug('ATP_Check: ' || 'g_sup_cap_cum_date := ' || g_sup_cap_cum_date);
16427: END IF;
16428:

Line 16426: msc_sch_wb.atp_debug('ATP_Check: ' || 'g_sup_cap_cum_date := ' || g_sup_cap_cum_date);

16422: IF PG_DEBUG in ('Y', 'C') THEN
16423: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
16424: msc_sch_wb.atp_debug('ATP_Check: ' || 'Plan Start Date := ' ||
16425: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date);
16426: msc_sch_wb.atp_debug('ATP_Check: ' || 'g_sup_cap_cum_date := ' || g_sup_cap_cum_date);
16427: END IF;
16428:
16429:
16430: -- ship_rec_cal changes begin

Line 16477: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);

16473: -- bug 1512366
16474: p_atp_record.requested_ship_date:=l_requested_ship_date;
16475:
16476: IF PG_DEBUG in ('Y', 'C') THEN
16477: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);
16478: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16479: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);
16480: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);
16481: END IF;

Line 16478: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);

16474: p_atp_record.requested_ship_date:=l_requested_ship_date;
16475:
16476: IF PG_DEBUG in ('Y', 'C') THEN
16477: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);
16478: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16479: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);
16480: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);
16481: END IF;
16482: IF l_requested_date_quantity >= p_atp_record.quantity_ordered THEN

Line 16479: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);

16475:
16476: IF PG_DEBUG in ('Y', 'C') THEN
16477: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);
16478: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16479: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);
16480: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);
16481: END IF;
16482: IF l_requested_date_quantity >= p_atp_record.quantity_ordered THEN
16483:

Line 16480: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);

16476: IF PG_DEBUG in ('Y', 'C') THEN
16477: msc_sch_wb.atp_debug('ATP_Check: ' || 'after call supplier, x_atp_supply_demand'||x_atp_supply_demand.supplier_id.COUNT);
16478: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16479: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_date_quantity := ' || l_requested_date_quantity);
16480: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_quantity_this_level := ' || l_atp_date_quantity_this_level);
16481: END IF;
16482: IF l_requested_date_quantity >= p_atp_record.quantity_ordered THEN
16483:
16484: -- we meet the requirements!!!

Line 16523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_name := ' || l_inv_item_name);

16519: l_inv_item_name := G_ITEM_INFO_REC.item_name;
16520: END IF;
16521:
16522: IF PG_DEBUG in ('Y', 'C') THEN
16523: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_name := ' || l_inv_item_name);
16524: END IF;
16525:
16526: /*l_inv_item_name := MSC_ATP_FUNC.get_inv_item_name(p_atp_record.instance_id,
16527: p_atp_record.inventory_item_id,

Line 16586: msc_sch_wb.atp_debug('set required_date supplier demand');

16582: l_pegging_rec.supply_demand_date:= l_requested_ship_date;
16583:
16584: -- dsting ATO 2465370
16585: IF PG_DEBUG in ('Y','C') THEN
16586: msc_sch_wb.atp_debug('set required_date supplier demand');
16587: END IF;
16588: IF (p_search = BACKWARD_SCHEDULING) THEN
16589: -- Commented for bug 2748730. G_END_OF_DAY not required here.
16590: -- We will do that inside the procedure Add_Pegging

Line 16724: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');

16720: /** code commented for time being. Will be removed after code review
16721: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
16722: IF (p_search = 1) THEN
16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
16725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16727: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16728: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));

Line 16725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);

16721: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN
16722: IF (p_search = 1) THEN
16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
16725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16727: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16728: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
16729: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

Line 16726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);

16722: IF (p_search = 1) THEN
16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
16725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16727: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16728: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
16729: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16730: END IF;

Line 16727: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);

16723: IF PG_DEBUG in ('Y', 'C') THEN
16724: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
16725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16727: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16728: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
16729: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16730: END IF;
16731: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 16728: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));

16724: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table , backward case');
16725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16727: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16728: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
16729: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16730: END IF;
16731: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
16732: p_plan_id,

Line 16729: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

16725: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_requested_ship_date := ' || l_requested_ship_date);
16726: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16727: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16728: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || least(l_requested_date_quantity, p_atp_record.quantity_ordered));
16729: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16730: END IF;
16731: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
16732: p_plan_id,
16733: null,

Line 16753: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');

16749: and supplier_id = p_atp_record.supplier_id
16750: and supplier_site_id = p_atp_record.supplier_site_id
16751: and sd_date = trunc(l_requested_ship_date);
16752: IF PG_DEBUG in ('Y', 'C') THEN
16753: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');
16754: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);
16755: END IF;
16756:
16757: IF SQL%NOTFOUND THEN

Line 16754: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);

16750: and supplier_site_id = p_atp_record.supplier_site_id
16751: and sd_date = trunc(l_requested_ship_date);
16752: IF PG_DEBUG in ('Y', 'C') THEN
16753: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');
16754: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);
16755: END IF;
16756:
16757: IF SQL%NOTFOUND THEN
16758: IF PG_DEBUG in ('Y', 'C') THEN

Line 16759: msc_sch_wb.atp_debug('ATP_Check: ' || 'update failed, insert a row');

16755: END IF;
16756:
16757: IF SQL%NOTFOUND THEN
16758: IF PG_DEBUG in ('Y', 'C') THEN
16759: msc_sch_wb.atp_debug('ATP_Check: ' || 'update failed, insert a row');
16760: END IF;
16761: BEGIN
16762: insert into /*+ INDEX(msc_atp_summary_sup MSC_ATP_SUMMARY_SUP_U1) *//* msc_atp_summary_sup
16763: (plan_id,

Line 16815: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');

16811: END IF;
16812: commit;
16813: ELSIF l_atp_date_this_level IS NOT NULL THEN
16814: IF PG_DEBUG in ('Y', 'C') THEN
16815: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
16816: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16817: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16819: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);

Line 16816: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

16812: commit;
16813: ELSIF l_atp_date_this_level IS NOT NULL THEN
16814: IF PG_DEBUG in ('Y', 'C') THEN
16815: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
16816: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16817: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16819: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16820: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);

Line 16817: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);

16813: ELSIF l_atp_date_this_level IS NOT NULL THEN
16814: IF PG_DEBUG in ('Y', 'C') THEN
16815: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
16816: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16817: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16819: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16820: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
16821: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

Line 16818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);

16814: IF PG_DEBUG in ('Y', 'C') THEN
16815: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
16816: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16817: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16819: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16820: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
16821: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16822: END IF;

Line 16819: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);

16815: msc_sch_wb.atp_debug('ATP_Check: ' || 'Update summary table, forward case');
16816: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16817: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16819: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16820: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
16821: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16822: END IF;
16823: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,

Line 16820: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);

16816: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16817: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16819: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16820: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
16821: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16822: END IF;
16823: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
16824: p_plan_id,

Line 16821: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');

16817: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level := ' || l_atp_date_this_level);
16818: msc_sch_wb.atp_debug('ATP_Check: ' || 'Supplier_id := ' || p_atp_record.supplier_id);
16819: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_inv_item_id := ' || l_inv_item_id);
16820: msc_sch_wb.atp_debug('ATP_Check: ' || ' Quantity := ' || p_atp_record.quantity_ordered);
16821: msc_sch_wb.atp_debug('ATP_Check: ' || 'First try to update');
16822: END IF;
16823: MSC_ATP_PROC.SHOW_SUMMARY_QUANTITY(p_atp_record.instance_id,
16824: p_plan_id,
16825: p_atp_record.organization_id,

Line 16845: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');

16841: and supplier_id = p_atp_record.supplier_id
16842: and supplier_site_id = p_atp_record.supplier_site_id
16843: and sd_date = trunc(l_atp_date_this_level);
16844: IF PG_DEBUG in ('Y', 'C') THEN
16845: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');
16846: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);
16847: END IF;
16848:
16849: IF SQL%NOTFOUND THEN

Line 16846: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);

16842: and supplier_site_id = p_atp_record.supplier_site_id
16843: and sd_date = trunc(l_atp_date_this_level);
16844: IF PG_DEBUG in ('Y', 'C') THEN
16845: msc_sch_wb.atp_debug('ATP_Check: ' || 'After update of msc_atp_summary_sup');
16846: msc_sch_wb.atp_debug('ATP_Check: ' || ' Number of rows updated := ' || SQL%ROWCOUNT);
16847: END IF;
16848:
16849: IF SQL%NOTFOUND THEN
16850: IF PG_DEBUG in ('Y', 'C') THEN

Line 16851: msc_sch_wb.atp_debug('ATP_Check: ' || 'update failed, insert a row');

16847: END IF;
16848:
16849: IF SQL%NOTFOUND THEN
16850: IF PG_DEBUG in ('Y', 'C') THEN
16851: msc_sch_wb.atp_debug('ATP_Check: ' || 'update failed, insert a row');
16852: END IF;
16853: BEGIN
16854: insert /*+ INDEX(msc_atp_summary_sup MSC_ATP_SUMMARY_SUP_U1) *//* into msc_atp_summary_sup
16855: (plan_id,

Line 16917: msc_sch_wb.atp_debug('ATP_Check: ' || 'in get_res_requirements we are here 2');

16913:
16914: END LOOP;
16915:
16916: IF PG_DEBUG in ('Y', 'C') THEN
16917: msc_sch_wb.atp_debug('ATP_Check: ' || 'in get_res_requirements we are here 2');
16918: END IF;
16919:
16920: IF p_atp_record.insert_flag <> 0 THEN
16921: MSC_ATP_DB_UTILS.move_SD_temp_into_mrp_details(l_pegging_id,

Line 16928: msc_sch_wb.atp_debug('ATP_Check: ' || 'children_type: ' || p_atp_record.children_type);

16924:
16925: END IF;
16926:
16927: IF PG_DEBUG in ('Y', 'C') THEN
16928: msc_sch_wb.atp_debug('ATP_Check: ' || 'children_type: ' || p_atp_record.children_type);
16929: msc_sch_wb.atp_debug('***** End ATP_Check Procedure *****');
16930: END IF;
16931:
16932:

Line 16929: msc_sch_wb.atp_debug('***** End ATP_Check Procedure *****');

16925: END IF;
16926:
16927: IF PG_DEBUG in ('Y', 'C') THEN
16928: msc_sch_wb.atp_debug('ATP_Check: ' || 'children_type: ' || p_atp_record.children_type);
16929: msc_sch_wb.atp_debug('***** End ATP_Check Procedure *****');
16930: END IF;
16931:
16932:
16933: EXCEPTION

Line 16938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Invalid OSS setup detected');

16934:
16935: WHEN MSC_ATP_PVT.INVALID_OSS_SOURCE THEN
16936:
16937: IF PG_DEBUG in ('Y', 'C') THEN
16938: msc_sch_wb.atp_debug('ATP_Check: ' || 'Invalid OSS setup detected');
16939: END IF;
16940: p_atp_record.requested_date_quantity := 0;
16941: p_atp_record.available_quantity := 0;
16942: p_atp_record.ship_date := null;

Line 16950: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0');

16946:
16947: -- 2400614 : krajan: For detecting assignment set mismatch
16948: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
16949: IF PG_DEBUG in ('Y', 'C') THEN
16950: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0');
16951: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch detected');
16952: END IF;
16953: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
16954: x_return_status := MSC_ATP_PVT.G_ATO_SRC_MISMATCH ; --- krajan : indicates mismatch

Line 16951: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch detected');

16947: -- 2400614 : krajan: For detecting assignment set mismatch
16948: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
16949: IF PG_DEBUG in ('Y', 'C') THEN
16950: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0');
16951: msc_sch_wb.atp_debug('ATP_Check: ' || 'Source Mismatch detected');
16952: END IF;
16953: p_atp_record.error_code := MSC_ATP_PVT.ASSIGN_SET_NOT_IN_SYNC;
16954: x_return_status := MSC_ATP_PVT.G_ATO_SRC_MISMATCH ; --- krajan : indicates mismatch
16955: --- Primarily for processing in get_comp_requirements

Line 16959: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.1');

16955: --- Primarily for processing in get_comp_requirements
16956: -- dsting 2764213
16957: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
16958: IF PG_DEBUG in ('Y', 'C') THEN
16959: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.1');
16960: msc_sch_wb.atp_debug('ATP_Check: Plan not found for the requested item or component');
16961: END IF;
16962: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
16963: --bug 2854351:

Line 16960: msc_sch_wb.atp_debug('ATP_Check: Plan not found for the requested item or component');

16956: -- dsting 2764213
16957: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
16958: IF PG_DEBUG in ('Y', 'C') THEN
16959: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.1');
16960: msc_sch_wb.atp_debug('ATP_Check: Plan not found for the requested item or component');
16961: END IF;
16962: if (NVL(MSC_ATP_PVT.G_DOWNTIME_HIT, 'N') = 'Y') then
16963: --bug 2854351:
16964: --p_atp_record.error_code := MSC_ATP_PVT.TRY_ATP_LATER;

Line 16974: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.2');

16970:
16971: -- krajan 2752705
16972: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
16973: IF PG_DEBUG in ('Y', 'C') THEN
16974: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.2');
16975: msc_sch_wb.atp_debug('ATP_Check: The item is not collected');
16976: END IF;
16977: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
16978: x_return_status := MSC_ATP_PVT.G_ATO_UNCOLL_ITEM;

Line 16975: msc_sch_wb.atp_debug('ATP_Check: The item is not collected');

16971: -- krajan 2752705
16972: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
16973: IF PG_DEBUG in ('Y', 'C') THEN
16974: msc_sch_wb.atp_debug('something wrong in the ATP_Check 0.2');
16975: msc_sch_wb.atp_debug('ATP_Check: The item is not collected');
16976: END IF;
16977: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
16978: x_return_status := MSC_ATP_PVT.G_ATO_UNCOLL_ITEM;
16979:

Line 16982: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');

16978: x_return_status := MSC_ATP_PVT.G_ATO_UNCOLL_ITEM;
16979:
16980: WHEN FND_API.G_EXC_ERROR THEN
16981: IF PG_DEBUG in ('Y', 'C') THEN
16982: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');
16983: END IF;
16984: x_return_status := FND_API.G_RET_STS_ERROR;
16985: IF PG_DEBUG in ('Y', 'C') THEN
16986: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');

Line 16986: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');

16982: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');
16983: END IF;
16984: x_return_status := FND_API.G_RET_STS_ERROR;
16985: IF PG_DEBUG in ('Y', 'C') THEN
16986: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');
16987: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error := ' || SQLerrm);
16988: END IF;
16989:
16990: WHEN NO_MATCHING_DATE_IN_CAL THEN

Line 16987: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error := ' || SQLerrm);

16983: END IF;
16984: x_return_status := FND_API.G_RET_STS_ERROR;
16985: IF PG_DEBUG in ('Y', 'C') THEN
16986: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');
16987: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error := ' || SQLerrm);
16988: END IF;
16989:
16990: WHEN NO_MATCHING_DATE_IN_CAL THEN
16991: IF PG_DEBUG in ('Y', 'C') THEN

Line 16992: msc_sch_wb.atp_debug('MAtching cal date not found, in atp_check');

16988: END IF;
16989:
16990: WHEN NO_MATCHING_DATE_IN_CAL THEN
16991: IF PG_DEBUG in ('Y', 'C') THEN
16992: msc_sch_wb.atp_debug('MAtching cal date not found, in atp_check');
16993: END IF;
16994: p_atp_record.error_code := NO_MATCHING_CAL_DATE;
16995: --x_return_status := FND_API.G_RET_STS_ERROR; --bug3583705
16996: RAISE NO_MATCHING_DATE_IN_CAL;

Line 17001: msc_sch_wb.atp_debug('No ATP Rule for Item and Org., in atp_check');

16997:
16998: /************ Bug 1510853 ATP Rule Check ************/
16999: WHEN EXC_NO_ATP_RULE THEN
17000: IF PG_DEBUG in ('Y', 'C') THEN
17001: msc_sch_wb.atp_debug('No ATP Rule for Item and Org., in atp_check');
17002: END IF;
17003: p_atp_record.error_code := ATP_BAD_RULE;
17004: x_return_status := FND_API.G_RET_STS_ERROR;
17005:

Line 17009: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);

17005:
17006: -- Error Handling Modifications
17007: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
17008: IF PG_DEBUG in ('Y', 'C') THEN
17009: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17010: msc_sch_wb.atp_debug('ATP_Check: Invalid Objects found, sqlcode= '||sqlcode);
17011: END IF;
17012:
17013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 17010: msc_sch_wb.atp_debug('ATP_Check: Invalid Objects found, sqlcode= '||sqlcode);

17006: -- Error Handling Modifications
17007: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
17008: IF PG_DEBUG in ('Y', 'C') THEN
17009: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17010: msc_sch_wb.atp_debug('ATP_Check: Invalid Objects found, sqlcode= '||sqlcode);
17011: END IF;
17012:
17013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17014: IF (p_atp_record.error_code IS NULL) or (p_atp_record.error_code IN (0,61,150)) THEN

Line 17026: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);

17022:
17023: -- rajjain 02/20/2003 Bug 2813095
17024: WHEN ALLOC_ATP_INVALID_PROFILE THEN
17025: IF PG_DEBUG in ('Y', 'C') THEN
17026: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17027: END IF;
17028: p_atp_record.error_code := INVALID_ALLOC_PROFILE_SETUP;
17029: x_return_status := FND_API.G_RET_STS_ERROR;
17030:

Line 17033: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');

17029: x_return_status := FND_API.G_RET_STS_ERROR;
17030:
17031: WHEN OTHERS THEN
17032: IF PG_DEBUG in ('Y', 'C') THEN
17033: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');
17034: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17035: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);
17036: END IF;
17037:

Line 17034: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);

17030:
17031: WHEN OTHERS THEN
17032: IF PG_DEBUG in ('Y', 'C') THEN
17033: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');
17034: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17035: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);
17036: END IF;
17037:
17038: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 17035: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);

17031: WHEN OTHERS THEN
17032: IF PG_DEBUG in ('Y', 'C') THEN
17033: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');
17034: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17035: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);
17036: END IF;
17037:
17038: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17039:

Line 17054: msc_sch_wb.atp_debug('ATP_CHECK: NO_MATCHING_CAL_DATE');

17050: IF (p_atp_record.error_code IS NULL) or (p_atp_record.error_code IN (0,61,150)) THEN
17051: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
17052: p_atp_record.error_code := NO_MATCHING_CAL_DATE;
17053: IF PG_DEBUG in ('Y', 'C') THEN
17054: msc_sch_wb.atp_debug('ATP_CHECK: NO_MATCHING_CAL_DATE');
17055: END IF;
17056: ELSE
17057: p_atp_record.error_code := ATP_PROCESSING_ERROR; -- ATP Processing Error
17058: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705

Line 17059: msc_sch_wb.atp_debug('ATP_CHECK: ATP_PROCESSING_ERROR');

17055: END IF;
17056: ELSE
17057: p_atp_record.error_code := ATP_PROCESSING_ERROR; -- ATP Processing Error
17058: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705
17059: msc_sch_wb.atp_debug('ATP_CHECK: ATP_PROCESSING_ERROR');
17060: END IF;
17061: END IF;
17062: END IF;
17063:

Line 17189: msc_sch_wb.atp_debug('***** Begin Call_Schedule Procedure *****');

17185: l_atp_progess_bar varchar2(1) := nvl(fnd_profile.value('MRP_ATP_PROGRESS_BAR'),'Y'); --7419485
17186: BEGIN
17187:
17188: IF PG_DEBUG in ('Y', 'C') THEN
17189: msc_sch_wb.atp_debug('***** Begin Call_Schedule Procedure *****');
17190: END IF;
17191:
17192: -- Initialize global variables to work in a connection pooling env
17193: G_INV_CTP := FND_PROFILE.value('INV_CTP') ;

Line 17221: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: G_INV_CTP : '||G_INV_CTP);

17217: x_return_status := FND_API.G_RET_STS_SUCCESS;
17218:
17219: -- Bug 2356892
17220: IF PG_DEBUG in ('Y', 'C') THEN
17221: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: G_INV_CTP : '||G_INV_CTP);
17222: END IF;
17223: IF (NVL(G_INV_CTP,-1) not in (4,5)) THEN
17224: G_INV_CTP := 5;
17225: IF PG_DEBUG in ('Y', 'C') THEN

Line 17226: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: Setting G_INV_CTP to 5');

17222: END IF;
17223: IF (NVL(G_INV_CTP,-1) not in (4,5)) THEN
17224: G_INV_CTP := 5;
17225: IF PG_DEBUG in ('Y', 'C') THEN
17226: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: Setting G_INV_CTP to 5');
17227: END IF;
17228: END IF;
17229:
17230: --3720018, setting l_global_availability flag based on duplicity of order_line_id.

Line 17245: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);

17241: WHEN no_data_found THEN
17242: l_global_availability := 'N';
17243: IF PG_DEBUG in ('Y', 'C') THEN
17244: --bug4291375 changed debug statements
17245: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);
17246: msc_sch_wb.atp_debug('Setting l_global_availability as No' );
17247: END IF;
17248: WHEN TOO_MANY_ROWS THEN
17249: l_global_availability := 'Y';

Line 17246: msc_sch_wb.atp_debug('Setting l_global_availability as No' );

17242: l_global_availability := 'N';
17243: IF PG_DEBUG in ('Y', 'C') THEN
17244: --bug4291375 changed debug statements
17245: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);
17246: msc_sch_wb.atp_debug('Setting l_global_availability as No' );
17247: END IF;
17248: WHEN TOO_MANY_ROWS THEN
17249: l_global_availability := 'Y';
17250: IF PG_DEBUG in ('Y', 'C') THEN

Line 17252: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);

17248: WHEN TOO_MANY_ROWS THEN
17249: l_global_availability := 'Y';
17250: IF PG_DEBUG in ('Y', 'C') THEN
17251: --bug4291375 changed debug statements
17252: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);
17253: msc_sch_wb.atp_debug('Setting l_global_availability as Yes' );
17254: END IF;
17255: END;
17256:

Line 17253: msc_sch_wb.atp_debug('Setting l_global_availability as Yes' );

17249: l_global_availability := 'Y';
17250: IF PG_DEBUG in ('Y', 'C') THEN
17251: --bug4291375 changed debug statements
17252: --msc_sch_wb.atp_debug('Exception := ' || SQLERRM);
17253: msc_sch_wb.atp_debug('Setting l_global_availability as Yes' );
17254: END IF;
17255: END;
17256:
17257: IF PG_DEBUG in ('Y', 'C') THEN

Line 17258: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_global_availability = ' || l_global_availability );

17254: END IF;
17255: END;
17256:
17257: IF PG_DEBUG in ('Y', 'C') THEN
17258: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_global_availability = ' || l_global_availability );
17259: msc_sch_wb.atp_debug('Call_Schedule: ' || 'p_atp_table.attribute_02 = ' || p_atp_table.attribute_02(1));
17260: END IF; --3720018
17261:
17262: IF (nvl(p_atp_table.attribute_02(1), -1) = 3) THEN --web service call

Line 17259: msc_sch_wb.atp_debug('Call_Schedule: ' || 'p_atp_table.attribute_02 = ' || p_atp_table.attribute_02(1));

17255: END;
17256:
17257: IF PG_DEBUG in ('Y', 'C') THEN
17258: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_global_availability = ' || l_global_availability );
17259: msc_sch_wb.atp_debug('Call_Schedule: ' || 'p_atp_table.attribute_02 = ' || p_atp_table.attribute_02(1));
17260: END IF; --3720018
17261:
17262: IF (nvl(p_atp_table.attribute_02(1), -1) = 3) THEN --web service call
17263: MSC_ATP_PVT.G_WS_CALL := 'Y';

Line 17265: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_WS_CALL = '||MSC_ATP_PVT.G_WS_CALL);

17261:
17262: IF (nvl(p_atp_table.attribute_02(1), -1) = 3) THEN --web service call
17263: MSC_ATP_PVT.G_WS_CALL := 'Y';
17264: IF PG_DEBUG in ('Y', 'C') THEN
17265: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_WS_CALL = '||MSC_ATP_PVT.G_WS_CALL);
17266: msc_sch_wb.atp_debug('Call_Schedule: ' || 'This is a Web Service Call');
17267: END IF;
17268: END IF;
17269: -- initial null collections so that we can use these

Line 17266: msc_sch_wb.atp_debug('Call_Schedule: ' || 'This is a Web Service Call');

17262: IF (nvl(p_atp_table.attribute_02(1), -1) = 3) THEN --web service call
17263: MSC_ATP_PVT.G_WS_CALL := 'Y';
17264: IF PG_DEBUG in ('Y', 'C') THEN
17265: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_WS_CALL = '||MSC_ATP_PVT.G_WS_CALL);
17266: msc_sch_wb.atp_debug('Call_Schedule: ' || 'This is a Web Service Call');
17267: END IF;
17268: END IF;
17269: -- initial null collections so that we can use these
17270: -- collections to initialize collections for next iterations

Line 17273: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_SESSION_ID = '||MSC_ATP_PVT.G_SESSION_ID);

17269: -- initial null collections so that we can use these
17270: -- collections to initialize collections for next iterations
17271: MSC_ATP_PVT.G_SESSION_ID := p_session_id;
17272: IF PG_DEBUG in ('Y', 'C') THEN
17273: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_SESSION_ID = '||MSC_ATP_PVT.G_SESSION_ID);
17274: END IF;
17275:
17276: l_null_atp_table := x_atp_table;
17277: l_null_atp_period := x_atp_period;

Line 17287: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);

17283: MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 THEN
17284:
17285: MSC_ATP_PVT.G_ALLOCATION_METHOD := NVL(FND_PROFILE.VALUE('MSC_ALLOCATION_METHOD'), 2);
17286: IF PG_DEBUG in ('Y', 'C') THEN
17287: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
17288: END IF;
17289: END IF;
17290:
17291: --3720018, call in case of ATP inquiry or global availability from scheduled line of Sales Order pad.

Line 17309: msc_sch_wb.atp_debug('Call_Schedule: l_return_status: ' || l_return_status);

17305: l_delete_atp_rec,
17306: l_return_status);
17307:
17308: IF PG_DEBUG in ('Y', 'C') THEN --3720018
17309: msc_sch_wb.atp_debug('Call_Schedule: l_return_status: ' || l_return_status);
17310: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));
17311: END IF;
17312: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
17313: IF PG_DEBUG in ('Y', 'C') THEN

Line 17310: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));

17306: l_return_status);
17307:
17308: IF PG_DEBUG in ('Y', 'C') THEN --3720018
17309: msc_sch_wb.atp_debug('Call_Schedule: l_return_status: ' || l_return_status);
17310: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));
17311: END IF;
17312: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
17313: IF PG_DEBUG in ('Y', 'C') THEN
17314: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');

Line 17314: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');

17310: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));
17311: END IF;
17312: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
17313: IF PG_DEBUG in ('Y', 'C') THEN
17314: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');
17315: END IF;
17316: x_return_status := FND_API.G_RET_STS_ERROR;
17317: RAISE FND_API.G_EXC_ERROR;
17318: END IF;

Line 17342: msc_sch_wb.atp_debug('Call_Schedule, i='||i);

17338:
17339: i := p_atp_table.Action.FIRST;
17340:
17341: IF PG_DEBUG in ('Y', 'C') THEN
17342: msc_sch_wb.atp_debug('Call_Schedule, i='||i);
17343: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
17344: END IF;
17345:
17346: LOOP

Line 17343: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);

17339: i := p_atp_table.Action.FIRST;
17340:
17341: IF PG_DEBUG in ('Y', 'C') THEN
17342: msc_sch_wb.atp_debug('Call_Schedule, i='||i);
17343: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_ALLOCATION_METHOD := ' || MSC_ATP_PVT.G_ALLOCATION_METHOD);
17344: END IF;
17345:
17346: LOOP
17347: -- make sure we set the variables to null so that it is clean

Line 17362: msc_sch_wb.atp_debug('Call_Schedule, i='||i);

17358: --e_cto_rearch
17359:
17360:
17361: IF PG_DEBUG in ('Y', 'C') THEN
17362: msc_sch_wb.atp_debug('Call_Schedule, i='||i);
17363: END IF;
17364:
17365: EXIT WHEN i is NULL;
17366: /* ---s_cto_rearch

Line 17382: msc_sch_wb.atp_debug('Process Included item');

17378: IF NOT (l_mand_comp_info_rec.sr_inventory_item_id.count = 0) AND
17379: l_included_item_cntr < l_mand_comp_info_rec.sr_inventory_item_id.count THEN
17380: ---process the included item for non SMC PTO model.
17381: IF PG_DEBUG in ('Y', 'C') THEN
17382: msc_sch_wb.atp_debug('Process Included item');
17383: msc_sch_wb.atp_debug('l_included_item_cntr := ' || l_included_item_cntr);
17384: END IF;
17385:
17386: l_included_item_cntr := nvl(l_included_item_cntr, 0) + 1;

Line 17383: msc_sch_wb.atp_debug('l_included_item_cntr := ' || l_included_item_cntr);

17379: l_included_item_cntr < l_mand_comp_info_rec.sr_inventory_item_id.count THEN
17380: ---process the included item for non SMC PTO model.
17381: IF PG_DEBUG in ('Y', 'C') THEN
17382: msc_sch_wb.atp_debug('Process Included item');
17383: msc_sch_wb.atp_debug('l_included_item_cntr := ' || l_included_item_cntr);
17384: END IF;
17385:
17386: l_included_item_cntr := nvl(l_included_item_cntr, 0) + 1;
17387: MSC_ATP_CTO.G_INCLUDED_ITEM_IS_PRESENT := 1;

Line 17420: msc_sch_wb.atp_debug('Process ordered item');

17416:
17417: EXIT WHEN l_process_included_item_flag = 1;
17418:
17419: IF PG_DEBUG in ('Y', 'C') THEN
17420: msc_sch_wb.atp_debug('Process ordered item');
17421: END IF;
17422:
17423: ---either this is first item or PTO included items have already been ATPed. Null out the table
17424: l_mand_comp_info_rec := l_null_mand_comp_info_rec;

Line 17436: msc_sch_wb.atp_debug('ato model -line is := ' || p_atp_table.ato_model_line_id(j));

17432: --set a flag to tell that a model is present.
17433: -- this flag will be used in put into temp table in results mode to
17434: -- selectively update the data for child lines.
17435: IF PG_DEBUG in ('Y', 'C') THEN
17436: msc_sch_wb.atp_debug('ato model -line is := ' || p_atp_table.ato_model_line_id(j));
17437: END IF;
17438: MSC_ATP_CTO.G_MODEL_IS_PRESENT := 1;
17439: MSC_ATP_CTO.G_MODEL_IS_PRESENT_IN_SET := 1;
17440:

Line 17452: msc_sch_wb.atp_debug('attribute_06 := ' || NVL(p_atp_table.attribute_06(j), -1));

17448: END IF;
17449: END IF;
17450:
17451: IF PG_DEBUG in ('Y', 'C') THEN
17452: msc_sch_wb.atp_debug('attribute_06 := ' || NVL(p_atp_table.attribute_06(j), -1));
17453: msc_sch_wb.atp_debug('Validation Org := ' || NVL(p_atp_table.validation_org(j), -1));
17454: msc_sch_wb.atp_debug('source_organization_id := ' || NVL(p_atp_table.source_organization_id(j), -1));
17455: END IF;
17456:

Line 17453: msc_sch_wb.atp_debug('Validation Org := ' || NVL(p_atp_table.validation_org(j), -1));

17449: END IF;
17450:
17451: IF PG_DEBUG in ('Y', 'C') THEN
17452: msc_sch_wb.atp_debug('attribute_06 := ' || NVL(p_atp_table.attribute_06(j), -1));
17453: msc_sch_wb.atp_debug('Validation Org := ' || NVL(p_atp_table.validation_org(j), -1));
17454: msc_sch_wb.atp_debug('source_organization_id := ' || NVL(p_atp_table.source_organization_id(j), -1));
17455: END IF;
17456:
17457: --- raise invalid item org combo error only for non-aps instance

Line 17454: msc_sch_wb.atp_debug('source_organization_id := ' || NVL(p_atp_table.source_organization_id(j), -1));

17450:
17451: IF PG_DEBUG in ('Y', 'C') THEN
17452: msc_sch_wb.atp_debug('attribute_06 := ' || NVL(p_atp_table.attribute_06(j), -1));
17453: msc_sch_wb.atp_debug('Validation Org := ' || NVL(p_atp_table.validation_org(j), -1));
17454: msc_sch_wb.atp_debug('source_organization_id := ' || NVL(p_atp_table.source_organization_id(j), -1));
17455: END IF;
17456:
17457: --- raise invalid item org combo error only for non-aps instance
17458: IF (p_atp_table.attribute_06(j) is null and NVL(MSC_ATP_PVT.G_CALLING_MODULE, -1) <> 724

Line 17472: msc_sch_wb.atp_debug('Invalid Item Org Combo');

17468: l_count := l_atp_input_table.inventory_item_id.count;
17469:
17470: If p_atp_table.attribute_06(j) is null THEN
17471: IF PG_DEBUG in ('Y', 'C') THEN
17472: msc_sch_wb.atp_debug('Invalid Item Org Combo');
17473: END IF;
17474:
17475:
17476: l_atp_input_table.error_code(l_count) := INVALID_ITEM_ORG_COMBINATION;

Line 17483: msc_sch_wb.atp_debug('Inavlid CTO sourcing');

17479: MSC_ATP_PVT.OSS_ERROR_AT_LOWER_LEVEL,
17480: MSC_ATP_PVT.OSS_ERROR_AT_THIS_LEVEL) THEN
17481:
17482: IF PG_DEBUG in ('Y', 'C') THEN
17483: msc_sch_wb.atp_debug('Inavlid CTO sourcing');
17484: END IF;
17485: l_atp_input_table.error_code(l_count) := p_atp_table.oss_error_code(j);
17486:
17487: ELSE

Line 17503: msc_sch_wb.atp_debug('Explode Included Items');

17499: p_atp_table.pick_components_flag(j) = 'Y' and
17500: p_atp_table.bom_item_type(j) in (1, 2) THEN
17501:
17502: IF PG_DEBUG in ('Y', 'C') THEN
17503: msc_sch_wb.atp_debug('Explode Included Items');
17504: msc_sch_wb.atp_debug('First Do UOM Convesrion');
17505: END IF;
17506:
17507: MSC_ATP_PROC.inv_primary_uom_conversion(p_instance_id,

Line 17504: msc_sch_wb.atp_debug('First Do UOM Convesrion');

17500: p_atp_table.bom_item_type(j) in (1, 2) THEN
17501:
17502: IF PG_DEBUG in ('Y', 'C') THEN
17503: msc_sch_wb.atp_debug('Explode Included Items');
17504: msc_sch_wb.atp_debug('First Do UOM Convesrion');
17505: END IF;
17506:
17507: MSC_ATP_PROC.inv_primary_uom_conversion(p_instance_id,
17508: p_atp_table.validation_org(j),

Line 17515: msc_sch_wb.atp_debug('l_conversion_rate');

17511: l_quantity_uom,
17512: l_conversion_rate);
17513:
17514: IF PG_DEBUG in ('Y', 'C') THEN
17515: msc_sch_wb.atp_debug('l_conversion_rate');
17516: msc_sch_wb.atp_debug('QTY Ordered := ' || p_atp_table.Quantity_Ordered(j));
17517:
17518: END IF;
17519:

Line 17516: msc_sch_wb.atp_debug('QTY Ordered := ' || p_atp_table.Quantity_Ordered(j));

17512: l_conversion_rate);
17513:
17514: IF PG_DEBUG in ('Y', 'C') THEN
17515: msc_sch_wb.atp_debug('l_conversion_rate');
17516: msc_sch_wb.atp_debug('QTY Ordered := ' || p_atp_table.Quantity_Ordered(j));
17517:
17518: END IF;
17519:
17520: l_quantity_ordered := p_atp_table.Quantity_Ordered(j) * l_conversion_rate;

Line 17523: msc_sch_wb.atp_debug('QTY Ordered after conversion:= ' || l_quantity_ordered);

17519:
17520: l_quantity_ordered := p_atp_table.Quantity_Ordered(j) * l_conversion_rate;
17521: l_quantity_ordered := ROUND( l_quantity_ordered, 6); --4562646
17522: IF PG_DEBUG in ('Y', 'C') THEN
17523: msc_sch_wb.atp_debug('QTY Ordered after conversion:= ' || l_quantity_ordered);
17524: msc_sch_wb.atp_debug('Now call Get Mand Comp');
17525: END IF;
17526:
17527: --- included items are not passed. Explode them

Line 17524: msc_sch_wb.atp_debug('Now call Get Mand Comp');

17520: l_quantity_ordered := p_atp_table.Quantity_Ordered(j) * l_conversion_rate;
17521: l_quantity_ordered := ROUND( l_quantity_ordered, 6); --4562646
17522: IF PG_DEBUG in ('Y', 'C') THEN
17523: msc_sch_wb.atp_debug('QTY Ordered after conversion:= ' || l_quantity_ordered);
17524: msc_sch_wb.atp_debug('Now call Get Mand Comp');
17525: END IF;
17526:
17527: --- included items are not passed. Explode them
17528: MSC_ATP_PVT.G_PTF_DATE := sysdate;

Line 17541: msc_sch_wb.atp_debug('After getting included items');

17537: l_mand_comp_info_rec);
17538:
17539: --- if SMC PTO then add to l_atp_input_table else add to l_included_item_table
17540: IF PG_DEBUG in ('Y', 'C') THEN
17541: msc_sch_wb.atp_debug('After getting included items');
17542: msc_sch_wb.atp_debug('Ship set name := ' || NVL(p_atp_table.Ship_Set_Name(j), 'XYZ'));
17543: END IF;
17544:
17545: IF p_atp_table.Ship_Set_Name(j) is not null then

Line 17542: msc_sch_wb.atp_debug('Ship set name := ' || NVL(p_atp_table.Ship_Set_Name(j), 'XYZ'));

17538:
17539: --- if SMC PTO then add to l_atp_input_table else add to l_included_item_table
17540: IF PG_DEBUG in ('Y', 'C') THEN
17541: msc_sch_wb.atp_debug('After getting included items');
17542: msc_sch_wb.atp_debug('Ship set name := ' || NVL(p_atp_table.Ship_Set_Name(j), 'XYZ'));
17543: END IF;
17544:
17545: IF p_atp_table.Ship_Set_Name(j) is not null then
17546:

Line 17550: msc_sch_wb.atp_debug('Comp Count := ' || l_mand_comp_info_rec.sr_inventory_item_id.count);

17546:
17547: --its an SMC PTO or KIT, add to the same set
17548:
17549: IF PG_DEBUG in ('Y', 'C') THEN
17550: msc_sch_wb.atp_debug('Comp Count := ' || l_mand_comp_info_rec.sr_inventory_item_id.count);
17551: msc_sch_wb.atp_debug('SMC or PTO Kit');
17552: END IF;
17553: FOR l_pto_cntr in 1..l_mand_comp_info_rec.sr_inventory_item_id.count LOOP
17554: MSC_ATP_CTO.G_INCLUDED_ITEM_IS_PRESENT := 1;

Line 17551: msc_sch_wb.atp_debug('SMC or PTO Kit');

17547: --its an SMC PTO or KIT, add to the same set
17548:
17549: IF PG_DEBUG in ('Y', 'C') THEN
17550: msc_sch_wb.atp_debug('Comp Count := ' || l_mand_comp_info_rec.sr_inventory_item_id.count);
17551: msc_sch_wb.atp_debug('SMC or PTO Kit');
17552: END IF;
17553: FOR l_pto_cntr in 1..l_mand_comp_info_rec.sr_inventory_item_id.count LOOP
17554: MSC_ATP_CTO.G_INCLUDED_ITEM_IS_PRESENT := 1;
17555: MSC_SATP_FUNC.Assign_Atp_Input_Rec(p_atp_table,

Line 17560: msc_sch_wb.atp_debug('l_pto_cntr := ' || l_pto_cntr);

17556: j,
17557: l_atp_input_table,
17558: l_return_status );
17559: IF PG_DEBUG in ('Y', 'C') THEN
17560: msc_sch_wb.atp_debug('l_pto_cntr := ' || l_pto_cntr);
17561: END IF;
17562: --cr:ngoel: add seq num as well as UOM code
17563: l_count := l_atp_input_table.inventory_item_id.count;
17564: l_atp_input_table.mandatory_item_flag(l_count) := 1;

Line 17573: msc_sch_wb.atp_debug('Assign Seq num');

17569: l_mand_comp_info_rec.sr_inventory_item_id(l_pto_cntr);
17570:
17571: l_atp_input_table.parent_line_id(l_count) := p_atp_table.identifier(j);
17572: IF PG_DEBUG in ('Y', 'C') THEN
17573: msc_sch_wb.atp_debug('Assign Seq num');
17574: END IF;
17575: ---multiplying by .000001 will make sure that std mand comp are inserted in the
17576: -- table after the parent
17577: begin

Line 17583: msc_sch_wb.atp_debug('Error := ' || SQLERRM);

17579: (1 + (.0001 * l_pto_cntr));
17580: EXCEPTION
17581: when others then
17582: IF PG_DEBUG in ('Y', 'C') THEN
17583: msc_sch_wb.atp_debug('Error := ' || SQLERRM);
17584: END IF;
17585: END;
17586: IF PG_DEBUG in ('Y', 'C') THEN
17587: msc_sch_wb.atp_debug('assign UOM');

Line 17587: msc_sch_wb.atp_debug('assign UOM');

17583: msc_sch_wb.atp_debug('Error := ' || SQLERRM);
17584: END IF;
17585: END;
17586: IF PG_DEBUG in ('Y', 'C') THEN
17587: msc_sch_wb.atp_debug('assign UOM');
17588: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);
17589: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);
17590: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);
17591: END IF;

Line 17588: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);

17584: END IF;
17585: END;
17586: IF PG_DEBUG in ('Y', 'C') THEN
17587: msc_sch_wb.atp_debug('assign UOM');
17588: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);
17589: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);
17590: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);
17591: END IF;
17592: l_atp_input_table.Quantity_UOM(l_count) := l_mand_comp_info_rec.uom_code(l_pto_cntr);

Line 17589: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);

17585: END;
17586: IF PG_DEBUG in ('Y', 'C') THEN
17587: msc_sch_wb.atp_debug('assign UOM');
17588: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);
17589: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);
17590: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);
17591: END IF;
17592: l_atp_input_table.Quantity_UOM(l_count) := l_mand_comp_info_rec.uom_code(l_pto_cntr);
17593: IF p_atp_table.bom_item_type(j) = 4 and p_atp_table.Ship_Set_Name(j) is null THEN

Line 17590: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);

17586: IF PG_DEBUG in ('Y', 'C') THEN
17587: msc_sch_wb.atp_debug('assign UOM');
17588: msc_sch_wb.atp_debug('seq count := ' || l_atp_input_table.sequence_number.count);
17589: msc_sch_wb.atp_debug(' uom cnt := ' || l_atp_input_table.Quantity_UOM.count);
17590: msc_sch_wb.atp_debug('uom code cnt := ' || l_mand_comp_info_rec.uom_code.count);
17591: END IF;
17592: l_atp_input_table.Quantity_UOM(l_count) := l_mand_comp_info_rec.uom_code(l_pto_cntr);
17593: IF p_atp_table.bom_item_type(j) = 4 and p_atp_table.Ship_Set_Name(j) is null THEN
17594: IF PG_DEBUG in ('Y', 'C') THEN

Line 17595: msc_sch_wb.atp_debug('process KIT');

17591: END IF;
17592: l_atp_input_table.Quantity_UOM(l_count) := l_mand_comp_info_rec.uom_code(l_pto_cntr);
17593: IF p_atp_table.bom_item_type(j) = 4 and p_atp_table.Ship_Set_Name(j) is null THEN
17594: IF PG_DEBUG in ('Y', 'C') THEN
17595: msc_sch_wb.atp_debug('process KIT');
17596: END IF;
17597: -- If its a PTO KIt and if ship set name is null then we populate
17598: --shipset name so that whole kit is processed as one entity
17599: l_atp_input_table.Ship_Set_Name(l_parent_idx) := p_atp_table.identifier(j);

Line 17610: msc_sch_wb.atp_debug('This is not SMC PTO');

17606: l_mand_comp_info_rec := l_null_mand_comp_info_rec;
17607: j := p_atp_table.Action.NEXT(j);
17608: ELSE --- IF p_atp_table.Ship_Set_Name(j) is not null then
17609: IF PG_DEBUG in ('Y', 'C') THEN
17610: msc_sch_wb.atp_debug('This is not SMC PTO');
17611: END IF;
17612: --non smc PTO
17613: l_included_item_cntr := 0;
17614: IF l_mand_comp_info_rec.sr_inventory_item_id.count > 0 THEN

Line 17657: msc_sch_wb.atp_debug('Call_Schedule, j='||j);

17653: NVL(p_atp_table.Arrival_Set_Name(i),-99) <> NVL(p_atp_table.Arrival_Set_Name(j),-99);
17654:
17655:
17656: IF PG_DEBUG in ('Y', 'C') THEN
17657: msc_sch_wb.atp_debug('Call_Schedule, j='||j);
17658: END IF;
17659:
17660: -- make sure we are in the same ship set before we assign the value.
17661:

Line 17687: msc_sch_wb.atp_debug('Call_Schedule: ' || 'OE Flag (Before ISO check) : '||l_atp_input_table.OE_flag(m));

17683:
17684: m := l_atp_input_table.Action.FIRST;
17685: IF m is not null THEN
17686: IF PG_DEBUG in ('Y', 'C') THEN
17687: msc_sch_wb.atp_debug('Call_Schedule: ' || 'OE Flag (Before ISO check) : '||l_atp_input_table.OE_flag(m));
17688: END IF;
17689: --Bug 4279623 4333596
17690: IF l_atp_input_table.oe_flag(m) = 'Y' and MSC_ATP_PVT.G_INV_CTP = 4 THEN
17691: 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 17694: msc_sch_wb.atp_debug('Before get_plan_info_call:l_consume_so_profile_value ' || l_consume_so_profile_value);

17690: IF l_atp_input_table.oe_flag(m) = 'Y' and MSC_ATP_PVT.G_INV_CTP = 4 THEN
17691: 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
17692: --l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO);
17693: IF PG_DEBUG in ('Y', 'C') THEN
17694: msc_sch_wb.atp_debug('Before get_plan_info_call:l_consume_so_profile_value ' || l_consume_so_profile_value);
17695: msc_sch_wb.atp_debug('Before get_plan_info_call:MSC_CONSUME_INT_SALES_ORDERS ' || l_consume_so_profile_value);
17696: msc_sch_wb.atp_debug('New profile: '||FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS')); --5564082
17697: END IF;
17698: IF l_consume_so_profile_value = CHECK_ORG_IN_PLAN THEN

Line 17695: msc_sch_wb.atp_debug('Before get_plan_info_call:MSC_CONSUME_INT_SALES_ORDERS ' || l_consume_so_profile_value);

17691: 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
17692: --l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO);
17693: IF PG_DEBUG in ('Y', 'C') THEN
17694: msc_sch_wb.atp_debug('Before get_plan_info_call:l_consume_so_profile_value ' || l_consume_so_profile_value);
17695: msc_sch_wb.atp_debug('Before get_plan_info_call:MSC_CONSUME_INT_SALES_ORDERS ' || l_consume_so_profile_value);
17696: msc_sch_wb.atp_debug('New profile: '||FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS')); --5564082
17697: END IF;
17698: IF l_consume_so_profile_value = CHECK_ORG_IN_PLAN THEN
17699: MSC_ATP_PROC.get_plan_info(p_instance_id,

Line 17696: msc_sch_wb.atp_debug('New profile: '||FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS')); --5564082

17692: --l_consume_so_profile_value := NVL(FND_PROFILE.VALUE('MSC_CONSUME_INT_SALES_ORDERS'), NO);
17693: IF PG_DEBUG in ('Y', 'C') THEN
17694: msc_sch_wb.atp_debug('Before get_plan_info_call:l_consume_so_profile_value ' || l_consume_so_profile_value);
17695: msc_sch_wb.atp_debug('Before get_plan_info_call:MSC_CONSUME_INT_SALES_ORDERS ' || l_consume_so_profile_value);
17696: msc_sch_wb.atp_debug('New profile: '||FND_PROFILE.VALUE('MSC_ATP_CHECK_INT_SALES_ORDERS')); --5564082
17697: END IF;
17698: IF l_consume_so_profile_value = CHECK_ORG_IN_PLAN THEN
17699: MSC_ATP_PROC.get_plan_info(p_instance_id,
17700: l_atp_input_table.inventory_item_id(m),

Line 17706: msc_sch_wb.atp_debug('After get_plan_info_call:plan_id : ' || x_plan_info_rec.plan_id );

17702: null,
17703: x_plan_info_rec);
17704:
17705: IF PG_DEBUG in ('Y', 'C') THEN
17706: msc_sch_wb.atp_debug('After get_plan_info_call:plan_id : ' || x_plan_info_rec.plan_id );
17707: END IF;
17708:
17709: IF x_plan_info_rec.plan_id > 0 THEN
17710:

Line 17712: msc_sch_wb.atp_debug('Plan found for the item in the source org.');

17708:
17709: IF x_plan_info_rec.plan_id > 0 THEN
17710:
17711: IF PG_DEBUG in ('Y', 'C') THEN
17712: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
17713: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
17714: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
17715: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
17716: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );

Line 17713: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );

17709: IF x_plan_info_rec.plan_id > 0 THEN
17710:
17711: IF PG_DEBUG in ('Y', 'C') THEN
17712: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
17713: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
17714: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
17715: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
17716: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );
17717: END IF;

Line 17714: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );

17710:
17711: IF PG_DEBUG in ('Y', 'C') THEN
17712: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
17713: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
17714: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
17715: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
17716: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );
17717: END IF;
17718:

Line 17715: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );

17711: IF PG_DEBUG in ('Y', 'C') THEN
17712: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
17713: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
17714: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
17715: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
17716: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );
17717: END IF;
17718:
17719: select count(*)

Line 17716: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );

17712: msc_sch_wb.atp_debug('Plan found for the item in the source org.');
17713: msc_sch_wb.atp_debug('l_atp_input_table.inventory_item_id(m)' || l_atp_input_table.inventory_item_id(m) );
17714: msc_sch_wb.atp_debug('l_atp_input_table.internal_org_id(m)' || l_atp_input_table.internal_org_id(m) );
17715: msc_sch_wb.atp_debug('l_atp_input_table.source_organization_id(m)' || l_atp_input_table.source_organization_id(m) );
17716: msc_sch_wb.atp_debug('l_atp_input_table.organization_id(m)' || l_atp_input_table.organization_id(m) );
17717: END IF;
17718:
17719: select count(*)
17720: into l_same_org_count

Line 17730: msc_sch_wb.atp_debug('Both the Orgs are in the same plan and the item is planned.');

17726:
17727: IF l_same_org_count > 0 THEN
17728: l_atp_input_table.oe_flag(m) := 'Y';
17729: IF PG_DEBUG in ('Y', 'C') THEN
17730: msc_sch_wb.atp_debug('Both the Orgs are in the same plan and the item is planned.');
17731: END IF;
17732: ELSE
17733: IF PG_DEBUG in ('Y', 'C') THEN
17734: msc_sch_wb.atp_debug('Both the Orgs are in NOT the same plan');

Line 17734: msc_sch_wb.atp_debug('Both the Orgs are in NOT the same plan');

17730: msc_sch_wb.atp_debug('Both the Orgs are in the same plan and the item is planned.');
17731: END IF;
17732: ELSE
17733: IF PG_DEBUG in ('Y', 'C') THEN
17734: msc_sch_wb.atp_debug('Both the Orgs are in NOT the same plan');
17735: END IF;
17736: select count(*) into l_feeder_count
17737: from msc_system_items
17738: where plan_id in ( select plans.plan_id input_plan_id

Line 17759: msc_sch_wb.atp_debug('There is a feeder plan which has the item palnned. we need not do ATP');

17755:
17756: IF l_feeder_count > 0 then
17757: l_atp_input_table.oe_flag(m) := 'Y';
17758: IF PG_DEBUG in ('Y', 'C') THEN
17759: msc_sch_wb.atp_debug('There is a feeder plan which has the item palnned. we need not do ATP');
17760: END IF;
17761: ELSE
17762: l_atp_input_table.oe_flag(m) := 'N';
17763: IF PG_DEBUG in ('Y', 'C') THEN

Line 17764: msc_sch_wb.atp_debug('There is no feeder plan too. We have to do ATP');

17760: END IF;
17761: ELSE
17762: l_atp_input_table.oe_flag(m) := 'N';
17763: IF PG_DEBUG in ('Y', 'C') THEN
17764: msc_sch_wb.atp_debug('There is no feeder plan too. We have to do ATP');
17765: END IF;
17766: END IF; -- l_feeder_count > 0
17767: END IF; --if l_same_org_count > 0 then
17768: ELSE

Line 17771: msc_sch_wb.atp_debug('The item is not planned at all. No need to do ATP');

17767: END IF; --if l_same_org_count > 0 then
17768: ELSE
17769: l_atp_input_table.oe_flag(m) := 'Y';
17770: IF PG_DEBUG in ('Y', 'C') THEN
17771: msc_sch_wb.atp_debug('The item is not planned at all. No need to do ATP');
17772: END IF;
17773: END IF; -- x_plan_info_rec.count > 0
17774: ELSIF l_consume_so_profile_value = YES THEN
17775: l_atp_input_table.oe_flag(m) := 'N';

Line 17777: msc_sch_wb.atp_debug('Profile value is set to CHECK ATP. We need to do ATP always.');

17773: END IF; -- x_plan_info_rec.count > 0
17774: ELSIF l_consume_so_profile_value = YES THEN
17775: l_atp_input_table.oe_flag(m) := 'N';
17776: IF PG_DEBUG in ('Y', 'C') THEN
17777: msc_sch_wb.atp_debug('Profile value is set to CHECK ATP. We need to do ATP always.');
17778: END IF;
17779:
17780: END IF; -- nvl(fnd_profile.value('msc_consume_int_sales_orders'), '2') = 3
17781: END IF; -- l_atp_input_table.oe_flag(1) = 'y' and msc_atp_pvt.g_inv_ctp = 4

Line 17783: msc_sch_wb.atp_debug('l_atp_input_table.oe_flag(m) = '||l_atp_input_table.oe_flag(m)); --5564082

17779:
17780: END IF; -- nvl(fnd_profile.value('msc_consume_int_sales_orders'), '2') = 3
17781: END IF; -- l_atp_input_table.oe_flag(1) = 'y' and msc_atp_pvt.g_inv_ctp = 4
17782: --Bug 4279623 4333596
17783: msc_sch_wb.atp_debug('l_atp_input_table.oe_flag(m) = '||l_atp_input_table.oe_flag(m)); --5564082
17784: IF l_atp_input_table.OE_flag(m) = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
17785:
17786: IF PG_DEBUG in ('Y', 'C') THEN
17787: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Internal Sales order import for OM');

Line 17787: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Internal Sales order import for OM');

17783: msc_sch_wb.atp_debug('l_atp_input_table.oe_flag(m) = '||l_atp_input_table.oe_flag(m)); --5564082
17784: IF l_atp_input_table.OE_flag(m) = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
17785:
17786: IF PG_DEBUG in ('Y', 'C') THEN
17787: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Internal Sales order import for OM');
17788: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count: ' || x_atp_table.action.count);
17789: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count: ' || l_atp_input_table.action.count);
17790:
17791: END IF;

Line 17788: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count: ' || x_atp_table.action.count);

17784: IF l_atp_input_table.OE_flag(m) = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
17785:
17786: IF PG_DEBUG in ('Y', 'C') THEN
17787: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Internal Sales order import for OM');
17788: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count: ' || x_atp_table.action.count);
17789: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count: ' || l_atp_input_table.action.count);
17790:
17791: END IF;
17792:

Line 17789: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count: ' || l_atp_input_table.action.count);

17785:
17786: IF PG_DEBUG in ('Y', 'C') THEN
17787: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Internal Sales order import for OM');
17788: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count: ' || x_atp_table.action.count);
17789: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count: ' || l_atp_input_table.action.count);
17790:
17791: END IF;
17792:
17793: l_atp_output_table := l_atp_input_table; --bug 10268596

Line 17825: msc_sch_wb.atp_debug('delivery lead time is not specified');

17821:
17822: -- dsting dlt
17823: IF (NVL(l_atp_input_table.delivery_lead_time(m), -1) = -1 ) THEN
17824: IF PG_DEBUG IN ('Y', 'C') THEN
17825: msc_sch_wb.atp_debug('delivery lead time is not specified');
17826: END IF;
17827:
17828: l_ship_method := l_atp_output_table.ship_method(m);
17829: -- Bug 3449812 - Base DLT on internal_org_id if available

Line 17878: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Lead Time '||l_atp_output_table.delivery_lead_time(m)); ----4430710

17874: -- dsting removed old delivery lead time code
17875: END IF; -- end delivery lead time not specified
17876:
17877: IF PG_DEBUG in ('Y', 'C') THEN
17878: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Lead Time '||l_atp_output_table.delivery_lead_time(m)); ----4430710
17879: END IF;
17880:
17881: -- Bug 3449812 - get receiving cal from ISO's destination org if available
17882: -- Bug 3515520, don't use org in case customer/site is populated.

Line 17960: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_USE_SHIP_REC_CAL is N');

17956: ELSE
17957:
17958: -- Bug 3593394
17959: IF PG_DEBUG in ('Y', 'C') THEN
17960: msc_sch_wb.atp_debug('Call_Schedule: ' || 'G_USE_SHIP_REC_CAL is N');
17961: END IF;
17962: -- Bug 3737759 - Use receiving org's OMC
17963: IF (l_atp_output_table.internal_org_id(m) IS NOT NULL) OR
17964: (l_atp_output_table.organization_id(m) IS NOT NULL AND

Line 18012: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.ship_date ' || l_atp_output_table.ship_date(m) );

18008: l_shipping_cal_code, -1, p_instance_id); --4430710
18009: END IF;
18010:
18011: IF PG_DEBUG in ('Y', 'C') THEN
18012: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.ship_date ' || l_atp_output_table.ship_date(m) );
18013: END IF;
18014:
18015: BEGIN -- Bug2031894. Handle Exception here.
18016:

Line 18024: msc_sch_wb.atp_debug('Call_Schedule: ' || 'When Others ');

18020: sysdate);
18021: EXCEPTION
18022: WHEN OTHERS THEN
18023: IF PG_DEBUG in ('Y', 'C') THEN
18024: msc_sch_wb.atp_debug('Call_Schedule: ' || 'When Others ');
18025: END IF;
18026: NULL;
18027: END;
18028: IF PG_DEBUG in ('Y', 'C') THEN

Line 18029: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_sysdate '||l_sysdate);

18025: END IF;
18026: NULL;
18027: END;
18028: IF PG_DEBUG in ('Y', 'C') THEN
18029: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_sysdate '||l_sysdate);
18030: END IF;
18031: IF l_sysdate IS NULL THEN
18032: IF PG_DEBUG in ('Y', 'C') THEN
18033: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Sysdate not found in Calendar');

Line 18033: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Sysdate not found in Calendar');

18029: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_sysdate '||l_sysdate);
18030: END IF;
18031: IF l_sysdate IS NULL THEN
18032: IF PG_DEBUG in ('Y', 'C') THEN
18033: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Sysdate not found in Calendar');
18034: END IF;
18035: l_atp_output_table.error_code(m) := NO_MATCHING_CAL_DATE;
18036: END IF;
18037:

Line 18052: msc_sch_wb.atp_debug('Call_Schedule: ' || 'prev date for ship date not found in Calendar');

18048: x_atp_table.ship_date(m));
18049:
18050: IF l_prev_work_ship_date IS NULL THEN
18051: IF PG_DEBUG in ('Y', 'C') THEN
18052: msc_sch_wb.atp_debug('Call_Schedule: ' || 'prev date for ship date not found in Calendar');
18053: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date ' || x_atp_table.ship_date(m) );
18054: END IF;
18055: x_atp_table.error_code(m) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
18056: END IF;

Line 18053: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date ' || x_atp_table.ship_date(m) );

18049:
18050: IF l_prev_work_ship_date IS NULL THEN
18051: IF PG_DEBUG in ('Y', 'C') THEN
18052: msc_sch_wb.atp_debug('Call_Schedule: ' || 'prev date for ship date not found in Calendar');
18053: msc_sch_wb.atp_debug('Call_Schedule: ' || 'x_atp_table.ship_date ' || x_atp_table.ship_date(m) );
18054: END IF;
18055: x_atp_table.error_code(m) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
18056: END IF;
18057: */

Line 18060: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) : ' ||

18056: END IF;
18057: */
18058:
18059: IF PG_DEBUG in ('Y', 'C') THEN
18060: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) : ' ||
18061: to_char(l_atp_output_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18062: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.ship_date(m) : ' ||
18063: to_char(l_atp_output_table.ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18064: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_arrival_date(m): ' ||

Line 18062: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.ship_date(m) : ' ||

18058:
18059: IF PG_DEBUG in ('Y', 'C') THEN
18060: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) : ' ||
18061: to_char(l_atp_output_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18062: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.ship_date(m) : ' ||
18063: to_char(l_atp_output_table.ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18064: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_arrival_date(m): ' ||
18065: to_char(l_atp_output_table.requested_arrival_date(m),'dd/mm/yyyy hh:mi:ss'));
18066: END IF;

Line 18064: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_arrival_date(m): ' ||

18060: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) : ' ||
18061: to_char(l_atp_output_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18062: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.ship_date(m) : ' ||
18063: to_char(l_atp_output_table.ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18064: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_arrival_date(m): ' ||
18065: to_char(l_atp_output_table.requested_arrival_date(m),'dd/mm/yyyy hh:mi:ss'));
18066: END IF;
18067: -- Bug Bug 2232555, 2250456
18068:

Line 18121: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| l_atp_output_table.group_ship_date(m));

18117: l_atp_output_table.group_arrival_date(m) := l_atp_output_table.arrival_date(m);
18118: l_atp_output_table.ship_method(m) := l_ship_method;
18119: l_atp_output_table.delivery_lead_time(m) := l_delivery_lead_time;
18120: IF PG_DEBUG in ('Y', 'C') THEN
18121: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| l_atp_output_table.group_ship_date(m));
18122: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| l_atp_output_table.group_arrival_date(m));
18123: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) after : ' ||
18124: to_char(l_atp_output_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18125: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop' || x_atp_table.action.count);

Line 18122: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| l_atp_output_table.group_arrival_date(m));

18118: l_atp_output_table.ship_method(m) := l_ship_method;
18119: l_atp_output_table.delivery_lead_time(m) := l_delivery_lead_time;
18120: IF PG_DEBUG in ('Y', 'C') THEN
18121: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| l_atp_output_table.group_ship_date(m));
18122: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| l_atp_output_table.group_arrival_date(m));
18123: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) after : ' ||
18124: to_char(l_atp_output_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18125: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop' || x_atp_table.action.count);
18126: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count at end of loop' || l_atp_input_table.action.count);

Line 18123: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) after : ' ||

18119: l_atp_output_table.delivery_lead_time(m) := l_delivery_lead_time;
18120: IF PG_DEBUG in ('Y', 'C') THEN
18121: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| l_atp_output_table.group_ship_date(m));
18122: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| l_atp_output_table.group_arrival_date(m));
18123: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) after : ' ||
18124: to_char(l_atp_output_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18125: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop' || x_atp_table.action.count);
18126: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count at end of loop' || l_atp_input_table.action.count);
18127:

Line 18125: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop' || x_atp_table.action.count);

18121: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group ship date '|| l_atp_output_table.group_ship_date(m));
18122: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| l_atp_output_table.group_arrival_date(m));
18123: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) after : ' ||
18124: to_char(l_atp_output_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18125: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop' || x_atp_table.action.count);
18126: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count at end of loop' || l_atp_input_table.action.count);
18127:
18128: END IF;
18129:

Line 18126: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count at end of loop' || l_atp_input_table.action.count);

18122: msc_sch_wb.atp_debug('Call_Schedule: ' || 'group arrival date '|| l_atp_output_table.group_arrival_date(m));
18123: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_atp_output_table.requested_ship_date(m) after : ' ||
18124: to_char(l_atp_output_table.requested_ship_date(m), 'dd/mm/yyyy hh:mi:ss'));
18125: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop' || x_atp_table.action.count);
18126: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG l_atp_input_table count at end of loop' || l_atp_input_table.action.count);
18127:
18128: END IF;
18129:
18130: -- End Changes

Line 18168: msc_sch_wb.atp_debug('Call_Schedule: NO_MATCHING_CAL_DATE');

18164: IF (x_atp_table.Error_Code(i) IS NULL) or (x_atp_table.Error_Code(i) IN (0,61,150)) THEN
18165: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
18166: x_atp_table.Error_Code(i) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
18167: IF PG_DEBUG in ('Y', 'C') THEN
18168: msc_sch_wb.atp_debug('Call_Schedule: NO_MATCHING_CAL_DATE');
18169: END IF;
18170: ELSE
18171: x_atp_table.Error_Code(i) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error
18172: END IF;

Line 18179: msc_sch_wb.atp_debug('Call_Schedule: ' || 'error := ' || sqlerrm);

18175: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
18176: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'MSC_ATP_PVT');
18177: END IF;
18178: IF PG_DEBUG in ('Y', 'C') THEN
18179: msc_sch_wb.atp_debug('Call_Schedule: ' || 'error := ' || sqlerrm);
18180: END IF;
18181: END;
18182: --bug3583705 end
18183: /* END Bug 2290633 : krajan : 04/05/02 */

Line 18186: msc_sch_wb.atp_debug('Call_Schedule: ' || 'After Assigning values for l_atp_output_table');

18182: --bug3583705 end
18183: /* END Bug 2290633 : krajan : 04/05/02 */
18184:
18185: IF PG_DEBUG in ('Y', 'C') THEN
18186: msc_sch_wb.atp_debug('Call_Schedule: ' || 'After Assigning values for l_atp_output_table');
18187: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count after loop' || x_atp_table.action.count);
18188: END IF;
18189:
18190: ELSE -- IF l_atp_input_table.OE_flag(m) = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 18187: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count after loop' || x_atp_table.action.count);

18183: /* END Bug 2290633 : krajan : 04/05/02 */
18184:
18185: IF PG_DEBUG in ('Y', 'C') THEN
18186: msc_sch_wb.atp_debug('Call_Schedule: ' || 'After Assigning values for l_atp_output_table');
18187: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count after loop' || x_atp_table.action.count);
18188: END IF;
18189:
18190: ELSE -- IF l_atp_input_table.OE_flag(m) = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
18191: -- now call schedule to schedule this line/set.

Line 18198: msc_sch_wb.atp_debug('Call_Schedule, before Schedule ');

18194: -- to users when we cannot satisfy the request on the preferred
18195: -- warehouse and the action is ATP inquiry.
18196:
18197: IF PG_DEBUG in ('Y', 'C') THEN
18198: msc_sch_wb.atp_debug('Call_Schedule, before Schedule ');
18199: END IF;
18200: /* --s_cto_rearch
18201: -- rajjain 02/03/2003 Bug 2766713 Begin
18202: k := l_atp_input_table.error_code.First;

Line 18205: msc_sch_wb.atp_debug ('Call_Schedule: '||'Invalid Item Org Combination : '||k);

18201: -- rajjain 02/03/2003 Bug 2766713 Begin
18202: k := l_atp_input_table.error_code.First;
18203: FOR k in 1.. l_atp_input_table.error_code.COUNT LOOP
18204: IF l_atp_input_table.error_code(k) = INVALID_ITEM_ORG_COMBINATION THEN
18205: msc_sch_wb.atp_debug ('Call_Schedule: '||'Invalid Item Org Combination : '||k);
18206: l_set_fail_flag := 'Y';
18207: EXIT;
18208: END IF;
18209: END LOOP;

Line 18217: msc_sch_wb.atp_debug ('Call_Schedule: '

18213: l_atp_output_table := l_atp_input_table;
18214: /* --s_cto_rearch
18215: k := l_atp_input_table.error_code.First;
18216: IF PG_DEBUG in ('Y','C') THEN
18217: msc_sch_wb.atp_debug ('Call_Schedule: '
18218: || 'This set failed as this has atleast one item with invalid item-org combination');
18219: END IF;
18220: FOR k in 1.. l_atp_input_table.error_code.COUNT LOOP
18221: IF nvl(l_atp_input_table.error_code(k), 0) <> INVALID_ITEM_ORG_COMBINATION THEN

Line 18232: msc_sch_wb.atp_debug ('Calling Schedule with 24x7 related parameters');

18228: ELSE
18229: -- 24x7 Call to schedule. What do we call ?
18230: if (NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'Y' ) then
18231: IF PG_DEBUG in ('Y','C') THEN
18232: msc_sch_wb.atp_debug ('Calling Schedule with 24x7 related parameters');
18233: END IF;
18234:
18235: MSC_ATP_PVT.Schedule(l_atp_input_table,
18236: l_atp_input_table.instance_id(l_atp_input_table.instance_id.FIRST),

Line 18268: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside return status error');

18264:
18265: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
18266:
18267: IF PG_DEBUG in ('Y', 'C') THEN
18268: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside return status error');
18269: END IF;
18270: x_return_status := FND_API.G_RET_STS_ERROR;
18271: k := l_atp_output_table.Calling_Module.First;
18272: FOR k in 1.. l_atp_output_table.Calling_Module.COUNT LOOP

Line 18281: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after setting group error');

18277: l_atp_output_table.Error_Code(k) := GROUPEL_ERROR;
18278: END IF;
18279: END LOOP;
18280: IF PG_DEBUG in ('Y', 'C') THEN
18281: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after setting group error');
18282: END IF;
18283: END IF;
18284: END IF; --IF l_set_fail_flag = 'Y' THEN
18285: -- rajjain 02/03/2003 Bug 2766713 End

Line 18297: msc_sch_wb.atp_debug('requested ship date = '||

18293:
18294: FOR k in 1.. l_atp_output_table.Calling_Module.COUNT
18295: LOOP
18296: IF PG_DEBUG in ('Y', 'C') THEN
18297: msc_sch_wb.atp_debug('requested ship date = '||
18298: to_char( p_atp_table.requested_ship_date(k), 'DD-MON-YYYY HH24:MI:SS'));
18299: msc_sch_wb.atp_debug('requested arrival date = '
18300: ||to_char( p_atp_table.requested_arrival_date(k), 'DD-MON-YYYY HH24:MI:SS'));
18301: msc_sch_wb.atp_debug('group ship date = '

Line 18299: msc_sch_wb.atp_debug('requested arrival date = '

18295: LOOP
18296: IF PG_DEBUG in ('Y', 'C') THEN
18297: msc_sch_wb.atp_debug('requested ship date = '||
18298: to_char( p_atp_table.requested_ship_date(k), 'DD-MON-YYYY HH24:MI:SS'));
18299: msc_sch_wb.atp_debug('requested arrival date = '
18300: ||to_char( p_atp_table.requested_arrival_date(k), 'DD-MON-YYYY HH24:MI:SS'));
18301: msc_sch_wb.atp_debug('group ship date = '
18302: ||to_char( l_atp_output_table.group_Ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18303: msc_sch_wb.atp_debug('group arrival date = '

Line 18301: msc_sch_wb.atp_debug('group ship date = '

18297: msc_sch_wb.atp_debug('requested ship date = '||
18298: to_char( p_atp_table.requested_ship_date(k), 'DD-MON-YYYY HH24:MI:SS'));
18299: msc_sch_wb.atp_debug('requested arrival date = '
18300: ||to_char( p_atp_table.requested_arrival_date(k), 'DD-MON-YYYY HH24:MI:SS'));
18301: msc_sch_wb.atp_debug('group ship date = '
18302: ||to_char( l_atp_output_table.group_Ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18303: msc_sch_wb.atp_debug('group arrival date = '
18304: ||to_char( l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18305: msc_sch_wb.atp_debug('arrival date = '

Line 18303: msc_sch_wb.atp_debug('group arrival date = '

18299: msc_sch_wb.atp_debug('requested arrival date = '
18300: ||to_char( p_atp_table.requested_arrival_date(k), 'DD-MON-YYYY HH24:MI:SS'));
18301: msc_sch_wb.atp_debug('group ship date = '
18302: ||to_char( l_atp_output_table.group_Ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18303: msc_sch_wb.atp_debug('group arrival date = '
18304: ||to_char( l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18305: msc_sch_wb.atp_debug('arrival date = '
18306: ||to_char(l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18307: msc_sch_wb.atp_debug('ship date = '

Line 18305: msc_sch_wb.atp_debug('arrival date = '

18301: msc_sch_wb.atp_debug('group ship date = '
18302: ||to_char( l_atp_output_table.group_Ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18303: msc_sch_wb.atp_debug('group arrival date = '
18304: ||to_char( l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18305: msc_sch_wb.atp_debug('arrival date = '
18306: ||to_char(l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18307: msc_sch_wb.atp_debug('ship date = '
18308: ||to_char(l_atp_output_table.ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18309: END IF;

Line 18307: msc_sch_wb.atp_debug('ship date = '

18303: msc_sch_wb.atp_debug('group arrival date = '
18304: ||to_char( l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18305: msc_sch_wb.atp_debug('arrival date = '
18306: ||to_char(l_atp_output_table.arrival_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18307: msc_sch_wb.atp_debug('ship date = '
18308: ||to_char(l_atp_output_table.ship_Date(k), 'DD-MON-YYYY HH24:MI:SS'));
18309: END IF;
18310: if((( p_atp_table.requested_ship_date(k)is not null and
18311: (p_atp_table.requested_ship_date(k) <>

Line 18347: msc_sch_wb.atp_debug('Call_Schedule: ' || 'before backlog');

18343: END IF;
18344:
18345: -- this is for backlog: we need to send a message back.
18346: IF PG_DEBUG in ('Y', 'C') THEN
18347: msc_sch_wb.atp_debug('Call_Schedule: ' || 'before backlog');
18348: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop: ' || x_atp_table.action.count);
18349: END IF;
18350:
18351: k := l_atp_output_table.Calling_Module.First;

Line 18348: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop: ' || x_atp_table.action.count);

18344:
18345: -- this is for backlog: we need to send a message back.
18346: IF PG_DEBUG in ('Y', 'C') THEN
18347: msc_sch_wb.atp_debug('Call_Schedule: ' || 'before backlog');
18348: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop: ' || x_atp_table.action.count);
18349: END IF;
18350:
18351: k := l_atp_output_table.Calling_Module.First;
18352: IF k IS NOT NULL THEN

Line 18357: msc_sch_wb.atp_debug('Call_Schedule: ' || 'for backlog');

18353:
18354: IF NVL(l_atp_output_table.Calling_Module(k), 0) = -1 AND l_atp_progess_bar = 'Y' THEN -- backlog 7419485
18355:
18356: IF PG_DEBUG in ('Y', 'C') THEN
18357: msc_sch_wb.atp_debug('Call_Schedule: ' || 'for backlog');
18358: END IF;
18359: --Bug3765793 adding trim functions to remove spaces from db_link
18360: SELECT ltrim(rtrim(M2A_DBLINK))
18361: INTO l_dblink

Line 18365: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after l_dblink : '||l_dblink);

18361: INTO l_dblink
18362: FROM msc_apps_instances
18363: WHERE instance_id = p_instance_id;
18364: IF PG_DEBUG in ('Y', 'C') THEN
18365: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after l_dblink : '||l_dblink);
18366: END IF;
18367:
18368: FOR k in 1..l_atp_output_table.Calling_Module.COUNT LOOP
18369:

Line 18371: msc_sch_wb.atp_debug('Call_Schedule: ' || 'in side for loop for backlog');

18367:
18368: FOR k in 1..l_atp_output_table.Calling_Module.COUNT LOOP
18369:
18370: IF PG_DEBUG in ('Y', 'C') THEN
18371: msc_sch_wb.atp_debug('Call_Schedule: ' || 'in side for loop for backlog');
18372: END IF;
18373: /*
18374: msc_sch_wb.pipe_utility(p_session_id,
18375: 'SEND',

Line 18374: msc_sch_wb.pipe_utility(p_session_id,

18370: IF PG_DEBUG in ('Y', 'C') THEN
18371: msc_sch_wb.atp_debug('Call_Schedule: ' || 'in side for loop for backlog');
18372: END IF;
18373: /*
18374: msc_sch_wb.pipe_utility(p_session_id,
18375: 'SEND',
18376: l_msg_data,
18377: l_msg_count,
18378: x_return_status,

Line 18384: plsql_block := 'BEGIN msc_sch_wb.pipe_utility'

18380: l_msg_count);
18381: */ --bug3520746 pass MSC_ATP_PVT.G_DATABASE_LINK insead of l_dblink
18382: --as global variable already has the right dblink for RAC
18383: IF l_dblink IS NOT NULL THEN
18384: plsql_block := 'BEGIN msc_sch_wb.pipe_utility'
18385: ||'@'||MSC_ATP_PVT.G_DATABASE_LINK||'(:p_session_id,
18386: :p_command,
18387: :l_msg_data,
18388: :l_msg_number,

Line 18394: msc_sch_wb.atp_debug('Call_Schedule: ' || 'plsql_block : '|| plsql_block);

18390: :l_msg_text,
18391: :l_msg_count); END;';
18392:
18393: IF PG_DEBUG in ('Y', 'C') THEN
18394: msc_sch_wb.atp_debug('Call_Schedule: ' || 'plsql_block : '|| plsql_block);
18395: END IF;
18396:
18397: BEGIN
18398: EXECUTE IMMEDIATE plsql_block USING

Line 18407: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after plsql_block');

18403: OUT x_return_status,
18404: OUT l_msg_text,
18405: OUT l_msg_count;
18406: IF PG_DEBUG in ('Y', 'C') THEN
18407: msc_sch_wb.atp_debug('Call_Schedule: ' || 'after plsql_block');
18408: END IF;
18409: EXCEPTION
18410: when others then
18411: IF PG_DEBUG in ('Y', 'C') THEN

Line 18412: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside send exception : '||sqlcode);

18408: END IF;
18409: EXCEPTION
18410: when others then
18411: IF PG_DEBUG in ('Y', 'C') THEN
18412: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside send exception : '||sqlcode);
18413: END IF;
18414: END;
18415:
18416: ELSE --IF l_dblink IS NOT NULL THEN

Line 18417: msc_sch_wb.pipe_utility(p_session_id,

18413: END IF;
18414: END;
18415:
18416: ELSE --IF l_dblink IS NOT NULL THEN
18417: msc_sch_wb.pipe_utility(p_session_id,
18418: 'SEND',
18419: l_msg_data,
18420: l_msg_number,
18421: x_return_status,

Line 18448: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside global availability check and calling remove_invalid_sd_rec');

18444: IF ( l_global_availability = 'Y' )
18445: AND (p_atp_table.source_organization_id(i) <> p_atp_table.source_organization_id(l)) THEN
18446:
18447: IF PG_DEBUG in ('Y', 'C') THEN
18448: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside global availability check and calling remove_invalid_sd_rec');
18449: END IF;
18450: IF ( x_atp_table.Action(1) = ATPQUERY ) THEN
18451: IF ( MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST IS NOT NULL AND MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.Count > 0) THEN
18452: FOR m in 1..MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.COUNT LOOP

Line 18474: msc_sch_wb.atp_debug(x_atp_table.Action(1));

18470:
18471: END LOOP;
18472:
18473: IF PG_DEBUG in ('Y', 'C') THEN
18474: msc_sch_wb.atp_debug(x_atp_table.Action(1));
18475: msc_sch_wb.atp_debug(x_atp_table.calling_module(1));
18476: END IF;
18477:
18478: --3720018, Call to Remove_invalid_SD_rec and Undo_delete_row for the whole_request in case of ATP Inquiry

Line 18475: msc_sch_wb.atp_debug(x_atp_table.calling_module(1));

18471: END LOOP;
18472:
18473: IF PG_DEBUG in ('Y', 'C') THEN
18474: msc_sch_wb.atp_debug(x_atp_table.Action(1));
18475: msc_sch_wb.atp_debug(x_atp_table.calling_module(1));
18476: END IF;
18477:
18478: --3720018, Call to Remove_invalid_SD_rec and Undo_delete_row for the whole_request in case of ATP Inquiry
18479: IF ( x_atp_table.Action(1) = ATPQUERY ) THEN

Line 18481: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Outside global availability check and calling remove_invalid_sdrec');

18477:
18478: --3720018, Call to Remove_invalid_SD_rec and Undo_delete_row for the whole_request in case of ATP Inquiry
18479: IF ( x_atp_table.Action(1) = ATPQUERY ) THEN
18480: IF PG_DEBUG in ('Y', 'C') THEN
18481: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Outside global availability check and calling remove_invalid_sdrec');
18482: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop: ' || x_atp_table.action.count);
18483: END IF;
18484:
18485: IF ( MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST IS NOT NULL AND MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.Count > 0) THEN

Line 18482: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop: ' || x_atp_table.action.count);

18478: --3720018, Call to Remove_invalid_SD_rec and Undo_delete_row for the whole_request in case of ATP Inquiry
18479: IF ( x_atp_table.Action(1) = ATPQUERY ) THEN
18480: IF PG_DEBUG in ('Y', 'C') THEN
18481: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Outside global availability check and calling remove_invalid_sdrec');
18482: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Here ISO BUG x_atp_table count at end of loop: ' || x_atp_table.action.count);
18483: END IF;
18484:
18485: IF ( MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST IS NOT NULL AND MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.Count > 0) THEN
18486: FOR m in 1..MSC_ATP_PVT.G_REMOVE_REQUEST_LEVEL_REC.REMOVE_PEGGING_ID_REQUEST.COUNT LOOP

Line 18544: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_regions_temp : '||sql%rowcount);

18540: DELETE msc_regions_temp
18541: WHERE session_id = p_session_id;
18542:
18543: IF PG_DEBUG in ('Y', 'C') THEN
18544: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_regions_temp : '||sql%rowcount);
18545: END IF;
18546: --bug3940999 Delete records from msc_atp_src_profile_temp before returning
18547: --back to calling application so as to clean up the table
18548: DELETE msc_atp_src_profile_temp

Line 18554: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);

18550:
18551:
18552:
18553: IF PG_DEBUG in ('Y', 'C') THEN
18554: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);
18555: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before calling MSC_ATP_PROC.Delete_Copy_Demand');
18556: END IF;
18557:
18558: -- Summary enhancement - Delete the copy demands that were created in this transaction if refresh number has moved.

Line 18555: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before calling MSC_ATP_PROC.Delete_Copy_Demand');

18551:
18552:
18553: IF PG_DEBUG in ('Y', 'C') THEN
18554: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);
18555: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before calling MSC_ATP_PROC.Delete_Copy_Demand');
18556: END IF;
18557:
18558: -- Summary enhancement - Delete the copy demands that were created in this transaction if refresh number has moved.
18559: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' THEN --bug4291375 Delete_Copy_Demand should be called when summary is ON.

Line 18572: msc_sch_wb.atp_debug('Call_Schedule: G_OFF_DEM_TRANS_ID.count ' || G_OFF_DEM_TRANS_ID.count);

18568: --Bug 3629191: Insert Offset Record to MRP_ATP_DETAILS_TEMP with record_type = 3
18569: -- and these will be inserted with NULL in all the three pegging_id columns
18570:
18571: IF PG_DEBUG in ('Y', 'C') THEN
18572: msc_sch_wb.atp_debug('Call_Schedule: G_OFF_DEM_TRANS_ID.count ' || G_OFF_DEM_TRANS_ID.count);
18573: for i in 1..G_OFF_DEM_TRANS_ID.count LOOP
18574: msc_sch_wb.atp_debug('Call_Schedule: ' ||G_OFF_INSTANCE_ID(i) ||',' || G_OFF_PLAN_ID(i)||','||G_OFF_DEM_TRANS_ID(i));
18575: END LOOP;
18576: END IF;

Line 18574: msc_sch_wb.atp_debug('Call_Schedule: ' ||G_OFF_INSTANCE_ID(i) ||',' || G_OFF_PLAN_ID(i)||','||G_OFF_DEM_TRANS_ID(i));

18570:
18571: IF PG_DEBUG in ('Y', 'C') THEN
18572: msc_sch_wb.atp_debug('Call_Schedule: G_OFF_DEM_TRANS_ID.count ' || G_OFF_DEM_TRANS_ID.count);
18573: for i in 1..G_OFF_DEM_TRANS_ID.count LOOP
18574: msc_sch_wb.atp_debug('Call_Schedule: ' ||G_OFF_INSTANCE_ID(i) ||',' || G_OFF_PLAN_ID(i)||','||G_OFF_DEM_TRANS_ID(i));
18575: END LOOP;
18576: END IF;
18577:
18578: IF (MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y') THEN

Line 18605: msc_sch_wb.atp_debug('Call_Schedule: ' || 'WF Profile:' || l_wf_profile);

18601: * Restructured Exception/WF Notification code */
18602: l_wf_profile := NVL(G_ATP_WORKFLOW,
18603: NVL(fnd_profile.value('MSC_ALLOCATED_ATP_WORKFLOW'), 'N'));
18604: IF PG_DEBUG in ('Y', 'C') THEN
18605: msc_sch_wb.atp_debug('Call_Schedule: ' || 'WF Profile:' || l_wf_profile);
18606: END IF;
18607:
18608: k := x_atp_table.Calling_Module.First;
18609: -- Generate exceptions only if action is not ATP query.

Line 18618: msc_sch_wb.atp_debug('Call_Schedule: ' || 'k := '||k);

18614: l_wf_start := NULL;
18615: l_exception_rec.demand_id := NULL;
18616:
18617: IF PG_DEBUG in ('Y', 'C') THEN
18618: msc_sch_wb.atp_debug('Call_Schedule: ' || 'k := '||k);
18619: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Override_flag : '||x_atp_table.Override_Flag(k));
18620: END IF;
18621:
18622: /* rajjain code specific to workflow generation begin*/

Line 18619: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Override_flag : '||x_atp_table.Override_Flag(k));

18615: l_exception_rec.demand_id := NULL;
18616:
18617: IF PG_DEBUG in ('Y', 'C') THEN
18618: msc_sch_wb.atp_debug('Call_Schedule: ' || 'k := '||k);
18619: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Override_flag : '||x_atp_table.Override_Flag(k));
18620: END IF;
18621:
18622: /* rajjain code specific to workflow generation begin*/
18623: IF NVL(l_wf_profile, 'N') = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 18626: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin Workflow Notification ***');

18622: /* rajjain code specific to workflow generation begin*/
18623: IF NVL(l_wf_profile, 'N') = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
18624: -- generate workflow notification only in case of PDS.
18625: IF PG_DEBUG in ('Y', 'C') THEN
18626: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin Workflow Notification ***');
18627: msc_sch_wb.atp_debug('Call_Schedule: ' || 'qty ordered : '||x_atp_table.Quantity_Ordered(k));
18628: msc_sch_wb.atp_debug('Call_Schedule: ' || 'req_date_qty : '||x_atp_table.Requested_Date_Quantity(k));
18629: END IF;
18630:

Line 18627: msc_sch_wb.atp_debug('Call_Schedule: ' || 'qty ordered : '||x_atp_table.Quantity_Ordered(k));

18623: IF NVL(l_wf_profile, 'N') = 'Y' AND MSC_ATP_PVT.G_INV_CTP = 4 THEN
18624: -- generate workflow notification only in case of PDS.
18625: IF PG_DEBUG in ('Y', 'C') THEN
18626: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin Workflow Notification ***');
18627: msc_sch_wb.atp_debug('Call_Schedule: ' || 'qty ordered : '||x_atp_table.Quantity_Ordered(k));
18628: msc_sch_wb.atp_debug('Call_Schedule: ' || 'req_date_qty : '||x_atp_table.Requested_Date_Quantity(k));
18629: END IF;
18630:
18631: IF (nvl(x_atp_table.Error_Code(k),-1) = 0) AND (NVL(x_atp_table.Override_Flag(k), 'N') = 'Y') THEN

Line 18628: msc_sch_wb.atp_debug('Call_Schedule: ' || 'req_date_qty : '||x_atp_table.Requested_Date_Quantity(k));

18624: -- generate workflow notification only in case of PDS.
18625: IF PG_DEBUG in ('Y', 'C') THEN
18626: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin Workflow Notification ***');
18627: msc_sch_wb.atp_debug('Call_Schedule: ' || 'qty ordered : '||x_atp_table.Quantity_Ordered(k));
18628: msc_sch_wb.atp_debug('Call_Schedule: ' || 'req_date_qty : '||x_atp_table.Requested_Date_Quantity(k));
18629: END IF;
18630:
18631: IF (nvl(x_atp_table.Error_Code(k),-1) = 0) AND (NVL(x_atp_table.Override_Flag(k), 'N') = 'Y') THEN
18632: BEGIN

Line 18648: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting Available Date for WF *****');

18644: WHEN no_data_found THEN
18645: l_avail_date := NULL;
18646: WHEN others THEN
18647: IF PG_DEBUG in ('Y', 'C') THEN
18648: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting Available Date for WF *****');
18649: END IF;
18650: l_avail_date := NULL;
18651: END;
18652:

Line 18657: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_avail_date : '||l_avail_date);

18653: l_wf_start := 'Y';
18654: END IF; --IF x_atp_table.Override_Flag ... THEN
18655:
18656: IF PG_DEBUG in ('Y', 'C') THEN
18657: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_avail_date : '||l_avail_date);
18658: END IF;
18659: IF (nvl(x_atp_table.Error_Code(k),-1) IN (0,53)) AND MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
18660:
18661: IF PG_DEBUG in ('Y', 'C') THEN

Line 18662: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for Action : '||

18658: END IF;
18659: IF (nvl(x_atp_table.Error_Code(k),-1) IN (0,53)) AND MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
18660:
18661: IF PG_DEBUG in ('Y', 'C') THEN
18662: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for Action : '||
18663: x_atp_table.Action(k));
18664: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for calling Module : '||
18665: x_atp_table.Calling_Module(k));
18666: END IF;

Line 18664: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for calling Module : '||

18660:
18661: IF PG_DEBUG in ('Y', 'C') THEN
18662: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for Action : '||
18663: x_atp_table.Action(k));
18664: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Inside Workflow for calling Module : '||
18665: x_atp_table.Calling_Module(k));
18666: END IF;
18667:
18668: BEGIN

Line 18684: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting stealing qty for WF *****');

18680: WHEN no_data_found THEN
18681: l_stealing_qty := 0;
18682: WHEN others THEN
18683: IF PG_DEBUG in ('Y', 'C') THEN
18684: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting stealing qty for WF *****');
18685: END IF;
18686: l_stealing_qty := -1;
18687: END;
18688:

Line 18690: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_stealing_qty : '||l_stealing_qty);

18686: l_stealing_qty := -1;
18687: END;
18688:
18689: IF PG_DEBUG in ('Y', 'C') THEN
18690: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_stealing_qty : '||l_stealing_qty);
18691: END IF;
18692:
18693: l_wf_start := 'Y';
18694: END IF; --IF MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN

Line 18721: msc_sch_wb.atp_debug('Call_Schedule: ' || 'No Data Found getting item key for WF');

18717:
18718: EXCEPTION
18719: WHEN no_data_found THEN
18720: IF PG_DEBUG in ('Y', 'C') THEN
18721: msc_sch_wb.atp_debug('Call_Schedule: ' || 'No Data Found getting item key for WF');
18722: END IF;
18723: l_wf_item_key := NULL;
18724: WHEN others THEN
18725: IF PG_DEBUG in ('Y', 'C') THEN

Line 18726: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting item key for WF *****');

18722: END IF;
18723: l_wf_item_key := NULL;
18724: WHEN others THEN
18725: IF PG_DEBUG in ('Y', 'C') THEN
18726: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting item key for WF *****');
18727: END IF;
18728: l_wf_item_key := NULL;
18729: END;
18730:

Line 18732: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_wf_item_key : '||l_wf_item_key);

18728: l_wf_item_key := NULL;
18729: END;
18730:
18731: IF PG_DEBUG in ('Y', 'C') THEN
18732: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_wf_item_key : '||l_wf_item_key);
18733: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
18734: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
18735: END IF;
18736:

Line 18733: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);

18729: END;
18730:
18731: IF PG_DEBUG in ('Y', 'C') THEN
18732: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_wf_item_key : '||l_wf_item_key);
18733: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
18734: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
18735: END IF;
18736:
18737: IF ((nvl(x_atp_table.Requested_Date_Quantity(k),0) < nvl(x_atp_table.Quantity_Ordered(k),0)) OR

Line 18734: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);

18730:
18731: IF PG_DEBUG in ('Y', 'C') THEN
18732: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_wf_item_key : '||l_wf_item_key);
18733: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
18734: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
18735: END IF;
18736:
18737: IF ((nvl(x_atp_table.Requested_Date_Quantity(k),0) < nvl(x_atp_table.Quantity_Ordered(k),0)) OR
18738: (nvl(l_stealing_qty, 0) > 0)) AND (MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND

Line 18742: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before Allocated ATP Workflow');

18738: (nvl(l_stealing_qty, 0) > 0)) AND (MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y') AND
18739: (l_wf_item_key IS NOT NULL) THEN
18740:
18741: IF PG_DEBUG in ('Y', 'C') THEN
18742: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before Allocated ATP Workflow');
18743: END IF;
18744: --bug 2463556: wrap workflow call with begin end so that if any exception
18745: ---occurs in workflow generation then ATP continues as normal
18746:

Line 18762: msc_sch_wb.atp_debug('Call_Schedule: ' || ' Allocated ATP WF notification generation failed');

18758: x_atp_table.Customer_Site_Id(k),x_atp_table.Order_Number(k));
18759: EXCEPTION
18760: WHEN OTHERS THEN
18761: IF PG_DEBUG in ('Y', 'C') THEN
18762: msc_sch_wb.atp_debug('Call_Schedule: ' || ' Allocated ATP WF notification generation failed');
18763: END IF;
18764: END;
18765:
18766: END IF;

Line 18773: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before ATP Override Workflow');

18769: (nvl(x_atp_table.Override_Flag(k), 'N') = 'Y')) AND
18770: (l_wf_item_key IS NOT NULL) THEN
18771:
18772: IF PG_DEBUG in ('Y', 'C') THEN
18773: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before ATP Override Workflow');
18774: END IF;
18775: --bug 2463556: wrap workflow call with begin end so that if any exception
18776: ---occurs in workflow generation then ATP continues as normal
18777:

Line 18793: msc_sch_wb.atp_debug('Call_Schedule: ' || 'ATP Override WF Notification Generation Failed');

18789: x_atp_table.Customer_Site_Id(k),x_atp_table.Order_Number(k), x_atp_table.Identifier(k));
18790: EXCEPTION
18791: WHEN OTHERS THEN
18792: IF PG_DEBUG in ('Y', 'C') THEN
18793: msc_sch_wb.atp_debug('Call_Schedule: ' || 'ATP Override WF Notification Generation Failed');
18794: END IF;
18795:
18796: END;
18797: END IF;

Line 18810: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before ATP Override Exception');

18806: -- bug 2795053-reopen (ssurendr): Generate exception only if set is successful
18807: AND (nvl(x_atp_table.Error_Code(k),-1) = 0)
18808: THEN
18809: IF PG_DEBUG in ('Y', 'C') THEN
18810: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Before ATP Override Exception');
18811: END IF;
18812:
18813: -- 24x7
18814: if (NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'Y' ) then

Line 18825: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Using Instance ID : ' || l_instance_id);

18821: else
18822: l_instance_id := p_instance_id;
18823: end if;
18824: IF PG_DEBUG in ('Y', 'C') THEN
18825: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Using Instance ID : ' || l_instance_id);
18826: END IF;
18827: -- End 24x7
18828:
18829: If l_exception_rec.demand_id is null THEN

Line 18847: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Exception: No data found');

18843:
18844: EXCEPTION
18845: WHEN no_data_found THEN
18846: IF PG_DEBUG in ('Y', 'C') THEN
18847: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Exception: No data found');
18848: END IF;
18849: l_exception_rec.demand_id := NULL;
18850: WHEN others THEN
18851: IF PG_DEBUG in ('Y', 'C') THEN

Line 18852: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting demand_id for generating exception *****');

18848: END IF;
18849: l_exception_rec.demand_id := NULL;
18850: WHEN others THEN
18851: IF PG_DEBUG in ('Y', 'C') THEN
18852: msc_sch_wb.atp_debug('Call_Schedule: ' || '***** Error getting demand_id for generating exception *****');
18853: END IF;
18854: l_exception_rec.demand_id := NULL;
18855: END;
18856:

Line 18858: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);

18854: l_exception_rec.demand_id := NULL;
18855: END;
18856:
18857: IF PG_DEBUG in ('Y', 'C') THEN
18858: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
18859: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
18860: END IF;
18861: END IF;
18862: IF (l_plan_id is not null) AND

Line 18859: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);

18855: END;
18856:
18857: IF PG_DEBUG in ('Y', 'C') THEN
18858: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_exception_rec.demand_id : '||l_exception_rec.demand_id);
18859: msc_sch_wb.atp_debug('Call_Schedule: ' || 'l_plan_id : '||l_plan_id);
18860: END IF;
18861: END IF;
18862: IF (l_plan_id is not null) AND
18863: (l_exception_rec.demand_id is not null) THEN

Line 18868: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin ATP Override Exception ***');

18864: -- bug 2795053-reopen (ssurendr): do not generate exception for non-ATPable items.
18865: -- In case of non-ATPable there will be no pegging record.
18866: -- generate exception only in case of PDS. In case of ODS ATP l_plan_id will be null
18867: IF PG_DEBUG in ('Y', 'C') THEN
18868: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** Begin ATP Override Exception ***');
18869: END IF;
18870:
18871: l_exception_rec.exception_type := 68; -- Overcommitment of Sales Order
18872: l_exception_rec.quantity := -1 * x_atp_table.quantity_ordered(k);

Line 18888: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error occured while selecting inventory_item_id : ' || sqlerrm);

18884: and sr_inventory_item_id = NVL(x_atp_table.match_item_id(k), x_atp_table.inventory_item_id(k));
18885: EXCEPTION
18886: WHEN OTHERS THEN
18887: IF PG_DEBUG in ('Y', 'C') THEN
18888: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error occured while selecting inventory_item_id : ' || sqlerrm);
18889: END IF;
18890: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
18891: END;
18892:

Line 18894: msc_sch_wb.atp_debug('Call_Schedule: Inventory Item Id : ' || l_inventory_item_id);

18890: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
18891: END;
18892:
18893: IF PG_DEBUG in ('Y', 'C') THEN
18894: msc_sch_wb.atp_debug('Call_Schedule: Inventory Item Id : ' || l_inventory_item_id);
18895: END IF;
18896: l_exception_rec.exception_group := 5;
18897: l_exception_rec.plan_id := l_plan_id;
18898: l_exception_rec.organization_id := x_atp_table.source_organization_id(k);

Line 18912: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Return Status After adding exception : '||

18908: l_exception_rec.quantity_satisfied := x_atp_table.Requested_Date_Quantity(k);
18909:
18910: MSC_ATP_EXCEPTIONS.Add_ATP_Exception(p_session_id, l_exception_rec, l_exception_return_status);
18911: IF PG_DEBUG in ('Y', 'C') THEN
18912: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Return Status After adding exception : '||
18913: l_exception_return_status);
18914: END IF;
18915: END IF;
18916: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** End ATP Override Exception ***');

Line 18916: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** End ATP Override Exception ***');

18912: msc_sch_wb.atp_debug ('Call_Schedule: ' || 'Return Status After adding exception : '||
18913: l_exception_return_status);
18914: END IF;
18915: END IF;
18916: msc_sch_wb.atp_debug('Call_Schedule: ' || '*** End ATP Override Exception ***');
18917: END IF;
18918: /* rajjain code specific to ATP Override Exception end*/
18919:
18920: k := x_atp_table.Calling_Module.Next(k);

Line 18926: msc_sch_wb.atp_debug('***** End Call_Schedule Procedure *****');

18922: END IF;
18923: /* rajjain 02/27/2003 Bug 2824700 End*/
18924:
18925: IF PG_DEBUG in ('Y', 'C') THEN
18926: msc_sch_wb.atp_debug('***** End Call_Schedule Procedure *****');
18927: END IF;
18928:
18929: END Call_Schedule;
18930:

Line 18991: msc_sch_wb.set_session_id(p_session_id);

18987: select ltrim(rtrim(substr(value, instr(value,',',-1,1)+1)))
18988: into x_session_loc_des
18989: from v$parameter where name= 'utl_file_dir';
18990: END IF;
18991: msc_sch_wb.set_session_id(p_session_id);
18992: --bug3940999 This code used to be down, moved it up
18993: IF order_sch_wb.mr_debug in ('T','C') THEN
18994: IF PG_DEBUG in ('Y', 'C') THEN
18995: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');

Line 18995: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');

18991: msc_sch_wb.set_session_id(p_session_id);
18992: --bug3940999 This code used to be down, moved it up
18993: IF order_sch_wb.mr_debug in ('T','C') THEN
18994: IF PG_DEBUG in ('Y', 'C') THEN
18995: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');
18996: END IF;
18997: C := DBMS_SQL.OPEN_CURSOR;
18998: -- STATEMENT := 'ALTER SESSION SET SQL_TRACE=TRUE';
18999: STATEMENT := 'ALTER SESSION SET events ' || '''' || '10046 trace name context forever, level 12' || '''' ;

Line 19018: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'spid: ' || l_spid);

19014: from v$parameter
19015: WHERE name = 'user_dump_dest'; --ATP Debug Workflow
19016:
19017: IF PG_DEBUG in ('Y', 'C') THEN
19018: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'spid: ' || l_spid);
19019: END IF;
19020:
19021: END IF;
19022:

Line 19024: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);

19020:
19021: END IF;
19022:
19023: IF PG_DEBUG in ('Y', 'C') THEN --bug3940999
19024: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
19025: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19026: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );

Line 19025: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');

19021: END IF;
19022:
19023: IF PG_DEBUG in ('Y', 'C') THEN --bug3940999
19024: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
19025: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19026: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
19029: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );

Line 19026: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );

19022:
19023: IF PG_DEBUG in ('Y', 'C') THEN --bug3940999
19024: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
19025: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19026: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
19029: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
19030: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );

Line 19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );

19023: IF PG_DEBUG in ('Y', 'C') THEN --bug3940999
19024: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
19025: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19026: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
19029: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
19030: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
19031: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );

Line 19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );

19024: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
19025: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19026: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
19029: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
19030: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
19031: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );
19032: END IF;

Line 19029: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );

19025: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19026: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
19029: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
19030: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
19031: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );
19032: END IF;
19033:

Line 19030: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );

19026: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id );
19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
19029: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
19030: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
19031: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );
19032: END IF;
19033:
19034: --bug3520746 start

Line 19031: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );

19027: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_session_id : ' || p_session_id );
19028: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_instance_id : ' || p_instance_id );
19029: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_assign_set_id : ' || p_assign_set_id );
19030: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_refresh_number : ' || p_refresh_number );
19031: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_def_assign_set_id : ' || p_def_assign_set_id );
19032: END IF;
19033:
19034: --bug3520746 start
19035: l_dblink := null;

Line 19048: msc_sch_wb.atp_debug('Did not get records in rac case');

19044: EXCEPTION
19045: WHEN OTHERS THEN
19046: l_dblink := null;
19047: IF PG_DEBUG in ('Y', 'C') THEN
19048: msc_sch_wb.atp_debug('Did not get records in rac case');
19049: END IF;
19050: END;
19051: ELSE --6697106
19052: ---bug 2301524: read summary flag

Line 19066: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');

19062: FROM msc_apps_instances
19063: WHERE instance_id = p_instance_id;
19064:
19065: IF PG_DEBUG in ('Y', 'C') THEN
19066: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
19067: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
19068: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
19069: END IF;
19070:

Line 19067: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);

19063: WHERE instance_id = p_instance_id;
19064:
19065: IF PG_DEBUG in ('Y', 'C') THEN
19066: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
19067: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
19068: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
19069: END IF;
19070:
19071: --bug3940999 start honor profile options passed from the source

Line 19068: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);

19064:
19065: IF PG_DEBUG in ('Y', 'C') THEN
19066: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
19067: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
19068: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
19069: END IF;
19070:
19071: --bug3940999 start honor profile options passed from the source
19072: -- We have passed atp debug mode profile seperately so that debug mode

Line 19088: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || l_profile_name(j) || ' : ' || l_profile_value(j));

19084:
19085: FOR j in 1..l_profile_name.count LOOP
19086:
19087: IF PG_DEBUG in ('Y', 'C') THEN
19088: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || l_profile_name(j) || ' : ' || l_profile_value(j));
19089: END IF;
19090:
19091: IF l_profile_name(j) = 'MSC_ALLOCATION_METHOD' THEN
19092:

Line 19136: msc_sch_wb.atp_debug('Call_Schedule_Remote: Inside Else No match Got');

19132:
19133: ELSE
19134:
19135: IF PG_DEBUG in ('Y', 'C') THEN
19136: msc_sch_wb.atp_debug('Call_Schedule_Remote: Inside Else No match Got');
19137: END IF;
19138: END IF;
19139:
19140: END LOOP;

Line 19149: msc_sch_wb.set_session_id(p_session_id);

19145: FND_PROFILE.put('MSC_ATP_DEBUG', p_atp_debug_flag);
19146: PG_DEBUG := p_atp_debug_flag;
19147: END IF;
19148:
19149: msc_sch_wb.set_session_id(p_session_id);
19150: IF PG_DEBUG in ('Y', 'C') THEN
19151: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
19152: END IF;
19153:

Line 19151: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);

19147: END IF;
19148:
19149: msc_sch_wb.set_session_id(p_session_id);
19150: IF PG_DEBUG in ('Y', 'C') THEN
19151: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SESSION_ID : ' || order_sch_wb.debug_session_id);
19152: END IF;
19153:
19154: -- 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
19155: IF p_atp_workflow IS NOT NULL THEN

Line 19164: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');

19160: -- Bug 2387242 : krajan
19161: -- Set Sql Trace.
19162: IF order_sch_wb.mr_debug in ('T','C') THEN
19163: IF PG_DEBUG in ('Y', 'C') THEN
19164: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace being enabled');
19165: END IF;
19166: C := DBMS_SQL.OPEN_CURSOR;
19167: -- STATEMENT := 'ALTER SESSION SET SQL_TRACE=TRUE';
19168: STATEMENT := 'ALTER SESSION SET events ' || '''' || '10046 trace name context forever, level 12' || '''' ;

Line 19180: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'spid: ' || l_spid);

19176: FROM v$process
19177: WHERE addr = (SELECT paddr FROM v$session
19178: WHERE audsid=userenv('SESSIONID'));
19179: IF PG_DEBUG in ('Y', 'C') THEN
19180: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'spid: ' || l_spid);
19181: END IF;
19182:
19183: END IF;
19184:

Line 19192: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');

19188: MSC_ATP_PVT.G_SR_ASSIGN_SET := NVL(p_def_assign_set_id, 0);
19189: -- changes for bug 2368426 ends
19190:
19191: IF PG_DEBUG in ('Y', 'C') THEN
19192: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19193: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id);
19194: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_use_ship_rec : ' || p_use_ship_rec);
19195: END IF;
19196: --bug3520746 start

Line 19193: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id);

19189: -- changes for bug 2368426 ends
19190:
19191: IF PG_DEBUG in ('Y', 'C') THEN
19192: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19193: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id);
19194: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_use_ship_rec : ' || p_use_ship_rec);
19195: END IF;
19196: --bug3520746 start
19197: l_dblink := null;

Line 19194: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_use_ship_rec : ' || p_use_ship_rec);

19190:
19191: IF PG_DEBUG in ('Y', 'C') THEN
19192: msc_sch_wb.atp_debug('***** Begin Call_Schedule_Remote Procedure *****');
19193: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_node_id : ' || p_node_id);
19194: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'p_use_ship_rec : ' || p_use_ship_rec);
19195: END IF;
19196: --bug3520746 start
19197: l_dblink := null;
19198: IF p_node_id is not null THEN

Line 19210: msc_sch_wb.atp_debug('Did not get records in rac case');

19206: EXCEPTION
19207: WHEN OTHERS THEN
19208: l_dblink := null;
19209: IF PG_DEBUG in ('Y', 'C') THEN
19210: msc_sch_wb.atp_debug('Did not get records in rac case');
19211: END IF;
19212: END;
19213: ELSE --6697106
19214: ---bug 2301524: read summary flag

Line 19227: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');

19223: INTO l_summary_flag, MSC_ATP_PVT.G_APPS_VER
19224: FROM msc_apps_instances
19225: WHERE instance_id = p_instance_id;
19226: IF PG_DEBUG in ('Y', 'C') THEN
19227: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
19228: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
19229: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
19230: END IF;
19231: */ --bug3940999 end

Line 19228: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);

19224: FROM msc_apps_instances
19225: WHERE instance_id = p_instance_id;
19226: IF PG_DEBUG in ('Y', 'C') THEN
19227: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
19228: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
19229: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
19230: END IF;
19231: */ --bug3940999 end
19232: MSC_ATP_PVT.G_SR_ASSIGN_SET := NVL(p_def_assign_set_id, 0);

Line 19229: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);

19225: WHERE instance_id = p_instance_id;
19226: IF PG_DEBUG in ('Y', 'C') THEN
19227: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get m2a_dblink');
19228: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_dblink = ' || l_dblink);
19229: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'l_summary_flag := ' || l_summary_flag);
19230: END IF;
19231: */ --bug3940999 end
19232: MSC_ATP_PVT.G_SR_ASSIGN_SET := NVL(p_def_assign_set_id, 0);
19233: MSC_ATP_PVT.G_DATABASE_LINK := l_dblink;

Line 19253: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get_from_temp_table'||p_atp_table.action.count);

19249: x_msg_count,
19250: 2);
19251:
19252: IF PG_DEBUG in ('Y', 'C') THEN
19253: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get_from_temp_table'||p_atp_table.action.count);
19254: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'before Call_Schedule');
19255: END IF;
19256:
19257: --- 2301524: Summary mode is not supported for backlog workbench.

Line 19254: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'before Call_Schedule');

19250: 2);
19251:
19252: IF PG_DEBUG in ('Y', 'C') THEN
19253: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after get_from_temp_table'||p_atp_table.action.count);
19254: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'before Call_Schedule');
19255: END IF;
19256:
19257: --- 2301524: Summary mode is not supported for backlog workbench.
19258: IF PG_DEBUG in ('Y', 'C') THEN

Line 19259: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

19255: END IF;
19256:
19257: --- 2301524: Summary mode is not supported for backlog workbench.
19258: IF PG_DEBUG in ('Y', 'C') THEN
19259: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
19260: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
19261: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'calling_module := '|| p_atp_table.calling_module(1));
19262: END IF;
19263: 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 19260: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);

19256:
19257: --- 2301524: Summary mode is not supported for backlog workbench.
19258: IF PG_DEBUG in ('Y', 'C') THEN
19259: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
19260: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
19261: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'calling_module := '|| p_atp_table.calling_module(1));
19262: END IF;
19263: 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'
19264: 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 19261: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'calling_module := '|| p_atp_table.calling_module(1));

19257: --- 2301524: Summary mode is not supported for backlog workbench.
19258: IF PG_DEBUG in ('Y', 'C') THEN
19259: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
19260: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_ALLOCATED_ATP := ' || MSC_ATP_PVT.G_ALLOCATED_ATP);
19261: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'calling_module := '|| p_atp_table.calling_module(1));
19262: END IF;
19263: 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'
19264: and MSC_ATP_PVT.G_ALLOCATED_ATP = 'N' AND MSC_ATP_PVT.G_INV_CTP = 5 THEN -- INV_CTP check added for summary enhancement
19265: --- if backlog workbench is used then set the summary falg to 200 for ODS cases

Line 19267: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Site is using backlog workbench, update tables and turnoff ODS summary');

19263: 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'
19264: and MSC_ATP_PVT.G_ALLOCATED_ATP = 'N' AND MSC_ATP_PVT.G_INV_CTP = 5 THEN -- INV_CTP check added for summary enhancement
19265: --- if backlog workbench is used then set the summary falg to 200 for ODS cases
19266: IF PG_DEBUG in ('Y', 'C') THEN
19267: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Site is using backlog workbench, update tables and turnoff ODS summary');
19268: END IF;
19269:
19270: update msc_apps_instances
19271: set summary_flag = 200;

Line 19277: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Site is using backlog workbench, turnoff ODS summary');

19273: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
19274: ELSIF l_summary_flag = 200 AND MSC_ATP_PVT.G_INV_CTP = 5 THEN -- INV_CTP check added for summary enhancement
19275: --site is using backlog workbench, turn off the summary flag for ODS cases;
19276: IF PG_DEBUG in ('Y', 'C') THEN
19277: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Site is using backlog workbench, turnoff ODS summary');
19278: END IF;
19279: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
19280: END IF;
19281:

Line 19289: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_USE_SHIP_REC_CAL doesnt match');

19285: IF l_use_ship_rec <> MSC_ATP_PVT.G_USE_SHIP_REC_CAL THEN --bug3593394
19286:
19287: --bug3593394
19288: IF PG_DEBUG in ('Y', 'C') THEN
19289: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'G_USE_SHIP_REC_CAL doesnt match');
19290: END IF;
19291: x_atp_table := p_atp_table;
19292: i := x_atp_table.action.FIRST;
19293: WHILE i IS NOT NULL LOOP

Line 19304: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'error_code(' || i || ') : ' || x_atp_table.error_code(i));

19300: -- Part of a set. Error code should be
19301: x_atp_table.error_code(i) := MSC_ATP_PVT.GROUPEL_ERROR;
19302: END IF;
19303: IF PG_DEBUG in ('Y', 'C') THEN
19304: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'error_code(' || i || ') : ' || x_atp_table.error_code(i));
19305: END IF;
19306: i := p_atp_table.Action.NEXT(i);
19307: END LOOP;
19308:

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

19308:
19309: ELSIF MSC_ATP_PVT.G_INV_CTP_SOURCE <> MSC_ATP_PVT.G_INV_CTP THEN
19310:
19311: IF PG_DEBUG in ('Y', 'C') THEN
19312: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Source INV_CTP not in sync with destination ');
19313: END IF;
19314: x_atp_table := p_atp_table;
19315: i := x_atp_table.action.FIRST;
19316: WHILE i IS NOT NULL LOOP

Line 19327: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'error_code(' || i || ') : ' || x_atp_table.error_code(i));

19323: -- Part of a set. Error code should be
19324: x_atp_table.error_code(i) := MSC_ATP_PVT.GROUPEL_ERROR;
19325: END IF;
19326: IF PG_DEBUG in ('Y', 'C') THEN
19327: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'error_code(' || i || ') : ' || x_atp_table.error_code(i));
19328: END IF;
19329: i := p_atp_table.Action.NEXT(i);
19330: END LOOP;
19331:

Line 19348: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after Call_Schedule');

19344: x_atp_period,
19345: x_atp_details);
19346:
19347: IF PG_DEBUG in ('Y', 'C') THEN
19348: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'after Call_Schedule');
19349: END IF;
19350:
19351: END IF;
19352:

Line 19366: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'here');

19362: x_msg_data,
19363: x_msg_count);
19364:
19365: IF PG_DEBUG in ('Y', 'C') THEN
19366: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'here');
19367: END IF;
19368: IF l_dblink IS NOT NULL THEN
19369: MSC_ATP_UTILS.Transfer_mrp_atp_details_temp(l_dblink, p_session_id);
19370: END IF;

Line 19376: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace disabled');

19372: -- Bug 2387242 : krajan
19373: -- Set Sql Trace.
19374: IF order_sch_wb.mr_debug in ('T','C') THEN
19375: IF PG_DEBUG in ('Y', 'C') THEN
19376: msc_sch_wb.atp_debug('Call_Schedule_Remote: ' || 'Database Trace disabled');
19377: END IF;
19378: C := DBMS_SQL.OPEN_CURSOR;
19379: STATEMENT := 'ALTER SESSION SET SQL_TRACE=FALSE';
19380: DBMS_SQL.PARSE(C, STATEMENT, DBMS_SQL.NATIVE);

Line 19386: msc_sch_wb.atp_debug('***** End Call_Schedule_Remote Procedure *****');

19382: DBMS_SQL.CLOSE_CURSOR(C);
19383: END IF;
19384:
19385: IF PG_DEBUG in ('Y', 'C') THEN
19386: msc_sch_wb.atp_debug('***** End Call_Schedule_Remote Procedure *****');
19387: END IF;
19388:
19389: END Call_Schedule_Remote;
19390: PROCEDURE Process_Time_Stamp_Errors (l_atp_table IN OUT NOCOPY MRP_ATP_PUB.ATP_Rec_Typ,

Line 19396: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');

19392: IS
19393: BEGIN
19394:
19395: IF PG_DEBUG in ('Y', 'C') THEN
19396: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
19397: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19398: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19399: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
19400: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);

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

19393: BEGIN
19394:
19395: IF PG_DEBUG in ('Y', 'C') THEN
19396: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
19397: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19398: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19399: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
19400: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);
19401: END IF;

Line 19398: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

19394:
19395: IF PG_DEBUG in ('Y', 'C') THEN
19396: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
19397: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19398: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19399: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
19400: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);
19401: END IF;
19402:

Line 19399: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);

19395: IF PG_DEBUG in ('Y', 'C') THEN
19396: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
19397: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19398: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19399: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
19400: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);
19401: END IF;
19402:
19403: IF MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP = 'Y' and MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET = 'N' THEN

Line 19400: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);

19396: msc_sch_wb.atp_debug('********** Begin Process_Time_Stamp_Errors **********');
19397: msc_sch_wb.atp_debug('ship_date:(Before) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19398: msc_sch_wb.atp_debug('Req. ship_date:(Before) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19399: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP := ' || MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP);
19400: msc_sch_wb.atp_debug('MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := ' || MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET);
19401: END IF;
19402:
19403: IF MSC_ATP_PVT.G_RETAIN_TIME_NON_ATP = 'Y' and MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET = 'N' THEN
19404: --bug 9237457, We should TRUNC ship/arrival date before adding time_stamp even if G_RETAIN_TIME_NON_ATP = 'Y'

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

19432: NVL(l_atp_table.ship_date(i), MSC_ATP_PROC.G_latest_ship_date_set));
19433: MSC_ATP_PROC.G_latest_arr_date_set := GREATEST(NVL(MSC_ATP_PROC.G_latest_arr_date_set, l_atp_table.arrival_date(i)),
19434: NVL(l_atp_table.arrival_date(i), MSC_ATP_PROC.G_latest_arr_date_set));
19435: IF PG_DEBUG in ('Y', 'C') THEN
19436: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19437: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19438: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19439: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');
19440: END IF;

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

19433: MSC_ATP_PROC.G_latest_arr_date_set := GREATEST(NVL(MSC_ATP_PROC.G_latest_arr_date_set, l_atp_table.arrival_date(i)),
19434: NVL(l_atp_table.arrival_date(i), MSC_ATP_PROC.G_latest_arr_date_set));
19435: IF PG_DEBUG in ('Y', 'C') THEN
19436: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19437: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19438: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19439: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');
19440: END IF;
19441: END Process_Time_Stamp_Errors;

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

19434: NVL(l_atp_table.arrival_date(i), MSC_ATP_PROC.G_latest_arr_date_set));
19435: IF PG_DEBUG in ('Y', 'C') THEN
19436: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19437: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19438: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19439: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');
19440: END IF;
19441: END Process_Time_Stamp_Errors;
19442:

Line 19439: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');

19435: IF PG_DEBUG in ('Y', 'C') THEN
19436: msc_sch_wb.atp_debug('ship_date:(After) ' || to_char(l_atp_table.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19437: msc_sch_wb.atp_debug('Arrival_date:(After) ' || to_char(l_atp_table.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19438: msc_sch_wb.atp_debug('Req. ship_date:(After) ' || to_char(l_atp_table.requested_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
19439: msc_sch_wb.atp_debug('********** END Process_Time_Stamp_Errors **********');
19440: END IF;
19441: END Process_Time_Stamp_Errors;
19442:
19443: /*--GET_SEQ_NUM-------------------------------------------------

Line 19455: msc_sch_wb.atp_debug('Get_Seq_Num: p_calendar_date: ' || p_calendar_date);

19451: IS
19452: l_seq_num NUMBER;
19453: BEGIN
19454: IF PG_DEBUG in ('Y', 'C') THEN
19455: msc_sch_wb.atp_debug('Get_Seq_Num: p_calendar_date: ' || p_calendar_date);
19456: msc_sch_wb.atp_debug('Get_Seq_Num: p_calendar_code: ' || p_calendar_code);
19457: msc_sch_wb.atp_debug('Get_Seq_Num: p_instance_id: ' || p_instance_id);
19458: END IF;
19459: SELECT seq_num

Line 19456: msc_sch_wb.atp_debug('Get_Seq_Num: p_calendar_code: ' || p_calendar_code);

19452: l_seq_num NUMBER;
19453: BEGIN
19454: IF PG_DEBUG in ('Y', 'C') THEN
19455: msc_sch_wb.atp_debug('Get_Seq_Num: p_calendar_date: ' || p_calendar_date);
19456: msc_sch_wb.atp_debug('Get_Seq_Num: p_calendar_code: ' || p_calendar_code);
19457: msc_sch_wb.atp_debug('Get_Seq_Num: p_instance_id: ' || p_instance_id);
19458: END IF;
19459: SELECT seq_num
19460: INTO l_seq_num

Line 19457: msc_sch_wb.atp_debug('Get_Seq_Num: p_instance_id: ' || p_instance_id);

19453: BEGIN
19454: IF PG_DEBUG in ('Y', 'C') THEN
19455: msc_sch_wb.atp_debug('Get_Seq_Num: p_calendar_date: ' || p_calendar_date);
19456: msc_sch_wb.atp_debug('Get_Seq_Num: p_calendar_code: ' || p_calendar_code);
19457: msc_sch_wb.atp_debug('Get_Seq_Num: p_instance_id: ' || p_instance_id);
19458: END IF;
19459: SELECT seq_num
19460: INTO l_seq_num
19461: FROM msc_calendar_dates

Line 19469: msc_sch_wb.atp_debug('Get_Seq_Num: l_seq_num: ' || l_seq_num);

19465: AND sr_instance_id = p_instance_id
19466: AND exception_set_id = -1;
19467:
19468: IF PG_DEBUG in ('Y', 'C') THEN
19469: msc_sch_wb.atp_debug('Get_Seq_Num: l_seq_num: ' || l_seq_num);
19470: END IF;
19471:
19472: RETURN l_seq_num;
19473: EXCEPTION

Line 19476: msc_sch_wb.atp_debug('Get_Seq_Num: Inside exception block ');

19472: RETURN l_seq_num;
19473: EXCEPTION
19474: WHEN NO_DATA_FOUND THEN
19475: IF PG_DEBUG in ('Y', 'C') THEN
19476: msc_sch_wb.atp_debug('Get_Seq_Num: Inside exception block ');
19477: END IF;
19478: FND_MESSAGE.SET_NAME('MRP', 'GEN-DATE OUT OF BOUNDS');
19479: APP_EXCEPTION.RAISE_EXCEPTION;
19480: END Get_Seq_Num;

Line 19494: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_seq_num: ' || p_seq_num);

19490: IS
19491: l_date DATE;
19492: BEGIN
19493: IF PG_DEBUG in ('Y', 'C') THEN
19494: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_seq_num: ' || p_seq_num);
19495: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_calendar_code: ' || p_calendar_code);
19496: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_instance_id: ' || p_instance_id);
19497: END IF;
19498:

Line 19495: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_calendar_code: ' || p_calendar_code);

19491: l_date DATE;
19492: BEGIN
19493: IF PG_DEBUG in ('Y', 'C') THEN
19494: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_seq_num: ' || p_seq_num);
19495: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_calendar_code: ' || p_calendar_code);
19496: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_instance_id: ' || p_instance_id);
19497: END IF;
19498:
19499: SELECT calendar_date

Line 19496: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_instance_id: ' || p_instance_id);

19492: BEGIN
19493: IF PG_DEBUG in ('Y', 'C') THEN
19494: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_seq_num: ' || p_seq_num);
19495: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_calendar_code: ' || p_calendar_code);
19496: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: p_instance_id: ' || p_instance_id);
19497: END IF;
19498:
19499: SELECT calendar_date
19500: INTO l_date

Line 19508: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: l_date: ' || l_date);

19504: AND sr_instance_id = p_instance_id
19505: AND exception_set_id = -1;
19506:
19507: IF PG_DEBUG in ('Y', 'C') THEN
19508: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: l_date: ' || l_date);
19509: END IF;
19510:
19511: RETURN l_date;
19512: EXCEPTION

Line 19515: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: Inside exception block ');

19511: RETURN l_date;
19512: EXCEPTION
19513: WHEN NO_DATA_FOUND THEN
19514: IF PG_DEBUG in ('Y', 'C') THEN
19515: msc_sch_wb.atp_debug('Get_Date_From_Seqnum: Inside exception block ');
19516: END IF;
19517: FND_MESSAGE.SET_NAME('MRP', 'GEN-DATE OUT OF BOUNDS');
19518: APP_EXCEPTION.RAISE_EXCEPTION;
19519: END Get_Date_From_Seqnum;