DBA Data[Home] [Help]

APPS.MSC_ATP_PROC dependencies on MSC_SCH_WB

Line 59: msc_sch_wb.atp_debug('PROCEDURE add_inf_time_fence_to_period');

55: l_return_status VARCHAR2(1);
56: BEGIN
57:
58: IF PG_DEBUG in ('Y', 'C') THEN
59: msc_sch_wb.atp_debug('PROCEDURE add_inf_time_fence_to_period');
60: END IF;
61:
62: IF p_infinite_time_fence_date IS NULL THEN
63: RETURN;

Line 115: msc_sch_wb.atp_debug('PROCEDURE get_period_data_from_SD_temp');

111: x_return_status NUMBER;
112: BEGIN
113:
114: IF PG_DEBUG in ('Y', 'C') THEN
115: msc_sch_wb.atp_debug('PROCEDURE get_period_data_from_SD_temp');
116: END IF;
117:
118: SELECT
119: ATP_level

Line 208: msc_sch_wb.atp_debug('PROCEDURE Get_Alloc_Data_From_Sd_Temp');

204: j NUMBER;
205: BEGIN
206:
207: IF PG_DEBUG in ('Y', 'C') THEN
208: msc_sch_wb.atp_debug('PROCEDURE Get_Alloc_Data_From_Sd_Temp');
209: END IF;
210:
211: -- initialize API return status to success
212: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 288: msc_sch_wb.atp_debug('Get_Alloc_Data_From_Sd_Temp: ' || 'Error code:' || to_char(sqlcode));

284:
285: EXCEPTION
286: WHEN OTHERS THEN
287: IF PG_DEBUG in ('Y', 'C') THEN
288: msc_sch_wb.atp_debug('Get_Alloc_Data_From_Sd_Temp: ' || 'Error code:' || to_char(sqlcode));
289: END IF;
290: x_return_status := FND_API.G_RET_STS_ERROR;
291:
292: END Get_Alloc_Data_From_Sd_Temp;

Line 335: msc_sch_wb.atp_debug('***** Begin Atp_Sources *********');

331:
332: BEGIN
333:
334: IF PG_DEBUG in ('Y', 'C') THEN
335: msc_sch_wb.atp_debug('***** Begin Atp_Sources *********');
336: END IF;
337: -- initialize API return status to success
338: x_return_status := FND_API.G_RET_STS_SUCCESS;
339:

Line 341: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id = '||p_instance_id);

337: -- initialize API return status to success
338: x_return_status := FND_API.G_RET_STS_SUCCESS;
339:
340: IF PG_DEBUG in ('Y', 'C') THEN
341: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id = '||p_instance_id);
342: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id = '||p_plan_id);
343: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id = '||p_inventory_item_id);
344: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id = '||p_organization_id);
345: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_id = '||p_customer_id);

Line 342: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id = '||p_plan_id);

338: x_return_status := FND_API.G_RET_STS_SUCCESS;
339:
340: IF PG_DEBUG in ('Y', 'C') THEN
341: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id = '||p_instance_id);
342: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id = '||p_plan_id);
343: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id = '||p_inventory_item_id);
344: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id = '||p_organization_id);
345: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_id = '||p_customer_id);
346: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_site_id = '||p_customer_site_id);

Line 343: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id = '||p_inventory_item_id);

339:
340: IF PG_DEBUG in ('Y', 'C') THEN
341: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id = '||p_instance_id);
342: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id = '||p_plan_id);
343: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id = '||p_inventory_item_id);
344: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id = '||p_organization_id);
345: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_id = '||p_customer_id);
346: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_site_id = '||p_customer_site_id);
347: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id = '||p_assign_set_id);

Line 344: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id = '||p_organization_id);

340: IF PG_DEBUG in ('Y', 'C') THEN
341: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id = '||p_instance_id);
342: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id = '||p_plan_id);
343: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id = '||p_inventory_item_id);
344: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id = '||p_organization_id);
345: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_id = '||p_customer_id);
346: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_site_id = '||p_customer_site_id);
347: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id = '||p_assign_set_id);
348: END IF;

Line 345: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_id = '||p_customer_id);

341: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id = '||p_instance_id);
342: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id = '||p_plan_id);
343: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id = '||p_inventory_item_id);
344: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id = '||p_organization_id);
345: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_id = '||p_customer_id);
346: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_site_id = '||p_customer_site_id);
347: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id = '||p_assign_set_id);
348: END IF;
349:

Line 346: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_site_id = '||p_customer_site_id);

342: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id = '||p_plan_id);
343: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id = '||p_inventory_item_id);
344: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id = '||p_organization_id);
345: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_id = '||p_customer_id);
346: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_site_id = '||p_customer_site_id);
347: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id = '||p_assign_set_id);
348: END IF;
349:
350: -- For bug 2585710. Store sysdate in local variable once and for all.

Line 347: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id = '||p_assign_set_id);

343: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id = '||p_inventory_item_id);
344: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id = '||p_organization_id);
345: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_id = '||p_customer_id);
346: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_customer_site_id = '||p_customer_site_id);
347: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id = '||p_assign_set_id);
348: END IF;
349:
350: -- For bug 2585710. Store sysdate in local variable once and for all.
351: -- Replace trunc(sysdate) everwhere.

Line 366: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_customer_id '||l_customer_id);

362: AND tp.SR_INSTANCE_ID = p_instance_id
363: AND tp.PARTNER_TYPE = 2;
364:
365: IF PG_DEBUG in ('Y', 'C') THEN
366: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_customer_id '||l_customer_id);
367: END IF;
368:
369: SELECT TP_SITE_ID
370: INTO l_ship_to_site_id

Line 376: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_ship_to_site_id '||l_ship_to_site_id);

372: WHERE tpsite.SR_TP_SITE_ID = p_customer_site_id
373: AND tpsite.SR_INSTANCE_ID = p_instance_id
374: AND tpsite.PARTNER_TYPE = 2;
375: IF PG_DEBUG in ('Y', 'C') THEN
376: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_ship_to_site_id '||l_ship_to_site_id);
377: END IF;
378: EXCEPTION
379: WHEN NO_DATA_FOUND THEN
380: IF PG_DEBUG in ('Y', 'C') THEN

Line 381: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Customer id : '|| p_customer_id ||' not collected as yet');

377: END IF;
378: EXCEPTION
379: WHEN NO_DATA_FOUND THEN
380: IF PG_DEBUG in ('Y', 'C') THEN
381: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Customer id : '|| p_customer_id ||' not collected as yet');
382: END IF;
383: l_customer_id := NULL;
384: l_ship_to_site_id := NULL;
385: END;

Line 394: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Request is for ship set not a single line item');

390: IF p_item_sourcing_info_rec.sr_inventory_item_id.count > 1 THEN
391:
392: -- this is for ship set
393: IF PG_DEBUG in ('Y', 'C') THEN
394: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Request is for ship set not a single line item');
395: FOR i in 1.. p_item_sourcing_info_rec.sr_inventory_item_id.COUNT LOOP
396: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_ship_set_item(i) = '
397: || p_item_sourcing_info_rec.sr_inventory_item_id(i));
398: END LOOP;

Line 396: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_ship_set_item(i) = '

392: -- this is for ship set
393: IF PG_DEBUG in ('Y', 'C') THEN
394: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Request is for ship set not a single line item');
395: FOR i in 1.. p_item_sourcing_info_rec.sr_inventory_item_id.COUNT LOOP
396: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_ship_set_item(i) = '
397: || p_item_sourcing_info_rec.sr_inventory_item_id(i));
398: END LOOP;
399: END IF;
400:

Line 443: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||

439: --return;
440: x_return_status := MSC_ATP_PVT.G_ITEM_NOT_COLL;
441:
442: IF PG_DEBUG in ('Y', 'C') THEN
443: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||
444: p_item_sourcing_info_rec.sr_inventory_item_id(i));
445: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
446: END IF;
447: RAISE NO_DATA_FOUND;

Line 445: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);

441:
442: IF PG_DEBUG in ('Y', 'C') THEN
443: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||
444: p_item_sourcing_info_rec.sr_inventory_item_id(i));
445: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
446: END IF;
447: RAISE NO_DATA_FOUND;
448: -- If dest inv item id is -1 return from procedure means no items not collected
449: ELSIF l_dest_ship_set_item_list(l_dest_ship_set_item_list.COUNT) = -1 THEN

Line 452: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);

448: -- If dest inv item id is -1 return from procedure means no items not collected
449: ELSIF l_dest_ship_set_item_list(l_dest_ship_set_item_list.COUNT) = -1 THEN
450: x_return_status := MSC_ATP_PVT.G_ITEM_ID_NULL;
451: IF PG_DEBUG in ('Y', 'C') THEN
452: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
453: END IF;
454: RAISE NO_DATA_FOUND;
455: END IF;
456:

Line 469: msc_sch_wb.atp_debug('Model component, ignore for sourcing');

465: ---we do not look for sourcing for components of ato model
466: l_distinct_item := 0;
467:
468: IF PG_DEBUG in ('Y', 'C') THEN
469: msc_sch_wb.atp_debug('Model component, ignore for sourcing');
470: END IF;
471:
472: ELSE
473:

Line 516: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||

512: --x_return_status := FND_API.G_RET_STS_ERROR;
513: --return;
514: x_return_status := MSC_ATP_PVT.G_ITEM_NOT_COLL;
515: IF PG_DEBUG in ('Y', 'C') THEN
516: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||
517: p_item_sourcing_info_rec.sr_inventory_item_id(i));
518: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
519: END IF;
520: RAISE NO_DATA_FOUND;

Line 518: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);

514: x_return_status := MSC_ATP_PVT.G_ITEM_NOT_COLL;
515: IF PG_DEBUG in ('Y', 'C') THEN
516: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||
517: p_item_sourcing_info_rec.sr_inventory_item_id(i));
518: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
519: END IF;
520: RAISE NO_DATA_FOUND;
521: -- If dest inv item id is -1 return from procedure means no items not collected
522: ELSIF l_dest_ship_set_item_list(l_dest_ship_set_item_list.COUNT) = -1 THEN

Line 525: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);

521: -- If dest inv item id is -1 return from procedure means no items not collected
522: ELSIF l_dest_ship_set_item_list(l_dest_ship_set_item_list.COUNT) = -1 THEN
523: x_return_status := MSC_ATP_PVT.G_ITEM_ID_NULL;
524: IF PG_DEBUG in ('Y', 'C') THEN
525: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
526: END IF;
527: RAISE NO_DATA_FOUND;
528: END IF;
529:

Line 536: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_count := ' || l_count);

532: END IF;
533:
534: END LOOP;
535:
536: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_count := ' || l_count);
537: l_count := l_dest_ship_set_item_list.COUNT;
538: IF PG_DEBUG in ('Y', 'C') THEN
539: msc_sch_wb.atp_debug('Atp_Sources: ' || 'No of distinct item in the ship set := '||l_count);
540: FOR j in 1..l_count LOOP

Line 539: msc_sch_wb.atp_debug('Atp_Sources: ' || 'No of distinct item in the ship set := '||l_count);

535:
536: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_count := ' || l_count);
537: l_count := l_dest_ship_set_item_list.COUNT;
538: IF PG_DEBUG in ('Y', 'C') THEN
539: msc_sch_wb.atp_debug('Atp_Sources: ' || 'No of distinct item in the ship set := '||l_count);
540: FOR j in 1..l_count LOOP
541: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_dest_ship_set_item_list(j) = '||l_dest_ship_set_item_list(j));
542: END LOOP;
543: END IF;

Line 541: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_dest_ship_set_item_list(j) = '||l_dest_ship_set_item_list(j));

537: l_count := l_dest_ship_set_item_list.COUNT;
538: IF PG_DEBUG in ('Y', 'C') THEN
539: msc_sch_wb.atp_debug('Atp_Sources: ' || 'No of distinct item in the ship set := '||l_count);
540: FOR j in 1..l_count LOOP
541: msc_sch_wb.atp_debug('Atp_Sources: ' || 'l_dest_ship_set_item_list(j) = '||l_dest_ship_set_item_list(j));
542: END LOOP;
543: END IF;
544:
545:

Line 558: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Request is for single line item and not ship set');

554:
555: ELSE
556:
557: IF PG_DEBUG in ('Y', 'C') THEN
558: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Request is for single line item and not ship set');
559: END IF;
560:
561: l_inv_item_id := MSC_ATP_FUNC.get_inv_item_id (p_instance_id,
562: --p_inventory_item_id,

Line 569: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv item Id := ' || l_inv_item_id);

565: p_item_sourcing_info_rec.match_item_id(1),
566: --e_cto_rearch
567: p_organization_id);
568: IF PG_DEBUG in ('Y', 'C') THEN
569: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv item Id := ' || l_inv_item_id);
570: END IF;
571: -- 4091487 added elsif condition to raise try atp later error in case msc_item_id_lid contains no records
572: ---bug 1905037
573: -- If dest inv item id is -1 return from procedure means this item is not collected

Line 581: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||

577: --x_return_status := FND_API.G_RET_STS_ERROR;
578: --return;
579: x_return_status := MSC_ATP_PVT.G_ITEM_NOT_COLL;
580: IF PG_DEBUG in ('Y', 'C') THEN
581: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||
582: p_item_sourcing_info_rec.sr_inventory_item_id(1));
583: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
584: END IF;
585: RAISE NO_DATA_FOUND;

Line 583: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);

579: x_return_status := MSC_ATP_PVT.G_ITEM_NOT_COLL;
580: IF PG_DEBUG in ('Y', 'C') THEN
581: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Inv Item Id not found for : ' ||
582: p_item_sourcing_info_rec.sr_inventory_item_id(1));
583: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
584: END IF;
585: RAISE NO_DATA_FOUND;
586: -- If dest inv item id is -1 return from procedure means no items not collected
587: ELSIF l_inv_item_id = -1 THEN

Line 590: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);

586: -- If dest inv item id is -1 return from procedure means no items not collected
587: ELSIF l_inv_item_id = -1 THEN
588: x_return_status := MSC_ATP_PVT.G_ITEM_ID_NULL;
589: IF PG_DEBUG in ('Y', 'C') THEN
590: msc_sch_wb.atp_debug('return status assigned = ' || x_return_status);
591: END IF;
592: RAISE NO_DATA_FOUND;
593: END IF;
594: IF p_item_sourcing_info_rec.line_id(1) = p_item_sourcing_info_rec.ato_line_id(1) THEN

Line 596: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Model Line, Add line id');

592: RAISE NO_DATA_FOUND;
593: END IF;
594: IF p_item_sourcing_info_rec.line_id(1) = p_item_sourcing_info_rec.ato_line_id(1) THEN
595: IF PG_DEBUG in ('Y', 'C') THEN
596: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Model Line, Add line id');
597: msc_sch_wb.atp_debug('Atp_Sources: line_id := ' || p_item_sourcing_info_rec.line_id(1));
598: END IF;
599: l_model_flag := 1;
600: l_line_ids.extend;

Line 597: msc_sch_wb.atp_debug('Atp_Sources: line_id := ' || p_item_sourcing_info_rec.line_id(1));

593: END IF;
594: IF p_item_sourcing_info_rec.line_id(1) = p_item_sourcing_info_rec.ato_line_id(1) THEN
595: IF PG_DEBUG in ('Y', 'C') THEN
596: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Model Line, Add line id');
597: msc_sch_wb.atp_debug('Atp_Sources: line_id := ' || p_item_sourcing_info_rec.line_id(1));
598: END IF;
599: l_model_flag := 1;
600: l_line_ids.extend;
601: l_line_ids(1) := p_item_sourcing_info_rec.line_id(1);

Line 603: msc_sch_wb.atp_debug('After Adding line id');

599: l_model_flag := 1;
600: l_line_ids.extend;
601: l_line_ids(1) := p_item_sourcing_info_rec.line_id(1);
602: IF PG_DEBUG in ('Y', 'C') THEN
603: msc_sch_wb.atp_debug('After Adding line id');
604: END IF;
605:
606: END IF;
607: END IF;

Line 619: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in ship set and receiving party is customer');

615: IF p_customer_site_id IS NOT NULL THEN
616: -- Bug 3515520, don't use org in case customer/site is populated.
617:
618: IF PG_DEBUG in ('Y', 'C') THEN
619: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in ship set and receiving party is customer');
620: END IF;
621:
622: -- rmehra Replaced views by procedure for bug 2585710
623: MSC_ATP_PROC.Get_Sources_Info(order_sch_wb.debug_session_id, null, l_customer_id,

Line 629: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Error occured in procedure Get_Sources_Info');

625: p_partner_type, p_party_site_id, p_order_line_id ); --2814895
626:
627: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
628: IF PG_DEBUG in ('Y', 'C') THEN
629: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Error occured in procedure Get_Sources_Info');
630: END IF;
631: DELETE MSC_SHIP_SET_TEMP;
632: x_return_status := FND_API.G_RET_STS_ERROR;
633: return;

Line 641: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in ship set and receiving party is an inv org');

637: ELSIF p_organization_id IS NOT NULL AND (p_customer_id is NULL AND p_customer_site_id IS NULL) THEN
638: -- Bug 3515520, don't use org in case customer/site is populated.
639:
640: IF PG_DEBUG in ('Y', 'C') THEN
641: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in ship set and receiving party is an inv org');
642: END IF;
643:
644: -- the cursor is different if it is ods or pds
645: --bug 3495773: Add nvl condition

Line 649: msc_sch_wb.atp_debug('Atp_Sources: ' || 'inside ship set, p_plan_id <> -1');

645: --bug 3495773: Add nvl condition
646: IF nvl(p_plan_id, -1) <> -1 THEN
647: -- pds , use msc_item_sourcing table
648: IF PG_DEBUG in ('Y', 'C') THEN
649: msc_sch_wb.atp_debug('Atp_Sources: ' || 'inside ship set, p_plan_id <> -1');
650: END IF;
651:
652: -- Fix for bug 1454524, no need to join based on assignment set as only
653: -- 1 assignment set is supported for a plan.

Line 720: msc_sch_wb.atp_debug('Atp_Sources: ' || 'We are in ODS, using msc_sources_v for sources.');

716:
717: ELSE
718: -- ODS, use msc_sources_v
719: IF PG_DEBUG in ('Y', 'C') THEN
720: msc_sch_wb.atp_debug('Atp_Sources: ' || 'We are in ODS, using msc_sources_v for sources.');
721: END IF;
722:
723: -- fix 1460753: make at for global sourcing rule
724: -- Bug 2585710. Rewriting the dynamic SQL into static form.

Line 791: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in single line, receiving party is customer');

787: -- Bug 3515520, don't use org in case customer/site is populated.
788:
789: -- we are in single line, receiving party is customer
790: IF PG_DEBUG in ('Y', 'C') THEN
791: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in single line, receiving party is customer');
792: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Customer Specific Sourcing');
793: END IF;
794:
795: -- savirine, Sep 11, 2001: added region_id and source_organization_id in the where clause and

Line 792: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Customer Specific Sourcing');

788:
789: -- we are in single line, receiving party is customer
790: IF PG_DEBUG in ('Y', 'C') THEN
791: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in single line, receiving party is customer');
792: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Customer Specific Sourcing');
793: END IF;
794:
795: -- savirine, Sep 11, 2001: added region_id and source_organization_id in the where clause and
796: -- added aliases in the select statement.

Line 808: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Procedure Get_Sources_Info could not find any sources');

804: p_partner_type, p_party_site_id, p_order_line_id ); --2814895
805:
806: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
807: IF PG_DEBUG in ('Y', 'C') THEN
808: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Procedure Get_Sources_Info could not find any sources');
809: END IF;
810: x_return_status := FND_API.G_RET_STS_ERROR;
811: return;
812: END IF;

Line 817: msc_sch_wb.atp_debug('Atp_Sources: ' || 'get some records');

813:
814:
815: IF x_atp_sources.Rank.COUNT > 0 THEN
816: IF PG_DEBUG in ('Y', 'C') THEN
817: msc_sch_wb.atp_debug('Atp_Sources: ' || 'get some records');
818: END IF;
819: l_preferred_rank := x_atp_sources.Rank(1);
820: i := 1;
821: WHILE i IS NOT NULL LOOP

Line 839: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in single line and receiving party is an inv org.');

835:
836: -- we are in single line and receiving party is an inv org.
837:
838: IF PG_DEBUG in ('Y', 'C') THEN
839: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in single line and receiving party is an inv org.');
840:
841: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id'||p_assign_set_id);
842: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id'||p_inventory_item_id);
843: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id'||p_organization_id);

Line 841: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id'||p_assign_set_id);

837:
838: IF PG_DEBUG in ('Y', 'C') THEN
839: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in single line and receiving party is an inv org.');
840:
841: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id'||p_assign_set_id);
842: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id'||p_inventory_item_id);
843: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id'||p_organization_id);
844: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id'||p_instance_id);
845: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id'||p_plan_id);

Line 842: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id'||p_inventory_item_id);

838: IF PG_DEBUG in ('Y', 'C') THEN
839: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in single line and receiving party is an inv org.');
840:
841: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id'||p_assign_set_id);
842: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id'||p_inventory_item_id);
843: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id'||p_organization_id);
844: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id'||p_instance_id);
845: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id'||p_plan_id);
846: END IF;

Line 843: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id'||p_organization_id);

839: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in single line and receiving party is an inv org.');
840:
841: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id'||p_assign_set_id);
842: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id'||p_inventory_item_id);
843: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id'||p_organization_id);
844: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id'||p_instance_id);
845: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id'||p_plan_id);
846: END IF;
847:

Line 844: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id'||p_instance_id);

840:
841: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id'||p_assign_set_id);
842: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id'||p_inventory_item_id);
843: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id'||p_organization_id);
844: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id'||p_instance_id);
845: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id'||p_plan_id);
846: END IF;
847:
848: -- Bug 1542439, since planning is now carrying the sourcing for models

Line 845: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id'||p_plan_id);

841: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_assign_set_id'||p_assign_set_id);
842: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_inventory_item_id'||p_inventory_item_id);
843: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_organization_id'||p_organization_id);
844: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_instance_id'||p_instance_id);
845: msc_sch_wb.atp_debug('Atp_Sources: ' || 'p_plan_id'||p_plan_id);
846: END IF;
847:
848: -- Bug 1542439, since planning is now carrying the sourcing for models
849: -- removing the wrokaround and look into the PDS data rather than ODS

Line 863: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in pds, using msc_item_sourcing');

859: -- IF p_plan_id <> -1 AND l_cto_bom = 0 THEN
860: --bug 3495773: Add nvl condition
861: IF nvl(p_plan_id, -1) <> -1 THEN
862: IF PG_DEBUG in ('Y', 'C') THEN
863: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in pds, using msc_item_sourcing');
864: END IF;
865: -- we are in pds, using msc_item_sourcing
866:
867: -- Fix for bug 1454524, no need to join based on assignment set as only 1 assignment

Line 923: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in ods, using msc_sources_v');

919: ORDER BY rank asc, allocation_percent desc;
920: ELSE
921:
922: IF PG_DEBUG in ('Y', 'C') THEN
923: msc_sch_wb.atp_debug('Atp_Sources: ' || 'we are in ods, using msc_sources_v');
924: END IF;
925: -- we are in ods
926: -- we are in ods or this is for multi-level, multi-org CTO, using msc_sources_v
927:

Line 982: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Sources count = '|| x_atp_sources.organization_id.count);

978: END IF;
979: END IF; --- IF (p_organization_id IS NULL) AND (p_customer_id is NULL)
980:
981: IF PG_DEBUG in ('Y', 'C') THEN
982: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Sources count = '|| x_atp_sources.organization_id.count);
983: END IF;
984: --bug 3495773: Add nvl condition
985: IF (x_atp_sources.organization_id.count = 0) and (nvl(p_plan_id, -1) = -1) then
986: IF PG_DEBUG in ('Y', 'C') THEN

Line 987: msc_sch_wb.atp_debug('Atp_Sources: ' || 'No sources found so far');

983: END IF;
984: --bug 3495773: Add nvl condition
985: IF (x_atp_sources.organization_id.count = 0) and (nvl(p_plan_id, -1) = -1) then
986: IF PG_DEBUG in ('Y', 'C') THEN
987: msc_sch_wb.atp_debug('Atp_Sources: ' || 'No sources found so far');
988: END IF;
989: --s_cto_rearch
990: --IF p_ship_set_item.COUNT > 1 THEN
991: IF p_item_sourcing_info_rec.sr_inventory_item_id.count > 1 THEN

Line 995: msc_sch_wb.atp_debug('Atp_Sources: ' || 'ship_count >1 ');

991: IF p_item_sourcing_info_rec.sr_inventory_item_id.count > 1 THEN
992: --e_cto_rearch
993:
994: IF PG_DEBUG in ('Y', 'C') THEN
995: msc_sch_wb.atp_debug('Atp_Sources: ' || 'ship_count >1 ');
996: END IF;
997: -- BUG 2283260 Join to msc_system_items to only obtain sources
998: -- which are valid for the item(s).
999:

Line 1064: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for item level assignment failed.');

1060:
1061:
1062: IF (x_atp_sources.organization_id.count = 0) THEN
1063: IF PG_DEBUG in ('Y', 'C') THEN
1064: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for item level assignment failed.');
1065: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on item_category level.');
1066: END IF;
1067: -- Rewriting the dynamic SQL into a static SQL. Refer to bug 2585710 for details.
1068: SELECT

Line 1065: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on item_category level.');

1061:
1062: IF (x_atp_sources.organization_id.count = 0) THEN
1063: IF PG_DEBUG in ('Y', 'C') THEN
1064: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for item level assignment failed.');
1065: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on item_category level.');
1066: END IF;
1067: -- Rewriting the dynamic SQL into a static SQL. Refer to bug 2585710 for details.
1068: SELECT
1069: NVL(SOURCEORG.SOURCE_ORGANIZATION_ID, -1),

Line 1131: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for item-cat assignment failed.');

1127: IF (x_atp_sources.organization_id.count = 0) AND (p_organization_id is not null) AND
1128: (p_customer_id is NULL AND p_customer_site_id IS NULL) THEN
1129: -- Bug 3515520, don't use org in case customer/site is populated.
1130: IF PG_DEBUG in ('Y', 'C') THEN
1131: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for item-cat assignment failed.');
1132: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on global-BOD level.');
1133: END IF;
1134: -- BUG 2283260 Join to msc_system_items to only obtain sources
1135: -- which are valid for the item(s).

Line 1132: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on global-BOD level.');

1128: (p_customer_id is NULL AND p_customer_site_id IS NULL) THEN
1129: -- Bug 3515520, don't use org in case customer/site is populated.
1130: IF PG_DEBUG in ('Y', 'C') THEN
1131: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for item-cat assignment failed.');
1132: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on global-BOD level.');
1133: END IF;
1134: -- BUG 2283260 Join to msc_system_items to only obtain sources
1135: -- which are valid for the item(s).
1136: l_organization_id := p_organization_id; -- local var for testing

Line 1138: msc_sch_wb.atp_debug('Atp_Sources: ' || ' Org Id := ' || l_organization_id);

1134: -- BUG 2283260 Join to msc_system_items to only obtain sources
1135: -- which are valid for the item(s).
1136: l_organization_id := p_organization_id; -- local var for testing
1137: IF PG_DEBUG in ('Y', 'C') THEN
1138: msc_sch_wb.atp_debug('Atp_Sources: ' || ' Org Id := ' || l_organization_id);
1139: END IF;
1140: -- Rewriting the SQL for bug 2585710.
1141: SELECT
1142: NVL(SOURCEORG.SOURCE_ORGANIZATION_ID, -1),

Line 1198: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for GLOBAL-BOD assignment failed.');

1194:
1195: END IF;
1196: IF (x_atp_sources.organization_id.count = 0) THEN
1197: IF PG_DEBUG in ('Y', 'C') THEN
1198: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for GLOBAL-BOD assignment failed.');
1199: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on global level');
1200: END IF;
1201: -- BUG 2283260 Join to msc_system_items to only obtain sources
1202: -- which are valid for the item(s).

Line 1199: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on global level');

1195: END IF;
1196: IF (x_atp_sources.organization_id.count = 0) THEN
1197: IF PG_DEBUG in ('Y', 'C') THEN
1198: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Lookup for GLOBAL-BOD assignment failed.');
1199: msc_sch_wb.atp_debug('Atp_Sources: ' || 'Check on global level');
1200: END IF;
1201: -- BUG 2283260 Join to msc_system_items to only obtain sources
1202: -- which are valid for the item(s).
1203:

Line 1260: msc_sch_wb.atp_debug('Atp_Sources: ' || 'at item level');

1256: END IF;
1257:
1258: ELSE
1259: IF PG_DEBUG in ('Y', 'C') THEN
1260: msc_sch_wb.atp_debug('Atp_Sources: ' || 'at item level');
1261: msc_sch_wb.atp_debug('Atp_Sources: ' || 'ITEM Inv item Id := ' || l_inv_item_id);
1262: END IF;
1263: -- BUG 2283260 Join to msc_system_items to only obtain sources
1264: -- which are valid for the item(s).

Line 1261: msc_sch_wb.atp_debug('Atp_Sources: ' || 'ITEM Inv item Id := ' || l_inv_item_id);

1257:
1258: ELSE
1259: IF PG_DEBUG in ('Y', 'C') THEN
1260: msc_sch_wb.atp_debug('Atp_Sources: ' || 'at item level');
1261: msc_sch_wb.atp_debug('Atp_Sources: ' || 'ITEM Inv item Id := ' || l_inv_item_id);
1262: END IF;
1263: -- BUG 2283260 Join to msc_system_items to only obtain sources
1264: -- which are valid for the item(s).
1265: SELECT NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),

Line 1319: msc_sch_wb.atp_debug('Count after item level = '||x_atp_sources.organization_id.count);

1315: -- join with msc_sr_assignments (msa) will bring no rows.
1316: -- Filter on item in msc_system_items.
1317:
1318: IF PG_DEBUG in ('Y', 'C') THEN
1319: msc_sch_wb.atp_debug('Count after item level = '||x_atp_sources.organization_id.count);
1320: END IF;
1321: IF (x_atp_sources.organization_id.count = 0) then
1322: IF PG_DEBUG in ('Y', 'C') THEN
1323: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on item level. look into item-cat level');

Line 1323: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on item level. look into item-cat level');

1319: msc_sch_wb.atp_debug('Count after item level = '||x_atp_sources.organization_id.count);
1320: END IF;
1321: IF (x_atp_sources.organization_id.count = 0) then
1322: IF PG_DEBUG in ('Y', 'C') THEN
1323: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on item level. look into item-cat level');
1324: msc_sch_wb.atp_debug('Atp_Sources: ' || ' ITEM CAT Inv item Id := ' || l_inv_item_id);
1325: END IF;
1326: SELECT NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),
1327: NVL(SOURCE_ORG.SOURCE_ORG_INSTANCE_ID,-1),

Line 1324: msc_sch_wb.atp_debug('Atp_Sources: ' || ' ITEM CAT Inv item Id := ' || l_inv_item_id);

1320: END IF;
1321: IF (x_atp_sources.organization_id.count = 0) then
1322: IF PG_DEBUG in ('Y', 'C') THEN
1323: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on item level. look into item-cat level');
1324: msc_sch_wb.atp_debug('Atp_Sources: ' || ' ITEM CAT Inv item Id := ' || l_inv_item_id);
1325: END IF;
1326: SELECT NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1),
1327: NVL(SOURCE_ORG.SOURCE_ORG_INSTANCE_ID,-1),
1328: NVL(SOURCE_ORG.SOURCE_PARTNER_ID, -1),

Line 1380: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on item-cat level. look at global-BOD level');

1376: END IF;
1377:
1378: IF (x_atp_sources.organization_id.count = 0) and (p_organization_id is not null) then
1379: IF PG_DEBUG in ('Y', 'C') THEN
1380: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on item-cat level. look at global-BOD level');
1381: END IF;
1382: l_organization_id := p_organization_id; -- local var for testing
1383: IF PG_DEBUG in ('Y', 'C') THEN
1384: msc_sch_wb.atp_debug('Atp_Sources: ' || ' Org Id := ' || l_organization_id);

Line 1384: msc_sch_wb.atp_debug('Atp_Sources: ' || ' Org Id := ' || l_organization_id);

1380: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on item-cat level. look at global-BOD level');
1381: END IF;
1382: l_organization_id := p_organization_id; -- local var for testing
1383: IF PG_DEBUG in ('Y', 'C') THEN
1384: msc_sch_wb.atp_debug('Atp_Sources: ' || ' Org Id := ' || l_organization_id);
1385: END IF;
1386:
1387: -- BUG 2283260 Join to msc_system_items to only obtain sources
1388: -- which are valid for the item(s).

Line 1446: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on global_bod level. look at global level');

1442: END IF;
1443:
1444: IF (x_atp_sources.organization_id.count = 0) then
1445: IF PG_DEBUG in ('Y', 'C') THEN
1446: msc_sch_wb.atp_debug('Atp_Sources: ' || 'no sources on global_bod level. look at global level');
1447: END IF;
1448:
1449: -- BUG 2283260 Join to msc_system_items to only obtain sources
1450: -- which are valid for the item(s).

Line 1507: msc_sch_wb.atp_debug( 'Atp_Sources: ' || 'x_atp_sources.Organization_Id ='|| x_atp_sources.Organization_Id(i));

1503:
1504: END IF;
1505: FOR i in 1..x_atp_sources.Organization_Id.count Loop
1506: IF PG_DEBUG in ('Y', 'C') THEN
1507: msc_sch_wb.atp_debug( 'Atp_Sources: ' || 'x_atp_sources.Organization_Id ='|| x_atp_sources.Organization_Id(i));
1508: msc_sch_wb.atp_debug( 'Atp_Sources: ' || 'x_atp_sources.Supplier_Id ='|| x_atp_sources.Supplier_Id(i));
1509: END IF;
1510: END Loop;
1511: END IF;

Line 1508: msc_sch_wb.atp_debug( 'Atp_Sources: ' || 'x_atp_sources.Supplier_Id ='|| x_atp_sources.Supplier_Id(i));

1504: END IF;
1505: FOR i in 1..x_atp_sources.Organization_Id.count Loop
1506: IF PG_DEBUG in ('Y', 'C') THEN
1507: msc_sch_wb.atp_debug( 'Atp_Sources: ' || 'x_atp_sources.Organization_Id ='|| x_atp_sources.Organization_Id(i));
1508: msc_sch_wb.atp_debug( 'Atp_Sources: ' || 'x_atp_sources.Supplier_Id ='|| x_atp_sources.Supplier_Id(i));
1509: END IF;
1510: END Loop;
1511: END IF;
1512: FOR i in 1..x_atp_sources.Organization_Id.count Loop

Line 1514: msc_sch_wb.atp_debug('Atp_Sources: ' || 'x_atp_sources.ship_method' || i ||' ' || x_atp_sources.ship_method(i));

1510: END Loop;
1511: END IF;
1512: FOR i in 1..x_atp_sources.Organization_Id.count Loop
1513: IF PG_DEBUG in ('Y', 'C') THEN
1514: msc_sch_wb.atp_debug('Atp_Sources: ' || 'x_atp_sources.ship_method' || i ||' ' || x_atp_sources.ship_method(i));
1515: END IF;
1516: END LOOP;
1517:
1518: IF l_model_flag = 1

Line 1533: msc_sch_wb.atp_debug('***** End Atp_Sources *****');

1529:
1530: END IF;
1531:
1532: IF PG_DEBUG in ('Y', 'C') THEN
1533: msc_sch_wb.atp_debug('***** End Atp_Sources *****');
1534: END IF;
1535:
1536: Exception
1537:

Line 1540: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlcode : ' || sqlcode);

1536: Exception
1537:
1538: WHEN NO_DATA_FOUND THEN
1539: IF PG_DEBUG in ('Y', 'C') THEN
1540: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlcode : ' || sqlcode);
1541: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlerrm : ' || sqlerrm);
1542: END IF;
1543: --x_return_status := FND_API.G_RET_STS_ERROR;
1544: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR); -- 4091487

Line 1541: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlerrm : ' || sqlerrm);

1537:
1538: WHEN NO_DATA_FOUND THEN
1539: IF PG_DEBUG in ('Y', 'C') THEN
1540: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlcode : ' || sqlcode);
1541: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlerrm : ' || sqlerrm);
1542: END IF;
1543: --x_return_status := FND_API.G_RET_STS_ERROR;
1544: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR); -- 4091487
1545: WHEN others THEN

Line 1547: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlcode : ' || sqlcode);

1543: --x_return_status := FND_API.G_RET_STS_ERROR;
1544: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR); -- 4091487
1545: WHEN others THEN
1546: IF PG_DEBUG in ('Y', 'C') THEN
1547: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlcode : ' || sqlcode);
1548: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlerrm : ' || sqlerrm);
1549: END IF;
1550: x_return_status := FND_API.G_RET_STS_ERROR;
1551:

Line 1548: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlerrm : ' || sqlerrm);

1544: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR); -- 4091487
1545: WHEN others THEN
1546: IF PG_DEBUG in ('Y', 'C') THEN
1547: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlcode : ' || sqlcode);
1548: msc_sch_wb.atp_debug('Atp_Sources: ' || 'sqlerrm : ' || sqlerrm);
1549: END IF;
1550: x_return_status := FND_API.G_RET_STS_ERROR;
1551:
1552:

Line 1637: msc_sch_wb.atp_debug('atp_consume_range, bad indices: ' ||

1633: IF p_start_idx is null or p_end_idx is null or
1634: p_start_idx >= p_end_idx
1635: THEN
1636: IF PG_DEBUG in ('Y', 'C') THEN
1637: msc_sch_wb.atp_debug('atp_consume_range, bad indices: ' ||
1638: p_start_idx || ':' || p_end_idx);
1639: END IF;
1640: return;
1641: END IF;

Line 1644: msc_sch_wb.atp_debug('atp_consume_range: arr size: ' || p_atp_qty.count());

1640: return;
1641: END IF;
1642:
1643: IF PG_DEBUG in ('Y', 'C') THEN
1644: msc_sch_wb.atp_debug('atp_consume_range: arr size: ' || p_atp_qty.count());
1645: msc_sch_wb.atp_debug(' start: ' || p_start_idx ||
1646: 'end: ' || p_end_idx);
1647: END IF;
1648:

Line 1645: msc_sch_wb.atp_debug(' start: ' || p_start_idx ||

1641: END IF;
1642:
1643: IF PG_DEBUG in ('Y', 'C') THEN
1644: msc_sch_wb.atp_debug('atp_consume_range: arr size: ' || p_atp_qty.count());
1645: msc_sch_wb.atp_debug(' start: ' || p_start_idx ||
1646: 'end: ' || p_end_idx);
1647: END IF;
1648:
1649: -- calculate S(n) and total supply (real_dmd)

Line 1737: msc_sch_wb.atp_debug('***** Begin Details_Output Procedure *****');

1733:
1734: Begin
1735:
1736: IF PG_DEBUG in ('Y', 'C') THEN
1737: msc_sch_wb.atp_debug('***** Begin Details_Output Procedure *****');
1738: END IF;
1739:
1740: x_return_status := FND_API.G_RET_STS_SUCCESS;
1741:

Line 1748: msc_sch_wb.atp_debug('Details_Output: ' || ' dsting expect 0 sd recs: ' || x_atp_supply_demand.level.count);

1744: -- since bulk binds across dblink are not supported.
1745:
1746: MSC_ATP_UTILS.Put_Period_Data(p_atp_period, NULL, MSC_ATP_PVT.G_SESSION_ID);
1747: IF PG_DEBUG in ('Y', 'C') THEN
1748: msc_sch_wb.atp_debug('Details_Output: ' || ' dsting expect 0 sd recs: ' || x_atp_supply_demand.level.count);
1749: END IF;
1750: RETURN;
1751:
1752: IF p_atp_period.level.COUNT > 0 THEN

Line 1881: msc_sch_wb.atp_debug('Details_Output: item '||

1877: x_atp_supply_demand.End_Pegging_Id(l_count+l_sd_count):=
1878: p_atp_supply_demand.End_Pegging_Id(l_sd_count);
1879:
1880: IF PG_DEBUG in ('Y', 'C') THEN
1881: msc_sch_wb.atp_debug('Details_Output: item '||
1882: p_atp_supply_demand.inventory_item_id(l_sd_count)||
1883: ' : org '|| p_atp_supply_demand.organization_id(l_sd_count) ||
1884: ' : qty '|| p_atp_supply_demand.supply_demand_quantity(l_sd_count) ||
1885: ' : peg '|| p_atp_supply_demand.pegging_id(l_sd_count) ||

Line 1894: msc_sch_wb.atp_debug('***** End Details_Output Procedure *****');

1890: END LOOP;
1891: END IF;
1892:
1893: IF PG_DEBUG in ('Y', 'C') THEN
1894: msc_sch_wb.atp_debug('***** End Details_Output Procedure *****');
1895: END IF;
1896:
1897: END Details_Output;
1898:

Line 1946: msc_sch_wb.atp_debug('***** Begin Get_SD_Period_Rec Procedure *****');

1942:
1943: BEGIN
1944:
1945: IF PG_DEBUG in ('Y', 'C') THEN
1946: msc_sch_wb.atp_debug('***** Begin Get_SD_Period_Rec Procedure *****');
1947: END IF;
1948:
1949: FOR l_period_count in 1..p_atp_period.Level.COUNT LOOP
1950:

Line 2075: msc_sch_wb.atp_debug('Get_SD_Period_Rec: ' || 'Details_Output: item '|| p_atp_supply_demand.inventory_item_id(l_sd_count)

2071: x_atp_supply_demand.End_Pegging_Id(l_count):=
2072: p_atp_supply_demand.End_Pegging_Id(l_sd_count);
2073:
2074: IF PG_DEBUG in ('Y', 'C') THEN
2075: msc_sch_wb.atp_debug('Get_SD_Period_Rec: ' || 'Details_Output: item '|| p_atp_supply_demand.inventory_item_id(l_sd_count)
2076: || ': org '|| p_atp_supply_demand.organization_id(l_sd_count)
2077: || ': quantity '|| p_atp_supply_demand.supply_demand_quantity(l_sd_count)
2078: || ': peg '|| p_atp_supply_demand.pegging_id(l_sd_count));
2079: END IF;

Line 2085: msc_sch_wb.atp_debug('***** End Get_SD_Period_Rec Procedure *****');

2081: END IF;
2082: END LOOP;
2083:
2084: IF PG_DEBUG in ('Y', 'C') THEN
2085: msc_sch_wb.atp_debug('***** End Get_SD_Period_Rec Procedure *****');
2086: END IF;
2087:
2088: END Get_SD_Period_Rec;
2089:

Line 2138: msc_sch_wb.atp_debug('**************** inv_primary_uom_conversion Begin ***************');

2134:
2135: BEGIN
2136:
2137: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2138: msc_sch_wb.atp_debug('**************** inv_primary_uom_conversion Begin ***************');
2139: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_instance_id - ' || p_instance_id);
2140: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id);
2141: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2142: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_organization_id - ' || p_organization_id);

Line 2139: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_instance_id - ' || p_instance_id);

2135: BEGIN
2136:
2137: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2138: msc_sch_wb.atp_debug('**************** inv_primary_uom_conversion Begin ***************');
2139: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_instance_id - ' || p_instance_id);
2140: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id);
2141: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2142: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_organization_id - ' || p_organization_id);
2143: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_uom_code - ' || p_uom_code);

Line 2140: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id);

2136:
2137: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2138: msc_sch_wb.atp_debug('**************** inv_primary_uom_conversion Begin ***************');
2139: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_instance_id - ' || p_instance_id);
2140: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id);
2141: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2142: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_organization_id - ' || p_organization_id);
2143: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_uom_code - ' || p_uom_code);
2144: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'primary_uom_code - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code);

Line 2141: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || p_inventory_item_id);

2137: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2138: msc_sch_wb.atp_debug('**************** inv_primary_uom_conversion Begin ***************');
2139: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_instance_id - ' || p_instance_id);
2140: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id);
2141: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2142: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_organization_id - ' || p_organization_id);
2143: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_uom_code - ' || p_uom_code);
2144: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'primary_uom_code - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code);
2145: END IF;

Line 2142: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_organization_id - ' || p_organization_id);

2138: msc_sch_wb.atp_debug('**************** inv_primary_uom_conversion Begin ***************');
2139: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_instance_id - ' || p_instance_id);
2140: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id);
2141: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2142: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_organization_id - ' || p_organization_id);
2143: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_uom_code - ' || p_uom_code);
2144: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'primary_uom_code - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code);
2145: END IF;
2146: /* Tuned for performance bug 2484964 */

Line 2143: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_uom_code - ' || p_uom_code);

2139: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_instance_id - ' || p_instance_id);
2140: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id);
2141: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2142: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_organization_id - ' || p_organization_id);
2143: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_uom_code - ' || p_uom_code);
2144: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'primary_uom_code - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code);
2145: END IF;
2146: /* Tuned for performance bug 2484964 */
2147: /* 4192057: Use the item info available in G_item_ifo_rec

Line 2144: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'primary_uom_code - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code);

2140: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id);
2141: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2142: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_organization_id - ' || p_organization_id);
2143: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'p_uom_code - ' || p_uom_code);
2144: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'primary_uom_code - ' || MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code);
2145: END IF;
2146: /* Tuned for performance bug 2484964 */
2147: /* 4192057: Use the item info available in G_item_ifo_rec
2148: instead of connecting to msc_system_items table

Line 2184: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_primary_uom_code - ' || x_primary_uom_code);

2180: x_conversion_rate := 1;
2181: END IF;
2182:
2183: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2184: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_primary_uom_code - ' || x_primary_uom_code);
2185: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_conversion_rate - ' || x_conversion_rate);
2186: END IF;
2187: EXCEPTION WHEN NO_DATA_FOUND THEN
2188: x_primary_uom_code := p_uom_code;

Line 2185: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_conversion_rate - ' || x_conversion_rate);

2181: END IF;
2182:
2183: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2184: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_primary_uom_code - ' || x_primary_uom_code);
2185: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_conversion_rate - ' || x_conversion_rate);
2186: END IF;
2187: EXCEPTION WHEN NO_DATA_FOUND THEN
2188: x_primary_uom_code := p_uom_code;
2189: x_conversion_rate := 1;

Line 2191: msc_sch_wb.atp_debug('inv_primary_uom_conversion : Inside NO_DATA_FOUND ');

2187: EXCEPTION WHEN NO_DATA_FOUND THEN
2188: x_primary_uom_code := p_uom_code;
2189: x_conversion_rate := 1;
2190: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2191: msc_sch_wb.atp_debug('inv_primary_uom_conversion : Inside NO_DATA_FOUND ');
2192: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_primary_uom_code - ' || x_primary_uom_code);
2193: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_conversion_rate - ' || x_conversion_rate);
2194: END IF;
2195: END inv_primary_uom_conversion;

Line 2192: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_primary_uom_code - ' || x_primary_uom_code);

2188: x_primary_uom_code := p_uom_code;
2189: x_conversion_rate := 1;
2190: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2191: msc_sch_wb.atp_debug('inv_primary_uom_conversion : Inside NO_DATA_FOUND ');
2192: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_primary_uom_code - ' || x_primary_uom_code);
2193: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_conversion_rate - ' || x_conversion_rate);
2194: END IF;
2195: END inv_primary_uom_conversion;
2196:

Line 2193: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_conversion_rate - ' || x_conversion_rate);

2189: x_conversion_rate := 1;
2190: IF PG_DEBUG in ('Y', 'C') THEN --bug3110023
2191: msc_sch_wb.atp_debug('inv_primary_uom_conversion : Inside NO_DATA_FOUND ');
2192: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_primary_uom_code - ' || x_primary_uom_code);
2193: msc_sch_wb.atp_debug('inv_primary_uom_conversion : ' || 'x_conversion_rate - ' || x_conversion_rate);
2194: END IF;
2195: END inv_primary_uom_conversion;
2196:
2197:

Line 2279: msc_sch_wb.atp_debug('**************** Get_Plan_Info Begin ***************');

2275: -- For ATP4drp project
2276: x_plan_info_rec.plan_type := null;
2277:
2278: IF PG_DEBUG in ('Y', 'C') THEN
2279: msc_sch_wb.atp_debug('**************** Get_Plan_Info Begin ***************');
2280: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_instance_id - ' || p_instance_id);
2281: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2282: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_organization_id - ' || p_organization_id);
2283: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_demand_class - ' || p_demand_class);

Line 2280: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_instance_id - ' || p_instance_id);

2276: x_plan_info_rec.plan_type := null;
2277:
2278: IF PG_DEBUG in ('Y', 'C') THEN
2279: msc_sch_wb.atp_debug('**************** Get_Plan_Info Begin ***************');
2280: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_instance_id - ' || p_instance_id);
2281: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2282: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_organization_id - ' || p_organization_id);
2283: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_demand_class - ' || p_demand_class);
2284: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_time_phased_atp - ' || p_time_phased_atp);

Line 2281: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_inventory_item_id - ' || p_inventory_item_id);

2277:
2278: IF PG_DEBUG in ('Y', 'C') THEN
2279: msc_sch_wb.atp_debug('**************** Get_Plan_Info Begin ***************');
2280: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_instance_id - ' || p_instance_id);
2281: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2282: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_organization_id - ' || p_organization_id);
2283: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_demand_class - ' || p_demand_class);
2284: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_time_phased_atp - ' || p_time_phased_atp);
2285: END IF;

Line 2282: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_organization_id - ' || p_organization_id);

2278: IF PG_DEBUG in ('Y', 'C') THEN
2279: msc_sch_wb.atp_debug('**************** Get_Plan_Info Begin ***************');
2280: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_instance_id - ' || p_instance_id);
2281: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2282: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_organization_id - ' || p_organization_id);
2283: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_demand_class - ' || p_demand_class);
2284: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_time_phased_atp - ' || p_time_phased_atp);
2285: END IF;
2286:

Line 2283: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_demand_class - ' || p_demand_class);

2279: msc_sch_wb.atp_debug('**************** Get_Plan_Info Begin ***************');
2280: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_instance_id - ' || p_instance_id);
2281: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2282: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_organization_id - ' || p_organization_id);
2283: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_demand_class - ' || p_demand_class);
2284: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_time_phased_atp - ' || p_time_phased_atp);
2285: END IF;
2286:
2287: -- bug3510475. Check if the plan for Parent ORG /ITEM

Line 2284: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_time_phased_atp - ' || p_time_phased_atp);

2280: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_instance_id - ' || p_instance_id);
2281: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_inventory_item_id - ' || p_inventory_item_id);
2282: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_organization_id - ' || p_organization_id);
2283: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_demand_class - ' || p_demand_class);
2284: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'p_time_phased_atp - ' || p_time_phased_atp);
2285: END IF;
2286:
2287: -- bug3510475. Check if the plan for Parent ORG /ITEM
2288: --already exists. if the parent plan exists, verify if the current

Line 2313: msc_sch_wb.atp_debug('Item / Org is not planned in parent plan');

2309:
2310: -- Check if the demand class ATP is needed
2311: -- select item level and org level atp rules
2312: IF PG_DEBUG in ('Y', 'C') THEN
2313: msc_sch_wb.atp_debug('Item / Org is not planned in parent plan');
2314: END IF;
2315: BEGIN
2316:
2317: -- Bug 1757259, modified to replace = to IN for subquery. Also added distinct

Line 2338: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'l_dc_atp_flag : ' ||l_dc_atp_flag);

2334: WHEN no_data_found THEN
2335: l_dc_atp_flag := 2;
2336: END;
2337: IF PG_DEBUG in ('Y', 'C') THEN
2338: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'l_dc_atp_flag : ' ||l_dc_atp_flag);
2339: END IF;
2340: END IF;
2341:
2342: BEGIN

Line 2351: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'Inside Demand Class ATP');

2347:
2348:
2349: -- select the plan_id based on the demand class
2350: IF PG_DEBUG in ('Y', 'C') THEN
2351: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'Inside Demand Class ATP');
2352: END IF;
2353:
2354:
2355: /*SELECT plan_id

Line 2398: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'Inside Generic Plan');

2394: -- Also, in case of demand class ATP, if we dont get a plan, we will select
2395: -- generic plan_id
2396:
2397: IF PG_DEBUG in ('Y', 'C') THEN
2398: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'Inside Generic Plan');
2399: END IF;
2400:
2401: -- 1873918: PDS-ODS fix
2402: -- add error handling

Line 2439: msc_sch_wb.atp_debug('No data Found exception');

2435: l_generic_plan := 1;
2436:
2437: EXCEPTION
2438: WHEN no_data_found THEN
2439: msc_sch_wb.atp_debug('No data Found exception');
2440: -- x_plan_id := NULL;
2441: x_plan_info_rec.plan_id := NULL;
2442: l_generic_plan := 1;
2443:

Line 2449: msc_sch_wb.atp_debug('Total l_plan_ids count := ' || l_plan_ids.count);

2445:
2446: END IF;
2447:
2448: IF PG_DEBUG in ('Y', 'C') THEN
2449: msc_sch_wb.atp_debug('Total l_plan_ids count := ' || l_plan_ids.count);
2450: END IF;
2451:
2452: IF NVL(l_generic_plan, -1) = 1 THEN
2453: IF l_plan_ids.count = 0 THEN

Line 2473: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'selected plan_id : '||x_plan_info_rec.plan_id);

2469: END IF; -- IF l_plan_ids.count = 0 THEN
2470: END IF; --- IF NVL(l_generic_plan, -1) THEN
2471:
2472: IF PG_DEBUG in ('Y', 'C') THEN
2473: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'selected plan_id : '||x_plan_info_rec.plan_id);
2474: END IF; -- changed for bug 2392456
2475: -- msc_sch_wb.atp_debug('selected plan_id : '||x_plan_id); commented for bug 2392456
2476:
2477: -- 1873918 PDS-ODS fix

Line 2475: -- msc_sch_wb.atp_debug('selected plan_id : '||x_plan_id); commented for bug 2392456

2471:
2472: IF PG_DEBUG in ('Y', 'C') THEN
2473: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'selected plan_id : '||x_plan_info_rec.plan_id);
2474: END IF; -- changed for bug 2392456
2475: -- msc_sch_wb.atp_debug('selected plan_id : '||x_plan_id); commented for bug 2392456
2476:
2477: -- 1873918 PDS-ODS fix
2478: -- IF x_plan_id is null, then we switch to ODS, x_plan_id = -1
2479: -- IF x_plan_id is not null, we check the completion date,

Line 2491: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'MSC_ATP_PVT.G_CTO_LINE='||MSC_ATP_PVT.G_CTO_LINE);

2487: -- do not switch for multiorg/multilevel ato line.
2488: -- only doing the switch if this line is not MLATO.
2489:
2490: IF PG_DEBUG in ('Y', 'C') THEN
2491: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'MSC_ATP_PVT.G_CTO_LINE='||MSC_ATP_PVT.G_CTO_LINE);
2492: END IF;
2493:
2494: IF (NVL(MSC_ATP_PVT.G_CTO_LINE, 'N') = 'N') THEN
2495: IF PG_DEBUG in ('Y', 'C') THEN

Line 2496: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'x_plan_id is null, set to -1');

2492: END IF;
2493:
2494: IF (NVL(MSC_ATP_PVT.G_CTO_LINE, 'N') = 'N') THEN
2495: IF PG_DEBUG in ('Y', 'C') THEN
2496: msc_sch_wb.atp_debug('Get_Plan_Info: ' || 'x_plan_id is null, set to -1');
2497: END IF;
2498: -- x_plan_id := -1; commented for bug 2392456
2499: x_plan_info_rec.plan_id := -1; -- changed for bug 2392456
2500: END IF;

Line 2662: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);

2658: and plans.plan_id = plans2.copy_plan_id (+);
2659:
2660:
2661: IF PG_DEBUG in ('Y', 'C') THEN
2662: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2663: msc_sch_wb.atp_debug (' ---- ');
2664: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;

Line 2663: msc_sch_wb.atp_debug (' ---- ');

2659:
2660:
2661: IF PG_DEBUG in ('Y', 'C') THEN
2662: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2663: msc_sch_wb.atp_debug (' ---- ');
2664: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);

Line 2664: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);

2660:
2661: IF PG_DEBUG in ('Y', 'C') THEN
2662: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2663: msc_sch_wb.atp_debug (' ---- ');
2664: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);

Line 2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;

2661: IF PG_DEBUG in ('Y', 'C') THEN
2662: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2663: msc_sch_wb.atp_debug (' ---- ');
2664: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);

Line 2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;

2662: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2663: msc_sch_wb.atp_debug (' ---- ');
2664: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);

Line 2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);

2663: msc_sch_wb.atp_debug (' ---- ');
2664: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);

Line 2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);

2664: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);

Line 2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);

2665: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);

Line 2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);

2666: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2674: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);

Line 2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);

2667: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2674: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2675: -- ship_rec_cal changes begin

Line 2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);

2668: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2674: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2675: -- ship_rec_cal changes begin
2676: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);

Line 2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);

2669: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2674: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2675: -- ship_rec_cal changes begin
2676: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2677: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);

Line 2674: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);

2670: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2671: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2674: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2675: -- ship_rec_cal changes begin
2676: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2677: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2678: -- ship_rec_cal changes end

Line 2676: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);

2672: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2674: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2675: -- ship_rec_cal changes begin
2676: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2677: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2678: -- ship_rec_cal changes end
2679: -- ATP4drp changes begin
2680: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 2677: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);

2673: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2674: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2675: -- ship_rec_cal changes begin
2676: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2677: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2678: -- ship_rec_cal changes end
2679: -- ATP4drp changes begin
2680: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2681: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);

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

2676: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2677: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2678: -- ship_rec_cal changes end
2679: -- ATP4drp changes begin
2680: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2681: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2682: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2683: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2684: -- ATP4drp changes end

Line 2681: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);

2677: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2678: -- ship_rec_cal changes end
2679: -- ATP4drp changes begin
2680: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2681: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2682: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2683: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2684: -- ATP4drp changes end
2685: msc_sch_wb.atp_debug (' ---- ');

Line 2682: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);

2678: -- ship_rec_cal changes end
2679: -- ATP4drp changes begin
2680: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2681: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2682: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2683: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2684: -- ATP4drp changes end
2685: msc_sch_wb.atp_debug (' ---- ');
2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);

Line 2683: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);

2679: -- ATP4drp changes begin
2680: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2681: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2682: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2683: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2684: -- ATP4drp changes end
2685: msc_sch_wb.atp_debug (' ---- ');
2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;

Line 2685: msc_sch_wb.atp_debug (' ---- ');

2681: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2682: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2683: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2684: -- ATP4drp changes end
2685: msc_sch_wb.atp_debug (' ---- ');
2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);

Line 2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);

2682: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2683: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2684: -- ATP4drp changes end
2685: msc_sch_wb.atp_debug (' ---- ');
2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);

Line 2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;

2683: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2684: -- ATP4drp changes end
2685: msc_sch_wb.atp_debug (' ---- ');
2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);

Line 2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;

2684: -- ATP4drp changes end
2685: msc_sch_wb.atp_debug (' ---- ');
2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);

Line 2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);

2685: msc_sch_wb.atp_debug (' ---- ');
2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);

Line 2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);

2686: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);

Line 2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);

2687: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);

Line 2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);

2688: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);

Line 2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);

2689: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2697: -- ship_rec_cal changes begin

Line 2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);

2690: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2697: -- ship_rec_cal changes begin
2698: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);

Line 2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);

2691: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2697: -- ship_rec_cal changes begin
2698: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2699: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);

Line 2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);

2692: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2693: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2697: -- ship_rec_cal changes begin
2698: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2699: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2700: msc_sch_wb.atp_debug (' ---- ');

Line 2698: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);

2694: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2697: -- ship_rec_cal changes begin
2698: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2699: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2700: msc_sch_wb.atp_debug (' ---- ');
2701: -- ship_rec_cal changes end
2702: -- ATP4drp changes begin

Line 2699: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);

2695: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2697: -- ship_rec_cal changes begin
2698: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2699: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2700: msc_sch_wb.atp_debug (' ---- ');
2701: -- ship_rec_cal changes end
2702: -- ATP4drp changes begin
2703: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);

Line 2700: msc_sch_wb.atp_debug (' ---- ');

2696: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2697: -- ship_rec_cal changes begin
2698: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2699: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2700: msc_sch_wb.atp_debug (' ---- ');
2701: -- ship_rec_cal changes end
2702: -- ATP4drp changes begin
2703: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2704: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);

Line 2703: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);

2699: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2700: msc_sch_wb.atp_debug (' ---- ');
2701: -- ship_rec_cal changes end
2702: -- ATP4drp changes begin
2703: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2704: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2705: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2706: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2707: -- ATP4drp changes end

Line 2704: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);

2700: msc_sch_wb.atp_debug (' ---- ');
2701: -- ship_rec_cal changes end
2702: -- ATP4drp changes begin
2703: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2704: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2705: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2706: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2707: -- ATP4drp changes end
2708: msc_sch_wb.atp_debug (' ---- ');

Line 2705: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);

2701: -- ship_rec_cal changes end
2702: -- ATP4drp changes begin
2703: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2704: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2705: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2706: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2707: -- ATP4drp changes end
2708: msc_sch_wb.atp_debug (' ---- ');
2709: END IF;

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

2702: -- ATP4drp changes begin
2703: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2704: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2705: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2706: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2707: -- ATP4drp changes end
2708: msc_sch_wb.atp_debug (' ---- ');
2709: END IF;
2710:

Line 2708: msc_sch_wb.atp_debug (' ---- ');

2704: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2705: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2706: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2707: -- ATP4drp changes end
2708: msc_sch_wb.atp_debug (' ---- ');
2709: END IF;
2710:
2711: if (NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'Y') then
2712: -- this is a sync call

Line 2715: msc_sch_wb.atp_debug ('Sync process. Switching plan to '|| l_plan_info_rec.plan_id);

2711: if (NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'Y') then
2712: -- this is a sync call
2713: l_using_new_plan := 1;
2714: if PG_DEBUG in ('Y','C') then
2715: msc_sch_wb.atp_debug ('Sync process. Switching plan to '|| l_plan_info_rec.plan_id);
2716: end if;
2717: if (l_plan_info_rec.plan_id IS NULL) then
2718: if PG_DEBUG in ('Y','C') then
2719: msc_sch_wb.atp_debug ('Cannot find new plan during SYNC ATP check call');

Line 2719: msc_sch_wb.atp_debug ('Cannot find new plan during SYNC ATP check call');

2715: msc_sch_wb.atp_debug ('Sync process. Switching plan to '|| l_plan_info_rec.plan_id);
2716: end if;
2717: if (l_plan_info_rec.plan_id IS NULL) then
2718: if PG_DEBUG in ('Y','C') then
2719: msc_sch_wb.atp_debug ('Cannot find new plan during SYNC ATP check call');
2720: msc_sch_wb.atp_debug ('Going by old plan to account for extended sync');
2721: end if;
2722: l_plan_info_rec := x_plan_info_rec;
2723: end if;

Line 2720: msc_sch_wb.atp_debug ('Going by old plan to account for extended sync');

2716: end if;
2717: if (l_plan_info_rec.plan_id IS NULL) then
2718: if PG_DEBUG in ('Y','C') then
2719: msc_sch_wb.atp_debug ('Cannot find new plan during SYNC ATP check call');
2720: msc_sch_wb.atp_debug ('Going by old plan to account for extended sync');
2721: end if;
2722: l_plan_info_rec := x_plan_info_rec;
2723: end if;
2724:

Line 2751: msc_sch_wb.atp_debug ('Plan_ID after processing switches is : ' || x_plan_info_rec.plan_id);

2747: l_summary_flag := x_plan_info_rec.summary_flag;
2748: MSC_ATP_PVT.G_PLAN_SUBST_FLAG := x_plan_info_rec.subst_flag;
2749:
2750: if PG_DEBUG in ('Y','C') then
2751: msc_sch_wb.atp_debug ('Plan_ID after processing switches is : ' || x_plan_info_rec.plan_id);
2752: end if;
2753:
2754: -- ATP4drp
2755: IF NVL(x_plan_info_rec.plan_type, 1) = 5 THEN -- DRP plan then re-set variables

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

2755: IF NVL(x_plan_info_rec.plan_type, 1) = 5 THEN -- DRP plan then re-set variables
2756: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2757: l_time_phased_atp := 'N';
2758: IF PG_DEBUG in ('Y','C') then
2759: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2760: msc_sch_wb.atp_debug('DRP Plan, re-setting variables');
2761: END IF;
2762: ELSE
2763: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;

Line 2760: msc_sch_wb.atp_debug('DRP Plan, re-setting variables');

2756: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2757: l_time_phased_atp := 'N';
2758: IF PG_DEBUG in ('Y','C') then
2759: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2760: msc_sch_wb.atp_debug('DRP Plan, re-setting variables');
2761: END IF;
2762: ELSE
2763: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;
2764: l_time_phased_atp := p_time_phased_atp;

Line 2767: msc_sch_wb.atp_debug('Value of MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);

2763: MSC_ATP_PVT.G_ALLOCATED_ATP := MSC_ATP_PVT.G_ORIG_ALLOC_ATP;
2764: l_time_phased_atp := p_time_phased_atp;
2765: END IF;
2766: IF PG_DEBUG in ('Y','C') then
2767: msc_sch_wb.atp_debug('Value of MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2768: msc_sch_wb.atp_debug('Value of l_time_phased_atp :' || l_time_phased_atp);
2769: msc_sch_wb.atp_debug('Value of p_time_phased_atp :' || p_time_phased_atp);
2770: END IF;
2771: -- End ATP4drp

Line 2768: msc_sch_wb.atp_debug('Value of l_time_phased_atp :' || l_time_phased_atp);

2764: l_time_phased_atp := p_time_phased_atp;
2765: END IF;
2766: IF PG_DEBUG in ('Y','C') then
2767: msc_sch_wb.atp_debug('Value of MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2768: msc_sch_wb.atp_debug('Value of l_time_phased_atp :' || l_time_phased_atp);
2769: msc_sch_wb.atp_debug('Value of p_time_phased_atp :' || p_time_phased_atp);
2770: END IF;
2771: -- End ATP4drp
2772: IF x_plan_info_rec.plan_id > 0 THEN

Line 2769: msc_sch_wb.atp_debug('Value of p_time_phased_atp :' || p_time_phased_atp);

2765: END IF;
2766: IF PG_DEBUG in ('Y','C') then
2767: msc_sch_wb.atp_debug('Value of MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2768: msc_sch_wb.atp_debug('Value of l_time_phased_atp :' || l_time_phased_atp);
2769: msc_sch_wb.atp_debug('Value of p_time_phased_atp :' || p_time_phased_atp);
2770: END IF;
2771: -- End ATP4drp
2772: IF x_plan_info_rec.plan_id > 0 THEN
2773:

Line 2782: msc_sch_wb.atp_debug('Pre-allocation process needs to be run');

2778:
2779: IF l_summary_flag = MSC_POST_PRO.G_SF_SUMMARY_NOT_RUN THEN -- Summary / pre-allocation was never run.
2780: x_plan_info_rec.plan_id := -200;
2781: if PG_DEBUG in ('Y','C') then
2782: msc_sch_wb.atp_debug('Pre-allocation process needs to be run');
2783: end if;
2784: ELSIF l_summary_flag = MSC_POST_PRO.G_SF_PREALLOC_RUNNING THEN -- Pre-allocation is running.
2785: x_plan_info_rec.plan_id := -100;
2786: if PG_DEBUG in ('Y','C') then

Line 2787: msc_sch_wb.atp_debug('Pre-allocation and/or PF bucketting process is running');

2783: end if;
2784: ELSIF l_summary_flag = MSC_POST_PRO.G_SF_PREALLOC_RUNNING THEN -- Pre-allocation is running.
2785: x_plan_info_rec.plan_id := -100;
2786: if PG_DEBUG in ('Y','C') then
2787: msc_sch_wb.atp_debug('Pre-allocation and/or PF bucketting process is running');
2788: end if;
2789: END IF;
2790: -- Summary enhancement: Do not reset summary flag so that copy SOs can be created
2791: -- this check will be made again just before building period data to decide whether summary should be used

Line 2798: msc_sch_wb.atp_debug('Switch from summary to details tables');

2794: IF l_summary_flag = 1 THEN
2795: -- set the summary flag
2796: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
2797: if PG_DEBUG in ('Y','C') then
2798: msc_sch_wb.atp_debug('Switch from summary to details tables');
2799: end if;
2800: ELSIF l_summary_flag = 2 THEN*/
2801: ELSIF l_summary_flag IN (MSC_POST_PRO.G_SF_SUMMARY_NOT_RUN, MSC_POST_PRO.G_SF_PREALLOC_RUNNING) THEN
2802: -- This means that PF bucketting has not started or is still in progress

Line 2806: msc_sch_wb.atp_debug('PF bucketting process is running or was never run');

2802: -- This means that PF bucketting has not started or is still in progress
2803: IF nvl(l_time_phased_atp,'N') = 'Y' THEN -- ATP4drp Use local variable instead of parameter
2804: x_plan_info_rec.plan_id := -100; --changed for 2392456
2805: if PG_DEBUG in ('Y','C') then
2806: msc_sch_wb.atp_debug('PF bucketting process is running or was never run');
2807: end if;
2808: END IF;
2809: END IF;
2810:

Line 2821: msc_sch_wb.atp_debug ('ATP Downtime based on new plan');

2817: if l_plan_info_rec.summary_flag = MSC_ATP_24x7.G_SF_SYNC_DOWNTIME then
2818: -- downtime during ATP sync process
2819: x_plan_info_rec.plan_id := -300;
2820: if PG_DEBUG in ('Y','C') then
2821: msc_sch_wb.atp_debug ('ATP Downtime based on new plan');
2822: end if;
2823: end if;
2824: end if;
2825: END IF;

Line 2828: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'x_plan_info_rec.plan_id - ' || x_plan_info_rec.plan_id);

2824: end if;
2825: END IF;
2826:
2827: IF PG_DEBUG in ('Y', 'C') THEN
2828: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'x_plan_info_rec.plan_id - ' || x_plan_info_rec.plan_id);
2829: msc_sch_wb.atp_debug('**************** Get_Plan_Info End ***************');
2830: END IF;
2831:
2832: END Get_Plan_Info;

Line 2829: msc_sch_wb.atp_debug('**************** Get_Plan_Info End ***************');

2825: END IF;
2826:
2827: IF PG_DEBUG in ('Y', 'C') THEN
2828: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'x_plan_info_rec.plan_id - ' || x_plan_info_rec.plan_id);
2829: msc_sch_wb.atp_debug('**************** Get_Plan_Info End ***************');
2830: END IF;
2831:
2832: END Get_Plan_Info;
2833:

Line 2844: msc_sch_wb.atp_debug('*******Begin Atp_Backward_Consume Procedure******');

2840:
2841: BEGIN
2842:
2843: IF PG_DEBUG in ('Y', 'C') THEN
2844: msc_sch_wb.atp_debug('*******Begin Atp_Backward_Consume Procedure******');
2845: END IF;
2846:
2847: -- this for loop will do backward consumption
2848: FOR i in 2..p_atp_qty.COUNT LOOP

Line 2875: msc_sch_wb.atp_debug('*******End Atp_Backward_Consume Procedure******');

2871: END IF;
2872: END LOOP;
2873:
2874: IF PG_DEBUG in ('Y', 'C') THEN
2875: msc_sch_wb.atp_debug('*******End Atp_Backward_Consume Procedure******');
2876: END IF;
2877:
2878: END Atp_Backward_Consume;
2879:

Line 2890: msc_sch_wb.atp_debug('*******Begin Atp_Accumulate Procedure***********');

2886:
2887: BEGIN
2888:
2889: IF PG_DEBUG in ('Y', 'C') THEN
2890: msc_sch_wb.atp_debug('*******Begin Atp_Accumulate Procedure***********');
2891: END IF;
2892: -- this for loop will do the acculumation
2893: FOR i in 2..p_atp_qty.COUNT LOOP
2894: -- accumulation (only the surplus)

Line 2903: msc_sch_wb.atp_debug('**********End Atp_Accumulate Procedure***********');

2899: -- END IF;
2900: END LOOP;
2901:
2902: IF PG_DEBUG in ('Y', 'C') THEN
2903: msc_sch_wb.atp_debug('**********End Atp_Accumulate Procedure***********');
2904: END IF;
2905: END Atp_Accumulate;
2906:
2907: PROCEDURE Add_Coproducts(

Line 2941: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');

2937: --3766179
2938: l_supply_rec_type MSC_ATP_DB_UTILS.Supply_Rec_typ;
2939: BEGIN
2940: IF PG_DEBUG in ('Y', 'C') THEN
2941: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2942: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2943: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);

Line 2942: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);

2938: l_supply_rec_type MSC_ATP_DB_UTILS.Supply_Rec_typ;
2939: BEGIN
2940: IF PG_DEBUG in ('Y', 'C') THEN
2941: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2942: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2943: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);

Line 2943: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);

2939: BEGIN
2940: IF PG_DEBUG in ('Y', 'C') THEN
2941: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2942: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2943: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);

Line 2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);

2940: IF PG_DEBUG in ('Y', 'C') THEN
2941: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2942: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2943: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);

Line 2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);

2941: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2942: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2943: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);

Line 2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);

2942: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2943: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);

Line 2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);

2943: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);

Line 2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);

2944: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);

Line 2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);

2945: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);

Line 2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);

2946: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);
2954: END IF;

Line 2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);

2947: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);
2954: END IF;
2955: ------ determine the coproducts and their quantities

Line 2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);

2948: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);
2954: END IF;
2955: ------ determine the coproducts and their quantities
2956: -- Tuned the query for performance bug 2484964

Line 2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);

2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);
2954: END IF;
2955: ------ determine the coproducts and their quantities
2956: -- Tuned the query for performance bug 2484964
2957: SELECT inventory_item_id,quantity

Line 3002: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'No of Coproducts = ' || l_coproducts_rec.inventory_item_id.count);

2998: TP.sr_instance_id = MBC.sr_instance_id and
2999: TP.sr_tp_id = MBC.organization_id and
3000: TP.partner_type = 3 );
3001: IF PG_DEBUG in ('Y', 'C') THEN
3002: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'No of Coproducts = ' || l_coproducts_rec.inventory_item_id.count);
3003: END IF;
3004: FOR rec_count in 1..l_coproducts_rec.inventory_item_id.count LOOP
3005: IF PG_DEBUG in ('Y', 'C') THEN
3006: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));

Line 3006: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));

3002: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'No of Coproducts = ' || l_coproducts_rec.inventory_item_id.count);
3003: END IF;
3004: FOR rec_count in 1..l_coproducts_rec.inventory_item_id.count LOOP
3005: IF PG_DEBUG in ('Y', 'C') THEN
3006: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));
3007: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'Coproduct quantity ='|| l_coproducts_rec.quantity(rec_count));
3008: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct date = ' || p_request_date);
3009: END IF;
3010: /* rajjain 02/19/2003 Bug 2788302 Begin

Line 3007: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'Coproduct quantity ='|| l_coproducts_rec.quantity(rec_count));

3003: END IF;
3004: FOR rec_count in 1..l_coproducts_rec.inventory_item_id.count LOOP
3005: IF PG_DEBUG in ('Y', 'C') THEN
3006: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));
3007: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'Coproduct quantity ='|| l_coproducts_rec.quantity(rec_count));
3008: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct date = ' || p_request_date);
3009: END IF;
3010: /* rajjain 02/19/2003 Bug 2788302 Begin
3011: * get Process Sequence ID */

Line 3008: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct date = ' || p_request_date);

3004: FOR rec_count in 1..l_coproducts_rec.inventory_item_id.count LOOP
3005: IF PG_DEBUG in ('Y', 'C') THEN
3006: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));
3007: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'Coproduct quantity ='|| l_coproducts_rec.quantity(rec_count));
3008: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct date = ' || p_request_date);
3009: END IF;
3010: /* rajjain 02/19/2003 Bug 2788302 Begin
3011: * get Process Sequence ID */
3012: l_process_seq_id := MSC_ATP_FUNC.get_process_seq_id(

Line 3098: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'l_transaction_id := ' || l_transaction_id);

3094: l_transaction_id := l_supply_rec_type.transaction_id;
3095: l_return_status := l_supply_rec_type.return_status;
3096:
3097: IF PG_DEBUG in ('Y', 'C') THEN
3098: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'l_transaction_id := ' || l_transaction_id);
3099: msc_Sch_wb.atp_debug('Add_Coproducts: ' || 'Add pegging for coproducts where pegging id = 4');
3100: END IF;
3101:
3102: INSERT into mrp_atp_details_temp

Line 3099: msc_Sch_wb.atp_debug('Add_Coproducts: ' || 'Add pegging for coproducts where pegging id = 4');

3095: l_return_status := l_supply_rec_type.return_status;
3096:
3097: IF PG_DEBUG in ('Y', 'C') THEN
3098: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'l_transaction_id := ' || l_transaction_id);
3099: msc_Sch_wb.atp_debug('Add_Coproducts: ' || 'Add pegging for coproducts where pegging id = 4');
3100: END IF;
3101:
3102: INSERT into mrp_atp_details_temp
3103: (session_id,

Line 3191: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' rec_count : = ' || rec_count);

3187: , FND_GLOBAL.USER_ID -- login_by
3188: )
3189: RETURNING pegging_id INTO l_pegging_id;
3190: IF PG_DEBUG in ('Y', 'C') THEN
3191: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' rec_count : = ' || rec_count);
3192: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' l_pegging_id : = ' || l_pegging_id);
3193: END IF;
3194: END LOOP;
3195: IF PG_DEBUG in ('Y', 'C') THEN

Line 3192: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' l_pegging_id : = ' || l_pegging_id);

3188: )
3189: RETURNING pegging_id INTO l_pegging_id;
3190: IF PG_DEBUG in ('Y', 'C') THEN
3191: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' rec_count : = ' || rec_count);
3192: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' l_pegging_id : = ' || l_pegging_id);
3193: END IF;
3194: END LOOP;
3195: IF PG_DEBUG in ('Y', 'C') THEN
3196: msc_sch_wb.atp_debug('**********End ADD_Coproducts Procedure***********');

Line 3196: msc_sch_wb.atp_debug('**********End ADD_Coproducts Procedure***********');

3192: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' l_pegging_id : = ' || l_pegging_id);
3193: END IF;
3194: END LOOP;
3195: IF PG_DEBUG in ('Y', 'C') THEN
3196: msc_sch_wb.atp_debug('**********End ADD_Coproducts Procedure***********');
3197: END IF;
3198:
3199: END ADD_COPRODUCTS;
3200:

Line 3286: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'Inside of atp_proc ');

3282: mast_cursor mastcurtyp;
3283: BEGIN
3284:
3285: /*IF PG_DEBUG in ('Y', 'C') THEN
3286: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'Inside of atp_proc ');
3287: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id);
3288: END IF; */
3289: /*----------------------------------------------------------------------------
3290: -- This procedure will be on the ATP server and will be called thru

Line 3287: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id);

3283: BEGIN
3284:
3285: /*IF PG_DEBUG in ('Y', 'C') THEN
3286: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'Inside of atp_proc ');
3287: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id);
3288: END IF; */
3289: /*----------------------------------------------------------------------------
3290: -- This procedure will be on the ATP server and will be called thru
3291: -- the atp link from the client.

Line 3293: msc_sch_wb.set_session_id(x_session_id); -- Set session ID for debug file.

3289: /*----------------------------------------------------------------------------
3290: -- This procedure will be on the ATP server and will be called thru
3291: -- the atp link from the client.
3292: ----------------------------------------------------------------------------*/
3293: msc_sch_wb.set_session_id(x_session_id); -- Set session ID for debug file.
3294: --bug3610706 start
3295: IF PG_DEBUG in ('Y', 'C') THEN
3296: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id || ':' || x_session_id);
3297: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'x_sr_instance_id ' || x_sr_instance_id);

Line 3296: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id || ':' || x_session_id);

3292: ----------------------------------------------------------------------------*/
3293: msc_sch_wb.set_session_id(x_session_id); -- Set session ID for debug file.
3294: --bug3610706 start
3295: IF PG_DEBUG in ('Y', 'C') THEN
3296: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id || ':' || x_session_id);
3297: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'x_sr_instance_id ' || x_sr_instance_id);
3298: END IF;
3299: l_dblink := null;
3300: IF p_node_id is not null THEN

Line 3297: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'x_sr_instance_id ' || x_sr_instance_id);

3293: msc_sch_wb.set_session_id(x_session_id); -- Set session ID for debug file.
3294: --bug3610706 start
3295: IF PG_DEBUG in ('Y', 'C') THEN
3296: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id || ':' || x_session_id);
3297: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'x_sr_instance_id ' || x_sr_instance_id);
3298: END IF;
3299: l_dblink := null;
3300: IF p_node_id is not null THEN
3301: BEGIN

Line 3309: msc_sch_wb.atp_debug('RAC instance');

3305: FROM msc_apps_instance_nodes
3306: WHERE instance_id = x_sr_instance_id and
3307: node_id = p_node_id;
3308: IF PG_DEBUG in ('Y', 'C') THEN
3309: msc_sch_wb.atp_debug('RAC instance');
3310: END IF;
3311: EXCEPTION
3312: WHEN OTHERS THEN
3313: l_dblink := null;

Line 3315: msc_sch_wb.atp_debug('Did not get records in rac case');

3311: EXCEPTION
3312: WHEN OTHERS THEN
3313: l_dblink := null;
3314: IF PG_DEBUG in ('Y', 'C') THEN
3315: msc_sch_wb.atp_debug('Did not get records in rac case');
3316: END IF;
3317: END;
3318: END IF;
3319: /* Bug 2085071 Fix */

Line 3338: msc_sch_wb.atp_debug('get_Supply_Sources: ' || ' l_dblink '||l_dblink);

3334: l_dynstring := '@'||l_dblink;
3335: END IF;
3336:
3337: IF PG_DEBUG in ('Y', 'C') THEN
3338: msc_sch_wb.atp_debug('get_Supply_Sources: ' || ' l_dblink '||l_dblink);
3339: END IF;
3340:
3341: /*--------------------------------------------------
3342: selecting ship method and delivery lead time passed

Line 3370: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'sql_stmt : ' || sql_stmt);

3366: ' order_line_id = nvl(ato_model_line_id, order_line_id)'||
3367: ' AND rownum = 1';
3368:
3369: IF PG_DEBUG in ('Y', 'C') THEN
3370: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'sql_stmt : ' || sql_stmt);
3371: END IF;
3372:
3373: EXECUTE IMMEDIATE sql_stmt INTO l_sr_instance_id,l_om_source_org,
3374: l_organization_id,

Line 3380: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);

3376: g_ship_method_rec.ship_method,g_ship_method_rec.intransit_time,
3377: g_ship_method_rec.ship_method_text
3378: using x_session_id;
3379: IF PG_DEBUG in ('Y', 'C') THEN
3380: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);
3381: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);
3382: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3383: g_ship_method_rec.ship_method);
3384: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||

Line 3381: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);

3377: g_ship_method_rec.ship_method_text
3378: using x_session_id;
3379: IF PG_DEBUG in ('Y', 'C') THEN
3380: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);
3381: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);
3382: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3383: g_ship_method_rec.ship_method);
3384: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3385: g_ship_method_rec.intransit_time);

Line 3382: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||

3378: using x_session_id;
3379: IF PG_DEBUG in ('Y', 'C') THEN
3380: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);
3381: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);
3382: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3383: g_ship_method_rec.ship_method);
3384: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3385: g_ship_method_rec.intransit_time);
3386: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);

Line 3384: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||

3380: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);
3381: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);
3382: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3383: g_ship_method_rec.ship_method);
3384: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3385: g_ship_method_rec.intransit_time);
3386: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);
3387: msc_sch_wb.atp_debug('l_customer_site_id is ' || l_customer_site_id);
3388: END IF;

Line 3386: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);

3382: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3383: g_ship_method_rec.ship_method);
3384: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3385: g_ship_method_rec.intransit_time);
3386: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);
3387: msc_sch_wb.atp_debug('l_customer_site_id is ' || l_customer_site_id);
3388: END IF;
3389:
3390: sql_stmt :=

Line 3387: msc_sch_wb.atp_debug('l_customer_site_id is ' || l_customer_site_id);

3383: g_ship_method_rec.ship_method);
3384: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3385: g_ship_method_rec.intransit_time);
3386: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);
3387: msc_sch_wb.atp_debug('l_customer_site_id is ' || l_customer_site_id);
3388: END IF;
3389:
3390: sql_stmt :=
3391: ' SELECT inventory_item_id ,order_line_id, ato_model_line_id,'||

Line 3418: msc_sch_wb.atp_debug(' count is ' ||

3414: l_item_sourcing_rec.match_item_id.trim(1);
3415:
3416:
3417: IF PG_DEBUG in ('Y', 'C') THEN
3418: msc_sch_wb.atp_debug(' count is ' ||
3419: l_item_sourcing_rec.sr_inventory_item_id. count);
3420: msc_sch_wb.atp_debug('get_Supply_Sources: ' || ' Plan_id : '||
3421: x_plan_id||' assgn_id : '||x_assignment_set_id||
3422: ' inst_id : '||l_sr_instance_id);

Line 3420: msc_sch_wb.atp_debug('get_Supply_Sources: ' || ' Plan_id : '||

3416:
3417: IF PG_DEBUG in ('Y', 'C') THEN
3418: msc_sch_wb.atp_debug(' count is ' ||
3419: l_item_sourcing_rec.sr_inventory_item_id. count);
3420: msc_sch_wb.atp_debug('get_Supply_Sources: ' || ' Plan_id : '||
3421: x_plan_id||' assgn_id : '||x_assignment_set_id||
3422: ' inst_id : '||l_sr_instance_id);
3423: END IF;
3424:

Line 3450: msc_sch_wb.atp_debug('Rows inserted in msc_regions_temp:'|| sql%rowcount);

3446: WHERE session_id = :x_session_id)';
3447: EXECUTE IMMEDIATE sql_stmt USING x_session_id;
3448:
3449: IF PG_DEBUG in ('Y', 'C') THEN
3450: msc_sch_wb.atp_debug('Rows inserted in msc_regions_temp:'|| sql%rowcount);
3451: END IF;
3452: END IF;
3453: --bug3610706 End Changes
3454:

Line 3458: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3454:
3455: IF l_item_sourcing_rec.sr_inventory_item_id.COUNT > 0 THEN
3456:
3457: IF PG_DEBUG in ('Y', 'C') THEN
3458: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3459: 'l_item_sourcing_rec.sr_inventory_item_id(1) : '
3460: || l_item_sourcing_rec.sr_inventory_item_id(1));
3461: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3462: 'l_item_sourcing_rec.line_id(1) : '

Line 3461: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3457: IF PG_DEBUG in ('Y', 'C') THEN
3458: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3459: 'l_item_sourcing_rec.sr_inventory_item_id(1) : '
3460: || l_item_sourcing_rec.sr_inventory_item_id(1));
3461: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3462: 'l_item_sourcing_rec.line_id(1) : '
3463: || l_item_sourcing_rec.line_id(1));
3464: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3465: 'l_item_sourcing_rec.ato_line_id(1) : '

Line 3464: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3460: || l_item_sourcing_rec.sr_inventory_item_id(1));
3461: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3462: 'l_item_sourcing_rec.line_id(1) : '
3463: || l_item_sourcing_rec.line_id(1));
3464: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3465: 'l_item_sourcing_rec.ato_line_id(1) : '
3466: || l_item_sourcing_rec.ato_line_id(1));
3467: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3468: 'l_item_sourcing_rec.match_item_id(1) : '

Line 3467: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3463: || l_item_sourcing_rec.line_id(1));
3464: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3465: 'l_item_sourcing_rec.ato_line_id(1) : '
3466: || l_item_sourcing_rec.ato_line_id(1));
3467: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3468: 'l_item_sourcing_rec.match_item_id(1) : '
3469: || l_item_sourcing_rec.match_item_id(1));
3470: END IF;
3471:

Line 3487: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3483:
3484: IF l_return_status <> 'S' THEN
3485: x_error_mesg := l_return_status;
3486: IF PG_DEBUG in ('Y', 'C') THEN
3487: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3488: ' Error in call to msc_atp_pvt.atp_sources ');
3489: END IF;
3490: RETURN ;
3491: ELSE

Line 3493: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3489: END IF;
3490: RETURN ;
3491: ELSE
3492: IF PG_DEBUG in ('Y', 'C') THEN
3493: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3494: ' Success in call to atp_sources : ' ||
3495: l_sources.organization_id.COUNT);
3496: END IF;
3497: END IF;

Line 3500: MSC_SCH_WB.extend_other_cols(l_other_cols,

3496: END IF;
3497: END IF;
3498:
3499: IF l_sources.organization_id.COUNT > 0 THEN
3500: MSC_SCH_WB.extend_other_cols(l_other_cols,
3501: l_sources.organization_id.COUNT);
3502:
3503: FOR j IN 1..l_sources.organization_id.COUNT LOOP
3504: -- cchen's api returns these values.

Line 3523: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3519: AND partner_type = 3;
3520: EXCEPTION
3521: WHEN no_data_found THEN
3522: IF PG_DEBUG in ('Y', 'C') THEN
3523: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3524: ' Org Code Not found for : ' ||
3525: l_sources.organization_id(j));
3526: END IF;
3527: x_error_mesg := 'Org Code Not found for : ' ||

Line 3557: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3553:
3554: EXCEPTION
3555: WHEN no_data_found THEN
3556: IF PG_DEBUG in ('Y', 'C') THEN
3557: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3558: 'Vendor name or site name Not found for '
3559: ||l_sources.organization_id(j));
3560: END IF;
3561: x_error_mesg :='Vendor name or site name Not found for'

Line 3596: msc_sch_wb.atp_debug('get_Supply_Sources: '

3592: l_customer_site_id,
3593: l_sources.supplier_id(counter), l_sources.supplier_site_id(counter));
3594:
3595: IF PG_DEBUG in ('Y', 'C') THEN
3596: msc_sch_wb.atp_debug('get_Supply_Sources: '
3597: || ' l_to_location_id '
3598: ||l_to_location_id);
3599: END IF;
3600:

Line 3615: msc_sch_wb.atp_debug('get_Supply_Sources: '

3611:
3612: -- here we are getting shipping methods for specific from location to location
3613:
3614: IF PG_DEBUG in ('Y', 'C') THEN
3615: msc_sch_wb.atp_debug('get_Supply_Sources: '
3616: || ' l_from_location_id '
3617: ||l_from_location_id);
3618: END IF;
3619:

Line 3679: msc_sch_wb.atp_debug('get_Supply_Sources: '

3675: FND_GLOBAL.USER_ID,
3676: FND_GLOBAL.USER_ID;
3677:
3678: IF PG_DEBUG in ('Y', 'C') THEN
3679: msc_sch_wb.atp_debug('get_Supply_Sources: '
3680: || ' after exec of above sql ');
3681: END IF;
3682:
3683: END;

Line 3689: msc_sch_wb.atp_debug('get_Supply_Sources: '

3685: END LOOP; -- finish looping through all available shipping methods
3686: CLOSE SH_METHODS;
3687:
3688: IF PG_DEBUG in ('Y', 'C') THEN
3689: msc_sch_wb.atp_debug('get_Supply_Sources: '
3690: || 'l_ship_method AFTER FIRST SQL '
3691: || l_ship_method);
3692: END IF;
3693:

Line 3707: msc_sch_wb.atp_debug('get_Supply_Sources: '

3703: FETCH c_region_level INTO l_region_level, l_region_id;
3704: CLOSE c_region_level;
3705:
3706: IF PG_DEBUG in ('Y', 'C') THEN
3707: msc_sch_wb.atp_debug('get_Supply_Sources: '
3708: || 'region level is '
3709: || l_region_level || ' and region_id '
3710: || l_region_id);
3711: END IF;

Line 3835: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3831: WHEN no_data_found THEN
3832: l_other_cols.ship_method_text(counter)
3833: := l_sources.ship_method(counter);
3834: IF PG_DEBUG in ('Y', 'C') THEN
3835: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3836: 'no desc for ship method ');
3837: END IF;
3838: END;
3839: END IF;

Line 3851: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||

3847: x_calling_inst,
3848: l_sources,l_other_cols);
3849: ELSE
3850: IF PG_DEBUG in ('Y', 'C') THEN
3851: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3852: ' There are no sources to be inserted ');
3853: END IF;
3854: x_ret_status := 'E';
3855: x_error_mesg := 'MRP_ATP_NO_SOURCES';

Line 3867: msc_sch_wb.atp_debug('get_Supply_Sources: '

3863: DELETE msc_regions_temp
3864: WHERE session_id = x_session_id;
3865:
3866: IF PG_DEBUG in ('Y', 'C') THEN
3867: msc_sch_wb.atp_debug('get_Supply_Sources: '
3868: || 'Rows deleted from msc_regions_temp : '
3869: ||sql%rowcount);
3870: END IF;
3871: --ubadrina bug 2265012 begin

Line 3900: msc_sch_wb.atp_debug('!!!!!msc_calculate_attrib !!!!!!');

3896:
3897: l_from_location_id NUMBER;
3898: l_to_location_id NUMBER;
3899: BEGIN
3900: msc_sch_wb.atp_debug('!!!!!msc_calculate_attrib !!!!!!');
3901: msc_sch_wb.atp_debug(' x_atp_sources.lead_time(counter) is '|| x_atp_sources.lead_time(counter));
3902: msc_sch_wb.atp_debug('x_atp_sources.ship_method(counter) is '|| x_atp_sources.ship_method(counter));
3903:
3904: IF x_atp_sources.lead_time(counter) IS NULL THEN

Line 3901: msc_sch_wb.atp_debug(' x_atp_sources.lead_time(counter) is '|| x_atp_sources.lead_time(counter));

3897: l_from_location_id NUMBER;
3898: l_to_location_id NUMBER;
3899: BEGIN
3900: msc_sch_wb.atp_debug('!!!!!msc_calculate_attrib !!!!!!');
3901: msc_sch_wb.atp_debug(' x_atp_sources.lead_time(counter) is '|| x_atp_sources.lead_time(counter));
3902: msc_sch_wb.atp_debug('x_atp_sources.ship_method(counter) is '|| x_atp_sources.ship_method(counter));
3903:
3904: IF x_atp_sources.lead_time(counter) IS NULL THEN
3905: -- find the ship method and intransit time

Line 3902: msc_sch_wb.atp_debug('x_atp_sources.ship_method(counter) is '|| x_atp_sources.ship_method(counter));

3898: l_to_location_id NUMBER;
3899: BEGIN
3900: msc_sch_wb.atp_debug('!!!!!msc_calculate_attrib !!!!!!');
3901: msc_sch_wb.atp_debug(' x_atp_sources.lead_time(counter) is '|| x_atp_sources.lead_time(counter));
3902: msc_sch_wb.atp_debug('x_atp_sources.ship_method(counter) is '|| x_atp_sources.ship_method(counter));
3903:
3904: IF x_atp_sources.lead_time(counter) IS NULL THEN
3905: -- find the ship method and intransit time
3906: -- find the from_location_id

Line 3908: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

3904: IF x_atp_sources.lead_time(counter) IS NULL THEN
3905: -- find the ship method and intransit time
3906: -- find the from_location_id
3907: IF PG_DEBUG in ('Y', 'C') THEN
3908: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
3909: || ' find the ship_method and intransit LT');
3910: END IF;
3911:
3912: l_from_location_id :=

Line 3921: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

3917: p_supplier_id => NULL,
3918: p_supplier_site_id => NULL);
3919:
3920: IF PG_DEBUG in ('Y', 'C') THEN
3921: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
3922: || ' from location_id = '||l_from_location_id);
3923: END IF;
3924:
3925: -- find the to_location_id

Line 3935: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

3931: p_supplier_id => NULL,
3932: p_supplier_site_id => NULL);
3933:
3934: IF PG_DEBUG in ('Y', 'C') THEN
3935: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
3936: || ' from to_loc_id = '||l_to_location_id);
3937: END IF;
3938:
3939: -- find the ship method and intransit time first by

Line 3973: msc_sch_wb.atp_debug('msc_calculate_source_attrib: ' || 'get vendor_id and vendor_site_id ');

3969: END IF;
3970:
3971: BEGIN
3972: IF PG_DEBUG in ('Y', 'C') THEN
3973: msc_sch_wb.atp_debug('msc_calculate_source_attrib: ' || 'get vendor_id and vendor_site_id ');
3974: END IF;
3975:
3976: select ORG_INFORMATION3, ORG_INFORMATION4
3977: into x_atp_sources.supplier_id(counter), x_atp_sources.supplier_site_id(counter)

Line 3984: msc_sch_wb.atp_debug('msc_calculate_source_attrib: ' || 'No data found in-get vendor_id and vendor_site_id');

3980: and ORG_INFORMATION_CONTEXT = 'Customer/Supplier Association';
3981: exception
3982: when no_data_found THEN
3983: IF PG_DEBUG in ('Y', 'C') THEN
3984: msc_sch_wb.atp_debug('msc_calculate_source_attrib: ' || 'No data found in-get vendor_id and vendor_site_id');
3985: END IF;
3986:
3987: x_atp_sources.supplier_id(counter) := 0;
3988: x_atp_sources.supplier_site_id(counter) :=0;

Line 3993: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

3989: END;
3990:
3991: IF x_atp_sources.SHIP_METHOD(counter) is not null THEN
3992: IF PG_DEBUG in ('Y', 'C') THEN
3993: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
3994: || 'ship method is not null '
3995: ||x_atp_sources.SHIP_METHOD(counter));
3996: END IF;
3997: BEGIN

Line 4009: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

4005: WHEN no_data_found THEN
4006: x_other_cols.ship_method_text(counter)
4007: := x_atp_sources.ship_method(counter);
4008: IF PG_DEBUG in ('Y', 'C') THEN
4009: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
4010: || 'no desc for ship method ');
4011: END IF;
4012: END;
4013:

Line 4033: msc_sch_wb.atp_debug('insert_atp_sources: ' || 'inserting sources link '||l_dynstring);

4029:
4030: IF x_dblink IS NOT NULL AND x_calling_inst = 'APPS' THEN
4031: l_dynstring := '@'||x_dblink;
4032: IF PG_DEBUG in ('Y', 'C') THEN
4033: msc_sch_wb.atp_debug('insert_atp_sources: ' || 'inserting sources link '||l_dynstring);
4034: END IF;
4035: END IF;
4036:
4037: order_sch_wb.debug_session_id := x_session_id;

Line 4039: msc_sch_wb.atp_debug('insert_atp_sources: ' || 'inserting sources count = '||x_atp_sources.organization_id.count);

4035: END IF;
4036:
4037: order_sch_wb.debug_session_id := x_session_id;
4038: IF PG_DEBUG in ('Y', 'C') THEN
4039: msc_sch_wb.atp_debug('insert_atp_sources: ' || 'inserting sources count = '||x_atp_sources.organization_id.count);
4040: END IF;
4041:
4042: sql_stmt :=
4043: ' INSERT INTO '||

Line 4128: --msc_sch_wb.atp_debug(' sql stmt '||sql_stmt);

4124: ' ,:last_update_login' ||
4125: ' FROM mrp_atp_schedule_temp'||l_dynstring||' '||
4126: ' WHERE session_id = :x_session_id '||
4127: ' AND status_flag = 4';
4128: --msc_sch_wb.atp_debug(' sql stmt '||sql_stmt);
4129:
4130: FOR j IN 1..x_atp_sources.organization_id.COUNT LOOP
4131: -- x_atp_sources.organization_id.first..x_atp_sources.organization_id.last
4132: execute immediate sql_stmt

Line 4145: msc_sch_wb.atp_debug('insert_atp_sources: ' || ' In atp_insert_sources x_atp_sources.ship_method(j) is ' || x_atp_sources.ship_method(j));

4141: FND_GLOBAL.USER_ID,
4142: FND_GLOBAL.USER_ID,
4143: x_session_id;
4144: IF PG_DEBUG in ('Y', 'C') THEN
4145: msc_sch_wb.atp_debug('insert_atp_sources: ' || ' In atp_insert_sources x_atp_sources.ship_method(j) is ' || x_atp_sources.ship_method(j));
4146: msc_sch_wb.atp_debug('insert_atp_sources: ' || ' inserted rows '||SQL%ROWCOUNT);
4147: END IF;
4148: END LOOP;
4149: END insert_atp_sources;

Line 4146: msc_sch_wb.atp_debug('insert_atp_sources: ' || ' inserted rows '||SQL%ROWCOUNT);

4142: FND_GLOBAL.USER_ID,
4143: x_session_id;
4144: IF PG_DEBUG in ('Y', 'C') THEN
4145: msc_sch_wb.atp_debug('insert_atp_sources: ' || ' In atp_insert_sources x_atp_sources.ship_method(j) is ' || x_atp_sources.ship_method(j));
4146: msc_sch_wb.atp_debug('insert_atp_sources: ' || ' inserted rows '||SQL%ROWCOUNT);
4147: END IF;
4148: END LOOP;
4149: END insert_atp_sources;
4150:

Line 4172: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');

4168: 1- summary_so 2- Summary_sd 3- summary_res 4-Summary_sup */
4169:
4170: IF order_sch_wb.mr_debug = 'Y' THEN -- if debug mode is on
4171: IF PG_DEBUG in ('Y', 'C') THEN
4172: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4173: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4174: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);

Line 4173: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);

4169:
4170: IF order_sch_wb.mr_debug = 'Y' THEN -- if debug mode is on
4171: IF PG_DEBUG in ('Y', 'C') THEN
4172: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4173: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4174: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);

Line 4174: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);

4170: IF order_sch_wb.mr_debug = 'Y' THEN -- if debug mode is on
4171: IF PG_DEBUG in ('Y', 'C') THEN
4172: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4173: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4174: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);

Line 4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);

4171: IF PG_DEBUG in ('Y', 'C') THEN
4172: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4173: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4174: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);

Line 4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);

4172: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4173: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4174: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);

Line 4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);

4173: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4174: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);

Line 4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);

4174: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);

Line 4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);

4175: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);

Line 4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);

4176: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);

Line 4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);

4177: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);
4185: END IF;

Line 4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);

4178: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);
4185: END IF;
4186:

Line 4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);

4179: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);
4185: END IF;
4186:
4187: IF p_mode = 1 THEN

Line 4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);

4180: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4181: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);
4185: END IF;
4186:
4187: IF p_mode = 1 THEN
4188: BEGIN

Line 4258: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'temp_sd_qty := ' || temp_sd_qty);

4254: END;
4255:
4256: END IF; -- IF p_mode= 1
4257: IF PG_DEBUG in ('Y', 'C') THEN
4258: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'temp_sd_qty := ' || temp_sd_qty);
4259: msc_sch_wb.atp_debug('**** END SHOW_SUMMARY_QUANTITY ****');
4260: END IF;
4261: END IF; -- IF order_sch_wb.mr_debug = 'Y
4262:

Line 4259: msc_sch_wb.atp_debug('**** END SHOW_SUMMARY_QUANTITY ****');

4255:
4256: END IF; -- IF p_mode= 1
4257: IF PG_DEBUG in ('Y', 'C') THEN
4258: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'temp_sd_qty := ' || temp_sd_qty);
4259: msc_sch_wb.atp_debug('**** END SHOW_SUMMARY_QUANTITY ****');
4260: END IF;
4261: END IF; -- IF order_sch_wb.mr_debug = 'Y
4262:
4263: END SHOW_SUMMARY_QUANTITY;

Line 4284: msc_sch_wb.atp_debug('inside get_item_attributes');

4280:
4281:
4282: BEGIN
4283: IF PG_DEBUG in ('Y', 'C') THEN
4284: msc_sch_wb.atp_debug('inside get_item_attributes');
4285: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4286: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);

Line 4285: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);

4281:
4282: BEGIN
4283: IF PG_DEBUG in ('Y', 'C') THEN
4284: msc_sch_wb.atp_debug('inside get_item_attributes');
4285: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4286: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);

Line 4286: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);

4282: BEGIN
4283: IF PG_DEBUG in ('Y', 'C') THEN
4284: msc_sch_wb.atp_debug('inside get_item_attributes');
4285: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4286: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);

Line 4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);

4283: IF PG_DEBUG in ('Y', 'C') THEN
4284: msc_sch_wb.atp_debug('inside get_item_attributes');
4285: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4286: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);

Line 4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);

4284: msc_sch_wb.atp_debug('inside get_item_attributes');
4285: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4286: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4292: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);

Line 4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);

4285: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4286: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4292: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4293: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||

Line 4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);

4286: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4292: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4293: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4294: p_item_attribute_rec.parent_repl_ord_flag);

Line 4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);

4287: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4292: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4293: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4294: p_item_attribute_rec.parent_repl_ord_flag);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||

Line 4292: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);

4288: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4292: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4293: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4294: p_item_attribute_rec.parent_repl_ord_flag);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4296: p_item_attribute_rec.parent_bom_item_type);

Line 4293: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||

4289: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4290: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4292: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4293: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4294: p_item_attribute_rec.parent_repl_ord_flag);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4296: p_item_attribute_rec.parent_bom_item_type);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||

Line 4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||

4291: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4292: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4293: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4294: p_item_attribute_rec.parent_repl_ord_flag);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4296: p_item_attribute_rec.parent_bom_item_type);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||
4298: p_item_attribute_rec.parent_comp_flag);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||

Line 4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||

4293: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4294: p_item_attribute_rec.parent_repl_ord_flag);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4296: p_item_attribute_rec.parent_bom_item_type);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||
4298: p_item_attribute_rec.parent_comp_flag);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||
4300: p_item_attribute_rec.parent_atp_flag);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_pegging_id := ' ||

Line 4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||

4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4296: p_item_attribute_rec.parent_bom_item_type);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||
4298: p_item_attribute_rec.parent_comp_flag);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||
4300: p_item_attribute_rec.parent_atp_flag);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_pegging_id := ' ||
4302: p_item_attribute_rec.parent_pegging_id);
4303: END IF;

Line 4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_pegging_id := ' ||

4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||
4298: p_item_attribute_rec.parent_comp_flag);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||
4300: p_item_attribute_rec.parent_atp_flag);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_pegging_id := ' ||
4302: p_item_attribute_rec.parent_pegging_id);
4303: END IF;
4304:
4305: -- ATP Rule added to accomodate Bug 1510853

Line 4356: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);

4352:
4353: --e_cto_rearch
4354:
4355: IF PG_DEBUG in ('Y', 'C') THEN
4356: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4357: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4358: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4359: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4360: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023

Line 4357: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);

4353: --e_cto_rearch
4354:
4355: IF PG_DEBUG in ('Y', 'C') THEN
4356: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4357: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4358: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4359: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4360: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4361: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 4358: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);

4354:
4355: IF PG_DEBUG in ('Y', 'C') THEN
4356: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4357: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4358: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4359: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4360: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4361: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4362: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);

Line 4359: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);

4355: IF PG_DEBUG in ('Y', 'C') THEN
4356: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4357: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4358: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4359: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4360: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4361: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4362: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);
4363: END IF;

Line 4360: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023

4356: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4357: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4358: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4359: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4360: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4361: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4362: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);
4363: END IF;
4364:

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

4357: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4358: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4359: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4360: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4361: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4362: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);
4363: END IF;
4364:
4365: -- ATP4drp re-set component flag for DRP plans

Line 4362: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);

4358: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4359: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4360: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4361: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4362: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);
4363: END IF;
4364:
4365: -- ATP4drp re-set component flag for DRP plans
4366: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 THEN

Line 4373: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: Before Reset Product Family = ' || p_item_attribute_rec.product_family_id);

4369: ELSIF l_atp_comp_flag = 'R' THEN
4370: l_atp_comp_flag := 'N';
4371: END IF;
4372: IF PG_DEBUG in ('Y', 'C') THEN
4373: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: Before Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4374: END IF;
4375: p_item_attribute_rec.product_family_id := p_item_attribute_rec.dest_inv_item_id;
4376: -- Bug 4052808 DRP Plans only support Fixed Lead Times.
4377: p_item_attribute_rec.variable_lt := 0;

Line 4379: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);

4375: p_item_attribute_rec.product_family_id := p_item_attribute_rec.dest_inv_item_id;
4376: -- Bug 4052808 DRP Plans only support Fixed Lead Times.
4377: p_item_attribute_rec.variable_lt := 0;
4378: IF PG_DEBUG in ('Y', 'C') THEN
4379: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4380: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');
4381: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4382: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4383: END IF;

Line 4380: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');

4376: -- Bug 4052808 DRP Plans only support Fixed Lead Times.
4377: p_item_attribute_rec.variable_lt := 0;
4378: IF PG_DEBUG in ('Y', 'C') THEN
4379: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4380: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');
4381: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4382: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4383: END IF;
4384: END IF;

Line 4381: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);

4377: p_item_attribute_rec.variable_lt := 0;
4378: IF PG_DEBUG in ('Y', 'C') THEN
4379: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4380: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');
4381: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4382: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4383: END IF;
4384: END IF;
4385: -- END ATP4drp

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

4378: IF PG_DEBUG in ('Y', 'C') THEN
4379: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4380: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');
4381: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4382: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4383: END IF;
4384: END IF;
4385: -- END ATP4drp
4386:

Line 4418: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);

4414: l_atp_comp_flag := 'N';
4415: END IF;
4416:
4417: IF PG_DEBUG in ('Y', 'C') THEN
4418: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);
4419: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);
4420:
4421: END IF;
4422: IF NVL(p_item_attribute_rec.parent_item_id, -1) = p_inventory_item_id THEN

Line 4419: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);

4415: END IF;
4416:
4417: IF PG_DEBUG in ('Y', 'C') THEN
4418: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);
4419: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);
4420:
4421: END IF;
4422: IF NVL(p_item_attribute_rec.parent_item_id, -1) = p_inventory_item_id THEN
4423: --atp flag for this model = 'Y'. We are coming here for second time

Line 4427: msc_sch_wb.atp_debug('Turn off atp comp flag for model');

4423: --atp flag for this model = 'Y'. We are coming here for second time
4424: -- set the atp comp flag = 'N' so that model is not exploded again.
4425: l_atp_comp_flag := 'N';
4426: IF PG_DEBUG in ('Y', 'C') THEN
4427: msc_sch_wb.atp_debug('Turn off atp comp flag for model');
4428: END IF;
4429: END IF;
4430: ELSE
4431: IF PG_DEBUG in ('Y', 'C') THEN

Line 4432: msc_sch_wb.atp_debug('PDS ATP');

4428: END IF;
4429: END IF;
4430: ELSE
4431: IF PG_DEBUG in ('Y', 'C') THEN
4432: msc_sch_wb.atp_debug('PDS ATP');
4433: END IF;
4434: IF NVL(p_item_attribute_rec.parent_repl_ord_flag, 'N') = 'Y' and
4435: NVL(p_item_attribute_rec.parent_bom_item_type, 4) = 4 THEN
4436: --parent is config item

Line 4438: msc_sch_wb.atp_debug('Parent is ato item');

4434: IF NVL(p_item_attribute_rec.parent_repl_ord_flag, 'N') = 'Y' and
4435: NVL(p_item_attribute_rec.parent_bom_item_type, 4) = 4 THEN
4436: --parent is config item
4437: IF PG_DEBUG in ('Y', 'C') THEN
4438: msc_sch_wb.atp_debug('Parent is ato item');
4439: END IF;
4440: IF l_bom_item_type in (1,2) THEN
4441: --here parent is config and thisi tem is model or option class
4442: -- we turn off the atp comp flag, honor atpp flga as it is

Line 4445: msc_sch_wb.atp_debug('Model or option class, turn off components flag');

4441: --here parent is config and thisi tem is model or option class
4442: -- we turn off the atp comp flag, honor atpp flga as it is
4443: l_atp_comp_flag := 'N'; --- we turn off components flags
4444: IF PG_DEBUG in ('Y', 'C') THEN
4445: msc_sch_wb.atp_debug('Model or option class, turn off components flag');
4446: END IF;
4447: END IF;
4448: ELSIF NVL(p_item_attribute_rec.parent_bom_item_type, 4) = 1 and
4449: NVL(p_item_attribute_rec.parent_repl_ord_flag, 'N') = 'Y' And l_bom_item_type = 2 THEN

Line 4454: msc_sch_wb.atp_debug(' parent is model, This is option class');

4450: ---parent is a model and this item is option class
4451: ---atp flag is honored as such
4452: ---components resource part is copied over from model's components flag
4453: IF PG_DEBUG in ('Y', 'C') THEN
4454: msc_sch_wb.atp_debug(' parent is model, This is option class');
4455: END IF;
4456:
4457: IF NVL(p_item_attribute_rec.parent_comp_flag, 'N') in ('R', 'C') THEN
4458: IF PG_DEBUG in ('Y', 'C') THEN

Line 4459: msc_sch_wb.atp_debug(' Resource check on model is on, set the resource flag on option class');

4455: END IF;
4456:
4457: IF NVL(p_item_attribute_rec.parent_comp_flag, 'N') in ('R', 'C') THEN
4458: IF PG_DEBUG in ('Y', 'C') THEN
4459: msc_sch_wb.atp_debug(' Resource check on model is on, set the resource flag on option class');
4460: END IF;
4461: l_atp_comp_flag := 'R';
4462: ELSE
4463: l_atp_comp_flag := 'N';

Line 4468: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);

4464: END IF;
4465:
4466: ELSIF l_bom_item_type = 1 THEN
4467: IF PG_DEBUG in ('Y', 'C') THEN
4468: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);
4469: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);
4470:
4471: END IF;
4472: IF NVL(p_item_attribute_rec.parent_item_id, -1) = p_inventory_item_id THEN

Line 4469: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);

4465:
4466: ELSIF l_bom_item_type = 1 THEN
4467: IF PG_DEBUG in ('Y', 'C') THEN
4468: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);
4469: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);
4470:
4471: END IF;
4472: IF NVL(p_item_attribute_rec.parent_item_id, -1) = p_inventory_item_id THEN
4473: --atp flag for this model = 'Y'. We are coming here for second time

Line 4477: msc_sch_wb.atp_debug('Turn off atp comp flag for model');

4473: --atp flag for this model = 'Y'. We are coming here for second time
4474: -- set the atp comp flag = 'N' so that model is not exploded again.
4475: l_atp_comp_flag := 'N';
4476: IF PG_DEBUG in ('Y', 'C') THEN
4477: msc_sch_wb.atp_debug('Turn off atp comp flag for model');
4478: END IF;
4479: END IF;
4480:
4481: END IF;

Line 4495: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_source_org_id = '||l_source_org_id);

4491: p_item_attribute_rec.replenish_to_ord_flag := l_replenish_flag;
4492: --e_cto_rearch
4493:
4494: IF PG_DEBUG in ('Y', 'C') THEN
4495: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_source_org_id = '||l_source_org_id);
4496: END IF;
4497: p_item_attribute_rec.cto_source_org_id := l_source_org_id;
4498:
4499: IF PG_DEBUG in ('Y', 'C') THEN

Line 4500: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP flag is '||l_atp_flag);

4496: END IF;
4497: p_item_attribute_rec.cto_source_org_id := l_source_org_id;
4498:
4499: IF PG_DEBUG in ('Y', 'C') THEN
4500: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP flag is '||l_atp_flag);
4501: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP components flag is '||l_atp_comp_flag);
4502: END IF;
4503:
4504: p_item_attribute_rec.instance_id := p_instance_id;

Line 4501: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP components flag is '||l_atp_comp_flag);

4497: p_item_attribute_rec.cto_source_org_id := l_source_org_id;
4498:
4499: IF PG_DEBUG in ('Y', 'C') THEN
4500: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP flag is '||l_atp_flag);
4501: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP components flag is '||l_atp_comp_flag);
4502: END IF;
4503:
4504: p_item_attribute_rec.instance_id := p_instance_id;
4505: p_item_attribute_rec.organization_id := p_organization_id;

Line 4537: msc_sch_wb.atp_debug('inside get_org_attributes');

4533: IS
4534: BEGIN
4535:
4536: IF PG_DEBUG in ('Y', 'C') THEN
4537: msc_sch_wb.atp_debug('inside get_org_attributes');
4538: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4539: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4540: END IF;
4541:

Line 4538: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);

4534: BEGIN
4535:
4536: IF PG_DEBUG in ('Y', 'C') THEN
4537: msc_sch_wb.atp_debug('inside get_org_attributes');
4538: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4539: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4540: END IF;
4541:
4542: SELECT tp.default_atp_rule_id,

Line 4539: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);

4535:
4536: IF PG_DEBUG in ('Y', 'C') THEN
4537: msc_sch_wb.atp_debug('inside get_org_attributes');
4538: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4539: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4540: END IF;
4541:
4542: SELECT tp.default_atp_rule_id,
4543: tp.calendar_code,

Line 4571: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: network_scheduling_method := ' || x_org_attribute_rec.network_scheduling_method);

4567: x_org_attribute_rec.instance_id := p_instance_id;
4568: x_org_attribute_rec.organization_id := p_organization_id;
4569:
4570: IF PG_DEBUG in ('Y', 'C') THEN
4571: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: network_scheduling_method := ' || x_org_attribute_rec.network_scheduling_method);
4572: END IF;
4573:
4574: EXCEPTION WHEN others THEN
4575: x_org_attribute_rec.instance_id := null;

Line 4597: msc_sch_wb.atp_debug('In get_global_org_info core');

4593:
4594: BEGIN
4595:
4596: IF PG_DEBUG in ('Y', 'C') THEN
4597: msc_sch_wb.atp_debug('In get_global_org_info core');
4598: END IF;
4599:
4600: IF (MSC_ATP_PVT.G_ORG_INFO_REC.instance_id IS NULL) OR
4601: (MSC_ATP_PVT.G_ORG_INFO_REC.organization_id IS NULL) OR

Line 4624: msc_sch_wb.atp_debug('Inside Get Global item attributes');

4620:
4621: BEGIN
4622:
4623: IF PG_DEBUG in ('Y', 'C') THEN
4624: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4625: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4626: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);

Line 4625: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);

4621: BEGIN
4622:
4623: IF PG_DEBUG in ('Y', 'C') THEN
4624: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4625: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4626: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);

Line 4626: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);

4622:
4623: IF PG_DEBUG in ('Y', 'C') THEN
4624: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4625: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4626: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4630: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);

Line 4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);

4623: IF PG_DEBUG in ('Y', 'C') THEN
4624: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4625: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4626: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4630: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4631: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);

Line 4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);

4624: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4625: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4626: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4630: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4631: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4632: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);

Line 4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);

4625: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4626: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4630: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4631: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4632: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4633: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);

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

4626: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4630: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4631: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4632: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4633: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);
4634: END IF;

Line 4631: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);

4627: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4630: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4631: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4632: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4633: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);
4634: END IF;
4635: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id IS NULL) OR

Line 4632: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);

4628: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4630: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4631: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4632: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4633: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);
4634: END IF;
4635: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id IS NULL) OR
4636: (MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id IS NULL) OR

Line 4633: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);

4629: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4630: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4631: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4632: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4633: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);
4634: END IF;
4635: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id IS NULL) OR
4636: (MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id IS NULL) OR
4637: (MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id IS NULL) OR

Line 4645: msc_sch_wb.atp_debug('Item/Org/instance/plan info has changed. Recalculate item attributes');

4641: ---3917625: read the item attributes if plan chnages
4642: OR (NVL(MSC_ATP_PVT.G_ITEM_INFO_REC.plan_id, -12345) <> p_plan_id) THEN
4643:
4644:
4645: msc_sch_wb.atp_debug('Item/Org/instance/plan info has changed. Recalculate item attributes');
4646: l_item_attribute_rec.parent_repl_ord_flag := p_item_attribute_rec.parent_repl_ord_flag;
4647: l_item_attribute_rec.parent_bom_item_type := p_item_attribute_rec.parent_bom_item_type;
4648: l_item_attribute_rec.parent_comp_flag := p_item_attribute_rec.parent_comp_flag;
4649: l_item_attribute_rec.parent_atp_flag := p_item_attribute_rec.parent_atp_flag;

Line 4662: msc_sch_wb.atp_debug('get_global_item_info ATP flag is '||

4658:
4659: END IF;
4660:
4661: IF PG_DEBUG in ('Y', 'C') THEN
4662: msc_sch_wb.atp_debug('get_global_item_info ATP flag is '||
4663: MSC_ATP_PVT.G_ITEM_INFO_REC.atp_flag);
4664: END IF;
4665:
4666: END get_global_item_info;

Line 4680: msc_sch_wb.atp_debug('In get_global_plan_info core');

4676: p_plan_info_rec MSC_ATP_PVT.plan_info_rec;
4677:
4678: BEGIN
4679: IF PG_DEBUG in ('Y', 'C') THEN
4680: msc_sch_wb.atp_debug('In get_global_plan_info core');
4681: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4682: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4684: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);

Line 4681: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);

4677:
4678: BEGIN
4679: IF PG_DEBUG in ('Y', 'C') THEN
4680: msc_sch_wb.atp_debug('In get_global_plan_info core');
4681: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4682: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4684: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4685: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);

Line 4682: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);

4678: BEGIN
4679: IF PG_DEBUG in ('Y', 'C') THEN
4680: msc_sch_wb.atp_debug('In get_global_plan_info core');
4681: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4682: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4684: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4685: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4686: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);

Line 4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);

4679: IF PG_DEBUG in ('Y', 'C') THEN
4680: msc_sch_wb.atp_debug('In get_global_plan_info core');
4681: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4682: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4684: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4685: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4686: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4687: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);

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

4680: msc_sch_wb.atp_debug('In get_global_plan_info core');
4681: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4682: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4684: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4685: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4686: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4687: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
4688: END IF;

Line 4685: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);

4681: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4682: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4684: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4685: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4686: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4687: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
4688: END IF;
4689:

Line 4686: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);

4682: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4684: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4685: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4686: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4687: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
4688: END IF;
4689:
4690: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id IS NULL) OR

Line 4687: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);

4683: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4684: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4685: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4686: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4687: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
4688: END IF;
4689:
4690: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id IS NULL) OR
4691: (MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id <> p_instance_id) OR

Line 4708: msc_sch_wb.atp_debug('get_global_plan_info Plan name is '||

4704:
4705: END IF;
4706:
4707: IF PG_DEBUG in ('Y', 'C') THEN
4708: msc_sch_wb.atp_debug('get_global_plan_info Plan name is '||
4709: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_name);
4710: msc_sch_wb.atp_debug('get_global_plan_info Argument Organization ID is '||
4711: p_organization_id);
4712: msc_sch_wb.atp_debug('get_global_plan_info Plan owning organization is '||

Line 4710: msc_sch_wb.atp_debug('get_global_plan_info Argument Organization ID is '||

4706:
4707: IF PG_DEBUG in ('Y', 'C') THEN
4708: msc_sch_wb.atp_debug('get_global_plan_info Plan name is '||
4709: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_name);
4710: msc_sch_wb.atp_debug('get_global_plan_info Argument Organization ID is '||
4711: p_organization_id);
4712: msc_sch_wb.atp_debug('get_global_plan_info Plan owning organization is '||
4713: MSC_ATP_PVT.G_PLAN_INFO_REC.organization_id);
4714: END IF;

Line 4712: msc_sch_wb.atp_debug('get_global_plan_info Plan owning organization is '||

4708: msc_sch_wb.atp_debug('get_global_plan_info Plan name is '||
4709: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_name);
4710: msc_sch_wb.atp_debug('get_global_plan_info Argument Organization ID is '||
4711: p_organization_id);
4712: msc_sch_wb.atp_debug('get_global_plan_info Plan owning organization is '||
4713: MSC_ATP_PVT.G_PLAN_INFO_REC.organization_id);
4714: END IF;
4715:
4716: END get_global_plan_info;

Line 4737: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');

4733: BEGIN
4734:
4735: -- Bug 3036513 Print out the parameter values passed in to the procedure.
4736: IF PG_DEBUG in ('Y', 'C') THEN
4737: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');
4738: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);
4739: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4740: 'sr_inventory_item_id = '||p_inventory_item_id);
4741: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||

Line 4738: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);

4734:
4735: -- Bug 3036513 Print out the parameter values passed in to the procedure.
4736: IF PG_DEBUG in ('Y', 'C') THEN
4737: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');
4738: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);
4739: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4740: 'sr_inventory_item_id = '||p_inventory_item_id);
4741: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4742: 'organization_id = '||p_organization_id);

Line 4739: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||

4735: -- Bug 3036513 Print out the parameter values passed in to the procedure.
4736: IF PG_DEBUG in ('Y', 'C') THEN
4737: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');
4738: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);
4739: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4740: 'sr_inventory_item_id = '||p_inventory_item_id);
4741: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4742: 'organization_id = '||p_organization_id);
4743: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);

Line 4741: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||

4737: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');
4738: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);
4739: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4740: 'sr_inventory_item_id = '||p_inventory_item_id);
4741: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4742: 'organization_id = '||p_organization_id);
4743: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);
4744: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);
4745: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);

Line 4743: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);

4739: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4740: 'sr_inventory_item_id = '||p_inventory_item_id);
4741: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4742: 'organization_id = '||p_organization_id);
4743: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);
4744: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);
4745: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);
4746: END IF;
4747: -- End Bug 3036513.

Line 4744: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);

4740: 'sr_inventory_item_id = '||p_inventory_item_id);
4741: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4742: 'organization_id = '||p_organization_id);
4743: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);
4744: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);
4745: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);
4746: END IF;
4747: -- End Bug 3036513.
4748:

Line 4745: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);

4741: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4742: 'organization_id = '||p_organization_id);
4743: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);
4744: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);
4745: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);
4746: END IF;
4747: -- End Bug 3036513.
4748:
4749: -- Bug 1566260, in case of modle or option class for PDS ATP, return null.

Line 4756: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'selecting item type for PDS');

4752: -- demand entries could be stored for planning purposes.
4753: /* s_CTO rearch : we start honoring infinite time fence on model
4754: IF p_plan_id <> -1 THEN
4755: IF PG_DEBUG in ('Y', 'C') THEN
4756: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'selecting item type for PDS');
4757: END IF;
4758: SELECT i.bom_item_type
4759: INTO l_item_type
4760: FROM msc_system_items i

Line 4769: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'PDS item type is model(1) or option class(2) : '||l_item_type);

4765: END IF;
4766:
4767: IF nvl(l_item_type, -1) IN (1,2) THEN
4768: IF PG_DEBUG in ('Y', 'C') THEN
4769: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'PDS item type is model(1) or option class(2) : '||l_item_type);
4770: END IF;
4771: l_infinite_time_fence_date := null;
4772: ELSE
4773:

Line 4780: msc_sch_wb.atp_debug('get_infinite_time_fence_date: Profile value for Infinite Supply Pad');

4776: -- Bug 2877340, 2746213
4777: -- Read the Profile option to pad the user defined days
4778: -- to infinite Supply fence.
4779: IF PG_DEBUG in ('Y', 'C') THEN
4780: msc_sch_wb.atp_debug('get_infinite_time_fence_date: Profile value for Infinite Supply Pad');
4781: msc_sch_wb.atp_debug('get_infinite_time_fence_date: MSC_ATP_PVT.G_INF_SUP_TF_PAD ' || MSC_ATP_PVT.G_INF_SUP_TF_PAD);
4782: END IF;
4783: -- Bug 3036513 If resource_id is NULL get the infinite_time_fence_date
4784: -- for just the item.

Line 4781: msc_sch_wb.atp_debug('get_infinite_time_fence_date: MSC_ATP_PVT.G_INF_SUP_TF_PAD ' || MSC_ATP_PVT.G_INF_SUP_TF_PAD);

4777: -- Read the Profile option to pad the user defined days
4778: -- to infinite Supply fence.
4779: IF PG_DEBUG in ('Y', 'C') THEN
4780: msc_sch_wb.atp_debug('get_infinite_time_fence_date: Profile value for Infinite Supply Pad');
4781: msc_sch_wb.atp_debug('get_infinite_time_fence_date: MSC_ATP_PVT.G_INF_SUP_TF_PAD ' || MSC_ATP_PVT.G_INF_SUP_TF_PAD);
4782: END IF;
4783: -- Bug 3036513 If resource_id is NULL get the infinite_time_fence_date
4784: -- for just the item.
4785: IF (p_resource_id IS NULL) THEN

Line 4864: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'l_infinite_time_fence_date'||l_infinite_time_fence_date);

4860: --s_cto_rearch
4861: --END IF;
4862:
4863: IF PG_DEBUG in ('Y', 'C') THEN
4864: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'l_infinite_time_fence_date'||l_infinite_time_fence_date);
4865: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'ATP Rule := ' || x_atp_rule_name);
4866: END IF;
4867: x_infinite_time_fence_date := l_infinite_time_fence_date;
4868:

Line 4865: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'ATP Rule := ' || x_atp_rule_name);

4861: --END IF;
4862:
4863: IF PG_DEBUG in ('Y', 'C') THEN
4864: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'l_infinite_time_fence_date'||l_infinite_time_fence_date);
4865: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'ATP Rule := ' || x_atp_rule_name);
4866: END IF;
4867: x_infinite_time_fence_date := l_infinite_time_fence_date;
4868:
4869: EXCEPTION

Line 4891: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'l_infinite_time_fence_date'||l_infinite_time_fence_date);

4887: FROM msc_plans
4888: WHERE plan_id = p_plan_id;
4889:
4890: IF PG_DEBUG in ('Y', 'C') THEN
4891: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'l_infinite_time_fence_date'||l_infinite_time_fence_date);
4892: END IF;
4893: x_infinite_time_fence_date := l_infinite_time_fence_date;
4894: END IF;
4895:

Line 4978: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');

4974:
4975: BEGIN
4976:
4977: IF PG_DEBUG in ('Y', 'C') THEN
4978: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4979: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4980: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );

Line 4979: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );

4975: BEGIN
4976:
4977: IF PG_DEBUG in ('Y', 'C') THEN
4978: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4979: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4980: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );

Line 4980: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);

4976:
4977: IF PG_DEBUG in ('Y', 'C') THEN
4978: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4979: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4980: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4984: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );

Line 4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );

4977: IF PG_DEBUG in ('Y', 'C') THEN
4978: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4979: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4980: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4984: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4985: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);

Line 4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );

4978: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4979: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4980: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4984: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4985: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4986: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);

Line 4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );

4979: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4980: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4984: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4985: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4986: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);
4987: END IF;

Line 4984: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );

4980: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4984: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4985: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4986: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);
4987: END IF;
4988: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 4985: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);

4981: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4984: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4985: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4986: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);
4987: END IF;
4988: x_return_status := FND_API.G_RET_STS_SUCCESS;
4989:

Line 4986: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);

4982: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4983: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4984: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4985: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4986: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);
4987: END IF;
4988: x_return_status := FND_API.G_RET_STS_SUCCESS;
4989:
4990: -- Call Get Regions to pipulate Region level data

Line 5053: msc_sch_wb.atp_debug ('Cannot map data to locations ');

5049:
5050: if (l_from_location_id is NULL) then
5051: x_return_status := FND_API.G_RET_STS_ERROR;
5052: IF PG_DEBUG in ('Y', 'C') THEN
5053: msc_sch_wb.atp_debug ('Cannot map data to locations ');
5054: END IF;
5055: return;
5056: end if;
5057:

Line 5081: msc_sch_wb.atp_debug ('Data already present');

5077: );
5078: EXCEPTION
5079: when DUP_VAL_ON_INDEX then
5080: IF PG_DEBUG in ('Y', 'C') THEN
5081: msc_sch_wb.atp_debug ('Data already present');
5082: END IF;
5083: END;
5084:
5085: if (sql%rowcount = 0) then

Line 5087: msc_sch_wb.atp_debug ('Shifting to Regions and Zones data');

5083: END;
5084:
5085: if (sql%rowcount = 0) then
5086: IF PG_DEBUG in ('Y', 'C') THEN
5087: msc_sch_wb.atp_debug ('Shifting to Regions and Zones data');
5088: END IF;
5089:
5090: l_lead_time_arr := l_lead_time_arr_null;
5091: l_ship_method_arr := l_ship_method_arr_null;

Line 5119: msc_sch_wb.atp_debug ('Method : ' || l_ship_method_tmp || ' - Time : ' || l_intransit_time_tmp);

5115: l_lead_time_arr(l_counter) := l_intransit_time_tmp;
5116: l_ship_method_arr(l_counter) := l_ship_method_tmp;
5117:
5118: IF PG_DEBUG in ('Y', 'C') THEN
5119: msc_sch_wb.atp_debug ('Method : ' || l_ship_method_tmp || ' - Time : ' || l_intransit_time_tmp);
5120: END IF;
5121: end if;
5122:
5123: END LOOP;

Line 5129: msc_sch_wb.atp_debug ('No data from regions table');

5125: CLOSE c_lead_time_dest;
5126:
5127: if (l_counter = 0) then
5128: IF PG_DEBUG in ('Y', 'C') THEN
5129: msc_sch_wb.atp_debug ('No data from regions table');
5130: END IF;
5131: else
5132: BEGIN
5133: forall l_counter2 in 1..l_counter

Line 5148: msc_sch_wb.atp_debug ('Unable to insert data');

5144: );
5145: EXCEPTION
5146: when others then
5147: IF PG_DEBUG in ('Y', 'C') THEN
5148: msc_sch_wb.atp_debug ('Unable to insert data');
5149: END IF;
5150: END;
5151: end if; -- l_counter = 0
5152: end if;

Line 5163: msc_sch_wb.atp_debug ('To Organization Specified ');

5159: -- Bug 3515520, don't use org in case customer/site is populated.
5160: -- Org - Org Intransit Lead Time
5161: BEGIN
5162: IF PG_DEBUG in ('Y', 'C') THEN
5163: msc_sch_wb.atp_debug ('To Organization Specified ');
5164: END IF;
5165: insert into mrp_atp_schedule_temp
5166: (session_id, inventory_item_id, scenario_id, delivery_lead_time, ship_method, status_flag)
5167: (

Line 5179: msc_sch_wb.atp_debug ('Records inserted into table : ' || sql%rowcount);

5175: where from_organization_id = p_from_organization_id
5176: and to_organization_id = p_to_organization_id
5177: );
5178: IF PG_DEBUG in ('Y', 'C') THEN
5179: msc_sch_wb.atp_debug ('Records inserted into table : ' || sql%rowcount);
5180: END IF;
5181: EXCEPTION
5182: when OTHERS then
5183: null;

Line 5192: msc_sch_wb.atp_debug ('Customer ID specified ');

5188: -- Bug 3515520, verify that customer site is populated.
5189: -- Org to Customer intransit Lead Time Calculation
5190:
5191: IF PG_DEBUG in ('Y', 'C') THEN
5192: msc_sch_wb.atp_debug ('Customer ID specified ');
5193: END IF;
5194: -- First get the location corresponding to the customer
5195: BEGIN
5196: l_from_location_id := MSC_SATP_FUNC.src_location_id (p_from_organization_id,

Line 5205: msc_sch_wb.atp_debug ('Unable to map organization of customer to location');

5201: p_to_customer_site_id);
5202: EXCEPTION
5203: when NO_DATA_FOUND then
5204: IF PG_DEBUG in ('Y', 'C') THEN
5205: msc_sch_wb.atp_debug ('Unable to map organization of customer to location');
5206: END IF;
5207: END;
5208:
5209: if (l_from_location_id is NULL) then

Line 5211: msc_sch_wb.atp_debug ('From location is NULL');

5207: END;
5208:
5209: if (l_from_location_id is NULL) then
5210: IF PG_DEBUG in ('Y', 'C') THEN
5211: msc_sch_wb.atp_debug ('From location is NULL');
5212: END IF;
5213: x_return_status := FND_API.G_RET_STS_ERROR;
5214: return;
5215: end if;

Line 5218: msc_sch_wb.atp_debug ('From Location ID : ' || l_from_location_id);

5214: return;
5215: end if;
5216:
5217: IF PG_DEBUG in ('Y', 'C') THEN
5218: msc_sch_wb.atp_debug ('From Location ID : ' || l_from_location_id);
5219: msc_sch_wb.atp_debug ('To Location ID : ' || l_to_location_id );
5220: END IF;
5221:
5222: BEGIN

Line 5219: msc_sch_wb.atp_debug ('To Location ID : ' || l_to_location_id );

5215: end if;
5216:
5217: IF PG_DEBUG in ('Y', 'C') THEN
5218: msc_sch_wb.atp_debug ('From Location ID : ' || l_from_location_id);
5219: msc_sch_wb.atp_debug ('To Location ID : ' || l_to_location_id );
5220: END IF;
5221:
5222: BEGIN
5223: insert into mrp_atp_schedule_temp

Line 5239: msc_sch_wb.atp_debug ('Data already present');

5235: );
5236: EXCEPTION
5237: when DUP_VAL_ON_INDEX then
5238: IF PG_DEBUG in ('Y', 'C') THEN
5239: msc_sch_wb.atp_debug ('Data already present');
5240: END IF;
5241:
5242: when NO_DATA_FOUND then
5243: null;

Line 5248: msc_sch_wb.atp_debug ('Shifting to Regions and Zones data');

5244: END;
5245:
5246: if (sql%rowcount = 0) then
5247: IF PG_DEBUG in ('Y', 'C') THEN
5248: msc_sch_wb.atp_debug ('Shifting to Regions and Zones data');
5249: END IF;
5250:
5251: l_level_orig := NULL;
5252: l_lead_time_arr := l_lead_time_arr_null;

Line 5278: msc_sch_wb.atp_debug ('Method : ' || l_ship_method_tmp || ' - Time : ' || l_intransit_time_tmp);

5274: l_lead_time_arr(l_counter) := l_intransit_time_tmp;
5275: l_ship_method_arr(l_counter) := l_ship_method_tmp;
5276:
5277: IF PG_DEBUG in ('Y', 'C') THEN
5278: msc_sch_wb.atp_debug ('Method : ' || l_ship_method_tmp || ' - Time : ' || l_intransit_time_tmp);
5279: END IF;
5280:
5281: end if;
5282: END LOOP;

Line 5288: msc_sch_wb.atp_debug ('No data from regions table');

5284: CLOSE c_lead_time;
5285:
5286: if (l_counter = 0) then
5287: IF PG_DEBUG in ('Y', 'C') THEN
5288: msc_sch_wb.atp_debug ('No data from regions table');
5289: END IF;
5290: else
5291: BEGIN
5292: forall l_counter2 in 1..l_counter

Line 5307: msc_sch_wb.atp_debug ('Unable to insert data');

5303: );
5304: EXCEPTION
5305: when others then
5306: IF PG_DEBUG in ('Y', 'C') THEN
5307: msc_sch_wb.atp_debug ('Unable to insert data');
5308: END IF;
5309: END;
5310: end if; -- l_counter = 0
5311: end if; --sql rowcount = 0

Line 5320: msc_sch_wb.atp_debug (sql%rowcount || ' rows deleted from regions temp table.');

5316: DELETE MSC_REGIONS_TEMP
5317: where session_id = p_session_id;
5318:
5319: IF PG_DEBUG in ('Y', 'C') THEN
5320: msc_sch_wb.atp_debug (sql%rowcount || ' rows deleted from regions temp table.');
5321: END IF;
5322:
5323: COMMIT;
5324:

Line 5357: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');

5353: BEGIN
5354: -- We will return an error if shipping gives us something
5355: -- that doesn't meet our assumptions
5356: IF PG_DEBUG in ('Y','C') then
5357: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5358: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5359: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5360: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5361: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);

Line 5358: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);

5354: -- We will return an error if shipping gives us something
5355: -- that doesn't meet our assumptions
5356: IF PG_DEBUG in ('Y','C') then
5357: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5358: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5359: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5360: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5361: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);
5362: end if;

Line 5359: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);

5355: -- that doesn't meet our assumptions
5356: IF PG_DEBUG in ('Y','C') then
5357: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5358: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5359: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5360: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5361: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);
5362: end if;
5363:

Line 5360: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );

5356: IF PG_DEBUG in ('Y','C') then
5357: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5358: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5359: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5360: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5361: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);
5362: end if;
5363:
5364: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 5361: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);

5357: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5358: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5359: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5360: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5361: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);
5362: end if;
5363:
5364: x_return_status := FND_API.G_RET_STS_SUCCESS;
5365:

Line 5379: msc_sch_wb.atp_debug ('Cannot map customer site ID to location ID');

5375: EXCEPTION
5376: WHEN NO_DATA_FOUND THEN
5377:
5378: IF PG_DEBUG in ('Y','C') then
5379: msc_sch_wb.atp_debug ('Cannot map customer site ID to location ID');
5380: end if;
5381: END;
5382:
5383: IF PG_DEBUG in ('Y','C') then

Line 5384: msc_sch_wb.atp_debug ('Location ID : ' || l_to_location_id);

5380: end if;
5381: END;
5382:
5383: IF PG_DEBUG in ('Y','C') then
5384: msc_sch_wb.atp_debug ('Location ID : ' || l_to_location_id);
5385: end if;
5386:
5387: MSC_SATP_FUNC.Get_Regions_Shipping(
5388: p_to_customer_site_id, -- customer_site_id

Line 5412: msc_sch_wb.atp_debug ('Returning ....');

5408: WHERE session_id = p_session_id
5409: AND partner_site_id = p_to_customer_site_id;
5410:
5411: if (PG_DEBUG in ('Y','C')) then
5412: msc_sch_wb.atp_debug ('Returning ....');
5413: msc_sch_wb.atp_debug (' Ship Method : ' || x_ship_method);
5414: msc_sch_wb.atp_debug (' Lead Time : ' || x_intransit_time);
5415: end if;
5416:

Line 5413: msc_sch_wb.atp_debug (' Ship Method : ' || x_ship_method);

5409: AND partner_site_id = p_to_customer_site_id;
5410:
5411: if (PG_DEBUG in ('Y','C')) then
5412: msc_sch_wb.atp_debug ('Returning ....');
5413: msc_sch_wb.atp_debug (' Ship Method : ' || x_ship_method);
5414: msc_sch_wb.atp_debug (' Lead Time : ' || x_intransit_time);
5415: end if;
5416:
5417: IF x_intransit_time < 0 THEN

Line 5414: msc_sch_wb.atp_debug (' Lead Time : ' || x_intransit_time);

5410:
5411: if (PG_DEBUG in ('Y','C')) then
5412: msc_sch_wb.atp_debug ('Returning ....');
5413: msc_sch_wb.atp_debug (' Ship Method : ' || x_ship_method);
5414: msc_sch_wb.atp_debug (' Lead Time : ' || x_intransit_time);
5415: end if;
5416:
5417: IF x_intransit_time < 0 THEN
5418: x_return_status := FND_API.G_RET_STS_ERROR;

Line 5464: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');

5460: p_ship_set_item_count is not null, p_inventory_item_id is null.
5461: */
5462: IF PG_DEBUG in ('Y', 'C') THEN
5463:
5464: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5465: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5466: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5467: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5468: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);

Line 5465: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);

5461: */
5462: IF PG_DEBUG in ('Y', 'C') THEN
5463:
5464: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5465: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5466: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5467: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5468: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5469: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);

Line 5466: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);

5462: IF PG_DEBUG in ('Y', 'C') THEN
5463:
5464: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5465: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5466: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5467: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5468: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5469: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);
5470: END IF;

Line 5467: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);

5463:
5464: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5465: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5466: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5467: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5468: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5469: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);
5470: END IF;
5471:

Line 5468: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);

5464: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5465: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5466: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5467: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5468: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5469: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);
5470: END IF;
5471:
5472: -- Initialize return status and sysdate.

Line 5469: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);

5465: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5466: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5467: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5468: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5469: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);
5470: END IF;
5471:
5472: -- Initialize return status and sysdate.
5473: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 5510: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Checking assignment set id indicates no sources can be found.');

5506: ORDER BY Level_id;
5507:
5508: IF (l_dist_level_type.COUNT = 0) THEN
5509: IF PG_DEBUG in ('Y', 'C') THEN
5510: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Checking assignment set id indicates no sources can be found.');
5511: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'So, not searching in any level. Returning from here itself');
5512: END IF;
5513: x_return_status := FND_API.G_RET_STS_ERROR;
5514: return;

Line 5511: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'So, not searching in any level. Returning from here itself');

5507:
5508: IF (l_dist_level_type.COUNT = 0) THEN
5509: IF PG_DEBUG in ('Y', 'C') THEN
5510: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Checking assignment set id indicates no sources can be found.');
5511: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'So, not searching in any level. Returning from here itself');
5512: END IF;
5513: x_return_status := FND_API.G_RET_STS_ERROR;
5514: return;
5515: ELSE

Line 5518: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level: ' || l_dist_level_type(l_counter));

5514: return;
5515: ELSE
5516: IF PG_DEBUG in ('Y', 'C') THEN
5517: FOR l_counter in 1..l_dist_level_type.COUNT LOOP
5518: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level: ' || l_dist_level_type(l_counter));
5519: END LOOP;
5520: END IF;
5521: END IF;
5522:

Line 5528: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for a single line item sources');

5524: -- case1
5525: IF (p_ship_set_item_count IS NULL) THEN
5526:
5527: IF PG_DEBUG in ('Y', 'C') THEN
5528: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for a single line item sources');
5529: END IF;
5530:
5531:
5532: FOR l_counter IN l_dist_level_type.FIRST..l_dist_level_type.LAST LOOP

Line 5538: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 1 (item-org)');

5534: IF (l_dist_level_type(l_counter) = 1) THEN
5535:
5536: -- LEVEL 1, ASSIGNMENT TYPE 6: ITEM-ORG
5537: IF PG_DEBUG in ('Y', 'C') THEN
5538: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 1 (item-org)');
5539: END IF;
5540:
5541: SELECT
5542: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 5600: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 1. Search over.');

5596:
5597: -- Stopping check
5598: IF (x_atp_sources.Rank.COUNT > 0) THEN
5599: IF PG_DEBUG in ('Y', 'C') THEN
5600: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 1. Search over.');
5601: END IF;
5602: return;
5603: ELSE
5604: IF l_counter = l_dist_level_type.LAST THEN

Line 5606: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

5602: return;
5603: ELSE
5604: IF l_counter = l_dist_level_type.LAST THEN
5605: IF PG_DEBUG in ('Y', 'C') THEN
5606: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
5607: END IF;
5608: x_return_status := FND_API.G_RET_STS_ERROR;
5609: return;
5610: ELSE

Line 5612: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 1. Continuing search..');

5608: x_return_status := FND_API.G_RET_STS_ERROR;
5609: return;
5610: ELSE
5611: IF PG_DEBUG in ('Y', 'C') THEN
5612: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 1. Continuing search..');
5613: END IF;
5614: END IF;
5615: END IF;
5616:

Line 5621: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 2 (item-reg)');

5617: ELSIF (l_dist_level_type(l_counter) = 2) THEN
5618:
5619: -- LEVEL 2, ASSIGNMENT TYPE 9: ITEM-REGION
5620: IF PG_DEBUG in ('Y', 'C') THEN
5621: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 2 (item-reg)');
5622: END IF;
5623:
5624: -- Search for sources for which following expression is minimum
5625: SELECT NVL(MIN(2000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 10) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)

Line 5662: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 2.');

5658:
5659: IF (l_min_region_value <> 0) THEN
5660: -- Sources found.
5661: IF PG_DEBUG in ('Y', 'C') THEN
5662: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 2.');
5663: END IF;
5664: -- Collect the found sources and return
5665: SELECT
5666: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 5729: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

5725: ELSE
5726: -- Stopping check.
5727: IF l_counter = l_dist_level_type.LAST THEN
5728: IF PG_DEBUG in ('Y', 'C') THEN
5729: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
5730: END IF;
5731: x_return_status := FND_API.G_RET_STS_ERROR;
5732: return;
5733: ELSE

Line 5735: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 2. Continuing search..');

5731: x_return_status := FND_API.G_RET_STS_ERROR;
5732: return;
5733: ELSE
5734: IF PG_DEBUG in ('Y', 'C') THEN
5735: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 2. Continuing search..');
5736: END IF;
5737: END IF;
5738: END IF;
5739:

Line 5745: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 3 (cat-org)');

5741: ELSIF (l_dist_level_type(l_counter) = 3) THEN
5742:
5743: -- LEVEL3, ASSIGNMENT_TYPE 5: CATEGORY-ORG
5744: IF PG_DEBUG in ('Y', 'C') THEN
5745: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 3 (cat-org)');
5746: END IF;
5747:
5748: SELECT
5749: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 5807: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 3. Search over.');

5803:
5804: --Stopping check
5805: IF (x_atp_sources.Rank.COUNT > 0) THEN
5806: IF PG_DEBUG in ('Y', 'C') THEN
5807: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 3. Search over.');
5808: END IF;
5809: return;
5810: ELSE
5811: IF l_counter = l_dist_level_type.LAST THEN

Line 5813: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

5809: return;
5810: ELSE
5811: IF l_counter = l_dist_level_type.LAST THEN
5812: IF PG_DEBUG in ('Y', 'C') THEN
5813: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
5814: END IF;
5815: x_return_status := FND_API.G_RET_STS_ERROR;
5816: return;
5817: ELSE

Line 5819: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 3. Continuing search..');

5815: x_return_status := FND_API.G_RET_STS_ERROR;
5816: return;
5817: ELSE
5818: IF PG_DEBUG in ('Y', 'C') THEN
5819: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 3. Continuing search..');
5820: END IF;
5821: END IF;
5822: END IF;
5823:

Line 5828: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 4 (item)');

5824: ELSIF (l_dist_level_type(l_counter) = 4) THEN
5825:
5826: -- LEVEL4, ASSIGNMENT TYPE3: ITEM
5827: IF PG_DEBUG in ('Y', 'C') THEN
5828: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 4 (item)');
5829: END IF;
5830: -- Bug 2931266. No need for customer_site_id join at this level
5831: SELECT
5832: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 5890: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 4. Search over.');

5886:
5887: -- Check for stopping
5888: IF (x_atp_sources.Rank.COUNT > 0) THEN
5889: IF PG_DEBUG in ('Y', 'C') THEN
5890: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 4. Search over.');
5891: END IF;
5892: return;
5893: ELSE
5894: IF l_counter = l_dist_level_type.LAST THEN

Line 5896: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

5892: return;
5893: ELSE
5894: IF l_counter = l_dist_level_type.LAST THEN
5895: IF PG_DEBUG in ('Y', 'C') THEN
5896: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
5897: END IF;
5898: x_return_status := FND_API.G_RET_STS_ERROR;
5899: return;
5900: ELSE

Line 5902: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 4. Continuing search..');

5898: x_return_status := FND_API.G_RET_STS_ERROR;
5899: return;
5900: ELSE
5901: IF PG_DEBUG in ('Y', 'C') THEN
5902: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 4. Continuing search..');
5903: END IF;
5904: END IF;
5905: END IF;
5906:

Line 5911: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 5 (cat-reg)');

5907: ELSIF (l_dist_level_type(l_counter) = 5) THEN
5908:
5909: -- LEVEL 5, ASSIGNMENT TYPE 8: CATEGORY-REGION
5910: IF PG_DEBUG in ('Y', 'C') THEN
5911: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 5 (cat-reg)');
5912: END IF;
5913: -- Searching sources for min value of expression.
5914: SELECT NVL(MIN(5000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 10) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)
5915: INTO l_min_region_value

Line 5951: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 5.');

5947:
5948: IF (l_min_region_value <> 0) THEN
5949: -- Sources found
5950: IF PG_DEBUG in ('Y', 'C') THEN
5951: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 5.');
5952: END IF;
5953: -- Collect the found sources and return.
5954: SELECT
5955: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 6018: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

6014: ELSE
6015: -- Sources not found. Check for stopping
6016: IF l_counter = l_dist_level_type.LAST THEN
6017: IF PG_DEBUG in ('Y', 'C') THEN
6018: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6019: END IF;
6020: x_return_status := FND_API.G_RET_STS_ERROR;
6021: return;
6022: ELSE

Line 6024: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 5. Continuing search..');

6020: x_return_status := FND_API.G_RET_STS_ERROR;
6021: return;
6022: ELSE
6023: IF PG_DEBUG in ('Y', 'C') THEN
6024: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 5. Continuing search..');
6025: END IF;
6026: END IF;
6027: END IF;
6028:

Line 6034: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');

6030: ELSIF (l_dist_level_type(l_counter) = 6) THEN
6031:
6032: -- LEVEL 6, ASSIGNMENT TYPE 2: CATEGORY
6033: IF PG_DEBUG in ('Y', 'C') THEN
6034: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');
6035: END IF;
6036: -- Bug 2931266. No need for customer_site_id join at this level
6037: SELECT
6038: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 6096: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 6. Search over.');

6092:
6093: -- Stopping check
6094: IF (x_atp_sources.Rank.COUNT > 0) THEN
6095: IF PG_DEBUG in ('Y', 'C') THEN
6096: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 6. Search over.');
6097: END IF;
6098: return;
6099: ELSE
6100: IF l_counter = l_dist_level_type.LAST THEN

Line 6102: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

6098: return;
6099: ELSE
6100: IF l_counter = l_dist_level_type.LAST THEN
6101: IF PG_DEBUG in ('Y', 'C') THEN
6102: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6103: END IF;
6104: x_return_status := FND_API.G_RET_STS_ERROR;
6105: return;
6106: ELSE

Line 6108: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 6. Continuing search..');

6104: x_return_status := FND_API.G_RET_STS_ERROR;
6105: return;
6106: ELSE
6107: IF PG_DEBUG in ('Y', 'C') THEN
6108: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 6. Continuing search..');
6109: END IF;
6110: END IF;
6111: END IF;
6112:

Line 6117: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');

6113: ELSIF (l_dist_level_type(l_counter) = 7) THEN
6114:
6115: -- LEVEL 7, ASSIGNMENT_TYPE 4: ORG
6116: IF PG_DEBUG in ('Y', 'C') THEN
6117: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');
6118: END IF;
6119:
6120: SELECT
6121: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 6178: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 7. Search over.');

6174:
6175: -- Stopping Check
6176: IF (x_atp_sources.Rank.COUNT > 0) THEN
6177: IF PG_DEBUG in ('Y', 'C') THEN
6178: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 7. Search over.');
6179: END IF;
6180: return;
6181: ELSE
6182: IF l_counter = l_dist_level_type.LAST THEN

Line 6184: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

6180: return;
6181: ELSE
6182: IF l_counter = l_dist_level_type.LAST THEN
6183: IF PG_DEBUG in ('Y', 'C') THEN
6184: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6185: END IF;
6186: x_return_status := FND_API.G_RET_STS_ERROR;
6187: return;
6188: ELSE

Line 6190: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 7. Continuing search..');

6186: x_return_status := FND_API.G_RET_STS_ERROR;
6187: return;
6188: ELSE
6189: IF PG_DEBUG in ('Y', 'C') THEN
6190: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 7. Continuing search..');
6191: END IF;
6192: END IF;
6193: END IF;
6194:

Line 6199: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 8 (reg)');

6195: ELSIF (l_dist_level_type(l_counter) = 8) THEN
6196:
6197: -- LEVEL 8, ASSIGNMENT_TYPE 7: REGION
6198: IF PG_DEBUG in ('Y', 'C') THEN
6199: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 8 (reg)');
6200: END IF;
6201: -- Searching sources for min expression value
6202: SELECT NVL(MIN(8000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 100) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)
6203: INTO l_min_region_value

Line 6238: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 8.');

6234:
6235: IF (l_min_region_value <> 0) THEN
6236: -- Sources found
6237: IF PG_DEBUG in ('Y', 'C') THEN
6238: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 8.');
6239: END IF;
6240: -- Collect the sources and return.
6241: SELECT
6242: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 6304: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

6300: ELSE
6301: -- No sources found. Check for stopping
6302: IF l_counter = l_dist_level_type.LAST THEN
6303: IF PG_DEBUG in ('Y', 'C') THEN
6304: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6305: END IF;
6306: x_return_status := FND_API.G_RET_STS_ERROR;
6307: return;
6308: ELSE

Line 6310: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 8. Continuing search..');

6306: x_return_status := FND_API.G_RET_STS_ERROR;
6307: return;
6308: ELSE
6309: IF PG_DEBUG in ('Y', 'C') THEN
6310: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 8. Continuing search..');
6311: END IF;
6312: END IF;
6313: END IF;
6314:

Line 6320: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');

6316: ELSIF (l_dist_level_type(l_counter) = 9) THEN
6317:
6318: -- LEVEL 9, ASSIGNMENT_TYPE 1: GLOBAL
6319: IF PG_DEBUG in ('Y', 'C') THEN
6320: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');
6321: END IF;
6322: -- Bug 2931266. No need for customer_site_id join at this level
6323: SELECT
6324: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

Line 6383: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 9. Search over.');

6379:
6380: -- Stopping Check
6381: IF (x_atp_sources.Rank.COUNT > 0) THEN
6382: IF PG_DEBUG in ('Y', 'C') THEN
6383: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 9. Search over.');
6384: END IF;
6385: return;
6386: ELSE
6387: IF l_counter = l_dist_level_type.LAST THEN

Line 6389: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');

6385: return;
6386: ELSE
6387: IF l_counter = l_dist_level_type.LAST THEN
6388: IF PG_DEBUG in ('Y', 'C') THEN
6389: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6390: END IF;
6391: x_return_status := FND_API.G_RET_STS_ERROR;
6392: return;
6393: END IF;

Line 6404: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for ship set sources');

6400: ELSE -- of case1
6401: -- case2 begins
6402:
6403: IF PG_DEBUG in ('Y', 'C') THEN
6404: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for ship set sources');
6405: END IF;
6406:
6407: -- Delete the table MSC_ATP_SOURCES_TEMP
6408: DELETE MSC_ATP_SOURCES_TEMP;

Line 6416: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 1 (item-org)');

6412: IF (l_dist_level_type(l_counter) = 1) THEN
6413:
6414: -- LEVEL 1, ASSIGNMENT TYPE 6: ITEM-ORG
6415: IF PG_DEBUG in ('Y', 'C') THEN
6416: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 1 (item-org)');
6417: END IF;
6418:
6419: -- At first level, visited_flag in table msc_ship_set_temp is 0 for all rows.
6420: -- Therefore no need for clause 'AND msst.visisble_flag = 0'.

Line 6481: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 1');

6477: IF (l_inserted_rows > 0) THEN
6478:
6479: -- Found some sources for some items.
6480: IF PG_DEBUG in ('Y', 'C') THEN
6481: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 1');
6482: END IF;
6483:
6484:
6485: -- Mark all the items for which sources are/have been found.

Line 6531: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 1');

6527:
6528: IF (x_atp_sources.Rank.COUNT > 0) THEN
6529: -- Common sources found
6530: IF PG_DEBUG in ('Y', 'C') THEN
6531: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 1');
6532: END IF;
6533: return;
6534: ELSE
6535: -- No common sources found

Line 6537: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

6533: return;
6534: ELSE
6535: -- No common sources found
6536: IF PG_DEBUG in ('Y', 'C') THEN
6537: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
6538: END IF;
6539: x_return_status := FND_API.G_RET_STS_ERROR;
6540: return;
6541: END IF; -- common sources

Line 6549: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

6545:
6546: -- Check the stopping condition.
6547: IF l_counter = l_dist_level_type.LAST THEN
6548: IF PG_DEBUG in ('Y', 'C') THEN
6549: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
6550: END IF;
6551: x_return_status := FND_API.G_RET_STS_ERROR;
6552: return;
6553: ELSE

Line 6555: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

6551: x_return_status := FND_API.G_RET_STS_ERROR;
6552: return;
6553: ELSE
6554: IF PG_DEBUG in ('Y', 'C') THEN
6555: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
6556: END IF;
6557: END IF;
6558:
6559:

Line 6564: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 2 (item-reg)');

6560: ELSIF (l_dist_level_type(l_counter) = 2) THEN
6561:
6562: -- LEVEL 2, ASSIGNMENT TYPE 9: ITEM-REGION
6563: IF PG_DEBUG in ('Y', 'C') THEN
6564: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 2 (item-reg)');
6565: END IF;
6566:
6567: -- Find sources for min value of expression.
6568: SELECT

Line 6615: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');

6611:
6612: -- Step1: All the items for which sources are found,
6613: -- update column min_region_value and visited_flag in msc_ship_set_temp.
6614: IF PG_DEBUG in ('Y', 'C') THEN
6615: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
6616: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
6617: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
6618: || ' min region value: ' || l_min_region_value_arr(i));
6619: END LOOP;

Line 6617: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)

6613: -- update column min_region_value and visited_flag in msc_ship_set_temp.
6614: IF PG_DEBUG in ('Y', 'C') THEN
6615: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
6616: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
6617: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
6618: || ' min region value: ' || l_min_region_value_arr(i));
6619: END LOOP;
6620: END IF;
6621:

Line 6735: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 2. Search over.');

6731: ORDER BY 5; -- Rank; order by cum rank instead of group by rank
6732:
6733: IF (x_atp_sources.Rank.COUNT > 0) THEN
6734: IF PG_DEBUG in ('Y', 'C') THEN
6735: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 2. Search over.');
6736: END IF;
6737: return;
6738: ELSE
6739: IF PG_DEBUG in ('Y', 'C') THEN

Line 6740: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');

6736: END IF;
6737: return;
6738: ELSE
6739: IF PG_DEBUG in ('Y', 'C') THEN
6740: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');
6741: END IF;
6742: x_return_status := FND_API.G_RET_STS_ERROR;
6743: return;
6744: END IF;

Line 6753: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

6749:
6750: -- Check the stopping condition.
6751: IF l_counter = l_dist_level_type.LAST THEN
6752: IF PG_DEBUG in ('Y', 'C') THEN
6753: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
6754: END IF;
6755: x_return_status := FND_API.G_RET_STS_ERROR;
6756: return;
6757: ELSE

Line 6759: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

6755: x_return_status := FND_API.G_RET_STS_ERROR;
6756: return;
6757: ELSE
6758: IF PG_DEBUG in ('Y', 'C') THEN
6759: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
6760: END IF;
6761: END IF;
6762:
6763: ELSIF (l_dist_level_type(l_counter) = 3) THEN

Line 6768: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 3 (cat-org)');

6764:
6765: -- LEVEL3, ASSIGNMENT_TYPE 5: CATEGORY-ORG
6766:
6767: IF PG_DEBUG in ('Y', 'C') THEN
6768: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 3 (cat-org)');
6769: END IF;
6770:
6771: -- Find and insert the sources in msc_atp_sources_temp
6772: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

Line 6831: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 3');

6827: IF (l_inserted_rows > 0) THEN
6828:
6829: -- Found some sources for some items.
6830: IF PG_DEBUG in ('Y', 'C') THEN
6831: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 3');
6832: END IF;
6833:
6834: -- Mark all the items for which sources are/have been found.
6835: UPDATE msc_ship_set_temp

Line 6880: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 3');

6876:
6877: IF (x_atp_sources.Rank.COUNT > 0) THEN
6878: -- Common sources found
6879: IF PG_DEBUG in ('Y', 'C') THEN
6880: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 3');
6881: END IF;
6882: return;
6883: ELSE
6884: -- No common sources found

Line 6886: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

6882: return;
6883: ELSE
6884: -- No common sources found
6885: IF PG_DEBUG in ('Y', 'C') THEN
6886: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
6887: END IF;
6888: x_return_status := FND_API.G_RET_STS_ERROR;
6889: return;
6890: END IF; -- common sources

Line 6898: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

6894:
6895: -- Check the stopping condition.
6896: IF l_counter = l_dist_level_type.LAST THEN
6897: IF PG_DEBUG in ('Y', 'C') THEN
6898: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
6899: END IF;
6900: x_return_status := FND_API.G_RET_STS_ERROR;
6901: return;
6902: ELSE

Line 6904: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

6900: x_return_status := FND_API.G_RET_STS_ERROR;
6901: return;
6902: ELSE
6903: IF PG_DEBUG in ('Y', 'C') THEN
6904: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
6905: END IF;
6906: END IF;
6907:
6908: ELSIF (l_dist_level_type(l_counter) = 4) THEN

Line 6912: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 4 (item)');

6908: ELSIF (l_dist_level_type(l_counter) = 4) THEN
6909:
6910: -- LEVEL4, ASSIGNMENT TYPE3: ITEM
6911: IF PG_DEBUG in ('Y', 'C') THEN
6912: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 4 (item)');
6913: END IF;
6914: -- Bug 2931266. No need for customer_site_id join at this level
6915: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
6916: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)

Line 6974: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 4');

6970: IF (l_inserted_rows > 0) THEN
6971:
6972: -- Found some sources for some items.
6973: IF PG_DEBUG in ('Y', 'C') THEN
6974: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 4');
6975: END IF;
6976:
6977: -- Mark all the items for which sources are/have been found.
6978: UPDATE msc_ship_set_temp

Line 7023: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 4');

7019:
7020: IF (x_atp_sources.Rank.COUNT > 0) THEN
7021: -- Common sources found
7022: IF PG_DEBUG in ('Y', 'C') THEN
7023: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 4');
7024: END IF;
7025: return;
7026: ELSE
7027: -- No common sources found

Line 7029: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

7025: return;
7026: ELSE
7027: -- No common sources found
7028: IF PG_DEBUG in ('Y', 'C') THEN
7029: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
7030: END IF;
7031: x_return_status := FND_API.G_RET_STS_ERROR;
7032: return;
7033: END IF; -- common sources

Line 7041: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

7037:
7038: -- Check the stopping condition.
7039: IF l_counter = l_dist_level_type.LAST THEN
7040: IF PG_DEBUG in ('Y', 'C') THEN
7041: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
7042: END IF;
7043: x_return_status := FND_API.G_RET_STS_ERROR;
7044: return;
7045: ELSE

Line 7047: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

7043: x_return_status := FND_API.G_RET_STS_ERROR;
7044: return;
7045: ELSE
7046: IF PG_DEBUG in ('Y', 'C') THEN
7047: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
7048: END IF;
7049: END IF;
7050:
7051: ELSIF (l_dist_level_type(l_counter) = 5) THEN

Line 7055: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 5 (cat-reg)');

7051: ELSIF (l_dist_level_type(l_counter) = 5) THEN
7052:
7053: -- LEVEL 5, ASSIGNMENT TYPE 8: CATEGORY-REGION
7054: IF PG_DEBUG in ('Y', 'C') THEN
7055: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 5 (cat-reg)');
7056: END IF;
7057:
7058: SELECT
7059: MSST_INNER.INVENTORY_ITEM_ID,

Line 7105: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');

7101:
7102: -- Step1: For all the items found, update column min_region_value in msc_ship_set_temp.
7103: -- Also update the column visited_flag
7104: IF PG_DEBUG in ('Y', 'C') THEN
7105: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
7106: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
7107: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
7108: || ' min region value: ' || l_min_region_value_arr(i));
7109: END LOOP;

Line 7107: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)

7103: -- Also update the column visited_flag
7104: IF PG_DEBUG in ('Y', 'C') THEN
7105: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
7106: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
7107: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
7108: || ' min region value: ' || l_min_region_value_arr(i));
7109: END LOOP;
7110: END IF;
7111:

Line 7225: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 5. Search over.');

7221: ORDER BY 5; -- Rank;order by cum rank instead of group by rank
7222:
7223: IF (x_atp_sources.Rank.COUNT > 0) THEN
7224: IF PG_DEBUG in ('Y', 'C') THEN
7225: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 5. Search over.');
7226: END IF;
7227: return;
7228: ELSE
7229: IF PG_DEBUG in ('Y', 'C') THEN

Line 7230: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');

7226: END IF;
7227: return;
7228: ELSE
7229: IF PG_DEBUG in ('Y', 'C') THEN
7230: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');
7231: END IF;
7232: x_return_status := FND_API.G_RET_STS_ERROR;
7233: return;
7234: END IF;

Line 7244: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');

7240: ELSIF (l_dist_level_type(l_counter) = 6) THEN
7241:
7242: -- LEVEL 6, ASSIGNMENT TYPE 2: CATEGORY
7243: IF PG_DEBUG in ('Y', 'C') THEN
7244: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');
7245: END IF;
7246: -- Bug 2931266. No need for customer_site_id join at this level
7247: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7248: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)

Line 7307: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 6');

7303: IF (l_inserted_rows > 0) THEN
7304:
7305: -- Found some sources for some items.
7306: IF PG_DEBUG in ('Y', 'C') THEN
7307: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 6');
7308: END IF;
7309:
7310: -- Mark all the items for which sources are/have been found.
7311: UPDATE msc_ship_set_temp

Line 7356: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 6');

7352:
7353: IF (x_atp_sources.Rank.COUNT > 0) THEN
7354: -- Common sources found
7355: IF PG_DEBUG in ('Y', 'C') THEN
7356: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 6');
7357: END IF;
7358: return;
7359: ELSE
7360: -- No common sources found

Line 7362: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

7358: return;
7359: ELSE
7360: -- No common sources found
7361: IF PG_DEBUG in ('Y', 'C') THEN
7362: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
7363: END IF;
7364: x_return_status := FND_API.G_RET_STS_ERROR;
7365: return;
7366: END IF; -- common sources

Line 7374: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

7370:
7371: -- Check the stopping condition.
7372: IF l_counter = l_dist_level_type.LAST THEN
7373: IF PG_DEBUG in ('Y', 'C') THEN
7374: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
7375: END IF;
7376: x_return_status := FND_API.G_RET_STS_ERROR;
7377: return;
7378: ELSE

Line 7380: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

7376: x_return_status := FND_API.G_RET_STS_ERROR;
7377: return;
7378: ELSE
7379: IF PG_DEBUG in ('Y', 'C') THEN
7380: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
7381: END IF;
7382: END IF;
7383:
7384: ELSIF (l_dist_level_type(l_counter) = 7) THEN

Line 7388: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');

7384: ELSIF (l_dist_level_type(l_counter) = 7) THEN
7385:
7386: -- LEVEL 7, ASSIGNMENT_TYPE 4: ORG
7387: IF PG_DEBUG in ('Y', 'C') THEN
7388: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');
7389: END IF;
7390:
7391: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7392: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)

Line 7449: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 7');

7445: IF (l_inserted_rows > 0) THEN
7446:
7447: -- Found some sources for some items.
7448: IF PG_DEBUG in ('Y', 'C') THEN
7449: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 7');
7450: END IF;
7451:
7452: -- Mark all the items for which sources are/have been found.
7453: UPDATE msc_ship_set_temp

Line 7498: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 7');

7494:
7495: IF (x_atp_sources.Rank.COUNT > 0) THEN
7496: -- Common sources found
7497: IF PG_DEBUG in ('Y', 'C') THEN
7498: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 7');
7499: END IF;
7500: return;
7501: ELSE
7502: -- No common sources found

Line 7504: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

7500: return;
7501: ELSE
7502: -- No common sources found
7503: IF PG_DEBUG in ('Y', 'C') THEN
7504: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
7505: END IF;
7506: x_return_status := FND_API.G_RET_STS_ERROR;
7507: return;
7508: END IF; -- common sources

Line 7516: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

7512:
7513: -- Check the stopping condition.
7514: IF l_counter = l_dist_level_type.LAST THEN
7515: IF PG_DEBUG in ('Y', 'C') THEN
7516: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
7517: END IF;
7518: x_return_status := FND_API.G_RET_STS_ERROR;
7519: return;
7520: ELSE

Line 7522: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

7518: x_return_status := FND_API.G_RET_STS_ERROR;
7519: return;
7520: ELSE
7521: IF PG_DEBUG in ('Y', 'C') THEN
7522: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
7523: END IF;
7524: END IF;
7525:
7526: ELSIF (l_dist_level_type(l_counter) = 8) THEN

Line 7530: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 8 (reg)');

7526: ELSIF (l_dist_level_type(l_counter) = 8) THEN
7527:
7528: -- LEVEL 8, ASSIGNMENT_TYPE 7: REGION
7529: IF PG_DEBUG in ('Y', 'C') THEN
7530: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 8 (reg)');
7531: END IF;
7532:
7533: SELECT
7534: MSST_INNER.INVENTORY_ITEM_ID,

Line 7578: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');

7574:
7575: -- Step1: For all the items found, update column min_region_value in msc_ship_set_temp.
7576: -- Also update the column visited_flag
7577: IF PG_DEBUG in ('Y', 'C') THEN
7578: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
7579: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
7580: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
7581: || ' min region value: ' || l_min_region_value_arr(i));
7582: END LOOP;

Line 7580: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)

7576: -- Also update the column visited_flag
7577: IF PG_DEBUG in ('Y', 'C') THEN
7578: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
7579: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
7580: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
7581: || ' min region value: ' || l_min_region_value_arr(i));
7582: END LOOP;
7583: END IF;
7584:

Line 7697: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 8. Search over.');

7693: ORDER BY 5; -- Rank; order by cum rank instead of group by rank
7694:
7695: IF (x_atp_sources.Rank.COUNT > 0) THEN
7696: IF PG_DEBUG in ('Y', 'C') THEN
7697: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 8. Search over.');
7698: END IF;
7699: return;
7700: ELSE
7701: IF PG_DEBUG in ('Y', 'C') THEN

Line 7702: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');

7698: END IF;
7699: return;
7700: ELSE
7701: IF PG_DEBUG in ('Y', 'C') THEN
7702: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');
7703: END IF;
7704: x_return_status := FND_API.G_RET_STS_ERROR;
7705: return;
7706: END IF;

Line 7716: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');

7712: ELSIF (l_dist_level_type(l_counter) = 9) THEN
7713:
7714: -- LEVEL 9, ASSIGNMENT_TYPE 1: GLOBAL
7715: IF PG_DEBUG in ('Y', 'C') THEN
7716: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');
7717: END IF;
7718: -- Bug 2931266. No need for customer_site_id join at this level
7719: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7720: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)

Line 7778: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 9');

7774: IF (l_inserted_rows > 0) THEN
7775:
7776: -- Found some sources for some items.
7777: IF PG_DEBUG in ('Y', 'C') THEN
7778: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 9');
7779: END IF;
7780:
7781: -- Mark all the items for which sources are/have been found.
7782: UPDATE msc_ship_set_temp

Line 7827: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 9');

7823:
7824: IF (x_atp_sources.Rank.COUNT > 0) THEN
7825: -- Common sources found
7826: IF PG_DEBUG in ('Y', 'C') THEN
7827: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 9');
7828: END IF;
7829: return;
7830: ELSE
7831: -- No common sources found

Line 7833: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

7829: return;
7830: ELSE
7831: -- No common sources found
7832: IF PG_DEBUG in ('Y', 'C') THEN
7833: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
7834: END IF;
7835: x_return_status := FND_API.G_RET_STS_ERROR;
7836: return;
7837: END IF; -- common sources

Line 7845: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

7841:
7842: -- Check the stopping condition.
7843: IF l_counter = l_dist_level_type.LAST THEN
7844: IF PG_DEBUG in ('Y', 'C') THEN
7845: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
7846: END IF;
7847: x_return_status := FND_API.G_RET_STS_ERROR;
7848: return;
7849: END IF;

Line 7858: msc_sch_wb.atp_debug('End of Get_Sources Info procedure');

7854:
7855: END IF; -- case2
7856:
7857: IF PG_DEBUG in ('Y', 'C') THEN
7858: msc_sch_wb.atp_debug('End of Get_Sources Info procedure');
7859: END IF;
7860: EXCEPTION
7861: WHEN OTHERS THEN
7862: x_return_status := FND_API.G_RET_STS_ERROR;

Line 7877: msc_sch_wb.atp_debug('Begin Initialize_Set_Processing');

7873: p_start IN NUMBER
7874: ) IS
7875: BEGIN
7876: IF PG_DEBUG in ('Y', 'C') THEN
7877: msc_sch_wb.atp_debug('Begin Initialize_Set_Processing');
7878: END IF;
7879: -- 2834932
7880: G_set_nonoverride_flag := 'N';
7881: G_set_override_flag := 'N';

Line 7903: msc_sch_wb.atp_debug('********** Begin Process_Set_Line **********');

7899: l_arr_LAD_ln DATE;
7900: BEGIN
7901:
7902: IF PG_DEBUG in ('Y', 'C') THEN
7903: msc_sch_wb.atp_debug('********** Begin Process_Set_Line **********');
7904: END IF;
7905:
7906: x_line_status := NVL(p_set.error_code(i), MSC_ATP_PVT.ALLSUCCESS);
7907:

Line 7915: msc_sch_wb.atp_debug('l_request_date_ln: ' || l_request_date_ln);

7911: l_request_date_ln := p_set.requested_arrival_date(i);
7912: END IF;
7913:
7914: IF PG_DEBUG in ('Y', 'C') THEN
7915: msc_sch_wb.atp_debug('l_request_date_ln: ' || l_request_date_ln);
7916: msc_sch_wb.atp_debug('Input error code: ' || x_line_status); --bug3439591
7917: END IF;
7918:
7919: IF p_set.override_flag(i) = 'Y' THEN

Line 7916: msc_sch_wb.atp_debug('Input error code: ' || x_line_status); --bug3439591

7912: END IF;
7913:
7914: IF PG_DEBUG in ('Y', 'C') THEN
7915: msc_sch_wb.atp_debug('l_request_date_ln: ' || l_request_date_ln);
7916: msc_sch_wb.atp_debug('Input error code: ' || x_line_status); --bug3439591
7917: END IF;
7918:
7919: IF p_set.override_flag(i) = 'Y' THEN
7920:

Line 7937: msc_sch_wb.atp_debug('Override case. override_date: ' ||

7933: END IF;
7934: END IF;
7935:
7936: IF PG_DEBUG in ('Y', 'C') THEN
7937: msc_sch_wb.atp_debug('Override case. override_date: ' ||
7938: to_char(G_override_date, 'DD-MON-YYYY HH24:MI:SS'));
7939: END IF;
7940: G_set_override_flag := 'Y';
7941: ELSE

Line 7962: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

7958: END IF;
7959: */
7960:
7961: IF PG_DEBUG in ('Y', 'C') THEN
7962: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7963: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7964: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7965: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7966: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591

Line 7963: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));

7959: */
7960:
7961: IF PG_DEBUG in ('Y', 'C') THEN
7962: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7963: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7964: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7965: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7966: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7967: END IF;

Line 7964: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));

7960:
7961: IF PG_DEBUG in ('Y', 'C') THEN
7962: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7963: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7964: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7965: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7966: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7967: END IF;
7968: -- 2834932

Line 7965: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591

7961: IF PG_DEBUG in ('Y', 'C') THEN
7962: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7963: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7964: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7965: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7966: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7967: END IF;
7968: -- 2834932
7969: G_set_nonoverride_flag := 'Y';

Line 7966: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591

7962: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7963: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7964: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7965: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7966: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7967: END IF;
7968: -- 2834932
7969: G_set_nonoverride_flag := 'Y';
7970: END IF;

Line 8032: msc_sch_wb.atp_debug('CHANGED THE ITEM PRESENT FLAG');

8028: END IF;
8029: END IF;
8030: IF MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET = 'N' and p_set.atp_flag(i) <> 'N' or p_set.atp_components_flag(i) <> 'N' THEN
8031: MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := 'Y';
8032: msc_sch_wb.atp_debug('CHANGED THE ITEM PRESENT FLAG');
8033: END IF;
8034: IF PG_DEBUG in ('Y', 'C') THEN
8035: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8036: msc_sch_wb.atp_debug('set_status: ' || G_set_status);

Line 8035: msc_sch_wb.atp_debug('line_status: ' || x_line_status);

8031: MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := 'Y';
8032: msc_sch_wb.atp_debug('CHANGED THE ITEM PRESENT FLAG');
8033: END IF;
8034: IF PG_DEBUG in ('Y', 'C') THEN
8035: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8036: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8037: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8038: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8039: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));

Line 8036: msc_sch_wb.atp_debug('set_status: ' || G_set_status);

8032: msc_sch_wb.atp_debug('CHANGED THE ITEM PRESENT FLAG');
8033: END IF;
8034: IF PG_DEBUG in ('Y', 'C') THEN
8035: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8036: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8037: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8038: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8039: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8040: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));

Line 8037: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);

8033: END IF;
8034: IF PG_DEBUG in ('Y', 'C') THEN
8035: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8036: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8037: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8038: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8039: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8040: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8041: END IF;

Line 8038: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);

8034: IF PG_DEBUG in ('Y', 'C') THEN
8035: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8036: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8037: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8038: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8039: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8040: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8041: END IF;
8042:

Line 8039: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));

8035: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8036: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8037: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8038: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8039: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8040: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8041: END IF;
8042:
8043: END Process_Set_Line;

Line 8040: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));

8036: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8037: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8038: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8039: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8040: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8041: END IF;
8042:
8043: END Process_Set_Line;
8044:

Line 8064: msc_sch_wb.atp_debug('Begin Process_Set_Dates_Errors');

8060:
8061: BEGIN
8062:
8063: IF PG_DEBUG in ('Y', 'C') THEN
8064: msc_sch_wb.atp_debug('Begin Process_Set_Dates_Errors');
8065: msc_sch_wb.atp_debug(' set_status: ' || G_set_status);
8066: END IF;
8067:
8068: l_start := nvl(p_start, 1);

Line 8065: msc_sch_wb.atp_debug(' set_status: ' || G_set_status);

8061: BEGIN
8062:
8063: IF PG_DEBUG in ('Y', 'C') THEN
8064: msc_sch_wb.atp_debug('Begin Process_Set_Dates_Errors');
8065: msc_sch_wb.atp_debug(' set_status: ' || G_set_status);
8066: END IF;
8067:
8068: l_start := nvl(p_start, 1);
8069: l_end := nvl(p_end, p_set.action.count);

Line 8203: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

8199: END IF;
8200: END IF; --4460369*/ --4967040
8201:
8202: IF PG_DEBUG in ('Y', 'C') THEN
8203: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8204: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8205: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8206: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8207: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));

Line 8204: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));

8200: END IF; --4460369*/ --4967040
8201:
8202: IF PG_DEBUG in ('Y', 'C') THEN
8203: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8204: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8205: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8206: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8207: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));
8208: END IF;

Line 8205: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

8201:
8202: IF PG_DEBUG in ('Y', 'C') THEN
8203: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8204: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8205: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8206: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8207: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));
8208: END IF;
8209: end loop;

Line 8206: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));

8202: IF PG_DEBUG in ('Y', 'C') THEN
8203: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8204: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8205: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8206: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8207: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));
8208: END IF;
8209: end loop;
8210: -- 2834932 dsting. split the group date and error code loops

Line 8207: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));

8203: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8204: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8205: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8206: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8207: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));
8208: END IF;
8209: end loop;
8210: -- 2834932 dsting. split the group date and error code loops
8211:

Line 8237: msc_sch_wb.atp_debug('Override date is nonworking day');

8233: IF l_status_flag = G_NONWORKING_DAY AND
8234: nvl(p_set.override_flag(i), 'N') = 'N'
8235: THEN
8236: IF PG_DEBUG in ('Y', 'C') THEN
8237: msc_sch_wb.atp_debug('Override date is nonworking day');
8238: END IF;
8239: IF p_set.error_code(i) = MSC_ATP_PVT.ALLSUCCESS THEN
8240: p_set.error_code(i) := MSC_ATP_PVT.ATP_OVERRIDE_DATE_FAIL;
8241: END IF;

Line 8251: msc_sch_wb.atp_debug('stmt18 - Multiple lines overridden to diff dates');

8247: IF (NVL(p_set.Override_Flag(i), 'N') = 'Y') THEN
8248: IF TRUNC(G_override_date) <> TRUNC(l_line_date) THEN
8249: p_set.Error_Code(i) := MSC_ATP_PVT.ATP_MULTI_OVERRIDE_DATES;
8250: IF PG_DEBUG in ('Y', 'C') THEN
8251: msc_sch_wb.atp_debug('stmt18 - Multiple lines overridden to diff dates');
8252: END IF;
8253: END IF;
8254: ELSE
8255: IF TRUNC(G_override_date) < TRUNC(l_line_date) THEN

Line 8257: msc_sch_wb.atp_debug('stmt19 - Unable to Meet Overridden dates');

8253: END IF;
8254: ELSE
8255: IF TRUNC(G_override_date) < TRUNC(l_line_date) THEN
8256: IF PG_DEBUG in ('Y', 'C') THEN
8257: msc_sch_wb.atp_debug('stmt19 - Unable to Meet Overridden dates');
8258: END IF;
8259: p_set.Error_Code(i) := MSC_ATP_PVT.ATP_OVERRIDE_DATE_FAIL;
8260: ELSIF TRUNC(p_set.ship_date(i)) > TRUNC(G_ship_LAD_set)
8261: OR TRUNC(p_set.arrival_date(i)) > TRUNC(G_arr_LAD_set)

Line 8265: msc_sch_wb.atp_debug('stmt19 - Unable to Meet LAD');

8261: OR TRUNC(p_set.arrival_date(i)) > TRUNC(G_arr_LAD_set)
8262: THEN
8263: p_set.Error_Code(i) := MSC_ATP_PVT.ATP_ACCEPT_FAIL;
8264: IF PG_DEBUG in ('Y', 'C') THEN
8265: msc_sch_wb.atp_debug('stmt19 - Unable to Meet LAD');
8266: END IF;
8267: END IF;
8268: END IF;
8269:

Line 8277: msc_sch_wb.atp_debug('GROUPEL_ERROR');

8273: IN (MSC_ATP_PVT.ALLSUCCESS, MSC_ATP_PVT.ATP_NOT_APPL, MSC_ATP_PVT.PDS_TO_ODS_SWITCH)
8274: THEN
8275: p_set.Error_Code(i) := MSC_ATP_PVT.GROUPEL_ERROR;
8276: IF PG_DEBUG in ('Y', 'C') THEN
8277: msc_sch_wb.atp_debug('GROUPEL_ERROR');
8278: END IF;
8279: END IF;
8280: end loop;
8281: end if;

Line 8284: msc_sch_wb.atp_debug('END Proces_Set_Dates_Errors');

8280: end loop;
8281: end if;
8282:
8283: IF PG_DEBUG in ('Y', 'C') THEN
8284: msc_sch_wb.atp_debug('END Proces_Set_Dates_Errors');
8285: END IF;
8286:
8287: x_set_status := G_set_status;
8288: END Process_Set_Dates_Errors;

Line 8305: msc_sch_wb.atp_debug('Begin Update_Set_SD_Dates');

8301: l_ship_arrival_date_rec MSC_ATP_PVT.ship_arrival_date_rec_typ;
8302: l_return_status VARCHAR2(1);
8303: BEGIN
8304: IF PG_DEBUG in ('Y', 'C') THEN
8305: msc_sch_wb.atp_debug('Begin Update_Set_SD_Dates');
8306: END IF;
8307:
8308: FOR m in 1.. p_set.action.count LOOP
8309: IF PG_DEBUG in ('Y', 'C') THEN

Line 8310: msc_sch_wb.atp_debug('m = ' || m);

8306: END IF;
8307:
8308: FOR m in 1.. p_set.action.count LOOP
8309: IF PG_DEBUG in ('Y', 'C') THEN
8310: msc_sch_wb.atp_debug('m = ' || m);
8311: END IF;
8312:
8313: IF (p_set.Action(m)<> MSC_ATP_PVT.ATPQUERY and p_set.quantity_ordered(m) <> 0) THEN -- xxxx
8314: /* --bug4281663 commented and initialized below

Line 8341: msc_sch_wb.atp_debug(' l_demand_pegging_id := ' || l_demand_pegging_id);

8337: --bug4281663 Using the plan_id passed instead of calling get_global_plan_info
8338: l_plan_id := p_set.plan_id(m);
8339: l_demand_pegging_id := MSC_ATP_PVT.G_DEMAND_PEGGING_ID;
8340: IF PG_DEBUG in ('Y', 'C') THEN
8341: msc_sch_wb.atp_debug(' l_demand_pegging_id := ' || l_demand_pegging_id);
8342: msc_sch_wb.atp_debug(' l_plan_id := ' || l_plan_id);
8343: END IF;
8344: -- xxxx
8345: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);

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

8338: l_plan_id := p_set.plan_id(m);
8339: l_demand_pegging_id := MSC_ATP_PVT.G_DEMAND_PEGGING_ID;
8340: IF PG_DEBUG in ('Y', 'C') THEN
8341: msc_sch_wb.atp_debug(' l_demand_pegging_id := ' || l_demand_pegging_id);
8342: msc_sch_wb.atp_debug(' l_plan_id := ' || l_plan_id);
8343: END IF;
8344: -- xxxx
8345: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);
8346: IF PG_DEBUG in ('Y', 'C') THEN

Line 8347: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);

8343: END IF;
8344: -- xxxx
8345: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);
8346: IF PG_DEBUG in ('Y', 'C') THEN
8347: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8348: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8349: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8350: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8351: --bug4281663 Added more debug statements

Line 8348: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));

8344: -- xxxx
8345: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);
8346: IF PG_DEBUG in ('Y', 'C') THEN
8347: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8348: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8349: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8350: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8351: --bug4281663 Added more debug statements
8352: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));

Line 8349: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));

8345: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);
8346: IF PG_DEBUG in ('Y', 'C') THEN
8347: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8348: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8349: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8350: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8351: --bug4281663 Added more debug statements
8352: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));
8353: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));

Line 8350: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));

8346: IF PG_DEBUG in ('Y', 'C') THEN
8347: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8348: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8349: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8350: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8351: --bug4281663 Added more debug statements
8352: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));
8353: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));
8354: END IF;

Line 8352: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));

8348: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8349: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8350: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8351: --bug4281663 Added more debug statements
8352: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));
8353: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));
8354: END IF;
8355:
8356: -- update_sd_date for setproc

Line 8353: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));

8349: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8350: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8351: --bug4281663 Added more debug statements
8352: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));
8353: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));
8354: END IF;
8355:
8356: -- update_sd_date for setproc
8357: IF p_set.ship_date(m) <> p_set.group_ship_date(m) THEN

Line 8381: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');

8377: l_order_date_type := 1;
8378: END IF;
8379:
8380: IF PG_DEBUG in ('Y', 'C') THEN
8381: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8382: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8383: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8384: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8385: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);

Line 8382: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));

8378: END IF;
8379:
8380: IF PG_DEBUG in ('Y', 'C') THEN
8381: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8382: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8383: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8384: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8385: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);
8386: END IF;

Line 8383: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));

8379:
8380: IF PG_DEBUG in ('Y', 'C') THEN
8381: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8382: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8383: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8384: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8385: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);
8386: END IF;
8387:

Line 8384: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);

8380: IF PG_DEBUG in ('Y', 'C') THEN
8381: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8382: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8383: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8384: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8385: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);
8386: END IF;
8387:
8388: MSC_ATP_DB_UTILS.Update_SD_Date(p_set.Identifier(m),

Line 8385: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);

8381: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8382: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8383: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8384: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8385: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);
8386: END IF;
8387:
8388: MSC_ATP_DB_UTILS.Update_SD_Date(p_set.Identifier(m),
8389: p_set.instance_id(m), l_sd_date, l_plan_id,null, -- dsting setproc

Line 8434: msc_sch_wb.atp_debug('Update_Set_SD_Dates: ' || 'l_ship_arrival_date_rec.demand_id = ' || l_ship_arrival_date_rec.demand_id);

8430: WHEN OTHERS THEN
8431: l_ship_arrival_date_rec.demand_id := null;
8432: END;
8433: IF PG_DEBUG in ('Y', 'C') THEN
8434: msc_sch_wb.atp_debug('Update_Set_SD_Dates: ' || 'l_ship_arrival_date_rec.demand_id = ' || l_ship_arrival_date_rec.demand_id);
8435: END IF;
8436:
8437: /* Determine order date type*/
8438: IF p_set.requested_arrival_date(m) is not null THEN

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

8457: END IF;
8458:
8459: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8460: IF PG_DEBUG in ('Y', 'C') THEN
8461: msc_sch_wb.atp_debug('Update_Set_SD_Dates: ' || 'Error in call to Flush_Data_In_Pds procedure ');
8462: END IF;
8463: RAISE FND_API.G_EXC_ERROR;
8464: END IF;
8465:

Line 8577: msc_sch_wb.atp_debug('********** get_transit_time **********');

8573:
8574: BEGIN
8575:
8576: IF PG_DEBUG in ('Y', 'C') THEN
8577: msc_sch_wb.atp_debug('********** get_transit_time **********');
8578: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||
8579: ' to: ' || p_to_loc_id);
8580: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8581: ' to: ' || p_to_instance_id);

Line 8578: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||

8574: BEGIN
8575:
8576: IF PG_DEBUG in ('Y', 'C') THEN
8577: msc_sch_wb.atp_debug('********** get_transit_time **********');
8578: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||
8579: ' to: ' || p_to_loc_id);
8580: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8581: ' to: ' || p_to_instance_id);
8582: msc_sch_wb.atp_debug('session_id: ' || p_session_id);

Line 8580: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||

8576: IF PG_DEBUG in ('Y', 'C') THEN
8577: msc_sch_wb.atp_debug('********** get_transit_time **********');
8578: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||
8579: ' to: ' || p_to_loc_id);
8580: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8581: ' to: ' || p_to_instance_id);
8582: msc_sch_wb.atp_debug('session_id: ' || p_session_id);
8583: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);
8584: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);

Line 8582: msc_sch_wb.atp_debug('session_id: ' || p_session_id);

8578: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||
8579: ' to: ' || p_to_loc_id);
8580: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8581: ' to: ' || p_to_instance_id);
8582: msc_sch_wb.atp_debug('session_id: ' || p_session_id);
8583: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);
8584: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);
8585: END IF;
8586:

Line 8583: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);

8579: ' to: ' || p_to_loc_id);
8580: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8581: ' to: ' || p_to_instance_id);
8582: msc_sch_wb.atp_debug('session_id: ' || p_session_id);
8583: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);
8584: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);
8585: END IF;
8586:
8587: -- if the receipt org or the ship method is NULL

Line 8584: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);

8580: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8581: ' to: ' || p_to_instance_id);
8582: msc_sch_wb.atp_debug('session_id: ' || p_session_id);
8583: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);
8584: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);
8585: END IF;
8586:
8587: -- if the receipt org or the ship method is NULL
8588: -- then get the default time

Line 8620: msc_sch_wb.atp_debug('Using region level transit times');

8616: AND default_flag = 1
8617: AND rownum = 1;
8618: END IF;
8619: EXCEPTION WHEN NO_DATA_FOUND THEN
8620: msc_sch_wb.atp_debug('Using region level transit times');
8621: IF x_ship_method IS NOT NULL THEN
8622: OPEN c_lead_time;
8623: FETCH c_lead_time INTO x_intransit_time, l_level;
8624: CLOSE c_lead_time;

Line 8652: msc_sch_wb.atp_debug('Using default transit times');

8648: END IF;
8649:
8650: IF x_intransit_time IS NULL AND x_ship_method IS NOT NULL THEN
8651: IF PG_DEBUG in ('Y', 'C') THEN
8652: msc_sch_wb.atp_debug('Using default transit times');
8653: END IF;
8654:
8655: -- call myself with null ship method to get defaults
8656: x_ship_method := NULL;

Line 8673: msc_sch_wb.atp_debug('transit_time:' || x_intransit_time);

8669: END IF;
8670:
8671:
8672: IF PG_DEBUG in ('Y', 'C') THEN
8673: msc_sch_wb.atp_debug('transit_time:' || x_intransit_time);
8674: msc_sch_wb.atp_debug('ship_method:' || x_ship_method);
8675: END IF;
8676:
8677: END get_transit_time;

Line 8674: msc_sch_wb.atp_debug('ship_method:' || x_ship_method);

8670:
8671:
8672: IF PG_DEBUG in ('Y', 'C') THEN
8673: msc_sch_wb.atp_debug('transit_time:' || x_intransit_time);
8674: msc_sch_wb.atp_debug('ship_method:' || x_ship_method);
8675: END IF;
8676:
8677: END get_transit_time;
8678:

Line 8738: msc_sch_wb.atp_debug('PROCEDURE get_delivery_lead_time');

8734: l_dlt_key VARCHAR2(64);
8735: BEGIN
8736:
8737: IF PG_DEBUG IN ('Y', 'C') THEN
8738: msc_sch_wb.atp_debug('PROCEDURE get_delivery_lead_time');
8739: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||
8740: ' to: ' || p_to_org_id);
8741: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8742: ' to: ' || p_to_loc_id);

Line 8739: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||

8735: BEGIN
8736:
8737: IF PG_DEBUG IN ('Y', 'C') THEN
8738: msc_sch_wb.atp_debug('PROCEDURE get_delivery_lead_time');
8739: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||
8740: ' to: ' || p_to_org_id);
8741: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8742: ' to: ' || p_to_loc_id);
8743: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||

Line 8741: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||

8737: IF PG_DEBUG IN ('Y', 'C') THEN
8738: msc_sch_wb.atp_debug('PROCEDURE get_delivery_lead_time');
8739: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||
8740: ' to: ' || p_to_org_id);
8741: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8742: ' to: ' || p_to_loc_id);
8743: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||
8744: ' to: ' || p_to_instance_id);
8745: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||

Line 8743: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||

8739: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||
8740: ' to: ' || p_to_org_id);
8741: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8742: ' to: ' || p_to_loc_id);
8743: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||
8744: ' to: ' || p_to_instance_id);
8745: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||
8746: ' site_id: ' || p_customer_site_id);
8747: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||

Line 8745: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||

8741: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8742: ' to: ' || p_to_loc_id);
8743: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||
8744: ' to: ' || p_to_instance_id);
8745: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||
8746: ' site_id: ' || p_customer_site_id);
8747: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8748: ' site_id: ' || p_supplier_site_id);
8749: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);

Line 8747: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||

8743: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||
8744: ' to: ' || p_to_instance_id);
8745: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||
8746: ' site_id: ' || p_customer_site_id);
8747: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8748: ' site_id: ' || p_supplier_site_id);
8749: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8750: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8751: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);

Line 8749: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);

8745: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||
8746: ' site_id: ' || p_customer_site_id);
8747: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8748: ' site_id: ' || p_supplier_site_id);
8749: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8750: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8751: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8752: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8753: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);

Line 8750: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);

8746: ' site_id: ' || p_customer_site_id);
8747: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8748: ' site_id: ' || p_supplier_site_id);
8749: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8750: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8751: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8752: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8753: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8754: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);

Line 8751: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);

8747: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8748: ' site_id: ' || p_supplier_site_id);
8749: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8750: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8751: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8752: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8753: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8754: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);
8755: END IF;

Line 8752: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895

8748: ' site_id: ' || p_supplier_site_id);
8749: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8750: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8751: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8752: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8753: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8754: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);
8755: END IF;
8756:

Line 8753: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);

8749: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8750: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8751: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8752: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8753: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8754: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);
8755: END IF;
8756:
8757: l_to_loc_id := p_to_loc_id;

Line 8754: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);

8750: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8751: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8752: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8753: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8754: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);
8755: END IF;
8756:
8757: l_to_loc_id := p_to_loc_id;
8758:

Line 8780: msc_sch_wb.atp_debug('dlt cache hit! idx: ' || dlt_idx ||

8776: if dlt_lookup(l_cache_idx) = l_dlt_key then
8777: x_delivery_lead_time := dlt_cache(l_cache_idx);
8778: p_ship_method := ship_method_cache(l_cache_idx);
8779: IF PG_DEBUG in ('Y', 'C') THEN
8780: msc_sch_wb.atp_debug('dlt cache hit! idx: ' || dlt_idx ||
8781: ' dlt: ' || x_delivery_lead_time ||
8782: ' ship_method: ' || p_ship_method);
8783: END IF;
8784: return;

Line 8810: msc_sch_wb.atp_debug('location to: ' || l_to_loc_id);

8806: NULL,
8807: NULL);
8808: END IF;
8809: IF PG_DEBUG in ('Y', 'C') THEN
8810: msc_sch_wb.atp_debug('location to: ' || l_to_loc_id);
8811: END IF;
8812: END IF;
8813:
8814: IF l_to_loc_id IS NULL THEN --2814895

Line 8828: msc_sch_wb.atp_debug('location from: ' || l_from_loc_id);

8824: NULL,
8825: p_supplier_id,
8826: p_supplier_site_id);
8827: IF PG_DEBUG in ('Y', 'C') THEN
8828: msc_sch_wb.atp_debug('location from: ' || l_from_loc_id);
8829: END IF;
8830: END IF;
8831:
8832: get_transit_time(l_from_loc_id,

Line 8867: msc_sch_wb.atp_debug(' ship method = ' || p_ship_method);

8863: dlt_cache(dlt_idx) := x_delivery_lead_time;
8864: ship_method_cache(dlt_idx) := p_ship_method;
8865:
8866: IF PG_DEBUG in ('Y', 'C') THEN
8867: msc_sch_wb.atp_debug(' ship method = ' || p_ship_method);
8868: msc_sch_wb.atp_debug(' delivery_lead_time = ' || x_delivery_lead_time);
8869: msc_sch_wb.atp_debug('END get_delivery_lead_time');
8870: END IF;
8871:

Line 8868: msc_sch_wb.atp_debug(' delivery_lead_time = ' || x_delivery_lead_time);

8864: ship_method_cache(dlt_idx) := p_ship_method;
8865:
8866: IF PG_DEBUG in ('Y', 'C') THEN
8867: msc_sch_wb.atp_debug(' ship method = ' || p_ship_method);
8868: msc_sch_wb.atp_debug(' delivery_lead_time = ' || x_delivery_lead_time);
8869: msc_sch_wb.atp_debug('END get_delivery_lead_time');
8870: END IF;
8871:
8872: END get_delivery_lead_time;

Line 8869: msc_sch_wb.atp_debug('END get_delivery_lead_time');

8865:
8866: IF PG_DEBUG in ('Y', 'C') THEN
8867: msc_sch_wb.atp_debug(' ship method = ' || p_ship_method);
8868: msc_sch_wb.atp_debug(' delivery_lead_time = ' || x_delivery_lead_time);
8869: msc_sch_wb.atp_debug('END get_delivery_lead_time');
8870: END IF;
8871:
8872: END get_delivery_lead_time;
8873:

Line 8936: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');

8932:
8933: IS
8934: BEGIN
8935: IF PG_DEBUG in ('Y', 'C') THEN
8936: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8937: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8938: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);

Line 8937: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');

8933: IS
8934: BEGIN
8935: IF PG_DEBUG in ('Y', 'C') THEN
8936: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8937: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8938: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8941: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);

Line 8938: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);

8934: BEGIN
8935: IF PG_DEBUG in ('Y', 'C') THEN
8936: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8937: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8938: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8941: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8942: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);

Line 8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);

8935: IF PG_DEBUG in ('Y', 'C') THEN
8936: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8937: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8938: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8941: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8942: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8943: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);

Line 8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);

8936: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8937: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8938: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8941: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8942: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8943: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);
8944: END IF;

Line 8941: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);

8937: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8938: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8941: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8942: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8943: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);
8944: END IF;
8945:

Line 8942: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);

8938: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8941: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8942: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8943: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);
8944: END IF;
8945:
8946: -- initialize API return status to success

Line 8943: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);

8939: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8940: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8941: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8942: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8943: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);
8944: END IF;
8945:
8946: -- initialize API return status to success
8947: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 8993: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Routing Id:' || x_routing_seq_id || ' Bill Seq id :' || x_bill_seq_id || ' Procees seq ID:' || x_process_seq_id

8989: ) a
8990: where rownum = 1;
8991:
8992: IF PG_DEBUG in ('Y', 'C') THEN
8993: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Routing Id:' || x_routing_seq_id || ' Bill Seq id :' || x_bill_seq_id || ' Procees seq ID:' || x_process_seq_id
8994: || ' Operation seq ID:' || x_op_seq_id); --4570421
8995: msc_sch_wb.atp_debug('***** END Get Process Effectivity *****');
8996: END IF;
8997: EXCEPTION

Line 8995: msc_sch_wb.atp_debug('***** END Get Process Effectivity *****');

8991:
8992: IF PG_DEBUG in ('Y', 'C') THEN
8993: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Routing Id:' || x_routing_seq_id || ' Bill Seq id :' || x_bill_seq_id || ' Procees seq ID:' || x_process_seq_id
8994: || ' Operation seq ID:' || x_op_seq_id); --4570421
8995: msc_sch_wb.atp_debug('***** END Get Process Effectivity *****');
8996: END IF;
8997: EXCEPTION
8998: -- 3027711
8999: WHEN NO_DATA_FOUND THEN

Line 9000: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Could not get process effectivity Values');

8996: END IF;
8997: EXCEPTION
8998: -- 3027711
8999: WHEN NO_DATA_FOUND THEN
9000: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Could not get process effectivity Values');
9001: x_process_seq_id := null;
9002: x_routing_seq_id := null;
9003: x_bill_seq_id := null;
9004: WHEN OTHERS THEN

Line 9005: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'sqlcode: ' || sqlcode);

9001: x_process_seq_id := null;
9002: x_routing_seq_id := null;
9003: x_bill_seq_id := null;
9004: WHEN OTHERS THEN
9005: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'sqlcode: ' || sqlcode);
9006: x_process_seq_id := null;
9007: x_routing_seq_id := null;
9008: x_bill_seq_id := null;
9009: x_return_status := FND_API.G_RET_STS_ERROR;

Line 9021: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions Begin *************');

9017: IS
9018: l_counter PLS_INTEGER;
9019: BEGIN
9020: IF PG_DEBUG in ('Y', 'C') THEN
9021: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions Begin *************');
9022: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'p_vendor_site_id := ' || p_vendor_site_id);
9023: END IF;
9024:
9025: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 9022: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'p_vendor_site_id := ' || p_vendor_site_id);

9018: l_counter PLS_INTEGER;
9019: BEGIN
9020: IF PG_DEBUG in ('Y', 'C') THEN
9021: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions Begin *************');
9022: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'p_vendor_site_id := ' || p_vendor_site_id);
9023: END IF;
9024:
9025: x_return_status := FND_API.G_RET_STS_SUCCESS;
9026:

Line 9029: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'Data for site ' || p_vendor_site_id ||

9025: x_return_status := FND_API.G_RET_STS_SUCCESS;
9026:
9027: FOR l_counter IN 1..G_VENDOR_SITE_ID.COUNT LOOP
9028: IF MSC_ATP_PROC.G_VENDOR_SITE_ID(l_counter) = p_vendor_site_id THEN
9029: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'Data for site ' || p_vendor_site_id ||
9030: ' already exists.');
9031: return;
9032: END IF;
9033: END LOOP;

Line 9049: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions End *************');

9045: G_VENDOR_SITE_ID.Extend();
9046: G_VENDOR_SITE_ID(G_VENDOR_SITE_ID.COUNT) := p_vendor_site_id;
9047:
9048: IF PG_DEBUG in ('Y', 'C') THEN
9049: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions End *************');
9050: END IF;
9051: EXCEPTION
9052: WHEN OTHERS THEN
9053: IF PG_DEBUG in ('Y', 'C') THEN

Line 9054: msc_sch_wb.atp_debug('Get_Supplier_Regions: ' || 'sqlcode: ' || sqlcode);

9050: END IF;
9051: EXCEPTION
9052: WHEN OTHERS THEN
9053: IF PG_DEBUG in ('Y', 'C') THEN
9054: msc_sch_wb.atp_debug('Get_Supplier_Regions: ' || 'sqlcode: ' || sqlcode);
9055: END IF;
9056: x_return_status := FND_API.G_RET_STS_ERROR;
9057: END Get_Supplier_Regions;
9058:

Line 9114: msc_sch_wb.set_session_id(p_session_id);

9110: BEGIN
9111: -- initialize API return status to success
9112: x_return_status := FND_API.G_RET_STS_SUCCESS;
9113:
9114: msc_sch_wb.set_session_id(p_session_id);
9115: IF PG_DEBUG in ('Y', 'C') THEN
9116: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9117: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );

Line 9116: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');

9112: x_return_status := FND_API.G_RET_STS_SUCCESS;
9113:
9114: msc_sch_wb.set_session_id(p_session_id);
9115: IF PG_DEBUG in ('Y', 'C') THEN
9116: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9117: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );

Line 9117: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );

9113:
9114: msc_sch_wb.set_session_id(p_session_id);
9115: IF PG_DEBUG in ('Y', 'C') THEN
9116: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9117: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );

Line 9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );

9114: msc_sch_wb.set_session_id(p_session_id);
9115: IF PG_DEBUG in ('Y', 'C') THEN
9116: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9117: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );

Line 9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );

9115: IF PG_DEBUG in ('Y', 'C') THEN
9116: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9117: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );

Line 9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );

9116: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9117: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );

Line 9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );

9117: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9125: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );

Line 9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );

9118: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9125: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9126: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );

Line 9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );

9119: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9125: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9126: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9127: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );

Line 9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );

9120: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9125: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9126: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9127: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );
9128: END IF;

Line 9125: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );

9121: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9125: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9126: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9127: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );
9128: END IF;
9129:

Line 9126: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );

9122: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9125: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9126: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9127: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );
9128: END IF;
9129:
9130: IF p_from_vendor_site_id IS NOT NULL THEN

Line 9127: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );

9123: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9124: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9125: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9126: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9127: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );
9128: END IF;
9129:
9130: IF p_from_vendor_site_id IS NOT NULL THEN
9131: IF p_src_dest = 1 THEN

Line 9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'Invalid parameter - supp-org not supported from source');

9129:
9130: IF p_from_vendor_site_id IS NOT NULL THEN
9131: IF p_src_dest = 1 THEN
9132: IF PG_DEBUG in ('Y', 'C') THEN
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'Invalid parameter - supp-org not supported from source');
9134: END IF;
9135: x_return_status := FND_API.G_RET_STS_ERROR;
9136: ELSE
9137: IF PG_DEBUG in ('Y', 'C') THEN

Line 9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': supp-org case');

9134: END IF;
9135: x_return_status := FND_API.G_RET_STS_ERROR;
9136: ELSE
9137: IF PG_DEBUG in ('Y', 'C') THEN
9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': supp-org case');
9139: END IF;
9140: MSC_SATP_FUNC.Get_Regions(NULL, -- p_customer_site_id
9141: 724, -- p_calling_module
9142: p_from_instance_id, -- p_instance_id

Line 9169: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': org-cust case');

9165: );
9166: END IF;
9167: ELSIF p_to_customer_site_id IS NOT NULL OR p_to_loc_id IS NOT NULL THEN
9168: IF PG_DEBUG in ('Y', 'C') THEN
9169: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': org-cust case');
9170: END IF;
9171: IF p_src_dest = 1 THEN
9172: MSC_SATP_FUNC.Get_Regions(p_to_customer_site_id, -- p_customer_site_id
9173: -1, -- p_calling_module (not 724)

Line 9222: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': org-org case');

9218: );
9219: END IF;
9220: ELSE
9221: IF PG_DEBUG in ('Y', 'C') THEN
9222: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': org-org case');
9223: END IF;
9224: IF p_src_dest = 1 THEN
9225: MSC_SATP_FUNC.get_src_transit_time(p_from_org_id, -- p_from_org_id
9226: p_from_loc_id, -- p_from_loc_id

Line 9257: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'Error code:' || to_char(sqlcode));

9253:
9254: EXCEPTION
9255: WHEN OTHERS THEN
9256: IF PG_DEBUG in ('Y', 'C') THEN
9257: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'Error code:' || to_char(sqlcode));
9258: END IF;
9259: x_return_status := FND_API.G_RET_STS_ERROR;
9260: END ATP_Intransit_LT;
9261: