16: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
17: ) IS
18: BEGIN
19: IF PG_DEBUG in ('Y', 'C') THEN
20: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp **********');
21: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_item_id ' || p_item_id);
22: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_org_id ' || p_org_id);
23: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_instance_id ' || p_instance_id);
24: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_plan_id ' || p_plan_id);
17: ) IS
18: BEGIN
19: IF PG_DEBUG in ('Y', 'C') THEN
20: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp **********');
21: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_item_id ' || p_item_id);
22: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_org_id ' || p_org_id);
23: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_instance_id ' || p_instance_id);
24: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_plan_id ' || p_plan_id);
25: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_itf ' || p_itf);
18: BEGIN
19: IF PG_DEBUG in ('Y', 'C') THEN
20: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp **********');
21: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_item_id ' || p_item_id);
22: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_org_id ' || p_org_id);
23: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_instance_id ' || p_instance_id);
24: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_plan_id ' || p_plan_id);
25: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_itf ' || p_itf);
26: END IF;
19: IF PG_DEBUG in ('Y', 'C') THEN
20: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp **********');
21: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_item_id ' || p_item_id);
22: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_org_id ' || p_org_id);
23: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_instance_id ' || p_instance_id);
24: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_plan_id ' || p_plan_id);
25: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_itf ' || p_itf);
26: END IF;
27:
20: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp **********');
21: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_item_id ' || p_item_id);
22: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_org_id ' || p_org_id);
23: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_instance_id ' || p_instance_id);
24: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_plan_id ' || p_plan_id);
25: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_itf ' || p_itf);
26: END IF;
27:
28: SELECT SD_DATE, SUM(SD_QTY)
21: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_item_id ' || p_item_id);
22: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_org_id ' || p_org_id);
23: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_instance_id ' || p_instance_id);
24: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_plan_id ' || p_plan_id);
25: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp: p_itf ' || p_itf);
26: END IF;
27:
28: SELECT SD_DATE, SUM(SD_QTY)
29: BULK COLLECT INTO x_atp_dates, x_atp_qtys
92: GROUP BY SD_DATE
93: ORDER BY SD_DATE; -- bug 8494385
94:
95: IF PG_DEBUG in ('Y', 'C') THEN
96: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp : Total Row Count ' || x_atp_qtys.COUNT );
97: msc_sch_wb.atp_debug('******** Get_Mat_Avail_Drp End ********');
98: END IF;
99:
100:
93: ORDER BY SD_DATE; -- bug 8494385
94:
95: IF PG_DEBUG in ('Y', 'C') THEN
96: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp : Total Row Count ' || x_atp_qtys.COUNT );
97: msc_sch_wb.atp_debug('******** Get_Mat_Avail_Drp End ********');
98: END IF;
99:
100:
101: END Get_Mat_Avail_Drp;
119: l_sysdate DATE := sysdate;
120: l_user_id NUMBER := FND_GLOBAL.USER_ID; -- Declare and Define value.
121: BEGIN
122: IF PG_DEBUG in ('Y', 'C') THEN
123: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Dtls **********');
124: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_item_id ' || p_item_id);
125: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_request_item_id ' || p_request_item_id);
126: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_org_id ' || p_org_id);
127: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_instance_id ' || p_instance_id);
120: l_user_id NUMBER := FND_GLOBAL.USER_ID; -- Declare and Define value.
121: BEGIN
122: IF PG_DEBUG in ('Y', 'C') THEN
123: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Dtls **********');
124: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_item_id ' || p_item_id);
125: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_request_item_id ' || p_request_item_id);
126: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_org_id ' || p_org_id);
127: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_instance_id ' || p_instance_id);
128: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_plan_id ' || p_plan_id);
121: BEGIN
122: IF PG_DEBUG in ('Y', 'C') THEN
123: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Dtls **********');
124: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_item_id ' || p_item_id);
125: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_request_item_id ' || p_request_item_id);
126: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_org_id ' || p_org_id);
127: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_instance_id ' || p_instance_id);
128: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_plan_id ' || p_plan_id);
129: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_itf ' || p_itf);
122: IF PG_DEBUG in ('Y', 'C') THEN
123: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Dtls **********');
124: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_item_id ' || p_item_id);
125: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_request_item_id ' || p_request_item_id);
126: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_org_id ' || p_org_id);
127: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_instance_id ' || p_instance_id);
128: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_plan_id ' || p_plan_id);
129: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_itf ' || p_itf);
130: END IF;
123: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Dtls **********');
124: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_item_id ' || p_item_id);
125: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_request_item_id ' || p_request_item_id);
126: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_org_id ' || p_org_id);
127: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_instance_id ' || p_instance_id);
128: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_plan_id ' || p_plan_id);
129: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_itf ' || p_itf);
130: END IF;
131:
124: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_item_id ' || p_item_id);
125: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_request_item_id ' || p_request_item_id);
126: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_org_id ' || p_org_id);
127: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_instance_id ' || p_instance_id);
128: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_plan_id ' || p_plan_id);
129: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_itf ' || p_itf);
130: END IF;
131:
132: INSERT INTO msc_atp_sd_details_temp (
125: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_request_item_id ' || p_request_item_id);
126: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_org_id ' || p_org_id);
127: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_instance_id ' || p_instance_id);
128: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_plan_id ' || p_plan_id);
129: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: p_itf ' || p_itf);
130: END IF;
131:
132: INSERT INTO msc_atp_sd_details_temp (
133: ATP_Level,
360: < NVL(p_itf, TRUNC(NVL(S.FIRM_DATE,S.NEW_SHIP_DATE)) + 1)
361: )
362: ;
363: IF PG_DEBUG in ('Y', 'C') THEN
364: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: ' || 'Total Records inserted : ' || SQL%ROWCOUNT);
365: msc_sch_wb.atp_debug('******** Get_Mat_Avail_Drp_Dtls End ********');
366: END IF;
367:
368: END Get_Mat_Avail_Drp_Dtls;
361: )
362: ;
363: IF PG_DEBUG in ('Y', 'C') THEN
364: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Dtls: ' || 'Total Records inserted : ' || SQL%ROWCOUNT);
365: msc_sch_wb.atp_debug('******** Get_Mat_Avail_Drp_Dtls End ********');
366: END IF;
367:
368: END Get_Mat_Avail_Drp_Dtls;
369:
714: x_atp_qtys OUT NoCopy MRP_ATP_PUB.number_arr
715: ) IS
716: BEGIN
717: IF PG_DEBUG in ('Y', 'C') THEN
718: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Summ **********');
719: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_item_id ' || p_item_id);
720: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_org_id ' || p_org_id);
721: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_instance_id ' || p_instance_id);
722: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_plan_id ' || p_plan_id);
715: ) IS
716: BEGIN
717: IF PG_DEBUG in ('Y', 'C') THEN
718: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Summ **********');
719: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_item_id ' || p_item_id);
720: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_org_id ' || p_org_id);
721: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_instance_id ' || p_instance_id);
722: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_plan_id ' || p_plan_id);
723: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_itf ' || p_itf);
716: BEGIN
717: IF PG_DEBUG in ('Y', 'C') THEN
718: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Summ **********');
719: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_item_id ' || p_item_id);
720: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_org_id ' || p_org_id);
721: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_instance_id ' || p_instance_id);
722: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_plan_id ' || p_plan_id);
723: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_itf ' || p_itf);
724: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_refresh_number ' || p_refresh_number);
717: IF PG_DEBUG in ('Y', 'C') THEN
718: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Summ **********');
719: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_item_id ' || p_item_id);
720: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_org_id ' || p_org_id);
721: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_instance_id ' || p_instance_id);
722: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_plan_id ' || p_plan_id);
723: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_itf ' || p_itf);
724: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_refresh_number ' || p_refresh_number);
725: END IF;
718: msc_sch_wb.atp_debug('********** Begin Get_Mat_Avail_Drp_Summ **********');
719: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_item_id ' || p_item_id);
720: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_org_id ' || p_org_id);
721: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_instance_id ' || p_instance_id);
722: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_plan_id ' || p_plan_id);
723: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_itf ' || p_itf);
724: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_refresh_number ' || p_refresh_number);
725: END IF;
726:
719: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_item_id ' || p_item_id);
720: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_org_id ' || p_org_id);
721: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_instance_id ' || p_instance_id);
722: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_plan_id ' || p_plan_id);
723: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_itf ' || p_itf);
724: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_refresh_number ' || p_refresh_number);
725: END IF;
726:
727: -- SQL changed for summary enhancement
720: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_org_id ' || p_org_id);
721: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_instance_id ' || p_instance_id);
722: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_plan_id ' || p_plan_id);
723: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_itf ' || p_itf);
724: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ: p_refresh_number ' || p_refresh_number);
725: END IF;
726:
727: -- SQL changed for summary enhancement
728: SELECT SD_DATE, SUM(SD_QTY)
801: GROUP BY SD_DATE
802: ORDER BY SD_DATE;
803:
804: IF PG_DEBUG in ('Y', 'C') THEN
805: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ : Total Row Count ' || x_atp_qtys.COUNT );
806: msc_sch_wb.atp_debug('******** Get_Mat_Avail_Drp_Summ End ********');
807: END IF;
808:
809: END get_mat_avail_drp_summ;
802: ORDER BY SD_DATE;
803:
804: IF PG_DEBUG in ('Y', 'C') THEN
805: msc_sch_wb.atp_debug('Get_Mat_Avail_Drp_Summ : Total Row Count ' || x_atp_qtys.COUNT );
806: msc_sch_wb.atp_debug('******** Get_Mat_Avail_Drp_Summ End ********');
807: END IF;
808:
809: END get_mat_avail_drp_summ;
810: