DBA Data[Home] [Help]

APPS.MSC_ATP_REQ dependencies on MSC_SCH_WB

Line 20: msc_sch_wb.atp_debug('date: ' || p_atp_dates(i) ||

16: ) IS
17: BEGIN
18: IF PG_DEBUG in ('Y', 'C') THEN
19: for i in 1..p_atp_dates.count loop
20: msc_sch_wb.atp_debug('date: ' || p_atp_dates(i) ||
21: ' qty: ' || p_atp_qtys(i));
22: end loop;
23: END IF;
24: END Print_Dates_Qtys;

Line 44: msc_sch_wb.atp_debug('Integer Scaling');

40:
41: BEGIN
42:
43: IF PG_DEBUG in ('Y', 'C') THEN
44: msc_sch_wb.atp_debug('Integer Scaling');
45: msc_sch_wb.atp_debug('Integer Scaling : p_scale_qty ' || p_scale_qty);
46: msc_sch_wb.atp_debug('Integer Scaling : p_scale_multiple ' || p_scale_multiple);
47: msc_sch_wb.atp_debug('Integer Scaling : p_scale_rounding_variance ' || p_scale_rounding_variance);
48: msc_sch_wb.atp_debug('Integer Scaling : p_rounding_direction ' || p_rounding_direction);

Line 45: msc_sch_wb.atp_debug('Integer Scaling : p_scale_qty ' || p_scale_qty);

41: BEGIN
42:
43: IF PG_DEBUG in ('Y', 'C') THEN
44: msc_sch_wb.atp_debug('Integer Scaling');
45: msc_sch_wb.atp_debug('Integer Scaling : p_scale_qty ' || p_scale_qty);
46: msc_sch_wb.atp_debug('Integer Scaling : p_scale_multiple ' || p_scale_multiple);
47: msc_sch_wb.atp_debug('Integer Scaling : p_scale_rounding_variance ' || p_scale_rounding_variance);
48: msc_sch_wb.atp_debug('Integer Scaling : p_rounding_direction ' || p_rounding_direction);
49: END IF;

Line 46: msc_sch_wb.atp_debug('Integer Scaling : p_scale_multiple ' || p_scale_multiple);

42:
43: IF PG_DEBUG in ('Y', 'C') THEN
44: msc_sch_wb.atp_debug('Integer Scaling');
45: msc_sch_wb.atp_debug('Integer Scaling : p_scale_qty ' || p_scale_qty);
46: msc_sch_wb.atp_debug('Integer Scaling : p_scale_multiple ' || p_scale_multiple);
47: msc_sch_wb.atp_debug('Integer Scaling : p_scale_rounding_variance ' || p_scale_rounding_variance);
48: msc_sch_wb.atp_debug('Integer Scaling : p_rounding_direction ' || p_rounding_direction);
49: END IF;
50:

Line 47: msc_sch_wb.atp_debug('Integer Scaling : p_scale_rounding_variance ' || p_scale_rounding_variance);

43: IF PG_DEBUG in ('Y', 'C') THEN
44: msc_sch_wb.atp_debug('Integer Scaling');
45: msc_sch_wb.atp_debug('Integer Scaling : p_scale_qty ' || p_scale_qty);
46: msc_sch_wb.atp_debug('Integer Scaling : p_scale_multiple ' || p_scale_multiple);
47: msc_sch_wb.atp_debug('Integer Scaling : p_scale_rounding_variance ' || p_scale_rounding_variance);
48: msc_sch_wb.atp_debug('Integer Scaling : p_rounding_direction ' || p_rounding_direction);
49: END IF;
50:
51: l_scale_qty := p_scale_qty;

Line 48: msc_sch_wb.atp_debug('Integer Scaling : p_rounding_direction ' || p_rounding_direction);

44: msc_sch_wb.atp_debug('Integer Scaling');
45: msc_sch_wb.atp_debug('Integer Scaling : p_scale_qty ' || p_scale_qty);
46: msc_sch_wb.atp_debug('Integer Scaling : p_scale_multiple ' || p_scale_multiple);
47: msc_sch_wb.atp_debug('Integer Scaling : p_scale_rounding_variance ' || p_scale_rounding_variance);
48: msc_sch_wb.atp_debug('Integer Scaling : p_rounding_direction ' || p_rounding_direction);
49: END IF;
50:
51: l_scale_qty := p_scale_qty;
52:

Line 57: msc_sch_wb.atp_debug('Integer Scaling: : var ' || var);

53: --variance
54: var := p_scale_rounding_variance * l_scale_qty/100;
55:
56: IF PG_DEBUG in ('Y', 'C') THEN
57: msc_sch_wb.atp_debug('Integer Scaling: : var ' || var);
58: END IF;
59: --variance remainder
60: rem_var := l_scale_qty / p_scale_multiple;
61:

Line 75: msc_sch_wb.atp_debug('Integer Scaling: Rounding direction: UP, l_scale_qty: ' || l_scale_qty);

71: IF (var >= ceil_deviation AND ceil_qty <> 0) THEN
72: l_scale_qty := ceil_qty;
73: END IF;
74: IF PG_DEBUG in ('Y', 'C') THEN
75: msc_sch_wb.atp_debug('Integer Scaling: Rounding direction: UP, l_scale_qty: ' || l_scale_qty);
76: END IF;
77: ELSIF ( P_ROUNDING_DIRECTION = 0 )THEN --0 for Both
78: IF PG_DEBUG in ('Y', 'C') THEN
79: msc_sch_wb.atp_debug('Integer Scaling: Rounding direction: BOTH');

Line 79: msc_sch_wb.atp_debug('Integer Scaling: Rounding direction: BOTH');

75: msc_sch_wb.atp_debug('Integer Scaling: Rounding direction: UP, l_scale_qty: ' || l_scale_qty);
76: END IF;
77: ELSIF ( P_ROUNDING_DIRECTION = 0 )THEN --0 for Both
78: IF PG_DEBUG in ('Y', 'C') THEN
79: msc_sch_wb.atp_debug('Integer Scaling: Rounding direction: BOTH');
80: END IF;
81: floor_qty := floor(rem_var) * p_scale_multiple;
82: floor_deviation := l_scale_qty - floor_qty;
83: ceil_qty := ceil(rem_var) * p_scale_multiple;

Line 88: msc_sch_wb.atp_debug('retaining the value');

84: ceil_deviation := ceil_qty - l_scale_qty;
85: IF ( floor_qty = 0 OR ceil_qty = 0 ) THEN
86: --retain the value
87: IF PG_DEBUG in ('Y', 'C') THEN
88: msc_sch_wb.atp_debug('retaining the value');
89: END IF;
90: ELSIF (var >= ceil_deviation AND ceil_qty <> 0) THEN --4904094, changed the cindition from var > ceil_deviation to var >= ceil_deviation
91: l_scale_qty := ceil_qty;
92: IF PG_DEBUG in ('Y', 'C') THEN

Line 93: msc_sch_wb.atp_debug('Integer Scaling: Qty CEILed, l_scale_qty: ' || l_scale_qty);

89: END IF;
90: ELSIF (var >= ceil_deviation AND ceil_qty <> 0) THEN --4904094, changed the cindition from var > ceil_deviation to var >= ceil_deviation
91: l_scale_qty := ceil_qty;
92: IF PG_DEBUG in ('Y', 'C') THEN
93: msc_sch_wb.atp_debug('Integer Scaling: Qty CEILed, l_scale_qty: ' || l_scale_qty);
94: END IF;
95: ELSIF (var >= floor_deviation AND floor_qty <> 0) THEN
96: l_scale_qty := floor_qty;
97: IF PG_DEBUG in ('Y', 'C') THEN

Line 98: msc_sch_wb.atp_debug('Integer Scaling: Qty FLOORed, l_scale_qty: ' || l_scale_qty);

94: END IF;
95: ELSIF (var >= floor_deviation AND floor_qty <> 0) THEN
96: l_scale_qty := floor_qty;
97: IF PG_DEBUG in ('Y', 'C') THEN
98: msc_sch_wb.atp_debug('Integer Scaling: Qty FLOORed, l_scale_qty: ' || l_scale_qty);
99: END IF;
100: END IF;
101: END IF;
102: IF PG_DEBUG in ('Y', 'C') THEN

Line 103: msc_sch_wb.atp_debug('Integer Scaling :l_scale_qty ' || l_scale_qty);

99: END IF;
100: END IF;
101: END IF;
102: IF PG_DEBUG in ('Y', 'C') THEN
103: msc_sch_wb.atp_debug('Integer Scaling :l_scale_qty ' || l_scale_qty);
104: END IF;
105:
106: return l_scale_qty;
107:

Line 111: msc_sch_wb.atp_debug('Integer Scaling: Division by Zero');

107:
108: EXCEPTION
109: WHEN ZERO_DIVIDE THEN
110: IF PG_DEBUG in ('Y', 'C') THEN
111: msc_sch_wb.atp_debug('Integer Scaling: Division by Zero');
112: END IF;
113: l_scale_qty := p_scale_multiple;
114: return l_scale_qty;
115: END integer_scaling;

Line 139: msc_sch_wb.atp_debug('get_res_avail_opt');

135: l_null_char VARCHAR2(1);
136: l_sysdate DATE := trunc(sysdate); --4135752
137: BEGIN
138: IF PG_DEBUG in ('Y', 'C') THEN
139: msc_sch_wb.atp_debug('get_res_avail_opt');
140: END IF;
141:
142: SELECT SD_DATE,
143: SUM(SD_QTY)

Line 249: msc_sch_wb.atp_debug('get_res_avail_unopt');

245: l_null_char VARCHAR2(1);
246: l_sysdate DATE := trunc(sysdate); --4135752
247: BEGIN
248: IF PG_DEBUG in ('Y', 'C') THEN
249: msc_sch_wb.atp_debug('get_res_avail_unopt');
250: END IF;
251:
252: SELECT SD_DATE,
253: SUM(SD_QTY)

Line 358: msc_sch_wb.atp_debug('get_res_avail_opt_bat');

354: l_null_char VARCHAR2(1);
355: l_sysdate DATE := trunc(sysdate);--4135752
356: BEGIN
357: IF PG_DEBUG in ('Y', 'C') THEN
358: msc_sch_wb.atp_debug('get_res_avail_opt_bat');
359: END IF;
360:
361: SELECT SD_DATE,
362: SUM(SD_QTY)

Line 488: msc_sch_wb.atp_debug('get_res_avail_unopt_bat');

484: l_null_char VARCHAR2(1);
485: l_sysdate DATE := trunc(sysdate);--4135752
486: BEGIN
487: IF PG_DEBUG in ('Y', 'C') THEN
488: msc_sch_wb.atp_debug('get_res_avail_unopt_bat');
489: END IF;
490:
491: SELECT SD_DATE,
492: SUM(SD_QTY)

Line 613: msc_sch_wb.atp_debug('get_res_avail_opt_dtls');

609: l_null_char VARCHAR2(1);
610: l_sysdate DATE := trunc(sysdate); --4135752
611: BEGIN
612: IF PG_DEBUG in ('Y', 'C') THEN
613: msc_sch_wb.atp_debug('get_res_avail_opt_dtls');
614: END IF;
615:
616: INSERT INTO msc_atp_sd_details_temp (
617: ATP_Level,

Line 821: msc_sch_wb.atp_debug('get_res_avail_unopt_dtls');

817: l_null_char VARCHAR2(1);
818: l_sysdate DATE := trunc(sysdate); --4135752
819: BEGIN
820: IF PG_DEBUG in ('Y', 'C') THEN
821: msc_sch_wb.atp_debug('get_res_avail_unopt_dtls');
822: END IF;
823:
824: INSERT INTO msc_atp_sd_details_temp (
825: ATP_Level,

Line 1031: msc_sch_wb.atp_debug('get_res_avail_opt_bat_dtls');

1027: l_null_char VARCHAR2(1);
1028: l_sysdate DATE := trunc(sysdate); --4135752
1029: BEGIN
1030: IF PG_DEBUG in ('Y', 'C') THEN
1031: msc_sch_wb.atp_debug('get_res_avail_opt_bat_dtls');
1032: END IF;
1033:
1034: INSERT INTO msc_atp_sd_details_temp (
1035: ATP_Level,

Line 1253: msc_sch_wb.atp_debug('get_res_avail_unopt_bat_dtls');

1249: l_null_char VARCHAR2(1);
1250: l_sysdate DATE := trunc(sysdate); --4135752
1251: BEGIN
1252: IF PG_DEBUG in ('Y', 'C') THEN
1253: msc_sch_wb.atp_debug('get_res_avail_unopt_bat_dtls');
1254: END IF;
1255:
1256: INSERT INTO msc_atp_sd_details_temp (
1257: ATP_Level,

Line 1470: msc_sch_wb.atp_debug('get_res_avail_summ');

1466: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
1467: ) IS
1468: BEGIN
1469: IF PG_DEBUG in ('Y', 'C') THEN
1470: msc_sch_wb.atp_debug('get_res_avail_summ');
1471: END IF;
1472:
1473: SELECT SD_DATE,
1474: SUM(SD_QTY)

Line 1560: msc_sch_wb.atp_debug('get_res_avail');

1556: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
1557: ) IS
1558: BEGIN
1559: IF PG_DEBUG in ('Y', 'C') THEN
1560: msc_sch_wb.atp_debug('get_res_avail');
1561: END IF;
1562:
1563: IF nvl(p_batching_flag, 0) = 1 THEN
1564: IF nvl(p_optimized_flag, 0) = 1 THEN

Line 1872: msc_sch_wb.atp_debug('Begin get_mat_avail_ods_summ');

1868: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
1869: ) IS
1870: BEGIN
1871: IF PG_DEBUG in ('Y', 'C') THEN
1872: msc_sch_wb.atp_debug('Begin get_mat_avail_ods_summ');
1873: END IF;
1874:
1875: SELECT SD_DATE, sum(SD_QTY)
1876: BULK COLLECT INTO x_atp_dates, x_atp_qtys

Line 1943: msc_sch_wb.atp_debug('Begin get_mat_avail_summ');

1939: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
1940: ) IS
1941: BEGIN
1942: IF PG_DEBUG in ('Y', 'C') THEN
1943: msc_sch_wb.atp_debug('Begin get_mat_avail_summ');
1944: END IF;
1945:
1946: -- SQL changed for summary enhancement
1947: SELECT SD_DATE, SUM(SD_QTY)

Line 2036: msc_sch_wb.atp_debug('Begin get_mat_avail_ods');

2032: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
2033: ) IS
2034: BEGIN
2035: IF PG_DEBUG in ('Y', 'C') THEN
2036: msc_sch_wb.atp_debug('Begin get_mat_avail_ods');
2037: END IF;
2038:
2039: -- SQL Query changes Begin 2640489
2040: SELECT SD_DATE, SUM(SD_QTY)

Line 2267: msc_sch_wb.atp_debug('Begin get_mat_avail_opt');

2263: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
2264: ) IS
2265: BEGIN
2266: IF PG_DEBUG in ('Y', 'C') THEN
2267: msc_sch_wb.atp_debug('Begin get_mat_avail_opt');
2268: END IF;
2269:
2270: -- 2859130 repetitive schedule demands (4) not supported
2271: -- remove join to msc_calendar_dates

Line 2359: msc_sch_wb.atp_debug('Begin get_mat_avail_unopt');

2355: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
2356: ) IS
2357: BEGIN
2358: IF PG_DEBUG in ('Y', 'C') THEN
2359: msc_sch_wb.atp_debug('Begin get_mat_avail_unopt');
2360: END IF;
2361:
2362: SELECT SD_DATE, SUM(SD_QTY)
2363: BULK COLLECT INTO x_atp_dates, x_atp_qtys

Line 2475: msc_sch_wb.atp_debug('Begin get_mat_avail_ods_dtls');

2471: l_null_date DATE; --bug3814584
2472: l_sysdate DATE := sysdate;
2473: BEGIN
2474: IF PG_DEBUG in ('Y', 'C') THEN
2475: msc_sch_wb.atp_debug('Begin get_mat_avail_ods_dtls');
2476: END IF;
2477:
2478: -- dsting: S/D details changes
2479: INSERT INTO msc_atp_sd_details_temp (

Line 2870: msc_sch_wb.atp_debug('Begin get_mat_avail_opt_dtls');

2866: l_null_date DATE; --bug3814584
2867: l_sysdate DATE := sysdate;
2868: BEGIN
2869: IF PG_DEBUG in ('Y', 'C') THEN
2870: msc_sch_wb.atp_debug('Begin get_mat_avail_opt_dtls');
2871: END IF;
2872:
2873: INSERT INTO msc_atp_sd_details_temp (
2874: ATP_Level,

Line 3082: msc_sch_wb.atp_debug('Begin get_mat_avail_unopt_dtls');

3078: l_null_date DATE; --bug3814584
3079: l_sysdate DATE := sysdate;
3080: BEGIN
3081: IF PG_DEBUG in ('Y', 'C') THEN
3082: msc_sch_wb.atp_debug('Begin get_mat_avail_unopt_dtls');
3083: END IF;
3084:
3085: INSERT INTO msc_atp_sd_details_temp (
3086: ATP_Level,

Line 3314: msc_sch_wb.atp_debug('Begin get_mat_avail');

3310: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
3311: ) IS
3312: BEGIN
3313: IF PG_DEBUG in ('Y', 'C') THEN
3314: msc_sch_wb.atp_debug('Begin get_mat_avail');
3315: END IF;
3316:
3317: IF MSC_ATP_PVT.G_INV_CTP = 5 THEN
3318: -- ODS atp

Line 3446: msc_sch_wb.atp_debug('Begin get_mat_avail_dtls');

3442: p_identifier IN NUMBER
3443: ) IS
3444: BEGIN
3445: IF PG_DEBUG in ('Y', 'C') THEN
3446: msc_sch_wb.atp_debug('Begin get_mat_avail_dtls');
3447: END IF;
3448:
3449: IF MSC_ATP_PVT.G_INV_CTP = 5 THEN
3450: -- ODS atp

Line 3545: msc_sch_wb.atp_debug('********** Calculate_Atp_Dates_Qtys **********');

3541: l_next_period DATE;
3542:
3543: BEGIN
3544: IF PG_DEBUG in ('Y', 'C') THEN
3545: msc_sch_wb.atp_debug('********** Calculate_Atp_Dates_Qtys **********');
3546: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date: '|| to_char(p_requested_date));
3547: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));
3548: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_sys_next_date: '|| to_char(p_sys_next_date));
3549: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_round_flag: '|| to_char(p_round_flag));

Line 3546: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date: '|| to_char(p_requested_date));

3542:
3543: BEGIN
3544: IF PG_DEBUG in ('Y', 'C') THEN
3545: msc_sch_wb.atp_debug('********** Calculate_Atp_Dates_Qtys **********');
3546: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date: '|| to_char(p_requested_date));
3547: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));
3548: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_sys_next_date: '|| to_char(p_sys_next_date));
3549: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_round_flag: '|| to_char(p_round_flag));
3550: END IF;

Line 3547: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));

3543: BEGIN
3544: IF PG_DEBUG in ('Y', 'C') THEN
3545: msc_sch_wb.atp_debug('********** Calculate_Atp_Dates_Qtys **********');
3546: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date: '|| to_char(p_requested_date));
3547: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));
3548: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_sys_next_date: '|| to_char(p_sys_next_date));
3549: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_round_flag: '|| to_char(p_round_flag));
3550: END IF;
3551:

Line 3548: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_sys_next_date: '|| to_char(p_sys_next_date));

3544: IF PG_DEBUG in ('Y', 'C') THEN
3545: msc_sch_wb.atp_debug('********** Calculate_Atp_Dates_Qtys **********');
3546: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date: '|| to_char(p_requested_date));
3547: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));
3548: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_sys_next_date: '|| to_char(p_sys_next_date));
3549: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_round_flag: '|| to_char(p_round_flag));
3550: END IF;
3551:
3552: -- initialize API return status to success

Line 3549: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_round_flag: '|| to_char(p_round_flag));

3545: msc_sch_wb.atp_debug('********** Calculate_Atp_Dates_Qtys **********');
3546: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date: '|| to_char(p_requested_date));
3547: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));
3548: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_sys_next_date: '|| to_char(p_sys_next_date));
3549: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_round_flag: '|| to_char(p_round_flag));
3550: END IF;
3551:
3552: -- initialize API return status to success
3553: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 3581: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_quantity_this_level);

3577: x_atp_date_quantity_this_level := p_atp_qty_tab(k);
3578: END IF;
3579: x_atp_date_this_level := GREATEST(p_atp_period_tab(k), MSC_ATP_PVT.G_PTF_DATE);
3580: IF PG_DEBUG in ('Y', 'C') THEN
3581: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_quantity_this_level);
3582: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_this_level);
3583: END IF;
3584:
3585: END IF;

Line 3582: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_this_level);

3578: END IF;
3579: x_atp_date_this_level := GREATEST(p_atp_period_tab(k), MSC_ATP_PVT.G_PTF_DATE);
3580: IF PG_DEBUG in ('Y', 'C') THEN
3581: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_quantity_this_level);
3582: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_this_level);
3583: END IF;
3584:
3585: END IF;
3586: EXIT;

Line 3598: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_quantity_this_level);

3594: x_atp_date_quantity_this_level := p_atp_qty_tab(k);
3595: END IF;
3596: x_atp_date_this_level := GREATEST(p_atp_period_tab(k), MSC_ATP_PVT.G_PTF_DATE);
3597: IF PG_DEBUG in ('Y', 'C') THEN
3598: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_quantity_this_level);
3599: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_this_level);
3600: END IF;
3601: EXIT;
3602: END IF;

Line 3599: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_this_level);

3595: END IF;
3596: x_atp_date_this_level := GREATEST(p_atp_period_tab(k), MSC_ATP_PVT.G_PTF_DATE);
3597: IF PG_DEBUG in ('Y', 'C') THEN
3598: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_quantity_this_level);
3599: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || x_atp_date_this_level);
3600: END IF;
3601: EXIT;
3602: END IF;
3603: END LOOP; -- end of k loop

Line 3614: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'I am here 1');

3610: -- date. if requested date is eariler than sysdate, we should set
3611: -- the x_requested_date_quantity = 0, and find the atp date and
3612: -- quantity from sysdate.
3613: IF PG_DEBUG in ('Y', 'C') THEN
3614: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'I am here 1');
3615: END IF;
3616: FOR j IN 1..p_atp_period_tab.COUNT LOOP
3617:
3618: -- time_phased_atp changes begin

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

3617:
3618: -- time_phased_atp changes begin
3619: IF (x_atf_date_quantity is null) and (p_atf_date is not null) THEN
3620: IF PG_DEBUG in ('Y', 'C') THEN
3621: msc_sch_wb.atp_debug('*********************');
3622: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(j): ' || p_atp_period_tab(j));
3623: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);
3624: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(j): ' || p_atp_qty_tab(j));
3625: END IF;

Line 3622: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(j): ' || p_atp_period_tab(j));

3618: -- time_phased_atp changes begin
3619: IF (x_atf_date_quantity is null) and (p_atf_date is not null) THEN
3620: IF PG_DEBUG in ('Y', 'C') THEN
3621: msc_sch_wb.atp_debug('*********************');
3622: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(j): ' || p_atp_period_tab(j));
3623: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);
3624: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(j): ' || p_atp_qty_tab(j));
3625: END IF;
3626: IF p_atp_period_tab(j) = p_atf_date THEN

Line 3623: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);

3619: IF (x_atf_date_quantity is null) and (p_atf_date is not null) THEN
3620: IF PG_DEBUG in ('Y', 'C') THEN
3621: msc_sch_wb.atp_debug('*********************');
3622: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(j): ' || p_atp_period_tab(j));
3623: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);
3624: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(j): ' || p_atp_qty_tab(j));
3625: END IF;
3626: IF p_atp_period_tab(j) = p_atf_date THEN
3627: x_atf_date_quantity := p_atp_qty_tab(j);

Line 3624: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(j): ' || p_atp_qty_tab(j));

3620: IF PG_DEBUG in ('Y', 'C') THEN
3621: msc_sch_wb.atp_debug('*********************');
3622: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(j): ' || p_atp_period_tab(j));
3623: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);
3624: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(j): ' || p_atp_qty_tab(j));
3625: END IF;
3626: IF p_atp_period_tab(j) = p_atf_date THEN
3627: x_atf_date_quantity := p_atp_qty_tab(j);
3628: ELSIF p_atp_period_tab(j) > p_atf_date THEN

Line 3633: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(j-1): ' || p_atp_qty_tab(j-1));

3629: IF j = 1 THEN
3630: x_atf_date_quantity := 0;
3631: ELSE
3632: IF PG_DEBUG in ('Y', 'C') THEN
3633: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(j-1): ' || p_atp_qty_tab(j-1));
3634: END IF;
3635: x_atf_date_quantity := p_atp_qty_tab(j-1);
3636: END IF;
3637: END IF;

Line 3640: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: x_atf_date_quantity: ' || x_atf_date_quantity);

3636: END IF;
3637: END IF;
3638:
3639: IF PG_DEBUG in ('Y', 'C') THEN
3640: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: x_atf_date_quantity: ' || x_atf_date_quantity);
3641: END IF;
3642: END IF;
3643: -- time_phased_atp changes end
3644:

Line 3660: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'I am here 2');

3656: ELSE
3657: l_next_period := l_atp_requested_date + 1;
3658: END IF;
3659: IF PG_DEBUG in ('Y', 'C') THEN
3660: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'I am here 2');
3661: END IF;
3662:
3663: --- bug 1819638: If sysdate is non-work day then we want to check the request on
3664: --- next working day (p_sys_next_date)

Line 3672: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'I am here 3');

3668:
3669:
3670: --IF p_requested_date < l_atp_requested_date THEN
3671: IF PG_DEBUG in ('Y', 'C') THEN
3672: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'I am here 3');
3673: END IF;
3674: -- Bug 3512996 - For request before PTF return 0 as request date quantity
3675: -- IF (p_requested_date < l_atp_requested_date) THEN
3676: -- IF (p_requested_date < GREATEST(l_atp_requested_date,MSC_ATP_PVT.G_PTF_DATE)) THEN

Line 3679: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date < l_atp_requested_date');

3675: -- IF (p_requested_date < l_atp_requested_date) THEN
3676: -- IF (p_requested_date < GREATEST(l_atp_requested_date,MSC_ATP_PVT.G_PTF_DATE)) THEN
3677: IF (p_requested_date < l_atp_requested_date) THEN -- Bug 3828469 - Undo the regression introduced by Bug 3512996
3678: IF PG_DEBUG in ('Y', 'C') THEN
3679: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date < l_atp_requested_date');
3680: END IF;
3681: x_requested_date_quantity := 0;
3682: ELSE
3683: IF (p_round_flag = 1) THEN --- bug 1774959

Line 3689: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date > l_atp_requested_date');

3685: ELSE
3686: x_requested_date_quantity := p_atp_qty_tab(j);
3687: END IF;
3688: IF PG_DEBUG in ('Y', 'C') THEN
3689: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date > l_atp_requested_date');
3690: END IF;
3691: END IF;
3692: IF PG_DEBUG in ('Y', 'C') THEN
3693: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_requested_date_quantity: '|| to_char(x_requested_date_quantity));

Line 3693: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_requested_date_quantity: '|| to_char(x_requested_date_quantity));

3689: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_requested_date > l_atp_requested_date');
3690: END IF;
3691: END IF;
3692: IF PG_DEBUG in ('Y', 'C') THEN
3693: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_requested_date_quantity: '|| to_char(x_requested_date_quantity));
3694: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'test line p_atp_qty_tab(j): '|| to_char(p_atp_qty_tab(j)));
3695: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));
3696: END IF;
3697:

Line 3694: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'test line p_atp_qty_tab(j): '|| to_char(p_atp_qty_tab(j)));

3690: END IF;
3691: END IF;
3692: IF PG_DEBUG in ('Y', 'C') THEN
3693: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_requested_date_quantity: '|| to_char(x_requested_date_quantity));
3694: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'test line p_atp_qty_tab(j): '|| to_char(p_atp_qty_tab(j)));
3695: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));
3696: END IF;
3697:
3698: -- now find the atp_date_quantity and atp_date at this level

Line 3695: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));

3691: END IF;
3692: IF PG_DEBUG in ('Y', 'C') THEN
3693: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_requested_date_quantity: '|| to_char(x_requested_date_quantity));
3694: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'test line p_atp_qty_tab(j): '|| to_char(p_atp_qty_tab(j)));
3695: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'p_quantity_ordered: '|| to_char(p_quantity_ordered));
3696: END IF;
3697:
3698: -- now find the atp_date_quantity and atp_date at this level
3699: IF p_atp_qty_tab(j) >= p_quantity_ordered AND

Line 3709: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Checkpoint 1');

3705: END IF;
3706: -- bug 1560255
3707: --x_atp_date_quantity_this_level := p_quantity_ordered;
3708: IF PG_DEBUG in ('Y', 'C') THEN
3709: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Checkpoint 1');
3710: END IF;
3711: x_atp_date_this_level := GREATEST(l_atp_requested_date, p_sys_next_date);
3712:
3713: IF PG_DEBUG in ('Y', 'C') THEN

Line 3714: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_atp_date_this_level: '|| to_char(x_atp_date_this_level));

3710: END IF;
3711: x_atp_date_this_level := GREATEST(l_atp_requested_date, p_sys_next_date);
3712:
3713: IF PG_DEBUG in ('Y', 'C') THEN
3714: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_atp_date_this_level: '|| to_char(x_atp_date_this_level));
3715: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_atp_date_quantity_this_level: '|| to_char(x_atp_date_quantity_this_level));
3716: END IF;
3717:
3718:

Line 3715: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_atp_date_quantity_this_level: '|| to_char(x_atp_date_quantity_this_level));

3711: x_atp_date_this_level := GREATEST(l_atp_requested_date, p_sys_next_date);
3712:
3713: IF PG_DEBUG in ('Y', 'C') THEN
3714: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_atp_date_this_level: '|| to_char(x_atp_date_this_level));
3715: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'x_atp_date_quantity_this_level: '|| to_char(x_atp_date_quantity_this_level));
3716: END IF;
3717:
3718:
3719: ELSE

Line 3745: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Checkpoint 3');

3741: END IF;
3742: -- bug 1560255
3743: --x_atp_date_quantity_this_level := p_quantity_ordered;
3744: IF PG_DEBUG in ('Y', 'C') THEN
3745: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Checkpoint 3');
3746: END IF;
3747: x_atp_date_this_level := GREATEST(NVL(MSC_ATP_PVT.G_PTF_DATE,p_sys_next_date)
3748: , p_atp_period_tab(j));
3749: ELSE

Line 3751: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Checkpoint 2');

3747: x_atp_date_this_level := GREATEST(NVL(MSC_ATP_PVT.G_PTF_DATE,p_sys_next_date)
3748: , p_atp_period_tab(j));
3749: ELSE
3750: IF PG_DEBUG in ('Y', 'C') THEN
3751: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Checkpoint 2');
3752: END IF;
3753: FOR k IN j+1..p_atp_period_tab.COUNT LOOP
3754:
3755: -- time_phased_atp changes begin

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

3754:
3755: -- time_phased_atp changes begin
3756: IF (x_atf_date_quantity is null) and (p_atf_date is not null) THEN
3757: IF PG_DEBUG in ('Y', 'C') THEN
3758: msc_sch_wb.atp_debug('*********************');
3759: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(k): ' || p_atp_period_tab(k));
3760: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);
3761: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(k): ' || p_atp_qty_tab(k));
3762: END IF;

Line 3759: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(k): ' || p_atp_period_tab(k));

3755: -- time_phased_atp changes begin
3756: IF (x_atf_date_quantity is null) and (p_atf_date is not null) THEN
3757: IF PG_DEBUG in ('Y', 'C') THEN
3758: msc_sch_wb.atp_debug('*********************');
3759: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(k): ' || p_atp_period_tab(k));
3760: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);
3761: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(k): ' || p_atp_qty_tab(k));
3762: END IF;
3763: IF p_atp_period_tab(k) = p_atf_date THEN

Line 3760: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);

3756: IF (x_atf_date_quantity is null) and (p_atf_date is not null) THEN
3757: IF PG_DEBUG in ('Y', 'C') THEN
3758: msc_sch_wb.atp_debug('*********************');
3759: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(k): ' || p_atp_period_tab(k));
3760: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);
3761: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(k): ' || p_atp_qty_tab(k));
3762: END IF;
3763: IF p_atp_period_tab(k) = p_atf_date THEN
3764: x_atf_date_quantity := p_atp_qty_tab(k);

Line 3761: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(k): ' || p_atp_qty_tab(k));

3757: IF PG_DEBUG in ('Y', 'C') THEN
3758: msc_sch_wb.atp_debug('*********************');
3759: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_period_tab(k): ' || p_atp_period_tab(k));
3760: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atf_date: ' || p_atf_date);
3761: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(k): ' || p_atp_qty_tab(k));
3762: END IF;
3763: IF p_atp_period_tab(k) = p_atf_date THEN
3764: x_atf_date_quantity := p_atp_qty_tab(k);
3765: ELSIF p_atp_period_tab(k) > p_atf_date THEN

Line 3770: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(k-1): ' || p_atp_qty_tab(k-1));

3766: IF k = 1 THEN
3767: x_atf_date_quantity := 0;
3768: ELSE
3769: IF PG_DEBUG in ('Y', 'C') THEN
3770: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: p_atp_qty_tab(k-1): ' || p_atp_qty_tab(k-1));
3771: END IF;
3772: x_atf_date_quantity := p_atp_qty_tab(k-1);
3773: END IF;
3774: END IF;

Line 3777: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: x_atf_date_quantity: ' || x_atf_date_quantity);

3773: END IF;
3774: END IF;
3775:
3776: IF PG_DEBUG in ('Y', 'C') THEN
3777: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: x_atf_date_quantity: ' || x_atf_date_quantity);
3778: END IF;
3779: END IF;
3780: -- time_phased_atp changes end
3781:

Line 3819: msc_sch_wb.atp_debug('x_atp_date_this_level '||x_atp_date_this_level);

3815: NVL(MSC_ATP_PVT.G_PTF_DATE, p_sys_next_date) THEN
3816:
3817: x_atp_date_this_level := NVL(MSC_ATP_PVT.G_PTF_DATE, p_sys_next_date);
3818: IF PG_DEBUG in ('Y', 'C') THEN
3819: msc_sch_wb.atp_debug('x_atp_date_this_level '||x_atp_date_this_level);
3820: END IF;
3821: IF(p_round_flag = 1) THEN --- bug 1774959
3822: x_atp_date_quantity_this_level := FLOOR(p_atp_qty_tab(k));
3823: ELSE

Line 3841: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Encountered error = ' || sqlerrm);

3837:
3838: EXCEPTION
3839: WHEN OTHERS THEN
3840: IF PG_DEBUG in ('Y', 'C') THEN
3841: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Encountered error = ' || sqlerrm);
3842: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Error Code = ' || sqlcode);
3843: END IF;
3844: x_return_status := FND_API.G_RET_STS_ERROR;
3845:

Line 3842: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Error Code = ' || sqlcode);

3838: EXCEPTION
3839: WHEN OTHERS THEN
3840: IF PG_DEBUG in ('Y', 'C') THEN
3841: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Encountered error = ' || sqlerrm);
3842: msc_sch_wb.atp_debug('Calculate_Atp_Dates_Qtys: ' || 'Error Code = ' || sqlcode);
3843: END IF;
3844: x_return_status := FND_API.G_RET_STS_ERROR;
3845:
3846: END Calculate_Atp_Dates_Qtys;

Line 4060: msc_sch_wb.atp_debug('**********Begin Check_Substitutes Procedure************');

4056: -- l_item_info_rec MSC_ATP_PVT.item_attribute_rec;
4057: BEGIN
4058:
4059: IF PG_DEBUG in ('Y', 'C') THEN
4060: msc_sch_wb.atp_debug('**********Begin Check_Substitutes Procedure************');
4061: END IF;
4062:
4063: IF PG_DEBUG in ('Y', 'C') THEN
4064: msc_sch_wb.atp_debug('********** INPUT DATA:Check_Substitutes **********');

Line 4064: msc_sch_wb.atp_debug('********** INPUT DATA:Check_Substitutes **********');

4060: msc_sch_wb.atp_debug('**********Begin Check_Substitutes Procedure************');
4061: END IF;
4062:
4063: IF PG_DEBUG in ('Y', 'C') THEN
4064: msc_sch_wb.atp_debug('********** INPUT DATA:Check_Substitutes **********');
4065: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_parent_pegging_id: '|| to_char(p_parent_pegging_id));
4066: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_instance_id: '|| to_char(p_instance_id));
4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));
4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));

Line 4065: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_parent_pegging_id: '|| to_char(p_parent_pegging_id));

4061: END IF;
4062:
4063: IF PG_DEBUG in ('Y', 'C') THEN
4064: msc_sch_wb.atp_debug('********** INPUT DATA:Check_Substitutes **********');
4065: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_parent_pegging_id: '|| to_char(p_parent_pegging_id));
4066: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_instance_id: '|| to_char(p_instance_id));
4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));
4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));
4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));

Line 4066: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_instance_id: '|| to_char(p_instance_id));

4062:
4063: IF PG_DEBUG in ('Y', 'C') THEN
4064: msc_sch_wb.atp_debug('********** INPUT DATA:Check_Substitutes **********');
4065: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_parent_pegging_id: '|| to_char(p_parent_pegging_id));
4066: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_instance_id: '|| to_char(p_instance_id));
4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));
4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));
4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));
4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));

Line 4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));

4063: IF PG_DEBUG in ('Y', 'C') THEN
4064: msc_sch_wb.atp_debug('********** INPUT DATA:Check_Substitutes **********');
4065: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_parent_pegging_id: '|| to_char(p_parent_pegging_id));
4066: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_instance_id: '|| to_char(p_instance_id));
4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));
4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));
4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));
4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));
4071: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_inventory_item_id: '|| to_char(p_inventory_item_id));

Line 4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));

4064: msc_sch_wb.atp_debug('********** INPUT DATA:Check_Substitutes **********');
4065: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_parent_pegging_id: '|| to_char(p_parent_pegging_id));
4066: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_instance_id: '|| to_char(p_instance_id));
4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));
4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));
4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));
4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));
4071: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_inventory_item_id: '|| to_char(p_inventory_item_id));
4072: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_organization_id: '|| to_char(p_organization_id));

Line 4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));

4065: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_parent_pegging_id: '|| to_char(p_parent_pegging_id));
4066: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_instance_id: '|| to_char(p_instance_id));
4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));
4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));
4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));
4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));
4071: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_inventory_item_id: '|| to_char(p_inventory_item_id));
4072: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_organization_id: '|| to_char(p_organization_id));
4073: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_quantity: '|| to_char(p_quantity));

Line 4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));

4066: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_instance_id: '|| to_char(p_instance_id));
4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));
4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));
4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));
4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));
4071: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_inventory_item_id: '|| to_char(p_inventory_item_id));
4072: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_organization_id: '|| to_char(p_organization_id));
4073: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_quantity: '|| to_char(p_quantity));
4074: END IF;

Line 4071: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_inventory_item_id: '|| to_char(p_inventory_item_id));

4067: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_scenario_id: '|| to_char(p_scenario_id));
4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));
4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));
4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));
4071: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_inventory_item_id: '|| to_char(p_inventory_item_id));
4072: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_organization_id: '|| to_char(p_organization_id));
4073: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_quantity: '|| to_char(p_quantity));
4074: END IF;
4075: -- Loop through the substitutes and do a single level check for each of them

Line 4072: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_organization_id: '|| to_char(p_organization_id));

4068: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_level: '|| to_char(p_level));
4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));
4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));
4071: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_inventory_item_id: '|| to_char(p_inventory_item_id));
4072: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_organization_id: '|| to_char(p_organization_id));
4073: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_quantity: '|| to_char(p_quantity));
4074: END IF;
4075: -- Loop through the substitutes and do a single level check for each of them
4076: -- If partial quantity is available, insert that into the details and also

Line 4073: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_quantity: '|| to_char(p_quantity));

4069: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_search: '|| to_char(p_search));
4070: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_plan_id: '|| to_char(p_plan_id));
4071: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_inventory_item_id: '|| to_char(p_inventory_item_id));
4072: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_organization_id: '|| to_char(p_organization_id));
4073: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_quantity: '|| to_char(p_quantity));
4074: END IF;
4075: -- Loop through the substitutes and do a single level check for each of them
4076: -- If partial quantity is available, insert that into the details and also
4077: -- set the flag that the component is substitute so that UI can check that

Line 4081: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Opening the substitute cursor:' || to_char(MSC_ATP_PVT.G_SESSION_ID) || ':' ||

4077: -- set the flag that the component is substitute so that UI can check that
4078: -- Keep decrementing the net_demand and exit if it is <= 0
4079: -- If the net_demand is still > 0, pass that back to the calling routing
4080: IF PG_DEBUG in ('Y', 'C') THEN
4081: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Opening the substitute cursor:' || to_char(MSC_ATP_PVT.G_SESSION_ID) || ':' ||
4082: to_char(p_parent_pegging_id) || ':' || to_char(p_plan_id) || ':'
4083: || to_char(p_instance_id) || ':' || p_inventory_item_id || ':' || p_atp_record.bill_seq_id); --4741012
4084: END IF;
4085: --bug3583705

Line 4106: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_atp_record.requested_ship_date: ' || p_atp_record.requested_ship_date);

4102: /* rajjain 3008611 select component substitutes for which:
4103: * effective date is greater than or equal to greatest of PTF date, sysdate and component due date
4104: * disable date is less than or equal to greatest of PTF date, sysdate and component due date*/
4105: IF PG_DEBUG in ('Y', 'C') THEN
4106: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_atp_record.requested_ship_date: ' || p_atp_record.requested_ship_date);
4107: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_atp_record.shipping_cal_code: ' || p_atp_record.shipping_cal_code);
4108: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Date passed to cursor: ' ||
4109: GREATEST(p_atp_record.requested_ship_date, sysdate, MSC_ATP_PVT.G_PTF_DATE));
4110: END IF;

Line 4107: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_atp_record.shipping_cal_code: ' || p_atp_record.shipping_cal_code);

4103: * effective date is greater than or equal to greatest of PTF date, sysdate and component due date
4104: * disable date is less than or equal to greatest of PTF date, sysdate and component due date*/
4105: IF PG_DEBUG in ('Y', 'C') THEN
4106: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_atp_record.requested_ship_date: ' || p_atp_record.requested_ship_date);
4107: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_atp_record.shipping_cal_code: ' || p_atp_record.shipping_cal_code);
4108: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Date passed to cursor: ' ||
4109: GREATEST(p_atp_record.requested_ship_date, sysdate, MSC_ATP_PVT.G_PTF_DATE));
4110: END IF;
4111:

Line 4108: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Date passed to cursor: ' ||

4104: * disable date is less than or equal to greatest of PTF date, sysdate and component due date*/
4105: IF PG_DEBUG in ('Y', 'C') THEN
4106: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_atp_record.requested_ship_date: ' || p_atp_record.requested_ship_date);
4107: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'p_atp_record.shipping_cal_code: ' || p_atp_record.shipping_cal_code);
4108: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Date passed to cursor: ' ||
4109: GREATEST(p_atp_record.requested_ship_date, sysdate, MSC_ATP_PVT.G_PTF_DATE));
4110: END IF;
4111:
4112: --5216528/5216528 Start First should be having the main item.

Line 4158: msc_sch_wb.atp_debug('Check_Substitutes: ' || '**Substitute:' || to_char(l_substitute_id) || ':'

4154: x_substitutes_rec.inventory_item_id(l_index) := l_substitute_id;
4155: --5216528/5216528 End
4156: end if;
4157: IF PG_DEBUG in ('Y', 'C') THEN
4158: msc_sch_wb.atp_debug('Check_Substitutes: ' || '**Substitute:' || to_char(l_substitute_id) || ':'
4159: || to_char(l_usage) || ':' || l_atp_flag || ':' ||
4160: to_char(l_primary_comp_usage));
4161: --4570421
4162: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scaling_type: ' || l_scaling_type);

Line 4162: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scaling_type: ' || l_scaling_type);

4158: msc_sch_wb.atp_debug('Check_Substitutes: ' || '**Substitute:' || to_char(l_substitute_id) || ':'
4159: || to_char(l_usage) || ':' || l_atp_flag || ':' ||
4160: to_char(l_primary_comp_usage));
4161: --4570421
4162: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scaling_type: ' || l_scaling_type);
4163: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_multiple: ' || l_scale_multiple);
4164: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_rounding_variance: ' || l_scale_rounding_variance);
4165: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_rounding_direction: ' || l_rounding_direction);
4166: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_component_yield_factor: ' || l_component_yield_factor);

Line 4163: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_multiple: ' || l_scale_multiple);

4159: || to_char(l_usage) || ':' || l_atp_flag || ':' ||
4160: to_char(l_primary_comp_usage));
4161: --4570421
4162: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scaling_type: ' || l_scaling_type);
4163: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_multiple: ' || l_scale_multiple);
4164: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_rounding_variance: ' || l_scale_rounding_variance);
4165: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_rounding_direction: ' || l_rounding_direction);
4166: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_component_yield_factor: ' || l_component_yield_factor);
4167: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_usage_qty: ' || l_usage_qty);

Line 4164: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_rounding_variance: ' || l_scale_rounding_variance);

4160: to_char(l_primary_comp_usage));
4161: --4570421
4162: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scaling_type: ' || l_scaling_type);
4163: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_multiple: ' || l_scale_multiple);
4164: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_rounding_variance: ' || l_scale_rounding_variance);
4165: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_rounding_direction: ' || l_rounding_direction);
4166: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_component_yield_factor: ' || l_component_yield_factor);
4167: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_usage_qty: ' || l_usage_qty);
4168:

Line 4165: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_rounding_direction: ' || l_rounding_direction);

4161: --4570421
4162: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scaling_type: ' || l_scaling_type);
4163: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_multiple: ' || l_scale_multiple);
4164: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_rounding_variance: ' || l_scale_rounding_variance);
4165: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_rounding_direction: ' || l_rounding_direction);
4166: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_component_yield_factor: ' || l_component_yield_factor);
4167: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_usage_qty: ' || l_usage_qty);
4168:
4169:

Line 4166: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_component_yield_factor: ' || l_component_yield_factor);

4162: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scaling_type: ' || l_scaling_type);
4163: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_multiple: ' || l_scale_multiple);
4164: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_rounding_variance: ' || l_scale_rounding_variance);
4165: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_rounding_direction: ' || l_rounding_direction);
4166: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_component_yield_factor: ' || l_component_yield_factor);
4167: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_usage_qty: ' || l_usage_qty);
4168:
4169:
4170: END IF;

Line 4167: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_usage_qty: ' || l_usage_qty);

4163: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_multiple: ' || l_scale_multiple);
4164: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_scale_rounding_variance: ' || l_scale_rounding_variance);
4165: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_rounding_direction: ' || l_rounding_direction);
4166: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_component_yield_factor: ' || l_component_yield_factor);
4167: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_usage_qty: ' || l_usage_qty);
4168:
4169:
4170: END IF;
4171: -- Setup new g_atp_record during each loop, we should not resue the

Line 4239: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Before calling subs atp info');

4235: l_requested_ship_date := g_atp_record.requested_ship_date;
4236:
4237:
4238: IF PG_DEBUG in ('Y', 'C') THEN
4239: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Before calling subs atp info');
4240: END IF;
4241:
4242: -- bug 1665483:
4243: --IF (MSC_ATP_PVT.G_HIERARCHY_PROFILE = 2) AND ((MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y')

Line 4280: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Error encountered in call to Get_PF_Plan_Info');

4276: );
4277:
4278: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4279: IF PG_DEBUG in ('Y', 'C') THEN
4280: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'Error encountered in call to Get_PF_Plan_Info');
4281: END IF;
4282: END IF;
4283: /* time_phased_atp changes end*/
4284:

Line 4303: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'ATP Downtime Encountered');

4299: END IF;
4300:
4301: if (l_plan_id = -300) then
4302: IF PG_DEBUG in ('Y', 'C') THEN
4303: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'ATP Downtime Encountered');
4304: END IF;
4305: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
4306: end if;
4307:

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

4313: -- To handle case where family item id is different re-set it.
4314: g_atp_record.inventory_item_id := g_atp_record.request_item_id;
4315: l_pf_item_id := l_inv_item_id;
4316: IF PG_DEBUG in ('Y', 'C') THEN
4317: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4318: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'PF and Allocated ATP not applicable for DRP plans');
4319: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.inventory_item_id' ||
4320: g_atp_record.inventory_item_id);
4321: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.request_item_id' ||

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

4314: g_atp_record.inventory_item_id := g_atp_record.request_item_id;
4315: l_pf_item_id := l_inv_item_id;
4316: IF PG_DEBUG in ('Y', 'C') THEN
4317: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4318: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'PF and Allocated ATP not applicable for DRP plans');
4319: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.inventory_item_id' ||
4320: g_atp_record.inventory_item_id);
4321: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.request_item_id' ||
4322: g_atp_record.request_item_id);

Line 4319: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.inventory_item_id' ||

4315: l_pf_item_id := l_inv_item_id;
4316: IF PG_DEBUG in ('Y', 'C') THEN
4317: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4318: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'PF and Allocated ATP not applicable for DRP plans');
4319: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.inventory_item_id' ||
4320: g_atp_record.inventory_item_id);
4321: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.request_item_id' ||
4322: g_atp_record.request_item_id);
4323: END IF;

Line 4321: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.request_item_id' ||

4317: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4318: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'PF and Allocated ATP not applicable for DRP plans');
4319: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.inventory_item_id' ||
4320: g_atp_record.inventory_item_id);
4321: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'g_atp_record.request_item_id' ||
4322: g_atp_record.request_item_id);
4323: END IF;
4324: ELSE
4325: -- time_phased_atp changes begin

Line 4409: msc_sch_wb.atp_debug('Check_Substitutes: Lot Based or Fixed Scaling ');

4405: ElSE
4406: l_net_demand := 0;
4407: END IF;
4408: IF PG_DEBUG in ('Y', 'C') THEN
4409: msc_sch_wb.atp_debug('Check_Substitutes: Lot Based or Fixed Scaling ');
4410: msc_sch_wb.atp_debug('Check_Substitutes: l_lot_fail : '|| to_char(l_lot_fail));
4411: END IF;
4412: ELSIF (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND nvl(l_scaling_type,1) IN (4,5)) THEN --Integer Scaling
4413: l_net_demand := (g_atp_record.quantity_ordered -

Line 4410: msc_sch_wb.atp_debug('Check_Substitutes: l_lot_fail : '|| to_char(l_lot_fail));

4406: l_net_demand := 0;
4407: END IF;
4408: IF PG_DEBUG in ('Y', 'C') THEN
4409: msc_sch_wb.atp_debug('Check_Substitutes: Lot Based or Fixed Scaling ');
4410: msc_sch_wb.atp_debug('Check_Substitutes: l_lot_fail : '|| to_char(l_lot_fail));
4411: END IF;
4412: ELSIF (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND nvl(l_scaling_type,1) IN (4,5)) THEN --Integer Scaling
4413: l_net_demand := (g_atp_record.quantity_ordered -
4414: FLOOR(greatest(l_requested_date_quantity, 0)/l_scale_multiple) *l_scale_multiple);

Line 4416: msc_sch_wb.atp_debug('Check_Substitutes: Integer_scaling ');

4412: ELSIF (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND nvl(l_scaling_type,1) IN (4,5)) THEN --Integer Scaling
4413: l_net_demand := (g_atp_record.quantity_ordered -
4414: FLOOR(greatest(l_requested_date_quantity, 0)/l_scale_multiple) *l_scale_multiple);
4415: IF PG_DEBUG in ('Y', 'C') THEN
4416: msc_sch_wb.atp_debug('Check_Substitutes: Integer_scaling ');
4417: END IF;
4418: ELSE
4419: l_net_demand := (g_atp_record.quantity_ordered -
4420: greatest(l_requested_date_quantity, 0)) *

Line 4430: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_net_demand : '|| to_char(l_net_demand));

4426: (1/l_usage); */
4427:
4428: -- print the net_demand
4429: IF PG_DEBUG in ('Y', 'C') THEN
4430: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'l_net_demand : '|| to_char(l_net_demand));
4431: END IF;
4432:
4433: -- if we don't have atp for this sub component , don't bother
4434: -- generate pegging tree, demand record.

Line 4473: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);

4469: -- for DRP plans.
4470: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5 THEN
4471: l_atp_insert_rec.origination_type := 47;
4472: IF PG_DEBUG in ('Y', 'C') THEN
4473: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
4474: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4475: END IF;
4476: ELSE
4477: l_atp_insert_rec.origination_type := 1;

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

4470: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type,1) = 5 THEN
4471: l_atp_insert_rec.origination_type := 47;
4472: IF PG_DEBUG in ('Y', 'C') THEN
4473: msc_sch_wb.atp_debug('Check_Substitutes: ' || 'DRP origination_type ='|| l_atp_insert_rec.origination_type);
4474: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
4475: END IF;
4476: ELSE
4477: l_atp_insert_rec.origination_type := 1;
4478: END IF;

Line 4670: msc_sch_wb.atp_debug ('Check Substitutes : Plan Downtime encountered');

4666: EXCEPTION
4667: -- 24x7
4668: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
4669: IF PG_DEBUG in ('Y', 'C') THEN
4670: msc_sch_wb.atp_debug ('Check Substitutes : Plan Downtime encountered');
4671: END IF;
4672: MSC_ATP_PVT.G_DOWNTIME_HIT := 'Y';
4673: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
4674: l_return_status := FND_API.G_RET_STS_ERROR;

Line 4680: msc_sch_wb.atp_debug ('Check Substitutes : NO_MATCHING_DATE_IN_CAL');

4676: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
4677:
4678: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
4679: IF PG_DEBUG in ('Y', 'C') THEN
4680: msc_sch_wb.atp_debug ('Check Substitutes : NO_MATCHING_DATE_IN_CAL');
4681: END IF;
4682: MSC_ATP_PVT.G_SUMMARY_FLAG := l_summary_flag;
4683: l_return_status := FND_API.G_RET_STS_ERROR;
4684: CLOSE substitute;

Line 4751: msc_sch_wb.atp_debug('**********Begin Get_Material_Atp_Info Procedure************');

4747:
4748: BEGIN
4749:
4750: IF PG_DEBUG in ('Y', 'C') THEN
4751: msc_sch_wb.atp_debug('**********Begin Get_Material_Atp_Info Procedure************');
4752: END IF;
4753:
4754: -- initialize API return status to success
4755: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 4758: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Material_Atp_Info **********');

4754: -- initialize API return status to success
4755: x_return_status := FND_API.G_RET_STS_SUCCESS;
4756:
4757: IF PG_DEBUG in ('Y', 'C') THEN
4758: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Material_Atp_Info **********');
4759: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.inventory_item_id: '|| to_char(p_mat_atp_info_rec.inventory_item_id));
4760: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.request_item_id: '|| to_char(p_mat_atp_info_rec.request_item_id));
4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));
4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));

Line 4759: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.inventory_item_id: '|| to_char(p_mat_atp_info_rec.inventory_item_id));

4755: x_return_status := FND_API.G_RET_STS_SUCCESS;
4756:
4757: IF PG_DEBUG in ('Y', 'C') THEN
4758: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Material_Atp_Info **********');
4759: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.inventory_item_id: '|| to_char(p_mat_atp_info_rec.inventory_item_id));
4760: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.request_item_id: '|| to_char(p_mat_atp_info_rec.request_item_id));
4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));
4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));

Line 4760: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.request_item_id: '|| to_char(p_mat_atp_info_rec.request_item_id));

4756:
4757: IF PG_DEBUG in ('Y', 'C') THEN
4758: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Material_Atp_Info **********');
4759: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.inventory_item_id: '|| to_char(p_mat_atp_info_rec.inventory_item_id));
4760: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.request_item_id: '|| to_char(p_mat_atp_info_rec.request_item_id));
4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));
4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));
4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));

Line 4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));

4757: IF PG_DEBUG in ('Y', 'C') THEN
4758: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Material_Atp_Info **********');
4759: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.inventory_item_id: '|| to_char(p_mat_atp_info_rec.inventory_item_id));
4760: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.request_item_id: '|| to_char(p_mat_atp_info_rec.request_item_id));
4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));
4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));
4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));
4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));

Line 4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));

4758: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Material_Atp_Info **********');
4759: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.inventory_item_id: '|| to_char(p_mat_atp_info_rec.inventory_item_id));
4760: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.request_item_id: '|| to_char(p_mat_atp_info_rec.request_item_id));
4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));
4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));
4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));
4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));
4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));

Line 4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));

4759: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.inventory_item_id: '|| to_char(p_mat_atp_info_rec.inventory_item_id));
4760: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.request_item_id: '|| to_char(p_mat_atp_info_rec.request_item_id));
4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));
4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));
4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));
4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));
4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));
4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);

Line 4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));

4760: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.request_item_id: '|| to_char(p_mat_atp_info_rec.request_item_id));
4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));
4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));
4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));
4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));
4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));
4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);
4768: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.substitution_window := '|| p_mat_atp_info_rec.substitution_window);

Line 4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));

4761: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.organization_id: '|| to_char(p_mat_atp_info_rec.organization_id));
4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));
4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));
4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));
4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));
4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);
4768: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.substitution_window := '|| p_mat_atp_info_rec.substitution_window);
4769: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atf_date: '|| p_mat_atp_info_rec.atf_date);

Line 4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));

4762: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));
4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));
4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));
4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));
4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);
4768: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.substitution_window := '|| p_mat_atp_info_rec.substitution_window);
4769: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atf_date: '|| p_mat_atp_info_rec.atf_date);
4770: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.shipping_cal_code: '|| p_mat_atp_info_rec.shipping_cal_code);

Line 4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);

4763: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.instance_id: '|| to_char(p_mat_atp_info_rec.instance_id));
4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));
4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));
4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));
4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);
4768: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.substitution_window := '|| p_mat_atp_info_rec.substitution_window);
4769: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atf_date: '|| p_mat_atp_info_rec.atf_date);
4770: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.shipping_cal_code: '|| p_mat_atp_info_rec.shipping_cal_code);
4771: END IF;

Line 4768: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.substitution_window := '|| p_mat_atp_info_rec.substitution_window);

4764: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.plan_id: '|| to_char(p_mat_atp_info_rec.plan_id));
4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));
4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));
4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);
4768: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.substitution_window := '|| p_mat_atp_info_rec.substitution_window);
4769: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atf_date: '|| p_mat_atp_info_rec.atf_date);
4770: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.shipping_cal_code: '|| p_mat_atp_info_rec.shipping_cal_code);
4771: END IF;
4772: /* time_phased_atp changes begin*/

Line 4769: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atf_date: '|| p_mat_atp_info_rec.atf_date);

4765: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.quantity_ordered: '|| to_char(p_mat_atp_info_rec.quantity_ordered));
4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));
4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);
4768: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.substitution_window := '|| p_mat_atp_info_rec.substitution_window);
4769: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atf_date: '|| p_mat_atp_info_rec.atf_date);
4770: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.shipping_cal_code: '|| p_mat_atp_info_rec.shipping_cal_code);
4771: END IF;
4772: /* time_phased_atp changes begin*/
4773: IF (MSC_ATP_PVT.G_INV_CTP = 4)

Line 4770: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.shipping_cal_code: '|| p_mat_atp_info_rec.shipping_cal_code);

4766: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.insert_flag: '|| to_char(p_mat_atp_info_rec.insert_flag));
4767: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.demand_class: '|| p_mat_atp_info_rec.demand_class);
4768: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.substitution_window := '|| p_mat_atp_info_rec.substitution_window);
4769: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atf_date: '|| p_mat_atp_info_rec.atf_date);
4770: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.shipping_cal_code: '|| p_mat_atp_info_rec.shipping_cal_code);
4771: END IF;
4772: /* time_phased_atp changes begin*/
4773: IF (MSC_ATP_PVT.G_INV_CTP = 4)
4774: and (p_mat_atp_info_rec.inventory_item_id <> p_mat_atp_info_rec.request_item_id)

Line 4789: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_request_item_id := ' || l_request_item_id);

4785: l_request_item_id := p_mat_atp_info_rec.request_item_id;
4786: END IF;
4787:
4788: IF PG_DEBUG in ('Y', 'C') THEN
4789: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_request_item_id := ' || l_request_item_id);
4790: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Time Phased ATP = ' || l_time_phased_atp);
4791: END IF;
4792: /* time_phased_atp changes end*/
4793:

Line 4790: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Time Phased ATP = ' || l_time_phased_atp);

4786: END IF;
4787:
4788: IF PG_DEBUG in ('Y', 'C') THEN
4789: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_request_item_id := ' || l_request_item_id);
4790: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Time Phased ATP = ' || l_time_phased_atp);
4791: END IF;
4792: /* time_phased_atp changes end*/
4793:
4794: -- get the infinite time fence date if it exists

Line 4808: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || ' ATP Rule := ' || p_mat_atp_info_rec.atp_rule_name);

4804:
4805: p_mat_atp_info_rec.infinite_time_fence_date := l_infinite_time_fence_date;
4806: l_get_mat_in_rec.infinite_time_fence_date := l_infinite_time_fence_date;
4807: IF PG_DEBUG in ('Y', 'C') THEN
4808: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || ' ATP Rule := ' || p_mat_atp_info_rec.atp_rule_name);
4809: END IF;
4810:
4811: -- 2859130 get if this is a constrained plan or not
4812: IF p_mat_atp_info_rec.plan_id <> -1 THEN

Line 4838: msc_sch_wb.atp_debug('Optimized plan: ' || MSC_ATP_PVT.G_OPTIMIZED_PLAN);

4834: END IF;
4835: l_get_mat_in_rec.optimized_plan := MSC_ATP_PVT.G_OPTIMIZED_PLAN; -- 2859130
4836:
4837: IF PG_DEBUG in ('Y', 'C') THEN
4838: msc_sch_wb.atp_debug('Optimized plan: ' || MSC_ATP_PVT.G_OPTIMIZED_PLAN);
4839: END IF;
4840:
4841: --- bug 1819638: get next working day.
4842:

Line 4861: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || ' RAISING EXCEPTION for NO ATP RULE ');

4857: IF (MSC_ATP_PVT.G_INV_CTP = 5) AND
4858: (l_default_atp_rule_id IS NULL) AND -- no default rule at org level
4859: (MSC_ATP_PVT.G_ATP_RULE_FLAG = 'N') THEN
4860: IF PG_DEBUG in ('Y', 'C') THEN
4861: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || ' RAISING EXCEPTION for NO ATP RULE ');
4862: END IF;
4863: RAISE MSC_ATP_PVT.EXC_NO_ATP_RULE; -- ATPeable item has no rule
4864: ELSE
4865: IF PG_DEBUG in ('Y', 'C') THEN

Line 4866: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'ATP RULE EXISTS at Item or Org level ' ||

4862: END IF;
4863: RAISE MSC_ATP_PVT.EXC_NO_ATP_RULE; -- ATPeable item has no rule
4864: ELSE
4865: IF PG_DEBUG in ('Y', 'C') THEN
4866: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'ATP RULE EXISTS at Item or Org level ' ||
4867: 'ORG LEVEL Default Rule: '||l_default_atp_rule_id);
4868: END IF;
4869: MSC_ATP_PVT.G_ATP_RULE_FLAG := 'Y'; -- Item has an applicable ATP rule
4870: END IF;

Line 4902: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sysdate_seq_num = ' || l_sysdate_seq_num);

4898: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
4899: END;
4900:
4901: IF PG_DEBUG in ('Y', 'C') THEN
4902: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sysdate_seq_num = ' || l_sysdate_seq_num);
4903: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sys_next_date = ' || l_sys_next_date);
4904: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sys_next_osc_date = ' || l_sys_next_osc_date);
4905: END IF;
4906: -- in case we want to support flex date

Line 4903: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sys_next_date = ' || l_sys_next_date);

4899: END;
4900:
4901: IF PG_DEBUG in ('Y', 'C') THEN
4902: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sysdate_seq_num = ' || l_sysdate_seq_num);
4903: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sys_next_date = ' || l_sys_next_date);
4904: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sys_next_osc_date = ' || l_sys_next_osc_date);
4905: END IF;
4906: -- in case we want to support flex date
4907: l_requested_date := p_mat_atp_info_rec.requested_date;

Line 4904: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sys_next_osc_date = ' || l_sys_next_osc_date);

4900:
4901: IF PG_DEBUG in ('Y', 'C') THEN
4902: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sysdate_seq_num = ' || l_sysdate_seq_num);
4903: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sys_next_date = ' || l_sys_next_date);
4904: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_sys_next_osc_date = ' || l_sys_next_osc_date);
4905: END IF;
4906: -- in case we want to support flex date
4907: l_requested_date := p_mat_atp_info_rec.requested_date;
4908:

Line 4910: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_infinite_time_fence_date: '|| to_char(l_infinite_time_fence_date));

4906: -- in case we want to support flex date
4907: l_requested_date := p_mat_atp_info_rec.requested_date;
4908:
4909: IF PG_DEBUG in ('Y', 'C') THEN
4910: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_infinite_time_fence_date: '|| to_char(l_infinite_time_fence_date));
4911: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4912: END IF;
4913:
4914: IF (l_requested_date >=

Line 4911: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));

4907: l_requested_date := p_mat_atp_info_rec.requested_date;
4908:
4909: IF PG_DEBUG in ('Y', 'C') THEN
4910: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_infinite_time_fence_date: '|| to_char(l_infinite_time_fence_date));
4911: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_requested_date: '|| to_char(p_mat_atp_info_rec.requested_date));
4912: END IF;
4913:
4914: IF (l_requested_date >=
4915: NVL(l_infinite_time_fence_date, l_requested_date +1)) THEN

Line 4942: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);

4938: -- if we need the detail information, we will get individual s/d rows
4939: -- and do the sum ourselves. if we don't need the detail infomation,
4940: -- we will do a group by and select the sum in the sql statement.
4941: IF PG_DEBUG in ('Y', 'C') THEN
4942: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'MSC_ATP_PVT.G_SUMMARY_FLAG := ' || MSC_ATP_PVT.G_SUMMARY_FLAG);
4943: END IF;
4944:
4945: -- 2859130 replace sql stmts with calls to procedures containing the sql stmts
4946: IF nvl(p_mat_atp_info_rec.insert_flag, 0) = 0 THEN

Line 4992: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Error occured in procedure Get_Mat_Avail_Pf');

4988: l_return_status
4989: );
4990: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4991: IF PG_DEBUG in ('Y', 'C') THEN
4992: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Error occured in procedure Get_Mat_Avail_Pf');
4993: END IF;
4994: RAISE FND_API.G_EXC_ERROR;
4995: END IF;
4996: END IF;

Line 4999: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'after getting netted qtys');

4995: END IF;
4996: END IF;
4997:
4998: IF PG_DEBUG in ('Y', 'C') THEN
4999: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'after getting netted qtys');
5000: END IF;
5001:
5002: -- time_phased_atp
5003: IF l_time_phased_atp = 'Y' THEN

Line 5012: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Error occured in procedure Pf_Atp_Consume');

5008: MSC_ATP_PF.Bw_Fw_Cum, --b/w, f/w consumption and accumulation
5009: p_mat_atp_info_rec.atf_date);
5010: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5011: IF PG_DEBUG in ('Y', 'C') THEN
5012: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Error occured in procedure Pf_Atp_Consume');
5013: END IF;
5014: RAISE FND_API.G_EXC_ERROR;
5015: END IF;
5016: ELSE

Line 5020: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'after atp_consume');

5016: ELSE
5017: MSC_ATP_PROC.atp_consume(l_atp_qty_tab, l_atp_qty_tab.count);
5018: END IF;
5019: IF PG_DEBUG in ('Y', 'C') THEN
5020: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'after atp_consume');
5021: END IF;
5022:
5023: /* Cum drop issue changes begin*/
5024: MSC_AATP_PROC.Atp_Remove_Negatives(l_atp_qty_tab, l_return_status);

Line 5027: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');

5023: /* Cum drop issue changes begin*/
5024: MSC_AATP_PROC.Atp_Remove_Negatives(l_atp_qty_tab, l_return_status);
5025: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5026: IF PG_DEBUG in ('Y', 'C') THEN
5027: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');
5028: END IF;
5029: RAISE FND_API.G_EXC_ERROR;
5030: END IF;
5031: /* Cum drop issue changes end*/

Line 5037: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'adding itf');

5033: IF l_infinite_time_fence_date IS NOT NULL THEN
5034: -- add one more entry to indicate infinite time fence date
5035: -- and quantity.
5036: IF PG_DEBUG in ('Y', 'C') THEN
5037: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'adding itf');
5038: END IF;
5039: l_atp_period_tab.EXTEND;
5040: l_atp_qty_tab.EXTEND;
5041: l_atp_period_tab(l_atp_period_tab.count) := l_infinite_time_fence_date;

Line 5070: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'after Insert_Details');

5066: l_get_mat_in_rec,
5067: p_mat_atp_info_rec.atf_date); -- For time_phased_atp
5068:
5069: IF PG_DEBUG in ('Y', 'C') THEN
5070: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'after Insert_Details');
5071: END IF;
5072:
5073: l_atp_period_tab := x_atp_period.Period_Start_Date;
5074: l_atp_qty_tab := x_atp_period.Cumulative_Quantity;

Line 5094: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);

5090: l_org_code := MSC_ATP_PVT.G_ORG_INFO_REC.org_code;
5091: /*Modularize Item and Org Info */
5092:
5093: IF PG_DEBUG in ('Y', 'C') THEN
5094: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);
5095: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
5096: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);
5097: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_demand_class'|| l_default_demand_class);
5098: END IF;

Line 5095: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);

5091: /*Modularize Item and Org Info */
5092:
5093: IF PG_DEBUG in ('Y', 'C') THEN
5094: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);
5095: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
5096: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);
5097: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_demand_class'|| l_default_demand_class);
5098: END IF;
5099: IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 THEN

Line 5096: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);

5092:
5093: IF PG_DEBUG in ('Y', 'C') THEN
5094: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);
5095: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
5096: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);
5097: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_demand_class'|| l_default_demand_class);
5098: END IF;
5099: IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 THEN
5100: IF PG_DEBUG in ('Y', 'C') THEN

Line 5097: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_demand_class'|| l_default_demand_class);

5093: IF PG_DEBUG in ('Y', 'C') THEN
5094: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);
5095: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
5096: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);
5097: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_demand_class'|| l_default_demand_class);
5098: END IF;
5099: IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 THEN
5100: IF PG_DEBUG in ('Y', 'C') THEN
5101: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Pre-alllocated demand class AATP');

Line 5101: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Pre-alllocated demand class AATP');

5097: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_default_demand_class'|| l_default_demand_class);
5098: END IF;
5099: IF MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 THEN
5100: IF PG_DEBUG in ('Y', 'C') THEN
5101: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Pre-alllocated demand class AATP');
5102: END IF;
5103:
5104: --diag_atp: pass infinite time fence as in parameter so that we dont need to recalculate it
5105: l_get_mat_in_rec.infinite_time_fence_date := l_infinite_time_fence_date;

Line 5135: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Customer class or Allocation based demand class AATP');

5131: -- rajjain 02/20/2003 Bug 2813095 End
5132: ELSE
5133:
5134: IF PG_DEBUG in ('Y', 'C') THEN
5135: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Customer class or Allocation based demand class AATP');
5136: END IF;
5137: --diag_atp: pass infinite time fence as in parameter so that we dont need to recalculate it
5138: l_get_mat_in_rec.infinite_time_fence_date := l_infinite_time_fence_date;
5139: l_get_mat_in_rec.dest_inv_item_id := p_mat_atp_info_rec.dest_inv_item_id;

Line 5176: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.atp_period.count = '||l_atp_info.atp_period.COUNT);

5172: END IF;
5173: --Bug2471377 End Changes.
5174:
5175: IF PG_DEBUG in ('Y', 'C') THEN
5176: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.atp_period.count = '||l_atp_info.atp_period.COUNT);
5177: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.atp_qty.count = '||l_atp_info.atp_qty.COUNT);
5178: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.limit_qty.count = '||l_atp_info.limit_qty.COUNT);
5179: END IF;
5180:

Line 5177: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.atp_qty.count = '||l_atp_info.atp_qty.COUNT);

5173: --Bug2471377 End Changes.
5174:
5175: IF PG_DEBUG in ('Y', 'C') THEN
5176: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.atp_period.count = '||l_atp_info.atp_period.COUNT);
5177: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.atp_qty.count = '||l_atp_info.atp_qty.COUNT);
5178: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.limit_qty.count = '||l_atp_info.limit_qty.COUNT);
5179: END IF;
5180:
5181: END IF; -- end of G_ALLOCATED_ATP

Line 5178: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.limit_qty.count = '||l_atp_info.limit_qty.COUNT);

5174:
5175: IF PG_DEBUG in ('Y', 'C') THEN
5176: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.atp_period.count = '||l_atp_info.atp_period.COUNT);
5177: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.atp_qty.count = '||l_atp_info.atp_qty.COUNT);
5178: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_info.limit_qty.count = '||l_atp_info.limit_qty.COUNT);
5179: END IF;
5180:
5181: END IF; -- end of G_ALLOCATED_ATP
5182:

Line 5184: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_period_tabl.count = '||l_atp_period_tab.COUNT);

5180:
5181: END IF; -- end of G_ALLOCATED_ATP
5182:
5183: IF PG_DEBUG in ('Y', 'C') THEN
5184: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_atp_period_tabl.count = '||l_atp_period_tab.COUNT);
5185: END IF;
5186:
5187: IF l_atp_period_tab.COUNT = 0 THEN
5188: -- need to add error message

Line 5218: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level :=' || p_mat_atp_info_rec.atp_date_this_level);

5214: END IF; --end if l_requested_date > l_infinite_time_fence_date
5215: --- subst
5216: --- IF future date is after substitution window then we will move atp date to infinite time fence date
5217: IF PG_DEBUG in ('Y', 'C') THEN
5218: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level :=' || p_mat_atp_info_rec.atp_date_this_level);
5219: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_infinite_time_fence_date := ' || l_infinite_time_fence_date);
5220: END IF;
5221:
5222: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND NVL(p_mat_atp_info_rec.substitution_window,0) > 0

Line 5219: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_infinite_time_fence_date := ' || l_infinite_time_fence_date);

5215: --- subst
5216: --- IF future date is after substitution window then we will move atp date to infinite time fence date
5217: IF PG_DEBUG in ('Y', 'C') THEN
5218: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level :=' || p_mat_atp_info_rec.atp_date_this_level);
5219: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_infinite_time_fence_date := ' || l_infinite_time_fence_date);
5220: END IF;
5221:
5222: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND NVL(p_mat_atp_info_rec.substitution_window,0) > 0
5223: AND p_mat_atp_info_rec.atp_date_this_level is not null THEN

Line 5225: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'we have substitution window');

5221:
5222: IF MSC_ATP_PVT.G_SUBSTITUTION_FLAG = 'Y' AND NVL(p_mat_atp_info_rec.substitution_window,0) > 0
5223: AND p_mat_atp_info_rec.atp_date_this_level is not null THEN
5224: IF PG_DEBUG in ('Y', 'C') THEN
5225: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'we have substitution window');
5226: END IF;
5227: IF l_infinite_time_fence_date is not null and p_mat_atp_info_rec.atp_date_this_level = l_infinite_time_fence_date THEN
5228: IF PG_DEBUG in ('Y', 'C') THEN
5229: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level = infinite supply, dont move the date');

Line 5229: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level = infinite supply, dont move the date');

5225: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'we have substitution window');
5226: END IF;
5227: IF l_infinite_time_fence_date is not null and p_mat_atp_info_rec.atp_date_this_level = l_infinite_time_fence_date THEN
5228: IF PG_DEBUG in ('Y', 'C') THEN
5229: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level = infinite supply, dont move the date');
5230: END IF;
5231: ELSE
5232: IF PG_DEBUG in ('Y', 'C') THEN
5233: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Do substitution check');

Line 5233: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Do substitution check');

5229: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level = infinite supply, dont move the date');
5230: END IF;
5231: ELSE
5232: IF PG_DEBUG in ('Y', 'C') THEN
5233: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Do substitution check');
5234: END IF;
5235: l_subst_limit_date := MSC_CALENDAR.DATE_OFFSET(
5236: p_mat_atp_info_rec.organization_id,
5237: p_mat_atp_info_rec.instance_id,

Line 5242: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_subst_limit_date := ' || l_subst_limit_date);

5238: 1,
5239: p_mat_atp_info_rec.requested_date,
5240: p_mat_atp_info_rec.substitution_window);
5241: IF PG_DEBUG in ('Y', 'C') THEN
5242: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_subst_limit_date := ' || l_subst_limit_date);
5243: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level := ' || p_mat_atp_info_rec.atp_date_this_level);
5244: END IF;
5245: IF p_mat_atp_info_rec.atp_date_this_level > l_subst_limit_date THEN
5246: IF PG_DEBUG in ('Y', 'C') THEN

Line 5243: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level := ' || p_mat_atp_info_rec.atp_date_this_level);

5239: p_mat_atp_info_rec.requested_date,
5240: p_mat_atp_info_rec.substitution_window);
5241: IF PG_DEBUG in ('Y', 'C') THEN
5242: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'l_subst_limit_date := ' || l_subst_limit_date);
5243: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level := ' || p_mat_atp_info_rec.atp_date_this_level);
5244: END IF;
5245: IF p_mat_atp_info_rec.atp_date_this_level > l_subst_limit_date THEN
5246: IF PG_DEBUG in ('Y', 'C') THEN
5247: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || ' p_mat_atp_info_rec.atp_date_this_level > l_subst_limit_date');

Line 5247: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || ' p_mat_atp_info_rec.atp_date_this_level > l_subst_limit_date');

5243: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'p_mat_atp_info_rec.atp_date_this_level := ' || p_mat_atp_info_rec.atp_date_this_level);
5244: END IF;
5245: IF p_mat_atp_info_rec.atp_date_this_level > l_subst_limit_date THEN
5246: IF PG_DEBUG in ('Y', 'C') THEN
5247: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || ' p_mat_atp_info_rec.atp_date_this_level > l_subst_limit_date');
5248: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'moving p_mat_atp_info_rec.atp_date_this_level to infinite time fence');
5249: END IF;
5250: p_mat_atp_info_rec.atp_date_this_level := l_infinite_time_fence_date;
5251: p_mat_atp_info_rec.atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;

Line 5248: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'moving p_mat_atp_info_rec.atp_date_this_level to infinite time fence');

5244: END IF;
5245: IF p_mat_atp_info_rec.atp_date_this_level > l_subst_limit_date THEN
5246: IF PG_DEBUG in ('Y', 'C') THEN
5247: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || ' p_mat_atp_info_rec.atp_date_this_level > l_subst_limit_date');
5248: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'moving p_mat_atp_info_rec.atp_date_this_level to infinite time fence');
5249: END IF;
5250: p_mat_atp_info_rec.atp_date_this_level := l_infinite_time_fence_date;
5251: p_mat_atp_info_rec.atp_date_quantity_this_level := MSC_ATP_PVT.INFINITE_NUMBER;
5252: END IF;

Line 5257: msc_sch_wb.atp_debug('**********End Get_Material_Atp_Info Procedure************');

5253: END IF;
5254: END IF;
5255:
5256: IF PG_DEBUG in ('Y', 'C') THEN
5257: msc_sch_wb.atp_debug('**********End Get_Material_Atp_Info Procedure************');
5258: END IF;
5259:
5260: EXCEPTION
5261:

Line 5279: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'No match for sysdate in cal');

5275: --- we are using exceptions
5276: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
5277: p_mat_atp_info_rec.requested_date_quantity := 0.0;
5278: IF PG_DEBUG in ('Y', 'C') THEN
5279: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'No match for sysdate in cal');
5280: END IF;
5281: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
5282:
5283: /************ Bug 1510853 ATP Rule Check ************/

Line 5287: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'No Applicable ATP rule in Get Material ATP Info');

5283: /************ Bug 1510853 ATP Rule Check ************/
5284: WHEN MSC_ATP_PVT.EXC_NO_ATP_RULE THEN
5285: p_mat_atp_info_rec.requested_date_quantity := 0.0;
5286: IF PG_DEBUG in ('Y', 'C') THEN
5287: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'No Applicable ATP rule in Get Material ATP Info');
5288: END IF;
5289: RAISE MSC_ATP_PVT.EXC_NO_ATP_RULE;
5290:
5291: -- rajjain 02/20/2003 Bug 2813095

Line 5294: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' ||

5290:
5291: -- rajjain 02/20/2003 Bug 2813095
5292: WHEN MSC_ATP_PVT.ALLOC_ATP_INVALID_PROFILE THEN
5293: IF PG_DEBUG in ('Y', 'C') THEN
5294: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' ||
5295: 'Incompatible setup of MSC: ATP Allocation Method and MSC: Class Hierarchy');
5296: END IF;
5297: RAISE MSC_ATP_PVT.ALLOC_ATP_INVALID_PROFILE;
5298:

Line 5303: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Get_Mater, sqlcode= '||temp);

5299: WHEN OTHERS THEN
5300: temp := SQLCODE;
5301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5302: IF PG_DEBUG in ('Y', 'C') THEN
5303: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Get_Mater, sqlcode= '||temp);
5304: msc_sch_wb.atp_debug ('Get_Material_Atp_Info: IN Exception Block in others');
5305: msc_sch_wb.atp_debug ('error := ' || SQLERRM);
5306: END IF;
5307: --bug3583705 commenting this out as this resets the FND_MESSAGE.SET_NAME

Line 5304: msc_sch_wb.atp_debug ('Get_Material_Atp_Info: IN Exception Block in others');

5300: temp := SQLCODE;
5301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5302: IF PG_DEBUG in ('Y', 'C') THEN
5303: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Get_Mater, sqlcode= '||temp);
5304: msc_sch_wb.atp_debug ('Get_Material_Atp_Info: IN Exception Block in others');
5305: msc_sch_wb.atp_debug ('error := ' || SQLERRM);
5306: END IF;
5307: --bug3583705 commenting this out as this resets the FND_MESSAGE.SET_NAME
5308: /*IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 5305: msc_sch_wb.atp_debug ('error := ' || SQLERRM);

5301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5302: IF PG_DEBUG in ('Y', 'C') THEN
5303: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Get_Mater, sqlcode= '||temp);
5304: msc_sch_wb.atp_debug ('Get_Material_Atp_Info: IN Exception Block in others');
5305: msc_sch_wb.atp_debug ('error := ' || SQLERRM);
5306: END IF;
5307: --bug3583705 commenting this out as this resets the FND_MESSAGE.SET_NAME
5308: /*IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
5309: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME , 'Get_Material_Atp_Info');

Line 5368: msc_sch_wb.atp_debug('***** Begin Insert_Details Procedure *****');

5364:
5365: Begin
5366:
5367: IF PG_DEBUG in ('Y', 'C') THEN
5368: msc_sch_wb.atp_debug('***** Begin Insert_Details Procedure *****');
5369: END IF;
5370:
5371: x_return_status := FND_API.G_RET_STS_SUCCESS;
5372:

Line 5377: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_atf_date := ' || p_atf_date);

5373: IF p_insert_flag >0 THEN
5374:
5375: /* time_phased_atp changes begin*/
5376: IF PG_DEBUG in ('Y', 'C') THEN
5377: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_atf_date := ' || p_atf_date);
5378: END IF;
5379: IF (MSC_ATP_PVT.G_INV_CTP = 4) and (p_inventory_item_id <> p_request_item_id) and (p_atf_date is null) THEN
5380: l_request_item_id := p_inventory_item_id;
5381: ELSIF (MSC_ATP_PVT.G_INV_CTP = 4) and (p_inventory_item_id <> p_request_item_id) and (p_atf_date is not null) THEN

Line 5388: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_request_item_id := ' || p_request_item_id);

5384: ELSE
5385: l_request_item_id := p_request_item_id;
5386: END IF;
5387: IF PG_DEBUG in ('Y', 'C') THEN
5388: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_request_item_id := ' || p_request_item_id);
5389: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
5390: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_request_item_id := ' || l_request_item_id);
5391: msc_sch_wb.atp_debug('Insert_Details: ' || 'Time Phased ATP = ' || l_time_phased_atp);
5392: END IF;

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

5385: l_request_item_id := p_request_item_id;
5386: END IF;
5387: IF PG_DEBUG in ('Y', 'C') THEN
5388: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_request_item_id := ' || p_request_item_id);
5389: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
5390: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_request_item_id := ' || l_request_item_id);
5391: msc_sch_wb.atp_debug('Insert_Details: ' || 'Time Phased ATP = ' || l_time_phased_atp);
5392: END IF;
5393: /* time_phased_atp changes end*/

Line 5390: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_request_item_id := ' || l_request_item_id);

5386: END IF;
5387: IF PG_DEBUG in ('Y', 'C') THEN
5388: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_request_item_id := ' || p_request_item_id);
5389: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
5390: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_request_item_id := ' || l_request_item_id);
5391: msc_sch_wb.atp_debug('Insert_Details: ' || 'Time Phased ATP = ' || l_time_phased_atp);
5392: END IF;
5393: /* time_phased_atp changes end*/
5394:

Line 5391: msc_sch_wb.atp_debug('Insert_Details: ' || 'Time Phased ATP = ' || l_time_phased_atp);

5387: IF PG_DEBUG in ('Y', 'C') THEN
5388: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_request_item_id := ' || p_request_item_id);
5389: msc_sch_wb.atp_debug('Insert_Details: ' || 'p_inventory_item_id := ' || p_inventory_item_id);
5390: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_request_item_id := ' || l_request_item_id);
5391: msc_sch_wb.atp_debug('Insert_Details: ' || 'Time Phased ATP = ' || l_time_phased_atp);
5392: END IF;
5393: /* time_phased_atp changes end*/
5394:
5395: --diag_atp

Line 5420: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);

5416: l_org_code := MSC_ATP_PVT.G_ORG_INFO_REC.org_code;
5417: /*Modularize Item and Org Info */
5418:
5419: IF PG_DEBUG in ('Y', 'C') THEN
5420: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);
5421: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_code='||l_calendar_code);
5422: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);
5423: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_demand_class'|| l_default_demand_class);
5424: END IF;

Line 5421: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_code='||l_calendar_code);

5417: /*Modularize Item and Org Info */
5418:
5419: IF PG_DEBUG in ('Y', 'C') THEN
5420: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);
5421: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_code='||l_calendar_code);
5422: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);
5423: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_demand_class'|| l_default_demand_class);
5424: END IF;
5425:

Line 5422: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);

5418:
5419: IF PG_DEBUG in ('Y', 'C') THEN
5420: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);
5421: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_code='||l_calendar_code);
5422: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);
5423: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_demand_class'|| l_default_demand_class);
5424: END IF;
5425:
5426: --Bug 2287148

Line 5423: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_demand_class'|| l_default_demand_class);

5419: IF PG_DEBUG in ('Y', 'C') THEN
5420: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_atp_rule_id='|| l_default_atp_rule_id);
5421: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_code='||l_calendar_code);
5422: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_calendar_exception_set_id'|| l_calendar_exception_set_id);
5423: msc_sch_wb.atp_debug('Insert_Details: ' || 'l_default_demand_class'|| l_default_demand_class);
5424: END IF;
5425:
5426: --Bug 2287148
5427: BEGIN

Line 5442: msc_sch_wb.atp_debug('Insert_Details: ' || 'System Next Date is : '|| l_sys_next_date);

5438: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
5439:
5440: END;
5441: IF PG_DEBUG in ('Y', 'C') THEN
5442: msc_sch_wb.atp_debug('Insert_Details: ' || 'System Next Date is : '|| l_sys_next_date);
5443: msc_sch_wb.atp_debug('Insert_Details: ' || 'Sequence Number Is :'|| l_sysdate_seq_num);
5444: msc_sch_wb.atp_debug('Insert_Details: ' || 'before select');
5445: END IF;
5446:

Line 5443: msc_sch_wb.atp_debug('Insert_Details: ' || 'Sequence Number Is :'|| l_sysdate_seq_num);

5439:
5440: END;
5441: IF PG_DEBUG in ('Y', 'C') THEN
5442: msc_sch_wb.atp_debug('Insert_Details: ' || 'System Next Date is : '|| l_sys_next_date);
5443: msc_sch_wb.atp_debug('Insert_Details: ' || 'Sequence Number Is :'|| l_sysdate_seq_num);
5444: msc_sch_wb.atp_debug('Insert_Details: ' || 'before select');
5445: END IF;
5446:
5447: MSC_ATP_DB_UTILS.Clear_SD_Details_temp();

Line 5444: msc_sch_wb.atp_debug('Insert_Details: ' || 'before select');

5440: END;
5441: IF PG_DEBUG in ('Y', 'C') THEN
5442: msc_sch_wb.atp_debug('Insert_Details: ' || 'System Next Date is : '|| l_sys_next_date);
5443: msc_sch_wb.atp_debug('Insert_Details: ' || 'Sequence Number Is :'|| l_sysdate_seq_num);
5444: msc_sch_wb.atp_debug('Insert_Details: ' || 'before select');
5445: END IF;
5446:
5447: MSC_ATP_DB_UTILS.Clear_SD_Details_temp();
5448:

Line 5494: msc_sch_wb.atp_debug('Insert_Details: ' || 'Error occured in procedure Get_Mat_Avail_Pf_Dtls');

5490: l_return_status
5491: );
5492: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5493: IF PG_DEBUG in ('Y', 'C') THEN
5494: msc_sch_wb.atp_debug('Insert_Details: ' || 'Error occured in procedure Get_Mat_Avail_Pf_Dtls');
5495: END IF;
5496: RAISE FND_API.G_EXC_ERROR;
5497: END IF;
5498: END IF;

Line 5501: msc_sch_wb.atp_debug('Insert_Details: ' || 'after inserting into msc_atp_sd_details_temp');

5497: END IF;
5498: END IF;
5499:
5500: IF PG_DEBUG in ('Y', 'C') THEN
5501: msc_sch_wb.atp_debug('Insert_Details: ' || 'after inserting into msc_atp_sd_details_temp');
5502: msc_sch_wb.atp_debug('Insert_Details: ' || 'Total Supply/Demand Recs : '|| SQL%ROWCOUNT);
5503: END IF;
5504:
5505: -- time_phased_atp

Line 5502: msc_sch_wb.atp_debug('Insert_Details: ' || 'Total Supply/Demand Recs : '|| SQL%ROWCOUNT);

5498: END IF;
5499:
5500: IF PG_DEBUG in ('Y', 'C') THEN
5501: msc_sch_wb.atp_debug('Insert_Details: ' || 'after inserting into msc_atp_sd_details_temp');
5502: msc_sch_wb.atp_debug('Insert_Details: ' || 'Total Supply/Demand Recs : '|| SQL%ROWCOUNT);
5503: END IF;
5504:
5505: -- time_phased_atp
5506: IF l_time_phased_atp = 'Y' THEN

Line 5510: msc_sch_wb.atp_debug('Insert_Details: ' || 'Error occured in procedure Get_Period_Data_From_Sd_Temp');

5506: IF l_time_phased_atp = 'Y' THEN
5507: MSC_ATP_PF.get_period_data_from_SD_temp(x_atp_period, l_return_status);
5508: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5509: IF PG_DEBUG in ('Y', 'C') THEN
5510: msc_sch_wb.atp_debug('Insert_Details: ' || 'Error occured in procedure Get_Period_Data_From_Sd_Temp');
5511: END IF;
5512: RAISE FND_API.G_EXC_ERROR;
5513: END IF;
5514: ELSE

Line 5521: msc_sch_wb.atp_debug('Insert_Details: ' || 'before atp_consume');

5517:
5518: x_atp_period.Cumulative_Quantity := x_atp_period.Period_Quantity;
5519:
5520: IF PG_DEBUG in ('Y', 'C') THEN
5521: msc_sch_wb.atp_debug('Insert_Details: ' || 'before atp_consume');
5522: END IF;
5523:
5524: -- time_phased_atp changes begin
5525: Print_Dates_Qtys(x_atp_period.Period_Start_Date, x_atp_period.Cumulative_Quantity);

Line 5536: msc_sch_wb.atp_debug('Insert_Details: ' || 'Error occured in procedure pf_atp_consume');

5532: MSC_ATP_PF.Bw_Fw_Cum, --b/w, f/w consumption and accumulation
5533: p_atf_date);
5534: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5535: IF PG_DEBUG in ('Y', 'C') THEN
5536: msc_sch_wb.atp_debug('Insert_Details: ' || 'Error occured in procedure pf_atp_consume');
5537: END IF;
5538: RAISE FND_API.G_EXC_ERROR;
5539: END IF;
5540: -- time_phased_atp changes end

Line 5547: msc_sch_wb.atp_debug('Insert_Details: ' || 'after atp_consume');

5543: x_atp_period.Cumulative_Quantity.COUNT);
5544: END IF;
5545:
5546: IF PG_DEBUG in ('Y', 'C') THEN
5547: msc_sch_wb.atp_debug('Insert_Details: ' || 'after atp_consume');
5548: END IF;
5549:
5550: /* Cum drop issue changes begin*/
5551: MSC_AATP_PROC.Atp_Remove_Negatives(x_atp_period.Cumulative_Quantity, l_return_status);

Line 5554: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');

5550: /* Cum drop issue changes begin*/
5551: MSC_AATP_PROC.Atp_Remove_Negatives(x_atp_period.Cumulative_Quantity, l_return_status);
5552: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
5553: IF PG_DEBUG in ('Y', 'C') THEN
5554: msc_sch_wb.atp_debug('Get_Material_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');
5555: END IF;
5556: RAISE FND_API.G_EXC_ERROR;
5557: END IF;
5558: /* Cum drop issue changes end*/

Line 5578: msc_sch_wb.atp_debug('***** End Insert_Details Procedure *****');

5574:
5575: END IF;
5576:
5577: IF PG_DEBUG in ('Y', 'C') THEN
5578: msc_sch_wb.atp_debug('***** End Insert_Details Procedure *****');
5579: END IF;
5580:
5581: END Insert_Details;
5582:

Line 5732: msc_sch_wb.atp_debug('***** Begin Get_Res_Requirements Procedure *****');

5728: l_touch_time NUMBER; --5093604
5729:
5730: BEGIN
5731: IF PG_DEBUG in ('Y', 'C') THEN
5732: msc_sch_wb.atp_debug('***** Begin Get_Res_Requirements Procedure *****');
5733: END IF;
5734: -- initialize API return status to success
5735: x_return_status := FND_API.G_RET_STS_SUCCESS;
5736: l_uom_code := NVL(fnd_profile.value('MSC:HOUR_UOM_CODE'),

Line 5740: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'mso batchable flag := ' || l_MSO_Batch_flag );

5736: l_uom_code := NVL(fnd_profile.value('MSC:HOUR_UOM_CODE'),
5737: fnd_profile.value('BOM:HOUR_UOM_CODE'));
5738: l_MSO_Batch_flag := NVL(fnd_profile.value('MSO_BATCHABLE_FLAG'),'N');
5739: IF PG_DEBUG in ('Y', 'C') THEN
5740: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'mso batchable flag := ' || l_MSO_Batch_flag );
5741: END IF;
5742:
5743: -- 3027711
5744: -- for performance reason, we need to get the following info and

Line 5836: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_bor = '||l_use_bor);

5832: l_constraint_plan := 0;
5833: END;
5834:
5835: IF PG_DEBUG in ('Y', 'C') THEN
5836: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_bor = '||l_use_bor);
5837: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_OPTIMIZED_PLAN = '||MSC_ATP_PVT.G_OPTIMIZED_PLAN);
5838: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_constaint_plan =' || l_constraint_plan);
5839: END IF;
5840: IF (l_MSO_Batch_Flag = 'Y') and (l_use_bor = 0) and (l_constraint_plan = 1) THEN

Line 5837: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_OPTIMIZED_PLAN = '||MSC_ATP_PVT.G_OPTIMIZED_PLAN);

5833: END;
5834:
5835: IF PG_DEBUG in ('Y', 'C') THEN
5836: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_bor = '||l_use_bor);
5837: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_OPTIMIZED_PLAN = '||MSC_ATP_PVT.G_OPTIMIZED_PLAN);
5838: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_constaint_plan =' || l_constraint_plan);
5839: END IF;
5840: IF (l_MSO_Batch_Flag = 'Y') and (l_use_bor = 0) and (l_constraint_plan = 1) THEN
5841: IF PG_DEBUG in ('Y', 'C') THEN

Line 5838: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_constaint_plan =' || l_constraint_plan);

5834:
5835: IF PG_DEBUG in ('Y', 'C') THEN
5836: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_bor = '||l_use_bor);
5837: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_OPTIMIZED_PLAN = '||MSC_ATP_PVT.G_OPTIMIZED_PLAN);
5838: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_constaint_plan =' || l_constraint_plan);
5839: END IF;
5840: IF (l_MSO_Batch_Flag = 'Y') and (l_use_bor = 0) and (l_constraint_plan = 1) THEN
5841: IF PG_DEBUG in ('Y', 'C') THEN
5842: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Do Batching');

Line 5842: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Do Batching');

5838: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_constaint_plan =' || l_constraint_plan);
5839: END IF;
5840: IF (l_MSO_Batch_Flag = 'Y') and (l_use_bor = 0) and (l_constraint_plan = 1) THEN
5841: IF PG_DEBUG in ('Y', 'C') THEN
5842: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Do Batching');
5843: END IF;
5844: l_use_batching := 1;
5845: ELSE
5846: IF PG_DEBUG in ('Y', 'C') THEN

Line 5847: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'No Batching');

5843: END IF;
5844: l_use_batching := 1;
5845: ELSE
5846: IF PG_DEBUG in ('Y', 'C') THEN
5847: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'No Batching');
5848: END IF;
5849: l_use_batching := 0;
5850: END IF;
5851: IF PG_DEBUG in ('Y', 'C') THEN

Line 5852: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching =' || l_use_batching);

5848: END IF;
5849: l_use_batching := 0;
5850: END IF;
5851: IF PG_DEBUG in ('Y', 'C') THEN
5852: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching =' || l_use_batching);
5853: END IF;
5854:
5855: -- Check if full summary has been run - for summary enhancement
5856: IF MSC_ATP_PVT.G_SUMMARY_FLAG = 'Y' AND

Line 5869: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_uom_code = ' || l_uom_code);

5865:
5866: l_null_atp_period := x_atp_period;
5867: l_null_atp_supply_demand := x_atp_supply_demand;
5868: IF PG_DEBUG in ('Y', 'C') THEN
5869: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_uom_code = ' || l_uom_code);
5870: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_insert_flag = '||p_insert_flag);
5871: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_instance_id = '||p_instance_id);
5872: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_plan_id = '||p_plan_id);
5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);

Line 5870: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_insert_flag = '||p_insert_flag);

5866: l_null_atp_period := x_atp_period;
5867: l_null_atp_supply_demand := x_atp_supply_demand;
5868: IF PG_DEBUG in ('Y', 'C') THEN
5869: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_uom_code = ' || l_uom_code);
5870: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_insert_flag = '||p_insert_flag);
5871: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_instance_id = '||p_instance_id);
5872: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_plan_id = '||p_plan_id);
5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);
5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);

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

5867: l_null_atp_supply_demand := x_atp_supply_demand;
5868: IF PG_DEBUG in ('Y', 'C') THEN
5869: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_uom_code = ' || l_uom_code);
5870: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_insert_flag = '||p_insert_flag);
5871: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_instance_id = '||p_instance_id);
5872: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_plan_id = '||p_plan_id);
5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);
5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);

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

5868: IF PG_DEBUG in ('Y', 'C') THEN
5869: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_uom_code = ' || l_uom_code);
5870: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_insert_flag = '||p_insert_flag);
5871: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_instance_id = '||p_instance_id);
5872: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_plan_id = '||p_plan_id);
5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);
5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);

Line 5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);

5869: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_uom_code = ' || l_uom_code);
5870: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_insert_flag = '||p_insert_flag);
5871: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_instance_id = '||p_instance_id);
5872: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_plan_id = '||p_plan_id);
5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);
5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);
5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);

Line 5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);

5870: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_insert_flag = '||p_insert_flag);
5871: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_instance_id = '||p_instance_id);
5872: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_plan_id = '||p_plan_id);
5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);
5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);
5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);

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

5871: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_instance_id = '||p_instance_id);
5872: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_plan_id = '||p_plan_id);
5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);
5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);
5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);

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

5872: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_plan_id = '||p_plan_id);
5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);
5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);
5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);
5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);

Line 5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);

5873: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_level = '||p_level);
5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);
5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);
5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);
5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);

Line 5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);

5874: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);
5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);
5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);
5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);
5882: -- Then add the latest parameter

Line 5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);

5875: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);
5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);
5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);
5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);
5882: -- Then add the latest parameter
5883: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_bill_seq_id = '|| p_bill_seq_id);

Line 5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);

5876: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_organization_id = '||p_organization_id);
5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);
5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);
5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);
5882: -- Then add the latest parameter
5883: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_bill_seq_id = '|| p_bill_seq_id);
5884: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_ship_date = '|| p_parent_ship_date);

Line 5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);

5877: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
5878: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);
5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);
5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);
5882: -- Then add the latest parameter
5883: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_bill_seq_id = '|| p_bill_seq_id);
5884: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_ship_date = '|| p_parent_ship_date);
5885: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_line_identifier = '|| p_line_identifier);

Line 5883: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_bill_seq_id = '|| p_bill_seq_id);

5879: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_requested_date = '||p_requested_date);
5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);
5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);
5882: -- Then add the latest parameter
5883: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_bill_seq_id = '|| p_bill_seq_id);
5884: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_ship_date = '|| p_parent_ship_date);
5885: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_line_identifier = '|| p_line_identifier);
5886: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||
5887: 'MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type= '||

Line 5884: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_ship_date = '|| p_parent_ship_date);

5880: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_refresh_number = '||p_refresh_number);
5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);
5882: -- Then add the latest parameter
5883: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_bill_seq_id = '|| p_bill_seq_id);
5884: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_ship_date = '|| p_parent_ship_date);
5885: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_line_identifier = '|| p_line_identifier);
5886: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||
5887: 'MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type= '||
5888: MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type);

Line 5885: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_line_identifier = '|| p_line_identifier);

5881: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_search = '||p_search);
5882: -- Then add the latest parameter
5883: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_bill_seq_id = '|| p_bill_seq_id);
5884: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_ship_date = '|| p_parent_ship_date);
5885: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_line_identifier = '|| p_line_identifier);
5886: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||
5887: 'MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type= '||
5888: MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type);
5889: --bug3601223

Line 5886: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||

5882: -- Then add the latest parameter
5883: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_bill_seq_id = '|| p_bill_seq_id);
5884: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_parent_ship_date = '|| p_parent_ship_date);
5885: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'p_line_identifier = '|| p_line_identifier);
5886: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||
5887: 'MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type= '||
5888: MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type);
5889: --bug3601223
5890: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_network_scheduling_method = '|| l_network_scheduling_method);

Line 5890: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_network_scheduling_method = '|| l_network_scheduling_method);

5886: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||
5887: 'MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type= '||
5888: MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type);
5889: --bug3601223
5890: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_network_scheduling_method = '|| l_network_scheduling_method);
5891: -- End Bug 2814872
5892: END IF;
5893: --- get msc_lead_time factor
5894: l_mso_lead_time_factor := MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR;

Line 5911: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_fixed_lt = '

5907: --l_item_wt_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.unit_weight;
5908: l_item_vol_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.volume_uom;
5909: l_item_wt_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
5910: IF PG_DEBUG in ('Y', 'C') THEN
5911: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_fixed_lt = '
5912: || l_item_fixed_lt);
5913: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_var_lt = '
5914: || l_item_var_lt);
5915: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_vol = '

Line 5913: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_var_lt = '

5909: l_item_wt_uom := MSC_ATP_PVT.G_ITEM_INFO_REC.weight_uom;
5910: IF PG_DEBUG in ('Y', 'C') THEN
5911: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_fixed_lt = '
5912: || l_item_fixed_lt);
5913: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_var_lt = '
5914: || l_item_var_lt);
5915: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_vol = '
5916: ||l_item_unit_vol);
5917: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_wt = '

Line 5915: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_vol = '

5911: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_fixed_lt = '
5912: || l_item_fixed_lt);
5913: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_var_lt = '
5914: || l_item_var_lt);
5915: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_vol = '
5916: ||l_item_unit_vol);
5917: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_wt = '
5918: ||l_item_unit_wt);
5919: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_wt_uom = '

Line 5917: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_wt = '

5913: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_var_lt = '
5914: || l_item_var_lt);
5915: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_vol = '
5916: ||l_item_unit_vol);
5917: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_wt = '
5918: ||l_item_unit_wt);
5919: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_wt_uom = '
5920: ||l_item_wt_uom);
5921: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_vol_uom = '

Line 5919: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_wt_uom = '

5915: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_vol = '
5916: ||l_item_unit_vol);
5917: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_wt = '
5918: ||l_item_unit_wt);
5919: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_wt_uom = '
5920: ||l_item_wt_uom);
5921: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_vol_uom = '
5922: ||l_item_vol_uom);
5923: END IF;

Line 5921: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_vol_uom = '

5917: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_unit_wt = '
5918: ||l_item_unit_wt);
5919: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_wt_uom = '
5920: ||l_item_wt_uom);
5921: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_vol_uom = '
5922: ||l_item_vol_uom);
5923: END IF;
5924: -- End Bug 3432530
5925: IF MSC_ATP_PVT.G_ITEM_INFO_REC.bom_item_type in (1, 2) THEN

Line 5959: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_parent_line_id= '|| l_parent_line_id);

5955: ELSE
5956: l_routing_seq_id := p_routing_seq_id;
5957: END IF;
5958: IF PG_DEBUG in ('Y', 'C') THEN
5959: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_parent_line_id= '|| l_parent_line_id);
5960: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_inventory_item_id= '|| l_inventory_item_id);
5961: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_routing_sequence_id= '|| l_routing_seq_id);
5962: END IF;
5963: -- End CTO Option Dependent Resources ODR

Line 5960: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_inventory_item_id= '|| l_inventory_item_id);

5956: l_routing_seq_id := p_routing_seq_id;
5957: END IF;
5958: IF PG_DEBUG in ('Y', 'C') THEN
5959: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_parent_line_id= '|| l_parent_line_id);
5960: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_inventory_item_id= '|| l_inventory_item_id);
5961: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_routing_sequence_id= '|| l_routing_seq_id);
5962: END IF;
5963: -- End CTO Option Dependent Resources ODR
5964: -- 3027711 moved getting item/org info to beginning

Line 5961: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_routing_sequence_id= '|| l_routing_seq_id);

5957: END IF;
5958: IF PG_DEBUG in ('Y', 'C') THEN
5959: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_parent_line_id= '|| l_parent_line_id);
5960: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_inventory_item_id= '|| l_inventory_item_id);
5961: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_routing_sequence_id= '|| l_routing_seq_id);
5962: END IF;
5963: -- End CTO Option Dependent Resources ODR
5964: -- 3027711 moved getting item/org info to beginning
5965:

Line 5968: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'not using BOR');

5964: -- 3027711 moved getting item/org info to beginning
5965:
5966: IF (l_use_bor <> 1) THEN
5967: IF PG_DEBUG in ('Y', 'C') THEN
5968: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'not using BOR');
5969: END IF;
5970: -- get resource requirements
5971: -- OSFM changes
5972: l_inventory_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id;

Line 5994: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'cfm_routing_flag= '|| l_routing_type);

5990: END;
5991:
5992:
5993: IF PG_DEBUG in ('Y', 'C') THEN
5994: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'cfm_routing_flag= '|| l_routing_type);
5995: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'routing sequence id = ' || l_routing_number);
5996: END IF;
5997: IF l_routing_type = 3 THEN --- network routing
5998:

Line 5995: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'routing sequence id = ' || l_routing_number);

5991:
5992:
5993: IF PG_DEBUG in ('Y', 'C') THEN
5994: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'cfm_routing_flag= '|| l_routing_type);
5995: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'routing sequence id = ' || l_routing_number);
5996: END IF;
5997: IF l_routing_type = 3 THEN --- network routing
5998:
5999: -- CTO Option Dependent Resources

Line 7371: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'using BOR');

7367: END IF; ---- If l_routing_flag = 3 THEN
7368: ELSE
7369:
7370: IF PG_DEBUG in ('Y', 'C') THEN
7371: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'using BOR');
7372: END IF;
7373:
7374: -- Added on 01/09/2001 by ngoel for performance improvement
7375: /* Modularize Item and Org Info */

Line 7379: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Modular change l_inv_item_id : '||l_inv_item_id);

7375: /* Modularize Item and Org Info */
7376: l_inv_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id;
7377: /* Modularize Item and Org Info */
7378: IF PG_DEBUG in ('Y', 'C') THEN
7379: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Modular change l_inv_item_id : '||l_inv_item_id);
7380: END IF;
7381:
7382: SELECT b.department_id,
7383: dr.owning_department_id,

Line 7481: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'After getting resource information');

7477:
7478:
7479: END IF;
7480: IF PG_DEBUG in ('Y', 'C') THEN
7481: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'After getting resource information');
7482: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||
7483: 'l_res_requirements.resource_id.COUNT ' || l_res_requirements.resource_id.COUNT);
7484: END IF;
7485: -- go over each resource

Line 7482: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||

7478:
7479: END IF;
7480: IF PG_DEBUG in ('Y', 'C') THEN
7481: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'After getting resource information');
7482: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||
7483: 'l_res_requirements.resource_id.COUNT ' || l_res_requirements.resource_id.COUNT);
7484: END IF;
7485: -- go over each resource
7486: j := l_res_requirements.resource_id.FIRST;

Line 7502: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date := ' || x_atp_date);

7498:
7499: -- Initialize l_infinite_time_fence_date, since this is pds,
7500: -- use planning's cutoff date as the infinite time fence date
7501: IF PG_DEBUG in ('Y', 'C') THEN
7502: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date := ' || x_atp_date);
7503: END IF;
7504: IF j IS NOT NULL THEN
7505: ---bug 2341075: read plan start date
7506:

Line 7519: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Plan Start Date := ' || l_plan_start_date );

7515: l_plan_start_date := MSC_ATP_PVT.G_PLAN_INFO_REC.plan_start_date;
7516: --l_infinite_time_fence_date := MSC_ATP_PVT.G_PLAN_INFO_REC.curr_cutoff_date; (ssurendr) Bug 2865389
7517: l_infinite_time_fence_date := MSC_ATP_PVT.G_PLAN_INFO_REC.plan_cutoff_date;
7518: IF PG_DEBUG in ('Y', 'C') THEN
7519: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Plan Start Date := ' || l_plan_start_date );
7520: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Infinite Time Fence := ' ||
7521: l_infinite_time_fence_date );
7522: END IF;
7523: -- End Supplier Capacity and Lead Time Proj

Line 7520: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Infinite Time Fence := ' ||

7516: --l_infinite_time_fence_date := MSC_ATP_PVT.G_PLAN_INFO_REC.curr_cutoff_date; (ssurendr) Bug 2865389
7517: l_infinite_time_fence_date := MSC_ATP_PVT.G_PLAN_INFO_REC.plan_cutoff_date;
7518: IF PG_DEBUG in ('Y', 'C') THEN
7519: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Plan Start Date := ' || l_plan_start_date );
7520: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Infinite Time Fence := ' ||
7521: l_infinite_time_fence_date );
7522: END IF;
7523: -- End Supplier Capacity and Lead Time Proj
7524:

Line 7549: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_assembly_quantity := ' || l_assembly_quantity);

7545: l_assembly_quantity := 1;
7546: END;
7547: END IF;
7548: IF PG_DEBUG in ('Y', 'C') THEN
7549: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_assembly_quantity := ' || l_assembly_quantity);
7550: END IF;
7551:
7552:
7553: --// BUG 2313497, 2126520

Line 7585: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Resource Id := ' ||

7581: l_resource_id,
7582: l_department_id );
7583:
7584: IF PG_DEBUG in ('Y', 'C') THEN
7585: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Resource Id := ' ||
7586: l_resource_id);
7587: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Infinite Time Fence := '
7588: || l_infinite_time_fence_date );
7589: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Plan Cutoff Date := ' ||

Line 7587: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Infinite Time Fence := '

7583:
7584: IF PG_DEBUG in ('Y', 'C') THEN
7585: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Resource Id := ' ||
7586: l_resource_id);
7587: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Infinite Time Fence := '
7588: || l_infinite_time_fence_date );
7589: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Plan Cutoff Date := ' ||
7590: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_cutoff_date);
7591: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ATP RULE NAME for Resource := '

Line 7589: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Plan Cutoff Date := ' ||

7585: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Resource Id := ' ||
7586: l_resource_id);
7587: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Infinite Time Fence := '
7588: || l_infinite_time_fence_date );
7589: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Plan Cutoff Date := ' ||
7590: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_cutoff_date);
7591: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ATP RULE NAME for Resource := '
7592: || l_atp_rule_name );
7593: END IF;

Line 7591: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ATP RULE NAME for Resource := '

7587: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Infinite Time Fence := '
7588: || l_infinite_time_fence_date );
7589: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Plan Cutoff Date := ' ||
7590: MSC_ATP_PVT.G_PLAN_INFO_REC.plan_cutoff_date);
7591: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ATP RULE NAME for Resource := '
7592: || l_atp_rule_name );
7593: END IF;
7594: -- Bug 3036513
7595:

Line 7628: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Setting the Lead time 0 for forward case');

7624: l_requested_date := p_requested_date;
7625: l_lead_time := 0;
7626:
7627: IF PG_DEBUG in ('Y', 'C') THEN
7628: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Setting the Lead time 0 for forward case');
7629: END IF;
7630: ELSE
7631: -- Check the the start date of the next resource and
7632: -- Use it as End date of current resource by

Line 7640: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'h = ' || h);

7636: -- start date is less then current resource's start date.
7637: For h in j+1..res_count
7638: LOOP
7639: IF PG_DEBUG in ('Y', 'C') THEN
7640: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'h = ' || h);
7641: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'J' ||l_res_requirements.requested_date(j));
7642: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'H' ||l_res_requirements.requested_date(h));
7643: END IF;
7644: IF l_res_requirements.requested_date(j)

Line 7641: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'J' ||l_res_requirements.requested_date(j));

7637: For h in j+1..res_count
7638: LOOP
7639: IF PG_DEBUG in ('Y', 'C') THEN
7640: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'h = ' || h);
7641: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'J' ||l_res_requirements.requested_date(j));
7642: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'H' ||l_res_requirements.requested_date(h));
7643: END IF;
7644: IF l_res_requirements.requested_date(j)
7645: < l_res_requirements.requested_date(h) THEN

Line 7642: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'H' ||l_res_requirements.requested_date(h));

7638: LOOP
7639: IF PG_DEBUG in ('Y', 'C') THEN
7640: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'h = ' || h);
7641: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'J' ||l_res_requirements.requested_date(j));
7642: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'H' ||l_res_requirements.requested_date(h));
7643: END IF;
7644: IF l_res_requirements.requested_date(j)
7645: < l_res_requirements.requested_date(h) THEN
7646: -- Bug 3348095

Line 7650: msc_sch_wb.atp_debug('Get_Res_Requirements: Init. l_res_start_date ' ||

7646: -- Bug 3348095
7647: -- Assign the Resource start Date
7648: l_res_start_date := l_res_requirements.requested_date(j);
7649: IF PG_DEBUG in ('Y', 'C') THEN
7650: msc_sch_wb.atp_debug('Get_Res_Requirements: Init. l_res_start_date ' ||
7651: l_res_start_date);
7652: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || l_res_requirements.requested_date(h));
7653: END IF;
7654: -- Bug 3348095

Line 7652: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || l_res_requirements.requested_date(h));

7648: l_res_start_date := l_res_requirements.requested_date(j);
7649: IF PG_DEBUG in ('Y', 'C') THEN
7650: msc_sch_wb.atp_debug('Get_Res_Requirements: Init. l_res_start_date ' ||
7651: l_res_start_date);
7652: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || l_res_requirements.requested_date(h));
7653: END IF;
7654: -- Bug 3348095
7655: l_lead_time := l_res_requirements.lead_time(h);
7656: l_requested_date := l_res_requirements.requested_date(h);

Line 7658: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Next Date found..Exiting');

7654: -- Bug 3348095
7655: l_lead_time := l_res_requirements.lead_time(h);
7656: l_requested_date := l_res_requirements.requested_date(h);
7657: IF PG_DEBUG in ('Y', 'C') THEN
7658: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Next Date found..Exiting');
7659: END IF;
7660: EXIT;
7661: ELSIF h = res_count THEN
7662: l_requested_date := p_requested_date;

Line 7678: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Requested Date: ' ||l_res_requirements.requested_date(j));

7674:
7675: -- Bug 3494178, need to reset l_res_requirements.requested_date(j) same as l_requested_date
7676: l_res_requirements.requested_date(j) := l_requested_date;
7677:
7678: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Requested Date: ' ||l_res_requirements.requested_date(j));
7679:
7680: IF PG_DEBUG in ('Y', 'C') THEN
7681: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Resource Lead time:' || l_lead_time);
7682: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date:'|| l_requested_date);

Line 7681: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Resource Lead time:' || l_lead_time);

7677:
7678: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Requested Date: ' ||l_res_requirements.requested_date(j));
7679:
7680: IF PG_DEBUG in ('Y', 'C') THEN
7681: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Resource Lead time:' || l_lead_time);
7682: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date:'|| l_requested_date);
7683: END IF;
7684:
7685: -- 1610561

Line 7682: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date:'|| l_requested_date);

7678: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New Requested Date: ' ||l_res_requirements.requested_date(j));
7679:
7680: IF PG_DEBUG in ('Y', 'C') THEN
7681: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Resource Lead time:' || l_lead_time);
7682: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date:'|| l_requested_date);
7683: END IF;
7684:
7685: -- 1610561
7686: -- l_resource_id := l_res_requirements.resource_id(j);

Line 7713: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'batch flag back to null');

7709: If (l_batchable_flag <> 1 ) OR (l_use_batching <> 1) THEN
7710: --- if item is not batchable or batching is not done then
7711: -- set the std_op_code back to null
7712: IF PG_DEBUG in ('Y', 'C') THEN
7713: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'batch flag back to null');
7714: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Dont do batching');
7715: END IF;
7716: l_batchable_flag := 2;
7717: --l_use_batching := 0;

Line 7714: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Dont do batching');

7710: --- if item is not batchable or batching is not done then
7711: -- set the std_op_code back to null
7712: IF PG_DEBUG in ('Y', 'C') THEN
7713: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'batch flag back to null');
7714: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Dont do batching');
7715: END IF;
7716: l_batchable_flag := 2;
7717: --l_use_batching := 0;
7718: END IF;

Line 7724: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'j := '||j);

7720: l_atp_period := l_null_atp_period;
7721: l_atp_supply_demand := l_null_atp_supply_demand;
7722:
7723: IF PG_DEBUG in ('Y', 'C') THEN
7724: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'j := '||j);
7725: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_id := '||l_resource_id);
7726: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_department_id := '||l_department_id);
7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);
7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);

Line 7725: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_id := '||l_resource_id);

7721: l_atp_supply_demand := l_null_atp_supply_demand;
7722:
7723: IF PG_DEBUG in ('Y', 'C') THEN
7724: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'j := '||j);
7725: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_id := '||l_resource_id);
7726: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_department_id := '||l_department_id);
7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);
7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);
7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);

Line 7726: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_department_id := '||l_department_id);

7722:
7723: IF PG_DEBUG in ('Y', 'C') THEN
7724: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'j := '||j);
7725: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_id := '||l_resource_id);
7726: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_department_id := '||l_department_id);
7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);
7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);
7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);
7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);

Line 7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);

7723: IF PG_DEBUG in ('Y', 'C') THEN
7724: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'j := '||j);
7725: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_id := '||l_resource_id);
7726: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_department_id := '||l_department_id);
7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);
7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);
7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);
7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);
7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);

Line 7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);

7724: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'j := '||j);
7725: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_id := '||l_resource_id);
7726: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_department_id := '||l_department_id);
7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);
7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);
7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);
7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);
7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);
7732: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag := '||l_batchable_flag);

Line 7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);

7725: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_id := '||l_resource_id);
7726: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_department_id := '||l_department_id);
7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);
7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);
7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);
7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);
7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);
7732: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag := '||l_batchable_flag);
7733: -- ODR

Line 7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);

7726: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_department_id := '||l_department_id);
7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);
7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);
7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);
7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);
7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);
7732: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag := '||l_batchable_flag);
7733: -- ODR
7734: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_op_seq_num := '||l_op_seq_num);

Line 7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);

7727: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date := '||l_requested_date);
7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);
7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);
7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);
7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);
7732: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag := '||l_batchable_flag);
7733: -- ODR
7734: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_op_seq_num := '||l_op_seq_num);
7735: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Offset % := '

Line 7732: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag := '||l_batchable_flag);

7728: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_resource_usage := '||l_resource_usage);
7729: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type := '||l_basis_type);
7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);
7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);
7732: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag := '||l_batchable_flag);
7733: -- ODR
7734: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_op_seq_num := '||l_op_seq_num);
7735: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Offset % := '
7736: ||l_res_requirements.resource_offset_percent(j));

Line 7734: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_op_seq_num := '||l_op_seq_num);

7730: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_efficiency := '||l_efficiency);
7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);
7732: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag := '||l_batchable_flag);
7733: -- ODR
7734: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_op_seq_num := '||l_op_seq_num);
7735: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Offset % := '
7736: ||l_res_requirements.resource_offset_percent(j));
7737: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Lead Time := '
7738: ||l_res_requirements.lead_time(j));

Line 7735: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Offset % := '

7731: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_utilization := '||l_utilization);
7732: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag := '||l_batchable_flag);
7733: -- ODR
7734: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_op_seq_num := '||l_op_seq_num);
7735: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Offset % := '
7736: ||l_res_requirements.resource_offset_percent(j));
7737: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Lead Time := '
7738: ||l_res_requirements.lead_time(j));
7739: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Actual Resource_Usage := '

Line 7737: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Lead Time := '

7733: -- ODR
7734: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_op_seq_num := '||l_op_seq_num);
7735: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Offset % := '
7736: ||l_res_requirements.resource_offset_percent(j));
7737: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Lead Time := '
7738: ||l_res_requirements.lead_time(j));
7739: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Actual Resource_Usage := '
7740: ||l_res_requirements.actual_resource_usage(j));
7741: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Reverse Cum Yield := '

Line 7739: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Actual Resource_Usage := '

7735: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Offset % := '
7736: ||l_res_requirements.resource_offset_percent(j));
7737: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Lead Time := '
7738: ||l_res_requirements.lead_time(j));
7739: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Actual Resource_Usage := '
7740: ||l_res_requirements.actual_resource_usage(j));
7741: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Reverse Cum Yield := '
7742: ||l_res_requirements.reverse_cumulative_yield(j));
7743: END IF;

Line 7741: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Reverse Cum Yield := '

7737: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Lead Time := '
7738: ||l_res_requirements.lead_time(j));
7739: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Actual Resource_Usage := '
7740: ||l_res_requirements.actual_resource_usage(j));
7741: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Reverse Cum Yield := '
7742: ||l_res_requirements.reverse_cumulative_yield(j));
7743: END IF;
7744: --- resource batching
7745: IF PG_DEBUG in ('Y', 'C') THEN

Line 7746: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_max_capacity = '|| l_max_capacity);

7742: ||l_res_requirements.reverse_cumulative_yield(j));
7743: END IF;
7744: --- resource batching
7745: IF PG_DEBUG in ('Y', 'C') THEN
7746: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_max_capacity = '|| l_max_capacity);
7747: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = '|| l_batchable_flag);
7748: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_unit_capacity = '||l_req_unit_capacity);
7749: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_capacity_uom = ' || l_req_capacity_uom);
7750: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'UOM type := ' || l_UOM_type);

Line 7747: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = '|| l_batchable_flag);

7743: END IF;
7744: --- resource batching
7745: IF PG_DEBUG in ('Y', 'C') THEN
7746: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_max_capacity = '|| l_max_capacity);
7747: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = '|| l_batchable_flag);
7748: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_unit_capacity = '||l_req_unit_capacity);
7749: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_capacity_uom = ' || l_req_capacity_uom);
7750: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'UOM type := ' || l_UOM_type);
7751: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_uom := '|| l_res_uom);

Line 7748: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_unit_capacity = '||l_req_unit_capacity);

7744: --- resource batching
7745: IF PG_DEBUG in ('Y', 'C') THEN
7746: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_max_capacity = '|| l_max_capacity);
7747: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = '|| l_batchable_flag);
7748: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_unit_capacity = '||l_req_unit_capacity);
7749: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_capacity_uom = ' || l_req_capacity_uom);
7750: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'UOM type := ' || l_UOM_type);
7751: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_uom := '|| l_res_uom);
7752: END IF;

Line 7749: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_capacity_uom = ' || l_req_capacity_uom);

7745: IF PG_DEBUG in ('Y', 'C') THEN
7746: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_max_capacity = '|| l_max_capacity);
7747: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = '|| l_batchable_flag);
7748: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_unit_capacity = '||l_req_unit_capacity);
7749: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_capacity_uom = ' || l_req_capacity_uom);
7750: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'UOM type := ' || l_UOM_type);
7751: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_uom := '|| l_res_uom);
7752: END IF;
7753:

Line 7750: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'UOM type := ' || l_UOM_type);

7746: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_max_capacity = '|| l_max_capacity);
7747: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = '|| l_batchable_flag);
7748: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_unit_capacity = '||l_req_unit_capacity);
7749: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_capacity_uom = ' || l_req_capacity_uom);
7750: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'UOM type := ' || l_UOM_type);
7751: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_uom := '|| l_res_uom);
7752: END IF;
7753:
7754: --- get conversion rate for resource

Line 7751: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_uom := '|| l_res_uom);

7747: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = '|| l_batchable_flag);
7748: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_unit_capacity = '||l_req_unit_capacity);
7749: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_req_capacity_uom = ' || l_req_capacity_uom);
7750: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'UOM type := ' || l_UOM_type);
7751: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_uom := '|| l_res_uom);
7752: END IF;
7753:
7754: --- get conversion rate for resource
7755: IF ((l_batchable_flag = 1) and (l_use_batching = 1)) THEN

Line 7784: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_conversion_rate := ' || l_item_conversion_rate);

7780: END;
7781:
7782: END IF;
7783: IF PG_DEBUG in ('Y', 'C') THEN
7784: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_conversion_rate := ' || l_item_conversion_rate);
7785: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_conversion_rate := ' || l_res_conversion_rate);
7786: END IF;
7787:
7788: --diag_atp

Line 7785: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_conversion_rate := ' || l_res_conversion_rate);

7781:
7782: END IF;
7783: IF PG_DEBUG in ('Y', 'C') THEN
7784: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_item_conversion_rate := ' || l_item_conversion_rate);
7785: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_conversion_rate := ' || l_res_conversion_rate);
7786: END IF;
7787:
7788: --diag_atp
7789: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 and p_search = 1 THEN

Line 7793: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Batching quantity, diagnostic atp');

7789: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 and p_search = 1 THEN
7790:
7791: IF ((l_batchable_flag = 1) and (l_use_batching = 1)) then
7792: IF PG_DEBUG in ('Y', 'C') THEN
7793: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Batching quantity, diagnostic atp');
7794: END IF;
7795: l_requested_res_qty := (l_resource_usage * l_req_unit_capacity * p_requested_quantity)
7796: * (l_item_conversion_rate )/(l_efficiency * l_utilization * l_assembly_quantity);
7797: ELSIF l_basis_type in (1,3) THEN --4694958

Line 7799: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Basis type 1,3 qty, diagnostic ATP'); --4694958

7795: l_requested_res_qty := (l_resource_usage * l_req_unit_capacity * p_requested_quantity)
7796: * (l_item_conversion_rate )/(l_efficiency * l_utilization * l_assembly_quantity);
7797: ELSIF l_basis_type in (1,3) THEN --4694958
7798: IF PG_DEBUG in ('Y', 'C') THEN
7799: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Basis type 1,3 qty, diagnostic ATP'); --4694958
7800: END IF;
7801: l_requested_res_qty := (l_resource_usage * p_requested_quantity)/
7802: (l_efficiency * l_utilization * l_assembly_quantity);
7803: ELSIF l_basis_type = 2 THEN

Line 7805: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Basis type 2 qty, diagnostic ATP');

7801: l_requested_res_qty := (l_resource_usage * p_requested_quantity)/
7802: (l_efficiency * l_utilization * l_assembly_quantity);
7803: ELSIF l_basis_type = 2 THEN
7804: IF PG_DEBUG in ('Y', 'C') THEN
7805: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Basis type 2 qty, diagnostic ATP');
7806: END IF;
7807: --bug 3766202: do not inflate the resource in case of pure lot base resource
7808: ---(no batching) as ATP doesn't consider batch size
7809: l_requested_res_qty := l_resource_usage/

Line 7817: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Batching quantity');

7813:
7814: ELSE
7815: IF ((l_batchable_flag = 1) and (l_use_batching = 1)) then
7816: IF PG_DEBUG in ('Y', 'C') THEN
7817: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Batching quantity');
7818: END IF;
7819: l_requested_res_qty := (l_resource_usage * l_req_unit_capacity * x_avail_assembly_qty)
7820: * (l_item_conversion_rate )/(l_efficiency * l_utilization * l_assembly_quantity);
7821: ELSIF l_basis_type in (1,3) THEN --4694958

Line 7823: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Basis type 1,3 qty'); --4694958

7819: l_requested_res_qty := (l_resource_usage * l_req_unit_capacity * x_avail_assembly_qty)
7820: * (l_item_conversion_rate )/(l_efficiency * l_utilization * l_assembly_quantity);
7821: ELSIF l_basis_type in (1,3) THEN --4694958
7822: IF PG_DEBUG in ('Y', 'C') THEN
7823: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Basis type 1,3 qty'); --4694958
7824: END IF;
7825: l_requested_res_qty := (l_resource_usage * x_avail_assembly_qty)/
7826: (l_efficiency * l_utilization * l_assembly_quantity);
7827: ELSIF l_basis_type = 2 THEN

Line 7829: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Basis type 2 qty');

7825: l_requested_res_qty := (l_resource_usage * x_avail_assembly_qty)/
7826: (l_efficiency * l_utilization * l_assembly_quantity);
7827: ELSIF l_basis_type = 2 THEN
7828: IF PG_DEBUG in ('Y', 'C') THEN
7829: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Basis type 2 qty');
7830: END IF;
7831: --bug 3766202: do not inflate the resource in case of pure lot base resource
7832: ---(no batching) as ATP doesn't consider batch size
7833: l_requested_res_qty := l_resource_usage/

Line 7840: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_res_qty := '||l_requested_res_qty);

7836: --diag_atp
7837: END IF; --IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 and p_search = 1 THEN
7838:
7839: IF PG_DEBUG in ('Y', 'C') THEN
7840: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_res_qty := '||l_requested_res_qty);
7841: END IF;
7842:
7843: -- we need to have a branch here for allocated atp
7844: -- Bug 2372577 . Check value of profile option : krajan

Line 7892: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'MSC_ATP_PVT.G_ATP_DEMAND_CLASS := ' || MSC_ATP_PVT.G_ATP_DEMAND_CLASS);

7888: ELSE -- of G_ALLOCATED_ATP
7889: -- we are using allocated atp
7890: -- Begin Bug 2424357
7891: IF PG_DEBUG in ('Y', 'C') THEN
7892: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'MSC_ATP_PVT.G_ATP_DEMAND_CLASS := ' || MSC_ATP_PVT.G_ATP_DEMAND_CLASS);
7893: END IF;
7894: l_demand_Class := MSC_AATP_FUNC.Get_Res_Hierarchy_demand_class(
7895: MSC_ATP_PVT.G_PARTNER_ID,
7896: MSC_ATP_PVT.G_PARTNER_SITE_ID,

Line 7908: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_demand_Class := '|| l_demand_Class);

7904:
7905: --diag_atp
7906: l_allocation_rule_name := MSC_ATP_PVT.G_ALLOCATION_RULE_NAME;
7907: IF PG_DEBUG in ('Y', 'C') THEN
7908: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_demand_Class := '|| l_demand_Class);
7909: END IF;
7910: -- End Bug 2424357
7911:
7912: MSC_AATP_PVT.Res_Alloc_Cum_Atp(p_plan_id,

Line 7940: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_period_tab.count='||l_atp_period_tab.COUNT);

7936:
7937: IF l_atp_period_tab.COUNT > 0 THEN
7938:
7939: IF PG_DEBUG in ('Y', 'C') THEN
7940: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_period_tab.count='||l_atp_period_tab.COUNT);
7941: FOR i in 1..l_atp_period_tab.COUNT LOOP
7942: msc_sch_wb.atp_debug('Date '||l_atp_period_tab(i)||' Qty '||
7943: l_atp_qty_tab(i));
7944: END LOOP;

Line 7942: msc_sch_wb.atp_debug('Date '||l_atp_period_tab(i)||' Qty '||

7938:
7939: IF PG_DEBUG in ('Y', 'C') THEN
7940: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_period_tab.count='||l_atp_period_tab.COUNT);
7941: FOR i in 1..l_atp_period_tab.COUNT LOOP
7942: msc_sch_wb.atp_debug('Date '||l_atp_period_tab(i)||' Qty '||
7943: l_atp_qty_tab(i));
7944: END LOOP;
7945: END IF;
7946: l_res_qty_before_ptf := 0;

Line 7948: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_PTF_DATE_THIS_LEVEL := ' || MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL);

7944: END LOOP;
7945: END IF;
7946: l_res_qty_before_ptf := 0;
7947: IF PG_DEBUG in ('Y', 'C') THEN
7948: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_PTF_DATE_THIS_LEVEL := ' || MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL);
7949: END IF;
7950: --bug 2341075: we should not consider any resources available before sysdate.Therefore,
7951: --- we get rid of all the resources availability before sysdate. Before this fix we use to ommit all
7952: --- the resources before pTF. Now we get rid off all resource availability prior to greatest of

Line 7980: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_qty_before_ptf := ' || l_res_qty_before_ptf);

7976: END IF;
7977: END LOOP;
7978: l_res_qty_before_ptf := GREATEST(l_res_qty_before_ptf, 0);
7979: IF PG_DEBUG in ('Y', 'C') THEN
7980: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_qty_before_ptf := ' || l_res_qty_before_ptf);
7981: -- Bug 4108546 Print the value of Index
7982: IF (l_res_ptf_indx IS NOT NULL) THEN
7983: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_ptf_indx := ' || l_res_ptf_indx);
7984: END IF;

Line 7983: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_ptf_indx := ' || l_res_ptf_indx);

7979: IF PG_DEBUG in ('Y', 'C') THEN
7980: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_qty_before_ptf := ' || l_res_qty_before_ptf);
7981: -- Bug 4108546 Print the value of Index
7982: IF (l_res_ptf_indx IS NOT NULL) THEN
7983: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_ptf_indx := ' || l_res_ptf_indx);
7984: END IF;
7985: -- End Bug 4108546
7986: END IF;
7987: IF p_search = 1 THEN -- backward

Line 8001: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);

7997:
7998: ELSE
7999: IF MSC_ATP_PVT.G_RES_CONSUME = 'Y' THEN
8000: IF PG_DEBUG in ('Y', 'C') THEN
8001: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);
8002: END IF;
8003: FOR k IN 1..l_atp_period_tab.COUNT LOOP
8004: IF k < l_atp_period_tab.LAST THEN
8005: l_next_period := l_atp_period_tab(k+1);

Line 8022: msc_sch_wb.atp_debug('Get_Res_Requirements: l_atp_period_tab(k) :' || l_atp_period_tab(k) );

8018: ELSE
8019: l_requested_date_quantity := GREATEST((l_atp_qty_tab(k) - l_res_qty_before_ptf), 0);
8020: END IF;
8021: IF PG_DEBUG in ('Y', 'C') THEN
8022: msc_sch_wb.atp_debug('Get_Res_Requirements: l_atp_period_tab(k) :' || l_atp_period_tab(k) );
8023: msc_sch_wb.atp_debug('Get_Res_Requirements: l_requested_date_quantity :' || l_requested_date_quantity );
8024: END IF;
8025: EXIT;
8026: END IF;

Line 8023: msc_sch_wb.atp_debug('Get_Res_Requirements: l_requested_date_quantity :' || l_requested_date_quantity );

8019: l_requested_date_quantity := GREATEST((l_atp_qty_tab(k) - l_res_qty_before_ptf), 0);
8020: END IF;
8021: IF PG_DEBUG in ('Y', 'C') THEN
8022: msc_sch_wb.atp_debug('Get_Res_Requirements: l_atp_period_tab(k) :' || l_atp_period_tab(k) );
8023: msc_sch_wb.atp_debug('Get_Res_Requirements: l_requested_date_quantity :' || l_requested_date_quantity );
8024: END IF;
8025: EXIT;
8026: END IF;
8027: END LOOP;

Line 8030: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);

8026: END IF;
8027: END LOOP;
8028: ELSE -- IF G_RES_CONSUME = 'N'
8029: IF PG_DEBUG in ('Y', 'C') THEN
8030: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);
8031: END IF;
8032: -- first we initialize the l_requested_date_quantity so that
8033: -- if we cannot find any date that match the requested date,
8034: -- the l_requested_date_quantity is set to 0.

Line 8049: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date_quantity ='||l_requested_date_quantity);

8045:
8046: END IF;
8047:
8048: IF PG_DEBUG in ('Y', 'C') THEN
8049: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date_quantity ='||l_requested_date_quantity);
8050: END IF;
8051:
8052: IF l_requested_date_quantity >= l_requested_res_qty THEN
8053: -- for this resource, we satisfy the resource requirement

Line 8065: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);

8061: --- resource batching: If req_dat_qty < req_qty then we set the avail_qty = 0
8062: IF l_basis_type = 2 OR MSC_ATP_PVT.G_RES_CONSUME = 'N'OR
8063: (l_batchable_flag = 1 AND l_use_batching = 1) THEN
8064: IF PG_DEBUG in ('Y', 'C') THEN
8065: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);
8066: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type = '||l_basis_type);
8067: END IF;
8068: -- this requirement is per lot, so we cannot have any
8069: -- final assembly made

Line 8066: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type = '||l_basis_type);

8062: IF l_basis_type = 2 OR MSC_ATP_PVT.G_RES_CONSUME = 'N'OR
8063: (l_batchable_flag = 1 AND l_use_batching = 1) THEN
8064: IF PG_DEBUG in ('Y', 'C') THEN
8065: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);
8066: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_basis_type = '||l_basis_type);
8067: END IF;
8068: -- this requirement is per lot, so we cannot have any
8069: -- final assembly made
8070: x_avail_assembly_qty :=0;

Line 8088: msc_sch_wb.atp_debug('avail_assembly_qty: ' ||

8084: l_resource_usage,6)); -- 5598066
8085:
8086: -- 2869830
8087: IF PG_DEBUG in ('Y', 'C') THEN
8088: msc_sch_wb.atp_debug('avail_assembly_qty: ' ||
8089: x_avail_assembly_qty);
8090: END IF;
8091: IF l_rounding_flag = 1 THEN
8092: x_avail_assembly_qty := FLOOR(x_avail_assembly_qty);

Line 8094: msc_sch_wb.atp_debug('rounded avail qty: ' ||

8090: END IF;
8091: IF l_rounding_flag = 1 THEN
8092: x_avail_assembly_qty := FLOOR(x_avail_assembly_qty);
8093: IF PG_DEBUG in ('Y', 'C') THEN
8094: msc_sch_wb.atp_debug('rounded avail qty: ' ||
8095: x_avail_assembly_qty);
8096: END IF;
8097: END IF;
8098:

Line 8114: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'in forward, resource check');

8110: ELSE
8111: -- now this is forward. so what we want to know is the date
8112: -- when whole quantity is available.
8113: IF PG_DEBUG in ('Y', 'C') THEN
8114: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'in forward, resource check');
8115: END IF;
8116:
8117: IF PG_DEBUG in ('Y', 'C') THEN
8118: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date = '||l_requested_date);

Line 8118: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date = '||l_requested_date);

8114: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'in forward, resource check');
8115: END IF;
8116:
8117: IF PG_DEBUG in ('Y', 'C') THEN
8118: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_requested_date = '||l_requested_date);
8119: END IF;
8120:
8121: -- Bug 3450725, requested date must be at least PTF Date + Lead Time w/ offset % from start of job.
8122: -- Lets say, there are 3 resources R1, R2 and R3 with offset % as 0, 50% and 70% respectively,

Line 8144: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New l_requested_date = '||l_requested_date);

8140: ---2178544
8141: --l_requested_date := GREATEST(l_requested_date, MSC_ATP_PVT.G_PTF_DATE);
8142:
8143: IF PG_DEBUG in ('Y', 'C') THEN
8144: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'New l_requested_date = '||l_requested_date);
8145: END IF;
8146:
8147: FOR k IN 1..l_atp_period_tab.COUNT LOOP
8148:

Line 8157: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_period_tab('||k||')='||l_atp_period_tab(k));

8153: l_next_period := l_requested_date + 1;
8154: END IF;
8155:
8156: IF PG_DEBUG in ('Y', 'C') THEN
8157: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_period_tab('||k||')='||l_atp_period_tab(k));
8158: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_qty_tab('||k||')='||l_atp_qty_tab(k));
8159: END IF;
8160:
8161: IF (l_atp_qty_tab(k) -l_res_qty_before_ptf >= l_requested_res_qty) AND

Line 8158: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_qty_tab('||k||')='||l_atp_qty_tab(k));

8154: END IF;
8155:
8156: IF PG_DEBUG in ('Y', 'C') THEN
8157: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_period_tab('||k||')='||l_atp_period_tab(k));
8158: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_atp_qty_tab('||k||')='||l_atp_qty_tab(k));
8159: END IF;
8160:
8161: IF (l_atp_qty_tab(k) -l_res_qty_before_ptf >= l_requested_res_qty) AND
8162: --((l_atp_period_tab(k) >= trunc(sysdate) AND --4198893,4198445

Line 8170: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'inside the loop to find x_atp_date');

8166: (l_atp_period_tab(k) >= l_requested_date
8167: AND MSC_ATP_PVT.G_RES_CONSUME = 'N')) THEN
8168:
8169: IF PG_DEBUG in ('Y', 'C') THEN
8170: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'inside the loop to find x_atp_date');
8171: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date = '||x_atp_date);
8172: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_requirements.lead_time(j) = '||l_res_requirements.lead_time(j));
8173: END IF;
8174:

Line 8171: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date = '||x_atp_date);

8167: AND MSC_ATP_PVT.G_RES_CONSUME = 'N')) THEN
8168:
8169: IF PG_DEBUG in ('Y', 'C') THEN
8170: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'inside the loop to find x_atp_date');
8171: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date = '||x_atp_date);
8172: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_requirements.lead_time(j) = '||l_res_requirements.lead_time(j));
8173: END IF;
8174:
8175: -- we need to store this quantity and date somewhere

Line 8172: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_requirements.lead_time(j) = '||l_res_requirements.lead_time(j));

8168:
8169: IF PG_DEBUG in ('Y', 'C') THEN
8170: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'inside the loop to find x_atp_date');
8171: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date = '||x_atp_date);
8172: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_requirements.lead_time(j) = '||l_res_requirements.lead_time(j));
8173: END IF;
8174:
8175: -- we need to store this quantity and date somewhere
8176: -- so that we can use them to add to pegging tree

Line 8196: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_atp_date = '||l_res_atp_date);

8192: END IF;
8193: -- End BUG found during ODR/CTO-Rearch/ATP_Simplified Pegging.
8194:
8195: IF PG_DEBUG in ('Y', 'C') THEN
8196: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_atp_date = '||l_res_atp_date);
8197: END IF;
8198: --4198893,4198445 First calculate individual availability date. This date will be used to calculate
8199: --start date.
8200: IF nvl(l_lead_time, 0) > 0 THEN

Line 8225: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_lead_time = '||l_lead_time);

8221: l_res_availability_date := l_res_atp_date;
8222: END IF;
8223: x_atp_date := GREATEST(l_res_availability_date, x_atp_date);
8224: IF PG_DEBUG in ('Y', 'C') THEN
8225: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_lead_time = '||l_lead_time);
8226: END IF;
8227: --// BUG 2313497, 2126520
8228: IF PG_DEBUG in ('Y', 'C') THEN
8229: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_requirements.lead_time(j) = '||

Line 8229: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_requirements.lead_time(j) = '||

8225: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_lead_time = '||l_lead_time);
8226: END IF;
8227: --// BUG 2313497, 2126520
8228: IF PG_DEBUG in ('Y', 'C') THEN
8229: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_requirements.lead_time(j) = '||
8230: l_res_requirements.lead_time(j));
8231: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date = '||x_atp_date);
8232: END IF;
8233:

Line 8231: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date = '||x_atp_date);

8227: --// BUG 2313497, 2126520
8228: IF PG_DEBUG in ('Y', 'C') THEN
8229: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_res_requirements.lead_time(j) = '||
8230: l_res_requirements.lead_time(j));
8231: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_atp_date = '||x_atp_date);
8232: END IF;
8233:
8234: EXIT;
8235: ELSIF k = l_atp_period_tab.last THEN -- bug 1169539

Line 8237: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'end of l_atp_period_tab, setting x_atp_date to null');

8233:
8234: EXIT;
8235: ELSIF k = l_atp_period_tab.last THEN -- bug 1169539
8236: IF PG_DEBUG in ('Y', 'C') THEN
8237: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'end of l_atp_period_tab, setting x_atp_date to null');
8238: END IF;
8239: x_atp_date := null;
8240: END IF;
8241: END LOOP;

Line 8249: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'exiting from resource loop');

8245: -- exit this resource loop then.
8246: -- Bug 1608755, set available qty = 0 in this case.
8247: x_avail_assembly_qty :=0;
8248: IF PG_DEBUG in ('Y', 'C') THEN
8249: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'exiting from resource loop');
8250: END IF;
8251:
8252: EXIT;
8253: END IF;

Line 8258: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_avail_assembly_qty='||x_avail_assembly_qty);

8254:
8255: END IF; -- end if p_search
8256:
8257: IF PG_DEBUG in ('Y', 'C') THEN
8258: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'x_avail_assembly_qty='||x_avail_assembly_qty);
8259: END IF;
8260:
8261: ELSE -- else of 'if l_atp_period_tab.count > 0'
8262:

Line 8374: msc_sch_wb.atp_debug('Get_Res_Requirements: Calc. value-1 l_res_start_date ' ||

8370: -1 * l_res_requirements.lead_time(j)),
8371: l_requested_date);
8372:
8373: IF PG_DEBUG in ('Y', 'C') THEN
8374: msc_sch_wb.atp_debug('Get_Res_Requirements: Calc. value-1 l_res_start_date ' ||
8375: l_res_start_date);
8376: END IF;
8377: END IF;
8378: -- End Bug 3348095

Line 8389: msc_sch_wb.atp_debug('Get_Res_Requirements: l_res_requirements.requested_date(j) '||

8385: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL)); --4135752
8386: -- End Bug 3562873.
8387:
8388: IF PG_DEBUG in ('Y', 'C') THEN
8389: msc_sch_wb.atp_debug('Get_Res_Requirements: l_res_requirements.requested_date(j) '||
8390: l_res_requirements.requested_date(j));
8391: msc_sch_wb.atp_debug('Get_Res_Requirements: Calc. value-2 l_res_start_date ' ||
8392: l_res_start_date);
8393: END IF;

Line 8391: msc_sch_wb.atp_debug('Get_Res_Requirements: Calc. value-2 l_res_start_date ' ||

8387:
8388: IF PG_DEBUG in ('Y', 'C') THEN
8389: msc_sch_wb.atp_debug('Get_Res_Requirements: l_res_requirements.requested_date(j) '||
8390: l_res_requirements.requested_date(j));
8391: msc_sch_wb.atp_debug('Get_Res_Requirements: Calc. value-2 l_res_start_date ' ||
8392: l_res_start_date);
8393: END IF;
8394: -- End Bug 3450725
8395:

Line 8418: msc_sch_wb.atp_debug('Out of the ADD RESOURCE DEMAND');

8414: p_refresh_number, -- For summary enhancement
8415: l_transaction_id,
8416: l_return_status);
8417:
8418: msc_sch_wb.atp_debug('Out of the ADD RESOURCE DEMAND');
8419: -- Bug 3348095
8420: -- End date of this resource will be the start date of next resource.
8421: -- Bug 3562873 Comment out this assignment, redundant, done above.
8422: -- l_res_start_date := l_requested_date;

Line 8425: msc_sch_wb.atp_debug('Get_Res_Requirements: Set l_res_start_date for next Res. ' ||

8421: -- Bug 3562873 Comment out this assignment, redundant, done above.
8422: -- l_res_start_date := l_requested_date;
8423: /*
8424: IF PG_DEBUG in ('Y', 'C') THEN
8425: msc_sch_wb.atp_debug('Get_Res_Requirements: Set l_res_start_date for next Res. ' ||
8426: l_res_start_date);
8427: END IF;
8428: */
8429: -- End Bug 3562873

Line 8500: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);

8496: l_pegging_rec.supplier_site_id := NULL;
8497: l_pegging_rec.supplier_site_name := NULL;
8498: --- resource batching
8499: IF PG_DEBUG in ('Y', 'C') THEN
8500: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);
8501: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);
8502: END IF;
8503: ---bug 1907419: set batchable_flag =1 for batchable resource
8504: --IF (l_use_batching = 1 and l_batchable_flag = 1) THEN

Line 8501: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);

8497: l_pegging_rec.supplier_site_name := NULL;
8498: --- resource batching
8499: IF PG_DEBUG in ('Y', 'C') THEN
8500: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);
8501: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);
8502: END IF;
8503: ---bug 1907419: set batchable_flag =1 for batchable resource
8504: --IF (l_use_batching = 1 and l_batchable_flag = 1) THEN
8505: -- add batch flag to pegging

Line 8507: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ADD batch flag to pegging');

8503: ---bug 1907419: set batchable_flag =1 for batchable resource
8504: --IF (l_use_batching = 1 and l_batchable_flag = 1) THEN
8505: -- add batch flag to pegging
8506: IF PG_DEBUG in ('Y', 'C') THEN
8507: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ADD batch flag to pegging');
8508: END IF;
8509: l_pegging_rec.batchable_flag := l_batchable_flag;
8510: --END IF;
8511:

Line 8517: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_ITEM_INFO_REC.base_item_id ' ||

8513: l_pegging_rec.pegging_type := MSC_ATP_PVT.RESOURCE_DEMAND; --resource demand node
8514:
8515: -- Bug 3348161
8516: IF PG_DEBUG in ('Y', 'C') THEN
8517: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_ITEM_INFO_REC.base_item_id ' ||
8518: MSC_ATP_PVT.G_ITEM_INFO_REC.base_item_id);
8519: END IF;
8520: ---s_cto_rearch and ODR
8521: l_pegging_rec.dest_inv_item_id := l_inventory_item_id;

Line 8527: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Set model_sd_flag');

8523: -- Handle Configuration Items as well.
8524: MSC_ATP_PVT.G_ITEM_INFO_REC.base_item_id is NOT NULL) THEN
8525: l_pegging_rec.model_sd_flag := 1;
8526: IF PG_DEBUG in ('Y', 'C') THEN
8527: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Set model_sd_flag');
8528: END IF;
8529: END IF;
8530: --e_cto_rearch and ODR
8531: -- End Bug 3348161

Line 8593: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);

8589: l_pegging_rec.supplier_site_id := NULL;
8590: l_pegging_rec.supplier_site_name := NULL;
8591: --- resource batching
8592: IF PG_DEBUG in ('Y', 'C') THEN
8593: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);
8594: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);
8595: END IF;
8596: --- bug 1907419
8597: ---IF (l_use_batching = 1 and l_batchable_flag = 1) THEN

Line 8594: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);

8590: l_pegging_rec.supplier_site_name := NULL;
8591: --- resource batching
8592: IF PG_DEBUG in ('Y', 'C') THEN
8593: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);
8594: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);
8595: END IF;
8596: --- bug 1907419
8597: ---IF (l_use_batching = 1 and l_batchable_flag = 1) THEN
8598: IF PG_DEBUG in ('Y', 'C') THEN

Line 8599: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ADD batch flag to pegging');

8595: END IF;
8596: --- bug 1907419
8597: ---IF (l_use_batching = 1 and l_batchable_flag = 1) THEN
8598: IF PG_DEBUG in ('Y', 'C') THEN
8599: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ADD batch flag to pegging');
8600: END IF;
8601: l_pegging_rec.batchable_flag := l_batchable_flag;
8602: --END IF;
8603:

Line 8712: msc_sch_wb.atp_debug('Get_Res_Requirements: Calculated val-1 l_res_start_date ' || l_res_start_date);

8708: --4198893,4198445: Calculate start date from individual resource's end date
8709: --l_res_atp_date);
8710:
8711: IF PG_DEBUG in ('Y', 'C') THEN
8712: msc_sch_wb.atp_debug('Get_Res_Requirements: Calculated val-1 l_res_start_date ' || l_res_start_date);
8713: END IF;
8714: -- Bug 3450725
8715: -- Ensure SYSDATE/PTF_DATE integrity while calculating start_date
8716: -- for resource_requirements

Line 8724: msc_sch_wb.atp_debug('Get_Res_Requirements: l_res_requirements.requested_date(j) ' ||

8720: MSC_ATP_PVT.G_PTF_DATE_THIS_LEVEL)); --4135752
8721: -- End Bug 3562873.
8722:
8723: IF PG_DEBUG in ('Y', 'C') THEN
8724: msc_sch_wb.atp_debug('Get_Res_Requirements: l_res_requirements.requested_date(j) ' ||
8725: l_res_requirements.requested_date(j));
8726: msc_sch_wb.atp_debug('Get_Res_Requirements: Calculated val-2 l_res_start_date ' || l_res_start_date);
8727: END IF;
8728: -- End Bug 3450725

Line 8726: msc_sch_wb.atp_debug('Get_Res_Requirements: Calculated val-2 l_res_start_date ' || l_res_start_date);

8722:
8723: IF PG_DEBUG in ('Y', 'C') THEN
8724: msc_sch_wb.atp_debug('Get_Res_Requirements: l_res_requirements.requested_date(j) ' ||
8725: l_res_requirements.requested_date(j));
8726: msc_sch_wb.atp_debug('Get_Res_Requirements: Calculated val-2 l_res_start_date ' || l_res_start_date);
8727: END IF;
8728: -- End Bug 3450725
8729: -- End Bug 3348095
8730:

Line 8793: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'in forward piece, adding resource demand pegging');

8789: l_owning_department_code := l_department_code;
8790: END IF;
8791:
8792: IF PG_DEBUG in ('Y', 'C') THEN
8793: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'in forward piece, adding resource demand pegging');
8794: END IF;
8795: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;
8796: l_pegging_rec.order_line_id:= MSC_ATP_PVT.G_ORDER_LINE_ID;
8797: l_pegging_rec.parent_pegging_id:= p_parent_pegging_id;

Line 8825: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);

8821: l_pegging_rec.supplier_site_name := NULL;
8822:
8823: --- resource batching
8824: IF PG_DEBUG in ('Y', 'C') THEN
8825: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);
8826: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);
8827: END IF;
8828: --- bug 1907419
8829: --IF (l_use_batching = 1 and l_batchable_flag = 1) THEN

Line 8826: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);

8822:
8823: --- resource batching
8824: IF PG_DEBUG in ('Y', 'C') THEN
8825: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);
8826: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);
8827: END IF;
8828: --- bug 1907419
8829: --IF (l_use_batching = 1 and l_batchable_flag = 1) THEN
8830: IF PG_DEBUG in ('Y', 'C') THEN

Line 8831: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ADD batch flag to pegging');

8827: END IF;
8828: --- bug 1907419
8829: --IF (l_use_batching = 1 and l_batchable_flag = 1) THEN
8830: IF PG_DEBUG in ('Y', 'C') THEN
8831: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ADD batch flag to pegging');
8832: END IF;
8833: l_pegging_rec.batchable_flag := l_batchable_flag;
8834: --END IF;
8835:

Line 8851: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_ITEM_INFO_REC.base_item_id ' ||

8847: l_pegging_rec.actual_supply_demand_date := TRUNC(l_res_atp_date) + MSC_ATP_PVT.G_END_OF_DAY;
8848:
8849: -- Bug 3348161
8850: IF PG_DEBUG in ('Y', 'C') THEN
8851: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'G_ITEM_INFO_REC.base_item_id ' ||
8852: MSC_ATP_PVT.G_ITEM_INFO_REC.base_item_id);
8853: END IF;
8854: ---s_cto_rearch and ODR,
8855: -- Bug 3348161 set model_sd_flag for future case.

Line 8862: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Set model_sd_flag');

8858: -- Handle Configuration Items as well.
8859: MSC_ATP_PVT.G_ITEM_INFO_REC.base_item_id is NOT NULL) THEN
8860: l_pegging_rec.model_sd_flag := 1;
8861: IF PG_DEBUG in ('Y', 'C') THEN
8862: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'Set model_sd_flag');
8863: END IF;
8864: END IF;
8865: --e_cto_rearch and ODR
8866: -- End Bug 3348161

Line 8892: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'in forward piece, adding resource supply pegging');

8888: l_resource_code); */
8889:
8890: -- add pegging info for the supply
8891: IF PG_DEBUG in ('Y', 'C') THEN
8892: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'in forward piece, adding resource supply pegging');
8893: END IF;
8894:
8895:
8896: l_pegging_rec.session_id:= MSC_ATP_PVT.G_SESSION_ID;

Line 8924: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);

8920: l_pegging_rec.supplier_site_name := NULL;
8921:
8922: --- resource batching
8923: IF PG_DEBUG in ('Y', 'C') THEN
8924: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);
8925: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);
8926: END IF;
8927: --- bug 1907419
8928: ---IF (l_use_batching = 1 and l_batchable_flag = 1) THEN

Line 8925: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);

8921:
8922: --- resource batching
8923: IF PG_DEBUG in ('Y', 'C') THEN
8924: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_use_batching = ' || l_use_batching);
8925: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'l_batchable_flag = ' || l_batchable_flag);
8926: END IF;
8927: --- bug 1907419
8928: ---IF (l_use_batching = 1 and l_batchable_flag = 1) THEN
8929: IF PG_DEBUG in ('Y', 'C') THEN

Line 8930: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ADD batch flag to pegging');

8926: END IF;
8927: --- bug 1907419
8928: ---IF (l_use_batching = 1 and l_batchable_flag = 1) THEN
8929: IF PG_DEBUG in ('Y', 'C') THEN
8930: msc_sch_wb.atp_debug('Get_Res_Requirements: ' || 'ADD batch flag to pegging');
8931: END IF;
8932: l_pegging_rec.batchable_flag := l_batchable_flag;
8933: ---END IF;
8934: --diag_atp

Line 8967: msc_sch_wb.atp_debug(' Add resource constraint in regular ATP');

8963: --s_cto_rearch
8964: IF l_res_atp_date > l_requested_date THEN
8965: IF PG_DEBUG in ('Y', 'C') THEN
8966:
8967: msc_sch_wb.atp_debug(' Add resource constraint in regular ATP');
8968: END IF;
8969: --l_pegging_rec.constraint_type := 7;
8970: l_pegging_rec.constraint_type := 6; --bug3533073
8971: END IF;

Line 8988: msc_sch_wb.atp_debug('in get_res_requirements we are here 1');

8984: END IF;
8985: END IF;
8986:
8987: IF PG_DEBUG in ('Y', 'C') THEN
8988: msc_sch_wb.atp_debug('in get_res_requirements we are here 1');
8989: END IF;
8990: FOR i in 1..l_atp_period.Level.COUNT LOOP
8991: l_atp_period.Pegging_Id(i) := l_pegging_id;
8992: l_atp_period.End_Pegging_Id(i) := MSC_ATP_PVT.G_DEMAND_PEGGING_ID;

Line 8997: msc_sch_wb.atp_debug('in get_res_requirements we are here 2');

8993:
8994: END LOOP;
8995:
8996: IF PG_DEBUG in ('Y', 'C') THEN
8997: msc_sch_wb.atp_debug('in get_res_requirements we are here 2');
8998: END IF;
8999:
9000: -- dsting supply/demand details pl/sql tables no longer used
9001: /*

Line 9014: msc_sch_wb.atp_debug('in get_res_requirements we are here 3');

9010: MSC_ATP_PVT.G_DEMAND_PEGGING_ID);
9011: END IF;
9012:
9013: IF PG_DEBUG in ('Y', 'C') THEN
9014: msc_sch_wb.atp_debug('in get_res_requirements we are here 3');
9015: END IF;
9016:
9017: -- Bug 4108546
9018: -- Re-set the Period Data for HP Display

Line 9030: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||

9026: l_atp_period.Cumulative_Quantity(k) :=
9027: l_atp_period.Cumulative_Quantity(k) - l_res_qty_before_ptf;
9028: END IF;
9029: IF PG_DEBUG in ('Y', 'C') THEN
9030: msc_sch_wb.atp_debug('Get_Res_Requirements: ' ||
9031: 'l_atp_period.Cumulative_Quantity(' || k || ') := ' ||
9032: l_atp_period.Cumulative_Quantity(k));
9033: END IF;
9034: END IF;

Line 9045: msc_sch_wb.atp_debug('in get_res_requirements we are here 4');

9041: x_atp_supply_demand,
9042: l_return_status);
9043:
9044: IF PG_DEBUG in ('Y', 'C') THEN
9045: msc_sch_wb.atp_debug('in get_res_requirements we are here 4');
9046: END IF;
9047:
9048: -- Bug 2814872
9049: IF (MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2 AND p_search = 2 AND

Line 9055: msc_sch_wb.atp_debug('Get_Res_Requirements date obtained for parent item is better');

9051: -- No need to look at other resources in forward pass as for this resource
9052: -- the availability date is greater than or equal to the parent's ATP date.
9053: -- Note that when p_parent_ship_date is NULL all resources will get visited.
9054: IF PG_DEBUG in ('Y', 'C') THEN
9055: msc_sch_wb.atp_debug('Get_Res_Requirements date obtained for parent item is better');
9056: msc_sch_wb.atp_debug('Get_Res_Requirements date for parent item :' ||
9057: p_parent_ship_date);
9058: msc_sch_wb.atp_debug('Get_Res_Requirements date obtained for Resource :' ||
9059: l_resource_id || ' is ' || x_atp_date);

Line 9056: msc_sch_wb.atp_debug('Get_Res_Requirements date for parent item :' ||

9052: -- the availability date is greater than or equal to the parent's ATP date.
9053: -- Note that when p_parent_ship_date is NULL all resources will get visited.
9054: IF PG_DEBUG in ('Y', 'C') THEN
9055: msc_sch_wb.atp_debug('Get_Res_Requirements date obtained for parent item is better');
9056: msc_sch_wb.atp_debug('Get_Res_Requirements date for parent item :' ||
9057: p_parent_ship_date);
9058: msc_sch_wb.atp_debug('Get_Res_Requirements date obtained for Resource :' ||
9059: l_resource_id || ' is ' || x_atp_date);
9060: END IF;

Line 9058: msc_sch_wb.atp_debug('Get_Res_Requirements date obtained for Resource :' ||

9054: IF PG_DEBUG in ('Y', 'C') THEN
9055: msc_sch_wb.atp_debug('Get_Res_Requirements date obtained for parent item is better');
9056: msc_sch_wb.atp_debug('Get_Res_Requirements date for parent item :' ||
9057: p_parent_ship_date);
9058: msc_sch_wb.atp_debug('Get_Res_Requirements date obtained for Resource :' ||
9059: l_resource_id || ' is ' || x_atp_date);
9060: END IF;
9061: EXIT; -- Exit the loop
9062: ELSE -- diagnostic ATP or resource provides better date.

Line 9070: msc_sch_wb.atp_debug('***** End Get_Res_Requirements Procedure *****');

9066:
9067: END LOOP;
9068:
9069: IF PG_DEBUG in ('Y', 'C') THEN
9070: msc_sch_wb.atp_debug('***** End Get_Res_Requirements Procedure *****');
9071: END IF;
9072: Exception
9073: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
9074: IF PG_DEBUG in ('Y', 'C') THEN

Line 9075: msc_sch_wb.atp_debug('Get_Res_Requirements ' || 'No match for sysdate in cal');

9071: END IF;
9072: Exception
9073: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
9074: IF PG_DEBUG in ('Y', 'C') THEN
9075: msc_sch_wb.atp_debug('Get_Res_Requirements ' || 'No match for sysdate in cal');
9076: END IF;
9077: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
9078: WHEN OTHERS THEN
9079: x_return_status := FND_API.G_RET_STS_ERROR;

Line 9081: msc_sch_wb.atp_debug('Get_Res_Requirements ' || 'inside when others');

9077: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
9078: WHEN OTHERS THEN
9079: x_return_status := FND_API.G_RET_STS_ERROR;
9080: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705
9081: msc_sch_wb.atp_debug('Get_Res_Requirements ' || 'inside when others');
9082: msc_sch_wb.atp_debug ('error := ' || SQLERRM);
9083: END IF;
9084: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
9085: END Get_Res_Requirements;

Line 9082: msc_sch_wb.atp_debug ('error := ' || SQLERRM);

9078: WHEN OTHERS THEN
9079: x_return_status := FND_API.G_RET_STS_ERROR;
9080: IF PG_DEBUG in ('Y', 'C') THEN --bug3583705
9081: msc_sch_wb.atp_debug('Get_Res_Requirements ' || 'inside when others');
9082: msc_sch_wb.atp_debug ('error := ' || SQLERRM);
9083: END IF;
9084: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
9085: END Get_Res_Requirements;
9086:

Line 9606: msc_sch_wb.atp_debug('***** Begin Get_Comp_Requirements *****');

9602: -- initialize API return status to success
9603: x_return_status := FND_API.G_RET_STS_SUCCESS;
9604:
9605: IF PG_DEBUG in ('Y', 'C') THEN
9606: msc_sch_wb.atp_debug('***** Begin Get_Comp_Requirements *****');
9607: END IF;
9608:
9609: -- Now get the material requirement
9610: IF PG_DEBUG in ('Y', 'C') THEN

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

9607: END IF;
9608:
9609: -- Now get the material requirement
9610: IF PG_DEBUG in ('Y', 'C') THEN
9611: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_instance_id = '||p_instance_id);
9612: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_plan_id = '||p_plan_id);
9613: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_level = '||p_level);
9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);

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

9608:
9609: -- Now get the material requirement
9610: IF PG_DEBUG in ('Y', 'C') THEN
9611: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_instance_id = '||p_instance_id);
9612: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_plan_id = '||p_plan_id);
9613: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_level = '||p_level);
9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);

Line 9613: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_level = '||p_level);

9609: -- Now get the material requirement
9610: IF PG_DEBUG in ('Y', 'C') THEN
9611: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_instance_id = '||p_instance_id);
9612: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_plan_id = '||p_plan_id);
9613: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_level = '||p_level);
9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);
9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);

Line 9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);

9610: IF PG_DEBUG in ('Y', 'C') THEN
9611: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_instance_id = '||p_instance_id);
9612: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_plan_id = '||p_plan_id);
9613: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_level = '||p_level);
9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);
9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);

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

9611: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_instance_id = '||p_instance_id);
9612: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_plan_id = '||p_plan_id);
9613: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_level = '||p_level);
9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);
9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);
9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);

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

9612: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_plan_id = '||p_plan_id);
9613: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_level = '||p_level);
9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);
9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);
9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);

Line 9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);

9613: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_level = '||p_level);
9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);
9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);
9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);
9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);

Line 9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);

9614: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_scenario_id = '||p_scenario_id);
9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);
9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);
9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);
9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);
9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);

Line 9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);

9615: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_inventory_item_id = '||p_inventory_item_id);
9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);
9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);
9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);
9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);
9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);
9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);

Line 9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);

9616: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_organization_id = '||p_organization_id);
9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);
9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);
9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);
9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);
9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);
9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);

Line 9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);

9617: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_parent_pegging_id = '||p_parent_pegging_id);
9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);
9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);
9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);
9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);
9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);
9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);
9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);

Line 9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);

9618: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_demand_class = '||p_demand_class);
9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);
9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);
9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);
9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);
9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);
9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);
9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);

Line 9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);

9619: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_quantity = '||p_requested_quantity);
9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);
9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);
9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);
9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);
9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);
9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);
9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);
9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);

Line 9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);

9620: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_requested_date = '||p_requested_date);
9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);
9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);
9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);
9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);
9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);
9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);
9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);
9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);

Line 9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);

9621: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '||p_search);
9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);
9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);
9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);
9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);
9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);
9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);
9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);
9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);

Line 9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);

9622: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_assign_set_id = '||p_assign_set_id);
9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);
9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);
9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);
9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);
9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);
9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);
9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);
9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);

Line 9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);

9623: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_order_number = '||p_order_number);
9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);
9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);
9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);
9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);
9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);
9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);
9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);
9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);

Line 9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);

9624: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_routing_seq_id = '||p_routing_seq_id);
9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);
9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);
9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);
9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);
9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);
9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);
9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);
9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);

Line 9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);

9625: msc_sch_wb.atp_debug('bom_item_type := ' || p_comp_info_rec.bom_item_type);
9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);
9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);
9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);
9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);
9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);
9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);
9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);
9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);

Line 9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);

9626: msc_sch_wb.atp_debug('atp flag := ' || p_comp_info_rec.atp_flag);
9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);
9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);
9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);
9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);
9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);
9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);
9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);
9634: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_PARENT_MODEL_LINE_ID := ' || p_comp_info_rec.ATO_PARENT_MODEL_LINE_ID);

Line 9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);

9627: msc_sch_wb.atp_debug('atp_comp_flag := ' || p_comp_info_rec.atp_comp_flag);
9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);
9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);
9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);
9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);
9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);
9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);
9634: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_PARENT_MODEL_LINE_ID := ' || p_comp_info_rec.ATO_PARENT_MODEL_LINE_ID);
9635: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'PARENT_LINE_ID := ' || p_comp_info_rec.PARENT_LINE_ID);

Line 9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);

9628: msc_sch_wb.atp_debug('p_bill_seq_id := ' || p_bill_seq_id);
9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);
9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);
9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);
9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);
9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);
9634: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_PARENT_MODEL_LINE_ID := ' || p_comp_info_rec.ATO_PARENT_MODEL_LINE_ID);
9635: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'PARENT_LINE_ID := ' || p_comp_info_rec.PARENT_LINE_ID);
9636: --bug 3059305

Line 9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);

9629: msc_sch_wb.atp_debug('parent_so_quantity := ' || p_comp_info_rec.parent_so_quantity);
9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);
9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);
9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);
9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);
9634: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_PARENT_MODEL_LINE_ID := ' || p_comp_info_rec.ATO_PARENT_MODEL_LINE_ID);
9635: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'PARENT_LINE_ID := ' || p_comp_info_rec.PARENT_LINE_ID);
9636: --bug 3059305
9637: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ship date this level := '

Line 9634: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_PARENT_MODEL_LINE_ID := ' || p_comp_info_rec.ATO_PARENT_MODEL_LINE_ID);

9630: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_family_id := ' || p_family_id);
9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);
9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);
9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);
9634: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_PARENT_MODEL_LINE_ID := ' || p_comp_info_rec.ATO_PARENT_MODEL_LINE_ID);
9635: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'PARENT_LINE_ID := ' || p_comp_info_rec.PARENT_LINE_ID);
9636: --bug 3059305
9637: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ship date this level := '
9638: || p_comp_info_rec.ship_date_this_level);

Line 9635: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'PARENT_LINE_ID := ' || p_comp_info_rec.PARENT_LINE_ID);

9631: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_atf_date := ' || p_atf_date);
9632: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'TOP_MODEL_LINE_ID :=' || p_comp_info_rec.TOP_MODEL_LINE_ID);
9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);
9634: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_PARENT_MODEL_LINE_ID := ' || p_comp_info_rec.ATO_PARENT_MODEL_LINE_ID);
9635: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'PARENT_LINE_ID := ' || p_comp_info_rec.PARENT_LINE_ID);
9636: --bug 3059305
9637: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ship date this level := '
9638: || p_comp_info_rec.ship_date_this_level);
9639:

Line 9637: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ship date this level := '

9633: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_MODEL_LINE_ID :=' || p_comp_info_rec.ATO_MODEL_LINE_ID);
9634: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ATO_PARENT_MODEL_LINE_ID := ' || p_comp_info_rec.ATO_PARENT_MODEL_LINE_ID);
9635: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'PARENT_LINE_ID := ' || p_comp_info_rec.PARENT_LINE_ID);
9636: --bug 3059305
9637: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'ship date this level := '
9638: || p_comp_info_rec.ship_date_this_level);
9639:
9640:
9641: END IF;

Line 9745: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'MSO LEAD TIME FACTOR = ' || l_mso_lead_time_factor);

9741: l_mso_lead_time_factor := MSC_ATP_PVT.G_MSO_LEAD_TIME_FACTOR;
9742: l_network_scheduling_method := MSC_ATP_PVT.G_ORG_INFO_REC.network_scheduling_method; --bug3601223
9743:
9744: IF PG_DEBUG in ('Y', 'C') THEN
9745: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'MSO LEAD TIME FACTOR = ' || l_mso_lead_time_factor);
9746: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after assign the value');
9747: --bug3601223
9748: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_network_scheduling_method = '|| l_network_scheduling_method);
9749: END IF;

Line 9746: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after assign the value');

9742: l_network_scheduling_method := MSC_ATP_PVT.G_ORG_INFO_REC.network_scheduling_method; --bug3601223
9743:
9744: IF PG_DEBUG in ('Y', 'C') THEN
9745: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'MSO LEAD TIME FACTOR = ' || l_mso_lead_time_factor);
9746: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after assign the value');
9747: --bug3601223
9748: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_network_scheduling_method = '|| l_network_scheduling_method);
9749: END IF;
9750:

Line 9748: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_network_scheduling_method = '|| l_network_scheduling_method);

9744: IF PG_DEBUG in ('Y', 'C') THEN
9745: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'MSO LEAD TIME FACTOR = ' || l_mso_lead_time_factor);
9746: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after assign the value');
9747: --bug3601223
9748: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_network_scheduling_method = '|| l_network_scheduling_method);
9749: END IF;
9750:
9751: i := l_explode_comp.inventory_item_id.FIRST;
9752: l_bill_seq_id := p_bill_seq_id; --(3004862) circular BOM issue

Line 9782: msc_sch_wb.atp_debug('This is a model line');

9778:
9779: --s_cto_rearch
9780: IF p_comp_info_rec.bom_item_type = 1 and p_comp_info_rec.replenish_to_order_flag = 'Y' THEN
9781: IF PG_DEBUG in ('Y', 'C') THEN
9782: msc_sch_wb.atp_debug('This is a model line');
9783: END IF;
9784: l_model_atp_comp_flag := p_comp_info_rec.atp_comp_flag;
9785: l_model_flag := p_comp_info_rec.bom_item_type;
9786:

Line 9789: msc_sch_wb.atp_debug('Add this line to comp requirements table');

9785: l_model_flag := p_comp_info_rec.bom_item_type;
9786:
9787: IF p_comp_info_rec.atp_flag = 'Y' THEN
9788: IF PG_DEBUG in ('Y', 'C') THEN
9789: msc_sch_wb.atp_debug('Add this line to comp requirements table');
9790: END IF;
9791: --first extend the record
9792: MSC_ATP_REQ.Extend_Atp_Comp_Typ(l_comp_requirements);
9793:

Line 9836: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_explode_comp.component_identifier(' || i || ') : ' || l_explode_comp.component_identifier(i));

9832: END IF;
9833:
9834: -- l_inv_item_id := MSC_ATP_PVT.G_ITEM_INFO_REC.dest_inv_item_id; -- Not required after 3004862 fix
9835: IF PG_DEBUG in ('Y', 'C') THEN
9836: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_explode_comp.component_identifier(' || i || ') : ' || l_explode_comp.component_identifier(i));
9837: END IF;
9838:
9839: -- Bug 4143668, reset routing type ti ensure correct data in between various iterations
9840: l_routing_type := NULL;

Line 9881: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_routing_type := ' || l_routing_type);

9877: AND r.sr_instance_id = p_instance_id
9878: AND r.routing_sequence_id = l_routing_seq_id; --4570421 replaced p_routing_seq_id by l_routing_seq_id
9879:
9880: IF PG_DEBUG in ('Y', 'C') THEN
9881: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_routing_type := ' || l_routing_type);
9882: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'routing l_first_op_seq_num := ' || l_first_op_seq_num);
9883: END IF;
9884:
9885: -- Bug 4143668, check lowest op seq from routing operation as routing level data is only populated for network routings

Line 9882: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'routing l_first_op_seq_num := ' || l_first_op_seq_num);

9878: AND r.routing_sequence_id = l_routing_seq_id; --4570421 replaced p_routing_seq_id by l_routing_seq_id
9879:
9880: IF PG_DEBUG in ('Y', 'C') THEN
9881: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_routing_type := ' || l_routing_type);
9882: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'routing l_first_op_seq_num := ' || l_first_op_seq_num);
9883: END IF;
9884:
9885: -- Bug 4143668, check lowest op seq from routing operation as routing level data is only populated for network routings
9886: /* Not needed as of now as RCY is not populated for non-network routing.

Line 9896: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'operations l_first_op_seq_num := ' || l_first_op_seq_num);

9892: AND op.sr_instance_id = p_instance_id
9893: AND op.plan_id = p_plan_id;
9894:
9895: IF PG_DEBUG in ('Y', 'C') THEN
9896: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'operations l_first_op_seq_num := ' || l_first_op_seq_num);
9897: END IF;
9898: END IF; -- IF l_first_op_seq_num IS NULL THEN
9899: */
9900:

Line 9913: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_first_op_RCY := ' || l_first_op_RCY);

9909: AND op.operation_seq_num = l_first_op_seq_num
9910: and op.operation_sequence_id = l_op_seq_id; --4570421
9911:
9912: IF PG_DEBUG in ('Y', 'C') THEN
9913: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_first_op_RCY := ' || l_first_op_RCY);
9914: END IF;
9915: ELSE
9916: l_first_op_RCY := 1; -- Bug 4143668, l_first_op_RCY to 1 if Null
9917: END IF; -- IF l_first_op_seq_num IS NOT NULL THEN

Line 9922: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'exception in cfm: '|| sqlcode);

9918: EXCEPTION
9919: WHEN OTHERS THEN
9920: -- Bug 4143668, add debug message for exception
9921: IF PG_DEBUG in ('Y', 'C') THEN
9922: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'exception in cfm: '|| sqlcode);
9923: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'set l_routing_type and l_first_op_RCY');
9924: END IF;
9925: l_routing_type := NVL(l_routing_type, 2); -- Bug 4143668, use l_routing_type if already set, else 2
9926: l_first_op_RCY := 1; -- Bug 4143668, l_first_op_RCY to 1 for exception

Line 9923: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'set l_routing_type and l_first_op_RCY');

9919: WHEN OTHERS THEN
9920: -- Bug 4143668, add debug message for exception
9921: IF PG_DEBUG in ('Y', 'C') THEN
9922: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'exception in cfm: '|| sqlcode);
9923: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'set l_routing_type and l_first_op_RCY');
9924: END IF;
9925: l_routing_type := NVL(l_routing_type, 2); -- Bug 4143668, use l_routing_type if already set, else 2
9926: l_first_op_RCY := 1; -- Bug 4143668, l_first_op_RCY to 1 for exception
9927: END;

Line 9934: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_routing_type := ' || l_routing_type);

9930: l_first_op_RCY := 1; -- Bug 4143668, l_first_op_RCY to 1 if Null
9931: END IF;
9932:
9933: IF PG_DEBUG in ('Y', 'C') THEN
9934: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_routing_type := ' || l_routing_type);
9935: msc_sch_wb.atp_debug('l_model_flag := ' || l_model_flag);
9936: END IF;
9937: IF NVL(l_model_flag, 2) <> 1 THEN
9938: IF i <> 1 THEN

Line 9935: msc_sch_wb.atp_debug('l_model_flag := ' || l_model_flag);

9931: END IF;
9932:
9933: IF PG_DEBUG in ('Y', 'C') THEN
9934: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_routing_type := ' || l_routing_type);
9935: msc_sch_wb.atp_debug('l_model_flag := ' || l_model_flag);
9936: END IF;
9937: IF NVL(l_model_flag, 2) <> 1 THEN
9938: IF i <> 1 THEN
9939: -- (3004862) circular BOM issue: Call get process effectivity again

Line 9941: msc_sch_wb.atp_debug('Calling Process effectivity for Phantom:'|| l_explode_comp.component_identifier(i));

9937: IF NVL(l_model_flag, 2) <> 1 THEN
9938: IF i <> 1 THEN
9939: -- (3004862) circular BOM issue: Call get process effectivity again
9940: -- for the Phantom Component's Bill.
9941: msc_sch_wb.atp_debug('Calling Process effectivity for Phantom:'|| l_explode_comp.component_identifier(i));
9942: MSC_ATP_PROC.get_process_effectivity(
9943: p_plan_id,
9944: l_explode_comp.component_identifier(i),
9945: p_organization_id,

Line 9971: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening network routing cursor net_rout_com');

9967: l_explode_comp.requested_date(i),
9968: l_explode_comp.comp_usage(i),
9969: l_explode_comp.wip_supply_type(i)); --4106269
9970: IF PG_DEBUG in ('Y', 'C') THEN
9971: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening network routing cursor net_rout_com');
9972: END IF;
9973: ELSE
9974:
9975: OPEN drp_comp(l_bill_seq_id, -- (3004862) circular BOM issue: call with changed parameter

Line 9979: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening DRP cursor drp_comp');

9975: OPEN drp_comp(l_bill_seq_id, -- (3004862) circular BOM issue: call with changed parameter
9976: l_explode_comp.requested_date(i),
9977: l_explode_comp.comp_usage(i));
9978: IF PG_DEBUG in ('Y', 'C') THEN
9979: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening DRP cursor drp_comp');
9980: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
9981: END IF;
9982: END IF;
9983: -- End ATP4drp

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

9976: l_explode_comp.requested_date(i),
9977: l_explode_comp.comp_usage(i));
9978: IF PG_DEBUG in ('Y', 'C') THEN
9979: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening DRP cursor drp_comp');
9980: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
9981: END IF;
9982: END IF;
9983: -- End ATP4drp
9984:

Line 9986: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening network routing cursor net_rout_com');

9982: END IF;
9983: -- End ATP4drp
9984:
9985: IF PG_DEBUG in ('Y', 'C') THEN
9986: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening network routing cursor net_rout_com');
9987: msc_sch_wb.atp_debug('l_bill_seq_id '||l_bill_seq_id);
9988: msc_sch_wb.atp_debug('requested_date '||l_explode_comp.requested_date(i));
9989: msc_sch_wb.atp_debug('comp_usage '|| l_explode_comp.comp_usage(i));
9990: END IF;

Line 9987: msc_sch_wb.atp_debug('l_bill_seq_id '||l_bill_seq_id);

9983: -- End ATP4drp
9984:
9985: IF PG_DEBUG in ('Y', 'C') THEN
9986: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening network routing cursor net_rout_com');
9987: msc_sch_wb.atp_debug('l_bill_seq_id '||l_bill_seq_id);
9988: msc_sch_wb.atp_debug('requested_date '||l_explode_comp.requested_date(i));
9989: msc_sch_wb.atp_debug('comp_usage '|| l_explode_comp.comp_usage(i));
9990: END IF;
9991: END IF;

Line 9988: msc_sch_wb.atp_debug('requested_date '||l_explode_comp.requested_date(i));

9984:
9985: IF PG_DEBUG in ('Y', 'C') THEN
9986: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening network routing cursor net_rout_com');
9987: msc_sch_wb.atp_debug('l_bill_seq_id '||l_bill_seq_id);
9988: msc_sch_wb.atp_debug('requested_date '||l_explode_comp.requested_date(i));
9989: msc_sch_wb.atp_debug('comp_usage '|| l_explode_comp.comp_usage(i));
9990: END IF;
9991: END IF;
9992: ELSIF l_model_flag = 1 THEN

Line 9989: msc_sch_wb.atp_debug('comp_usage '|| l_explode_comp.comp_usage(i));

9985: IF PG_DEBUG in ('Y', 'C') THEN
9986: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after opening network routing cursor net_rout_com');
9987: msc_sch_wb.atp_debug('l_bill_seq_id '||l_bill_seq_id);
9988: msc_sch_wb.atp_debug('requested_date '||l_explode_comp.requested_date(i));
9989: msc_sch_wb.atp_debug('comp_usage '|| l_explode_comp.comp_usage(i));
9990: END IF;
9991: END IF;
9992: ELSIF l_model_flag = 1 THEN
9993: IF PG_DEBUG in ('Y', 'C') THEN

Line 9994: msc_sch_wb.atp_debug('Explode Model or its components Bom');

9990: END IF;
9991: END IF;
9992: ELSIF l_model_flag = 1 THEN
9993: IF PG_DEBUG in ('Y', 'C') THEN
9994: msc_sch_wb.atp_debug('Explode Model or its components Bom');
9995: msc_sch_wb.atp_debug('l_model_atp_comp_flag := ' || l_model_atp_comp_flag);
9996: END IF;
9997: IF l_model_atp_comp_flag in ('Y', 'C') THEN
9998: ---explode mandatory components if model or option class

Line 9995: msc_sch_wb.atp_debug('l_model_atp_comp_flag := ' || l_model_atp_comp_flag);

9991: END IF;
9992: ELSIF l_model_flag = 1 THEN
9993: IF PG_DEBUG in ('Y', 'C') THEN
9994: msc_sch_wb.atp_debug('Explode Model or its components Bom');
9995: msc_sch_wb.atp_debug('l_model_atp_comp_flag := ' || l_model_atp_comp_flag);
9996: END IF;
9997: IF l_model_atp_comp_flag in ('Y', 'C') THEN
9998: ---explode mandatory components if model or option class
9999: IF l_explode_comp.bom_item_type(i) in (1,2) or

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

9999: IF l_explode_comp.bom_item_type(i) in (1,2) or
10000: (l_explode_comp.bom_item_type(i) = 4 and MSC_ATP_PVT.G_INV_CTP = 5) THEN
10001:
10002: IF PG_DEBUG in ('Y', 'C') THEN
10003: msc_sch_wb.atp_debug('i = ' || i);
10004: END IF;
10005: l_lead_time := CEIL((NVL(l_explode_comp.fixed_lt(i), 0) +
10006: NVL(l_explode_comp.variable_lt(i), 0)*l_explode_comp.comp_usage(i))
10007: * (1 + l_mso_lead_time_factor));

Line 10010: msc_sch_wb.atp_debug('l_lead_time = ' || l_lead_time);

10006: NVL(l_explode_comp.variable_lt(i), 0)*l_explode_comp.comp_usage(i))
10007: * (1 + l_mso_lead_time_factor));
10008:
10009: IF PG_DEBUG in ('Y', 'C') THEN
10010: msc_sch_wb.atp_debug('l_lead_time = ' || l_lead_time);
10011: END IF;
10012:
10013: IF nvl(l_lead_time, 0) > 0 THEN
10014: l_request_date := MSC_CALENDAR.DATE_OFFSET

Line 10025: msc_sch_wb.atp_debug('l_request_date := ' || l_request_date);

10021: l_request_date := l_explode_comp.requested_date(i);
10022: END IF;
10023:
10024: IF PG_DEBUG in ('Y', 'C') THEN
10025: msc_sch_wb.atp_debug('l_request_date := ' || l_request_date);
10026: END IF;
10027:
10028: MSC_ATP_CTO.Get_Mandatory_Components(p_plan_id,
10029: p_instance_id,

Line 10038: msc_sch_wb.atp_debug('After Get mand comp, add it to list of components');

10034: l_explode_comp.dest_inventory_item_id(i),
10035: l_mand_comp_info_rec);
10036:
10037: IF PG_DEBUG in ('Y', 'C') THEN
10038: msc_sch_wb.atp_debug('After Get mand comp, add it to list of components');
10039: END IF;
10040:
10041: FOR l_cto_count in 1..l_mand_comp_info_rec.sr_inventory_item_id.count LOOP
10042: l_atp_comp_rec := l_null_atp_comp_rec;

Line 10116: msc_sch_wb.atp_debug('Get CTO Bom');

10112: END IF;
10113:
10114: --now call for CTO Bom
10115: IF PG_DEBUG in ('Y', 'C') THEN
10116: msc_sch_wb.atp_debug('Get CTO Bom');
10117: END IF;
10118:
10119: MSC_ATP_CTO.Get_CTO_BOM(MSC_ATP_PVT.G_SESSION_ID,
10120: l_cto_bom_rec,

Line 10136: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'i = '||i);

10132:
10133: END IF;
10134:
10135: IF PG_DEBUG in ('Y', 'C') THEN
10136: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'i = '||i);
10137: END IF;
10138:
10139:
10140: -- 3027711

Line 10153: msc_sch_wb.atp_debug('Before Fetch of net_rout_comp');

10149: -- ATP4drp fetch from DRP specific cursor for DRP plans.
10150: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) <> 5 THEN
10151: -- Non DRP Plan
10152: IF PG_DEBUG in ('Y', 'C') THEN
10153: msc_sch_wb.atp_debug('Before Fetch of net_rout_comp');
10154: END IF;
10155: FETCH net_rout_comp INTO
10156: l_comp_item_id,
10157: l_comp_component_identifier, -- (3004862) circular BOM issue

Line 10178: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetching cursor net_rout_comp');

10174: l_usage_qty; --4775920
10175:
10176: EXIT WHEN net_rout_comp%NOTFOUND;
10177: IF PG_DEBUG in ('Y', 'C') THEN
10178: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetching cursor net_rout_comp');
10179: END IF;
10180: ELSE -- DRP plan
10181: IF PG_DEBUG in ('Y', 'C') THEN
10182: msc_sch_wb.atp_debug('Before Fetch of drp_comp');

Line 10182: msc_sch_wb.atp_debug('Before Fetch of drp_comp');

10178: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetching cursor net_rout_comp');
10179: END IF;
10180: ELSE -- DRP plan
10181: IF PG_DEBUG in ('Y', 'C') THEN
10182: msc_sch_wb.atp_debug('Before Fetch of drp_comp');
10183: END IF;
10184: FETCH drp_comp INTO
10185: l_comp_item_id,
10186: l_comp_component_identifier, -- (3004862) circular BOM issue

Line 10207: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetching cursor drp_comp');

10203: l_usage_qty; --4775920
10204:
10205: EXIT WHEN drp_comp%NOTFOUND;
10206: IF PG_DEBUG in ('Y', 'C') THEN
10207: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetching cursor drp_comp');
10208: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10209: END IF;
10210: END IF;
10211: -- END ATP4drp

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

10204:
10205: EXIT WHEN drp_comp%NOTFOUND;
10206: IF PG_DEBUG in ('Y', 'C') THEN
10207: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetching cursor drp_comp');
10208: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10209: END IF;
10210: END IF;
10211: -- END ATP4drp
10212:

Line 10215: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetch');

10211: -- END ATP4drp
10212:
10213:
10214: IF PG_DEBUG in ('Y', 'C') THEN
10215: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetch');
10216: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_item_id = '||l_comp_item_id);
10217: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_usage = '||l_comp_usage);
10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);
10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);

Line 10216: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_item_id = '||l_comp_item_id);

10212:
10213:
10214: IF PG_DEBUG in ('Y', 'C') THEN
10215: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetch');
10216: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_item_id = '||l_comp_item_id);
10217: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_usage = '||l_comp_usage);
10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);
10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);
10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);

Line 10217: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_usage = '||l_comp_usage);

10213:
10214: IF PG_DEBUG in ('Y', 'C') THEN
10215: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetch');
10216: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_item_id = '||l_comp_item_id);
10217: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_usage = '||l_comp_usage);
10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);
10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);
10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);
10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);

Line 10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);

10214: IF PG_DEBUG in ('Y', 'C') THEN
10215: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetch');
10216: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_item_id = '||l_comp_item_id);
10217: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_usage = '||l_comp_usage);
10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);
10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);
10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);
10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);
10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);

Line 10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);

10215: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after fetch');
10216: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_item_id = '||l_comp_item_id);
10217: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_usage = '||l_comp_usage);
10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);
10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);
10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);
10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);
10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);
10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);

Line 10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);

10216: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_item_id = '||l_comp_item_id);
10217: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_usage = '||l_comp_usage);
10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);
10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);
10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);
10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);
10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);
10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);
10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);

Line 10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);

10217: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_usage = '||l_comp_usage);
10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);
10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);
10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);
10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);
10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);
10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);
10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);
10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);

Line 10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);

10218: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_date = '||l_comp_date);
10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);
10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);
10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);
10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);
10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);
10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);
10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);

Line 10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);

10219: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_lead_time = '||l_comp_lead_time);
10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);
10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);
10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);
10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);
10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);
10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023

Line 10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);

10220: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_wip_supply_type = '||l_comp_wip_supply_type);
10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);
10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);
10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);
10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);
10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023
10228: --4570421

Line 10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);

10221: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_assembly_identifier = '||l_comp_assembly_identifier);
10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);
10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);
10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);
10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023
10228: --4570421
10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);

Line 10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);

10222: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_component_identifier = '||l_comp_component_identifier);
10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);
10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);
10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023
10228: --4570421
10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);
10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);

Line 10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023

10223: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_pre_pro_lead_time = '||l_comp_pre_pro_lead_time);
10224: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atf_date = '||l_atf_date);
10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023
10228: --4570421
10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);
10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);
10231: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_rounding_variance = '||l_scale_rounding_variance);

Line 10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);

10225: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_ASSEMBLY_LINE_ID = '||MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023
10228: --4570421
10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);
10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);
10231: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_rounding_variance = '||l_scale_rounding_variance);
10232: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_rounding_direction = '||l_rounding_direction);
10233: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_component_yield_factor = '||l_component_yield_factor);

Line 10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);

10226: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023
10228: --4570421
10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);
10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);
10231: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_rounding_variance = '||l_scale_rounding_variance);
10232: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_rounding_direction = '||l_rounding_direction);
10233: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_component_yield_factor = '||l_component_yield_factor);
10234: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_usage_qty = '||l_usage_qty); --4775920

Line 10231: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_rounding_variance = '||l_scale_rounding_variance);

10227: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_uom = '||l_comp_uom); --bug3110023
10228: --4570421
10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);
10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);
10231: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_rounding_variance = '||l_scale_rounding_variance);
10232: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_rounding_direction = '||l_rounding_direction);
10233: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_component_yield_factor = '||l_component_yield_factor);
10234: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_usage_qty = '||l_usage_qty); --4775920
10235:

Line 10232: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_rounding_direction = '||l_rounding_direction);

10228: --4570421
10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);
10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);
10231: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_rounding_variance = '||l_scale_rounding_variance);
10232: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_rounding_direction = '||l_rounding_direction);
10233: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_component_yield_factor = '||l_component_yield_factor);
10234: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_usage_qty = '||l_usage_qty); --4775920
10235:
10236:

Line 10233: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_component_yield_factor = '||l_component_yield_factor);

10229: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scaling_type = '||l_scaling_type);
10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);
10231: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_rounding_variance = '||l_scale_rounding_variance);
10232: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_rounding_direction = '||l_rounding_direction);
10233: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_component_yield_factor = '||l_component_yield_factor);
10234: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_usage_qty = '||l_usage_qty); --4775920
10235:
10236:
10237:

Line 10234: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_usage_qty = '||l_usage_qty); --4775920

10230: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_multiple = '||l_scale_multiple);
10231: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_scale_rounding_variance = '||l_scale_rounding_variance);
10232: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_rounding_direction = '||l_rounding_direction);
10233: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_component_yield_factor = '||l_component_yield_factor);
10234: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_usage_qty = '||l_usage_qty); --4775920
10235:
10236:
10237:
10238: END IF;

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

10255: -- Turn Off Product Family ATP for components.
10256: l_atp_comp_rec.inventory_item_id := l_comp_item_id ;
10257: -- ATP4drp PF ATP not supported for DRP. Print out Debug Here.
10258: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 AND PG_DEBUG in ('Y', 'C') THEN
10259: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10260: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.inventory_item_id '
10261: || l_atp_comp_rec.inventory_item_id );
10262: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.request_item_id '
10263: || l_atp_comp_rec.request_item_id );

Line 10260: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.inventory_item_id '

10256: l_atp_comp_rec.inventory_item_id := l_comp_item_id ;
10257: -- ATP4drp PF ATP not supported for DRP. Print out Debug Here.
10258: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 AND PG_DEBUG in ('Y', 'C') THEN
10259: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10260: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.inventory_item_id '
10261: || l_atp_comp_rec.inventory_item_id );
10262: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.request_item_id '
10263: || l_atp_comp_rec.request_item_id );
10264: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');

Line 10262: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.request_item_id '

10258: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 AND PG_DEBUG in ('Y', 'C') THEN
10259: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10260: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.inventory_item_id '
10261: || l_atp_comp_rec.inventory_item_id );
10262: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.request_item_id '
10263: || l_atp_comp_rec.request_item_id );
10264: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10265: END IF;
10266: ELSE -- Non DRP Plans

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

10260: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.inventory_item_id '
10261: || l_atp_comp_rec.inventory_item_id );
10262: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_comp_rec.request_item_id '
10263: || l_atp_comp_rec.request_item_id );
10264: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10265: END IF;
10266: ELSE -- Non DRP Plans
10267: l_atp_comp_rec.inventory_item_id := MSC_ATP_PF.Get_PF_Atp_Item_Id(
10268: p_instance_id,

Line 10321: msc_sch_wb.atp_debug('Model Entity ');

10317:
10318: END LOOP; -- end the loop of fetch
10319: ELSE
10320: IF PG_DEBUG in ('Y', 'C') THEN
10321: msc_sch_wb.atp_debug('Model Entity ');
10322: msc_sch_wb.atp_debug('l_model_atp_comp_flag := ' || l_model_atp_comp_flag);
10323: END IF;
10324:
10325: IF l_model_atp_comp_flag in ('Y', 'C') THEN

Line 10322: msc_sch_wb.atp_debug('l_model_atp_comp_flag := ' || l_model_atp_comp_flag);

10318: END LOOP; -- end the loop of fetch
10319: ELSE
10320: IF PG_DEBUG in ('Y', 'C') THEN
10321: msc_sch_wb.atp_debug('Model Entity ');
10322: msc_sch_wb.atp_debug('l_model_atp_comp_flag := ' || l_model_atp_comp_flag);
10323: END IF;
10324:
10325: IF l_model_atp_comp_flag in ('Y', 'C') THEN
10326: FOR l_cto_count in 1..l_cto_bom_rec.inventory_item_id.count LOOP

Line 10394: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after closing cursor net_rout_comp');

10390: -- Bug 4042403, 4047183, 4070094 Close the cursor only if it has been opened.
10391: IF net_rout_comp%ISOPEN THEN
10392: CLOSE net_rout_comp;
10393: IF PG_DEBUG in ('Y', 'C') THEN
10394: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after closing cursor net_rout_comp');
10395: END IF;
10396: END IF;
10397: -- End Bug 4042403, 4047183, 4070094
10398: ELSE -- DRP plan

Line 10403: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after closing cursor drp_comp');

10399: -- Bug 4042403, 4047183, 4070094 Close the cursor only if it has been opened.
10400: IF drp_comp%ISOPEN THEN
10401: CLOSE drp_comp;
10402: IF PG_DEBUG in ('Y', 'C') THEN
10403: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after closing cursor drp_comp');
10404: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10405: END IF;
10406: END IF;
10407: -- End Bug 4042403, 4047183, 4070094

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

10400: IF drp_comp%ISOPEN THEN
10401: CLOSE drp_comp;
10402: IF PG_DEBUG in ('Y', 'C') THEN
10403: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after closing cursor drp_comp');
10404: msc_sch_wb.atp_debug('----- ATP4drp Specific Debug Messages -----');
10405: END IF;
10406: END IF;
10407: -- End Bug 4042403, 4047183, 4070094
10408: END IF;

Line 10418: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after closing cursor cto_comp');

10414: ELSIF l_cto_bom > 0 THEN
10415: CLOSE cto_comp;
10416:
10417: IF PG_DEBUG in ('Y', 'C') THEN
10418: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'after closing cursor cto_comp');
10419: END IF;
10420: END IF;
10421: e_cto_rearch */
10422: i := l_explode_comp.inventory_item_id.NEXT(i);

Line 10425: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'second time, i = '||i);

10421: e_cto_rearch */
10422: i := l_explode_comp.inventory_item_id.NEXT(i);
10423:
10424: IF PG_DEBUG in ('Y', 'C') THEN
10425: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'second time, i = '||i);
10426: END IF;
10427: END LOOP;
10428:
10429: -- 3027711 move initializing x_atp_date/x_avail_assembly_qty to beginning

Line 10432: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date := ' || x_atp_date);

10428:
10429: -- 3027711 move initializing x_atp_date/x_avail_assembly_qty to beginning
10430:
10431: IF PG_DEBUG in ('Y', 'C') THEN
10432: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date := ' || x_atp_date);
10433: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_requirements.inventory_item_id.count = '||
10434: l_comp_requirements.inventory_item_id.count);
10435: END IF;
10436: --msc_sch_wb.atp_debug('l_comp_requirements.pre_process_lead_time.count = '||

Line 10433: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_requirements.inventory_item_id.count = '||

10429: -- 3027711 move initializing x_atp_date/x_avail_assembly_qty to beginning
10430:
10431: IF PG_DEBUG in ('Y', 'C') THEN
10432: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date := ' || x_atp_date);
10433: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_requirements.inventory_item_id.count = '||
10434: l_comp_requirements.inventory_item_id.count);
10435: END IF;
10436: --msc_sch_wb.atp_debug('l_comp_requirements.pre_process_lead_time.count = '||
10437: -- l_comp_requirements.pre_process_lead_time.count);

Line 10436: --msc_sch_wb.atp_debug('l_comp_requirements.pre_process_lead_time.count = '||

10432: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date := ' || x_atp_date);
10433: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_requirements.inventory_item_id.count = '||
10434: l_comp_requirements.inventory_item_id.count);
10435: END IF;
10436: --msc_sch_wb.atp_debug('l_comp_requirements.pre_process_lead_time.count = '||
10437: -- l_comp_requirements.pre_process_lead_time.count);
10438:
10439: j := l_comp_requirements.inventory_item_id.first;
10440: -- if j is null, that means we don't have any comp requirements

Line 10457: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '|| p_search);

10453: --- is greater than sysdate or not
10454: --- if not then we can't meet the requirement
10455: --- We check only when we are in first time.
10456: IF PG_DEBUG in ('Y', 'C') THEN
10457: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '|| p_search);
10458: END IF;
10459:
10460: IF PG_DEBUG in ('Y', 'C') THEN
10461: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'j := '||j);

Line 10461: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'j := '||j);

10457: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = '|| p_search);
10458: END IF;
10459:
10460: IF PG_DEBUG in ('Y', 'C') THEN
10461: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'j := '||j);
10462: END IF;
10463:
10464: ---diag_atp: we look for complete quantity in case of diagnostic ATP
10465: IF PG_DEBUG in ('Y', 'C') THEN

Line 10466: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_requirements.comp_usage(j) := '||l_comp_requirements.comp_usage(j));

10462: END IF;
10463:
10464: ---diag_atp: we look for complete quantity in case of diagnostic ATP
10465: IF PG_DEBUG in ('Y', 'C') THEN
10466: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_requirements.comp_usage(j) := '||l_comp_requirements.comp_usage(j));
10467: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_avail_assembly_qty := '||x_avail_assembly_qty);
10468: END IF;
10469: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
10470: --- for diagnostic atp we always order the full quantity.

Line 10467: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_avail_assembly_qty := '||x_avail_assembly_qty);

10463:
10464: ---diag_atp: we look for complete quantity in case of diagnostic ATP
10465: IF PG_DEBUG in ('Y', 'C') THEN
10466: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_comp_requirements.comp_usage(j) := '||l_comp_requirements.comp_usage(j));
10467: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_avail_assembly_qty := '||x_avail_assembly_qty);
10468: END IF;
10469: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 1 THEN
10470: --- for diagnostic atp we always order the full quantity.
10471: IF ( (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND nvl(l_comp_requirements.scaling_type(j),1) = 2) OR

Line 10493: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_requested_comp_qty := '||l_requested_comp_qty);

10489:
10490: END IF;
10491: --4570421 , print l_requested_comp_qty here !
10492: IF PG_DEBUG in ('Y', 'C') THEN
10493: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_requested_comp_qty := '||l_requested_comp_qty);
10494: END IF;
10495:
10496: -- now call atp check for this item:
10497: -- 1: populate the atp rec

Line 10513: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);

10509:
10510: MSC_ATP_PVT.G_ASSEMBLY_LINE_ID := NVL(l_comp_requirements.assembly_identifier(j), MSC_ATP_PVT.G_ASSEMBLY_LINE_ID);
10511: MSC_ATP_PVT.G_COMP_LINE_ID := NVL(l_comp_requirements.component_identifier(j), MSC_ATP_PVT.G_COMP_LINE_ID);
10512: IF PG_DEBUG in ('Y', 'C') THEN
10513: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'G_COMP_LINE_ID = '||MSC_ATP_PVT.G_COMP_LINE_ID);
10514: END IF;
10515:
10516: -- no need to do uom conversion
10517: l_atp_rec.instance_id := p_instance_id;

Line 10564: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Demand Class being passed is : '|| l_atp_rec.demand_class);

10560: -- Bug 2424357
10561: l_atp_rec.demand_class := NVL(MSC_ATP_PVT.G_ATP_DEMAND_CLASS, p_demand_class);
10562:
10563: IF PG_DEBUG in ('Y', 'C') THEN
10564: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Demand Class being passed is : '|| l_atp_rec.demand_class);
10565: END IF;
10566: -- end 2408902
10567:
10568: --s_cto_enhc

Line 10582: msc_sch_wb.atp_debug('Item not collected := ' || l_comp_requirements.inventory_item_id(j));

10578: --item doesn't exists in the given organization
10579: l_model_error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
10580:
10581: IF PG_DEBUG in ('Y', 'C') THEN
10582: msc_sch_wb.atp_debug('Item not collected := ' || l_comp_requirements.inventory_item_id(j));
10583: END IF;
10584:
10585: ELSIF l_model_flag = 1 and l_comp_requirements.atp_flag(j) = 'N'
10586: and l_comp_requirements.atp_components_flag(j) = 'N' THEN

Line 10612: msc_sch_wb.atp_debug('Match found := ' || l_atp_rec.inventory_item_id);

10608: l_atp_rec.demand_class);*/
10609: /* time_phased_atp changes begin
10610: Call new procedure Get_PF_Plan_Info*/
10611: IF PG_DEBUG in ('Y', 'C') THEN
10612: msc_sch_wb.atp_debug('Match found := ' || l_atp_rec.inventory_item_id);
10613: msc_sch_wb.atp_debug('Find plan for match');
10614: END IF;
10615: MSC_ATP_PF.Get_PF_Plan_Info(
10616: p_instance_id,

Line 10613: msc_sch_wb.atp_debug('Find plan for match');

10609: /* time_phased_atp changes begin
10610: Call new procedure Get_PF_Plan_Info*/
10611: IF PG_DEBUG in ('Y', 'C') THEN
10612: msc_sch_wb.atp_debug('Match found := ' || l_atp_rec.inventory_item_id);
10613: msc_sch_wb.atp_debug('Find plan for match');
10614: END IF;
10615: MSC_ATP_PF.Get_PF_Plan_Info(
10616: p_instance_id,
10617: l_atp_rec.request_item_id,

Line 10629: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Error encountered in Get_PF_Plan_Info');

10625: );
10626:
10627: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10628: IF PG_DEBUG in ('Y', 'C') THEN
10629: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Error encountered in Get_PF_Plan_Info');
10630: END IF;
10631: END IF;
10632: /* time_phased_atp changes end*/
10633:

Line 10637: msc_sch_wb.atp_debug('Plan found for match := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id );

10633:
10634: IF MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id is not null and
10635: NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id, -1) <> -1 then
10636: IF PG_DEBUG in ('Y', 'C') THEN
10637: msc_sch_wb.atp_debug('Plan found for match := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id );
10638: END IF;
10639: ---plan found for match
10640: l_plan_found_for_match := 1;
10641: --l_atp_rec.request_item_id := l_comp_requirements.match_item_id(j);

Line 10648: msc_sch_wb.atp_debug('Plan not found for match := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id );

10644: ELSE
10645: ---plan is not found for match. Do ATP on model level
10646: --l_atp_rec.inventory_item_id := l_comp_requirements.inventory_item_id(j);
10647: IF PG_DEBUG in ('Y', 'C') THEN
10648: msc_sch_wb.atp_debug('Plan not found for match := ' || MSC_ATP_PVT.G_PLAN_INFO_REC.plan_id );
10649: END IF;
10650: /* time_phased_atp
10651: Support PF ATP for components*/
10652: l_atp_rec.inventory_item_id := l_comp_requirements.inventory_item_id(j);

Line 10683: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Error encountered in Get_PF_Plan_Info');

10679: );
10680:
10681: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10682: IF PG_DEBUG in ('Y', 'C') THEN
10683: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Error encountered in Get_PF_Plan_Info');
10684: END IF;
10685: END IF;
10686: /* time_phased_atp changes end*/
10687: END IF;

Line 10702: msc_sch_wb.atp_debug ('Plan ID in Get_Comp_Reqs : ' || l_plan_id);

10698: l_atp_rec.quantity_uom := l_comp_requirements.comp_uom(j); --bug3110023
10699:
10700: -- changes for bug 2392456 ends
10701:
10702: msc_sch_wb.atp_debug ('Plan ID in Get_Comp_Reqs : ' || l_plan_id);
10703: IF (l_plan_id is NULL) or (l_plan_id IN (-100, -200)) THEN
10704: --s_cto_rearch
10705: IF l_model_flag = 1 THEN
10706: l_model_error_code := MSC_ATP_PVT.PLAN_NOT_FOUND;

Line 10719: msc_sch_wb.atp_debug('Get_Comp_Req: ATP Downtime Detected');

10715: -- 24x7
10716: IF (l_plan_id = -300) then
10717: l_atp_rec.error_code := MSC_ATP_PVT.TRY_ATP_LATER;
10718: IF PG_DEBUG in ('Y', 'C') THEN
10719: msc_sch_wb.atp_debug('Get_Comp_Req: ATP Downtime Detected');
10720: msc_sch_wb.atp_debug('Get_Comp_Requirements: ATP Downtime');
10721: END IF;
10722: MSC_ATP_PVT.G_DOWNTIME_HIT := 'Y';
10723: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;

Line 10720: msc_sch_wb.atp_debug('Get_Comp_Requirements: ATP Downtime');

10716: IF (l_plan_id = -300) then
10717: l_atp_rec.error_code := MSC_ATP_PVT.TRY_ATP_LATER;
10718: IF PG_DEBUG in ('Y', 'C') THEN
10719: msc_sch_wb.atp_debug('Get_Comp_Req: ATP Downtime Detected');
10720: msc_sch_wb.atp_debug('Get_Comp_Requirements: ATP Downtime');
10721: END IF;
10722: MSC_ATP_PVT.G_DOWNTIME_HIT := 'Y';
10723: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
10724: End IF;

Line 10788: msc_sch_wb.atp_debug('Model entity and error has occured');

10784: ---e_cto_rearch
10785: IF l_model_flag = 1 and l_model_error_code > 0 THEN
10786:
10787: IF PG_DEBUG in ('Y', 'C') THEN
10788: msc_sch_wb.atp_debug('Model entity and error has occured');
10789: msc_sch_wb.atp_debug('Error code := ' || l_model_error_code);
10790: END IF;
10791:
10792: l_atp_rec.combined_requested_date_qty := 0;

Line 10789: msc_sch_wb.atp_debug('Error code := ' || l_model_error_code);

10785: IF l_model_flag = 1 and l_model_error_code > 0 THEN
10786:
10787: IF PG_DEBUG in ('Y', 'C') THEN
10788: msc_sch_wb.atp_debug('Model entity and error has occured');
10789: msc_sch_wb.atp_debug('Error code := ' || l_model_error_code);
10790: END IF;
10791:
10792: l_atp_rec.combined_requested_date_qty := 0;
10793: l_atp_rec.requested_date_quantity := 0;

Line 10858: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_rec.parent_item_id ' || l_atp_rec.parent_item_id );

10854: l_atp_rec.parent_item_id := p_inventory_item_id;
10855: END IF;
10856:
10857: IF PG_DEBUG in ('Y', 'C') THEN
10858: msc_sch_wb.atp_debug('Get_Comp_Requirements: l_atp_rec.parent_item_id ' || l_atp_rec.parent_item_id );
10859: END IF;
10860: -- End ATP4drp
10861:
10862: MSC_ATP_PVT.ATP_Check(l_atp_rec,

Line 10884: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || ' Error in OSS');

10880:
10881: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
10882:
10883: IF PG_DEBUG in ('Y', 'C') THEN
10884: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || ' Error in OSS');
10885: END IF;
10886:
10887: -- Bug 1531429, in case return status is not success, raise an exception.
10888: -- krajan: 2400614

Line 10897: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Get_Comp_Req: Error in ATP_CHECK 0.1');

10893: -- krajan : 2752705 and dsting 2764213 : Other errors that need to go through to the
10894: -- top level model are also handled the same way as the mismatch case.
10895: ELSIF x_return_status = MSC_ATP_PVT.G_ATO_SRC_MISMATCH THEN
10896: IF PG_DEBUG in ('Y', 'C') THEN
10897: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Get_Comp_Req: Error in ATP_CHECK 0.1');
10898: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Error in lower level component check');
10899: END IF;
10900: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
10901:

Line 10898: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Error in lower level component check');

10894: -- top level model are also handled the same way as the mismatch case.
10895: ELSIF x_return_status = MSC_ATP_PVT.G_ATO_SRC_MISMATCH THEN
10896: IF PG_DEBUG in ('Y', 'C') THEN
10897: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Get_Comp_Req: Error in ATP_CHECK 0.1');
10898: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'Error in lower level component check');
10899: END IF;
10900: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
10901:
10902: --bug 3308206: IF ATP rule is not defined on the item then error out with message

Line 10906: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'No ATP rule on Component');

10902: --bug 3308206: IF ATP rule is not defined on the item then error out with message
10903: ELSIF MSC_ATP_PVT.G_INV_CTP = 5 and x_return_status <> FND_API.G_RET_STS_SUCCESS
10904: and l_atp_rec.error_code = MSC_ATP_PVT.ATP_BAD_RULE THEN
10905: IF PG_DEBUG in ('Y', 'C') THEN
10906: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'No ATP rule on Component');
10907: END IF;
10908: RAISE MSC_ATP_PVT.EXC_NO_ATP_RULE;
10909: END IF;
10910:

Line 10914: msc_sch_wb.atp_debug('Get_Comp_Req: Error in ATP_CHECK 0.2');

10910:
10911: -- dsting 2764213
10912: IF x_return_status = MSC_ATP_PVT.G_NO_PLAN_FOUND THEN
10913: IF PG_DEBUG in ('Y', 'C') THEN
10914: msc_sch_wb.atp_debug('Get_Comp_Req: Error in ATP_CHECK 0.2');
10915: msc_sch_wb.atp_debug('Get_Comp_Requirements: Error in lower level component check');
10916: END IF;
10917: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
10918: END IF;

Line 10915: msc_sch_wb.atp_debug('Get_Comp_Requirements: Error in lower level component check');

10911: -- dsting 2764213
10912: IF x_return_status = MSC_ATP_PVT.G_NO_PLAN_FOUND THEN
10913: IF PG_DEBUG in ('Y', 'C') THEN
10914: msc_sch_wb.atp_debug('Get_Comp_Req: Error in ATP_CHECK 0.2');
10915: msc_sch_wb.atp_debug('Get_Comp_Requirements: Error in lower level component check');
10916: END IF;
10917: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
10918: END IF;
10919:

Line 10923: msc_sch_wb.atp_debug('Get_Comp_Req: Error in ATP_CHECK 0.3');

10919:
10920: -- krajan 2752705
10921: IF x_return_status = MSC_ATP_PVT.G_ATO_UNCOLL_ITEM THEN
10922: IF PG_DEBUG in ('Y', 'C') THEN
10923: msc_sch_wb.atp_debug('Get_Comp_Req: Error in ATP_CHECK 0.3');
10924: msc_sch_wb.atp_debug('Get_Comp_Requirements: Error in lower level component check');
10925: END IF;
10926: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
10927: END IF;

Line 10924: msc_sch_wb.atp_debug('Get_Comp_Requirements: Error in lower level component check');

10920: -- krajan 2752705
10921: IF x_return_status = MSC_ATP_PVT.G_ATO_UNCOLL_ITEM THEN
10922: IF PG_DEBUG in ('Y', 'C') THEN
10923: msc_sch_wb.atp_debug('Get_Comp_Req: Error in ATP_CHECK 0.3');
10924: msc_sch_wb.atp_debug('Get_Comp_Requirements: Error in lower level component check');
10925: END IF;
10926: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
10927: END IF;
10928:

Line 10943: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atp_rec.combined_requested_date_qty := ' || l_atp_rec.combined_requested_date_qty);

10939:
10940:
10941: -- now adjust the x_avail_assembly_qty
10942: IF PG_DEBUG in ('Y', 'C') THEN
10943: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atp_rec.combined_requested_date_qty := ' || l_atp_rec.combined_requested_date_qty);
10944: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atp_rec.requested_date_quantity := ' ||l_atp_rec.requested_date_quantity);
10945: END IF;
10946:
10947: IF p_search = 1 THEN

Line 10944: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atp_rec.requested_date_quantity := ' ||l_atp_rec.requested_date_quantity);

10940:
10941: -- now adjust the x_avail_assembly_qty
10942: IF PG_DEBUG in ('Y', 'C') THEN
10943: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atp_rec.combined_requested_date_qty := ' || l_atp_rec.combined_requested_date_qty);
10944: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'l_atp_rec.requested_date_quantity := ' ||l_atp_rec.requested_date_quantity);
10945: END IF;
10946:
10947: IF p_search = 1 THEN
10948:

Line 10950: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = 1');

10946:
10947: IF p_search = 1 THEN
10948:
10949: IF PG_DEBUG in ('Y', 'C') THEN
10950: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = 1');
10951: END IF;
10952:
10953: -- cchen 1238941
10954: --4570421

Line 10964: msc_sch_wb.atp_debug('Fixed or Lot Based Case: Lot qty not available: avail_assembly_qty: ' || x_avail_assembly_qty);

10960: IF ( (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.DISCRETE_ORG AND nvl(l_comp_requirements.scaling_type(j),1) = 2) OR
10961: (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG AND nvl(l_comp_requirements.scaling_type(j),1) IN (0,2))) THEN
10962: x_avail_assembly_qty := 0;
10963: IF PG_DEBUG in ('Y', 'C') THEN
10964: msc_sch_wb.atp_debug('Fixed or Lot Based Case: Lot qty not available: avail_assembly_qty: ' || x_avail_assembly_qty);
10965: END IF;
10966: IF MSC_ATP_PVT.G_DIAGNOSTIC_ATP = 2 THEN --5403495
10967: EXIT;
10968: END IF;

Line 10972: msc_sch_wb.atp_debug('Before inverse scaling : avail_assembly_qty: ' || x_avail_assembly_qty);

10968: END IF;
10969: --EXIT;
10970: ELSIF ( (MSC_ATP_PVT.G_ORG_INFO_REC.org_type = MSC_ATP_PVT.OPM_ORG) AND (nvl(l_comp_requirements.scaling_type(j),1) IN (4,5)) ) THEN
10971: IF PG_DEBUG in ('Y', 'C') THEN
10972: msc_sch_wb.atp_debug('Before inverse scaling : avail_assembly_qty: ' || x_avail_assembly_qty);
10973: END IF;
10974: x_avail_assembly_qty := LEAST(x_avail_assembly_qty,
10975: round(
10976: FLOOR( NVL(l_atp_rec.combined_requested_date_qty,

Line 10980: msc_sch_wb.atp_debug('Integer Scaling case : avail_assembly_qty: ' || x_avail_assembly_qty);

10976: FLOOR( NVL(l_atp_rec.combined_requested_date_qty,
10977: l_atp_rec.requested_date_quantity)/l_comp_requirements.scale_multiple(j))* l_comp_requirements.scale_multiple(j)
10978: /l_comp_requirements.comp_usage(j),6));
10979: IF PG_DEBUG in ('Y', 'C') THEN
10980: msc_sch_wb.atp_debug('Integer Scaling case : avail_assembly_qty: ' || x_avail_assembly_qty);
10981: END IF;
10982: ELSE
10983: x_avail_assembly_qty := LEAST(x_avail_assembly_qty,
10984: trunc(NVL(l_atp_rec.combined_requested_date_qty,

Line 10988: msc_sch_wb.atp_debug('Item or Proportional case : avail_assembly_qty: ' || x_avail_assembly_qty);

10984: trunc(NVL(l_atp_rec.combined_requested_date_qty,
10985: l_atp_rec.requested_date_quantity)/
10986: l_comp_requirements.comp_usage(j),6)); -- 5598066
10987: IF PG_DEBUG in ('Y', 'C') THEN
10988: msc_sch_wb.atp_debug('Item or Proportional case : avail_assembly_qty: ' || x_avail_assembly_qty);
10989: END IF;
10990: END IF;
10991: ELSE
10992: x_avail_assembly_qty := 0;

Line 11004: msc_sch_wb.atp_debug('avail_assembly_qty: ' || x_avail_assembly_qty);

11000: --x_avail_assembly_qty := 0;
11001:
11002: -- 2869830
11003: IF PG_DEBUG in ('Y', 'C') THEN
11004: msc_sch_wb.atp_debug('avail_assembly_qty: ' || x_avail_assembly_qty);
11005: END IF;
11006:
11007: IF l_rounding_flag = 1 THEN
11008: x_avail_assembly_qty := FLOOR(x_avail_assembly_qty);

Line 11009: msc_sch_wb.atp_debug('rounded avail qty: ' ||

11005: END IF;
11006:
11007: IF l_rounding_flag = 1 THEN
11008: x_avail_assembly_qty := FLOOR(x_avail_assembly_qty);
11009: msc_sch_wb.atp_debug('rounded avail qty: ' ||
11010: x_avail_assembly_qty);
11011: END IF;
11012: IF PG_DEBUG in ('Y', 'C') THEN
11013: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_avail_assembly_qty' || x_avail_assembly_qty);

Line 11013: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_avail_assembly_qty' || x_avail_assembly_qty);

11009: msc_sch_wb.atp_debug('rounded avail qty: ' ||
11010: x_avail_assembly_qty);
11011: END IF;
11012: IF PG_DEBUG in ('Y', 'C') THEN
11013: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_avail_assembly_qty' || x_avail_assembly_qty);
11014: END IF;
11015: ELSE
11016: IF PG_DEBUG in ('Y', 'C') THEN
11017: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = 2');

Line 11017: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = 2');

11013: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_avail_assembly_qty' || x_avail_assembly_qty);
11014: END IF;
11015: ELSE
11016: IF PG_DEBUG in ('Y', 'C') THEN
11017: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'p_search = 2');
11018: END IF;
11019:
11020: IF l_atp_rec.ship_date IS NOT NULL THEN
11021: x_atp_date := GREATEST(MSC_CALENDAR.DATE_OFFSET

Line 11034: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date := ' || x_atp_date);

11030: -- then date from last source will be used as the availability date.
11031: ---Therefore, no need to continue further
11032: IF x_atp_date >= p_comp_info_rec.ship_date_this_level THEN
11033: IF PG_DEBUG in ('Y', 'C') THEN
11034: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date := ' || x_atp_date);
11035: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date > ship_date_this_level. Therefore exit');
11036: END IF;
11037: x_atp_date := null;
11038: EXIT;

Line 11035: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date > ship_date_this_level. Therefore exit');

11031: ---Therefore, no need to continue further
11032: IF x_atp_date >= p_comp_info_rec.ship_date_this_level THEN
11033: IF PG_DEBUG in ('Y', 'C') THEN
11034: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date := ' || x_atp_date);
11035: msc_sch_wb.atp_debug('Get_Comp_Requirements: ' || 'x_atp_date > ship_date_this_level. Therefore exit');
11036: END IF;
11037: x_atp_date := null;
11038: EXIT;
11039: END IF;

Line 11051: msc_sch_wb.atp_debug('***** End Get_Comp_Requirements *****');

11047:
11048: END LOOP;
11049:
11050: IF PG_DEBUG in ('Y', 'C') THEN
11051: msc_sch_wb.atp_debug('***** End Get_Comp_Requirements *****');
11052: END IF;
11053:
11054:
11055: Exception

Line 11060: msc_sch_wb.atp_debug('Get_Comp_Reqs: ' || 'Invalid OSS setup detected');

11056:
11057: WHEN MSC_ATP_PVT.INVALID_OSS_SOURCE THEN
11058:
11059: IF PG_DEBUG in ('Y', 'C') THEN
11060: msc_sch_wb.atp_debug('Get_Comp_Reqs: ' || 'Invalid OSS setup detected');
11061: END IF;
11062: x_avail_assembly_qty := 0;
11063: x_atp_date := null;
11064: x_return_status := MSC_ATP_PVT.CTO_OSS_Error;

Line 11069: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block for G_ATO_SOURCE');

11065:
11066: -- 2400614 : krajan
11067: WHEN MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH THEN
11068: IF PG_DEBUG in ('Y', 'C') THEN
11069: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block for G_ATO_SOURCE');
11070: END IF;
11071: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
11072: RAISE MSC_ATP_PVT.G_ATO_SOURCING_MISMATCH;
11073:

Line 11077: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block for EXC_NO_PLAN_FOUND');

11073:
11074: -- dsting 2764213
11075: WHEN MSC_ATP_PVT.EXC_NO_PLAN_FOUND THEN
11076: IF PG_DEBUG in ('Y', 'C') THEN
11077: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block for EXC_NO_PLAN_FOUND');
11078: END IF;
11079: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
11080: RAISE MSC_ATP_PVT.EXC_NO_PLAN_FOUND;
11081:

Line 11085: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block for G_EXC_UNCOLLECTED_ITEM');

11081:
11082: -- krajan 2752705
11083: WHEN MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM THEN
11084: IF PG_DEBUG in ('Y', 'C') THEN
11085: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block for G_EXC_UNCOLLECTED_ITEM');
11086: END IF;
11087: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
11088: RAISE MSC_ATP_PVT.G_EXC_UNCOLLECTED_ITEM;
11089:

Line 11093: msc_sch_wb.atp_debug('Get_Comp_Reqs: IN Exception Block for EXC_NO_ATP_RULE');

11089:
11090: ---bug 3308206: Add exception so that it could be propogated to ATP_check
11091: WHEN MSC_ATP_PVT.EXC_NO_ATP_RULE THEN
11092: IF PG_DEBUG in ('Y', 'C') THEN
11093: msc_sch_wb.atp_debug('Get_Comp_Reqs: IN Exception Block for EXC_NO_ATP_RULE');
11094: END IF;
11095: RAISE MSC_ATP_PVT.EXC_NO_ATP_RULE;
11096:
11097: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705

Line 11099: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block for NO_MATCHING_DATE_IN_CAL');

11095: RAISE MSC_ATP_PVT.EXC_NO_ATP_RULE;
11096:
11097: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN --bug3583705
11098: IF PG_DEBUG in ('Y', 'C') THEN
11099: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block for NO_MATCHING_DATE_IN_CAL');
11100: END IF;
11101: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
11102:
11103: WHEN OTHERS THEN

Line 11105: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block in others');

11101: RAISE MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL;
11102:
11103: WHEN OTHERS THEN
11104: IF PG_DEBUG in ('Y', 'C') THEN
11105: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block in others');
11106: msc_sch_wb.atp_debug ('error := ' || SQLERRM);
11107: END IF;
11108: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
11109: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 11106: msc_sch_wb.atp_debug ('error := ' || SQLERRM);

11102:
11103: WHEN OTHERS THEN
11104: IF PG_DEBUG in ('Y', 'C') THEN
11105: msc_sch_wb.atp_debug ('Get_Comp_Reqs: IN Exception Block in others');
11106: msc_sch_wb.atp_debug ('error := ' || SQLERRM);
11107: END IF;
11108: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
11109: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
11110:

Line 11186: msc_sch_wb.atp_debug('***** Begin Get_Supplier_Atp_Info Procedure *****');

11182:
11183: BEGIN
11184:
11185: IF PG_DEBUG in ('Y', 'C') THEN
11186: msc_sch_wb.atp_debug('***** Begin Get_Supplier_Atp_Info Procedure *****');
11187: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Supplier_Atp_Info **********');
11188: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inventory_item_id: '|| to_char(p_sup_atp_info_rec.inventory_item_id));
11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));
11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));

Line 11187: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Supplier_Atp_Info **********');

11183: BEGIN
11184:
11185: IF PG_DEBUG in ('Y', 'C') THEN
11186: msc_sch_wb.atp_debug('***** Begin Get_Supplier_Atp_Info Procedure *****');
11187: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Supplier_Atp_Info **********');
11188: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inventory_item_id: '|| to_char(p_sup_atp_info_rec.inventory_item_id));
11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));
11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));
11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));

Line 11188: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inventory_item_id: '|| to_char(p_sup_atp_info_rec.inventory_item_id));

11184:
11185: IF PG_DEBUG in ('Y', 'C') THEN
11186: msc_sch_wb.atp_debug('***** Begin Get_Supplier_Atp_Info Procedure *****');
11187: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Supplier_Atp_Info **********');
11188: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inventory_item_id: '|| to_char(p_sup_atp_info_rec.inventory_item_id));
11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));
11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));
11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));
11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));

Line 11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));

11185: IF PG_DEBUG in ('Y', 'C') THEN
11186: msc_sch_wb.atp_debug('***** Begin Get_Supplier_Atp_Info Procedure *****');
11187: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Supplier_Atp_Info **********');
11188: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inventory_item_id: '|| to_char(p_sup_atp_info_rec.inventory_item_id));
11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));
11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));
11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));
11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));
11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));

Line 11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));

11186: msc_sch_wb.atp_debug('***** Begin Get_Supplier_Atp_Info Procedure *****');
11187: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Supplier_Atp_Info **********');
11188: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inventory_item_id: '|| to_char(p_sup_atp_info_rec.inventory_item_id));
11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));
11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));
11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));
11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));
11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));
11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));

Line 11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));

11187: msc_sch_wb.atp_debug('********** INPUT DATA:Get_Supplier_Atp_Info **********');
11188: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inventory_item_id: '|| to_char(p_sup_atp_info_rec.inventory_item_id));
11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));
11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));
11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));
11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));
11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));
11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));
11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));

Line 11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));

11188: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inventory_item_id: '|| to_char(p_sup_atp_info_rec.inventory_item_id));
11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));
11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));
11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));
11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));
11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));
11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));
11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));
11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));

Line 11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));

11189: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'organization_id: '|| to_char(p_sup_atp_info_rec.organization_id));
11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));
11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));
11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));
11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));
11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));
11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));
11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));
11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));

Line 11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));

11190: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'requested_date: '|| to_char(p_sup_atp_info_rec.requested_date));
11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));
11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));
11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));
11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));
11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));
11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));
11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));
11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);

Line 11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));

11191: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'instance_id: '|| to_char(p_sup_atp_info_rec.instance_id));
11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));
11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));
11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));
11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));
11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));
11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));
11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);
11199: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rep_ord_flag := ' || p_sup_atp_info_rec.rep_ord_flag);

Line 11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));

11192: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'plan_id: '|| to_char(p_sup_atp_info_rec.plan_id));
11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));
11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));
11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));
11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));
11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));
11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);
11199: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rep_ord_flag := ' || p_sup_atp_info_rec.rep_ord_flag);
11200: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'base item id := ' || p_sup_atp_info_rec.base_item_id);

Line 11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));

11193: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'quantity_ordered: '|| to_char(p_sup_atp_info_rec.quantity_ordered));
11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));
11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));
11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));
11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));
11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);
11199: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rep_ord_flag := ' || p_sup_atp_info_rec.rep_ord_flag);
11200: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'base item id := ' || p_sup_atp_info_rec.base_item_id);
11201: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

Line 11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);

11194: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'insert_flag: '|| to_char(p_sup_atp_info_rec.insert_flag));
11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));
11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));
11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));
11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);
11199: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rep_ord_flag := ' || p_sup_atp_info_rec.rep_ord_flag);
11200: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'base item id := ' || p_sup_atp_info_rec.base_item_id);
11201: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
11202: END IF;

Line 11199: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rep_ord_flag := ' || p_sup_atp_info_rec.rep_ord_flag);

11195: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_id: '|| to_char(p_sup_atp_info_rec.supplier_id));
11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));
11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));
11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);
11199: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rep_ord_flag := ' || p_sup_atp_info_rec.rep_ord_flag);
11200: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'base item id := ' || p_sup_atp_info_rec.base_item_id);
11201: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
11202: END IF;
11203:

Line 11200: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'base item id := ' || p_sup_atp_info_rec.base_item_id);

11196: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'supplier_site_id: '|| to_char(p_sup_atp_info_rec.supplier_site_id));
11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));
11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);
11199: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rep_ord_flag := ' || p_sup_atp_info_rec.rep_ord_flag);
11200: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'base item id := ' || p_sup_atp_info_rec.base_item_id);
11201: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
11202: END IF;
11203:
11204:

Line 11201: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);

11197: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'sup_cap_cum_date: '|| to_char(p_sup_atp_info_rec.sup_cap_cum_date));
11198: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || ' bom_item_type : ' || p_sup_atp_info_rec.bom_item_type);
11199: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rep_ord_flag := ' || p_sup_atp_info_rec.rep_ord_flag);
11200: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'base item id := ' || p_sup_atp_info_rec.base_item_id);
11201: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'MSC_ATP_PVT.G_PTF_DATE := ' || MSC_ATP_PVT.G_PTF_DATE);
11202: END IF;
11203:
11204:
11205: -- initialize API return status to success

Line 11218: msc_sch_wb.atp_debug('G_PURCHASE_ORDER_PREFERENCE := ' || G_PURCHASE_ORDER_PREFERENCE);

11214: l_uom_code := MSC_ATP_PVT.G_ITEM_INFO_REC.uom_code;
11215: l_postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
11216:
11217: IF PG_DEBUG in ('Y', 'C') THEN
11218: msc_sch_wb.atp_debug('G_PURCHASE_ORDER_PREFERENCE := ' || G_PURCHASE_ORDER_PREFERENCE);
11219: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_uom_code and l_postprocessing_lead_time = '||
11220: l_uom_code ||' : '||l_postprocessing_lead_time);
11221: END IF;
11222:

Line 11219: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_uom_code and l_postprocessing_lead_time = '||

11215: l_postprocessing_lead_time := MSC_ATP_PVT.G_ITEM_INFO_REC.pre_pro_lt;
11216:
11217: IF PG_DEBUG in ('Y', 'C') THEN
11218: msc_sch_wb.atp_debug('G_PURCHASE_ORDER_PREFERENCE := ' || G_PURCHASE_ORDER_PREFERENCE);
11219: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_uom_code and l_postprocessing_lead_time = '||
11220: l_uom_code ||' : '||l_postprocessing_lead_time);
11221: END IF;
11222:
11223: --s_cto_rearch

Line 11226: msc_sch_wb.atp_debug('ATO item');

11222:
11223: --s_cto_rearch
11224: IF (p_sup_atp_info_rec.bom_item_type = 4 and p_sup_atp_info_rec.rep_ord_flag = 'Y') THEN
11225: IF PG_DEBUG in ('Y', 'C') THEN
11226: msc_sch_wb.atp_debug('ATO item');
11227: END IF;
11228: l_inv_item_id := p_sup_atp_info_rec.base_item_id;
11229: l_check_cap_model_flag := 1;
11230: ELSIF p_sup_atp_info_rec.bom_item_type = 1 THEN

Line 11232: msc_sch_wb.atp_debug('Model entity');

11228: l_inv_item_id := p_sup_atp_info_rec.base_item_id;
11229: l_check_cap_model_flag := 1;
11230: ELSIF p_sup_atp_info_rec.bom_item_type = 1 THEN
11231: IF PG_DEBUG in ('Y', 'C') THEN
11232: msc_sch_wb.atp_debug('Model entity');
11233: END IF;
11234: l_inv_item_id := p_sup_atp_info_rec.inventory_item_id;
11235: l_check_cap_model_flag := 1;
11236: ELSE

Line 11238: msc_sch_wb.atp_debug('Standard Item');

11234: l_inv_item_id := p_sup_atp_info_rec.inventory_item_id;
11235: l_check_cap_model_flag := 1;
11236: ELSE
11237: IF PG_DEBUG in ('Y', 'C') THEN
11238: msc_sch_wb.atp_debug('Standard Item');
11239: END IF;
11240: l_inv_item_id := p_sup_atp_info_rec.inventory_item_id;
11241: END IF;
11242: --e_cto_rearch

Line 11244: msc_sch_wb.atp_debug('l_inv_item_id := ' || l_inv_item_id);

11240: l_inv_item_id := p_sup_atp_info_rec.inventory_item_id;
11241: END IF;
11242: --e_cto_rearch
11243: IF PG_DEBUG in ('Y', 'C') THEN
11244: msc_sch_wb.atp_debug('l_inv_item_id := ' || l_inv_item_id);
11245: END IF;
11246:
11247:
11248: -- bug 1169467

Line 11288: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date = '||l_plan_start_date);

11284: only for unconstrained plans or if the plan option to enforce capacity was enforced. Now this is not required
11285: as capacity is always enforced. */
11286:
11287: IF PG_DEBUG in ('Y', 'C') THEN
11288: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date = '||l_plan_start_date);
11289: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_instance_id = '||l_instance_id);
11290: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_org_id = '||l_org_id);
11291: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_cutoff_date = '||l_cutoff_date);
11292: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_atp_rule_id='||

Line 11289: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_instance_id = '||l_instance_id);

11285: as capacity is always enforced. */
11286:
11287: IF PG_DEBUG in ('Y', 'C') THEN
11288: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date = '||l_plan_start_date);
11289: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_instance_id = '||l_instance_id);
11290: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_org_id = '||l_org_id);
11291: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_cutoff_date = '||l_cutoff_date);
11292: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_atp_rule_id='||
11293: l_default_atp_rule_id);

Line 11290: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_org_id = '||l_org_id);

11286:
11287: IF PG_DEBUG in ('Y', 'C') THEN
11288: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date = '||l_plan_start_date);
11289: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_instance_id = '||l_instance_id);
11290: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_org_id = '||l_org_id);
11291: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_cutoff_date = '||l_cutoff_date);
11292: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_atp_rule_id='||
11293: l_default_atp_rule_id);
11294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);

Line 11291: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_cutoff_date = '||l_cutoff_date);

11287: IF PG_DEBUG in ('Y', 'C') THEN
11288: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date = '||l_plan_start_date);
11289: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_instance_id = '||l_instance_id);
11290: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_org_id = '||l_org_id);
11291: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_cutoff_date = '||l_cutoff_date);
11292: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_atp_rule_id='||
11293: l_default_atp_rule_id);
11294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
11295: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_exception_set_id'||

Line 11292: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_atp_rule_id='||

11288: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date = '||l_plan_start_date);
11289: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_instance_id = '||l_instance_id);
11290: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_org_id = '||l_org_id);
11291: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_cutoff_date = '||l_cutoff_date);
11292: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_atp_rule_id='||
11293: l_default_atp_rule_id);
11294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
11295: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_exception_set_id'||
11296: l_calendar_exception_set_id);

Line 11294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);

11290: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_org_id = '||l_org_id);
11291: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_cutoff_date = '||l_cutoff_date);
11292: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_atp_rule_id='||
11293: l_default_atp_rule_id);
11294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
11295: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_exception_set_id'||
11296: l_calendar_exception_set_id);
11297: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_demand_class'||
11298: l_default_demand_class);

Line 11295: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_exception_set_id'||

11291: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_cutoff_date = '||l_cutoff_date);
11292: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_atp_rule_id='||
11293: l_default_atp_rule_id);
11294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
11295: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_exception_set_id'||
11296: l_calendar_exception_set_id);
11297: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_demand_class'||
11298: l_default_demand_class);
11299: END IF;

Line 11297: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_demand_class'||

11293: l_default_atp_rule_id);
11294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_code='||l_calendar_code);
11295: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_calendar_exception_set_id'||
11296: l_calendar_exception_set_id);
11297: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_default_demand_class'||
11298: l_default_demand_class);
11299: END IF;
11300:
11301: /* Enforce Pur LT - capacity is always enforced.

Line 11321: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_last_cap_next_date='||

11317: END IF;
11318: /* Enforce Pur LT changes end */
11319:
11320: IF PG_DEBUG in ('Y', 'C') THEN
11321: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_last_cap_next_date='||
11322: l_last_cap_next_date);
11323: END IF;
11324:
11325: IF l_capacity_defined = 0 THEN

Line 11335: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date := ' || l_plan_start_date);

11331: l_atp_period_tab.EXTEND;
11332: l_atp_qty_tab.EXTEND;
11333: i:= l_atp_period_tab.COUNT;
11334: IF PG_DEBUG in ('Y', 'C') THEN
11335: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date := ' || l_plan_start_date);
11336: END IF;
11337:
11338: -- Ship_rec_cal.
11339: l_atp_period_tab(i) := l_last_cap_next_date;

Line 11437: msc_sch_wb.atp_debug('l_calendar_code := ' || l_calendar_code);

11433: AND tp.partner_type = 3
11434: AND tp.sr_tp_id = mp.organization_id;
11435: END IF;
11436:
11437: msc_sch_wb.atp_debug('l_calendar_code := ' || l_calendar_code);
11438: --=======================================================================================================
11439: -- ship_rec_cal changes begin
11440: --=======================================================================================================
11441: -- In all the SQLs that get supplier capacities following are the changes:

Line 11468: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_summary_flag := ' || l_summary_flag);

11464: FROM msc_plans plans
11465: WHERE plans.plan_id = p_sup_atp_info_rec.plan_id;
11466:
11467: IF PG_DEBUG in ('Y', 'C') THEN
11468: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_summary_flag := ' || l_summary_flag);
11469: END IF;
11470:
11471: IF l_summary_flag NOT IN (MSC_POST_PRO.G_SF_SUMMARY_NOT_RUN, MSC_POST_PRO.G_SF_PREALLOC_COMPLETED,
11472: MSC_POST_PRO.G_SF_FULL_SUMMARY_RUNNING) THEN

Line 11484: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Summary mode supplier info');

11480: END IF;
11481:
11482: IF l_summary_sql = 'Y' THEN
11483: IF PG_DEBUG in ('Y', 'C') THEN
11484: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Summary mode supplier info');
11485: END IF;
11486:
11487: IF l_check_cap_model_flag = 1 THEN
11488:

Line 11611: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');

11607: /* Cum drop issue changes begin*/
11608: MSC_AATP_PROC.Atp_Remove_Negatives(l_atp_qty_tab, l_return_status);
11609: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
11610: IF PG_DEBUG in ('Y', 'C') THEN
11611: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');
11612: END IF;
11613: RAISE FND_API.G_EXC_ERROR;
11614: END IF;
11615: /* Cum drop issue changes end*/

Line 11620: msc_sch_wb.atp_debug('Check Sources for model, details are off');

11616:
11617: ELSE -- IF l_summary_sql = 'Y' THEN
11618:
11619: IF l_check_cap_model_flag = 1 THEN
11620: msc_sch_wb.atp_debug('Check Sources for model, details are off');
11621:
11622: SELECT trunc(l_date), SUM(quantity) --4135752
11623: BULK COLLECT INTO
11624: l_atp_period_tab,

Line 11700: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');

11696: /* Cum drop issue changes begin*/
11697: MSC_AATP_PROC.Atp_Remove_Negatives(l_atp_qty_tab, l_return_status);
11698: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
11699: IF PG_DEBUG in ('Y', 'C') THEN
11700: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');
11701: END IF;
11702: RAISE FND_API.G_EXC_ERROR;
11703: END IF;
11704: /* Cum drop issue changes end*/

Line 11777: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');

11773: /* Cum drop issue changes begin*/
11774: MSC_AATP_PROC.Atp_Remove_Negatives(l_atp_qty_tab, l_return_status);
11775: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
11776: IF PG_DEBUG in ('Y', 'C') THEN
11777: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');
11778: END IF;
11779: RAISE FND_API.G_EXC_ERROR;
11780: END IF;
11781: /* Cum drop issue changes end*/

Line 11792: msc_sch_wb.atp_debug('Check Sources for model, details are on');

11788:
11789: MSC_ATP_DB_UTILS.Clear_SD_Details_temp();
11790:
11791: IF l_check_cap_model_flag = 1 THEN
11792: msc_sch_wb.atp_debug('Check Sources for model, details are on');
11793: INSERT INTO msc_atp_sd_details_temp (
11794: ATP_level,
11795: Order_line_id,
11796: Scenario_Id,

Line 12129: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'after inserting into msc_atp_sd_details_temp');

12125: END IF; -- IF l_check_cap_model_flag = 1 THEN
12126:
12127: -- for period ATP
12128: IF PG_DEBUG in ('Y', 'C') THEN
12129: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'after inserting into msc_atp_sd_details_temp');
12130: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rows processed: ' || SQL%ROWCOUNT);
12131: END IF;
12132:
12133: MSC_ATP_PROC.get_period_data_from_SD_temp(x_atp_period);

Line 12130: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rows processed: ' || SQL%ROWCOUNT);

12126:
12127: -- for period ATP
12128: IF PG_DEBUG in ('Y', 'C') THEN
12129: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'after inserting into msc_atp_sd_details_temp');
12130: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'rows processed: ' || SQL%ROWCOUNT);
12131: END IF;
12132:
12133: MSC_ATP_PROC.get_period_data_from_SD_temp(x_atp_period);
12134:

Line 12137: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'before atp_consume');

12133: MSC_ATP_PROC.get_period_data_from_SD_temp(x_atp_period);
12134:
12135: x_atp_period.Cumulative_Quantity := x_atp_period.Period_Quantity;
12136: IF PG_DEBUG in ('Y', 'C') THEN
12137: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'before atp_consume');
12138: END IF;
12139: -- do the accumulation
12140: -- 1487804
12141: -- atp_consume(x_atp_period.Cumulative_Quantity, m);

Line 12146: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'after atp_consume');

12142: MSC_ATP_PROC.atp_consume(x_atp_period.Cumulative_Quantity,
12143: x_atp_period.Cumulative_Quantity.COUNT);
12144:
12145: IF PG_DEBUG in ('Y', 'C') THEN
12146: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'after atp_consume');
12147: END IF;
12148:
12149: /* Cum drop issue changes begin*/
12150: MSC_AATP_PROC.Atp_Remove_Negatives(x_atp_period.Cumulative_Quantity, l_return_status);

Line 12153: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');

12149: /* Cum drop issue changes begin*/
12150: MSC_AATP_PROC.Atp_Remove_Negatives(x_atp_period.Cumulative_Quantity, l_return_status);
12151: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12152: IF PG_DEBUG in ('Y', 'C') THEN
12153: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Error occured in procedure Atp_Remove_Negatives');
12154: END IF;
12155: RAISE FND_API.G_EXC_ERROR;
12156: END IF;
12157: /* Cum drop issue changes end*/

Line 12171: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date := ' || l_plan_start_date);

12167: l_atp_period_tab.EXTEND;
12168: l_atp_qty_tab.EXTEND;
12169: i:= l_atp_period_tab.COUNT;
12170: IF PG_DEBUG in ('Y', 'C') THEN
12171: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date := ' || l_plan_start_date);
12172: END IF;
12173:
12174: -- ship_rec_cal
12175: l_atp_period_tab(i) := l_last_cap_next_date;

Line 12179: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date1 := ' || l_plan_start_date);

12175: l_atp_period_tab(i) := l_last_cap_next_date;
12176: l_atp_qty_tab(i) := MSC_ATP_PVT.INFINITE_NUMBER;
12177:
12178: IF PG_DEBUG in ('Y', 'C') THEN
12179: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date1 := ' || l_plan_start_date);
12180: END IF;
12181:
12182: IF (NVL(p_sup_atp_info_rec.insert_flag, 0) <> 0) THEN
12183:

Line 12286: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_last_cap_date := ' || l_last_cap_date);

12282: Done with Enforce Pur LT changes
12283: --sup_cap chnages
12284: --first get the next working from the last day on which capacity is defined.
12285: IF PG_DEBUG in ('Y', 'C') THEN
12286: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_last_cap_date := ' || l_last_cap_date);
12287: END IF;
12288: l_last_cap_date := MSC_CALENDAR.DATE_OFFSET(p_sup_atp_info_rec.organization_id,
12289: p_sup_atp_info_rec.instance_id,
12290: 1,

Line 12294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_last_cap_date after offset := ' || l_last_cap_date);

12290: 1,
12291: l_last_cap_date,
12292: 1);
12293: IF PG_DEBUG in ('Y', 'C') THEN
12294: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_last_cap_date after offset := ' || l_last_cap_date);
12295: END IF;
12296: */
12297:
12298: -- add one more entry to indicate sysdate

Line 12307: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date := ' || l_plan_start_date);

12303: l_atp_period_tab.EXTEND;
12304: l_atp_qty_tab.EXTEND;
12305: i:= l_atp_period_tab.COUNT;
12306: IF PG_DEBUG in ('Y', 'C') THEN
12307: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_plan_start_date := ' || l_plan_start_date);
12308: END IF;
12309:
12310: -- ship_rec_cal
12311: l_atp_period_tab(i) := l_last_cap_next_date;

Line 12349: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'No rows in cursor!!!');

12345:
12346: IF i = 0 THEN
12347: -- need to add error message
12348: IF PG_DEBUG in ('Y', 'C') THEN
12349: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'No rows in cursor!!!');
12350: END IF;
12351: RAISE NO_DATA_FOUND;
12352: END IF;
12353:

Line 12356: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Date '||l_atp_period_tab(i)||' Qty '||

12352: END IF;
12353:
12354: FOR i in 1..l_atp_period_tab.COUNT LOOP
12355: IF PG_DEBUG in ('Y', 'C') THEN
12356: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'Date '||l_atp_period_tab(i)||' Qty '||
12357: l_atp_qty_tab(i));
12358: END IF;
12359: END LOOP;
12360:

Line 12380: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_qty_before_sysdate := ' || l_qty_before_sysdate);

12376: END IF;
12377: l_qty_before_sysdate := GREATEST(l_qty_before_sysdate, 0);
12378:
12379: IF PG_DEBUG in ('Y', 'C') THEN
12380: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_qty_before_sysdate := ' || l_qty_before_sysdate);
12381: END IF;
12382:
12383:
12384: -- we use this l_atp_requested_date to do the search

Line 12388: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_atp_requested_date := ' || l_atp_requested_date);

12384: -- we use this l_atp_requested_date to do the search
12385: l_atp_requested_date := GREATEST(l_requested_date, l_sysdate); -- Change for ship_rec_cal
12386:
12387: IF PG_DEBUG in ('Y', 'C') THEN
12388: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'l_atp_requested_date := ' || l_atp_requested_date);
12389: END IF;
12390:
12391: IF (l_atp_requested_date < l_atp_period_tab(1)) THEN
12392: -- let say the first period is on Day5 but your

Line 12442: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inside p_sup_atp_info_rec.requested_date_quantity 0 = '||

12438: -- l_requested_date < GREATEST(MSC_ATP_PVT.G_PTF_DATE,l_atp_requested_date)) THEN -- Bug 3782472 - Added PTF check
12439: p_sup_atp_info_rec.requested_date_quantity := 0;
12440:
12441: IF PG_DEBUG in ('Y', 'C') THEN
12442: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'inside p_sup_atp_info_rec.requested_date_quantity 0 = '||
12443: p_sup_atp_info_rec.requested_date_quantity);
12444: END IF;
12445: ELSE
12446: ---bug 2341075: availability should not include what is available before sysdate

Line 12452: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'p_sup_atp_info_rec.requested_date_quantity: '|| to_char(p_sup_atp_info_rec.requested_date_quantity));

12448: END IF;
12449:
12450:
12451: IF PG_DEBUG in ('Y', 'C') THEN
12452: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'p_sup_atp_info_rec.requested_date_quantity: '|| to_char(p_sup_atp_info_rec.requested_date_quantity));
12453: END IF;
12454: -- now find the atp_date_quantity and atp_date at this level
12455: ---bug 2341075: Cum Qty should not include cum qty before sysdate
12456: IF (l_atp_qty_tab(j) - l_qty_before_sysdate) >= p_sup_atp_info_rec.quantity_ordered

Line 12463: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'p_sup_atp_info_rec.atp_date_this_level: '|| to_char(p_sup_atp_info_rec.atp_date_this_level));

12459: p_sup_atp_info_rec.atp_date_quantity_this_level := l_atp_qty_tab(j) - l_qty_before_sysdate;
12460: p_sup_atp_info_rec.atp_date_this_level := l_atp_requested_date;
12461:
12462: IF PG_DEBUG in ('Y', 'C') THEN
12463: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'p_sup_atp_info_rec.atp_date_this_level: '|| to_char(p_sup_atp_info_rec.atp_date_this_level));
12464: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'p_sup_atp_info_rec.atp_date_quantity_this_level: '|| to_char(p_sup_atp_info_rec.atp_date_quantity_this_level));
12465: END IF;
12466:
12467: ELSE

Line 12464: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'p_sup_atp_info_rec.atp_date_quantity_this_level: '|| to_char(p_sup_atp_info_rec.atp_date_quantity_this_level));

12460: p_sup_atp_info_rec.atp_date_this_level := l_atp_requested_date;
12461:
12462: IF PG_DEBUG in ('Y', 'C') THEN
12463: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'p_sup_atp_info_rec.atp_date_this_level: '|| to_char(p_sup_atp_info_rec.atp_date_this_level));
12464: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'p_sup_atp_info_rec.atp_date_quantity_this_level: '|| to_char(p_sup_atp_info_rec.atp_date_quantity_this_level));
12465: END IF;
12466:
12467: ELSE
12468: IF j = l_atp_period_tab.COUNT THEN

Line 12498: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'in supplier, count = '||x_atp_supply_demand.supplier_id.count);

12494: END LOOP; -- end j loop
12495: END IF;
12496:
12497: IF PG_DEBUG in ('Y', 'C') THEN
12498: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'in supplier, count = '||x_atp_supply_demand.supplier_id.count);
12499: msc_sch_wb.atp_debug('***** End Get_Supplier_Atp_Info Procedure *****');
12500: END IF;
12501:
12502: EXCEPTION

Line 12499: msc_sch_wb.atp_debug('***** End Get_Supplier_Atp_Info Procedure *****');

12495: END IF;
12496:
12497: IF PG_DEBUG in ('Y', 'C') THEN
12498: msc_sch_wb.atp_debug('Get_Supplier_Atp_Info: ' || 'in supplier, count = '||x_atp_supply_demand.supplier_id.count);
12499: msc_sch_wb.atp_debug('***** End Get_Supplier_Atp_Info Procedure *****');
12500: END IF;
12501:
12502: EXCEPTION
12503:

Line 12563: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'inside get_TRANSPORT_info ');

12559:
12560: BEGIN
12561:
12562: IF PG_DEBUG in ('Y', 'C') THEN
12563: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'inside get_TRANSPORT_info ');
12564: END IF;
12565:
12566: l_null_atp_period := x_atp_period;
12567: l_null_atp_supply_demand := x_atp_supply_demand;

Line 12570: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'p_insert_flag = '||p_insert_flag);

12566: l_null_atp_period := x_atp_period;
12567: l_null_atp_supply_demand := x_atp_supply_demand;
12568:
12569: IF PG_DEBUG in ('Y', 'C') THEN
12570: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'p_insert_flag = '||p_insert_flag);
12571: END IF;
12572:
12573: -- initialize API return status to success
12574: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 12599: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the unit weight is: '||to_char(l_unit_weight));

12595: AND inventory_item_id = p_inventory_item_id
12596: AND sr_instance_id = p_dest_org_instance_id;
12597:
12598: IF PG_DEBUG in ('Y', 'C') THEN
12599: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the unit weight is: '||to_char(l_unit_weight));
12600: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the unit volume is: '||to_char(l_unit_volume));
12601: END IF;
12602:
12603: SELECT l_date, SUM(weight), SUM(volume)

Line 12600: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the unit volume is: '||to_char(l_unit_volume));

12596: AND sr_instance_id = p_dest_org_instance_id;
12597:
12598: IF PG_DEBUG in ('Y', 'C') THEN
12599: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the unit weight is: '||to_char(l_unit_weight));
12600: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the unit volume is: '||to_char(l_unit_volume));
12601: END IF;
12602:
12603: SELECT l_date, SUM(weight), SUM(volume)
12604: BULK COLLECT INTO

Line 12655: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'No rows in cursor!!!');

12651:
12652: IF i = 0 THEN
12653: -- need to add error message
12654: IF PG_DEBUG in ('Y', 'C') THEN
12655: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'No rows in cursor!!!');
12656: END IF;
12657: RAISE NO_DATA_FOUND;
12658: END IF;
12659:

Line 12665: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'just before printing values');

12661: MSC_ATP_PROC.atp_consume(l_atp_qty_tab, i);
12662: MSC_ATP_PROC.atp_consume(l_atp_qty_tab2, i);
12663:
12664: IF PG_DEBUG in ('Y', 'C') THEN
12665: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'just before printing values');
12666: END IF;
12667:
12668: FOR k IN 1..i LOOP
12669: IF PG_DEBUG in ('Y', 'C') THEN

Line 12670: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'date is: '||to_char(l_atp_period_tab(k)));

12666: END IF;
12667:
12668: FOR k IN 1..i LOOP
12669: IF PG_DEBUG in ('Y', 'C') THEN
12670: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'date is: '||to_char(l_atp_period_tab(k)));
12671: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'weight is: '||to_char(l_atp_qty_tab(k)));
12672: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'volume is: '||to_char(l_atp_qty_tab2(k)));
12673: END IF;
12674:

Line 12671: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'weight is: '||to_char(l_atp_qty_tab(k)));

12667:
12668: FOR k IN 1..i LOOP
12669: IF PG_DEBUG in ('Y', 'C') THEN
12670: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'date is: '||to_char(l_atp_period_tab(k)));
12671: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'weight is: '||to_char(l_atp_qty_tab(k)));
12672: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'volume is: '||to_char(l_atp_qty_tab2(k)));
12673: END IF;
12674:
12675: END LOOP;

Line 12672: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'volume is: '||to_char(l_atp_qty_tab2(k)));

12668: FOR k IN 1..i LOOP
12669: IF PG_DEBUG in ('Y', 'C') THEN
12670: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'date is: '||to_char(l_atp_period_tab(k)));
12671: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'weight is: '||to_char(l_atp_qty_tab(k)));
12672: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'volume is: '||to_char(l_atp_qty_tab2(k)));
12673: END IF;
12674:
12675: END LOOP;
12676:

Line 12699: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the date is: '||to_char(l_atp_period_tab(j)));

12695: x_requested_date_quantity := l_item_volume_qty;
12696: END IF;
12697:
12698: IF PG_DEBUG in ('Y', 'C') THEN
12699: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the date is: '||to_char(l_atp_period_tab(j)));
12700: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the quantity is: '||to_char(x_requested_date_quantity));
12701: END IF;
12702:
12703: -- now find the atp_date_quantity and atp_date at this level

Line 12700: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the quantity is: '||to_char(x_requested_date_quantity));

12696: END IF;
12697:
12698: IF PG_DEBUG in ('Y', 'C') THEN
12699: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the date is: '||to_char(l_atp_period_tab(j)));
12700: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'the quantity is: '||to_char(x_requested_date_quantity));
12701: END IF;
12702:
12703: -- now find the atp_date_quantity and atp_date at this level
12704: IF x_requested_date_quantity >= p_quantity_ordered THEN

Line 12711: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'quantity is enough.');

12707: l_atp_date_weight := l_atp_qty_tab(j);
12708: l_atp_date_volume := l_atp_qty_tab2(j);
12709:
12710: IF PG_DEBUG in ('Y', 'C') THEN
12711: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'quantity is enough.');
12712: END IF;
12713:
12714: k := j;
12715: ELSE

Line 12718: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'quantity is not enough.');

12714: k := j;
12715: ELSE
12716:
12717: IF PG_DEBUG in ('Y', 'C') THEN
12718: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'quantity is not enough.');
12719: END IF;
12720:
12721: FOR k IN j+1..i LOOP
12722: -- Convert volume and weight capacity in units

Line 12734: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'Date is: '||to_char(l_atp_period_tab(k)));

12730: l_available_quantity := l_item_volume_qty;
12731: END IF;
12732:
12733: IF PG_DEBUG in ('Y', 'C') THEN
12734: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'Date is: '||to_char(l_atp_period_tab(k)));
12735: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'Quantity available is: '||to_char(l_available_quantity));
12736: END IF;
12737:
12738: IF (l_available_quantity >= p_quantity_ordered) THEN

Line 12735: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'Quantity available is: '||to_char(l_available_quantity));

12731: END IF;
12732:
12733: IF PG_DEBUG in ('Y', 'C') THEN
12734: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'Date is: '||to_char(l_atp_period_tab(k)));
12735: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'Quantity available is: '||to_char(l_available_quantity));
12736: END IF;
12737:
12738: IF (l_available_quantity >= p_quantity_ordered) THEN
12739: x_atp_date_quantity_this_level := l_available_quantity;

Line 12746: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'done');

12742: l_atp_date_weight := l_atp_qty_tab(k);
12743: l_atp_date_volume := l_atp_qty_tab2(k);
12744:
12745: IF PG_DEBUG in ('Y', 'C') THEN
12746: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'done');
12747: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'quantity: '||to_char(x_atp_date_quantity_this_level));
12748: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'date: '||to_char(x_atp_date_this_level));
12749: END IF;
12750: END IF;

Line 12747: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'quantity: '||to_char(x_atp_date_quantity_this_level));

12743: l_atp_date_volume := l_atp_qty_tab2(k);
12744:
12745: IF PG_DEBUG in ('Y', 'C') THEN
12746: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'done');
12747: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'quantity: '||to_char(x_atp_date_quantity_this_level));
12748: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'date: '||to_char(x_atp_date_this_level));
12749: END IF;
12750: END IF;
12751: END LOOP;

Line 12748: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'date: '||to_char(x_atp_date_this_level));

12744:
12745: IF PG_DEBUG in ('Y', 'C') THEN
12746: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'done');
12747: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'quantity: '||to_char(x_atp_date_quantity_this_level));
12748: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'date: '||to_char(x_atp_date_this_level));
12749: END IF;
12750: END IF;
12751: END LOOP;
12752: END IF;

Line 12903: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'in get_res_requirements we are here 2');

12899:
12900: END LOOP;
12901:
12902: IF PG_DEBUG in ('Y', 'C') THEN
12903: msc_sch_wb.atp_debug('Get_Transport_Cap_Atp_Info: ' || 'in get_res_requirements we are here 2');
12904: END IF;
12905:
12906: FOR i in 1..l_atp_supply_demand.Level.COUNT LOOP
12907: l_atp_supply_demand.Pegging_Id(i) := l_pegging_id;

Line 13527: msc_sch_wb.atp_debug('Add_To_Comp_List: Enter Into Add_To_Comp_List');

13523: j number;
13524: BEGIN
13525:
13526: IF PG_DEBUG in ('Y', 'C') THEN
13527: msc_sch_wb.atp_debug('Add_To_Comp_List: Enter Into Add_To_Comp_List');
13528: msc_sch_wb.atp_debug('Add_To_Comp_List: inventory_item_id := ' || p_atp_comp_rec.inventory_item_id );
13529: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_usage := ' || p_atp_comp_rec.comp_usage );
13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );
13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );

Line 13528: msc_sch_wb.atp_debug('Add_To_Comp_List: inventory_item_id := ' || p_atp_comp_rec.inventory_item_id );

13524: BEGIN
13525:
13526: IF PG_DEBUG in ('Y', 'C') THEN
13527: msc_sch_wb.atp_debug('Add_To_Comp_List: Enter Into Add_To_Comp_List');
13528: msc_sch_wb.atp_debug('Add_To_Comp_List: inventory_item_id := ' || p_atp_comp_rec.inventory_item_id );
13529: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_usage := ' || p_atp_comp_rec.comp_usage );
13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );
13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );
13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );

Line 13529: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_usage := ' || p_atp_comp_rec.comp_usage );

13525:
13526: IF PG_DEBUG in ('Y', 'C') THEN
13527: msc_sch_wb.atp_debug('Add_To_Comp_List: Enter Into Add_To_Comp_List');
13528: msc_sch_wb.atp_debug('Add_To_Comp_List: inventory_item_id := ' || p_atp_comp_rec.inventory_item_id );
13529: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_usage := ' || p_atp_comp_rec.comp_usage );
13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );
13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );
13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );
13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );

Line 13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );

13526: IF PG_DEBUG in ('Y', 'C') THEN
13527: msc_sch_wb.atp_debug('Add_To_Comp_List: Enter Into Add_To_Comp_List');
13528: msc_sch_wb.atp_debug('Add_To_Comp_List: inventory_item_id := ' || p_atp_comp_rec.inventory_item_id );
13529: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_usage := ' || p_atp_comp_rec.comp_usage );
13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );
13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );
13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );
13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );
13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );

Line 13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );

13527: msc_sch_wb.atp_debug('Add_To_Comp_List: Enter Into Add_To_Comp_List');
13528: msc_sch_wb.atp_debug('Add_To_Comp_List: inventory_item_id := ' || p_atp_comp_rec.inventory_item_id );
13529: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_usage := ' || p_atp_comp_rec.comp_usage );
13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );
13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );
13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );
13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );
13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );
13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );

Line 13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );

13528: msc_sch_wb.atp_debug('Add_To_Comp_List: inventory_item_id := ' || p_atp_comp_rec.inventory_item_id );
13529: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_usage := ' || p_atp_comp_rec.comp_usage );
13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );
13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );
13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );
13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );
13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );
13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );
13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );

Line 13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );

13529: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_usage := ' || p_atp_comp_rec.comp_usage );
13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );
13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );
13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );
13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );
13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );
13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );
13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );
13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);

Line 13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );

13530: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_date := ' || p_atp_comp_rec.requested_date );
13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );
13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );
13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );
13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );
13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );
13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );
13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);
13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );

Line 13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );

13531: msc_sch_wb.atp_debug('Add_To_Comp_List: lead_time := ' || p_atp_comp_rec.lead_time );
13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );
13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );
13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );
13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );
13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );
13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);
13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );
13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );

Line 13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );

13532: msc_sch_wb.atp_debug('Add_To_Comp_List: wip_supply_type := ' || p_atp_comp_rec.wip_supply_type );
13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );
13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );
13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );
13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );
13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);
13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );
13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );
13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );

Line 13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);

13533: msc_sch_wb.atp_debug('Add_To_Comp_List: assembly_identifier := ' || p_atp_comp_rec.assembly_identifier );
13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );
13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );
13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );
13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);
13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );
13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );
13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );
13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );

Line 13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );

13534: msc_sch_wb.atp_debug('Add_To_Comp_List: component_identifier := ' || p_atp_comp_rec.component_identifier );
13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );
13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );
13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);
13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );
13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );
13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );
13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );
13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );

Line 13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );

13535: msc_sch_wb.atp_debug('Add_To_Comp_List: reverse_cumulative_yield := ' || p_atp_comp_rec.reverse_cumulative_yield );
13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );
13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);
13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );
13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );
13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );
13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );
13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );
13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );

Line 13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );

13536: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_id:= ' || p_atp_comp_rec.match_item_id );
13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);
13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );
13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );
13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );
13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );
13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );
13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );
13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );

Line 13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );

13537: msc_sch_wb.atp_debug('Add_To_Comp_List: match_item_family_id := ' || p_atp_comp_rec.match_item_family_id);
13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );
13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );
13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );
13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );
13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );
13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );
13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );
13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );

Line 13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );

13538: msc_sch_wb.atp_debug('Add_To_Comp_List: bom_item_type := ' || p_atp_comp_rec.bom_item_type );
13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );
13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );
13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );
13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );
13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );
13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );
13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );
13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );

Line 13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );

13539: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_line_id := ' || p_atp_comp_rec.parent_line_id );
13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );
13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );
13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );
13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );
13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );
13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );
13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );
13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );

Line 13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );

13540: msc_sch_wb.atp_debug('Add_To_Comp_List: top_model_line_id := ' || p_atp_comp_rec.top_model_line_id );
13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );
13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );
13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );
13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );
13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );
13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );
13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );
13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );

Line 13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );

13541: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_parent_model_line_id := ' || p_atp_comp_rec.ato_parent_model_line_id );
13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );
13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );
13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );
13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );
13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );
13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );
13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );
13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );

Line 13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );

13542: msc_sch_wb.atp_debug('Add_To_Comp_List: ato_model_line_id := ' || p_atp_comp_rec.ato_model_line_id );
13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );
13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );
13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );
13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );
13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );
13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );
13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );
13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);

Line 13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );

13543: msc_sch_wb.atp_debug('Add_To_Comp_List: MAND_COMP_FLAG := ' || p_atp_comp_rec.MAND_COMP_FLAG );
13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );
13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );
13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );
13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );
13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );
13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );
13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);
13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);

Line 13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );

13544: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_so_quantity := ' || p_atp_comp_rec.parent_so_quantity );
13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );
13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );
13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );
13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );
13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );
13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);
13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);
13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);

Line 13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );

13545: msc_sch_wb.atp_debug('Add_To_Comp_List: fixed_lt := ' || p_atp_comp_rec.fixed_lt );
13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );
13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );
13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );
13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );
13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);
13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);
13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);
13553: msc_sch_wb.atp_debug('Add_To_Comp_List: dest_inventory_item_id := ' || p_atp_comp_rec.dest_inventory_item_id);

Line 13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);

13546: msc_sch_wb.atp_debug('Add_To_Comp_List: variable_lt := ' || p_atp_comp_rec.variable_lt );
13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );
13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );
13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );
13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);
13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);
13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);
13553: msc_sch_wb.atp_debug('Add_To_Comp_List: dest_inventory_item_id := ' || p_atp_comp_rec.dest_inventory_item_id);
13554: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_repl_ord_flag := ' || p_atp_comp_rec.parent_repl_ord_flag);

Line 13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);

13547: msc_sch_wb.atp_debug('Add_To_Comp_List: oss_error_code := ' || p_atp_comp_rec.oss_error_code );
13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );
13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );
13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);
13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);
13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);
13553: msc_sch_wb.atp_debug('Add_To_Comp_List: dest_inventory_item_id := ' || p_atp_comp_rec.dest_inventory_item_id);
13554: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_repl_ord_flag := ' || p_atp_comp_rec.parent_repl_ord_flag);
13555: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_uom := ' || p_atp_comp_rec.comp_uom); --bug3110023

Line 13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);

13548: msc_sch_wb.atp_debug('Add_To_Comp_List: model_flag := ' || p_atp_comp_rec.model_flag );
13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );
13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);
13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);
13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);
13553: msc_sch_wb.atp_debug('Add_To_Comp_List: dest_inventory_item_id := ' || p_atp_comp_rec.dest_inventory_item_id);
13554: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_repl_ord_flag := ' || p_atp_comp_rec.parent_repl_ord_flag);
13555: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_uom := ' || p_atp_comp_rec.comp_uom); --bug3110023
13556:

Line 13553: msc_sch_wb.atp_debug('Add_To_Comp_List: dest_inventory_item_id := ' || p_atp_comp_rec.dest_inventory_item_id);

13549: msc_sch_wb.atp_debug('Add_To_Comp_List: requested_quantity := ' || p_atp_comp_rec.requested_quantity );
13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);
13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);
13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);
13553: msc_sch_wb.atp_debug('Add_To_Comp_List: dest_inventory_item_id := ' || p_atp_comp_rec.dest_inventory_item_id);
13554: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_repl_ord_flag := ' || p_atp_comp_rec.parent_repl_ord_flag);
13555: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_uom := ' || p_atp_comp_rec.comp_uom); --bug3110023
13556:
13557: END IF;

Line 13554: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_repl_ord_flag := ' || p_atp_comp_rec.parent_repl_ord_flag);

13550: msc_sch_wb.atp_debug('Add_To_Comp_List: atp flag := ' || p_atp_comp_rec.atp_flag);
13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);
13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);
13553: msc_sch_wb.atp_debug('Add_To_Comp_List: dest_inventory_item_id := ' || p_atp_comp_rec.dest_inventory_item_id);
13554: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_repl_ord_flag := ' || p_atp_comp_rec.parent_repl_ord_flag);
13555: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_uom := ' || p_atp_comp_rec.comp_uom); --bug3110023
13556:
13557: END IF;
13558:

Line 13555: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_uom := ' || p_atp_comp_rec.comp_uom); --bug3110023

13551: msc_sch_wb.atp_debug('Add_To_Comp_List: atp_comp_flag := '|| p_atp_comp_rec.atp_components_flag);
13552: msc_sch_wb.atp_debug('Add_To_Comp_List: atf_date := '|| p_atp_comp_rec.atf_date);
13553: msc_sch_wb.atp_debug('Add_To_Comp_List: dest_inventory_item_id := ' || p_atp_comp_rec.dest_inventory_item_id);
13554: msc_sch_wb.atp_debug('Add_To_Comp_List: parent_repl_ord_flag := ' || p_atp_comp_rec.parent_repl_ord_flag);
13555: msc_sch_wb.atp_debug('Add_To_Comp_List: comp_uom := ' || p_atp_comp_rec.comp_uom); --bug3110023
13556:
13557: END IF;
13558:
13559: IF ((p_atp_comp_rec.model_flag = 1 and p_atp_comp_rec.bom_item_type = 2) or

Line 13571: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'in side phantom, count = '||j);

13567: -- bug 1831563: removed the extend and assign to
13568: -- l_explode_comp.pre_process_lead_time since it is not needed.
13569:
13570: IF PG_DEBUG in ('Y', 'C') THEN
13571: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'in side phantom, count = '||j);
13572: msc_sch_wb.atp_debug('Add_To_Comp_List: Count in explode comp := ' || p_explode_comp_rec.inventory_item_id.count);
13573: END IF;
13574:
13575: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_explode_comp_rec);

Line 13572: msc_sch_wb.atp_debug('Add_To_Comp_List: Count in explode comp := ' || p_explode_comp_rec.inventory_item_id.count);

13568: -- l_explode_comp.pre_process_lead_time since it is not needed.
13569:
13570: IF PG_DEBUG in ('Y', 'C') THEN
13571: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'in side phantom, count = '||j);
13572: msc_sch_wb.atp_debug('Add_To_Comp_List: Count in explode comp := ' || p_explode_comp_rec.inventory_item_id.count);
13573: END IF;
13574:
13575: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_explode_comp_rec);
13576:

Line 13578: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'after extend');

13574:
13575: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_explode_comp_rec);
13576:
13577: IF PG_DEBUG in ('Y', 'C') THEN
13578: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'after extend');
13579: END IF;
13580:
13581: p_explode_comp_rec.inventory_item_id(j+1):= p_atp_comp_rec.inventory_item_id;
13582: /* time_phased_atp changes begin

Line 13617: msc_sch_wb.atp_debug('Add_To_Comp_List: explode lead_time := ' || p_explode_comp_rec.lead_time(j+1));

13613: p_explode_comp_rec.atp_components_flag(j +1 ) := p_atp_comp_rec.atp_components_flag;
13614: p_explode_comp_rec.dest_inventory_item_id(j +1) := p_atp_comp_rec.dest_inventory_item_id;
13615: p_explode_comp_rec.comp_uom(j +1) := p_atp_comp_rec.comp_uom; --bug3110023
13616: IF PG_DEBUG in ('Y', 'C') THEN
13617: msc_sch_wb.atp_debug('Add_To_Comp_List: explode lead_time := ' || p_explode_comp_rec.lead_time(j+1));
13618: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'after assign ');
13619: END IF;
13620: END IF;
13621:

Line 13618: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'after assign ');

13614: p_explode_comp_rec.dest_inventory_item_id(j +1) := p_atp_comp_rec.dest_inventory_item_id;
13615: p_explode_comp_rec.comp_uom(j +1) := p_atp_comp_rec.comp_uom; --bug3110023
13616: IF PG_DEBUG in ('Y', 'C') THEN
13617: msc_sch_wb.atp_debug('Add_To_Comp_List: explode lead_time := ' || p_explode_comp_rec.lead_time(j+1));
13618: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'after assign ');
13619: END IF;
13620: END IF;
13621:
13622: IF p_atp_comp_rec.wip_supply_type <> 6 or

Line 13630: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'not phantom, j='||j);

13626:
13627: j := p_component_rec.inventory_item_id.COUNT;
13628:
13629: IF PG_DEBUG in ('Y', 'C') THEN
13630: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'not phantom, j='||j);
13631: END IF;
13632:
13633: MSC_ATP_REQ.Extend_ATP_Comp_TYP(p_component_rec);
13634:

Line 13652: msc_sch_wb.atp_debug('Add_To_Comp_List: p_atp_comp_rec.comp_usage ' || p_atp_comp_rec.comp_usage);

13648: ELSE
13649: p_component_rec.comp_usage(j+1) := p_atp_comp_rec.comp_usage;
13650: END IF;
13651: IF PG_DEBUG in ('Y', 'C') THEN
13652: msc_sch_wb.atp_debug('Add_To_Comp_List: p_atp_comp_rec.comp_usage ' || p_atp_comp_rec.comp_usage);
13653: msc_sch_wb.atp_debug('Add_To_Comp_List: p_atp_comp_rec.requested_quantity ' || p_atp_comp_rec.requested_quantity);
13654: msc_sch_wb.atp_debug('Add_To_Comp_List: p_component_rec.comp_usage(j+1) ' || p_component_rec.comp_usage(j+1));
13655: END IF;
13656:

Line 13653: msc_sch_wb.atp_debug('Add_To_Comp_List: p_atp_comp_rec.requested_quantity ' || p_atp_comp_rec.requested_quantity);

13649: p_component_rec.comp_usage(j+1) := p_atp_comp_rec.comp_usage;
13650: END IF;
13651: IF PG_DEBUG in ('Y', 'C') THEN
13652: msc_sch_wb.atp_debug('Add_To_Comp_List: p_atp_comp_rec.comp_usage ' || p_atp_comp_rec.comp_usage);
13653: msc_sch_wb.atp_debug('Add_To_Comp_List: p_atp_comp_rec.requested_quantity ' || p_atp_comp_rec.requested_quantity);
13654: msc_sch_wb.atp_debug('Add_To_Comp_List: p_component_rec.comp_usage(j+1) ' || p_component_rec.comp_usage(j+1));
13655: END IF;
13656:
13657: --4570421

Line 13654: msc_sch_wb.atp_debug('Add_To_Comp_List: p_component_rec.comp_usage(j+1) ' || p_component_rec.comp_usage(j+1));

13650: END IF;
13651: IF PG_DEBUG in ('Y', 'C') THEN
13652: msc_sch_wb.atp_debug('Add_To_Comp_List: p_atp_comp_rec.comp_usage ' || p_atp_comp_rec.comp_usage);
13653: msc_sch_wb.atp_debug('Add_To_Comp_List: p_atp_comp_rec.requested_quantity ' || p_atp_comp_rec.requested_quantity);
13654: msc_sch_wb.atp_debug('Add_To_Comp_List: p_component_rec.comp_usage(j+1) ' || p_component_rec.comp_usage(j+1));
13655: END IF;
13656:
13657: --4570421
13658: p_component_rec.scaling_type(j+1) := p_atp_comp_rec.scaling_type;

Line 13694: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'in side not phantom');

13690: p_component_rec.comp_uom(j + 1) := p_atp_comp_rec.comp_uom; --bug3110023
13691:
13692:
13693: IF PG_DEBUG in ('Y', 'C') THEN
13694: msc_sch_wb.atp_debug('Add_To_Comp_List: ' || 'in side not phantom');
13695: END IF;
13696: END IF;
13697:
13698: END Add_To_Comp_List;