DBA Data[Home] [Help]

APPS.MSC_ATP_PROC dependencies on MSC_SCH_WB

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2667: and plans.plan_id = plans2.copy_plan_id (+);
2668:
2669:
2670: IF PG_DEBUG in ('Y', 'C') THEN
2671: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2672: msc_sch_wb.atp_debug (' ---- ');
2673: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2674: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;

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

2668:
2669:
2670: IF PG_DEBUG in ('Y', 'C') THEN
2671: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2672: msc_sch_wb.atp_debug (' ---- ');
2673: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2674: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);

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

2669:
2670: IF PG_DEBUG in ('Y', 'C') THEN
2671: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2672: msc_sch_wb.atp_debug (' ---- ');
2673: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2674: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);

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

2670: IF PG_DEBUG in ('Y', 'C') THEN
2671: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2672: msc_sch_wb.atp_debug (' ---- ');
2673: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2674: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);

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

2671: msc_sch_wb.atp_debug('G_SYNC_ATP_CHECK := '|| MSC_ATP_PVT.G_SYNC_ATP_CHECK);
2672: msc_sch_wb.atp_debug (' ---- ');
2673: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2674: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);

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

2672: msc_sch_wb.atp_debug (' ---- ');
2673: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2674: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2680: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);

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

2673: msc_sch_wb.atp_debug ('Query Output : Old Plan ID : ' || x_plan_info_rec.plan_id);
2674: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2680: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2681: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);

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

2674: msc_sch_wb.atp_debug (' plan name: : ' || x_plan_info_rec.plan_name) ;
2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2680: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2681: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2682: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);

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

2675: msc_sch_wb.atp_debug (' assign_set_id : ' || x_plan_info_rec.assignment_set_id) ;
2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2680: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2681: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2682: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2683: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);

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

2676: msc_sch_wb.atp_debug (' summary_flag : ' || x_plan_info_rec.summary_flag);
2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2680: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2681: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2682: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2683: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2684: -- ship_rec_cal changes begin

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

2677: msc_sch_wb.atp_debug (' substitition : ' || x_plan_info_rec.subst_flag);
2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2680: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2681: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2682: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2683: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2684: -- ship_rec_cal changes begin
2685: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);

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

2678: msc_sch_wb.atp_debug (' copy_plan_id : ' || x_plan_info_rec.copy_plan_id);
2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2680: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2681: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2682: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2683: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2684: -- ship_rec_cal changes begin
2685: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2686: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);

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

2679: msc_sch_wb.atp_debug (' start date : ' || x_plan_info_rec.plan_start_date);
2680: msc_sch_wb.atp_debug (' cutoff date : ' || x_plan_info_rec.plan_cutoff_date);
2681: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2682: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2683: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2684: -- ship_rec_cal changes begin
2685: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2686: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2687: -- ship_rec_cal changes end

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

2681: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || x_plan_info_rec.curr_cutoff_date);
2682: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2683: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2684: -- ship_rec_cal changes begin
2685: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2686: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2687: -- ship_rec_cal changes end
2688: -- ATP4drp changes begin
2689: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

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

2682: msc_sch_wb.atp_debug (' sr_instance_id : ' || x_plan_info_rec.sr_instance_id);
2683: msc_sch_wb.atp_debug (' org_id : ' || x_plan_info_rec.organization_id);
2684: -- ship_rec_cal changes begin
2685: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2686: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2687: -- ship_rec_cal changes end
2688: -- ATP4drp changes begin
2689: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2690: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);

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

2685: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || x_plan_info_rec.enforce_sup_capacity);
2686: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2687: -- ship_rec_cal changes end
2688: -- ATP4drp changes begin
2689: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2690: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2691: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2692: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2693: -- ATP4drp changes end

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

2686: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || x_plan_info_rec.enforce_pur_lead_time);
2687: -- ship_rec_cal changes end
2688: -- ATP4drp changes begin
2689: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2690: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2691: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2692: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2693: -- ATP4drp changes end
2694: msc_sch_wb.atp_debug (' ---- ');

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

2687: -- ship_rec_cal changes end
2688: -- ATP4drp changes begin
2689: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2690: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2691: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2692: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2693: -- ATP4drp changes end
2694: msc_sch_wb.atp_debug (' ---- ');
2695: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);

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

2688: -- ATP4drp changes begin
2689: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2690: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2691: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2692: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2693: -- ATP4drp changes end
2694: msc_sch_wb.atp_debug (' ---- ');
2695: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2696: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;

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

2690: msc_sch_wb.atp_debug (' optimized_plan : ' || x_plan_info_rec.optimized_plan);
2691: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2692: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2693: -- ATP4drp changes end
2694: msc_sch_wb.atp_debug (' ---- ');
2695: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2696: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2697: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);

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

2691: msc_sch_wb.atp_debug (' plan_type : ' || x_plan_info_rec.plan_type);
2692: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2693: -- ATP4drp changes end
2694: msc_sch_wb.atp_debug (' ---- ');
2695: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2696: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2697: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);

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

2692: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || x_plan_info_rec.itf_horiz_days);
2693: -- ATP4drp changes end
2694: msc_sch_wb.atp_debug (' ---- ');
2695: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2696: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2697: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);

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

2693: -- ATP4drp changes end
2694: msc_sch_wb.atp_debug (' ---- ');
2695: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2696: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2697: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);

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

2694: msc_sch_wb.atp_debug (' ---- ');
2695: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2696: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2697: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2702: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);

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

2695: msc_sch_wb.atp_debug ('Query Output : New Plan ID : ' || l_plan_info_rec.plan_id);
2696: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2697: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2702: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2703: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);

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

2696: msc_sch_wb.atp_debug (' plan name: : ' || l_plan_info_rec.plan_name) ;
2697: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2702: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2703: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2704: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);

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

2697: msc_sch_wb.atp_debug (' assign_set_id : ' || l_plan_info_rec.assignment_set_id) ;
2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2702: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2703: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2704: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2705: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);

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

2698: msc_sch_wb.atp_debug (' summary_flag : ' || l_plan_info_rec.summary_flag);
2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2702: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2703: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2704: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2705: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2706: -- ship_rec_cal changes begin

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

2699: msc_sch_wb.atp_debug (' substitition : ' || l_plan_info_rec.subst_flag);
2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2702: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2703: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2704: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2705: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2706: -- ship_rec_cal changes begin
2707: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);

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

2700: msc_sch_wb.atp_debug (' copy_plan_id : ' || l_plan_info_rec.copy_plan_id);
2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2702: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2703: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2704: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2705: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2706: -- ship_rec_cal changes begin
2707: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2708: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);

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

2701: msc_sch_wb.atp_debug (' start date : ' || l_plan_info_rec.plan_start_date);
2702: msc_sch_wb.atp_debug (' cutoff date : ' || l_plan_info_rec.plan_cutoff_date);
2703: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2704: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2705: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2706: -- ship_rec_cal changes begin
2707: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2708: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2709: msc_sch_wb.atp_debug (' ---- ');

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

2703: msc_sch_wb.atp_debug (' curr_cutoff dt : ' || l_plan_info_rec.curr_cutoff_date);
2704: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2705: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2706: -- ship_rec_cal changes begin
2707: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2708: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2709: msc_sch_wb.atp_debug (' ---- ');
2710: -- ship_rec_cal changes end
2711: -- ATP4drp changes begin

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

2704: msc_sch_wb.atp_debug (' sr_instance_id : ' || l_plan_info_rec.sr_instance_id);
2705: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2706: -- ship_rec_cal changes begin
2707: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2708: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2709: msc_sch_wb.atp_debug (' ---- ');
2710: -- ship_rec_cal changes end
2711: -- ATP4drp changes begin
2712: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);

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

2705: msc_sch_wb.atp_debug (' org_id : ' || l_plan_info_rec.organization_id);
2706: -- ship_rec_cal changes begin
2707: msc_sch_wb.atp_debug (' enforce_sup_capacity : ' || l_plan_info_rec.enforce_sup_capacity);
2708: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2709: msc_sch_wb.atp_debug (' ---- ');
2710: -- ship_rec_cal changes end
2711: -- ATP4drp changes begin
2712: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2713: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);

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

2708: msc_sch_wb.atp_debug (' enforce_pur_lead_time : ' || l_plan_info_rec.enforce_pur_lead_time);
2709: msc_sch_wb.atp_debug (' ---- ');
2710: -- ship_rec_cal changes end
2711: -- ATP4drp changes begin
2712: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2713: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2714: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2715: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2716: -- ATP4drp changes end

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

2709: msc_sch_wb.atp_debug (' ---- ');
2710: -- ship_rec_cal changes end
2711: -- ATP4drp changes begin
2712: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2713: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2714: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2715: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2716: -- ATP4drp changes end
2717: msc_sch_wb.atp_debug (' ---- ');

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

2710: -- ship_rec_cal changes end
2711: -- ATP4drp changes begin
2712: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2713: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2714: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2715: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2716: -- ATP4drp changes end
2717: msc_sch_wb.atp_debug (' ---- ');
2718: END IF;

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

2711: -- ATP4drp changes begin
2712: msc_sch_wb.atp_debug (' optimized_plan : ' || l_plan_info_rec.optimized_plan);
2713: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2714: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2715: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2716: -- ATP4drp changes end
2717: msc_sch_wb.atp_debug (' ---- ');
2718: END IF;
2719:

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

2713: msc_sch_wb.atp_debug (' plan_type : ' || l_plan_info_rec.plan_type);
2714: msc_sch_wb.atp_debug (' ITF_HORIZ_DAYS : ' || l_plan_info_rec.itf_horiz_days);
2715: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2716: -- ATP4drp changes end
2717: msc_sch_wb.atp_debug (' ---- ');
2718: END IF;
2719:
2720: if (NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'Y') then
2721: -- this is a sync call

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

2720: if (NVL(MSC_ATP_PVT.G_SYNC_ATP_CHECK, 'N') = 'Y') then
2721: -- this is a sync call
2722: l_using_new_plan := 1;
2723: if PG_DEBUG in ('Y','C') then
2724: msc_sch_wb.atp_debug ('Sync process. Switching plan to '|| l_plan_info_rec.plan_id);
2725: end if;
2726: if (l_plan_info_rec.plan_id IS NULL) then
2727: if PG_DEBUG in ('Y','C') then
2728: msc_sch_wb.atp_debug ('Cannot find new plan during SYNC ATP check call');

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

2724: msc_sch_wb.atp_debug ('Sync process. Switching plan to '|| l_plan_info_rec.plan_id);
2725: end if;
2726: if (l_plan_info_rec.plan_id IS NULL) then
2727: if PG_DEBUG in ('Y','C') then
2728: msc_sch_wb.atp_debug ('Cannot find new plan during SYNC ATP check call');
2729: msc_sch_wb.atp_debug ('Going by old plan to account for extended sync');
2730: end if;
2731: l_plan_info_rec := x_plan_info_rec;
2732: end if;

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

2725: end if;
2726: if (l_plan_info_rec.plan_id IS NULL) then
2727: if PG_DEBUG in ('Y','C') then
2728: msc_sch_wb.atp_debug ('Cannot find new plan during SYNC ATP check call');
2729: msc_sch_wb.atp_debug ('Going by old plan to account for extended sync');
2730: end if;
2731: l_plan_info_rec := x_plan_info_rec;
2732: end if;
2733:

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

2756: l_summary_flag := x_plan_info_rec.summary_flag;
2757: MSC_ATP_PVT.G_PLAN_SUBST_FLAG := x_plan_info_rec.subst_flag;
2758:
2759: if PG_DEBUG in ('Y','C') then
2760: msc_sch_wb.atp_debug ('Plan_ID after processing switches is : ' || x_plan_info_rec.plan_id);
2761: end if;
2762:
2763: -- ATP4drp
2764: IF NVL(x_plan_info_rec.plan_type, 1) = 5 THEN -- DRP plan then re-set variables

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

2764: IF NVL(x_plan_info_rec.plan_type, 1) = 5 THEN -- DRP plan then re-set variables
2765: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2766: l_time_phased_atp := 'N';
2767: IF PG_DEBUG in ('Y','C') then
2768: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2769: msc_sch_wb.atp_debug('DRP Plan, re-setting variables');
2770: END IF;
2771: ELSE
2772: l_time_phased_atp := p_time_phased_atp; -- ALLOC ATP CHANGES, 12973673

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

2765: MSC_ATP_PVT.G_ALLOCATED_ATP := 'N';
2766: l_time_phased_atp := 'N';
2767: IF PG_DEBUG in ('Y','C') then
2768: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
2769: msc_sch_wb.atp_debug('DRP Plan, re-setting variables');
2770: END IF;
2771: ELSE
2772: l_time_phased_atp := p_time_phased_atp; -- ALLOC ATP CHANGES, 12973673
2773: END IF;

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

2771: ELSE
2772: l_time_phased_atp := p_time_phased_atp; -- ALLOC ATP CHANGES, 12973673
2773: END IF;
2774: IF PG_DEBUG in ('Y','C') then
2775: msc_sch_wb.atp_debug('Value of MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2776: msc_sch_wb.atp_debug('Value of l_time_phased_atp :' || l_time_phased_atp);
2777: msc_sch_wb.atp_debug('Value of p_time_phased_atp :' || p_time_phased_atp);
2778: END IF;
2779: -- End ATP4drp

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

2772: l_time_phased_atp := p_time_phased_atp; -- ALLOC ATP CHANGES, 12973673
2773: END IF;
2774: IF PG_DEBUG in ('Y','C') then
2775: msc_sch_wb.atp_debug('Value of MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2776: msc_sch_wb.atp_debug('Value of l_time_phased_atp :' || l_time_phased_atp);
2777: msc_sch_wb.atp_debug('Value of p_time_phased_atp :' || p_time_phased_atp);
2778: END IF;
2779: -- End ATP4drp
2780: IF x_plan_info_rec.plan_id > 0 THEN

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

2773: END IF;
2774: IF PG_DEBUG in ('Y','C') then
2775: msc_sch_wb.atp_debug('Value of MSC_ATP_PVT.G_ALLOCATED_ATP :' || MSC_ATP_PVT.G_ALLOCATED_ATP);
2776: msc_sch_wb.atp_debug('Value of l_time_phased_atp :' || l_time_phased_atp);
2777: msc_sch_wb.atp_debug('Value of p_time_phased_atp :' || p_time_phased_atp);
2778: END IF;
2779: -- End ATP4drp
2780: IF x_plan_info_rec.plan_id > 0 THEN
2781:

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

2786:
2787: IF l_summary_flag = MSC_POST_PRO.G_SF_SUMMARY_NOT_RUN THEN -- Summary / pre-allocation was never run.
2788: x_plan_info_rec.plan_id := -200;
2789: if PG_DEBUG in ('Y','C') then
2790: msc_sch_wb.atp_debug('Pre-allocation process needs to be run');
2791: end if;
2792: ELSIF l_summary_flag = MSC_POST_PRO.G_SF_PREALLOC_RUNNING THEN -- Pre-allocation is running.
2793: x_plan_info_rec.plan_id := -100;
2794: if PG_DEBUG in ('Y','C') then

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

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

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

2802: IF l_summary_flag = 1 THEN
2803: -- set the summary flag
2804: MSC_ATP_PVT.G_SUMMARY_FLAG := 'N';
2805: if PG_DEBUG in ('Y','C') then
2806: msc_sch_wb.atp_debug('Switch from summary to details tables');
2807: end if;
2808: ELSIF l_summary_flag = 2 THEN*/
2809: ELSIF l_summary_flag IN (MSC_POST_PRO.G_SF_SUMMARY_NOT_RUN, MSC_POST_PRO.G_SF_PREALLOC_RUNNING) THEN
2810: -- This means that PF bucketting has not started or is still in progress

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

2810: -- This means that PF bucketting has not started or is still in progress
2811: IF nvl(l_time_phased_atp,'N') = 'Y' THEN -- ATP4drp Use local variable instead of parameter
2812: x_plan_info_rec.plan_id := -100; --changed for 2392456
2813: if PG_DEBUG in ('Y','C') then
2814: msc_sch_wb.atp_debug('PF bucketting process is running or was never run');
2815: end if;
2816: END IF;
2817: END IF;
2818:

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

2825: if l_plan_info_rec.summary_flag = MSC_ATP_24x7.G_SF_SYNC_DOWNTIME then
2826: -- downtime during ATP sync process
2827: x_plan_info_rec.plan_id := -300;
2828: if PG_DEBUG in ('Y','C') then
2829: msc_sch_wb.atp_debug ('ATP Downtime based on new plan');
2830: end if;
2831: end if;
2832: end if;
2833: END IF;

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

2832: end if;
2833: END IF;
2834:
2835: IF PG_DEBUG in ('Y', 'C') THEN
2836: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'x_plan_info_rec.plan_id - ' || x_plan_info_rec.plan_id);
2837: msc_sch_wb.atp_debug('**************** Get_Plan_Info End ***************');
2838: END IF;
2839:
2840: END Get_Plan_Info;

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

2833: END IF;
2834:
2835: IF PG_DEBUG in ('Y', 'C') THEN
2836: msc_sch_wb.atp_debug('Get_Plan_Info : ' || 'x_plan_info_rec.plan_id - ' || x_plan_info_rec.plan_id);
2837: msc_sch_wb.atp_debug('**************** Get_Plan_Info End ***************');
2838: END IF;
2839:
2840: END Get_Plan_Info;
2841:

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

2848:
2849: BEGIN
2850:
2851: IF PG_DEBUG in ('Y', 'C') THEN
2852: msc_sch_wb.atp_debug('*******Begin Atp_Backward_Consume Procedure******');
2853: END IF;
2854:
2855: -- this for loop will do backward consumption
2856: FOR i in 2..p_atp_qty.COUNT LOOP

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

2879: END IF;
2880: END LOOP;
2881:
2882: IF PG_DEBUG in ('Y', 'C') THEN
2883: msc_sch_wb.atp_debug('*******End Atp_Backward_Consume Procedure******');
2884: END IF;
2885:
2886: END Atp_Backward_Consume;
2887:

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

2894:
2895: BEGIN
2896:
2897: IF PG_DEBUG in ('Y', 'C') THEN
2898: msc_sch_wb.atp_debug('*******Begin Atp_Accumulate Procedure***********');
2899: END IF;
2900: -- this for loop will do the acculumation
2901: FOR i in 2..p_atp_qty.COUNT LOOP
2902: -- accumulation (only the surplus)

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

2907: -- END IF;
2908: END LOOP;
2909:
2910: IF PG_DEBUG in ('Y', 'C') THEN
2911: msc_sch_wb.atp_debug('**********End Atp_Accumulate Procedure***********');
2912: END IF;
2913: END Atp_Accumulate;
2914:
2915: PROCEDURE Add_Coproducts(

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

2945: --3766179
2946: l_supply_rec_type MSC_ATP_DB_UTILS.Supply_Rec_typ;
2947: BEGIN
2948: IF PG_DEBUG in ('Y', 'C') THEN
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);

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

2946: l_supply_rec_type MSC_ATP_DB_UTILS.Supply_Rec_typ;
2947: BEGIN
2948: IF PG_DEBUG in ('Y', 'C') THEN
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);

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

2947: BEGIN
2948: IF PG_DEBUG in ('Y', 'C') THEN
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);

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

2948: IF PG_DEBUG in ('Y', 'C') THEN
2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);

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

2949: msc_sch_wb.atp_debug('Add_Coproducts: ' || '******* Start ADD_COPRODUCT ********');
2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);

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

2950: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_plan_id := ' || p_plan_id);
2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2958: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);

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

2951: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_instance_id := ' || p_instance_id);
2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2958: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2959: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);

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

2952: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_org_id := ' || p_org_id);
2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2958: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2959: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2960: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);

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

2953: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_inv_item_id := ' || p_inv_item_id);
2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2958: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2959: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2960: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2961: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);

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

2954: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_request_date := ' || p_request_date);
2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2958: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2959: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2960: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2961: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);
2962: END IF;

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

2955: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_demand_class := ' || p_demand_class);
2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2958: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2959: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2960: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2961: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);
2962: END IF;
2963: ------ determine the coproducts and their quantities

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

2956: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_assembly_qty := ' || p_assembly_qty);
2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2958: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2959: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2960: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2961: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);
2962: END IF;
2963: ------ determine the coproducts and their quantities
2964: -- Tuned the query for performance bug 2484964

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

2957: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_parent_pegging_id := ' || p_parent_pegging_id);
2958: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_rounding_flag := ' || p_rounding_flag);
2959: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_refresh_number := ' || p_refresh_number);
2960: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' p_disposition_id := ' || p_disposition_id);
2961: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'p_parent_pegging_id := ' || p_parent_pegging_id);
2962: END IF;
2963: ------ determine the coproducts and their quantities
2964: -- Tuned the query for performance bug 2484964
2965: SELECT inventory_item_id,quantity

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

3006: TP.sr_instance_id = MBC.sr_instance_id and
3007: TP.sr_tp_id = MBC.organization_id and
3008: TP.partner_type = 3 );
3009: IF PG_DEBUG in ('Y', 'C') THEN
3010: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'No of Coproducts = ' || l_coproducts_rec.inventory_item_id.count);
3011: END IF;
3012: FOR rec_count in 1..l_coproducts_rec.inventory_item_id.count LOOP
3013: IF PG_DEBUG in ('Y', 'C') THEN
3014: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));

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

3010: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'No of Coproducts = ' || l_coproducts_rec.inventory_item_id.count);
3011: END IF;
3012: FOR rec_count in 1..l_coproducts_rec.inventory_item_id.count LOOP
3013: IF PG_DEBUG in ('Y', 'C') THEN
3014: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));
3015: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'Coproduct quantity ='|| l_coproducts_rec.quantity(rec_count));
3016: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct date = ' || p_request_date);
3017: END IF;
3018: /* rajjain 02/19/2003 Bug 2788302 Begin

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

3011: END IF;
3012: FOR rec_count in 1..l_coproducts_rec.inventory_item_id.count LOOP
3013: IF PG_DEBUG in ('Y', 'C') THEN
3014: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));
3015: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'Coproduct quantity ='|| l_coproducts_rec.quantity(rec_count));
3016: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct date = ' || p_request_date);
3017: END IF;
3018: /* rajjain 02/19/2003 Bug 2788302 Begin
3019: * get Process Sequence ID */

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

3012: FOR rec_count in 1..l_coproducts_rec.inventory_item_id.count LOOP
3013: IF PG_DEBUG in ('Y', 'C') THEN
3014: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct id = ' ||l_coproducts_rec.inventory_item_id(rec_count));
3015: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'Coproduct quantity ='|| l_coproducts_rec.quantity(rec_count));
3016: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'coproduct date = ' || p_request_date);
3017: END IF;
3018: /* rajjain 02/19/2003 Bug 2788302 Begin
3019: * get Process Sequence ID */
3020: l_process_seq_id := MSC_ATP_FUNC.get_process_seq_id(

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

3102: l_transaction_id := l_supply_rec_type.transaction_id;
3103: l_return_status := l_supply_rec_type.return_status;
3104:
3105: IF PG_DEBUG in ('Y', 'C') THEN
3106: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'l_transaction_id := ' || l_transaction_id);
3107: msc_Sch_wb.atp_debug('Add_Coproducts: ' || 'Add pegging for coproducts where pegging id = 4');
3108: END IF;
3109:
3110: INSERT into mrp_atp_details_temp

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

3103: l_return_status := l_supply_rec_type.return_status;
3104:
3105: IF PG_DEBUG in ('Y', 'C') THEN
3106: msc_sch_wb.atp_debug('Add_Coproducts: ' || 'l_transaction_id := ' || l_transaction_id);
3107: msc_Sch_wb.atp_debug('Add_Coproducts: ' || 'Add pegging for coproducts where pegging id = 4');
3108: END IF;
3109:
3110: INSERT into mrp_atp_details_temp
3111: (session_id,

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

3195: , FND_GLOBAL.USER_ID -- login_by
3196: )
3197: RETURNING pegging_id INTO l_pegging_id;
3198: IF PG_DEBUG in ('Y', 'C') THEN
3199: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' rec_count : = ' || rec_count);
3200: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' l_pegging_id : = ' || l_pegging_id);
3201: END IF;
3202: END LOOP;
3203: IF PG_DEBUG in ('Y', 'C') THEN

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

3196: )
3197: RETURNING pegging_id INTO l_pegging_id;
3198: IF PG_DEBUG in ('Y', 'C') THEN
3199: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' rec_count : = ' || rec_count);
3200: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' l_pegging_id : = ' || l_pegging_id);
3201: END IF;
3202: END LOOP;
3203: IF PG_DEBUG in ('Y', 'C') THEN
3204: msc_sch_wb.atp_debug('**********End ADD_Coproducts Procedure***********');

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

3200: msc_sch_wb.atp_debug('Add_Coproducts: ' || ' l_pegging_id : = ' || l_pegging_id);
3201: END IF;
3202: END LOOP;
3203: IF PG_DEBUG in ('Y', 'C') THEN
3204: msc_sch_wb.atp_debug('**********End ADD_Coproducts Procedure***********');
3205: END IF;
3206:
3207: END ADD_COPRODUCTS;
3208:

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

3291: mast_cursor mastcurtyp;
3292: BEGIN
3293:
3294: /*IF PG_DEBUG in ('Y', 'C') THEN
3295: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'Inside of atp_proc ');
3296: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id);
3297: END IF; */
3298: /*----------------------------------------------------------------------------
3299: -- This procedure will be on the ATP server and will be called thru

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

3292: BEGIN
3293:
3294: /*IF PG_DEBUG in ('Y', 'C') THEN
3295: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'Inside of atp_proc ');
3296: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id);
3297: END IF; */
3298: /*----------------------------------------------------------------------------
3299: -- This procedure will be on the ATP server and will be called thru
3300: -- the atp link from the client.

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

3298: /*----------------------------------------------------------------------------
3299: -- This procedure will be on the ATP server and will be called thru
3300: -- the atp link from the client.
3301: ----------------------------------------------------------------------------*/
3302: msc_sch_wb.set_session_id(x_session_id); -- Set session ID for debug file.
3303: --bug3610706 start
3304: IF PG_DEBUG in ('Y', 'C') THEN
3305: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id || ':' || x_session_id);
3306: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'x_sr_instance_id ' || x_sr_instance_id);

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

3301: ----------------------------------------------------------------------------*/
3302: msc_sch_wb.set_session_id(x_session_id); -- Set session ID for debug file.
3303: --bug3610706 start
3304: IF PG_DEBUG in ('Y', 'C') THEN
3305: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id || ':' || x_session_id);
3306: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'x_sr_instance_id ' || x_sr_instance_id);
3307: END IF;
3308: l_dblink := null;
3309: IF p_node_id is not null THEN

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

3302: msc_sch_wb.set_session_id(x_session_id); -- Set session ID for debug file.
3303: --bug3610706 start
3304: IF PG_DEBUG in ('Y', 'C') THEN
3305: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'p_node_id ' || p_node_id || ':' || x_session_id);
3306: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'x_sr_instance_id ' || x_sr_instance_id);
3307: END IF;
3308: l_dblink := null;
3309: IF p_node_id is not null THEN
3310: BEGIN

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

3314: FROM msc_apps_instance_nodes
3315: WHERE instance_id = x_sr_instance_id and
3316: node_id = p_node_id;
3317: IF PG_DEBUG in ('Y', 'C') THEN
3318: msc_sch_wb.atp_debug('RAC instance');
3319: END IF;
3320: EXCEPTION
3321: WHEN OTHERS THEN
3322: l_dblink := null;

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

3320: EXCEPTION
3321: WHEN OTHERS THEN
3322: l_dblink := null;
3323: IF PG_DEBUG in ('Y', 'C') THEN
3324: msc_sch_wb.atp_debug('Did not get records in rac case');
3325: END IF;
3326: END;
3327: END IF;
3328: /* Bug 2085071 Fix */

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

3343: l_dynstring := '@'||l_dblink;
3344: END IF;
3345:
3346: IF PG_DEBUG in ('Y', 'C') THEN
3347: msc_sch_wb.atp_debug('get_Supply_Sources: ' || ' l_dblink '||l_dblink);
3348: END IF;
3349:
3350: /*--------------------------------------------------
3351: selecting ship method and delivery lead time passed

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

3375: ' order_line_id = nvl(ato_model_line_id, order_line_id)'||
3376: ' AND rownum = 1';
3377:
3378: IF PG_DEBUG in ('Y', 'C') THEN
3379: msc_sch_wb.atp_debug('get_Supply_Sources: ' || 'sql_stmt : ' || sql_stmt);
3380: END IF;
3381:
3382: EXECUTE IMMEDIATE sql_stmt INTO l_sr_instance_id,l_om_source_org,
3383: l_organization_id,

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

3385: g_ship_method_rec.ship_method,g_ship_method_rec.intransit_time,
3386: g_ship_method_rec.ship_method_text
3387: using x_session_id;
3388: IF PG_DEBUG in ('Y', 'C') THEN
3389: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);
3390: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);
3391: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3392: g_ship_method_rec.ship_method);
3393: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||

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

3386: g_ship_method_rec.ship_method_text
3387: using x_session_id;
3388: IF PG_DEBUG in ('Y', 'C') THEN
3389: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);
3390: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);
3391: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3392: g_ship_method_rec.ship_method);
3393: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3394: g_ship_method_rec.intransit_time);

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

3387: using x_session_id;
3388: IF PG_DEBUG in ('Y', 'C') THEN
3389: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);
3390: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);
3391: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3392: g_ship_method_rec.ship_method);
3393: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3394: g_ship_method_rec.intransit_time);
3395: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);

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

3389: msc_sch_wb.atp_debug('l_organization_id (destin org ) ' || l_organization_id);
3390: msc_sch_wb.atp_debug('l_om_source_org is ' ||l_om_source_org);
3391: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3392: g_ship_method_rec.ship_method);
3393: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3394: g_ship_method_rec.intransit_time);
3395: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);
3396: msc_sch_wb.atp_debug('l_customer_site_id is ' || l_customer_site_id);
3397: END IF;

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

3391: msc_sch_wb.atp_debug('g_ship_method_rec.ship_method is ' ||
3392: g_ship_method_rec.ship_method);
3393: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3394: g_ship_method_rec.intransit_time);
3395: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);
3396: msc_sch_wb.atp_debug('l_customer_site_id is ' || l_customer_site_id);
3397: END IF;
3398:
3399: sql_stmt :=

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

3392: g_ship_method_rec.ship_method);
3393: msc_sch_wb.atp_debug('g_ship_method_rec.intransit_time is ' ||
3394: g_ship_method_rec.intransit_time);
3395: msc_sch_wb.atp_debug('l_customer_id is ' || l_customer_id);
3396: msc_sch_wb.atp_debug('l_customer_site_id is ' || l_customer_site_id);
3397: END IF;
3398:
3399: sql_stmt :=
3400: ' SELECT inventory_item_id ,order_line_id, ato_model_line_id,'||

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

3423: l_item_sourcing_rec.match_item_id.trim(1);
3424:
3425:
3426: IF PG_DEBUG in ('Y', 'C') THEN
3427: msc_sch_wb.atp_debug(' count is ' ||
3428: l_item_sourcing_rec.sr_inventory_item_id. count);
3429: msc_sch_wb.atp_debug('get_Supply_Sources: ' || ' Plan_id : '||
3430: x_plan_id||' assgn_id : '||x_assignment_set_id||
3431: ' inst_id : '||l_sr_instance_id);

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

3425:
3426: IF PG_DEBUG in ('Y', 'C') THEN
3427: msc_sch_wb.atp_debug(' count is ' ||
3428: l_item_sourcing_rec.sr_inventory_item_id. count);
3429: msc_sch_wb.atp_debug('get_Supply_Sources: ' || ' Plan_id : '||
3430: x_plan_id||' assgn_id : '||x_assignment_set_id||
3431: ' inst_id : '||l_sr_instance_id);
3432: END IF;
3433:

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

3455: WHERE session_id = :x_session_id)';
3456: EXECUTE IMMEDIATE sql_stmt USING x_session_id;
3457:
3458: IF PG_DEBUG in ('Y', 'C') THEN
3459: msc_sch_wb.atp_debug('Rows inserted in msc_regions_temp:'|| sql%rowcount);
3460: END IF;
3461: END IF;
3462: --bug3610706 End Changes
3463:

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

3463:
3464: IF l_item_sourcing_rec.sr_inventory_item_id.COUNT > 0 THEN
3465:
3466: IF PG_DEBUG in ('Y', 'C') THEN
3467: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3468: 'l_item_sourcing_rec.sr_inventory_item_id(1) : '
3469: || l_item_sourcing_rec.sr_inventory_item_id(1));
3470: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3471: 'l_item_sourcing_rec.line_id(1) : '

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

3466: IF PG_DEBUG in ('Y', 'C') THEN
3467: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3468: 'l_item_sourcing_rec.sr_inventory_item_id(1) : '
3469: || l_item_sourcing_rec.sr_inventory_item_id(1));
3470: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3471: 'l_item_sourcing_rec.line_id(1) : '
3472: || l_item_sourcing_rec.line_id(1));
3473: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3474: 'l_item_sourcing_rec.ato_line_id(1) : '

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

3469: || l_item_sourcing_rec.sr_inventory_item_id(1));
3470: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3471: 'l_item_sourcing_rec.line_id(1) : '
3472: || l_item_sourcing_rec.line_id(1));
3473: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3474: 'l_item_sourcing_rec.ato_line_id(1) : '
3475: || l_item_sourcing_rec.ato_line_id(1));
3476: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3477: 'l_item_sourcing_rec.match_item_id(1) : '

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

3472: || l_item_sourcing_rec.line_id(1));
3473: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3474: 'l_item_sourcing_rec.ato_line_id(1) : '
3475: || l_item_sourcing_rec.ato_line_id(1));
3476: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3477: 'l_item_sourcing_rec.match_item_id(1) : '
3478: || l_item_sourcing_rec.match_item_id(1));
3479: END IF;
3480:

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

3492:
3493: IF l_return_status <> 'S' THEN
3494: x_error_mesg := l_return_status;
3495: IF PG_DEBUG in ('Y', 'C') THEN
3496: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3497: ' Error in call to msc_atp_pvt.atp_sources ');
3498: END IF;
3499: RETURN ;
3500: ELSE

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

3498: END IF;
3499: RETURN ;
3500: ELSE
3501: IF PG_DEBUG in ('Y', 'C') THEN
3502: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3503: ' Success in call to atp_sources : ' ||
3504: l_sources.organization_id.COUNT);
3505: END IF;
3506: END IF;

Line 3509: MSC_SCH_WB.extend_other_cols(l_other_cols,

3505: END IF;
3506: END IF;
3507:
3508: IF l_sources.organization_id.COUNT > 0 THEN
3509: MSC_SCH_WB.extend_other_cols(l_other_cols,
3510: l_sources.organization_id.COUNT);
3511:
3512: FOR j IN 1..l_sources.organization_id.COUNT LOOP
3513: -- cchen's api returns these values.

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

3528: AND partner_type = 3;
3529: EXCEPTION
3530: WHEN no_data_found THEN
3531: IF PG_DEBUG in ('Y', 'C') THEN
3532: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3533: ' Org Code Not found for : ' ||
3534: l_sources.organization_id(j));
3535: END IF;
3536: x_error_mesg := 'Org Code Not found for : ' ||

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

3562:
3563: EXCEPTION
3564: WHEN no_data_found THEN
3565: IF PG_DEBUG in ('Y', 'C') THEN
3566: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3567: 'Vendor name or site name Not found for '
3568: ||l_sources.organization_id(j));
3569: END IF;
3570: x_error_mesg :='Vendor name or site name Not found for'

Line 3605: msc_sch_wb.atp_debug('get_Supply_Sources: '

3601: l_customer_site_id,
3602: l_sources.supplier_id(counter), l_sources.supplier_site_id(counter));
3603:
3604: IF PG_DEBUG in ('Y', 'C') THEN
3605: msc_sch_wb.atp_debug('get_Supply_Sources: '
3606: || ' l_to_location_id '
3607: ||l_to_location_id);
3608: END IF;
3609:

Line 3624: msc_sch_wb.atp_debug('get_Supply_Sources: '

3620:
3621: -- here we are getting shipping methods for specific from location to location
3622:
3623: IF PG_DEBUG in ('Y', 'C') THEN
3624: msc_sch_wb.atp_debug('get_Supply_Sources: '
3625: || ' l_from_location_id '
3626: ||l_from_location_id);
3627: END IF;
3628:

Line 3688: msc_sch_wb.atp_debug('get_Supply_Sources: '

3684: FND_GLOBAL.USER_ID,
3685: FND_GLOBAL.USER_ID;
3686:
3687: IF PG_DEBUG in ('Y', 'C') THEN
3688: msc_sch_wb.atp_debug('get_Supply_Sources: '
3689: || ' after exec of above sql ');
3690: END IF;
3691:
3692: END;

Line 3698: msc_sch_wb.atp_debug('get_Supply_Sources: '

3694: END LOOP; -- finish looping through all available shipping methods
3695: CLOSE SH_METHODS;
3696:
3697: IF PG_DEBUG in ('Y', 'C') THEN
3698: msc_sch_wb.atp_debug('get_Supply_Sources: '
3699: || 'l_ship_method AFTER FIRST SQL '
3700: || l_ship_method);
3701: END IF;
3702:

Line 3716: msc_sch_wb.atp_debug('get_Supply_Sources: '

3712: FETCH c_region_level INTO l_region_level, l_region_id;
3713: CLOSE c_region_level;
3714:
3715: IF PG_DEBUG in ('Y', 'C') THEN
3716: msc_sch_wb.atp_debug('get_Supply_Sources: '
3717: || 'region level is '
3718: || l_region_level || ' and region_id '
3719: || l_region_id);
3720: END IF;

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

3840: WHEN no_data_found THEN
3841: l_other_cols.ship_method_text(counter)
3842: := l_sources.ship_method(counter);
3843: IF PG_DEBUG in ('Y', 'C') THEN
3844: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3845: 'no desc for ship method ');
3846: END IF;
3847: END;
3848: END IF;

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

3856: x_calling_inst,
3857: l_sources,l_other_cols);
3858: ELSE
3859: IF PG_DEBUG in ('Y', 'C') THEN
3860: msc_sch_wb.atp_debug('get_Supply_Sources: ' ||
3861: ' There are no sources to be inserted ');
3862: END IF;
3863: x_ret_status := 'E';
3864: x_error_mesg := 'MRP_ATP_NO_SOURCES';

Line 3876: msc_sch_wb.atp_debug('get_Supply_Sources: '

3872: DELETE msc_regions_temp
3873: WHERE session_id = x_session_id;
3874:
3875: IF PG_DEBUG in ('Y', 'C') THEN
3876: msc_sch_wb.atp_debug('get_Supply_Sources: '
3877: || 'Rows deleted from msc_regions_temp : '
3878: ||sql%rowcount);
3879: END IF;
3880: --ubadrina bug 2265012 begin

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

3905:
3906: l_from_location_id NUMBER;
3907: l_to_location_id NUMBER;
3908: BEGIN
3909: msc_sch_wb.atp_debug('!!!!!msc_calculate_attrib !!!!!!');
3910: msc_sch_wb.atp_debug(' x_atp_sources.lead_time(counter) is '|| x_atp_sources.lead_time(counter));
3911: msc_sch_wb.atp_debug('x_atp_sources.ship_method(counter) is '|| x_atp_sources.ship_method(counter));
3912:
3913: IF x_atp_sources.lead_time(counter) IS NULL THEN

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

3906: l_from_location_id NUMBER;
3907: l_to_location_id NUMBER;
3908: BEGIN
3909: msc_sch_wb.atp_debug('!!!!!msc_calculate_attrib !!!!!!');
3910: msc_sch_wb.atp_debug(' x_atp_sources.lead_time(counter) is '|| x_atp_sources.lead_time(counter));
3911: msc_sch_wb.atp_debug('x_atp_sources.ship_method(counter) is '|| x_atp_sources.ship_method(counter));
3912:
3913: IF x_atp_sources.lead_time(counter) IS NULL THEN
3914: -- find the ship method and intransit time

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

3907: l_to_location_id NUMBER;
3908: BEGIN
3909: msc_sch_wb.atp_debug('!!!!!msc_calculate_attrib !!!!!!');
3910: msc_sch_wb.atp_debug(' x_atp_sources.lead_time(counter) is '|| x_atp_sources.lead_time(counter));
3911: msc_sch_wb.atp_debug('x_atp_sources.ship_method(counter) is '|| x_atp_sources.ship_method(counter));
3912:
3913: IF x_atp_sources.lead_time(counter) IS NULL THEN
3914: -- find the ship method and intransit time
3915: -- find the from_location_id

Line 3917: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

3913: IF x_atp_sources.lead_time(counter) IS NULL THEN
3914: -- find the ship method and intransit time
3915: -- find the from_location_id
3916: IF PG_DEBUG in ('Y', 'C') THEN
3917: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
3918: || ' find the ship_method and intransit LT');
3919: END IF;
3920:
3921: l_from_location_id :=

Line 3930: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

3926: p_supplier_id => NULL,
3927: p_supplier_site_id => NULL);
3928:
3929: IF PG_DEBUG in ('Y', 'C') THEN
3930: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
3931: || ' from location_id = '||l_from_location_id);
3932: END IF;
3933:
3934: -- find the to_location_id

Line 3944: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

3940: p_supplier_id => NULL,
3941: p_supplier_site_id => NULL);
3942:
3943: IF PG_DEBUG in ('Y', 'C') THEN
3944: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
3945: || ' from to_loc_id = '||l_to_location_id);
3946: END IF;
3947:
3948: -- find the ship method and intransit time first by

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

3978: END IF;
3979:
3980: BEGIN
3981: IF PG_DEBUG in ('Y', 'C') THEN
3982: msc_sch_wb.atp_debug('msc_calculate_source_attrib: ' || 'get vendor_id and vendor_site_id ');
3983: END IF;
3984:
3985: select ORG_INFORMATION3, ORG_INFORMATION4
3986: into x_atp_sources.supplier_id(counter), x_atp_sources.supplier_site_id(counter)

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

3989: and ORG_INFORMATION_CONTEXT = 'Customer/Supplier Association';
3990: exception
3991: when no_data_found THEN
3992: IF PG_DEBUG in ('Y', 'C') THEN
3993: msc_sch_wb.atp_debug('msc_calculate_source_attrib: ' || 'No data found in-get vendor_id and vendor_site_id');
3994: END IF;
3995:
3996: x_atp_sources.supplier_id(counter) := 0;
3997: x_atp_sources.supplier_site_id(counter) :=0;

Line 4002: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

3998: END;
3999:
4000: IF x_atp_sources.SHIP_METHOD(counter) is not null THEN
4001: IF PG_DEBUG in ('Y', 'C') THEN
4002: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
4003: || 'ship method is not null '
4004: ||x_atp_sources.SHIP_METHOD(counter));
4005: END IF;
4006: BEGIN

Line 4018: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '

4014: WHEN no_data_found THEN
4015: x_other_cols.ship_method_text(counter)
4016: := x_atp_sources.ship_method(counter);
4017: IF PG_DEBUG in ('Y', 'C') THEN
4018: msc_sch_wb.atp_debug('msc_calculate_source_attrib: '
4019: || 'no desc for ship method ');
4020: END IF;
4021: END;
4022:

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

4038:
4039: IF x_dblink IS NOT NULL AND x_calling_inst = 'APPS' THEN
4040: l_dynstring := '@'||x_dblink;
4041: IF PG_DEBUG in ('Y', 'C') THEN
4042: msc_sch_wb.atp_debug('insert_atp_sources: ' || 'inserting sources link '||l_dynstring);
4043: END IF;
4044: END IF;
4045:
4046: order_sch_wb.debug_session_id := x_session_id;

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

4044: END IF;
4045:
4046: order_sch_wb.debug_session_id := x_session_id;
4047: IF PG_DEBUG in ('Y', 'C') THEN
4048: msc_sch_wb.atp_debug('insert_atp_sources: ' || 'inserting sources count = '||x_atp_sources.organization_id.count);
4049: END IF;
4050:
4051: sql_stmt :=
4052: ' INSERT INTO '||

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

4133: ' ,:last_update_login' ||
4134: ' FROM mrp_atp_schedule_temp'||l_dynstring||' '||
4135: ' WHERE session_id = :x_session_id '||
4136: ' AND status_flag = 4';
4137: --msc_sch_wb.atp_debug(' sql stmt '||sql_stmt);
4138:
4139: FOR j IN 1..x_atp_sources.organization_id.COUNT LOOP
4140: -- x_atp_sources.organization_id.first..x_atp_sources.organization_id.last
4141: execute immediate sql_stmt

Line 4154: 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));

4150: FND_GLOBAL.USER_ID,
4151: FND_GLOBAL.USER_ID,
4152: x_session_id;
4153: IF PG_DEBUG in ('Y', 'C') THEN
4154: 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));
4155: msc_sch_wb.atp_debug('insert_atp_sources: ' || ' inserted rows '||SQL%ROWCOUNT);
4156: END IF;
4157: END LOOP;
4158: END insert_atp_sources;

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

4151: FND_GLOBAL.USER_ID,
4152: x_session_id;
4153: IF PG_DEBUG in ('Y', 'C') THEN
4154: 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));
4155: msc_sch_wb.atp_debug('insert_atp_sources: ' || ' inserted rows '||SQL%ROWCOUNT);
4156: END IF;
4157: END LOOP;
4158: END insert_atp_sources;
4159:

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

4177: 1- summary_so 2- Summary_sd 3- summary_res 4-Summary_sup */
4178:
4179: IF order_sch_wb.mr_debug = 'Y' THEN -- if debug mode is on
4180: IF PG_DEBUG in ('Y', 'C') THEN
4181: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);

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

4178:
4179: IF order_sch_wb.mr_debug = 'Y' THEN -- if debug mode is on
4180: IF PG_DEBUG in ('Y', 'C') THEN
4181: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);

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

4179: IF order_sch_wb.mr_debug = 'Y' THEN -- if debug mode is on
4180: IF PG_DEBUG in ('Y', 'C') THEN
4181: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);

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

4180: IF PG_DEBUG in ('Y', 'C') THEN
4181: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);

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

4181: msc_sch_wb.atp_debug('**** In SHOW_SUMMARY_QUANTITY Debug mode is on ****');
4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);

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

4182: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_instance_id := ' || p_instance_id);
4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4190: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);

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

4183: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_plan_id := ' || p_plan_id);
4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4190: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4191: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);

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

4184: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_organization_id := ' || p_organization_id);
4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4190: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4191: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4192: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);

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

4185: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4190: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4191: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4192: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4193: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);

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

4186: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_sd_date := ' || p_sd_date);
4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4190: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4191: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4192: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4193: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);
4194: END IF;

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

4187: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_resource_id := ' || p_resource_id);
4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4190: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4191: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4192: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4193: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);
4194: END IF;
4195:

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

4188: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_department_id := ' || p_department_id);
4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4190: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4191: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4192: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4193: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);
4194: END IF;
4195:
4196: IF p_mode = 1 THEN

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

4189: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_id := ' || p_supplier_id);
4190: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_supplier_site_id := ' || p_supplier_site_id);
4191: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_mode := ' || p_mode);
4192: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_demand_class = ' || p_demand_class);
4193: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'p_dc_flag = ' || p_dc_flag);
4194: END IF;
4195:
4196: IF p_mode = 1 THEN
4197: BEGIN

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

4263: END;
4264:
4265: END IF; -- IF p_mode= 1
4266: IF PG_DEBUG in ('Y', 'C') THEN
4267: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'temp_sd_qty := ' || temp_sd_qty);
4268: msc_sch_wb.atp_debug('**** END SHOW_SUMMARY_QUANTITY ****');
4269: END IF;
4270: END IF; -- IF order_sch_wb.mr_debug = 'Y
4271:

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

4264:
4265: END IF; -- IF p_mode= 1
4266: IF PG_DEBUG in ('Y', 'C') THEN
4267: msc_sch_wb.atp_debug('SHOW_SUMMARY_QUANTITY: ' || 'temp_sd_qty := ' || temp_sd_qty);
4268: msc_sch_wb.atp_debug('**** END SHOW_SUMMARY_QUANTITY ****');
4269: END IF;
4270: END IF; -- IF order_sch_wb.mr_debug = 'Y
4271:
4272: END SHOW_SUMMARY_QUANTITY;

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

4289:
4290:
4291: BEGIN
4292: IF PG_DEBUG in ('Y', 'C') THEN
4293: msc_sch_wb.atp_debug('inside get_item_attributes');
4294: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4296: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);

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

4290:
4291: BEGIN
4292: IF PG_DEBUG in ('Y', 'C') THEN
4293: msc_sch_wb.atp_debug('inside get_item_attributes');
4294: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4296: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);

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

4291: BEGIN
4292: IF PG_DEBUG in ('Y', 'C') THEN
4293: msc_sch_wb.atp_debug('inside get_item_attributes');
4294: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4296: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);

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

4292: IF PG_DEBUG in ('Y', 'C') THEN
4293: msc_sch_wb.atp_debug('inside get_item_attributes');
4294: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4296: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4300: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);

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

4293: msc_sch_wb.atp_debug('inside get_item_attributes');
4294: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4296: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4300: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);

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

4294: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_inventory_item_id = '||p_inventory_item_id);
4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4296: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4300: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4302: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||

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

4295: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4296: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4300: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4302: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4303: p_item_attribute_rec.parent_repl_ord_flag);

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

4296: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'plan_id = '||p_plan_id);
4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4300: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4302: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4303: p_item_attribute_rec.parent_repl_ord_flag);
4304: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||

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

4297: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4300: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4302: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4303: p_item_attribute_rec.parent_repl_ord_flag);
4304: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4305: p_item_attribute_rec.parent_bom_item_type);

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

4298: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ORDER_LINE_ID = '||MSC_ATP_PVT.G_ORDER_LINE_ID);
4299: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
4300: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4302: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4303: p_item_attribute_rec.parent_repl_ord_flag);
4304: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4305: p_item_attribute_rec.parent_bom_item_type);
4306: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||

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

4300: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
4301: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'G_INV_CTP = '||MSC_ATP_PVT.G_INV_CTP);
4302: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4303: p_item_attribute_rec.parent_repl_ord_flag);
4304: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4305: p_item_attribute_rec.parent_bom_item_type);
4306: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||
4307: p_item_attribute_rec.parent_comp_flag);
4308: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||

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

4302: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_repl_ord_flag := ' ||
4303: p_item_attribute_rec.parent_repl_ord_flag);
4304: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4305: p_item_attribute_rec.parent_bom_item_type);
4306: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||
4307: p_item_attribute_rec.parent_comp_flag);
4308: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||
4309: p_item_attribute_rec.parent_atp_flag);
4310: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_pegging_id := ' ||

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

4304: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_bom_item_type := ' ||
4305: p_item_attribute_rec.parent_bom_item_type);
4306: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||
4307: p_item_attribute_rec.parent_comp_flag);
4308: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||
4309: p_item_attribute_rec.parent_atp_flag);
4310: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_pegging_id := ' ||
4311: p_item_attribute_rec.parent_pegging_id);
4312: END IF;

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

4306: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_comp_flag := ' ||
4307: p_item_attribute_rec.parent_comp_flag);
4308: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_atp_flag := ' ||
4309: p_item_attribute_rec.parent_atp_flag);
4310: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'parent_pegging_id := ' ||
4311: p_item_attribute_rec.parent_pegging_id);
4312: END IF;
4313:
4314: -- ATP Rule added to accomodate Bug 1510853

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

4361:
4362: --e_cto_rearch
4363:
4364: IF PG_DEBUG in ('Y', 'C') THEN
4365: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4366: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4367: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4368: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4369: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023

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

4362: --e_cto_rearch
4363:
4364: IF PG_DEBUG in ('Y', 'C') THEN
4365: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4366: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4367: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4368: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4369: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4370: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

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

4363:
4364: IF PG_DEBUG in ('Y', 'C') THEN
4365: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4366: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4367: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4368: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4369: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4370: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4371: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);

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

4364: IF PG_DEBUG in ('Y', 'C') THEN
4365: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4366: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4367: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4368: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4369: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4370: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4371: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);
4372: END IF;

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

4365: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_bom_item_type = '||l_bom_item_type);
4366: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4367: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4368: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4369: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4370: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4371: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);
4372: END IF;
4373:

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

4366: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_check = '||l_atp_check);
4367: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4368: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4369: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4370: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4371: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);
4372: END IF;
4373:
4374: -- ATP4drp re-set component flag for DRP plans

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

4367: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_replenish_flag = ' || l_replenish_flag);
4368: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4369: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'UOM CODE = ' || p_item_attribute_rec.uom_code); --bug3110023
4370: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4371: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Lowest Level Source = ' || p_item_attribute_rec.lowest_level_src);
4372: END IF;
4373:
4374: -- ATP4drp re-set component flag for DRP plans
4375: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 THEN

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

4378: ELSIF l_atp_comp_flag = 'R' THEN
4379: l_atp_comp_flag := 'N';
4380: END IF;
4381: IF PG_DEBUG in ('Y', 'C') THEN
4382: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: Before Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4383: END IF;
4384: p_item_attribute_rec.product_family_id := p_item_attribute_rec.dest_inv_item_id;
4385: -- Bug 4052808 DRP Plans only support Fixed Lead Times.
4386: p_item_attribute_rec.variable_lt := 0;

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

4384: p_item_attribute_rec.product_family_id := p_item_attribute_rec.dest_inv_item_id;
4385: -- Bug 4052808 DRP Plans only support Fixed Lead Times.
4386: p_item_attribute_rec.variable_lt := 0;
4387: IF PG_DEBUG in ('Y', 'C') THEN
4388: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4389: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');
4390: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4391: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4392: END IF;

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

4385: -- Bug 4052808 DRP Plans only support Fixed Lead Times.
4386: p_item_attribute_rec.variable_lt := 0;
4387: IF PG_DEBUG in ('Y', 'C') THEN
4388: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4389: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');
4390: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4391: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4392: END IF;
4393: END IF;

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

4386: p_item_attribute_rec.variable_lt := 0;
4387: IF PG_DEBUG in ('Y', 'C') THEN
4388: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4389: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');
4390: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4391: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4392: END IF;
4393: END IF;
4394: -- END ATP4drp

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

4387: IF PG_DEBUG in ('Y', 'C') THEN
4388: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_atp_comp_flag = ' || l_atp_comp_flag);
4389: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'PF not applicable for DRP plans');
4390: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'Reset Product Family = ' || p_item_attribute_rec.product_family_id);
4391: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4392: END IF;
4393: END IF;
4394: -- END ATP4drp
4395:

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

4423: l_atp_comp_flag := 'N';
4424: END IF;
4425:
4426: IF PG_DEBUG in ('Y', 'C') THEN
4427: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);
4428: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);
4429:
4430: END IF;
4431: IF NVL(p_item_attribute_rec.parent_item_id, -1) = p_inventory_item_id THEN

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

4424: END IF;
4425:
4426: IF PG_DEBUG in ('Y', 'C') THEN
4427: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);
4428: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);
4429:
4430: END IF;
4431: IF NVL(p_item_attribute_rec.parent_item_id, -1) = p_inventory_item_id THEN
4432: --atp flag for this model = 'Y'. We are coming here for second time

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

4432: --atp flag for this model = 'Y'. We are coming here for second time
4433: -- set the atp comp flag = 'N' so that model is not exploded again.
4434: l_atp_comp_flag := 'N';
4435: IF PG_DEBUG in ('Y', 'C') THEN
4436: msc_sch_wb.atp_debug('Turn off atp comp flag for model');
4437: END IF;
4438: END IF;
4439: ELSE
4440: IF PG_DEBUG in ('Y', 'C') THEN

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

4437: END IF;
4438: END IF;
4439: ELSE
4440: IF PG_DEBUG in ('Y', 'C') THEN
4441: msc_sch_wb.atp_debug('PDS ATP');
4442: END IF;
4443: IF NVL(p_item_attribute_rec.parent_repl_ord_flag, 'N') = 'Y' and
4444: NVL(p_item_attribute_rec.parent_bom_item_type, 4) = 4 THEN
4445: --parent is config item

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

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

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

4450: --here parent is config and thisi tem is model or option class
4451: -- we turn off the atp comp flag, honor atpp flga as it is
4452: l_atp_comp_flag := 'N'; --- we turn off components flags
4453: IF PG_DEBUG in ('Y', 'C') THEN
4454: msc_sch_wb.atp_debug('Model or option class, turn off components flag');
4455: END IF;
4456: END IF;
4457: ELSIF NVL(p_item_attribute_rec.parent_bom_item_type, 4) = 1 and
4458: NVL(p_item_attribute_rec.parent_repl_ord_flag, 'N') = 'Y' And l_bom_item_type = 2 THEN

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

4459: ---parent is a model and this item is option class
4460: ---atp flag is honored as such
4461: ---components resource part is copied over from model's components flag
4462: IF PG_DEBUG in ('Y', 'C') THEN
4463: msc_sch_wb.atp_debug(' parent is model, This is option class');
4464: END IF;
4465:
4466: IF NVL(p_item_attribute_rec.parent_comp_flag, 'N') in ('R', 'C') THEN
4467: IF PG_DEBUG in ('Y', 'C') THEN

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

4464: END IF;
4465:
4466: IF NVL(p_item_attribute_rec.parent_comp_flag, 'N') in ('R', 'C') THEN
4467: IF PG_DEBUG in ('Y', 'C') THEN
4468: msc_sch_wb.atp_debug(' Resource check on model is on, set the resource flag on option class');
4469: END IF;
4470: l_atp_comp_flag := 'R';
4471: ELSE
4472: l_atp_comp_flag := 'N';

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

4473: END IF;
4474:
4475: ELSIF l_bom_item_type = 1 THEN
4476: IF PG_DEBUG in ('Y', 'C') THEN
4477: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);
4478: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);
4479:
4480: END IF;
4481: IF NVL(p_item_attribute_rec.parent_item_id, -1) = p_inventory_item_id THEN

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

4474:
4475: ELSIF l_bom_item_type = 1 THEN
4476: IF PG_DEBUG in ('Y', 'C') THEN
4477: msc_sch_wb.atp_debug('l_bom_item_type := ' || l_bom_item_type);
4478: msc_sch_wb.atp_debug('parent_item_id := ' || p_item_attribute_rec.parent_item_id);
4479:
4480: END IF;
4481: IF NVL(p_item_attribute_rec.parent_item_id, -1) = p_inventory_item_id THEN
4482: --atp flag for this model = 'Y'. We are coming here for second time

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

4482: --atp flag for this model = 'Y'. We are coming here for second time
4483: -- set the atp comp flag = 'N' so that model is not exploded again.
4484: l_atp_comp_flag := 'N';
4485: IF PG_DEBUG in ('Y', 'C') THEN
4486: msc_sch_wb.atp_debug('Turn off atp comp flag for model');
4487: END IF;
4488: END IF;
4489:
4490: END IF;

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

4500: p_item_attribute_rec.replenish_to_ord_flag := l_replenish_flag;
4501: --e_cto_rearch
4502:
4503: IF PG_DEBUG in ('Y', 'C') THEN
4504: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'l_source_org_id = '||l_source_org_id);
4505: END IF;
4506: p_item_attribute_rec.cto_source_org_id := l_source_org_id;
4507:
4508: IF PG_DEBUG in ('Y', 'C') THEN

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

4505: END IF;
4506: p_item_attribute_rec.cto_source_org_id := l_source_org_id;
4507:
4508: IF PG_DEBUG in ('Y', 'C') THEN
4509: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP flag is '||l_atp_flag);
4510: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP components flag is '||l_atp_comp_flag);
4511: END IF;
4512:
4513: p_item_attribute_rec.instance_id := p_instance_id;

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

4506: p_item_attribute_rec.cto_source_org_id := l_source_org_id;
4507:
4508: IF PG_DEBUG in ('Y', 'C') THEN
4509: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP flag is '||l_atp_flag);
4510: msc_sch_wb.atp_debug('GET_ITEM_ATTRIBUTES: ' || 'get_item_attr ATP components flag is '||l_atp_comp_flag);
4511: END IF;
4512:
4513: p_item_attribute_rec.instance_id := p_instance_id;
4514: p_item_attribute_rec.organization_id := p_organization_id;

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

4542: IS
4543: BEGIN
4544:
4545: IF PG_DEBUG in ('Y', 'C') THEN
4546: msc_sch_wb.atp_debug('inside get_org_attributes');
4547: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4548: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4549: END IF;
4550:

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

4543: BEGIN
4544:
4545: IF PG_DEBUG in ('Y', 'C') THEN
4546: msc_sch_wb.atp_debug('inside get_org_attributes');
4547: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4548: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4549: END IF;
4550:
4551: SELECT tp.default_atp_rule_id,

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

4544:
4545: IF PG_DEBUG in ('Y', 'C') THEN
4546: msc_sch_wb.atp_debug('inside get_org_attributes');
4547: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'sr_instance_id = '||p_instance_id);
4548: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: ' || 'organization_id = '||p_organization_id);
4549: END IF;
4550:
4551: SELECT tp.default_atp_rule_id,
4552: tp.calendar_code,

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

4576: x_org_attribute_rec.instance_id := p_instance_id;
4577: x_org_attribute_rec.organization_id := p_organization_id;
4578:
4579: IF PG_DEBUG in ('Y', 'C') THEN
4580: msc_sch_wb.atp_debug('GET_ORG_ATTRIBUTES: network_scheduling_method := ' || x_org_attribute_rec.network_scheduling_method);
4581: END IF;
4582:
4583: EXCEPTION WHEN others THEN
4584: x_org_attribute_rec.instance_id := null;

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

4602:
4603: BEGIN
4604:
4605: IF PG_DEBUG in ('Y', 'C') THEN
4606: msc_sch_wb.atp_debug('In get_global_org_info core');
4607: END IF;
4608:
4609: IF (MSC_ATP_PVT.G_ORG_INFO_REC.instance_id IS NULL) OR
4610: (MSC_ATP_PVT.G_ORG_INFO_REC.organization_id IS NULL) OR

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

4629:
4630: BEGIN
4631:
4632: IF PG_DEBUG in ('Y', 'C') THEN
4633: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4634: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4635: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4636: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);

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

4630: BEGIN
4631:
4632: IF PG_DEBUG in ('Y', 'C') THEN
4633: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4634: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4635: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4636: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);

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

4631:
4632: IF PG_DEBUG in ('Y', 'C') THEN
4633: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4634: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4635: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4636: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4639: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);

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

4632: IF PG_DEBUG in ('Y', 'C') THEN
4633: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4634: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4635: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4636: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4639: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4640: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);

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

4633: msc_sch_wb.atp_debug('Inside Get Global item attributes');
4634: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4635: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4636: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4639: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4640: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4641: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);

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

4634: msc_sch_wb.atp_debug('parent_repl_ord_flag := ' || p_item_attribute_rec.parent_repl_ord_flag);
4635: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4636: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4639: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4640: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4641: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4642: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);

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

4635: msc_sch_wb.atp_debug('parent_bom_item_type := ' || p_item_attribute_rec.parent_bom_item_type);
4636: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4639: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4640: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4641: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4642: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);
4643: END IF;

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

4636: msc_sch_wb.atp_debug('parent_comp_flag := ' || p_item_attribute_rec.parent_comp_flag);
4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4639: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4640: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4641: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4642: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);
4643: END IF;
4644: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id IS NULL) OR

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

4637: msc_sch_wb.atp_debug('parent_atp_flag := ' || p_item_attribute_rec.parent_atp_flag);
4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4639: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4640: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4641: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4642: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);
4643: END IF;
4644: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id IS NULL) OR
4645: (MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id IS NULL) OR

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

4638: msc_sch_wb.atp_debug('parent_pegging_id := ' || p_item_attribute_rec.parent_pegging_id);
4639: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4640: msc_sch_wb.atp_debug('p_plan_id := ' || p_plan_id);
4641: msc_sch_wb.atp_debug('p_inventory_item_id := ' || p_inventory_item_id);
4642: msc_sch_wb.atp_debug('p_organization_id := ' || p_organization_id);
4643: END IF;
4644: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id IS NULL) OR
4645: (MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id IS NULL) OR
4646: (MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id IS NULL) OR

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

4650: ---3917625: read the item attributes if plan chnages
4651: OR (NVL(MSC_ATP_PVT.G_ITEM_INFO_REC.plan_id, -12345) <> p_plan_id) THEN
4652:
4653:
4654: msc_sch_wb.atp_debug('Item/Org/instance/plan info has changed. Recalculate item attributes');
4655: l_item_attribute_rec.parent_repl_ord_flag := p_item_attribute_rec.parent_repl_ord_flag;
4656: l_item_attribute_rec.parent_bom_item_type := p_item_attribute_rec.parent_bom_item_type;
4657: l_item_attribute_rec.parent_comp_flag := p_item_attribute_rec.parent_comp_flag;
4658: l_item_attribute_rec.parent_atp_flag := p_item_attribute_rec.parent_atp_flag;

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

4667:
4668: END IF;
4669:
4670: IF PG_DEBUG in ('Y', 'C') THEN
4671: msc_sch_wb.atp_debug('get_global_item_info ATP flag is '||
4672: MSC_ATP_PVT.G_ITEM_INFO_REC.atp_flag);
4673: END IF;
4674:
4675: END get_global_item_info;

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

4685: p_plan_info_rec MSC_ATP_PVT.plan_info_rec;
4686:
4687: BEGIN
4688: IF PG_DEBUG in ('Y', 'C') THEN
4689: msc_sch_wb.atp_debug('In get_global_plan_info core');
4690: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4691: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4692: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4693: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);

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

4686:
4687: BEGIN
4688: IF PG_DEBUG in ('Y', 'C') THEN
4689: msc_sch_wb.atp_debug('In get_global_plan_info core');
4690: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4691: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4692: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4693: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4694: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);

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

4687: BEGIN
4688: IF PG_DEBUG in ('Y', 'C') THEN
4689: msc_sch_wb.atp_debug('In get_global_plan_info core');
4690: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4691: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4692: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4693: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4694: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4695: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);

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

4688: IF PG_DEBUG in ('Y', 'C') THEN
4689: msc_sch_wb.atp_debug('In get_global_plan_info core');
4690: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4691: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4692: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4693: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4694: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4695: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4696: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);

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

4689: msc_sch_wb.atp_debug('In get_global_plan_info core');
4690: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4691: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4692: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4693: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4694: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4695: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4696: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
4697: END IF;

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

4690: msc_sch_wb.atp_debug('g__inv_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id);
4691: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4692: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4693: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4694: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4695: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4696: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
4697: END IF;
4698:

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

4691: msc_sch_wb.atp_debug('p_inv_id := ' || p_inventory_item_id);
4692: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4693: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4694: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4695: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4696: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
4697: END IF;
4698:
4699: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id IS NULL) OR

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

4692: msc_sch_wb.atp_debug('g_instance_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id);
4693: msc_sch_wb.atp_debug('p_instance_id := ' || p_instance_id);
4694: msc_sch_wb.atp_debug('g_org_id := ' || MSC_ATP_PVT.G_ITEM_INFO_REC.organization_id);
4695: msc_sch_wb.atp_debug('p_org_id := ' || p_organization_id);
4696: msc_sch_wb.atp_debug('g_plan_id := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id);
4697: END IF;
4698:
4699: IF (MSC_ATP_PVT.G_ITEM_INFO_REC.sr_inv_item_id IS NULL) OR
4700: (MSC_ATP_PVT.G_ITEM_INFO_REC.instance_id <> p_instance_id) OR

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

4713:
4714: END IF;
4715:
4716: IF PG_DEBUG in ('Y', 'C') THEN
4717: msc_sch_wb.atp_debug('get_global_plan_info Plan name is '||
4718: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_name);
4719: msc_sch_wb.atp_debug('get_global_plan_info Argument Organization ID is '||
4720: p_organization_id);
4721: msc_sch_wb.atp_debug('get_global_plan_info Plan owning organization is '||

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

4715:
4716: IF PG_DEBUG in ('Y', 'C') THEN
4717: msc_sch_wb.atp_debug('get_global_plan_info Plan name is '||
4718: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_name);
4719: msc_sch_wb.atp_debug('get_global_plan_info Argument Organization ID is '||
4720: p_organization_id);
4721: msc_sch_wb.atp_debug('get_global_plan_info Plan owning organization is '||
4722: MSC_ATP_PVT.G_PLAN_INFO_REC.organization_id);
4723: END IF;

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

4717: msc_sch_wb.atp_debug('get_global_plan_info Plan name is '||
4718: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_name);
4719: msc_sch_wb.atp_debug('get_global_plan_info Argument Organization ID is '||
4720: p_organization_id);
4721: msc_sch_wb.atp_debug('get_global_plan_info Plan owning organization is '||
4722: MSC_ATP_PVT.G_PLAN_INFO_REC.organization_id);
4723: END IF;
4724:
4725: END get_global_plan_info;

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

4742: BEGIN
4743:
4744: -- Bug 3036513 Print out the parameter values passed in to the procedure.
4745: IF PG_DEBUG in ('Y', 'C') THEN
4746: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');
4747: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);
4748: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4749: 'sr_inventory_item_id = '||p_inventory_item_id);
4750: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||

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

4743:
4744: -- Bug 3036513 Print out the parameter values passed in to the procedure.
4745: IF PG_DEBUG in ('Y', 'C') THEN
4746: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');
4747: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);
4748: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4749: 'sr_inventory_item_id = '||p_inventory_item_id);
4750: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4751: 'organization_id = '||p_organization_id);

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

4744: -- Bug 3036513 Print out the parameter values passed in to the procedure.
4745: IF PG_DEBUG in ('Y', 'C') THEN
4746: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');
4747: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);
4748: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4749: 'sr_inventory_item_id = '||p_inventory_item_id);
4750: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4751: 'organization_id = '||p_organization_id);
4752: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);

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

4746: msc_sch_wb.atp_debug('****inside get_infinite_time_fence_date****');
4747: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: sr_instance_id = '||p_instance_id);
4748: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4749: 'sr_inventory_item_id = '||p_inventory_item_id);
4750: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4751: 'organization_id = '||p_organization_id);
4752: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);
4753: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);
4754: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);

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

4748: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4749: 'sr_inventory_item_id = '||p_inventory_item_id);
4750: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4751: 'organization_id = '||p_organization_id);
4752: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);
4753: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);
4754: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);
4755: END IF;
4756: -- End Bug 3036513.

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

4749: 'sr_inventory_item_id = '||p_inventory_item_id);
4750: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4751: 'organization_id = '||p_organization_id);
4752: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);
4753: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);
4754: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);
4755: END IF;
4756: -- End Bug 3036513.
4757:

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

4750: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' ||
4751: 'organization_id = '||p_organization_id);
4752: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: ' || 'plan_id = '||p_plan_id);
4753: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: resource_id = '||p_resource_id);
4754: msc_sch_wb.atp_debug('GET_INFINITE_TIME_FENCE_DATE: department_id = '||p_department_id);
4755: END IF;
4756: -- End Bug 3036513.
4757:
4758: -- Bug 1566260, in case of modle or option class for PDS ATP, return null.

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

4761: -- demand entries could be stored for planning purposes.
4762: /* s_CTO rearch : we start honoring infinite time fence on model
4763: IF p_plan_id <> -1 THEN
4764: IF PG_DEBUG in ('Y', 'C') THEN
4765: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'selecting item type for PDS');
4766: END IF;
4767: SELECT i.bom_item_type
4768: INTO l_item_type
4769: FROM msc_system_items i

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

4774: END IF;
4775:
4776: IF nvl(l_item_type, -1) IN (1,2) THEN
4777: IF PG_DEBUG in ('Y', 'C') THEN
4778: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'PDS item type is model(1) or option class(2) : '||l_item_type);
4779: END IF;
4780: l_infinite_time_fence_date := null;
4781: ELSE
4782:

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

4785: -- Bug 2877340, 2746213
4786: -- Read the Profile option to pad the user defined days
4787: -- to infinite Supply fence.
4788: IF PG_DEBUG in ('Y', 'C') THEN
4789: msc_sch_wb.atp_debug('get_infinite_time_fence_date: Profile value for Infinite Supply Pad');
4790: 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);
4791: END IF;
4792: -- Bug 3036513 If resource_id is NULL get the infinite_time_fence_date
4793: -- for just the item.

Line 4790: 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);

4786: -- Read the Profile option to pad the user defined days
4787: -- to infinite Supply fence.
4788: IF PG_DEBUG in ('Y', 'C') THEN
4789: msc_sch_wb.atp_debug('get_infinite_time_fence_date: Profile value for Infinite Supply Pad');
4790: 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);
4791: END IF;
4792: -- Bug 3036513 If resource_id is NULL get the infinite_time_fence_date
4793: -- for just the item.
4794: IF (p_resource_id IS NULL) THEN

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

4869: --s_cto_rearch
4870: --END IF;
4871:
4872: IF PG_DEBUG in ('Y', 'C') THEN
4873: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'l_infinite_time_fence_date'||l_infinite_time_fence_date);
4874: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'ATP Rule := ' || x_atp_rule_name);
4875: END IF;
4876: x_infinite_time_fence_date := l_infinite_time_fence_date;
4877:

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

4870: --END IF;
4871:
4872: IF PG_DEBUG in ('Y', 'C') THEN
4873: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'l_infinite_time_fence_date'||l_infinite_time_fence_date);
4874: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'ATP Rule := ' || x_atp_rule_name);
4875: END IF;
4876: x_infinite_time_fence_date := l_infinite_time_fence_date;
4877:
4878: EXCEPTION

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

4896: FROM msc_plans
4897: WHERE plan_id = p_plan_id;
4898:
4899: IF PG_DEBUG in ('Y', 'C') THEN
4900: msc_sch_wb.atp_debug('get_infinite_time_fence_date: ' || 'l_infinite_time_fence_date'||l_infinite_time_fence_date);
4901: END IF;
4902: x_infinite_time_fence_date := l_infinite_time_fence_date;
4903: END IF;
4904:

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

4983:
4984: BEGIN
4985:
4986: IF PG_DEBUG in ('Y', 'C') THEN
4987: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4988: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4989: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4990: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );

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

4984: BEGIN
4985:
4986: IF PG_DEBUG in ('Y', 'C') THEN
4987: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4988: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4989: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4990: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4992: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );

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

4985:
4986: IF PG_DEBUG in ('Y', 'C') THEN
4987: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4988: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4989: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4990: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4992: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4993: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );

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

4986: IF PG_DEBUG in ('Y', 'C') THEN
4987: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4988: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4989: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4990: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4992: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4993: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4994: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);

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

4987: msc_sch_wb.atp_debug ('------------Get Shipping Methods----------');
4988: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4989: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4990: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4992: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4993: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4994: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4995: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);

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

4988: msc_sch_wb.atp_debug ('From Organization : ' || p_from_organization_id );
4989: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4990: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4992: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4993: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4994: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4995: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);
4996: END IF;

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

4989: msc_sch_wb.atp_debug ('To Organization : ' || p_to_organization_id);
4990: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4992: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4993: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4994: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4995: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);
4996: END IF;
4997: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

4990: msc_sch_wb.atp_debug ('To Customer : ' || p_to_customer_id );
4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4992: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4993: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4994: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4995: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);
4996: END IF;
4997: x_return_status := FND_API.G_RET_STS_SUCCESS;
4998:

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

4991: msc_sch_wb.atp_debug ('To Customer Site : ' || p_to_customer_site_id );
4992: msc_sch_wb.atp_debug ('From Instance : ' || p_from_instance_id );
4993: msc_sch_wb.atp_debug ('To Instance : ' || p_to_instance_id );
4994: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id);
4995: msc_sch_wb.atp_debug ('Calling Module : ' || p_calling_module);
4996: END IF;
4997: x_return_status := FND_API.G_RET_STS_SUCCESS;
4998:
4999: -- Call Get Regions to pipulate Region level data

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

5058:
5059: if (l_from_location_id is NULL) then
5060: x_return_status := FND_API.G_RET_STS_ERROR;
5061: IF PG_DEBUG in ('Y', 'C') THEN
5062: msc_sch_wb.atp_debug ('Cannot map data to locations ');
5063: END IF;
5064: return;
5065: end if;
5066:

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

5086: );
5087: EXCEPTION
5088: when DUP_VAL_ON_INDEX then
5089: IF PG_DEBUG in ('Y', 'C') THEN
5090: msc_sch_wb.atp_debug ('Data already present');
5091: END IF;
5092: END;
5093:
5094: if (sql%rowcount = 0) then

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

5092: END;
5093:
5094: if (sql%rowcount = 0) then
5095: IF PG_DEBUG in ('Y', 'C') THEN
5096: msc_sch_wb.atp_debug ('Shifting to Regions and Zones data');
5097: END IF;
5098:
5099: l_lead_time_arr := l_lead_time_arr_null;
5100: l_ship_method_arr := l_ship_method_arr_null;

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

5124: l_lead_time_arr(l_counter) := l_intransit_time_tmp;
5125: l_ship_method_arr(l_counter) := l_ship_method_tmp;
5126:
5127: IF PG_DEBUG in ('Y', 'C') THEN
5128: msc_sch_wb.atp_debug ('Method : ' || l_ship_method_tmp || ' - Time : ' || l_intransit_time_tmp);
5129: END IF;
5130: end if;
5131:
5132: END LOOP;

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

5134: CLOSE c_lead_time_dest;
5135:
5136: if (l_counter = 0) then
5137: IF PG_DEBUG in ('Y', 'C') THEN
5138: msc_sch_wb.atp_debug ('No data from regions table');
5139: END IF;
5140: else
5141: BEGIN
5142: forall l_counter2 in 1..l_counter

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

5153: );
5154: EXCEPTION
5155: when others then
5156: IF PG_DEBUG in ('Y', 'C') THEN
5157: msc_sch_wb.atp_debug ('Unable to insert data');
5158: END IF;
5159: END;
5160: end if; -- l_counter = 0
5161: end if;

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

5168: -- Bug 3515520, don't use org in case customer/site is populated.
5169: -- Org - Org Intransit Lead Time
5170: BEGIN
5171: IF PG_DEBUG in ('Y', 'C') THEN
5172: msc_sch_wb.atp_debug ('To Organization Specified ');
5173: END IF;
5174: insert into mrp_atp_schedule_temp
5175: (session_id, inventory_item_id, scenario_id, delivery_lead_time, ship_method, status_flag)
5176: (

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

5184: where from_organization_id = p_from_organization_id
5185: and to_organization_id = p_to_organization_id
5186: );
5187: IF PG_DEBUG in ('Y', 'C') THEN
5188: msc_sch_wb.atp_debug ('Records inserted into table : ' || sql%rowcount);
5189: END IF;
5190: EXCEPTION
5191: when OTHERS then
5192: null;

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

5197: -- Bug 3515520, verify that customer site is populated.
5198: -- Org to Customer intransit Lead Time Calculation
5199:
5200: IF PG_DEBUG in ('Y', 'C') THEN
5201: msc_sch_wb.atp_debug ('Customer ID specified ');
5202: END IF;
5203: -- First get the location corresponding to the customer
5204: BEGIN
5205: l_from_location_id := MSC_SATP_FUNC.src_location_id (p_from_organization_id,

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

5210: p_to_customer_site_id);
5211: EXCEPTION
5212: when NO_DATA_FOUND then
5213: IF PG_DEBUG in ('Y', 'C') THEN
5214: msc_sch_wb.atp_debug ('Unable to map organization of customer to location');
5215: END IF;
5216: END;
5217:
5218: if (l_from_location_id is NULL) then

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

5216: END;
5217:
5218: if (l_from_location_id is NULL) then
5219: IF PG_DEBUG in ('Y', 'C') THEN
5220: msc_sch_wb.atp_debug ('From location is NULL');
5221: END IF;
5222: x_return_status := FND_API.G_RET_STS_ERROR;
5223: return;
5224: end if;

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

5223: return;
5224: end if;
5225:
5226: IF PG_DEBUG in ('Y', 'C') THEN
5227: msc_sch_wb.atp_debug ('From Location ID : ' || l_from_location_id);
5228: msc_sch_wb.atp_debug ('To Location ID : ' || l_to_location_id );
5229: END IF;
5230:
5231: BEGIN

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

5224: end if;
5225:
5226: IF PG_DEBUG in ('Y', 'C') THEN
5227: msc_sch_wb.atp_debug ('From Location ID : ' || l_from_location_id);
5228: msc_sch_wb.atp_debug ('To Location ID : ' || l_to_location_id );
5229: END IF;
5230:
5231: BEGIN
5232: insert into mrp_atp_schedule_temp

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

5244: );
5245: EXCEPTION
5246: when DUP_VAL_ON_INDEX then
5247: IF PG_DEBUG in ('Y', 'C') THEN
5248: msc_sch_wb.atp_debug ('Data already present');
5249: END IF;
5250:
5251: when NO_DATA_FOUND then
5252: null;

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

5253: END;
5254:
5255: if (sql%rowcount = 0) then
5256: IF PG_DEBUG in ('Y', 'C') THEN
5257: msc_sch_wb.atp_debug ('Shifting to Regions and Zones data');
5258: END IF;
5259:
5260: l_level_orig := NULL;
5261: l_lead_time_arr := l_lead_time_arr_null;

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

5283: l_lead_time_arr(l_counter) := l_intransit_time_tmp;
5284: l_ship_method_arr(l_counter) := l_ship_method_tmp;
5285:
5286: IF PG_DEBUG in ('Y', 'C') THEN
5287: msc_sch_wb.atp_debug ('Method : ' || l_ship_method_tmp || ' - Time : ' || l_intransit_time_tmp);
5288: END IF;
5289:
5290: end if;
5291: END LOOP;

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

5293: CLOSE c_lead_time;
5294:
5295: if (l_counter = 0) then
5296: IF PG_DEBUG in ('Y', 'C') THEN
5297: msc_sch_wb.atp_debug ('No data from regions table');
5298: END IF;
5299: else
5300: BEGIN
5301: forall l_counter2 in 1..l_counter

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

5312: );
5313: EXCEPTION
5314: when others then
5315: IF PG_DEBUG in ('Y', 'C') THEN
5316: msc_sch_wb.atp_debug ('Unable to insert data');
5317: END IF;
5318: END;
5319: end if; -- l_counter = 0
5320: end if; --sql rowcount = 0

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

5325: DELETE MSC_REGIONS_TEMP
5326: where session_id = p_session_id;
5327:
5328: IF PG_DEBUG in ('Y', 'C') THEN
5329: msc_sch_wb.atp_debug (sql%rowcount || ' rows deleted from regions temp table.');
5330: END IF;
5331:
5332: COMMIT;
5333:

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

5362: BEGIN
5363: -- We will return an error if shipping gives us something
5364: -- that doesn't meet our assumptions
5365: IF PG_DEBUG in ('Y','C') then
5366: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5367: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5368: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5369: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5370: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);

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

5363: -- We will return an error if shipping gives us something
5364: -- that doesn't meet our assumptions
5365: IF PG_DEBUG in ('Y','C') then
5366: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5367: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5368: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5369: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5370: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);
5371: end if;

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

5364: -- that doesn't meet our assumptions
5365: IF PG_DEBUG in ('Y','C') then
5366: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5367: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5368: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5369: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5370: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);
5371: end if;
5372:

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

5365: IF PG_DEBUG in ('Y','C') then
5366: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5367: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5368: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5369: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5370: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);
5371: end if;
5372:
5373: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

5366: msc_sch_wb.atp_debug ('---- ATP_Shipping_Lead_time--- ');
5367: msc_sch_wb.atp_debug ('From Loc ID : ' ||p_from_loc_id);
5368: msc_sch_wb.atp_debug ('To Customer Site : ' ||p_to_customer_site_id);
5369: msc_sch_wb.atp_debug ('Session ID : ' || p_session_id );
5370: msc_sch_wb.atp_debug ('Ship Method : ' || x_ship_method);
5371: end if;
5372:
5373: x_return_status := FND_API.G_RET_STS_SUCCESS;
5374:

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

5384: EXCEPTION
5385: WHEN NO_DATA_FOUND THEN
5386:
5387: IF PG_DEBUG in ('Y','C') then
5388: msc_sch_wb.atp_debug ('Cannot map customer site ID to location ID');
5389: end if;
5390: END;
5391:
5392: IF PG_DEBUG in ('Y','C') then

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

5389: end if;
5390: END;
5391:
5392: IF PG_DEBUG in ('Y','C') then
5393: msc_sch_wb.atp_debug ('Location ID : ' || l_to_location_id);
5394: end if;
5395:
5396: MSC_SATP_FUNC.Get_Regions_Shipping(
5397: p_to_customer_site_id, -- customer_site_id

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

5417: WHERE session_id = p_session_id
5418: AND partner_site_id = p_to_customer_site_id;
5419:
5420: if (PG_DEBUG in ('Y','C')) then
5421: msc_sch_wb.atp_debug ('Returning ....');
5422: msc_sch_wb.atp_debug (' Ship Method : ' || x_ship_method);
5423: msc_sch_wb.atp_debug (' Lead Time : ' || x_intransit_time);
5424: end if;
5425:

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

5418: AND partner_site_id = p_to_customer_site_id;
5419:
5420: if (PG_DEBUG in ('Y','C')) then
5421: msc_sch_wb.atp_debug ('Returning ....');
5422: msc_sch_wb.atp_debug (' Ship Method : ' || x_ship_method);
5423: msc_sch_wb.atp_debug (' Lead Time : ' || x_intransit_time);
5424: end if;
5425:
5426: IF x_intransit_time < 0 THEN

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

5419:
5420: if (PG_DEBUG in ('Y','C')) then
5421: msc_sch_wb.atp_debug ('Returning ....');
5422: msc_sch_wb.atp_debug (' Ship Method : ' || x_ship_method);
5423: msc_sch_wb.atp_debug (' Lead Time : ' || x_intransit_time);
5424: end if;
5425:
5426: IF x_intransit_time < 0 THEN
5427: x_return_status := FND_API.G_RET_STS_ERROR;

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

5471: p_ship_set_item_count is not null, p_inventory_item_id is null.
5472: */
5473: IF PG_DEBUG in ('Y', 'C') THEN
5474:
5475: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5476: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5477: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5478: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5479: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);

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

5472: */
5473: IF PG_DEBUG in ('Y', 'C') THEN
5474:
5475: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5476: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5477: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5478: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5479: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5480: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);

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

5473: IF PG_DEBUG in ('Y', 'C') THEN
5474:
5475: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5476: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5477: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5478: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5479: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5480: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);
5481: END IF;

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

5474:
5475: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5476: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5477: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5478: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5479: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5480: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);
5481: END IF;
5482:

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

5475: msc_sch_wb.atp_debug('Inside Get_Sources Info procedure');
5476: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5477: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5478: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5479: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5480: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);
5481: END IF;
5482:
5483: -- Initialize return status and sysdate.

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

5476: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_inventory_item_id ' || p_inventory_item_id);
5477: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_id ' || p_customer_id);
5478: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_customer_site_id ' || p_customer_site_id);
5479: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_assignment_set_id ' || p_assignment_set_id);
5480: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'p_ship_set_item_count ' || p_ship_set_item_count);
5481: END IF;
5482:
5483: -- Initialize return status and sysdate.
5484: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

5517: ORDER BY Level_id;
5518:
5519: IF (l_dist_level_type.COUNT = 0) THEN
5520: IF PG_DEBUG in ('Y', 'C') THEN
5521: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Checking assignment set id indicates no sources can be found.');
5522: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'So, not searching in any level. Returning from here itself');
5523: END IF;
5524: x_return_status := FND_API.G_RET_STS_ERROR;
5525: return;

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

5518:
5519: IF (l_dist_level_type.COUNT = 0) THEN
5520: IF PG_DEBUG in ('Y', 'C') THEN
5521: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Checking assignment set id indicates no sources can be found.');
5522: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'So, not searching in any level. Returning from here itself');
5523: END IF;
5524: x_return_status := FND_API.G_RET_STS_ERROR;
5525: return;
5526: ELSE

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

5525: return;
5526: ELSE
5527: IF PG_DEBUG in ('Y', 'C') THEN
5528: FOR l_counter in 1..l_dist_level_type.COUNT LOOP
5529: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level: ' || l_dist_level_type(l_counter));
5530: END LOOP;
5531: END IF;
5532: END IF;
5533:

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

5535: -- case1
5536: IF (p_ship_set_item_count IS NULL) THEN
5537:
5538: IF PG_DEBUG in ('Y', 'C') THEN
5539: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for a single line item sources');
5540: END IF;
5541:
5542:
5543: FOR l_counter IN l_dist_level_type.FIRST..l_dist_level_type.LAST LOOP

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

5545: IF (l_dist_level_type(l_counter) = 1) THEN
5546:
5547: -- LEVEL 1, ASSIGNMENT TYPE 6: ITEM-ORG
5548: IF PG_DEBUG in ('Y', 'C') THEN
5549: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 1 (item-org)');
5550: END IF;
5551:
5552: SELECT
5553: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

5607:
5608: -- Stopping check
5609: IF (x_atp_sources.Rank.COUNT > 0) THEN
5610: IF PG_DEBUG in ('Y', 'C') THEN
5611: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 1. Search over.');
5612: END IF;
5613: return;
5614: ELSE
5615: IF l_counter = l_dist_level_type.LAST THEN

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

5613: return;
5614: ELSE
5615: IF l_counter = l_dist_level_type.LAST THEN
5616: IF PG_DEBUG in ('Y', 'C') THEN
5617: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
5618: END IF;
5619: x_return_status := FND_API.G_RET_STS_ERROR;
5620: return;
5621: ELSE

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

5619: x_return_status := FND_API.G_RET_STS_ERROR;
5620: return;
5621: ELSE
5622: IF PG_DEBUG in ('Y', 'C') THEN
5623: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 1. Continuing search..');
5624: END IF;
5625: END IF;
5626: END IF;
5627:

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

5628: ELSIF (l_dist_level_type(l_counter) = 2) THEN
5629:
5630: -- LEVEL 2, ASSIGNMENT TYPE 9: ITEM-REGION
5631: IF PG_DEBUG in ('Y', 'C') THEN
5632: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 2 (item-reg)');
5633: END IF;
5634:
5635: -- Search for sources for which following expression is minimum
5636: SELECT NVL(MIN(2000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 10) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)

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

5669:
5670: IF (l_min_region_value <> 0) THEN
5671: -- Sources found.
5672: IF PG_DEBUG in ('Y', 'C') THEN
5673: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 2.');
5674: END IF;
5675: -- Collect the found sources and return
5676: SELECT
5677: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

5736: ELSE
5737: -- Stopping check.
5738: IF l_counter = l_dist_level_type.LAST THEN
5739: IF PG_DEBUG in ('Y', 'C') THEN
5740: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
5741: END IF;
5742: x_return_status := FND_API.G_RET_STS_ERROR;
5743: return;
5744: ELSE

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

5742: x_return_status := FND_API.G_RET_STS_ERROR;
5743: return;
5744: ELSE
5745: IF PG_DEBUG in ('Y', 'C') THEN
5746: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 2. Continuing search..');
5747: END IF;
5748: END IF;
5749: END IF;
5750:

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

5752: ELSIF (l_dist_level_type(l_counter) = 3) THEN
5753:
5754: -- LEVEL3, ASSIGNMENT_TYPE 5: CATEGORY-ORG
5755: IF PG_DEBUG in ('Y', 'C') THEN
5756: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 3 (cat-org)');
5757: END IF;
5758:
5759: SELECT
5760: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

5814:
5815: --Stopping check
5816: IF (x_atp_sources.Rank.COUNT > 0) THEN
5817: IF PG_DEBUG in ('Y', 'C') THEN
5818: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 3. Search over.');
5819: END IF;
5820: return;
5821: ELSE
5822: IF l_counter = l_dist_level_type.LAST THEN

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

5820: return;
5821: ELSE
5822: IF l_counter = l_dist_level_type.LAST THEN
5823: IF PG_DEBUG in ('Y', 'C') THEN
5824: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
5825: END IF;
5826: x_return_status := FND_API.G_RET_STS_ERROR;
5827: return;
5828: ELSE

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

5826: x_return_status := FND_API.G_RET_STS_ERROR;
5827: return;
5828: ELSE
5829: IF PG_DEBUG in ('Y', 'C') THEN
5830: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 3. Continuing search..');
5831: END IF;
5832: END IF;
5833: END IF;
5834:

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

5835: ELSIF (l_dist_level_type(l_counter) = 4) THEN
5836:
5837: -- LEVEL4, ASSIGNMENT TYPE3: ITEM
5838: IF PG_DEBUG in ('Y', 'C') THEN
5839: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 4 (item)');
5840: END IF;
5841: -- Bug 2931266. No need for customer_site_id join at this level
5842: SELECT
5843: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

5897:
5898: -- Check for stopping
5899: IF (x_atp_sources.Rank.COUNT > 0) THEN
5900: IF PG_DEBUG in ('Y', 'C') THEN
5901: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 4. Search over.');
5902: END IF;
5903: return;
5904: ELSE
5905: IF l_counter = l_dist_level_type.LAST THEN

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

5903: return;
5904: ELSE
5905: IF l_counter = l_dist_level_type.LAST THEN
5906: IF PG_DEBUG in ('Y', 'C') THEN
5907: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
5908: END IF;
5909: x_return_status := FND_API.G_RET_STS_ERROR;
5910: return;
5911: ELSE

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

5909: x_return_status := FND_API.G_RET_STS_ERROR;
5910: return;
5911: ELSE
5912: IF PG_DEBUG in ('Y', 'C') THEN
5913: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 4. Continuing search..');
5914: END IF;
5915: END IF;
5916: END IF;
5917:

Line 5922: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 5 (cat-reg)');

5918: ELSIF (l_dist_level_type(l_counter) = 5) THEN
5919:
5920: -- LEVEL 5, ASSIGNMENT TYPE 8: CATEGORY-REGION
5921: IF PG_DEBUG in ('Y', 'C') THEN
5922: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 5 (cat-reg)');
5923: END IF;
5924: -- Searching sources for min value of expression.
5925: SELECT NVL(MIN(5000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 10) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)
5926: INTO l_min_region_value

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

5958:
5959: IF (l_min_region_value <> 0) THEN
5960: -- Sources found
5961: IF PG_DEBUG in ('Y', 'C') THEN
5962: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 5.');
5963: END IF;
5964: -- Collect the found sources and return.
5965: SELECT
5966: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

6025: ELSE
6026: -- Sources not found. Check for stopping
6027: IF l_counter = l_dist_level_type.LAST THEN
6028: IF PG_DEBUG in ('Y', 'C') THEN
6029: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6030: END IF;
6031: x_return_status := FND_API.G_RET_STS_ERROR;
6032: return;
6033: ELSE

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

6031: x_return_status := FND_API.G_RET_STS_ERROR;
6032: return;
6033: ELSE
6034: IF PG_DEBUG in ('Y', 'C') THEN
6035: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 5. Continuing search..');
6036: END IF;
6037: END IF;
6038: END IF;
6039:

Line 6045: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');

6041: ELSIF (l_dist_level_type(l_counter) = 6) THEN
6042:
6043: -- LEVEL 6, ASSIGNMENT TYPE 2: CATEGORY
6044: IF PG_DEBUG in ('Y', 'C') THEN
6045: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');
6046: END IF;
6047: -- Bug 2931266. No need for customer_site_id join at this level
6048: SELECT
6049: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

6103:
6104: -- Stopping check
6105: IF (x_atp_sources.Rank.COUNT > 0) THEN
6106: IF PG_DEBUG in ('Y', 'C') THEN
6107: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 6. Search over.');
6108: END IF;
6109: return;
6110: ELSE
6111: IF l_counter = l_dist_level_type.LAST THEN

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

6109: return;
6110: ELSE
6111: IF l_counter = l_dist_level_type.LAST THEN
6112: IF PG_DEBUG in ('Y', 'C') THEN
6113: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6114: END IF;
6115: x_return_status := FND_API.G_RET_STS_ERROR;
6116: return;
6117: ELSE

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

6115: x_return_status := FND_API.G_RET_STS_ERROR;
6116: return;
6117: ELSE
6118: IF PG_DEBUG in ('Y', 'C') THEN
6119: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 6. Continuing search..');
6120: END IF;
6121: END IF;
6122: END IF;
6123:

Line 6128: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');

6124: ELSIF (l_dist_level_type(l_counter) = 7) THEN
6125:
6126: -- LEVEL 7, ASSIGNMENT_TYPE 4: ORG
6127: IF PG_DEBUG in ('Y', 'C') THEN
6128: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');
6129: END IF;
6130:
6131: SELECT
6132: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

6185:
6186: -- Stopping Check
6187: IF (x_atp_sources.Rank.COUNT > 0) THEN
6188: IF PG_DEBUG in ('Y', 'C') THEN
6189: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 7. Search over.');
6190: END IF;
6191: return;
6192: ELSE
6193: IF l_counter = l_dist_level_type.LAST THEN

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

6191: return;
6192: ELSE
6193: IF l_counter = l_dist_level_type.LAST THEN
6194: IF PG_DEBUG in ('Y', 'C') THEN
6195: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6196: END IF;
6197: x_return_status := FND_API.G_RET_STS_ERROR;
6198: return;
6199: ELSE

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

6197: x_return_status := FND_API.G_RET_STS_ERROR;
6198: return;
6199: ELSE
6200: IF PG_DEBUG in ('Y', 'C') THEN
6201: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 7. Continuing search..');
6202: END IF;
6203: END IF;
6204: END IF;
6205:

Line 6210: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 8 (reg)');

6206: ELSIF (l_dist_level_type(l_counter) = 8) THEN
6207:
6208: -- LEVEL 8, ASSIGNMENT_TYPE 7: REGION
6209: IF PG_DEBUG in ('Y', 'C') THEN
6210: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 8 (reg)');
6211: END IF;
6212: -- Searching sources for min expression value
6213: SELECT NVL(MIN(8000 + ((10 - NVL(MRT_INNER.REGION_TYPE, 0)) * 100) + DECODE(MRT_INNER.ZONE_FLAG, 'Y', 1, 0)), 0)
6214: INTO l_min_region_value

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

6245:
6246: IF (l_min_region_value <> 0) THEN
6247: -- Sources found
6248: IF PG_DEBUG in ('Y', 'C') THEN
6249: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All sources found at level 8.');
6250: END IF;
6251: -- Collect the sources and return.
6252: SELECT
6253: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

6311: ELSE
6312: -- No sources found. Check for stopping
6313: IF l_counter = l_dist_level_type.LAST THEN
6314: IF PG_DEBUG in ('Y', 'C') THEN
6315: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6316: END IF;
6317: x_return_status := FND_API.G_RET_STS_ERROR;
6318: return;
6319: ELSE

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

6317: x_return_status := FND_API.G_RET_STS_ERROR;
6318: return;
6319: ELSE
6320: IF PG_DEBUG in ('Y', 'C') THEN
6321: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No sources found at level 8. Continuing search..');
6322: END IF;
6323: END IF;
6324: END IF;
6325:

Line 6331: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');

6327: ELSIF (l_dist_level_type(l_counter) = 9) THEN
6328:
6329: -- LEVEL 9, ASSIGNMENT_TYPE 1: GLOBAL
6330: IF PG_DEBUG in ('Y', 'C') THEN
6331: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');
6332: END IF;
6333: -- Bug 2931266. No need for customer_site_id join at this level
6334: SELECT
6335: NVL(SOURCE_ORG.SOURCE_ORGANIZATION_ID, -1) SOURCE_ORGANIZATION_ID,

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

6390:
6391: -- Stopping Check
6392: IF (x_atp_sources.Rank.COUNT > 0) THEN
6393: IF PG_DEBUG in ('Y', 'C') THEN
6394: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 9. Search over.');
6395: END IF;
6396: return;
6397: ELSE
6398: IF l_counter = l_dist_level_type.LAST THEN

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

6396: return;
6397: ELSE
6398: IF l_counter = l_dist_level_type.LAST THEN
6399: IF PG_DEBUG in ('Y', 'C') THEN
6400: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Could not find sources for the item in the entire search');
6401: END IF;
6402: x_return_status := FND_API.G_RET_STS_ERROR;
6403: return;
6404: END IF;

Line 6415: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for ship set sources');

6411: ELSE -- of case1
6412: -- case2 begins
6413:
6414: IF PG_DEBUG in ('Y', 'C') THEN
6415: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Starting search for ship set sources');
6416: END IF;
6417:
6418: -- Delete the table MSC_ATP_SOURCES_TEMP
6419: DELETE MSC_ATP_SOURCES_TEMP;

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

6423: IF (l_dist_level_type(l_counter) = 1) THEN
6424:
6425: -- LEVEL 1, ASSIGNMENT TYPE 6: ITEM-ORG
6426: IF PG_DEBUG in ('Y', 'C') THEN
6427: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 1 (item-org)');
6428: END IF;
6429:
6430: -- At first level, visited_flag in table msc_ship_set_temp is 0 for all rows.
6431: -- Therefore no need for clause 'AND msst.visisble_flag = 0'.

Line 6492: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 1');

6488: IF (l_inserted_rows > 0) THEN
6489:
6490: -- Found some sources for some items.
6491: IF PG_DEBUG in ('Y', 'C') THEN
6492: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 1');
6493: END IF;
6494:
6495:
6496: -- Mark all the items for which sources are/have been found.

Line 6542: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 1');

6538:
6539: IF (x_atp_sources.Rank.COUNT > 0) THEN
6540: -- Common sources found
6541: IF PG_DEBUG in ('Y', 'C') THEN
6542: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 1');
6543: END IF;
6544: return;
6545: ELSE
6546: -- No common sources found

Line 6548: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

6544: return;
6545: ELSE
6546: -- No common sources found
6547: IF PG_DEBUG in ('Y', 'C') THEN
6548: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
6549: END IF;
6550: x_return_status := FND_API.G_RET_STS_ERROR;
6551: return;
6552: END IF; -- common sources

Line 6560: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

6556:
6557: -- Check the stopping condition.
6558: IF l_counter = l_dist_level_type.LAST THEN
6559: IF PG_DEBUG in ('Y', 'C') THEN
6560: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
6561: END IF;
6562: x_return_status := FND_API.G_RET_STS_ERROR;
6563: return;
6564: ELSE

Line 6566: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

6562: x_return_status := FND_API.G_RET_STS_ERROR;
6563: return;
6564: ELSE
6565: IF PG_DEBUG in ('Y', 'C') THEN
6566: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
6567: END IF;
6568: END IF;
6569:
6570:

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

6571: ELSIF (l_dist_level_type(l_counter) = 2) THEN
6572:
6573: -- LEVEL 2, ASSIGNMENT TYPE 9: ITEM-REGION
6574: IF PG_DEBUG in ('Y', 'C') THEN
6575: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 2 (item-reg)');
6576: END IF;
6577:
6578: -- Find sources for min value of expression.
6579: SELECT

Line 6626: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');

6622:
6623: -- Step1: All the items for which sources are found,
6624: -- update column min_region_value and visited_flag in msc_ship_set_temp.
6625: IF PG_DEBUG in ('Y', 'C') THEN
6626: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
6627: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
6628: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
6629: || ' min region value: ' || l_min_region_value_arr(i));
6630: END LOOP;

Line 6628: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)

6624: -- update column min_region_value and visited_flag in msc_ship_set_temp.
6625: IF PG_DEBUG in ('Y', 'C') THEN
6626: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
6627: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
6628: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
6629: || ' min region value: ' || l_min_region_value_arr(i));
6630: END LOOP;
6631: END IF;
6632:

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

6742: ORDER BY 5; -- Rank; order by cum rank instead of group by rank
6743:
6744: IF (x_atp_sources.Rank.COUNT > 0) THEN
6745: IF PG_DEBUG in ('Y', 'C') THEN
6746: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 2. Search over.');
6747: END IF;
6748: return;
6749: ELSE
6750: IF PG_DEBUG in ('Y', 'C') THEN

Line 6751: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');

6747: END IF;
6748: return;
6749: ELSE
6750: IF PG_DEBUG in ('Y', 'C') THEN
6751: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');
6752: END IF;
6753: x_return_status := FND_API.G_RET_STS_ERROR;
6754: return;
6755: END IF;

Line 6764: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

6760:
6761: -- Check the stopping condition.
6762: IF l_counter = l_dist_level_type.LAST THEN
6763: IF PG_DEBUG in ('Y', 'C') THEN
6764: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
6765: END IF;
6766: x_return_status := FND_API.G_RET_STS_ERROR;
6767: return;
6768: ELSE

Line 6770: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

6766: x_return_status := FND_API.G_RET_STS_ERROR;
6767: return;
6768: ELSE
6769: IF PG_DEBUG in ('Y', 'C') THEN
6770: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
6771: END IF;
6772: END IF;
6773:
6774: ELSIF (l_dist_level_type(l_counter) = 3) THEN

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

6775:
6776: -- LEVEL3, ASSIGNMENT_TYPE 5: CATEGORY-ORG
6777:
6778: IF PG_DEBUG in ('Y', 'C') THEN
6779: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 3 (cat-org)');
6780: END IF;
6781:
6782: -- Find and insert the sources in msc_atp_sources_temp
6783: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,

Line 6842: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 3');

6838: IF (l_inserted_rows > 0) THEN
6839:
6840: -- Found some sources for some items.
6841: IF PG_DEBUG in ('Y', 'C') THEN
6842: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 3');
6843: END IF;
6844:
6845: -- Mark all the items for which sources are/have been found.
6846: UPDATE msc_ship_set_temp

Line 6891: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 3');

6887:
6888: IF (x_atp_sources.Rank.COUNT > 0) THEN
6889: -- Common sources found
6890: IF PG_DEBUG in ('Y', 'C') THEN
6891: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 3');
6892: END IF;
6893: return;
6894: ELSE
6895: -- No common sources found

Line 6897: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

6893: return;
6894: ELSE
6895: -- No common sources found
6896: IF PG_DEBUG in ('Y', 'C') THEN
6897: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
6898: END IF;
6899: x_return_status := FND_API.G_RET_STS_ERROR;
6900: return;
6901: END IF; -- common sources

Line 6909: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

6905:
6906: -- Check the stopping condition.
6907: IF l_counter = l_dist_level_type.LAST THEN
6908: IF PG_DEBUG in ('Y', 'C') THEN
6909: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
6910: END IF;
6911: x_return_status := FND_API.G_RET_STS_ERROR;
6912: return;
6913: ELSE

Line 6915: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

6911: x_return_status := FND_API.G_RET_STS_ERROR;
6912: return;
6913: ELSE
6914: IF PG_DEBUG in ('Y', 'C') THEN
6915: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
6916: END IF;
6917: END IF;
6918:
6919: ELSIF (l_dist_level_type(l_counter) = 4) THEN

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

6919: ELSIF (l_dist_level_type(l_counter) = 4) THEN
6920:
6921: -- LEVEL4, ASSIGNMENT TYPE3: ITEM
6922: IF PG_DEBUG in ('Y', 'C') THEN
6923: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 4 (item)');
6924: END IF;
6925: -- Bug 2931266. No need for customer_site_id join at this level
6926: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
6927: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)

Line 6985: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 4');

6981: IF (l_inserted_rows > 0) THEN
6982:
6983: -- Found some sources for some items.
6984: IF PG_DEBUG in ('Y', 'C') THEN
6985: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 4');
6986: END IF;
6987:
6988: -- Mark all the items for which sources are/have been found.
6989: UPDATE msc_ship_set_temp

Line 7034: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 4');

7030:
7031: IF (x_atp_sources.Rank.COUNT > 0) THEN
7032: -- Common sources found
7033: IF PG_DEBUG in ('Y', 'C') THEN
7034: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 4');
7035: END IF;
7036: return;
7037: ELSE
7038: -- No common sources found

Line 7040: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

7036: return;
7037: ELSE
7038: -- No common sources found
7039: IF PG_DEBUG in ('Y', 'C') THEN
7040: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
7041: END IF;
7042: x_return_status := FND_API.G_RET_STS_ERROR;
7043: return;
7044: END IF; -- common sources

Line 7052: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

7048:
7049: -- Check the stopping condition.
7050: IF l_counter = l_dist_level_type.LAST THEN
7051: IF PG_DEBUG in ('Y', 'C') THEN
7052: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
7053: END IF;
7054: x_return_status := FND_API.G_RET_STS_ERROR;
7055: return;
7056: ELSE

Line 7058: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

7054: x_return_status := FND_API.G_RET_STS_ERROR;
7055: return;
7056: ELSE
7057: IF PG_DEBUG in ('Y', 'C') THEN
7058: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
7059: END IF;
7060: END IF;
7061:
7062: ELSIF (l_dist_level_type(l_counter) = 5) THEN

Line 7066: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 5 (cat-reg)');

7062: ELSIF (l_dist_level_type(l_counter) = 5) THEN
7063:
7064: -- LEVEL 5, ASSIGNMENT TYPE 8: CATEGORY-REGION
7065: IF PG_DEBUG in ('Y', 'C') THEN
7066: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 5 (cat-reg)');
7067: END IF;
7068:
7069: SELECT
7070: MSST_INNER.INVENTORY_ITEM_ID,

Line 7116: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');

7112:
7113: -- Step1: For all the items found, update column min_region_value in msc_ship_set_temp.
7114: -- Also update the column visited_flag
7115: IF PG_DEBUG in ('Y', 'C') THEN
7116: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
7117: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
7118: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
7119: || ' min region value: ' || l_min_region_value_arr(i));
7120: END LOOP;

Line 7118: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)

7114: -- Also update the column visited_flag
7115: IF PG_DEBUG in ('Y', 'C') THEN
7116: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
7117: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
7118: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
7119: || ' min region value: ' || l_min_region_value_arr(i));
7120: END LOOP;
7121: END IF;
7122:

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

7232: ORDER BY 5; -- Rank;order by cum rank instead of group by rank
7233:
7234: IF (x_atp_sources.Rank.COUNT > 0) THEN
7235: IF PG_DEBUG in ('Y', 'C') THEN
7236: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 5. Search over.');
7237: END IF;
7238: return;
7239: ELSE
7240: IF PG_DEBUG in ('Y', 'C') THEN

Line 7241: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');

7237: END IF;
7238: return;
7239: ELSE
7240: IF PG_DEBUG in ('Y', 'C') THEN
7241: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');
7242: END IF;
7243: x_return_status := FND_API.G_RET_STS_ERROR;
7244: return;
7245: END IF;

Line 7255: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');

7251: ELSIF (l_dist_level_type(l_counter) = 6) THEN
7252:
7253: -- LEVEL 6, ASSIGNMENT TYPE 2: CATEGORY
7254: IF PG_DEBUG in ('Y', 'C') THEN
7255: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 6 (cat)');
7256: END IF;
7257: -- Bug 2931266. No need for customer_site_id join at this level
7258: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7259: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)

Line 7318: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 6');

7314: IF (l_inserted_rows > 0) THEN
7315:
7316: -- Found some sources for some items.
7317: IF PG_DEBUG in ('Y', 'C') THEN
7318: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 6');
7319: END IF;
7320:
7321: -- Mark all the items for which sources are/have been found.
7322: UPDATE msc_ship_set_temp

Line 7367: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 6');

7363:
7364: IF (x_atp_sources.Rank.COUNT > 0) THEN
7365: -- Common sources found
7366: IF PG_DEBUG in ('Y', 'C') THEN
7367: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 6');
7368: END IF;
7369: return;
7370: ELSE
7371: -- No common sources found

Line 7373: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

7369: return;
7370: ELSE
7371: -- No common sources found
7372: IF PG_DEBUG in ('Y', 'C') THEN
7373: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
7374: END IF;
7375: x_return_status := FND_API.G_RET_STS_ERROR;
7376: return;
7377: END IF; -- common sources

Line 7385: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

7381:
7382: -- Check the stopping condition.
7383: IF l_counter = l_dist_level_type.LAST THEN
7384: IF PG_DEBUG in ('Y', 'C') THEN
7385: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
7386: END IF;
7387: x_return_status := FND_API.G_RET_STS_ERROR;
7388: return;
7389: ELSE

Line 7391: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

7387: x_return_status := FND_API.G_RET_STS_ERROR;
7388: return;
7389: ELSE
7390: IF PG_DEBUG in ('Y', 'C') THEN
7391: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
7392: END IF;
7393: END IF;
7394:
7395: ELSIF (l_dist_level_type(l_counter) = 7) THEN

Line 7399: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');

7395: ELSIF (l_dist_level_type(l_counter) = 7) THEN
7396:
7397: -- LEVEL 7, ASSIGNMENT_TYPE 4: ORG
7398: IF PG_DEBUG in ('Y', 'C') THEN
7399: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 7 (org)');
7400: END IF;
7401:
7402: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7403: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)

Line 7460: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 7');

7456: IF (l_inserted_rows > 0) THEN
7457:
7458: -- Found some sources for some items.
7459: IF PG_DEBUG in ('Y', 'C') THEN
7460: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 7');
7461: END IF;
7462:
7463: -- Mark all the items for which sources are/have been found.
7464: UPDATE msc_ship_set_temp

Line 7509: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 7');

7505:
7506: IF (x_atp_sources.Rank.COUNT > 0) THEN
7507: -- Common sources found
7508: IF PG_DEBUG in ('Y', 'C') THEN
7509: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 7');
7510: END IF;
7511: return;
7512: ELSE
7513: -- No common sources found

Line 7515: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

7511: return;
7512: ELSE
7513: -- No common sources found
7514: IF PG_DEBUG in ('Y', 'C') THEN
7515: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
7516: END IF;
7517: x_return_status := FND_API.G_RET_STS_ERROR;
7518: return;
7519: END IF; -- common sources

Line 7527: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

7523:
7524: -- Check the stopping condition.
7525: IF l_counter = l_dist_level_type.LAST THEN
7526: IF PG_DEBUG in ('Y', 'C') THEN
7527: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
7528: END IF;
7529: x_return_status := FND_API.G_RET_STS_ERROR;
7530: return;
7531: ELSE

Line 7533: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');

7529: x_return_status := FND_API.G_RET_STS_ERROR;
7530: return;
7531: ELSE
7532: IF PG_DEBUG in ('Y', 'C') THEN
7533: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Some more search left. Continuing');
7534: END IF;
7535: END IF;
7536:
7537: ELSIF (l_dist_level_type(l_counter) = 8) THEN

Line 7541: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 8 (reg)');

7537: ELSIF (l_dist_level_type(l_counter) = 8) THEN
7538:
7539: -- LEVEL 8, ASSIGNMENT_TYPE 7: REGION
7540: IF PG_DEBUG in ('Y', 'C') THEN
7541: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 8 (reg)');
7542: END IF;
7543:
7544: SELECT
7545: MSST_INNER.INVENTORY_ITEM_ID,

Line 7589: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');

7585:
7586: -- Step1: For all the items found, update column min_region_value in msc_ship_set_temp.
7587: -- Also update the column visited_flag
7588: IF PG_DEBUG in ('Y', 'C') THEN
7589: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
7590: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
7591: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
7592: || ' min region value: ' || l_min_region_value_arr(i));
7593: END LOOP;

Line 7591: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)

7587: -- Also update the column visited_flag
7588: IF PG_DEBUG in ('Y', 'C') THEN
7589: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'For following items, the min region value found');
7590: FOR i IN 1..l_inventory_item_id_arr.COUNT LOOP
7591: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Item: '|| l_inventory_item_id_arr(i)
7592: || ' min region value: ' || l_min_region_value_arr(i));
7593: END LOOP;
7594: END IF;
7595:

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

7704: ORDER BY 5; -- Rank; order by cum rank instead of group by rank
7705:
7706: IF (x_atp_sources.Rank.COUNT > 0) THEN
7707: IF PG_DEBUG in ('Y', 'C') THEN
7708: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Sources found at level 8. Search over.');
7709: END IF;
7710: return;
7711: ELSE
7712: IF PG_DEBUG in ('Y', 'C') THEN

Line 7713: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');

7709: END IF;
7710: return;
7711: ELSE
7712: IF PG_DEBUG in ('Y', 'C') THEN
7713: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for the ship set.');
7714: END IF;
7715: x_return_status := FND_API.G_RET_STS_ERROR;
7716: return;
7717: END IF;

Line 7727: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');

7723: ELSIF (l_dist_level_type(l_counter) = 9) THEN
7724:
7725: -- LEVEL 9, ASSIGNMENT_TYPE 1: GLOBAL
7726: IF PG_DEBUG in ('Y', 'C') THEN
7727: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Searching sources at level 9 (global)');
7728: END IF;
7729: -- Bug 2931266. No need for customer_site_id join at this level
7730: INSERT INTO MSC_ATP_SOURCES_TEMP (inventory_item_id, Organization_Id, Instance_Id,
7731: Supplier_Id, Supplier_Site_Id, Rank, Source_Type, Preferred, Lead_Time, Ship_Method)

Line 7789: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 9');

7785: IF (l_inserted_rows > 0) THEN
7786:
7787: -- Found some sources for some items.
7788: IF PG_DEBUG in ('Y', 'C') THEN
7789: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'Found some sources for some ship set items at level 9');
7790: END IF;
7791:
7792: -- Mark all the items for which sources are/have been found.
7793: UPDATE msc_ship_set_temp

Line 7838: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 9');

7834:
7835: IF (x_atp_sources.Rank.COUNT > 0) THEN
7836: -- Common sources found
7837: IF PG_DEBUG in ('Y', 'C') THEN
7838: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All common sources for ship set found at level 9');
7839: END IF;
7840: return;
7841: ELSE
7842: -- No common sources found

Line 7844: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');

7840: return;
7841: ELSE
7842: -- No common sources found
7843: IF PG_DEBUG in ('Y', 'C') THEN
7844: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'No common sources for all the ship set items.');
7845: END IF;
7846: x_return_status := FND_API.G_RET_STS_ERROR;
7847: return;
7848: END IF; -- common sources

Line 7856: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');

7852:
7853: -- Check the stopping condition.
7854: IF l_counter = l_dist_level_type.LAST THEN
7855: IF PG_DEBUG in ('Y', 'C') THEN
7856: msc_sch_wb.atp_debug('Get_Sources_Info: '|| 'All items in ship set could not be found in the entire search.');
7857: END IF;
7858: x_return_status := FND_API.G_RET_STS_ERROR;
7859: return;
7860: END IF;

Line 7869: msc_sch_wb.atp_debug('End of Get_Sources Info procedure');

7865:
7866: END IF; -- case2
7867:
7868: IF PG_DEBUG in ('Y', 'C') THEN
7869: msc_sch_wb.atp_debug('End of Get_Sources Info procedure');
7870: END IF;
7871: EXCEPTION
7872: WHEN OTHERS THEN
7873: x_return_status := FND_API.G_RET_STS_ERROR;

Line 7888: msc_sch_wb.atp_debug('Begin Initialize_Set_Processing');

7884: p_start IN NUMBER
7885: ) IS
7886: BEGIN
7887: IF PG_DEBUG in ('Y', 'C') THEN
7888: msc_sch_wb.atp_debug('Begin Initialize_Set_Processing');
7889: END IF;
7890: -- 2834932
7891: G_set_nonoverride_flag := 'N';
7892: G_set_override_flag := 'N';

Line 7914: msc_sch_wb.atp_debug('********** Begin Process_Set_Line **********');

7910: l_arr_LAD_ln DATE;
7911: BEGIN
7912:
7913: IF PG_DEBUG in ('Y', 'C') THEN
7914: msc_sch_wb.atp_debug('********** Begin Process_Set_Line **********');
7915: END IF;
7916:
7917: x_line_status := NVL(p_set.error_code(i), MSC_ATP_PVT.ALLSUCCESS);
7918:

Line 7926: msc_sch_wb.atp_debug('l_request_date_ln: ' || l_request_date_ln);

7922: l_request_date_ln := p_set.requested_arrival_date(i);
7923: END IF;
7924:
7925: IF PG_DEBUG in ('Y', 'C') THEN
7926: msc_sch_wb.atp_debug('l_request_date_ln: ' || l_request_date_ln);
7927: msc_sch_wb.atp_debug('Input error code: ' || x_line_status); --bug3439591
7928: END IF;
7929:
7930: IF p_set.override_flag(i) = 'Y' THEN

Line 7927: msc_sch_wb.atp_debug('Input error code: ' || x_line_status); --bug3439591

7923: END IF;
7924:
7925: IF PG_DEBUG in ('Y', 'C') THEN
7926: msc_sch_wb.atp_debug('l_request_date_ln: ' || l_request_date_ln);
7927: msc_sch_wb.atp_debug('Input error code: ' || x_line_status); --bug3439591
7928: END IF;
7929:
7930: IF p_set.override_flag(i) = 'Y' THEN
7931:

Line 7948: msc_sch_wb.atp_debug('Override case. override_date: ' ||

7944: END IF;
7945: END IF;
7946:
7947: IF PG_DEBUG in ('Y', 'C') THEN
7948: msc_sch_wb.atp_debug('Override case. override_date: ' ||
7949: to_char(G_override_date, 'DD-MON-YYYY HH24:MI:SS'));
7950: END IF;
7951: G_set_override_flag := 'Y';
7952: ELSE

Line 7973: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

7969: END IF;
7970: */
7971:
7972: IF PG_DEBUG in ('Y', 'C') THEN
7973: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7974: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7975: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7976: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7977: 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 7974: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));

7970: */
7971:
7972: IF PG_DEBUG in ('Y', 'C') THEN
7973: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7974: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7975: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7976: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7977: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7978: END IF;

Line 7975: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));

7971:
7972: IF PG_DEBUG in ('Y', 'C') THEN
7973: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7974: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7975: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7976: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7977: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7978: END IF;
7979: -- 2834932

Line 7976: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591

7972: IF PG_DEBUG in ('Y', 'C') THEN
7973: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7974: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7975: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7976: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7977: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7978: END IF;
7979: -- 2834932
7980: G_set_nonoverride_flag := 'Y';

Line 7977: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591

7973: msc_sch_wb.atp_debug('Non-Override case. ship_date: ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
7974: msc_sch_wb.atp_debug('Non-Override case. ship_LAD_ln: ' || to_char(l_ship_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7975: msc_sch_wb.atp_debug('Non-Override case. arr_LAD_ln: ' || to_char(l_arr_LAD_ln, 'DD-MON-YYYY HH24:MI:SS'));
7976: msc_sch_wb.atp_debug('Non-Override case. arr_date: ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7977: msc_sch_wb.atp_debug('Non-Override case. LAD: ' || to_char(p_set.latest_acceptable_date(i), 'DD-MON-YYYY HH24:MI:SS'));--bug3439591
7978: END IF;
7979: -- 2834932
7980: G_set_nonoverride_flag := 'Y';
7981: END IF;

Line 8043: msc_sch_wb.atp_debug('CHANGED THE ITEM PRESENT FLAG');

8039: END IF;
8040: END IF;
8041: 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
8042: MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := 'Y';
8043: msc_sch_wb.atp_debug('CHANGED THE ITEM PRESENT FLAG');
8044: END IF;
8045: IF PG_DEBUG in ('Y', 'C') THEN
8046: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8047: msc_sch_wb.atp_debug('set_status: ' || G_set_status);

Line 8046: msc_sch_wb.atp_debug('line_status: ' || x_line_status);

8042: MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := 'Y';
8043: msc_sch_wb.atp_debug('CHANGED THE ITEM PRESENT FLAG');
8044: END IF;
8045: IF PG_DEBUG in ('Y', 'C') THEN
8046: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8047: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8048: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8049: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8050: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));

Line 8047: msc_sch_wb.atp_debug('set_status: ' || G_set_status);

8043: msc_sch_wb.atp_debug('CHANGED THE ITEM PRESENT FLAG');
8044: END IF;
8045: IF PG_DEBUG in ('Y', 'C') THEN
8046: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8047: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8048: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8049: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8050: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8051: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));

Line 8048: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);

8044: END IF;
8045: IF PG_DEBUG in ('Y', 'C') THEN
8046: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8047: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8048: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8049: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8050: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8051: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8052: END IF;

Line 8049: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);

8045: IF PG_DEBUG in ('Y', 'C') THEN
8046: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8047: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8048: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8049: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8050: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8051: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8052: END IF;
8053:

Line 8050: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));

8046: msc_sch_wb.atp_debug('line_status: ' || x_line_status);
8047: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8048: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8049: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8050: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8051: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8052: END IF;
8053:
8054: END Process_Set_Line;

Line 8051: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));

8047: msc_sch_wb.atp_debug('set_status: ' || G_set_status);
8048: msc_sch_wb.atp_debug('ship_LAD_set: ' || G_ship_LAD_set);
8049: msc_sch_wb.atp_debug('arr_LAD_set: ' || G_arr_LAD_set);
8050: msc_sch_wb.atp_debug('latest_ship_date_set: ' || to_char(G_latest_ship_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8051: msc_sch_wb.atp_debug('latest_arr_date_set: ' || to_char(G_latest_arr_date_set, 'DD-MON-YYYY HH24:MI:SS'));
8052: END IF;
8053:
8054: END Process_Set_Line;
8055:

Line 8075: msc_sch_wb.atp_debug('Begin Process_Set_Dates_Errors');

8071:
8072: BEGIN
8073:
8074: IF PG_DEBUG in ('Y', 'C') THEN
8075: msc_sch_wb.atp_debug('Begin Process_Set_Dates_Errors');
8076: msc_sch_wb.atp_debug(' set_status: ' || G_set_status);
8077: END IF;
8078:
8079: l_start := nvl(p_start, 1);

Line 8076: msc_sch_wb.atp_debug(' set_status: ' || G_set_status);

8072: BEGIN
8073:
8074: IF PG_DEBUG in ('Y', 'C') THEN
8075: msc_sch_wb.atp_debug('Begin Process_Set_Dates_Errors');
8076: msc_sch_wb.atp_debug(' set_status: ' || G_set_status);
8077: END IF;
8078:
8079: l_start := nvl(p_start, 1);
8080: l_end := nvl(p_end, p_set.action.count);

Line 8214: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

8210: END IF;
8211: END IF; --4460369*/ --4967040
8212:
8213: IF PG_DEBUG in ('Y', 'C') THEN
8214: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8215: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8216: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8217: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8218: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));

Line 8215: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));

8211: END IF; --4460369*/ --4967040
8212:
8213: IF PG_DEBUG in ('Y', 'C') THEN
8214: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8215: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8216: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8217: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8218: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));
8219: END IF;

Line 8216: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));

8212:
8213: IF PG_DEBUG in ('Y', 'C') THEN
8214: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8215: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8216: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8217: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8218: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));
8219: END IF;
8220: end loop;

Line 8217: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));

8213: IF PG_DEBUG in ('Y', 'C') THEN
8214: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8215: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8216: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8217: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8218: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));
8219: END IF;
8220: end loop;
8221: -- 2834932 dsting. split the group date and error code loops

Line 8218: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));

8214: msc_sch_wb.atp_debug('Ship Date := ' || to_char(p_set.ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8215: msc_sch_wb.atp_debug('Arrival Date := ' || to_char(p_set.arrival_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8216: msc_sch_wb.atp_debug('Group Ship Date := ' || to_char(p_set.group_ship_date(i), 'DD-MON-YYYY HH24:MI:SS'));
8217: msc_sch_wb.atp_debug('group_ship_date(' || i || '): ' || p_set.group_ship_date(i));
8218: msc_sch_wb.atp_debug('group_arrival_date(' || i || '): ' || p_set.group_arrival_date(i));
8219: END IF;
8220: end loop;
8221: -- 2834932 dsting. split the group date and error code loops
8222:

Line 8248: msc_sch_wb.atp_debug('Override date is nonworking day');

8244: IF l_status_flag = G_NONWORKING_DAY AND
8245: nvl(p_set.override_flag(i), 'N') = 'N'
8246: THEN
8247: IF PG_DEBUG in ('Y', 'C') THEN
8248: msc_sch_wb.atp_debug('Override date is nonworking day');
8249: END IF;
8250: IF p_set.error_code(i) = MSC_ATP_PVT.ALLSUCCESS THEN
8251: p_set.error_code(i) := MSC_ATP_PVT.ATP_OVERRIDE_DATE_FAIL;
8252: END IF;

Line 8262: msc_sch_wb.atp_debug('stmt18 - Multiple lines overridden to diff dates');

8258: IF (NVL(p_set.Override_Flag(i), 'N') = 'Y') THEN
8259: IF TRUNC(G_override_date) <> TRUNC(l_line_date) THEN
8260: p_set.Error_Code(i) := MSC_ATP_PVT.ATP_MULTI_OVERRIDE_DATES;
8261: IF PG_DEBUG in ('Y', 'C') THEN
8262: msc_sch_wb.atp_debug('stmt18 - Multiple lines overridden to diff dates');
8263: END IF;
8264: END IF;
8265: ELSE
8266: IF TRUNC(G_override_date) < TRUNC(l_line_date) THEN

Line 8268: msc_sch_wb.atp_debug('stmt19 - Unable to Meet Overridden dates');

8264: END IF;
8265: ELSE
8266: IF TRUNC(G_override_date) < TRUNC(l_line_date) THEN
8267: IF PG_DEBUG in ('Y', 'C') THEN
8268: msc_sch_wb.atp_debug('stmt19 - Unable to Meet Overridden dates');
8269: END IF;
8270: p_set.Error_Code(i) := MSC_ATP_PVT.ATP_OVERRIDE_DATE_FAIL;
8271: ELSIF TRUNC(p_set.ship_date(i)) > TRUNC(G_ship_LAD_set)
8272: OR TRUNC(p_set.arrival_date(i)) > TRUNC(G_arr_LAD_set)

Line 8276: msc_sch_wb.atp_debug('stmt19 - Unable to Meet LAD');

8272: OR TRUNC(p_set.arrival_date(i)) > TRUNC(G_arr_LAD_set)
8273: THEN
8274: p_set.Error_Code(i) := MSC_ATP_PVT.ATP_ACCEPT_FAIL;
8275: IF PG_DEBUG in ('Y', 'C') THEN
8276: msc_sch_wb.atp_debug('stmt19 - Unable to Meet LAD');
8277: END IF;
8278: END IF;
8279: END IF;
8280:

Line 8288: msc_sch_wb.atp_debug('GROUPEL_ERROR');

8284: IN (MSC_ATP_PVT.ALLSUCCESS, MSC_ATP_PVT.ATP_NOT_APPL, MSC_ATP_PVT.PDS_TO_ODS_SWITCH)
8285: THEN
8286: p_set.Error_Code(i) := MSC_ATP_PVT.GROUPEL_ERROR;
8287: IF PG_DEBUG in ('Y', 'C') THEN
8288: msc_sch_wb.atp_debug('GROUPEL_ERROR');
8289: END IF;
8290: END IF;
8291: end loop;
8292: end if;

Line 8295: msc_sch_wb.atp_debug('END Proces_Set_Dates_Errors');

8291: end loop;
8292: end if;
8293:
8294: IF PG_DEBUG in ('Y', 'C') THEN
8295: msc_sch_wb.atp_debug('END Proces_Set_Dates_Errors');
8296: END IF;
8297:
8298: x_set_status := G_set_status;
8299: END Process_Set_Dates_Errors;

Line 8316: msc_sch_wb.atp_debug('Begin Update_Set_SD_Dates');

8312: l_ship_arrival_date_rec MSC_ATP_PVT.ship_arrival_date_rec_typ;
8313: l_return_status VARCHAR2(1);
8314: BEGIN
8315: IF PG_DEBUG in ('Y', 'C') THEN
8316: msc_sch_wb.atp_debug('Begin Update_Set_SD_Dates');
8317: END IF;
8318:
8319: FOR m in 1.. p_set.action.count LOOP
8320: IF PG_DEBUG in ('Y', 'C') THEN

Line 8321: msc_sch_wb.atp_debug('m = ' || m);

8317: END IF;
8318:
8319: FOR m in 1.. p_set.action.count LOOP
8320: IF PG_DEBUG in ('Y', 'C') THEN
8321: msc_sch_wb.atp_debug('m = ' || m);
8322: END IF;
8323:
8324: IF (p_set.Action(m)<> MSC_ATP_PVT.ATPQUERY and p_set.quantity_ordered(m) <> 0) THEN -- xxxx
8325: /* --bug4281663 commented and initialized below

Line 8352: msc_sch_wb.atp_debug(' l_demand_pegging_id := ' || l_demand_pegging_id);

8348: --bug4281663 Using the plan_id passed instead of calling get_global_plan_info
8349: l_plan_id := p_set.plan_id(m);
8350: l_demand_pegging_id := MSC_ATP_PVT.G_DEMAND_PEGGING_ID;
8351: IF PG_DEBUG in ('Y', 'C') THEN
8352: msc_sch_wb.atp_debug(' l_demand_pegging_id := ' || l_demand_pegging_id);
8353: msc_sch_wb.atp_debug(' l_plan_id := ' || l_plan_id);
8354: END IF;
8355: -- xxxx
8356: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);

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

8349: l_plan_id := p_set.plan_id(m);
8350: l_demand_pegging_id := MSC_ATP_PVT.G_DEMAND_PEGGING_ID;
8351: IF PG_DEBUG in ('Y', 'C') THEN
8352: msc_sch_wb.atp_debug(' l_demand_pegging_id := ' || l_demand_pegging_id);
8353: msc_sch_wb.atp_debug(' l_plan_id := ' || l_plan_id);
8354: END IF;
8355: -- xxxx
8356: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);
8357: IF PG_DEBUG in ('Y', 'C') THEN

Line 8358: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);

8354: END IF;
8355: -- xxxx
8356: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);
8357: IF PG_DEBUG in ('Y', 'C') THEN
8358: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8359: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8360: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8361: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8362: --bug4281663 Added more debug statements

Line 8359: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));

8355: -- xxxx
8356: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);
8357: IF PG_DEBUG in ('Y', 'C') THEN
8358: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8359: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8360: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8361: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8362: --bug4281663 Added more debug statements
8363: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));

Line 8360: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));

8356: MSC_ATP_PVT.G_DEMAND_PEGGING_ID := p_set.end_pegging_id(m);
8357: IF PG_DEBUG in ('Y', 'C') THEN
8358: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8359: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8360: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8361: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8362: --bug4281663 Added more debug statements
8363: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));
8364: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));

Line 8361: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));

8357: IF PG_DEBUG in ('Y', 'C') THEN
8358: msc_sch_wb.atp_debug(' G_DEMAND_PEGGING_ID := ' || MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
8359: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8360: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8361: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8362: --bug4281663 Added more debug statements
8363: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));
8364: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));
8365: END IF;

Line 8363: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));

8359: msc_sch_wb.atp_debug(' G_DEMAND_CLASS_ATP_FLAG := ' || MSC_ATP_PVT.G_DEMAND_CLASS_ATP_FLAG(m));
8360: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8361: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8362: --bug4281663 Added more debug statements
8363: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));
8364: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));
8365: END IF;
8366:
8367: -- update_sd_date for setproc

Line 8364: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));

8360: msc_sch_wb.atp_debug(' G_REQ_ATP_DATE := ' || MSC_ATP_PVT.G_REQ_ATP_DATE(m));
8361: msc_sch_wb.atp_debug(' G_REQ_DATE_QTY := ' || MSC_ATP_PVT.G_REQ_DATE_QTY(m));
8362: --bug4281663 Added more debug statements
8363: msc_sch_wb.atp_debug(' p_set.ship_date(m) := ' || p_set.ship_date(m));
8364: msc_sch_wb.atp_debug(' p_set.group_ship_date(m) := ' || p_set.group_ship_date(m));
8365: END IF;
8366:
8367: -- update_sd_date for setproc
8368: IF p_set.ship_date(m) <> p_set.group_ship_date(m) THEN

Line 8392: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');

8388: l_order_date_type := 1;
8389: END IF;
8390:
8391: IF PG_DEBUG in ('Y', 'C') THEN
8392: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8393: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8394: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8395: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8396: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);

Line 8393: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));

8389: END IF;
8390:
8391: IF PG_DEBUG in ('Y', 'C') THEN
8392: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8393: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8394: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8395: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8396: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);
8397: END IF;

Line 8394: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));

8390:
8391: IF PG_DEBUG in ('Y', 'C') THEN
8392: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8393: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8394: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8395: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8396: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);
8397: END IF;
8398:

Line 8395: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);

8391: IF PG_DEBUG in ('Y', 'C') THEN
8392: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8393: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8394: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8395: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8396: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);
8397: END IF;
8398:
8399: MSC_ATP_DB_UTILS.Update_SD_Date(p_set.Identifier(m),

Line 8396: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);

8392: msc_sch_wb.atp_debug(' __________________Flush PDS Data__________________');
8393: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'sch arrival date: ' || p_set.group_arrival_date(m));
8394: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'lat accep date : ' || p_set.latest_acceptable_date(m));
8395: msc_sch_wb.atp_debug('Update_Set_SD_Dates : ' || 'order_date_type : ' || l_order_date_type);
8396: msc_sch_wb.atp_debug(' update_sd_date line: ' || m || ' date: ' || l_sd_date);
8397: END IF;
8398:
8399: MSC_ATP_DB_UTILS.Update_SD_Date(p_set.Identifier(m),
8400: p_set.instance_id(m), l_sd_date, l_plan_id,null, -- dsting setproc

Line 8445: msc_sch_wb.atp_debug('Update_Set_SD_Dates: ' || 'l_ship_arrival_date_rec.demand_id = ' || l_ship_arrival_date_rec.demand_id);

8441: WHEN OTHERS THEN
8442: l_ship_arrival_date_rec.demand_id := null;
8443: END;
8444: IF PG_DEBUG in ('Y', 'C') THEN
8445: msc_sch_wb.atp_debug('Update_Set_SD_Dates: ' || 'l_ship_arrival_date_rec.demand_id = ' || l_ship_arrival_date_rec.demand_id);
8446: END IF;
8447:
8448: /* Determine order date type*/
8449: IF p_set.requested_arrival_date(m) is not null THEN

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

8468: END IF;
8469:
8470: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8471: IF PG_DEBUG in ('Y', 'C') THEN
8472: msc_sch_wb.atp_debug('Update_Set_SD_Dates: ' || 'Error in call to Flush_Data_In_Pds procedure ');
8473: END IF;
8474: RAISE FND_API.G_EXC_ERROR;
8475: END IF;
8476:

Line 8588: msc_sch_wb.atp_debug('********** get_transit_time **********');

8584:
8585: BEGIN
8586:
8587: IF PG_DEBUG in ('Y', 'C') THEN
8588: msc_sch_wb.atp_debug('********** get_transit_time **********');
8589: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||
8590: ' to: ' || p_to_loc_id);
8591: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8592: ' to: ' || p_to_instance_id);

Line 8589: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||

8585: BEGIN
8586:
8587: IF PG_DEBUG in ('Y', 'C') THEN
8588: msc_sch_wb.atp_debug('********** get_transit_time **********');
8589: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||
8590: ' to: ' || p_to_loc_id);
8591: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8592: ' to: ' || p_to_instance_id);
8593: msc_sch_wb.atp_debug('session_id: ' || p_session_id);

Line 8591: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||

8587: IF PG_DEBUG in ('Y', 'C') THEN
8588: msc_sch_wb.atp_debug('********** get_transit_time **********');
8589: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||
8590: ' to: ' || p_to_loc_id);
8591: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8592: ' to: ' || p_to_instance_id);
8593: msc_sch_wb.atp_debug('session_id: ' || p_session_id);
8594: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);
8595: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);

Line 8593: msc_sch_wb.atp_debug('session_id: ' || p_session_id);

8589: msc_sch_wb.atp_debug('loc from: ' || p_from_loc_id ||
8590: ' to: ' || p_to_loc_id);
8591: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8592: ' to: ' || p_to_instance_id);
8593: msc_sch_wb.atp_debug('session_id: ' || p_session_id);
8594: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);
8595: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);
8596: END IF;
8597:

Line 8594: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);

8590: ' to: ' || p_to_loc_id);
8591: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8592: ' to: ' || p_to_instance_id);
8593: msc_sch_wb.atp_debug('session_id: ' || p_session_id);
8594: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);
8595: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);
8596: END IF;
8597:
8598: -- if the receipt org or the ship method is NULL

Line 8595: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);

8591: msc_sch_wb.atp_debug('instance from: ' || p_from_instance_id ||
8592: ' to: ' || p_to_instance_id);
8593: msc_sch_wb.atp_debug('session_id: ' || p_session_id);
8594: msc_sch_wb.atp_debug('partner_site: ' || p_partner_site_id);
8595: msc_sch_wb.atp_debug('ship method: ' || x_ship_method);
8596: END IF;
8597:
8598: -- if the receipt org or the ship method is NULL
8599: -- then get the default time

Line 8631: msc_sch_wb.atp_debug('Using region level transit times');

8627: AND default_flag = 1
8628: AND rownum = 1;
8629: END IF;
8630: EXCEPTION WHEN NO_DATA_FOUND THEN
8631: msc_sch_wb.atp_debug('Using region level transit times');
8632: IF x_ship_method IS NOT NULL THEN
8633: OPEN c_lead_time;
8634: FETCH c_lead_time INTO x_intransit_time, l_level;
8635: CLOSE c_lead_time;

Line 8663: msc_sch_wb.atp_debug('Using default transit times');

8659: END IF;
8660:
8661: IF x_intransit_time IS NULL AND x_ship_method IS NOT NULL THEN
8662: IF PG_DEBUG in ('Y', 'C') THEN
8663: msc_sch_wb.atp_debug('Using default transit times');
8664: END IF;
8665:
8666: -- call myself with null ship method to get defaults
8667: x_ship_method := NULL;

Line 8684: msc_sch_wb.atp_debug('transit_time:' || x_intransit_time);

8680: END IF;
8681:
8682:
8683: IF PG_DEBUG in ('Y', 'C') THEN
8684: msc_sch_wb.atp_debug('transit_time:' || x_intransit_time);
8685: msc_sch_wb.atp_debug('ship_method:' || x_ship_method);
8686: END IF;
8687:
8688: END get_transit_time;

Line 8685: msc_sch_wb.atp_debug('ship_method:' || x_ship_method);

8681:
8682:
8683: IF PG_DEBUG in ('Y', 'C') THEN
8684: msc_sch_wb.atp_debug('transit_time:' || x_intransit_time);
8685: msc_sch_wb.atp_debug('ship_method:' || x_ship_method);
8686: END IF;
8687:
8688: END get_transit_time;
8689:

Line 8749: msc_sch_wb.atp_debug('PROCEDURE get_delivery_lead_time');

8745: l_dlt_key VARCHAR2(128); --bug 10287537
8746: BEGIN
8747:
8748: IF PG_DEBUG IN ('Y', 'C') THEN
8749: msc_sch_wb.atp_debug('PROCEDURE get_delivery_lead_time');
8750: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||
8751: ' to: ' || p_to_org_id);
8752: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8753: ' to: ' || p_to_loc_id);

Line 8750: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||

8746: BEGIN
8747:
8748: IF PG_DEBUG IN ('Y', 'C') THEN
8749: msc_sch_wb.atp_debug('PROCEDURE get_delivery_lead_time');
8750: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||
8751: ' to: ' || p_to_org_id);
8752: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8753: ' to: ' || p_to_loc_id);
8754: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||

Line 8752: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||

8748: IF PG_DEBUG IN ('Y', 'C') THEN
8749: msc_sch_wb.atp_debug('PROCEDURE get_delivery_lead_time');
8750: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||
8751: ' to: ' || p_to_org_id);
8752: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8753: ' to: ' || p_to_loc_id);
8754: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||
8755: ' to: ' || p_to_instance_id);
8756: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||

Line 8754: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||

8750: msc_sch_wb.atp_debug(' org from: ' || p_from_org_id ||
8751: ' to: ' || p_to_org_id);
8752: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8753: ' to: ' || p_to_loc_id);
8754: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||
8755: ' to: ' || p_to_instance_id);
8756: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||
8757: ' site_id: ' || p_customer_site_id);
8758: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||

Line 8756: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||

8752: msc_sch_wb.atp_debug(' loc from: ' || p_from_loc_id ||
8753: ' to: ' || p_to_loc_id);
8754: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||
8755: ' to: ' || p_to_instance_id);
8756: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||
8757: ' site_id: ' || p_customer_site_id);
8758: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8759: ' site_id: ' || p_supplier_site_id);
8760: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);

Line 8758: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||

8754: msc_sch_wb.atp_debug(' instance from: ' || p_instance_id ||
8755: ' to: ' || p_to_instance_id);
8756: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||
8757: ' site_id: ' || p_customer_site_id);
8758: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8759: ' site_id: ' || p_supplier_site_id);
8760: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8761: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8762: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);

Line 8760: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);

8756: msc_sch_wb.atp_debug(' customer id: ' || p_customer_id ||
8757: ' site_id: ' || p_customer_site_id);
8758: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8759: ' site_id: ' || p_supplier_site_id);
8760: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8761: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8762: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8763: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8764: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);

Line 8761: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);

8757: ' site_id: ' || p_customer_site_id);
8758: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8759: ' site_id: ' || p_supplier_site_id);
8760: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8761: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8762: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8763: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8764: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8765: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);

Line 8762: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);

8758: msc_sch_wb.atp_debug(' supplier id: ' || p_supplier_id ||
8759: ' site_id: ' || p_supplier_site_id);
8760: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8761: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8762: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8763: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8764: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8765: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);
8766: END IF;

Line 8763: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895

8759: ' site_id: ' || p_supplier_site_id);
8760: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8761: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8762: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8763: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8764: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8765: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);
8766: END IF;
8767:

Line 8764: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);

8760: msc_sch_wb.atp_debug(' session_id: ' || p_session_id);
8761: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8762: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8763: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8764: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8765: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);
8766: END IF;
8767:
8768: l_to_loc_id := p_to_loc_id;

Line 8765: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);

8761: msc_sch_wb.atp_debug(' partner_site: ' || p_partner_site_id);
8762: msc_sch_wb.atp_debug(' ship method: ' || p_ship_method);
8763: msc_sch_wb.atp_debug(' p_partner_type: '|| p_partner_type); --2814895
8764: msc_sch_wb.atp_debug(' p_party_site_id: '|| p_party_site_id);
8765: msc_sch_wb.atp_debug(' p_order_line_id: '|| p_order_line_id);
8766: END IF;
8767:
8768: l_to_loc_id := p_to_loc_id;
8769:

Line 8791: msc_sch_wb.atp_debug('dlt cache hit! idx: ' || dlt_idx ||

8787: if dlt_lookup(l_cache_idx) = l_dlt_key then
8788: x_delivery_lead_time := dlt_cache(l_cache_idx);
8789: p_ship_method := ship_method_cache(l_cache_idx);
8790: IF PG_DEBUG in ('Y', 'C') THEN
8791: msc_sch_wb.atp_debug('dlt cache hit! idx: ' || dlt_idx ||
8792: ' dlt: ' || x_delivery_lead_time ||
8793: ' ship_method: ' || p_ship_method);
8794: END IF;
8795: return;

Line 8821: msc_sch_wb.atp_debug('location to: ' || l_to_loc_id);

8817: NULL,
8818: NULL);
8819: END IF;
8820: IF PG_DEBUG in ('Y', 'C') THEN
8821: msc_sch_wb.atp_debug('location to: ' || l_to_loc_id);
8822: END IF;
8823: END IF;
8824:
8825: IF l_to_loc_id IS NULL THEN --2814895

Line 8839: msc_sch_wb.atp_debug('location from: ' || l_from_loc_id);

8835: NULL,
8836: p_supplier_id,
8837: p_supplier_site_id);
8838: IF PG_DEBUG in ('Y', 'C') THEN
8839: msc_sch_wb.atp_debug('location from: ' || l_from_loc_id);
8840: END IF;
8841: END IF;
8842:
8843: get_transit_time(l_from_loc_id,

Line 8878: msc_sch_wb.atp_debug(' ship method = ' || p_ship_method);

8874: dlt_cache(dlt_idx) := x_delivery_lead_time;
8875: ship_method_cache(dlt_idx) := p_ship_method;
8876:
8877: IF PG_DEBUG in ('Y', 'C') THEN
8878: msc_sch_wb.atp_debug(' ship method = ' || p_ship_method);
8879: msc_sch_wb.atp_debug(' delivery_lead_time = ' || x_delivery_lead_time);
8880: msc_sch_wb.atp_debug('END get_delivery_lead_time');
8881: END IF;
8882:

Line 8879: msc_sch_wb.atp_debug(' delivery_lead_time = ' || x_delivery_lead_time);

8875: ship_method_cache(dlt_idx) := p_ship_method;
8876:
8877: IF PG_DEBUG in ('Y', 'C') THEN
8878: msc_sch_wb.atp_debug(' ship method = ' || p_ship_method);
8879: msc_sch_wb.atp_debug(' delivery_lead_time = ' || x_delivery_lead_time);
8880: msc_sch_wb.atp_debug('END get_delivery_lead_time');
8881: END IF;
8882:
8883: END get_delivery_lead_time;

Line 8880: msc_sch_wb.atp_debug('END get_delivery_lead_time');

8876:
8877: IF PG_DEBUG in ('Y', 'C') THEN
8878: msc_sch_wb.atp_debug(' ship method = ' || p_ship_method);
8879: msc_sch_wb.atp_debug(' delivery_lead_time = ' || x_delivery_lead_time);
8880: msc_sch_wb.atp_debug('END get_delivery_lead_time');
8881: END IF;
8882:
8883: END get_delivery_lead_time;
8884:

Line 8947: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');

8943:
8944: IS
8945: BEGIN
8946: IF PG_DEBUG in ('Y', 'C') THEN
8947: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8948: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8949: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8951: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);

Line 8948: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');

8944: IS
8945: BEGIN
8946: IF PG_DEBUG in ('Y', 'C') THEN
8947: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8948: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8949: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8951: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8952: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);

Line 8949: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);

8945: BEGIN
8946: IF PG_DEBUG in ('Y', 'C') THEN
8947: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8948: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8949: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8951: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8952: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8953: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);

Line 8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);

8946: IF PG_DEBUG in ('Y', 'C') THEN
8947: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8948: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8949: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8951: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8952: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8953: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8954: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);

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

8947: msc_sch_wb.atp_debug('***** Inside Get Process Effectivity *****');
8948: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8949: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8951: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8952: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8953: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8954: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);
8955: END IF;

Line 8952: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);

8948: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Selecting Process Sequence ID');
8949: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8951: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8952: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8953: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8954: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);
8955: END IF;
8956:

Line 8953: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);

8949: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'plan_id = '|| p_plan_id);
8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8951: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8952: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8953: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8954: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);
8955: END IF;
8956:
8957: -- initialize API return status to success

Line 8954: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);

8950: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'item id = '|| p_item_id);
8951: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_organization_id = '|| p_organization_id);
8952: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_sr_instance_id = '|| p_sr_instance_id);
8953: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_new_schedule_date = '|| p_new_schedule_date);
8954: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'p_requested_quantity = '|| p_requested_quantity);
8955: END IF;
8956:
8957: -- initialize API return status to success
8958: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 9006: 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

9002: ) a
9003: where rownum = 1;
9004:
9005: IF PG_DEBUG in ('Y', 'C') THEN
9006: 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
9007: || ' Operation seq ID:' || x_op_seq_id); --4570421
9008: msc_sch_wb.atp_debug('***** END Get Process Effectivity *****');
9009: END IF;
9010: EXCEPTION

Line 9008: msc_sch_wb.atp_debug('***** END Get Process Effectivity *****');

9004:
9005: IF PG_DEBUG in ('Y', 'C') THEN
9006: 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
9007: || ' Operation seq ID:' || x_op_seq_id); --4570421
9008: msc_sch_wb.atp_debug('***** END Get Process Effectivity *****');
9009: END IF;
9010: EXCEPTION
9011: -- 3027711
9012: WHEN NO_DATA_FOUND THEN

Line 9013: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Could not get process effectivity Values');

9009: END IF;
9010: EXCEPTION
9011: -- 3027711
9012: WHEN NO_DATA_FOUND THEN
9013: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'Could not get process effectivity Values');
9014: x_process_seq_id := null;
9015: x_routing_seq_id := null;
9016: x_bill_seq_id := null;
9017: WHEN OTHERS THEN

Line 9018: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'sqlcode: ' || sqlcode);

9014: x_process_seq_id := null;
9015: x_routing_seq_id := null;
9016: x_bill_seq_id := null;
9017: WHEN OTHERS THEN
9018: msc_sch_wb.atp_debug('Get_Process_Effectivity: ' || 'sqlcode: ' || sqlcode);
9019: x_process_seq_id := null;
9020: x_routing_seq_id := null;
9021: x_bill_seq_id := null;
9022: x_return_status := FND_API.G_RET_STS_ERROR;

Line 9034: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions Begin *************');

9030: IS
9031: l_counter PLS_INTEGER;
9032: BEGIN
9033: IF PG_DEBUG in ('Y', 'C') THEN
9034: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions Begin *************');
9035: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'p_vendor_site_id := ' || p_vendor_site_id);
9036: END IF;
9037:
9038: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 9035: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'p_vendor_site_id := ' || p_vendor_site_id);

9031: l_counter PLS_INTEGER;
9032: BEGIN
9033: IF PG_DEBUG in ('Y', 'C') THEN
9034: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions Begin *************');
9035: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'p_vendor_site_id := ' || p_vendor_site_id);
9036: END IF;
9037:
9038: x_return_status := FND_API.G_RET_STS_SUCCESS;
9039:

Line 9042: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'Data for site ' || p_vendor_site_id ||

9038: x_return_status := FND_API.G_RET_STS_SUCCESS;
9039:
9040: FOR l_counter IN 1..G_VENDOR_SITE_ID.COUNT LOOP
9041: IF MSC_ATP_PROC.G_VENDOR_SITE_ID(l_counter) = p_vendor_site_id THEN
9042: msc_sch_wb.atp_debug('Get_Supplier_Regions :' || 'Data for site ' || p_vendor_site_id ||
9043: ' already exists.');
9044: return;
9045: END IF;
9046: END LOOP;

Line 9062: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions End *************');

9058: G_VENDOR_SITE_ID.Extend();
9059: G_VENDOR_SITE_ID(G_VENDOR_SITE_ID.COUNT) := p_vendor_site_id;
9060:
9061: IF PG_DEBUG in ('Y', 'C') THEN
9062: msc_sch_wb.atp_debug('*************** Get_Supplier_Regions End *************');
9063: END IF;
9064: EXCEPTION
9065: WHEN OTHERS THEN
9066: IF PG_DEBUG in ('Y', 'C') THEN

Line 9067: msc_sch_wb.atp_debug('Get_Supplier_Regions: ' || 'sqlcode: ' || sqlcode);

9063: END IF;
9064: EXCEPTION
9065: WHEN OTHERS THEN
9066: IF PG_DEBUG in ('Y', 'C') THEN
9067: msc_sch_wb.atp_debug('Get_Supplier_Regions: ' || 'sqlcode: ' || sqlcode);
9068: END IF;
9069: x_return_status := FND_API.G_RET_STS_ERROR;
9070: END Get_Supplier_Regions;
9071:

Line 9127: msc_sch_wb.set_session_id(p_session_id);

9123: BEGIN
9124: -- initialize API return status to success
9125: x_return_status := FND_API.G_RET_STS_SUCCESS;
9126:
9127: msc_sch_wb.set_session_id(p_session_id);
9128: IF PG_DEBUG in ('Y', 'C') THEN
9129: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9130: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );

Line 9129: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');

9125: x_return_status := FND_API.G_RET_STS_SUCCESS;
9126:
9127: msc_sch_wb.set_session_id(p_session_id);
9128: IF PG_DEBUG in ('Y', 'C') THEN
9129: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9130: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );

Line 9130: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );

9126:
9127: msc_sch_wb.set_session_id(p_session_id);
9128: IF PG_DEBUG in ('Y', 'C') THEN
9129: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9130: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );

Line 9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );

9127: msc_sch_wb.set_session_id(p_session_id);
9128: IF PG_DEBUG in ('Y', 'C') THEN
9129: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9130: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );

Line 9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );

9128: IF PG_DEBUG in ('Y', 'C') THEN
9129: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9130: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );

Line 9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );

9129: msc_sch_wb.atp_debug('***************Begin ATP_Intransit_LT *****************');
9130: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );

Line 9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );

9130: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_src_dest : ' || p_src_dest );
9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );

Line 9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );

9131: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_session_id : ' || p_session_id );
9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9139: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );

Line 9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );

9132: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_org_id : ' || p_from_org_id );
9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9139: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9140: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );

Line 9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );

9133: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_loc_id : ' || p_from_loc_id );
9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9139: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9140: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );
9141: END IF;

Line 9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );

9134: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_vendor_site_id : ' || p_from_vendor_site_id );
9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9139: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9140: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );
9141: END IF;
9142:

Line 9139: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );

9135: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_from_instance_id : ' || p_from_instance_id );
9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9139: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9140: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );
9141: END IF;
9142:
9143: IF p_from_vendor_site_id IS NOT NULL THEN

Line 9140: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );

9136: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_org_id : ' || p_to_org_id );
9137: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_loc_id : ' || p_to_loc_id );
9138: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_customer_site_id : ' || p_to_customer_site_id );
9139: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_to_instance_id : ' || p_to_instance_id );
9140: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'p_ship_method : ' || p_ship_method );
9141: END IF;
9142:
9143: IF p_from_vendor_site_id IS NOT NULL THEN
9144: IF p_src_dest = 1 THEN

Line 9146: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'Invalid parameter - supp-org not supported from source');

9142:
9143: IF p_from_vendor_site_id IS NOT NULL THEN
9144: IF p_src_dest = 1 THEN
9145: IF PG_DEBUG in ('Y', 'C') THEN
9146: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'Invalid parameter - supp-org not supported from source');
9147: END IF;
9148: x_return_status := FND_API.G_RET_STS_ERROR;
9149: ELSE
9150: IF PG_DEBUG in ('Y', 'C') THEN

Line 9151: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': supp-org case');

9147: END IF;
9148: x_return_status := FND_API.G_RET_STS_ERROR;
9149: ELSE
9150: IF PG_DEBUG in ('Y', 'C') THEN
9151: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': supp-org case');
9152: END IF;
9153: MSC_SATP_FUNC.Get_Regions(NULL, -- p_customer_site_id
9154: 724, -- p_calling_module
9155: p_from_instance_id, -- p_instance_id

Line 9182: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': org-cust case');

9178: );
9179: END IF;
9180: ELSIF p_to_customer_site_id IS NOT NULL OR p_to_loc_id IS NOT NULL THEN
9181: IF PG_DEBUG in ('Y', 'C') THEN
9182: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': org-cust case');
9183: END IF;
9184: IF p_src_dest = 1 THEN
9185: MSC_SATP_FUNC.Get_Regions(p_to_customer_site_id, -- p_customer_site_id
9186: -1, -- p_calling_module (not 724)

Line 9235: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': org-org case');

9231: );
9232: END IF;
9233: ELSE
9234: IF PG_DEBUG in ('Y', 'C') THEN
9235: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || ': org-org case');
9236: END IF;
9237: IF p_src_dest = 1 THEN
9238: MSC_SATP_FUNC.get_src_transit_time(p_from_org_id, -- p_from_org_id
9239: p_from_loc_id, -- p_from_loc_id

Line 9270: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'Error code:' || to_char(sqlcode));

9266:
9267: EXCEPTION
9268: WHEN OTHERS THEN
9269: IF PG_DEBUG in ('Y', 'C') THEN
9270: msc_sch_wb.atp_debug('ATP_Intransit_LT: ' || 'Error code:' || to_char(sqlcode));
9271: END IF;
9272: x_return_status := FND_API.G_RET_STS_ERROR;
9273: END ATP_Intransit_LT;
9274: