DBA Data[Home] [Help]

APPS.MSC_ATP_PUB dependencies on MSC_SCH_WB

Line 52: msc_sch_wb.atp_debug('Enter Update_Custom_Information');

48: IS
49: i number;
50: BEGIN
51: IF PG_DEBUG in ('Y', 'C') THEN
52: msc_sch_wb.atp_debug('Enter Update_Custom_Information');
53: END IF;
54:
55: FORALL i in 1..p_atp_rec.inventory_item_id.count
56: update mrp_atp_schedule_temp

Line 86: msc_sch_wb.atp_debug('Number of rows update := ' ||SQL%ROWCOUNT);

82: --same line id may be shared by different items in case of ATO. So we add followig condition
83: and inventory_item_id = p_atp_rec.inventory_item_id(i);
84:
85: IF PG_DEBUG in ('Y', 'C') THEN
86: msc_sch_wb.atp_debug('Number of rows update := ' ||SQL%ROWCOUNT);
87: msc_sch_wb.atp_debug('Exit Update_Custom_Information');
88: END IF;
89: Exception
90: WHEN OTHERS THEN

Line 87: msc_sch_wb.atp_debug('Exit Update_Custom_Information');

83: and inventory_item_id = p_atp_rec.inventory_item_id(i);
84:
85: IF PG_DEBUG in ('Y', 'C') THEN
86: msc_sch_wb.atp_debug('Number of rows update := ' ||SQL%ROWCOUNT);
87: msc_sch_wb.atp_debug('Exit Update_Custom_Information');
88: END IF;
89: Exception
90: WHEN OTHERS THEN
91: IF PG_DEBUG in ('Y', 'C') THEN

Line 92: msc_sch_wb.atp_debug('Error Orrured in Update_Custom_Information := ' || SQLERRM);

88: END IF;
89: Exception
90: WHEN OTHERS THEN
91: IF PG_DEBUG in ('Y', 'C') THEN
92: msc_sch_wb.atp_debug('Error Orrured in Update_Custom_Information := ' || SQLERRM);
93: END IF;
94:
95: END Update_Custom_Information;
96:

Line 128: msc_sch_wb.atp_debug('enable_trace: ' || 'Database Trace being enabled');

124: ROWS_PROCESSED INTEGER;
125:
126: BEGIN
127: IF PG_DEBUG in ('Y', 'C') THEN
128: msc_sch_wb.atp_debug('enable_trace: ' || 'Database Trace being enabled');
129: END IF;
130: C := DBMS_SQL.OPEN_CURSOR;
131: -- STATEMENT := 'ALTER SESSION SET SQL_TRACE=TRUE';
132: STATEMENT := 'ALTER SESSION SET events ' || '''' || '10046 trace name context forever, level 12' || '''' ;

Line 140: msc_sch_wb.atp_debug('something wrong in enable_trace : ' || sqlcode);

136: EXCEPTION
137: WHEN others THEN
138: x_return_status :=-1;
139: IF PG_DEBUG in ('Y', 'C') THEN
140: msc_sch_wb.atp_debug('something wrong in enable_trace : ' || sqlcode);
141: msc_sch_wb.atp_debug('enable_trace: ' || sqlerrm);
142: END IF;
143: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
144: END enable_trace;

Line 141: msc_sch_wb.atp_debug('enable_trace: ' || sqlerrm);

137: WHEN others THEN
138: x_return_status :=-1;
139: IF PG_DEBUG in ('Y', 'C') THEN
140: msc_sch_wb.atp_debug('something wrong in enable_trace : ' || sqlcode);
141: msc_sch_wb.atp_debug('enable_trace: ' || sqlerrm);
142: END IF;
143: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
144: END enable_trace;
145:

Line 156: msc_sch_wb.atp_debug('disable_trace: ' || 'Database Trace disabled');

152: STATEMENT VARCHAR2(255);
153: ROWS_PROCESSED INTEGER;
154: BEGIN
155: IF PG_DEBUG in ('Y', 'C') THEN
156: msc_sch_wb.atp_debug('disable_trace: ' || 'Database Trace disabled');
157: END IF;
158: C := DBMS_SQL.OPEN_CURSOR;
159: STATEMENT := 'ALTER SESSION SET SQL_TRACE=FALSE';
160: DBMS_SQL.PARSE(C, STATEMENT, DBMS_SQL.NATIVE);

Line 167: msc_sch_wb.atp_debug('something wrong in disable_trace : ' || sqlcode);

163: EXCEPTION
164: WHEN others THEN
165: x_return_status :=-1;
166: IF PG_DEBUG in ('Y', 'C') THEN
167: msc_sch_wb.atp_debug('something wrong in disable_trace : ' || sqlcode);
168: msc_sch_wb.atp_debug('disable_trace: ' || sqlerrm);
169: END IF;
170: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
171: END disable_trace; --4421391

Line 168: msc_sch_wb.atp_debug('disable_trace: ' || sqlerrm);

164: WHEN others THEN
165: x_return_status :=-1;
166: IF PG_DEBUG in ('Y', 'C') THEN
167: msc_sch_wb.atp_debug('something wrong in disable_trace : ' || sqlcode);
168: msc_sch_wb.atp_debug('disable_trace: ' || sqlerrm);
169: END IF;
170: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
171: END disable_trace; --4421391
172:

Line 215: msc_sch_wb.atp_debug('Subst_Workflow: ' || '************** Product Subst Workflow **********');

211: and wf.STATUS = 'ACTIVE';
212:
213: BEGIN
214: IF PG_DEBUG in ('Y', 'C') THEN
215: msc_sch_wb.atp_debug('Subst_Workflow: ' || '************** Product Subst Workflow **********');
216: END IF;
217:
218: -- initiate workflow for product substitution
219: FOR i in 1..p_atp_rec.inventory_item_id.count LOOP

Line 221: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Subst flag := ' || NVL(p_atp_rec.subst_flag(i),2));

217:
218: -- initiate workflow for product substitution
219: FOR i in 1..p_atp_rec.inventory_item_id.count LOOP
220: IF PG_DEBUG in ('Y', 'C') THEN
221: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Subst flag := ' || NVL(p_atp_rec.subst_flag(i),2));
222: END IF;
223: IF NVL(p_atp_rec.subst_flag(i),2) = 1 and p_atp_rec.ACTION(i) <> 100 THEN
224:
225: l_sales_rep := p_atp_rec.sales_rep(i);

Line 229: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Get sales rep');

225: l_sales_rep := p_atp_rec.sales_rep(i);
226: l_customer_contact := p_atp_rec.customer_contact(i);
227: IF NVL(l_sales_rep, '@@@') = '@@@' AND NVL(p_atp_rec.calling_module(i), -99) = 660 THEN
228: IF PG_DEBUG in ('Y', 'C') THEN
229: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Get sales rep');
230: END IF;
231: BEGIN
232:
233: select min(wf.name)

Line 248: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer id := ' || p_atp_rec.customer_id(i));

244: END;
245: END IF;
246:
247: IF PG_DEBUG in ('Y', 'C') THEN
248: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer id := ' || p_atp_rec.customer_id(i));
249: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer site id := ' || p_atp_rec.customer_site_id(i));
250: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_customer_contact := ' || NVL(l_customer_contact, '@@'));
251: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'calling_module := ' || NVL(p_atp_rec.calling_module(i), -99));
252: END IF;

Line 249: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer site id := ' || p_atp_rec.customer_site_id(i));

245: END IF;
246:
247: IF PG_DEBUG in ('Y', 'C') THEN
248: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer id := ' || p_atp_rec.customer_id(i));
249: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer site id := ' || p_atp_rec.customer_site_id(i));
250: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_customer_contact := ' || NVL(l_customer_contact, '@@'));
251: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'calling_module := ' || NVL(p_atp_rec.calling_module(i), -99));
252: END IF;
253:

Line 250: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_customer_contact := ' || NVL(l_customer_contact, '@@'));

246:
247: IF PG_DEBUG in ('Y', 'C') THEN
248: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer id := ' || p_atp_rec.customer_id(i));
249: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer site id := ' || p_atp_rec.customer_site_id(i));
250: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_customer_contact := ' || NVL(l_customer_contact, '@@'));
251: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'calling_module := ' || NVL(p_atp_rec.calling_module(i), -99));
252: END IF;
253:
254: IF NVL(l_customer_contact, '@@@') = '@@@' AND NVL(p_atp_rec.calling_module(i), -99) = 660 THEN

Line 251: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'calling_module := ' || NVL(p_atp_rec.calling_module(i), -99));

247: IF PG_DEBUG in ('Y', 'C') THEN
248: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer id := ' || p_atp_rec.customer_id(i));
249: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'customer site id := ' || p_atp_rec.customer_site_id(i));
250: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_customer_contact := ' || NVL(l_customer_contact, '@@'));
251: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'calling_module := ' || NVL(p_atp_rec.calling_module(i), -99));
252: END IF;
253:
254: IF NVL(l_customer_contact, '@@@') = '@@@' AND NVL(p_atp_rec.calling_module(i), -99) = 660 THEN
255: IF PG_DEBUG in ('Y', 'C') THEN

Line 256: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Get Customer conatct');

252: END IF;
253:
254: IF NVL(l_customer_contact, '@@@') = '@@@' AND NVL(p_atp_rec.calling_module(i), -99) = 660 THEN
255: IF PG_DEBUG in ('Y', 'C') THEN
256: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Get Customer conatct');
257: END IF;
258: OPEN C_CUSTCNT(p_atp_rec.customer_id(i), p_atp_rec.customer_site_id(i));
259: FETCH C_CUSTCNT INTO l_customer_contact;
260: CLOSE C_CUSTCNT;

Line 263: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_customer_contact := ' || l_customer_contact);

259: FETCH C_CUSTCNT INTO l_customer_contact;
260: CLOSE C_CUSTCNT;
261: END IF;
262: IF PG_DEBUG in ('Y', 'C') THEN
263: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_customer_contact := ' || l_customer_contact);
264: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_sales_rep := ' || l_sales_rep);
265: END IF;
266: IF NVL(l_sales_rep, '-99') <> '-99' or NVL(l_customer_contact, '-99') <> '-99' THEN
267: IF PG_DEBUG in ('Y', 'C') THEN

Line 264: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_sales_rep := ' || l_sales_rep);

260: CLOSE C_CUSTCNT;
261: END IF;
262: IF PG_DEBUG in ('Y', 'C') THEN
263: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_customer_contact := ' || l_customer_contact);
264: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_sales_rep := ' || l_sales_rep);
265: END IF;
266: IF NVL(l_sales_rep, '-99') <> '-99' or NVL(l_customer_contact, '-99') <> '-99' THEN
267: IF PG_DEBUG in ('Y', 'C') THEN
268: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Initiate Substitute workflow');

Line 268: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Initiate Substitute workflow');

264: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'l_sales_rep := ' || l_sales_rep);
265: END IF;
266: IF NVL(l_sales_rep, '-99') <> '-99' or NVL(l_customer_contact, '-99') <> '-99' THEN
267: IF PG_DEBUG in ('Y', 'C') THEN
268: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Initiate Substitute workflow');
269: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'request_item_name := ' || p_atp_rec.request_item_name(i));
270: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'inventory_item_name := ' || p_atp_rec.inventory_item_name(i));
271: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'order_number := '|| p_atp_rec.order_number(i));
272: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'identifier := ' || p_atp_rec.identifier(i));

Line 269: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'request_item_name := ' || p_atp_rec.request_item_name(i));

265: END IF;
266: IF NVL(l_sales_rep, '-99') <> '-99' or NVL(l_customer_contact, '-99') <> '-99' THEN
267: IF PG_DEBUG in ('Y', 'C') THEN
268: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Initiate Substitute workflow');
269: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'request_item_name := ' || p_atp_rec.request_item_name(i));
270: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'inventory_item_name := ' || p_atp_rec.inventory_item_name(i));
271: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'order_number := '|| p_atp_rec.order_number(i));
272: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'identifier := ' || p_atp_rec.identifier(i));
273: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Source_Organization_Code := ' || p_atp_rec.Source_Organization_Code(i));

Line 270: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'inventory_item_name := ' || p_atp_rec.inventory_item_name(i));

266: IF NVL(l_sales_rep, '-99') <> '-99' or NVL(l_customer_contact, '-99') <> '-99' THEN
267: IF PG_DEBUG in ('Y', 'C') THEN
268: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Initiate Substitute workflow');
269: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'request_item_name := ' || p_atp_rec.request_item_name(i));
270: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'inventory_item_name := ' || p_atp_rec.inventory_item_name(i));
271: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'order_number := '|| p_atp_rec.order_number(i));
272: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'identifier := ' || p_atp_rec.identifier(i));
273: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Source_Organization_Code := ' || p_atp_rec.Source_Organization_Code(i));
274: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'quantity_ordered := ' || p_atp_rec.quantity_ordered(i));

Line 271: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'order_number := '|| p_atp_rec.order_number(i));

267: IF PG_DEBUG in ('Y', 'C') THEN
268: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Initiate Substitute workflow');
269: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'request_item_name := ' || p_atp_rec.request_item_name(i));
270: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'inventory_item_name := ' || p_atp_rec.inventory_item_name(i));
271: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'order_number := '|| p_atp_rec.order_number(i));
272: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'identifier := ' || p_atp_rec.identifier(i));
273: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Source_Organization_Code := ' || p_atp_rec.Source_Organization_Code(i));
274: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'quantity_ordered := ' || p_atp_rec.quantity_ordered(i));
275: END IF;

Line 272: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'identifier := ' || p_atp_rec.identifier(i));

268: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Initiate Substitute workflow');
269: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'request_item_name := ' || p_atp_rec.request_item_name(i));
270: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'inventory_item_name := ' || p_atp_rec.inventory_item_name(i));
271: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'order_number := '|| p_atp_rec.order_number(i));
272: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'identifier := ' || p_atp_rec.identifier(i));
273: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Source_Organization_Code := ' || p_atp_rec.Source_Organization_Code(i));
274: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'quantity_ordered := ' || p_atp_rec.quantity_ordered(i));
275: END IF;
276: BEGIN

Line 273: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Source_Organization_Code := ' || p_atp_rec.Source_Organization_Code(i));

269: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'request_item_name := ' || p_atp_rec.request_item_name(i));
270: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'inventory_item_name := ' || p_atp_rec.inventory_item_name(i));
271: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'order_number := '|| p_atp_rec.order_number(i));
272: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'identifier := ' || p_atp_rec.identifier(i));
273: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Source_Organization_Code := ' || p_atp_rec.Source_Organization_Code(i));
274: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'quantity_ordered := ' || p_atp_rec.quantity_ordered(i));
275: END IF;
276: BEGIN
277: mrp_msc_exp_wf.start_substitute_workflow(

Line 274: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'quantity_ordered := ' || p_atp_rec.quantity_ordered(i));

270: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'inventory_item_name := ' || p_atp_rec.inventory_item_name(i));
271: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'order_number := '|| p_atp_rec.order_number(i));
272: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'identifier := ' || p_atp_rec.identifier(i));
273: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'Source_Organization_Code := ' || p_atp_rec.Source_Organization_Code(i));
274: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'quantity_ordered := ' || p_atp_rec.quantity_ordered(i));
275: END IF;
276: BEGIN
277: mrp_msc_exp_wf.start_substitute_workflow(
278: p_atp_rec.request_item_name(i),

Line 297: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'End Subst workflow');

293:
294: END IF;
295: END LOOP;
296: IF PG_DEBUG in ('Y', 'C') THEN
297: msc_sch_wb.atp_debug('Subst_Workflow: ' || 'End Subst workflow');
298: END IF;
299: END Subst_Workflow;
300:
301:

Line 327: msc_sch_wb.atp_debug('Begin Call_ATP_Commit');

323: PRAGMA EXCEPTION_INIT(DBLINK_NOT_OPEN, -2081);
324:
325: BEGIN
326: IF PG_DEBUG in ('Y', 'C') THEN
327: msc_sch_wb.atp_debug('Begin Call_ATP_Commit');
328: END IF;
329:
330: i := p_atp_rec.Calling_Module.FIRST;
331: IF i IS NOT NULL THEN

Line 346: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'expected error in Call_ATP_No_Commit');

342:
343: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
344: -- something wrong so we want to rollback;
345: IF PG_DEBUG in ('Y', 'C') THEN
346: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'expected error in Call_ATP_No_Commit');
347: END IF;
348: RAISE FND_API.G_EXC_ERROR ;
349: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
350: IF PG_DEBUG in ('Y', 'C') THEN

Line 351: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'something wrong in Call_ATP_No_Commit');

347: END IF;
348: RAISE FND_API.G_EXC_ERROR ;
349: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
350: IF PG_DEBUG in ('Y', 'C') THEN
351: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'something wrong in Call_ATP_No_Commit');
352: END IF;
353: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
354: END IF;
355:

Line 360: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'Return Status : '||x_return_status);

356: commit; -- AUTONOMOUS_TRANSACTION
357:
358:
359: IF PG_DEBUG in ('Y', 'C') THEN
360: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'Return Status : '||x_return_status);
361: END IF;
362:
363: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start
364: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 366: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'error in mrp_ap_apps_instances');

362:
363: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start
364: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
365: IF PG_DEBUG in ('Y', 'C') THEN
366: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'error in mrp_ap_apps_instances');
367: END IF;
368: END IF; --bug3049003 end
369: -- Set this to be checked later in exception while closing DB Link
370: -- Also, don't rollback in case this is set to -1 as this means ATP Transaction

Line 379: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'after commit, before closing DB Link');

375: -- finished by commit or rollback.
376: --l_db_profile := FND_PROFILE.value('MRP_ATP_DATABASE_LINK');
377: IF l_a2m_dblink IS NOT NULL THEN --bug3049003 changed from G_DB_PROFILE to l_a2m_dblink
378: IF PG_DEBUG in ('Y', 'C') THEN
379: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'after commit, before closing DB Link');
380: END IF;
381: cursor_name := dbms_sql.open_cursor;
382: DBMS_SQL.PARSE(cursor_name, 'alter session close database link ' ||l_a2m_dblink, --bug3049003 changed from G_DB_PROFILE to l_a2m_dblink
383: dbms_sql.native);

Line 392: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'inside DBLINK_NOT_OPEN');

388: rows_processed := dbms_sql.execute(cursor_name);
389: EXCEPTION
390: WHEN DBLINK_NOT_OPEN THEN
391: IF PG_DEBUG in ('Y', 'C') THEN
392: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'inside DBLINK_NOT_OPEN');
393: END IF;
394: END;
395:
396: DBMS_SQL.close_cursor(cursor_name);

Line 398: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'after commit, after closing DB Link');

394: END;
395:
396: DBMS_SQL.close_cursor(cursor_name);
397: IF PG_DEBUG in ('Y', 'C') THEN
398: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'after commit, after closing DB Link');
399: END IF;
400: END IF;
401:
402: IF PG_DEBUG in ('Y', 'C') THEN

Line 403: msc_sch_wb.atp_debug('End Call_ATP_Commit');

399: END IF;
400: END IF;
401:
402: IF PG_DEBUG in ('Y', 'C') THEN
403: msc_sch_wb.atp_debug('End Call_ATP_Commit');
404: END IF;
405: EXCEPTION
406: WHEN others THEN
407: -- something wrong so we want to rollback;

Line 409: msc_sch_wb.atp_debug('something wrong in Call_ATP_Commit : ' || sqlcode);

405: EXCEPTION
406: WHEN others THEN
407: -- something wrong so we want to rollback;
408: IF PG_DEBUG in ('Y', 'C') THEN
409: msc_sch_wb.atp_debug('something wrong in Call_ATP_Commit : ' || sqlcode);
410: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || sqlerrm);
411: END IF;
412: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
413:

Line 410: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || sqlerrm);

406: WHEN others THEN
407: -- something wrong so we want to rollback;
408: IF PG_DEBUG in ('Y', 'C') THEN
409: msc_sch_wb.atp_debug('something wrong in Call_ATP_Commit : ' || sqlcode);
410: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || sqlerrm);
411: END IF;
412: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
413:
414: IF PG_DEBUG in ('Y', 'C') THEN

Line 415: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'Return Status in excpetion : '||x_return_status);

411: END IF;
412: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
413:
414: IF PG_DEBUG in ('Y', 'C') THEN
415: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'Return Status in excpetion : '||x_return_status);
416: END IF;
417:
418: -- Error Handling Changes krajan
419: IF (x_atp_rec.inventory_item_id.COUNT = 0) THEN

Line 430: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'after rollback, before closing DB Link');

426: ROLLBACK; --5195929 No need to have a save point as this is an Autonomous transaction
427: END IF;
428:
429: IF PG_DEBUG in ('Y', 'C') THEN
430: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'after rollback, before closing DB Link');
431: END IF;
432: -- Close the DB Link in case it is open
433: -- Bug 1822005, modified Call_ATP to close DB Link after ATP Transaction is
434: -- finished by commit or rollback.

Line 449: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'inside DBLINK_NOT_OPEN exception');

445: rows_processed := dbms_sql.execute(cursor_name);
446: EXCEPTION
447: WHEN DBLINK_NOT_OPEN THEN
448: IF PG_DEBUG in ('Y', 'C') THEN
449: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'inside DBLINK_NOT_OPEN exception');
450: END IF;
451: END;
452:
453: DBMS_SQL.close_cursor(cursor_name);

Line 455: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'after rollback, after closing DB Link');

451: END;
452:
453: DBMS_SQL.close_cursor(cursor_name);
454: IF PG_DEBUG in ('Y', 'C') THEN
455: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'after rollback, after closing DB Link');
456: END IF;
457: END IF;
458:
459: END Call_ATP_Commit;

Line 496: msc_sch_wb.set_session_id(p_session_id);

492: --bug3609185 initialize API returm status to success
493: x_return_status := FND_API.G_RET_STS_SUCCESS;
494: G_CALL_ATP :=1; --4421391
495: L_RETURN_NUM := 1; --4421391
496: msc_sch_wb.set_session_id(p_session_id);
497: IF PG_DEBUG in ('Y', 'C') THEN
498: msc_sch_wb.atp_debug('Begin Call_ATP');
499: FOR i in 1..p_atp_rec.inventory_item_id.count LOOP
500: msc_sch_wb.atp_debug('Item # ' || i || ' := ' || p_atp_rec.inventory_item_id(i));

Line 498: msc_sch_wb.atp_debug('Begin Call_ATP');

494: G_CALL_ATP :=1; --4421391
495: L_RETURN_NUM := 1; --4421391
496: msc_sch_wb.set_session_id(p_session_id);
497: IF PG_DEBUG in ('Y', 'C') THEN
498: msc_sch_wb.atp_debug('Begin Call_ATP');
499: FOR i in 1..p_atp_rec.inventory_item_id.count LOOP
500: msc_sch_wb.atp_debug('Item # ' || i || ' := ' || p_atp_rec.inventory_item_id(i));
501: msc_sch_wb.atp_debug('LAD := ' || p_atp_rec.latest_acceptable_date(i));
502: msc_sch_wb.atp_debug('Ship date := ' || p_atp_rec.requested_ship_date(i));

Line 500: msc_sch_wb.atp_debug('Item # ' || i || ' := ' || p_atp_rec.inventory_item_id(i));

496: msc_sch_wb.set_session_id(p_session_id);
497: IF PG_DEBUG in ('Y', 'C') THEN
498: msc_sch_wb.atp_debug('Begin Call_ATP');
499: FOR i in 1..p_atp_rec.inventory_item_id.count LOOP
500: msc_sch_wb.atp_debug('Item # ' || i || ' := ' || p_atp_rec.inventory_item_id(i));
501: msc_sch_wb.atp_debug('LAD := ' || p_atp_rec.latest_acceptable_date(i));
502: msc_sch_wb.atp_debug('Ship date := ' || p_atp_rec.requested_ship_date(i));
503: msc_sch_wb.atp_debug('Qty := ' || p_atp_rec.quantity_ordered(i));
504: msc_sch_wb.atp_debug('Order number := ' || p_atp_rec.order_number(i));

Line 501: msc_sch_wb.atp_debug('LAD := ' || p_atp_rec.latest_acceptable_date(i));

497: IF PG_DEBUG in ('Y', 'C') THEN
498: msc_sch_wb.atp_debug('Begin Call_ATP');
499: FOR i in 1..p_atp_rec.inventory_item_id.count LOOP
500: msc_sch_wb.atp_debug('Item # ' || i || ' := ' || p_atp_rec.inventory_item_id(i));
501: msc_sch_wb.atp_debug('LAD := ' || p_atp_rec.latest_acceptable_date(i));
502: msc_sch_wb.atp_debug('Ship date := ' || p_atp_rec.requested_ship_date(i));
503: msc_sch_wb.atp_debug('Qty := ' || p_atp_rec.quantity_ordered(i));
504: msc_sch_wb.atp_debug('Order number := ' || p_atp_rec.order_number(i));
505:

Line 502: msc_sch_wb.atp_debug('Ship date := ' || p_atp_rec.requested_ship_date(i));

498: msc_sch_wb.atp_debug('Begin Call_ATP');
499: FOR i in 1..p_atp_rec.inventory_item_id.count LOOP
500: msc_sch_wb.atp_debug('Item # ' || i || ' := ' || p_atp_rec.inventory_item_id(i));
501: msc_sch_wb.atp_debug('LAD := ' || p_atp_rec.latest_acceptable_date(i));
502: msc_sch_wb.atp_debug('Ship date := ' || p_atp_rec.requested_ship_date(i));
503: msc_sch_wb.atp_debug('Qty := ' || p_atp_rec.quantity_ordered(i));
504: msc_sch_wb.atp_debug('Order number := ' || p_atp_rec.order_number(i));
505:
506: END LOOP;

Line 503: msc_sch_wb.atp_debug('Qty := ' || p_atp_rec.quantity_ordered(i));

499: FOR i in 1..p_atp_rec.inventory_item_id.count LOOP
500: msc_sch_wb.atp_debug('Item # ' || i || ' := ' || p_atp_rec.inventory_item_id(i));
501: msc_sch_wb.atp_debug('LAD := ' || p_atp_rec.latest_acceptable_date(i));
502: msc_sch_wb.atp_debug('Ship date := ' || p_atp_rec.requested_ship_date(i));
503: msc_sch_wb.atp_debug('Qty := ' || p_atp_rec.quantity_ordered(i));
504: msc_sch_wb.atp_debug('Order number := ' || p_atp_rec.order_number(i));
505:
506: END LOOP;
507:

Line 504: msc_sch_wb.atp_debug('Order number := ' || p_atp_rec.order_number(i));

500: msc_sch_wb.atp_debug('Item # ' || i || ' := ' || p_atp_rec.inventory_item_id(i));
501: msc_sch_wb.atp_debug('LAD := ' || p_atp_rec.latest_acceptable_date(i));
502: msc_sch_wb.atp_debug('Ship date := ' || p_atp_rec.requested_ship_date(i));
503: msc_sch_wb.atp_debug('Qty := ' || p_atp_rec.quantity_ordered(i));
504: msc_sch_wb.atp_debug('Order number := ' || p_atp_rec.order_number(i));
505:
506: END LOOP;
507:
508:

Line 513: --msc_sch_wb.set_session_id(p_session_id);

509: END IF;
510: SAVEPOINT start_of_call_atp; --5195929 added savepoint so that rollbak only
511: --undo the transactions till here
512: --bug3609185 removing second set_session_id as it is already done at line 916
513: --msc_sch_wb.set_session_id(p_session_id);
514: -- Bug 2387242 : krajan
515: -- Set Sql Trace.
516: IF order_sch_wb.mr_debug in ('T','C') THEN
517: enable_trace(L_RETURN_NUM); --4421391

Line 533: msc_sch_wb.atp_debug('Call_ATP: ' || 'Inside Prescheduled order import support for OM');

529: IF NVL(p_atp_rec.Calling_Module(i), -99) = 660 AND
530: NVL(FND_PROFILE.value('MSC_OM_IMPORT_PRESCHEDULED'), 'N') = 'Y' THEN
531:
532: IF PG_DEBUG in ('Y', 'C') THEN
533: msc_sch_wb.atp_debug('Call_ATP: ' || 'Inside Prescheduled order import support for OM');
534: END IF;
535:
536: x_atp_rec := p_atp_rec;
537: FOR i in 1..p_atp_rec.Calling_Module.LAST LOOP

Line 567: msc_sch_wb.atp_debug('Call_ATP: ' || 'After Assigning values for x_atp_rec');

563:
564: END LOOP;
565:
566: IF PG_DEBUG in ('Y', 'C') THEN
567: msc_sch_wb.atp_debug('Call_ATP: ' || 'After Assigning values for x_atp_rec');
568: END IF;
569:
570: ELSE
571:

Line 604: msc_sch_wb.atp_debug('Call_ATP: Inserted data into msc_oe_data_temp');

600: p_session_id
601: );
602:
603: IF PG_DEBUG in ('Y', 'C') THEN
604: msc_sch_wb.atp_debug('Call_ATP: Inserted data into msc_oe_data_temp');
605: msc_sch_wb.atp_debug('Records selected in mrp_oe_data_temp : ' || SQL%ROWCOUNT);
606: END IF;
607:
608: select oe_flag,internal_org_id,seq_id

Line 605: msc_sch_wb.atp_debug('Records selected in mrp_oe_data_temp : ' || SQL%ROWCOUNT);

601: );
602:
603: IF PG_DEBUG in ('Y', 'C') THEN
604: msc_sch_wb.atp_debug('Call_ATP: Inserted data into msc_oe_data_temp');
605: msc_sch_wb.atp_debug('Records selected in mrp_oe_data_temp : ' || SQL%ROWCOUNT);
606: END IF;
607:
608: select oe_flag,internal_org_id,seq_id
609: bulk collect into

Line 618: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');

614: where session_id = p_session_id
615: order by seq_id;
616:
617: IF PG_DEBUG in ('Y', 'C') THEN
618: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');
619: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
620: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
621: FOR l in 1..l_atp_rec.action.LAST LOOP
622: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));

Line 619: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);

615: order by seq_id;
616:
617: IF PG_DEBUG in ('Y', 'C') THEN
618: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');
619: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
620: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
621: FOR l in 1..l_atp_rec.action.LAST LOOP
622: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));
623: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));

Line 620: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);

616:
617: IF PG_DEBUG in ('Y', 'C') THEN
618: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');
619: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
620: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
621: FOR l in 1..l_atp_rec.action.LAST LOOP
622: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));
623: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));
624: END LOOP;

Line 622: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));

618: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');
619: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
620: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
621: FOR l in 1..l_atp_rec.action.LAST LOOP
622: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));
623: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));
624: END LOOP;
625: END IF;
626: END IF;

Line 623: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));

619: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
620: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
621: FOR l in 1..l_atp_rec.action.LAST LOOP
622: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));
623: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));
624: END LOOP;
625: END IF;
626: END IF;
627: -- End 4279623

Line 648: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'error in mrp_ap_apps_instances');

644: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status);
645:
646: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
647: IF PG_DEBUG in ('Y', 'C') THEN
648: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'error in mrp_ap_apps_instances');
649: END IF;
650: END IF;
651:
652: i := p_atp_rec.Calling_Module.FIRST;

Line 655: msc_sch_wb.atp_debug('ATP Running in non autonomous mode');

651:
652: i := p_atp_rec.Calling_Module.FIRST;
653: IF i IS NOT NULL THEN
654: IF PG_DEBUG in ('Y', 'C') THEN
655: msc_sch_wb.atp_debug('ATP Running in non autonomous mode');
656: END IF;
657: Call_ATP_No_Commit( p_session_id,
658: p_atp_rec,
659: x_atp_rec,

Line 668: msc_sch_wb.atp_debug(' before closing DB Link');

664: x_msg_data,
665: x_msg_count);
666: IF l_a2m_dblink IS NOT NULL THEN
667: IF PG_DEBUG in ('Y', 'C') THEN
668: msc_sch_wb.atp_debug(' before closing DB Link');
669: END IF;
670: cursor_name := dbms_sql.open_cursor;
671: DBMS_SQL.PARSE(cursor_name, 'alter session close database link ' ||l_a2m_dblink,
672: dbms_sql.native);

Line 680: msc_sch_wb.atp_debug('inside DBLINK_NOT_OPEN');

676: rows_processed := dbms_sql.execute(cursor_name);
677: EXCEPTION
678: WHEN DBLINK_NOT_OPEN THEN
679: IF PG_DEBUG in ('Y', 'C') THEN
680: msc_sch_wb.atp_debug('inside DBLINK_NOT_OPEN');
681: END IF;
682: END;
683: DBMS_SQL.close_cursor(cursor_name);
684: IF PG_DEBUG in ('Y', 'C') THEN

Line 685: msc_sch_wb.atp_debug('after commit, after closing DB Link');

681: END IF;
682: END;
683: DBMS_SQL.close_cursor(cursor_name);
684: IF PG_DEBUG in ('Y', 'C') THEN
685: msc_sch_wb.atp_debug('after commit, after closing DB Link');
686: END IF;
687: END IF;
688: END IF;
689: ELSE

Line 691: msc_sch_wb.atp_debug('ATP Running in autonomous mode'); --5195929 End

687: END IF;
688: END IF;
689: ELSE
690: IF PG_DEBUG in ('Y', 'C') THEN
691: msc_sch_wb.atp_debug('ATP Running in autonomous mode'); --5195929 End
692: END IF;
693:
694: Call_ATP_Commit( p_session_id,
695: l_atp_rec,

Line 711: msc_sch_wb.atp_debug('expected error in Call_ATP_No_Commit');

707:
708: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
709: -- something wrong so we want to rollback;
710: IF PG_DEBUG in ('Y', 'C') THEN
711: msc_sch_wb.atp_debug('expected error in Call_ATP_No_Commit');
712: END IF;
713: RAISE FND_API.G_EXC_ERROR ;
714: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
715: IF PG_DEBUG in ('Y', 'C') THEN

Line 716: msc_sch_wb.atp_debug('something wrong in Call_ATP_No_Commit');

712: END IF;
713: RAISE FND_API.G_EXC_ERROR ;
714: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
715: IF PG_DEBUG in ('Y', 'C') THEN
716: msc_sch_wb.atp_debug('something wrong in Call_ATP_No_Commit');
717: END IF;
718: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
719: END IF;
720:

Line 722: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status : '||x_return_status);

718: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
719: END IF;
720:
721: IF PG_DEBUG in ('Y', 'C') THEN
722: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status : '||x_return_status);
723: END IF;
724:
725:
726: -- Bug 2387242 : krajan

Line 736: msc_sch_wb.atp_debug('End Call_ATP');

732: END IF;
733: END IF;
734:
735: IF PG_DEBUG in ('Y', 'C') THEN
736: msc_sch_wb.atp_debug('End Call_ATP');
737: END IF;
738: EXCEPTION
739:
740: -- Error Handling fix : krajan

Line 744: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);

740: -- Error Handling fix : krajan
741: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
742: -- something wrong so we want to rollback;
743: IF PG_DEBUG in ('Y', 'C') THEN
744: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
745: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
746: msc_sch_wb.atp_debug('Call_ATP: Invalid Objects found.');
747: END IF;
748:

Line 745: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);

741: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
742: -- something wrong so we want to rollback;
743: IF PG_DEBUG in ('Y', 'C') THEN
744: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
745: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
746: msc_sch_wb.atp_debug('Call_ATP: Invalid Objects found.');
747: END IF;
748:
749: -- Step1: Assign output record

Line 746: msc_sch_wb.atp_debug('Call_ATP: Invalid Objects found.');

742: -- something wrong so we want to rollback;
743: IF PG_DEBUG in ('Y', 'C') THEN
744: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
745: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
746: msc_sch_wb.atp_debug('Call_ATP: Invalid Objects found.');
747: END IF;
748:
749: -- Step1: Assign output record
750: IF (x_atp_rec.Inventory_item_id.COUNT = 0) THEN

Line 769: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status in excpetion : '||x_return_status);

765: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Call_ATP');
766: END IF;
767: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
768: IF PG_DEBUG in ('Y', 'C') THEN
769: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status in excpetion : '||x_return_status);
770: END IF;
771: -- End Error Handling Fix
772:
773: -- Bug 2387242 : krajan

Line 786: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);

782:
783: WHEN others THEN
784: -- something wrong so we want to rollback;
785: IF PG_DEBUG in ('Y', 'C') THEN
786: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
787: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
788: END IF;
789:
790: -- Error Handling fix : krajan

Line 787: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);

783: WHEN others THEN
784: -- something wrong so we want to rollback;
785: IF PG_DEBUG in ('Y', 'C') THEN
786: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
787: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
788: END IF;
789:
790: -- Error Handling fix : krajan
791: IF (x_atp_rec.Inventory_item_id.COUNT = 0) THEN

Line 821: msc_sch_wb.atp_debug('before rollback, before closing DB Link');

817: IF nvl(p_atp_rec.Action(i),100) <> 100 and
818: NVL(p_atp_rec.Calling_Module(i), -99) <> 724 and
819: nvl(l_atp_rec.attribute_14(1),2) = 1 THEN
820: IF PG_DEBUG in ('Y', 'C') THEN
821: msc_sch_wb.atp_debug('before rollback, before closing DB Link');
822: END IF;
823: ROLLBACK TO SAVEPOINT start_of_call_atp;
824: IF PG_DEBUG in ('Y', 'C') THEN
825: msc_sch_wb.atp_debug('after rollback, before closing DB Link');

Line 825: msc_sch_wb.atp_debug('after rollback, before closing DB Link');

821: msc_sch_wb.atp_debug('before rollback, before closing DB Link');
822: END IF;
823: ROLLBACK TO SAVEPOINT start_of_call_atp;
824: IF PG_DEBUG in ('Y', 'C') THEN
825: msc_sch_wb.atp_debug('after rollback, before closing DB Link');
826: END IF;
827: IF l_a2m_dblink IS NOT NULL THEN
828: cursor_name := dbms_sql.open_cursor;
829: DBMS_SQL.PARSE(cursor_name, 'alter session close database link ' ||l_a2m_dblink,

Line 836: msc_sch_wb.atp_debug('inside DBLINK_NOT_OPEN exception');

832: rows_processed := dbms_sql.execute(cursor_name);
833: EXCEPTION
834: WHEN DBLINK_NOT_OPEN THEN
835: IF PG_DEBUG in ('Y', 'C') THEN
836: msc_sch_wb.atp_debug('inside DBLINK_NOT_OPEN exception');
837: END IF;
838: END;
839: DBMS_SQL.close_cursor(cursor_name);
840: IF PG_DEBUG in ('Y', 'C') THEN

Line 841: msc_sch_wb.atp_debug('after rollback, after closing DB Link');

837: END IF;
838: END;
839: DBMS_SQL.close_cursor(cursor_name);
840: IF PG_DEBUG in ('Y', 'C') THEN
841: msc_sch_wb.atp_debug('after rollback, after closing DB Link');
842: END IF;
843: END IF;
844: END IF;
845: --5195929 End

Line 848: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status in excpetion : '||x_return_status);

844: END IF;
845: --5195929 End
846: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
847: IF PG_DEBUG in ('Y', 'C') THEN
848: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status in excpetion : '||x_return_status);
849: END IF;
850:
851: END Call_ATP;
852:

Line 972: msc_sch_wb.set_session_id(p_session_id);

968: BEGIN
969: --Started change for bug 4421391
970: L_RETURN_NUM := 1;
971: IF G_CALL_ATP = 2 THEN
972: msc_sch_wb.set_session_id(p_session_id);
973: IF order_sch_wb.mr_debug in ('T','C') THEN
974: enable_trace(L_RETURN_NUM);
975: IF L_RETURN_NUM =-1 THEN
976: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;

Line 984: msc_sch_wb.atp_debug('Begin Call_ATP_No_Commit');

980:
981: --4421391
982:
983: IF PG_DEBUG in ('Y', 'C') THEN
984: msc_sch_wb.atp_debug('Begin Call_ATP_No_Commit');
985: END IF;
986:
987: -- initialize API returm status to success
988: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'oe_flag count : ' || p_atp_rec.oe_flag.count);

989:
990: -- created a savepoint
991: SAVEPOINT start_of_call_atp_no_commit;
992: IF PG_DEBUG in ('Y', 'C') THEN
993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'oe_flag count : ' || p_atp_rec.oe_flag.count);
994: END IF;
995:
996: l_atp_rec := p_atp_rec;
997:

Line 1003: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));

999:
1000: IF i IS NOT NULL THEN
1001:
1002: IF PG_DEBUG in ('Y', 'C') THEN
1003: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));
1004: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1005: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1006: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1007: ||p_atp_rec.requested_ship_date(i));

Line 1004: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));

1000: IF i IS NOT NULL THEN
1001:
1002: IF PG_DEBUG in ('Y', 'C') THEN
1003: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));
1004: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1005: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1006: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1007: ||p_atp_rec.requested_ship_date(i));
1008: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '

Line 1005: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);

1001:
1002: IF PG_DEBUG in ('Y', 'C') THEN
1003: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));
1004: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1005: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1006: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1007: ||p_atp_rec.requested_ship_date(i));
1008: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '
1009: ||p_atp_rec.requested_arrival_date(i));

Line 1006: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '

1002: IF PG_DEBUG in ('Y', 'C') THEN
1003: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));
1004: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1005: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1006: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1007: ||p_atp_rec.requested_ship_date(i));
1008: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '
1009: ||p_atp_rec.requested_arrival_date(i));
1010: END IF;

Line 1008: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '

1004: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1005: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1006: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1007: ||p_atp_rec.requested_ship_date(i));
1008: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '
1009: ||p_atp_rec.requested_arrival_date(i));
1010: END IF;
1011:
1012: -- Set l_cto_flag = 1 in case call is from OM or Configurator

Line 1023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG : '||G_CTO_FLAG);

1019: G_INV_CTP = 4 and p_atp_rec.ship_set_name(i) IS NOT NULL THEN
1020: G_CTO_FLAG := 1;
1021: END IF;
1022: IF PG_DEBUG in ('Y', 'C') THEN
1023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG : '||G_CTO_FLAG);
1024: END IF;
1025: */
1026:
1027: IF NVL(p_atp_rec.Calling_Module(i), -99) = 724 THEN

Line 1035: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id = '||l_instance_id);

1031:
1032: l_instance_id := p_atp_rec.instance_id(i);
1033:
1034: IF PG_DEBUG in ('Y', 'C') THEN
1035: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id = '||l_instance_id);
1036: END IF;
1037: -- get the assignment set from profile in msc. if it is null,
1038: -- the assignment get from msc_apps_instance.
1039: --diag_atp

Line 1052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id = '||l_assign_set_id);

1048: l_assign_set_id := FND_PROFILE.value('MSC_ATP_ASSIGN_SET');
1049: END IF;
1050:
1051: IF PG_DEBUG in ('Y', 'C') THEN
1052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id = '||l_assign_set_id);
1053: END IF;
1054:
1055: IF l_assign_set_id is NULL THEN
1056: SELECT assignment_set_id

Line 1080: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id = '||l_assign_set_id);

1076: l_assign_set_id := FND_PROFILE.value('MRP_ATP_ASSIGN_SET');
1077: END IF;
1078:
1079: IF PG_DEBUG in ('Y', 'C') THEN
1080: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id = '||l_assign_set_id);
1081: END IF;
1082:
1083: END IF;
1084:

Line 1101: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'No instance Id record found in mrp_ap_apps_instances');

1097: EXCEPTION
1098: WHEN others THEN
1099: -- something wrong so we want to rollback
1100: IF PG_DEBUG in ('Y', 'C') THEN
1101: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'No instance Id record found in mrp_ap_apps_instances');
1102: END IF;
1103: x_atp_rec := l_atp_rec;
1104: RAISE FND_API.G_EXC_ERROR ;
1105: END;

Line 1113: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Before Calling ATI for finding CTO-ATP Items');

1109: --s_cto_rearch
1110: g_atp_check := 'N';
1111:
1112: IF PG_DEBUG in ('Y', 'C') THEN
1113: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Before Calling ATI for finding CTO-ATP Items');
1114: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1115: END IF;
1116:
1117: IF l_instance_id IS NULL and NVL(p_atp_rec.Calling_Module(i), -99) <> 724 THEN

Line 1114: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));

1110: g_atp_check := 'N';
1111:
1112: IF PG_DEBUG in ('Y', 'C') THEN
1113: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Before Calling ATI for finding CTO-ATP Items');
1114: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1115: END IF;
1116:
1117: IF l_instance_id IS NULL and NVL(p_atp_rec.Calling_Module(i), -99) <> 724 THEN
1118: IF PG_DEBUG in ('Y', 'C') THEN

Line 1119: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Query from non-APS instance, find instance_id');

1115: END IF;
1116:
1117: IF l_instance_id IS NULL and NVL(p_atp_rec.Calling_Module(i), -99) <> 724 THEN
1118: IF PG_DEBUG in ('Y', 'C') THEN
1119: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Query from non-APS instance, find instance_id');
1120: END IF;
1121:
1122: /* BEGIN
1123: SELECT instance_id, a2m_dblink

Line 1131: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Error in mrp_ap_apps_instances : ' || sqlcode);

1127: EXCEPTION
1128: WHEN others THEN
1129: -- something wrong so we want to rollback;
1130: IF PG_DEBUG in ('Y', 'C') THEN
1131: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Error in mrp_ap_apps_instances : ' || sqlcode);
1132: END IF;
1133: x_atp_rec := l_atp_rec;
1134:
1135: FOR i in 1..x_atp_rec.Calling_Module.LAST LOOP

Line 1146: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));

1142: -- Uncommenting get_dblink_profile for bug 3632914
1143: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start
1144:
1145: IF PG_DEBUG in ('Y', 'C') THEN
1146: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1147: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_a2m_dblink := ' || l_a2m_dblink);
1148: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_return_status of := get_dblink_profile ' || l_return_status);
1149: END IF;
1150:

Line 1147: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_a2m_dblink := ' || l_a2m_dblink);

1143: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start
1144:
1145: IF PG_DEBUG in ('Y', 'C') THEN
1146: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1147: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_a2m_dblink := ' || l_a2m_dblink);
1148: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_return_status of := get_dblink_profile ' || l_return_status);
1149: END IF;
1150:
1151: --bug3940999 dumping the profiles on source

Line 1148: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_return_status of := get_dblink_profile ' || l_return_status);

1144:
1145: IF PG_DEBUG in ('Y', 'C') THEN
1146: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1147: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_a2m_dblink := ' || l_a2m_dblink);
1148: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_return_status of := get_dblink_profile ' || l_return_status);
1149: END IF;
1150:
1151: --bug3940999 dumping the profiles on source
1152: IF l_a2m_dblink is not NULL THEN

Line 1157: msc_sch_wb.atp_debug('Call_ATP_No_Commit : ' || 'l_return_status of put_src_to_dstn_profiles:= ' || l_return_status);

1153: MSC_SATP_FUNC.put_src_to_dstn_profiles(p_session_id,
1154: l_return_status);
1155: END IF;
1156: IF PG_DEBUG in ('Y', 'C') THEN
1157: msc_sch_wb.atp_debug('Call_ATP_No_Commit : ' || 'l_return_status of put_src_to_dstn_profiles:= ' || l_return_status);
1158: END IF;
1159:
1160: /* bug 3623018: Do not raise this error here. Raise it only when some item is found to be atpbale
1161: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 1179: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MRP:ATP DATABASE LINK profile option and MRP_AP_APPS_INSTANCES table

1175: --- if MRP:ATP Database link profile option and mrp_ap_apps_instances table not in sync then
1176: --- raise an error
1177: /*IF (NVL(UPPER(l_a2m_dblink), -1) <> NVL(UPPER(G_DB_PROFILE), -1)) THEN
1178: IF PG_DEBUG in ('Y', 'C') THEN
1179: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MRP:ATP DATABASE LINK profile option and MRP_AP_APPS_INSTANCES table
1180: not in SYNC');
1181: END IF;
1182: x_atp_rec := l_atp_rec;
1183:

Line 1215: msc_sch_wb.atp_debug('l_return_status := ' || l_return_status);

1211:
1212: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1213: -- something wrong so we want to rollback;
1214: IF PG_DEBUG in ('Y', 'C') THEN
1215: msc_sch_wb.atp_debug('l_return_status := ' || l_return_status);
1216: msc_sch_wb.atp_debug('Call_ATP: ' || 'expected error in Call to Check_CTO');
1217: END IF;
1218: x_return_status := l_return_status;
1219: x_atp_rec := l_atp_rec;

Line 1216: msc_sch_wb.atp_debug('Call_ATP: ' || 'expected error in Call to Check_CTO');

1212: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1213: -- something wrong so we want to rollback;
1214: IF PG_DEBUG in ('Y', 'C') THEN
1215: msc_sch_wb.atp_debug('l_return_status := ' || l_return_status);
1216: msc_sch_wb.atp_debug('Call_ATP: ' || 'expected error in Call to Check_CTO');
1217: END IF;
1218: x_return_status := l_return_status;
1219: x_atp_rec := l_atp_rec;
1220: RAISE FND_API.G_EXC_ERROR;

Line 1274: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j : ' ||j);

1270: BEGIN --bug3583705
1271: -- savirine, Sep 05, 2001: call get_regions to get regions info to be used for ATP request.
1272:
1273: IF PG_DEBUG in ('Y', 'C') THEN
1274: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j : ' ||j);
1275: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date : ' ||l_atp_rec.requested_ship_date(j));
1276: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date : ' ||l_atp_rec.requested_arrival_date(j));
1277: END IF;
1278: l_past_due_ship_date := 2; --bug4291375 resetting variable to no past due date

Line 1275: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date : ' ||l_atp_rec.requested_ship_date(j));

1271: -- savirine, Sep 05, 2001: call get_regions to get regions info to be used for ATP request.
1272:
1273: IF PG_DEBUG in ('Y', 'C') THEN
1274: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j : ' ||j);
1275: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date : ' ||l_atp_rec.requested_ship_date(j));
1276: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date : ' ||l_atp_rec.requested_arrival_date(j));
1277: END IF;
1278: l_past_due_ship_date := 2; --bug4291375 resetting variable to no past due date
1279: -- 3000016

Line 1276: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date : ' ||l_atp_rec.requested_arrival_date(j));

1272:
1273: IF PG_DEBUG in ('Y', 'C') THEN
1274: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j : ' ||j);
1275: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date : ' ||l_atp_rec.requested_ship_date(j));
1276: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date : ' ||l_atp_rec.requested_arrival_date(j));
1277: END IF;
1278: l_past_due_ship_date := 2; --bug4291375 resetting variable to no past due date
1279: -- 3000016
1280: IF G_ATP_CHECK = 'N' THEN

Line 1284: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Item Is non atpable');

1280: IF G_ATP_CHECK = 'N' THEN
1281:
1282: IF PG_DEBUG in ('Y', 'C') THEN
1283:
1284: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Item Is non atpable');
1285: END IF;
1286:
1287: IF l_atp_rec.attribute_06(j) is null THEN
1288:

Line 1291: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Invalid Item Org Combo');

1287: IF l_atp_rec.attribute_06(j) is null THEN
1288:
1289: IF PG_DEBUG in ('Y', 'C') THEN
1290:
1291: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Invalid Item Org Combo');
1292: END IF;
1293:
1294: l_atp_rec.error_code(j) := MSC_ATP_PVT.INVALID_ITEM_ORG_COMBINATION;
1295:

Line 1298: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));

1294: l_atp_rec.error_code(j) := MSC_ATP_PVT.INVALID_ITEM_ORG_COMBINATION;
1295:
1296: l_end := j;
1297: IF PG_DEBUG in ('Y', 'C') THEN
1298: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));
1299: msc_sch_wb.atp_debug('ato_model_line_id :== ' || l_atp_rec.ato_model_line_id(l_end));
1300: msc_sch_wb.atp_debug('bom_item_type := ' || l_atp_rec.bom_item_type(l_end));
1301: END IF;
1302: -- advance l_end to the end of the set

Line 1299: msc_sch_wb.atp_debug('ato_model_line_id :== ' || l_atp_rec.ato_model_line_id(l_end));

1295:
1296: l_end := j;
1297: IF PG_DEBUG in ('Y', 'C') THEN
1298: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));
1299: msc_sch_wb.atp_debug('ato_model_line_id :== ' || l_atp_rec.ato_model_line_id(l_end));
1300: msc_sch_wb.atp_debug('bom_item_type := ' || l_atp_rec.bom_item_type(l_end));
1301: END IF;
1302: -- advance l_end to the end of the set
1303: while l_end < l_atp_rec.action.count() and

Line 1300: msc_sch_wb.atp_debug('bom_item_type := ' || l_atp_rec.bom_item_type(l_end));

1296: l_end := j;
1297: IF PG_DEBUG in ('Y', 'C') THEN
1298: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));
1299: msc_sch_wb.atp_debug('ato_model_line_id :== ' || l_atp_rec.ato_model_line_id(l_end));
1300: msc_sch_wb.atp_debug('bom_item_type := ' || l_atp_rec.bom_item_type(l_end));
1301: END IF;
1302: -- advance l_end to the end of the set
1303: while l_end < l_atp_rec.action.count() and
1304: (nvl(l_atp_rec.ship_set_name(l_end+1), -99) = nvl(l_atp_rec.ship_set_name(l_start), -99) and

Line 1313: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');

1309:
1310: IF l_atp_rec.identifier(l_end) = l_atp_rec.ato_model_line_id(l_end) THEN
1311: MSC_ATP_CTO.G_MODEL_IS_PRESENT := 1;
1312: IF PG_DEBUG in ('Y', 'C') THEN
1313: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');
1314: END IF;
1315: END IF;
1316: end loop;
1317: mrp_atp_pvt.assign_atp_input_rec(l_atp_rec,l_end,x_atp_rec,x_return_status);

Line 1322: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');

1318:
1319: IF l_atp_rec.identifier(l_end) = l_atp_rec.ato_model_line_id(l_end) THEN
1320: MSC_ATP_CTO.G_MODEL_IS_PRESENT := 1;
1321: IF PG_DEBUG in ('Y', 'C') THEN
1322: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');
1323: END IF;
1324: END IF;
1325:
1326:

Line 1349: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');

1345: END IF;
1346: END IF;
1347: END IF; -- F G_ATP_CHECK := 'N' THEN
1348: IF PG_DEBUG in ('Y', 'C') THEN
1349: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1350: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1352: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1353: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));

Line 1350: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));

1346: END IF;
1347: END IF; -- F G_ATP_CHECK := 'N' THEN
1348: IF PG_DEBUG in ('Y', 'C') THEN
1349: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1350: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1352: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1353: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1354: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));

Line 1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));

1347: END IF; -- F G_ATP_CHECK := 'N' THEN
1348: IF PG_DEBUG in ('Y', 'C') THEN
1349: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1350: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1352: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1353: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1354: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1355: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));

Line 1352: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));

1348: IF PG_DEBUG in ('Y', 'C') THEN
1349: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1350: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1352: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1353: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1354: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1355: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));
1356: END IF;

Line 1353: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));

1349: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1350: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1352: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1353: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1354: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1355: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));
1356: END IF;
1357: IF (NVL(l_customer_site_id, -1) <> l_atp_rec.customer_site_id(j))

Line 1354: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));

1350: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1352: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1353: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1354: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1355: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));
1356: END IF;
1357: IF (NVL(l_customer_site_id, -1) <> l_atp_rec.customer_site_id(j))
1358: --2814895, added checks for address parameters and party_site_id

Line 1355: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));

1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1352: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1353: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1354: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1355: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));
1356: END IF;
1357: IF (NVL(l_customer_site_id, -1) <> l_atp_rec.customer_site_id(j))
1358: --2814895, added checks for address parameters and party_site_id
1359: OR (NVL(l_party_site_id, -1) <> l_atp_rec.party_site_id(j))

Line 1405: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Get_Regions, return status : ' || l_return_status);

1401: p_order_line_id => l_atp_rec.identifier(j) --2814895, added identifier for address parameters
1402: );
1403:
1404: IF PG_DEBUG in ('Y', 'C') THEN
1405: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Get_Regions, return status : ' || l_return_status);
1406: END IF;
1407:
1408: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1409: -- something wrong so we want to rollback;

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

1407:
1408: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1409: -- something wrong so we want to rollback;
1410: IF PG_DEBUG in ('Y', 'C') THEN
1411: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'expected error in Call to Get_Regions');
1412: END IF;
1413: x_atp_rec := l_atp_rec;
1414: --bug3583705 if this xcptn is raised then processing for all line will not stop
1415: -- as it will be handled in when others xcptn

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

1415: -- as it will be handled in when others xcptn
1416: RAISE FND_API.G_EXC_ERROR ;
1417: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
1418: IF PG_DEBUG in ('Y', 'C') THEN
1419: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'something wrong in Call to Get_Regions');
1420: END IF;
1421: x_atp_rec := l_atp_rec;
1422: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
1423: END IF;

Line 1427: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'g_atp_check := ' || g_atp_check);

1423: END IF;
1424: END IF;
1425:
1426: IF PG_DEBUG in ('Y', 'C') THEN
1427: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'g_atp_check := ' || g_atp_check);
1428: END IF;
1429:
1430: IF NVL(g_atp_check, '@') = 'N' THEN
1431:

Line 1433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'No ATPable item or CTO model in the ATP request from source');

1429:
1430: IF NVL(g_atp_check, '@') = 'N' THEN
1431:
1432: IF PG_DEBUG in ('Y', 'C') THEN
1433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'No ATPable item or CTO model in the ATP request from source');
1434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Set values for ship and group date and error code');
1435: END IF;
1436: -- we cannot assign this directly since the l_atp_rec may not be a
1437: -- complete record, that is, there are some elements that are not initialized before.

Line 1434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Set values for ship and group date and error code');

1430: IF NVL(g_atp_check, '@') = 'N' THEN
1431:
1432: IF PG_DEBUG in ('Y', 'C') THEN
1433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'No ATPable item or CTO model in the ATP request from source');
1434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Set values for ship and group date and error code');
1435: END IF;
1436: -- we cannot assign this directly since the l_atp_rec may not be a
1437: -- complete record, that is, there are some elements that are not initialized before.
1438: -- x_atp_rec := l_atp_rec;

Line 1442: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');

1438: -- x_atp_rec := l_atp_rec;
1439:
1440: IF l_atp_rec.identifier(j) = l_atp_rec.ato_model_line_id(j) and l_atp_rec.bom_item_type(j) = 1 THEN
1441: MSC_ATP_CTO.G_MODEL_IS_PRESENT := 1;
1442: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');
1443: END IF;
1444: mrp_atp_pvt.assign_atp_input_rec(l_atp_rec,j,x_atp_rec,x_return_status);
1445:
1446: if x_atp_rec.action(j) = 100 then

Line 1461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_delivery_lead_time : ' || l_delivery_lead_time);

1457: l_ship_method := x_atp_rec.ship_method(j);
1458: l_delivery_lead_time := x_atp_rec.delivery_lead_time(j);
1459:
1460: IF PG_DEBUG in ('Y', 'C') THEN
1461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_delivery_lead_time : ' || l_delivery_lead_time);
1462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'quantity_ordered(' || j || ') : ' || x_atp_rec.quantity_ordered(j));
1463: END IF;
1464:
1465: -- krajan : 2748041

Line 1462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'quantity_ordered(' || j || ') : ' || x_atp_rec.quantity_ordered(j));

1458: l_delivery_lead_time := x_atp_rec.delivery_lead_time(j);
1459:
1460: IF PG_DEBUG in ('Y', 'C') THEN
1461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_delivery_lead_time : ' || l_delivery_lead_time);
1462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'quantity_ordered(' || j || ') : ' || x_atp_rec.quantity_ordered(j));
1463: END IF;
1464:
1465: -- krajan : 2748041
1466: -- Defaulting the delivery lead time for ATO delete flag case

Line 1472: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG is 2 for non_atpable item or');

1468: -- By setting it to 0, we dont have to go through the whole delivery
1469: -- lead time calculation.
1470: if (x_atp_rec.quantity_ordered(j) = 0 ) then
1471: IF PG_DEBUG in ('Y', 'C') THEN
1472: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG is 2 for non_atpable item or');
1473: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'A non ATPable item is being cancelled');
1474: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Setting the delivery lead time to 0');
1475: END IF;
1476: l_delivery_lead_time := 0;

Line 1473: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'A non ATPable item is being cancelled');

1469: -- lead time calculation.
1470: if (x_atp_rec.quantity_ordered(j) = 0 ) then
1471: IF PG_DEBUG in ('Y', 'C') THEN
1472: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG is 2 for non_atpable item or');
1473: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'A non ATPable item is being cancelled');
1474: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Setting the delivery lead time to 0');
1475: END IF;
1476: l_delivery_lead_time := 0;
1477: --bug 3979115:

Line 1474: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Setting the delivery lead time to 0');

1470: if (x_atp_rec.quantity_ordered(j) = 0 ) then
1471: IF PG_DEBUG in ('Y', 'C') THEN
1472: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG is 2 for non_atpable item or');
1473: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'A non ATPable item is being cancelled');
1474: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Setting the delivery lead time to 0');
1475: END IF;
1476: l_delivery_lead_time := 0;
1477: --bug 3979115:
1478: x_atp_rec.receiving_cal_code(j) := MSC_CALENDAR.FOC;

Line 1518: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);

1514: l_customer_site_id := x_atp_rec.customer_site_id(j);
1515: */
1516:
1517: IF PG_DEBUG in ('Y', 'C') THEN
1518: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);
1519: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);
1520: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1521: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1522: END IF;

Line 1519: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);

1515: */
1516:
1517: IF PG_DEBUG in ('Y', 'C') THEN
1518: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);
1519: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);
1520: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1521: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1522: END IF;
1523:

Line 1520: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);

1516:
1517: IF PG_DEBUG in ('Y', 'C') THEN
1518: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);
1519: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);
1520: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1521: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1522: END IF;
1523:
1524: l_from_location := MSC_SATP_FUNC.src_location_id(l_source_organization_id, null, null);

Line 1521: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);

1517: IF PG_DEBUG in ('Y', 'C') THEN
1518: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);
1519: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);
1520: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1521: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1522: END IF;
1523:
1524: l_from_location := MSC_SATP_FUNC.src_location_id(l_source_organization_id, null, null);
1525:

Line 1527: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_from_location : ' || l_from_location);

1523:
1524: l_from_location := MSC_SATP_FUNC.src_location_id(l_source_organization_id, null, null);
1525:
1526: IF PG_DEBUG in ('Y', 'C') THEN
1527: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_from_location : ' || l_from_location);
1528: END IF;
1529:
1530: -- Bug 3449812 - Base DLT on internal_org_id if available
1531: -- IF NVL(x_atp_rec.internal_org_id(j),l_to_organization_id) IS NOT NULL THEN

Line 1542: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'l_to_location : ' || l_to_location);

1538: l_to_location := MSC_SATP_FUNC.src_location_id(null, l_customer_id, l_customer_site_id);
1539: END IF;
1540:
1541: IF PG_DEBUG in ('Y', 'C') THEN
1542: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'l_to_location : ' || l_to_location);
1543: END IF;
1544:
1545: -- dsting dlt
1546: -- IF x_atp_rec.internal_org_id(j) IS NOT NULL THEN

Line 1555: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside Org code');

1551: AND ((l_customer_id IS NULL AND l_customer_site_id IS NULL)
1552: OR l_party_site_id IS NULL
1553: OR l_country IS NULL )) THEN --2814895, added conditions for address parameter and party_site_id
1554: IF PG_DEBUG in ('Y', 'C') THEN
1555: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside Org code');
1556: END IF;
1557: MSC_SATP_FUNC.get_src_transit_time(
1558: l_source_organization_id,
1559: l_from_location,

Line 1569: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside customer code');

1565: l_ship_method,
1566: l_delivery_lead_time);
1567: ELSIF ( l_customer_site_id is not NULL) THEN --2814895
1568: IF PG_DEBUG in ('Y', 'C') THEN
1569: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside customer code');
1570: END IF;
1571: MSC_SATP_FUNC.get_src_transit_time(
1572: l_source_organization_id,
1573: l_from_location,

Line 1585: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside party_site code');

1581: 2 --2814895, partner_type for customer
1582: );
1583: ELSIF ( l_party_site_id is not NULL) THEN --2814895
1584: IF PG_DEBUG in ('Y', 'C') THEN
1585: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside party_site code');
1586: END IF;
1587: MSC_SATP_FUNC.get_src_transit_time(
1588: l_source_organization_id,
1589: l_from_location,

Line 1600: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside address_parameter code');

1596: 4 --2814895, partner_type for party_site_id
1597: );
1598: ELSIF (l_country IS NOT NULL) THEN --2814895
1599: IF PG_DEBUG in ('Y', 'C') THEN
1600: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside address_parameter code');
1601: END IF;
1602: MSC_SATP_FUNC.get_src_transit_time(
1603: l_source_organization_id,
1604: l_from_location,

Line 1621: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'DLT parameters have not changed');

1617: ELSE
1618:
1619: -- Bug3593394 - Use from previous line
1620: IF PG_DEBUG in ('Y', 'C') THEN
1621: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'DLT parameters have not changed');
1622: END IF;
1623: l_delivery_lead_time := x_atp_rec.delivery_lead_time(j-1);
1624: l_ship_method := x_atp_rec.ship_method(j-1);
1625:

Line 1649: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');

1645: x_atp_rec.source_organization_id(j),
1646: sysdate);
1647: IF l_sysdate IS NULL THEN
1648: IF PG_DEBUG in ('Y', 'C') THEN
1649: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');
1650: END IF;
1651: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1652: RAISE NO_DATA_FOUND;
1653: END IF;

Line 1665: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'prev date for ship date not found in Calendar');

1661: x_atp_rec.source_organization_id(J),
1662: x_atp_rec.ship_date(j));
1663: IF l_prev_work_ship_date IS NULL THEN
1664: IF PG_DEBUG in ('Y', 'C') THEN
1665: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'prev date for ship date not found in Calendar');
1666: END IF;
1667: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1668: RAISE NO_DATA_FOUND;
1669: END IF;

Line 1678: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));

1674: -- and l_atp_rec.ship_date is D9 (previous working day) 0:00.
1675: -- we want to return ship date as D9 0:00 instead of D10 5pm.
1676:
1677: IF PG_DEBUG in ('Y', 'C') THEN
1678: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1679: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1680: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_prev_work_ship_date : ' || to_char(l_prev_work_ship_date, 'dd/mm/yyyy hh:mi:ss'));
1681: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1682: 'dd/mm/yyyy hh:mi:ss'));

Line 1679: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));

1675: -- we want to return ship date as D9 0:00 instead of D10 5pm.
1676:
1677: IF PG_DEBUG in ('Y', 'C') THEN
1678: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1679: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1680: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_prev_work_ship_date : ' || to_char(l_prev_work_ship_date, 'dd/mm/yyyy hh:mi:ss'));
1681: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1682: 'dd/mm/yyyy hh:mi:ss'));
1683: END IF;*/

Line 1680: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_prev_work_ship_date : ' || to_char(l_prev_work_ship_date, 'dd/mm/yyyy hh:mi:ss'));

1676:
1677: IF PG_DEBUG in ('Y', 'C') THEN
1678: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1679: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1680: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_prev_work_ship_date : ' || to_char(l_prev_work_ship_date, 'dd/mm/yyyy hh:mi:ss'));
1681: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1682: 'dd/mm/yyyy hh:mi:ss'));
1683: END IF;*/
1684:

Line 1681: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),

1677: IF PG_DEBUG in ('Y', 'C') THEN
1678: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1679: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1680: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_prev_work_ship_date : ' || to_char(l_prev_work_ship_date, 'dd/mm/yyyy hh:mi:ss'));
1681: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1682: 'dd/mm/yyyy hh:mi:ss'));
1683: END IF;*/
1684:
1685: /* Bug 3335268 - We dont require calendar/date calculation in unschedule cases */

Line 1714: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for VIC');

1710: x_atp_rec.ship_method(j), MSC_CALENDAR.VIC);
1711: ELSE
1712: x_atp_rec.intransit_cal_code(j) := x_atp_rec.intransit_cal_code(j-1);
1713: IF PG_DEBUG in ('Y', 'C') THEN
1714: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for VIC');
1715: END IF;
1716: END IF;
1717: ELSE
1718: -- Bug 3647208

Line 1740: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for ORC/CRC');

1736: AND NVL(x_atp_rec.ship_method(j),'@@@') = NVL(x_atp_rec.ship_method(j-1),'@@@') THEN
1737:
1738: x_atp_rec.receiving_cal_code(j) := x_atp_rec.receiving_cal_code(j-1);
1739: IF PG_DEBUG in ('Y', 'C') THEN
1740: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for ORC/CRC');
1741: END IF;
1742: ELSIF (x_atp_rec.internal_org_id(j) IS NOT NULL) OR
1743: (l_to_organization_id IS NOT NULL AND l_customer_id IS NULL AND l_customer_site_id IS NULL) THEN
1744: x_atp_rec.receiving_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null,

Line 1769: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for OSC');

1765: x_atp_rec.ship_method(j), MSC_CALENDAR.OSC);
1766: ELSE
1767: x_atp_rec.shipping_cal_code(j) := x_atp_rec.shipping_cal_code(j-1);
1768: IF PG_DEBUG in ('Y', 'C') THEN
1769: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for OSC');
1770: END IF;
1771: END IF;
1772:
1773: IF PG_DEBUG in ('Y', 'C') THEN

Line 1774: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'receiving_cal_code : ' || x_atp_rec.receiving_cal_code(j));

1770: END IF;
1771: END IF;
1772:
1773: IF PG_DEBUG in ('Y', 'C') THEN
1774: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'receiving_cal_code : ' || x_atp_rec.receiving_cal_code(j));
1775: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'intransit_cal_code : ' || x_atp_rec.intransit_cal_code(j));
1776: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'shipping_cal_code : ' || x_atp_rec.shipping_cal_code(j));
1777: END IF;
1778: /* ship_rec_cal changes end */

Line 1775: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'intransit_cal_code : ' || x_atp_rec.intransit_cal_code(j));

1771: END IF;
1772:
1773: IF PG_DEBUG in ('Y', 'C') THEN
1774: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'receiving_cal_code : ' || x_atp_rec.receiving_cal_code(j));
1775: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'intransit_cal_code : ' || x_atp_rec.intransit_cal_code(j));
1776: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'shipping_cal_code : ' || x_atp_rec.shipping_cal_code(j));
1777: END IF;
1778: /* ship_rec_cal changes end */
1779:

Line 1776: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'shipping_cal_code : ' || x_atp_rec.shipping_cal_code(j));

1772:
1773: IF PG_DEBUG in ('Y', 'C') THEN
1774: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'receiving_cal_code : ' || x_atp_rec.receiving_cal_code(j));
1775: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'intransit_cal_code : ' || x_atp_rec.intransit_cal_code(j));
1776: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'shipping_cal_code : ' || x_atp_rec.shipping_cal_code(j));
1777: END IF;
1778: /* ship_rec_cal changes end */
1779:
1780: -- Begin Bug 2232555, 2250456

Line 1784: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Override case. Do not mess with the dates');

1780: -- Begin Bug 2232555, 2250456
1781:
1782: -- bug 2649670 dsting. Handle override case for nonatpable items
1783: IF (NVL(x_atp_rec.override_flag(j), 'N') = 'Y') THEN
1784: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Override case. Do not mess with the dates');
1785:
1786: IF (x_atp_rec.requested_ship_date(j) is not null) THEN
1787: -- ship_rec_cal project changes. Honor atleast VIC and CRC to compute right arrival date
1788: -- x_atp_rec.arrival_date(j) := x_atp_rec.ship_date(j) + x_atp_rec.delivery_lead_time(j);

Line 1851: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');

1847:
1848: --bug3583705 not required
1849: /*IF l_sysdate IS NULL OR l_sysdate_osc IS NULL or l_sysdate_orc IS NULL THEN
1850: IF PG_DEBUG in ('Y', 'C') THEN
1851: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');
1852: END IF;
1853: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1854: RAISE NO_DATA_FOUND;
1855: END IF;*/

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

1877: END IF;
1878: */
1879: L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929
1880: IF PG_DEBUG in ('Y', 'C') THEN
1881: msc_sch_wb.atp_debug('Schedule: ' || 'MOVE_PAST_DUE_TO_SYS_DATE :'|| L_MOVE_PAST_DUE_TO_SYSDATE);
1882: END IF;
1883: if L_MOVE_PAST_DUE_TO_SYSDATE = 'Y' THEN -- Bug 5584634/5618929
1884: IF x_atp_rec.ship_date(j) < l_sysdate_osc THEN
1885:

Line 1889: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'New ship_date := ' || l_sysdate_osc);

1885:
1886: x_atp_rec.ship_date(j) := l_sysdate_osc;
1887: l_past_due_ship_date := 1; --bug4291375 setting variable to point pass due request ship date.
1888: IF PG_DEBUG in ('Y', 'C') THEN
1889: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'New ship_date := ' || l_sysdate_osc);
1890: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Request date is less than sysdate');
1891: END IF;
1892: END IF;
1893:

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

1886: x_atp_rec.ship_date(j) := l_sysdate_osc;
1887: l_past_due_ship_date := 1; --bug4291375 setting variable to point pass due request ship date.
1888: IF PG_DEBUG in ('Y', 'C') THEN
1889: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'New ship_date := ' || l_sysdate_osc);
1890: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Request date is less than sysdate');
1891: END IF;
1892: END IF;
1893:
1894: IF x_atp_rec.requested_ship_date(j) IS NOT NULL THEN

Line 1926: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));

1922: -- and l_atp_rec.ship_date is D9 (previous working day) 0:00.
1923: -- we want to return ship date as D9 0:00 instead of D10 5pm.
1924:
1925: IF PG_DEBUG in ('Y', 'C') THEN
1926: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1927: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1928: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1929: 'dd/mm/yyyy hh:mi:ss'));
1930: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375

Line 1927: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));

1923: -- we want to return ship date as D9 0:00 instead of D10 5pm.
1924:
1925: IF PG_DEBUG in ('Y', 'C') THEN
1926: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1927: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1928: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1929: 'dd/mm/yyyy hh:mi:ss'));
1930: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375
1931: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375

Line 1928: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),

1924:
1925: IF PG_DEBUG in ('Y', 'C') THEN
1926: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1927: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1928: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1929: 'dd/mm/yyyy hh:mi:ss'));
1930: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375
1931: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375
1932: END IF;

Line 1930: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375

1926: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date(j) : ' || to_char(x_atp_rec.requested_ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1927: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1928: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1929: 'dd/mm/yyyy hh:mi:ss'));
1930: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375
1931: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375
1932: END IF;
1933: -- ship_rec_cal project changes end
1934: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on

Line 1931: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375

1927: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
1928: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1929: 'dd/mm/yyyy hh:mi:ss'));
1930: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375
1931: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375
1932: END IF;
1933: -- ship_rec_cal project changes end
1934: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on
1935: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');

Line 1938: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);

1934: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on
1935: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');
1936:
1937: IF PG_DEBUG in ('Y', 'C') THEN
1938: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);
1939: msc_sch_wb.atp_debug('atp lead time := ' || x_atp_rec.atp_lead_time(j));
1940: END IF;
1941:
1942: -- 2833417 dsting add atp_lead_time if any

Line 1939: msc_sch_wb.atp_debug('atp lead time := ' || x_atp_rec.atp_lead_time(j));

1935: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');
1936:
1937: IF PG_DEBUG in ('Y', 'C') THEN
1938: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);
1939: msc_sch_wb.atp_debug('atp lead time := ' || x_atp_rec.atp_lead_time(j));
1940: END IF;
1941:
1942: -- 2833417 dsting add atp_lead_time if any
1943: if nvl(x_atp_rec.atp_lead_time(j), 0) > 0 and MSC_ATP_PVT.G_INV_CTP = 5

Line 1952: msc_sch_wb.atp_debug('prev date for ship date not found in Calendar');

1948: l_sysdate,
1949: x_atp_rec.atp_lead_time(j));
1950: --bug3583705 not required.
1951: /*IF l_ato_ship_date IS NULL THEN
1952: msc_sch_wb.atp_debug('prev date for ship date not found in Calendar');
1953: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1954: RAISE NO_DATA_FOUND;
1955: END IF;*/
1956: else

Line 1960: msc_sch_wb.atp_debug('l_ato_ship_date: ' || l_ato_ship_date);

1956: else
1957: -- 2894867
1958: l_ato_ship_date := x_atp_rec.ship_date(j);
1959: end if;
1960: msc_sch_wb.atp_debug('l_ato_ship_date: ' || l_ato_ship_date);
1961:
1962: -- dsting
1963: -- 2833417
1964: -- As part of ship_rec_cal remove the redundant if clause and compute the arrival date here.

Line 1990: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);

1986: x_atp_rec.requested_date_quantity(j) := x_atp_rec.quantity_ordered(j);
1987: END IF;
1988:
1989: IF PG_DEBUG in ('Y', 'C') THEN
1990: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
1991: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
1992: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
1993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
1994: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));

Line 1991: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);

1987: END IF;
1988:
1989: IF PG_DEBUG in ('Y', 'C') THEN
1990: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
1991: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
1992: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
1993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
1994: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
1995: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));

Line 1992: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));

1988:
1989: IF PG_DEBUG in ('Y', 'C') THEN
1990: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
1991: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
1992: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
1993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
1994: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
1995: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
1996: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));

Line 1993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));

1989: IF PG_DEBUG in ('Y', 'C') THEN
1990: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
1991: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
1992: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
1993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
1994: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
1995: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
1996: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));
1997: END IF;

Line 1994: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));

1990: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
1991: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
1992: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
1993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
1994: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
1995: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
1996: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));
1997: END IF;
1998: --bug3439591 end

Line 1995: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));

1991: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
1992: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
1993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
1994: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
1995: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
1996: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));
1997: END IF;
1998: --bug3439591 end
1999: END IF; -- override bug 2649670

Line 1996: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));

1992: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
1993: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
1994: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
1995: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
1996: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));
1997: END IF;
1998: --bug3439591 end
1999: END IF; -- override bug 2649670
2000:

Line 2010: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival Date is always calculated ');

2006: -- Bug 2406242, 2463608
2007: /* Bug 3345563 - At this point arrival date has already been calculated.
2008: Done with Enforce Pur LT changes
2009: IF PG_DEBUG in ('Y', 'C') THEN
2010: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival Date is always calculated ');
2011: END IF;
2012: IF x_atp_rec.requested_arrival_date(j) is not null THEN
2013: x_atp_rec.arrival_date(j) := GREATEST(x_atp_rec.arrival_date(j),
2014: x_atp_rec.requested_arrival_date(j));

Line 2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Within Ship Set '||x_atp_rec.ship_set_name(j));

2018:
2019: IF (x_atp_rec.ship_set_name(j) IS NOT NULL OR
2020: x_atp_rec.arrival_set_name(j) IS NOT NULL) THEN
2021: IF PG_DEBUG in ('Y', 'C') THEN
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Within Ship Set '||x_atp_rec.ship_set_name(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'OR Arrival Set '||x_atp_rec.arrival_set_name(j));
2024: END IF;
2025:
2026: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;

Line 2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'OR Arrival Set '||x_atp_rec.arrival_set_name(j));

2019: IF (x_atp_rec.ship_set_name(j) IS NOT NULL OR
2020: x_atp_rec.arrival_set_name(j) IS NOT NULL) THEN
2021: IF PG_DEBUG in ('Y', 'C') THEN
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Within Ship Set '||x_atp_rec.ship_set_name(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'OR Arrival Set '||x_atp_rec.arrival_set_name(j));
2024: END IF;
2025:
2026: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;
2027: --bug 3365376: Pass earliest acceptable date as this date is used to calculate LAD for the line

Line 2033: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');

2029: MSC_ATP_PROC.Process_Set_Line(x_atp_rec, j, l_line_status);
2030: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382
2031: ELSE -- If in shipset or arrival set
2032: IF PG_DEBUG in ('Y', 'C') THEN
2033: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');
2034: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));
2035: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));
2036: END IF;
2037:

Line 2034: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));

2030: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382
2031: ELSE -- If in shipset or arrival set
2032: IF PG_DEBUG in ('Y', 'C') THEN
2033: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');
2034: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));
2035: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));
2036: END IF;
2037:
2038: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j); --4967040:

Line 2035: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));

2031: ELSE -- If in shipset or arrival set
2032: IF PG_DEBUG in ('Y', 'C') THEN
2033: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');
2034: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));
2035: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));
2036: END IF;
2037:
2038: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j); --4967040:
2039: END IF;

Line 2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);

2047: NVL(l_atp_rec.Arrival_Set_Name(j+1),-100))
2048: THEN
2049: l_end := j;
2050: IF PG_DEBUG in ('Y', 'C') THEN
2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2053: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2054: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2055: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));

Line 2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));

2048: THEN
2049: l_end := j;
2050: IF PG_DEBUG in ('Y', 'C') THEN
2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2053: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2054: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2055: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));
2056: END IF;

Line 2053: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));

2049: l_end := j;
2050: IF PG_DEBUG in ('Y', 'C') THEN
2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2053: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2054: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2055: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));
2056: END IF;
2057: END IF;

Line 2054: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);

2050: IF PG_DEBUG in ('Y', 'C') THEN
2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2053: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2054: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2055: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));
2056: END IF;
2057: END IF;
2058: -- Bug 2413888, 2281628

Line 2055: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));

2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2053: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2054: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2055: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));
2056: END IF;
2057: END IF;
2058: -- Bug 2413888, 2281628
2059:

Line 2078: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);

2074: IF l_start <= l_atp_rec.action.count THEN
2075: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
2076: END IF;
2077: IF PG_DEBUG in ('Y', 'C') THEN
2078: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2079: END IF;
2080: END IF;
2081: -- End of changes for Bug 2413888, 2281628
2082:

Line 2084: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) after : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));

2080: END IF;
2081: -- End of changes for Bug 2413888, 2281628
2082:
2083: IF PG_DEBUG in ('Y', 'C') THEN
2084: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) after : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
2085: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) after : ' || to_char(x_atp_rec.arrival_date(j), 'dd/mm/yyyy hh:mi:ss'));
2086: END IF;
2087:
2088: END IF; -- IF NVL(g_atp_check, '@') = 'N' THEN

Line 2085: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) after : ' || to_char(x_atp_rec.arrival_date(j), 'dd/mm/yyyy hh:mi:ss'));

2081: -- End of changes for Bug 2413888, 2281628
2082:
2083: IF PG_DEBUG in ('Y', 'C') THEN
2084: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ship_date(j) after : ' || to_char(x_atp_rec.ship_date(j), 'dd/mm/yyyy hh:mi:ss'));
2085: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) after : ' || to_char(x_atp_rec.arrival_date(j), 'dd/mm/yyyy hh:mi:ss'));
2086: END IF;
2087:
2088: END IF; -- IF NVL(g_atp_check, '@') = 'N' THEN
2089: j := l_atp_rec.inventory_item_id.NEXT(j);

Line 2093: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');

2089: j := l_atp_rec.inventory_item_id.NEXT(j);
2090: EXCEPTION --bug3583705 start
2091: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
2092: IF PG_DEBUG in ('Y', 'C') THEN
2093: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2094: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2095: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2096: END IF;
2097: l_end := l_start;

Line 2094: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);

2090: EXCEPTION --bug3583705 start
2091: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
2092: IF PG_DEBUG in ('Y', 'C') THEN
2093: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2094: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2095: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2096: END IF;
2097: l_end := l_start;
2098:

Line 2095: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);

2091: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
2092: IF PG_DEBUG in ('Y', 'C') THEN
2093: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2094: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2095: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2096: END IF;
2097: l_end := l_start;
2098:
2099: WHILE l_end is not null and

Line 2113: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_end: '||l_end);

2109: END IF;
2110:
2111: l_end := l_atp_rec.inventory_item_id.next(l_end);
2112: IF PG_DEBUG in ('Y', 'C') THEN
2113: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_end: '||l_end);
2114: END IF;
2115: END LOOP;
2116:
2117: j := l_end;

Line 2125: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);

2121: IF l_start <= l_atp_rec.action.count THEN
2122: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
2123: END IF;
2124: IF PG_DEBUG in ('Y', 'C') THEN
2125: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2126: END IF;
2127:
2128: WHEN OTHERS THEN
2129: IF PG_DEBUG in ('Y', 'C') THEN

Line 2130: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');

2126: END IF;
2127:
2128: WHEN OTHERS THEN
2129: IF PG_DEBUG in ('Y', 'C') THEN
2130: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2131: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2132: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2133: END IF;
2134: /* Check if this is actually coming from a calendar routine*/

Line 2131: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);

2127:
2128: WHEN OTHERS THEN
2129: IF PG_DEBUG in ('Y', 'C') THEN
2130: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2131: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2132: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2133: END IF;
2134: /* Check if this is actually coming from a calendar routine*/
2135: l_encoded_text := fnd_message.GET_ENCODED;

Line 2132: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);

2128: WHEN OTHERS THEN
2129: IF PG_DEBUG in ('Y', 'C') THEN
2130: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2131: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2132: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2133: END IF;
2134: /* Check if this is actually coming from a calendar routine*/
2135: l_encoded_text := fnd_message.GET_ENCODED;
2136: IF l_encoded_text IS NULL THEN

Line 2157: msc_sch_wb.atp_debug('Call_ATP_No_Commit: NO_MATCHING_CAL_DATE');

2153: IF (x_atp_rec.error_code(l_end) IS NULL) or (x_atp_rec.error_code(l_end) IN (0,61,150)) THEN
2154: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
2155: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
2156: IF PG_DEBUG in ('Y', 'C') THEN
2157: msc_sch_wb.atp_debug('Call_ATP_No_Commit: NO_MATCHING_CAL_DATE');
2158: END IF;
2159: ELSE
2160: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error
2161: IF PG_DEBUG in ('Y', 'C') THEN

Line 2162: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ATP_PROCESSING_ERROR');

2158: END IF;
2159: ELSE
2160: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error
2161: IF PG_DEBUG in ('Y', 'C') THEN
2162: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ATP_PROCESSING_ERROR');
2163: END IF;
2164: END IF;
2165: END IF;
2166: l_end := l_atp_rec.inventory_item_id.next(l_end);

Line 2177: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);

2173: IF l_start <= l_atp_rec.action.count THEN
2174: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
2175: END IF;
2176: IF PG_DEBUG in ('Y', 'C') THEN
2177: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2178: END IF;
2179:
2180: END; --bug3583705 end
2181:

Line 2194: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Rows deleted from msc_regions_temp : '||sql%rowcount);

2190: DELETE msc_regions_temp
2191: WHERE session_id = p_session_id;
2192:
2193: IF PG_DEBUG in ('Y', 'C') THEN
2194: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Rows deleted from msc_regions_temp : '||sql%rowcount);
2195: END IF;
2196:
2197: --bug3940999 Delete temp records before exiting
2198: DELETE msc_atp_src_profile_temp

Line 2202: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);

2198: DELETE msc_atp_src_profile_temp
2199: WHERE session_id = p_session_id;
2200:
2201: IF PG_DEBUG in ('Y', 'C') THEN
2202: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);
2203: END IF;
2204:
2205: -- No ATP needed as No ATPable item or CTO model in the ATP request from source.
2206:

Line 2209: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Put into temp table for MSCBALWB');

2205: -- No ATP needed as No ATPable item or CTO model in the ATP request from source.
2206:
2207: -- Bug 2280196 Base Bug 2262291 Added by : krajan
2208: IF PG_DEBUG in ('Y', 'C') THEN
2209: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Put into temp table for MSCBALWB');
2210: END IF;
2211: MSC_ATP_UTILS.put_into_temp_table(
2212: NULL,
2213: p_session_id,

Line 2246: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ATO Delete Flag Case - setting G_CTO_FLAG to 3');

2242: -- krajan : 2748041
2243: -- If it is an ATO delete case,then call the POST ATP CTO procedure
2244: if (NVL(G_CTO_FLAG, -1) = 2 ) then
2245: IF PG_DEBUG in ('Y', 'C') THEN
2246: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ATO Delete Flag Case - setting G_CTO_FLAG to 3');
2247: END IF;
2248: G_CTO_FLAG := 3;
2249: end if;
2250:

Line 2307: msc_sch_wb.atp_debug('Before calling Custom_Post_ATP_API');

2303: x_atp_period,
2304: x_atp_details);
2305: ---custom_api chnages: Call customer API for calculating arrival datea
2306: IF PG_DEBUG in ('Y', 'C') THEN
2307: msc_sch_wb.atp_debug('Before calling Custom_Post_ATP_API');
2308: END IF;
2309: MSC_ATP_CUSTOM.Custom_Post_ATP_API(l_atp_rec_temp,
2310: l_custom_atp_rec,
2311: l_modify_flag,

Line 2314: msc_sch_wb.atp_debug('After calling Custom_Post_ATP_API');

2310: l_custom_atp_rec,
2311: l_modify_flag,
2312: l_custom_ret_sts);
2313: IF PG_DEBUG in ('Y', 'C') THEN
2314: msc_sch_wb.atp_debug('After calling Custom_Post_ATP_API');
2315: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2316: END IF;
2317:
2318: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0

Line 2315: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);

2311: l_modify_flag,
2312: l_custom_ret_sts);
2313: IF PG_DEBUG in ('Y', 'C') THEN
2314: msc_sch_wb.atp_debug('After calling Custom_Post_ATP_API');
2315: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2316: END IF;
2317:
2318: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0
2319: and l_custom_ret_sts = FND_API.G_RET_STS_SUCCESS THEN

Line 2321: msc_sch_wb.atp_debug('Assign Custom rec to ATP output rec');

2317:
2318: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0
2319: and l_custom_ret_sts = FND_API.G_RET_STS_SUCCESS THEN
2320:
2321: msc_sch_wb.atp_debug('Assign Custom rec to ATP output rec');
2322: l_atp_rec_temp := l_custom_atp_rec;
2323:
2324: END IF;
2325:

Line 2382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'instance_id = '||l_instance_id);

2378: x_msg_data,
2379: x_msg_count);
2380:
2381: IF PG_DEBUG in ('Y', 'C') THEN
2382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'instance_id = '||l_instance_id);
2383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before remote procedure call');
2384: END IF;
2385: e_cto_reach */
2386:

Line 2383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before remote procedure call');

2379: x_msg_count);
2380:
2381: IF PG_DEBUG in ('Y', 'C') THEN
2382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'instance_id = '||l_instance_id);
2383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before remote procedure call');
2384: END IF;
2385: e_cto_reach */
2386:
2387: --bug3520746

Line 2395: msc_sch_wb.atp_debug('RAC Instance id is:' || l_node_id);

2391: from gv$instance;
2392: IF l_rac_count > 1 then
2393: l_node_id := userenv('INSTANCE');
2394: IF PG_DEBUG in ('Y', 'C') THEN
2395: msc_sch_wb.atp_debug('RAC Instance id is:' || l_node_id);
2396: END IF;
2397: ELSE
2398: l_node_id := null;
2399: END IF;

Line 2405: msc_sch_wb.atp_debug('node id is:' || l_node_id);

2401: WHEN OTHERS THEN
2402: l_node_id := null;
2403: END;
2404: IF PG_DEBUG in ('Y', 'C') THEN
2405: msc_sch_wb.atp_debug('node id is:' || l_node_id);
2406: END IF;
2407:
2408: --bug3520746 pass the node to the remote call in case of RAC
2409: /* added inv_ctp, default assignment set in procedure call for bug 2368426 starts */

Line 2428: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);

2424: :node_id
2425: ); END;';
2426:
2427: IF PG_DEBUG in ('Y', 'C') THEN
2428: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2429: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2430: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);

Line 2429: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);

2425: ); END;';
2426:
2427: IF PG_DEBUG in ('Y', 'C') THEN
2428: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2429: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2430: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);

Line 2430: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);

2426:
2427: IF PG_DEBUG in ('Y', 'C') THEN
2428: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2429: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2430: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));

Line 2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);

2427: IF PG_DEBUG in ('Y', 'C') THEN
2428: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2429: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2430: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2435: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);

Line 2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);

2428: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2429: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2430: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2435: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);
2436: END IF;

Line 2433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);

2429: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2430: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2435: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);
2436: END IF;
2437:

Line 2434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));

2430: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2435: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);
2436: END IF;
2437:
2438: EXECUTE IMMEDIATE plsql_block USING

Line 2435: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);

2431: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2432: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2433: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2435: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);
2436: END IF;
2437:
2438: EXECUTE IMMEDIATE plsql_block USING
2439: p_session_id,

Line 2476: msc_sch_wb.atp_debug('Before calling Custom_Post_ATP_API');

2472: l_details_flag);
2473:
2474: ---custom_api changes: Call customer API for calculating arrival datea
2475: IF PG_DEBUG in ('Y', 'C') THEN
2476: msc_sch_wb.atp_debug('Before calling Custom_Post_ATP_API');
2477: END IF;
2478: MSC_ATP_CUSTOM.Custom_Post_ATP_API(l_atp_rec_temp,
2479: l_custom_atp_rec,
2480: l_modify_flag,

Line 2484: msc_sch_wb.atp_debug('after calling Custom_Post_ATP_API');

2480: l_modify_flag,
2481: l_custom_ret_sts);
2482:
2483: IF PG_DEBUG in ('Y', 'C') THEN
2484: msc_sch_wb.atp_debug('after calling Custom_Post_ATP_API');
2485: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2486: msc_sch_wb.atp_debug('l_modify_flag := ' || l_modify_flag);
2487: END IF;
2488:

Line 2485: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);

2481: l_custom_ret_sts);
2482:
2483: IF PG_DEBUG in ('Y', 'C') THEN
2484: msc_sch_wb.atp_debug('after calling Custom_Post_ATP_API');
2485: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2486: msc_sch_wb.atp_debug('l_modify_flag := ' || l_modify_flag);
2487: END IF;
2488:
2489: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0

Line 2486: msc_sch_wb.atp_debug('l_modify_flag := ' || l_modify_flag);

2482:
2483: IF PG_DEBUG in ('Y', 'C') THEN
2484: msc_sch_wb.atp_debug('after calling Custom_Post_ATP_API');
2485: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2486: msc_sch_wb.atp_debug('l_modify_flag := ' || l_modify_flag);
2487: END IF;
2488:
2489: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0
2490: and l_custom_ret_sts = FND_API.G_RET_STS_SUCCESS THEN

Line 2503: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'INV_CTP profile not in sync with destination');

2499:
2500: -- Debug message added for bug 2368426
2501: IF l_atp_rec_temp.error_code(1) = 230 THEN
2502: IF PG_DEBUG in ('Y', 'C') THEN
2503: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'INV_CTP profile not in sync with destination');
2504: END IF;
2505: END IF;
2506:
2507: END IF;

Line 2513: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Extending ATO_Delete Flag');

2509: x_atp_rec := l_atp_rec_temp;
2510:
2511: -- 2688113 : krajan : Copy ato_delete_flag
2512: IF PG_DEBUG in ('Y', 'C') THEN
2513: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Extending ATO_Delete Flag');
2514: END IF;
2515: x_atp_rec.ato_delete_flag := p_atp_rec.ato_delete_flag;
2516:
2517: IF G_INV_CTP = 4 THEN

Line 2522: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'WF Profile:' || l_wf_profile);

2518: --call substitution workflow
2519: IF x_atp_rec.action(1) <> 100 and x_atp_rec.calling_module(i) = 660 THEN
2520: l_wf_profile := NVL(fnd_profile.value('MSC_ALLOCATED_ATP_WORKFLOW'), 'N');
2521: IF PG_DEBUG in ('Y', 'C') THEN
2522: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'WF Profile:' || l_wf_profile);
2523: END IF;
2524: IF l_wf_profile = 'Y' THEN
2525: Subst_workflow(x_atp_rec);
2526: END IF;

Line 2531: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_return_status : '||x_return_status);

2527: END IF;
2528: END IF;
2529:
2530: IF PG_DEBUG in ('Y', 'C') THEN
2531: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_return_status : '||x_return_status);
2532: END IF;
2533:
2534: -- Added by ngoel 10/18/2000. This procedure is called if there
2535: -- was a CTO model included in the request and either BOM was supplied

Line 2544: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before x_atp_rec.Action: '||x_atp_rec.Action(i));

2540: -- OM and Configurator.
2541:
2542: i := x_atp_rec.Action.FIRST;
2543: IF PG_DEBUG in ('Y', 'C') THEN
2544: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before x_atp_rec.Action: '||x_atp_rec.Action(i));
2545: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before l_atp_rec_temp.Error_Code: '||i||':'||
2546: l_atp_rec_temp.Error_Code(i));
2547: END IF;
2548:

Line 2545: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before l_atp_rec_temp.Error_Code: '||i||':'||

2541:
2542: i := x_atp_rec.Action.FIRST;
2543: IF PG_DEBUG in ('Y', 'C') THEN
2544: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before x_atp_rec.Action: '||x_atp_rec.Action(i));
2545: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before l_atp_rec_temp.Error_Code: '||i||':'||
2546: l_atp_rec_temp.Error_Code(i));
2547: END IF;
2548:
2549:

Line 2556: msc_sch_wb.atp_debug('Call_ATP_No_Commit: --Now processing refresh numbers--');

2552: --Collection Enhancement changes start
2553: IF ((G_INV_CTP = 4) AND ( NVL (p_atp_rec.action(p_atp_rec.calling_module.FIRST), -99) in (110,120) ))THEN
2554: -- need to do this only for PDS cases
2555: IF PG_DEBUG in ('Y', 'C') THEN
2556: msc_sch_wb.atp_debug('Call_ATP_No_Commit: --Now processing refresh numbers--');
2557: msc_sch_wb.atp_debug('Call_ATP_No_Commit: First check if this is required because of summary');
2558: END IF;
2559: -- check if summary is enabled
2560: -- Bug 3762695: Use source side profile value for 'MSC: Enable ATP Summary mode'

Line 2557: msc_sch_wb.atp_debug('Call_ATP_No_Commit: First check if this is required because of summary');

2553: IF ((G_INV_CTP = 4) AND ( NVL (p_atp_rec.action(p_atp_rec.calling_module.FIRST), -99) in (110,120) ))THEN
2554: -- need to do this only for PDS cases
2555: IF PG_DEBUG in ('Y', 'C') THEN
2556: msc_sch_wb.atp_debug('Call_ATP_No_Commit: --Now processing refresh numbers--');
2557: msc_sch_wb.atp_debug('Call_ATP_No_Commit: First check if this is required because of summary');
2558: END IF;
2559: -- check if summary is enabled
2560: -- Bug 3762695: Use source side profile value for 'MSC: Enable ATP Summary mode'
2561: l_summary_flag := 'N';

Line 2575: msc_sch_wb.atp_debug('Inside exception');

2571: EXCEPTION
2572: When Others then
2573: l_summary_flag := 'N';
2574: IF PG_DEBUG in ('Y', 'C') THEN
2575: msc_sch_wb.atp_debug('Inside exception');
2576: END IF;
2577: END;
2578: END IF;
2579:

Line 2586: msc_sch_wb.atp_debug('l_end_refresh_number ' || l_end_refresh_number);

2582: INTO l_end_refresh_number
2583: FROM mrp_ap_apps_instances;
2584:
2585: IF PG_DEBUG in ('Y', 'C') THEN
2586: msc_sch_wb.atp_debug('l_end_refresh_number ' || l_end_refresh_number);
2587: msc_sch_wb.atp_debug('l_summary_flag ' || l_summary_flag );
2588: END IF;
2589:
2590: IF (l_a2m_dblink IS NOT NULL) THEN

Line 2587: msc_sch_wb.atp_debug('l_summary_flag ' || l_summary_flag );

2583: FROM mrp_ap_apps_instances;
2584:
2585: IF PG_DEBUG in ('Y', 'C') THEN
2586: msc_sch_wb.atp_debug('l_end_refresh_number ' || l_end_refresh_number);
2587: msc_sch_wb.atp_debug('l_summary_flag ' || l_summary_flag );
2588: END IF;
2589:
2590: IF (l_a2m_dblink IS NOT NULL) THEN
2591: plsql_block := 'BEGIN MSC_ATP_PUB.UPDATE_TABLES'

Line 2599: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block ' || plsql_block);

2595: :p_refresh_number,
2596: :p_session_id);
2597: END;';
2598: IF PG_DEBUG in ('Y', 'C') THEN
2599: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block ' || plsql_block);
2600: END IF;
2601: EXECUTE IMMEDIATE plsql_block USING
2602: l_summary_flag,
2603: l_end_refresh_number,

Line 2633: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);

2629: --bug3520746 Delete temp records before exiting
2630: delete from msc_regions_temp where session_id = p_session_id;
2631:
2632: IF PG_DEBUG in ('Y', 'C') THEN
2633: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);
2634: END IF;
2635:
2636: --bug3940999 Delete temp records before exiting
2637: delete from msc_atp_src_profile_temp where session_id = p_session_id;

Line 2640: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);

2636: --bug3940999 Delete temp records before exiting
2637: delete from msc_atp_src_profile_temp where session_id = p_session_id;
2638:
2639: IF PG_DEBUG in ('Y', 'C') THEN
2640: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);
2641: msc_sch_wb.atp_debug('End Call_ATP_No_Commit');
2642: END IF;
2643:
2644: IF G_CALL_ATP = 2 THEN --4421391

Line 2641: msc_sch_wb.atp_debug('End Call_ATP_No_Commit');

2637: delete from msc_atp_src_profile_temp where session_id = p_session_id;
2638:
2639: IF PG_DEBUG in ('Y', 'C') THEN
2640: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);
2641: msc_sch_wb.atp_debug('End Call_ATP_No_Commit');
2642: END IF;
2643:
2644: IF G_CALL_ATP = 2 THEN --4421391
2645: IF order_sch_wb.mr_debug in ('T','C') THEN

Line 2656: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);

2652:
2653: EXCEPTION
2654: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
2655: IF PG_DEBUG in ('Y', 'C') THEN
2656: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2657: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Invalid Objects found');
2658: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2659: END IF;
2660: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);

Line 2657: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Invalid Objects found');

2653: EXCEPTION
2654: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
2655: IF PG_DEBUG in ('Y', 'C') THEN
2656: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2657: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Invalid Objects found');
2658: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2659: END IF;
2660: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2661: IF PG_DEBUG in ('Y', 'C') THEN

Line 2658: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);

2654: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
2655: IF PG_DEBUG in ('Y', 'C') THEN
2656: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2657: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Invalid Objects found');
2658: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2659: END IF;
2660: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2661: IF PG_DEBUG in ('Y', 'C') THEN
2662: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);

Line 2662: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);

2658: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2659: END IF;
2660: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2661: IF PG_DEBUG in ('Y', 'C') THEN
2662: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2663: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2664: END IF;
2665:
2666: --ATP Debug Workflow, atp debug changes.

Line 2663: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);

2659: END IF;
2660: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2661: IF PG_DEBUG in ('Y', 'C') THEN
2662: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2663: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2664: END IF;
2665:
2666: --ATP Debug Workflow, atp debug changes.
2667:

Line 2681: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);

2677: ROLLBACK TO SAVEPOINT start_of_call_atp_no_commit;
2678: EXCEPTION
2679: WHEN OTHERS THEN
2680: IF PG_DEBUG in ('Y', 'C') THEN
2681: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2682: END IF;
2683: IF (sqlcode = -1086) THEN
2684: null;
2685: END IF;

Line 2703: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);

2699:
2700: --bug3520746 Delete temp records before exiting
2701: delete from msc_regions_temp where session_id = p_session_id;
2702: IF PG_DEBUG in ('Y', 'C') THEN
2703: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);
2704: END IF;
2705:
2706: --bug3940999 Delete temp records before exiting
2707: delete from msc_atp_src_profile_temp where session_id = p_session_id;

Line 2709: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);

2705:
2706: --bug3940999 Delete temp records before exiting
2707: delete from msc_atp_src_profile_temp where session_id = p_session_id;
2708: IF PG_DEBUG in ('Y', 'C') THEN
2709: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);
2710: END IF;
2711:
2712: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2713: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Call_ATP_No_Commit');

Line 2747: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);

2743:
2744: WHEN others THEN
2745: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2746: IF PG_DEBUG in ('Y', 'C') THEN
2747: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2748: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2749: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2750: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2751: END IF;

Line 2748: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);

2744: WHEN others THEN
2745: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2746: IF PG_DEBUG in ('Y', 'C') THEN
2747: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2748: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2749: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2750: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2751: END IF;
2752:

Line 2749: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);

2745: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2746: IF PG_DEBUG in ('Y', 'C') THEN
2747: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2748: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2749: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2750: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2751: END IF;
2752:
2753: --bug3520746 Delete temp records before exiting

Line 2750: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);

2746: IF PG_DEBUG in ('Y', 'C') THEN
2747: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2748: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2749: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2750: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2751: END IF;
2752:
2753: --bug3520746 Delete temp records before exiting
2754: delete from msc_regions_temp where session_id = p_session_id;

Line 2756: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);

2752:
2753: --bug3520746 Delete temp records before exiting
2754: delete from msc_regions_temp where session_id = p_session_id;
2755: IF PG_DEBUG in ('Y', 'C') THEN
2756: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);
2757: END IF;
2758:
2759: --bug3940999 Delete temp records before exiting
2760: delete from msc_atp_src_profile_temp where session_id = p_session_id;

Line 2762: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);

2758:
2759: --bug3940999 Delete temp records before exiting
2760: delete from msc_atp_src_profile_temp where session_id = p_session_id;
2761: IF PG_DEBUG in ('Y', 'C') THEN
2762: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);
2763: END IF;
2764:
2765: --ATP Debug Workflow, atp debug changes.
2766:

Line 2780: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);

2776: ROLLBACK TO SAVEPOINT start_of_call_atp_no_commit;
2777: EXCEPTION
2778: WHEN OTHERS THEN
2779: IF PG_DEBUG in ('Y', 'C') THEN
2780: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2781: END IF;
2782: IF (sqlcode = -1086) THEN
2783: null;
2784: END IF;

Line 2851: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');

2847: l_identifier3 MRP_ATP_PUB.number_arr := MRP_ATP_PUB.number_arr();
2848:
2849: BEGIN
2850: IF PG_DEBUG in ('Y', 'C') THEN
2851: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2852: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2853: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2854: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2855: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);

Line 2852: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);

2848:
2849: BEGIN
2850: IF PG_DEBUG in ('Y', 'C') THEN
2851: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2852: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2853: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2854: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2855: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);
2856:

Line 2853: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);

2849: BEGIN
2850: IF PG_DEBUG in ('Y', 'C') THEN
2851: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2852: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2853: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2854: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2855: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);
2856:
2857: END IF;

Line 2854: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);

2850: IF PG_DEBUG in ('Y', 'C') THEN
2851: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2852: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2853: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2854: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2855: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);
2856:
2857: END IF;
2858: IF p_summary_flag = 'Y' THEN

Line 2855: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);

2851: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2852: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2853: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2854: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2855: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);
2856:
2857: END IF;
2858: IF p_summary_flag = 'Y' THEN
2859: -- Summary is enabled in destination and at least one line did not result in PDS-ODS switch

Line 2888: msc_sch_wb.atp_debug('No of rows selected ' || SQL%ROWCOUNT );

2884: and madt.identifier3 is not NULL
2885: and madt.identifier1 is not NULL;
2886:
2887: IF PG_DEBUG in ('Y', 'C') THEN
2888: msc_sch_wb.atp_debug('No of rows selected ' || SQL%ROWCOUNT );
2889: END IF;
2890:
2891: IF l_end_refresh_number > p_refresh_number THEN
2892: -- need to bump up all records

Line 2894: msc_sch_wb.atp_debug('Update 5 tables');

2890:
2891: IF l_end_refresh_number > p_refresh_number THEN
2892: -- need to bump up all records
2893: IF PG_DEBUG in ('Y', 'C') THEN
2894: msc_sch_wb.atp_debug('Update 5 tables');
2895: END IF;
2896:
2897: -- Bug 3517529: anbansal
2898: -- Used identifier1, identifier2 and identifier3 from pegging records to have additional check on

Line 2918: msc_sch_wb.atp_debug('No of rows selected by BULK SELECT ' || SQL%ROWCOUNT );

2914: and identifier3 is not NULL
2915: and identifier1 is not NULL;
2916:
2917: IF PG_DEBUG in ('Y', 'C') THEN
2918: msc_sch_wb.atp_debug('No of rows selected by BULK SELECT ' || SQL%ROWCOUNT );
2919: END IF;
2920:
2921: FORALL i in 1..l_identifier1.COUNT
2922: update msc_demands

Line 2930: msc_sch_wb.atp_debug('No of rows updated:msc_demands ' || SQL%ROWCOUNT );

2926: and demand_id = l_identifier3(i)
2927: and sr_instance_id = l_identifier1(i);
2928:
2929: IF PG_DEBUG in ('Y', 'C') THEN
2930: msc_sch_wb.atp_debug('No of rows updated:msc_demands ' || SQL%ROWCOUNT );
2931: END IF;
2932:
2933: FORALL i in 1..l_identifier1.COUNT
2934: update msc_supplies

Line 2942: msc_sch_wb.atp_debug('No of rows updated: msc_supplies ' || SQL%ROWCOUNT );

2938: and transaction_id = l_identifier3(i)
2939: and sr_instance_id = l_identifier1(i);
2940:
2941: IF PG_DEBUG in ('Y', 'C') THEN
2942: msc_sch_wb.atp_debug('No of rows updated: msc_supplies ' || SQL%ROWCOUNT );
2943: END IF;
2944:
2945: FORALL i in 1..l_identifier1.COUNT
2946: update msc_resource_requirements

Line 2954: msc_sch_wb.atp_debug('No of rows updated: msc_resource_requirements ' || SQL%ROWCOUNT );

2950: and transaction_id = l_identifier3(i)
2951: and sr_instance_id = l_identifier1(i);
2952:
2953: IF PG_DEBUG in ('Y', 'C') THEN
2954: msc_sch_wb.atp_debug('No of rows updated: msc_resource_requirements ' || SQL%ROWCOUNT );
2955: END IF;
2956:
2957: FORALL i in 1..l_identifier1.COUNT
2958: update msc_alloc_demands

Line 2966: msc_sch_wb.atp_debug('No of rows updated: msc_alloc_demands ' || SQL%ROWCOUNT );

2962: and parent_demand_id = l_identifier3(i)
2963: and sr_instance_id = l_identifier1(i);
2964:
2965: IF PG_DEBUG in ('Y', 'C') THEN
2966: msc_sch_wb.atp_debug('No of rows updated: msc_alloc_demands ' || SQL%ROWCOUNT );
2967: END IF;
2968:
2969: FORALL i in 1..l_identifier1.COUNT
2970: update msc_alloc_supplies

Line 2978: msc_sch_wb.atp_debug('No of rows updated: msc_alloc_supplies ' || SQL%ROWCOUNT );

2974: and parent_transaction_id = l_identifier3(i)
2975: and sr_instance_id = l_identifier1(i);
2976:
2977: IF PG_DEBUG in ('Y', 'C') THEN
2978: msc_sch_wb.atp_debug('No of rows updated: msc_alloc_supplies ' || SQL%ROWCOUNT );
2979: END IF;
2980:
2981: ELSE
2982: l_end_refresh_number := null;

Line 2989: msc_sch_wb.atp_debug('Need to bump refresh number up for 24X7');

2985: END IF;
2986:
2987: IF (l_end_refresh_number is null) THEN
2988: IF PG_DEBUG in ('Y', 'C') THEN
2989: msc_sch_wb.atp_debug('Need to bump refresh number up for 24X7');
2990: END IF;
2991:
2992: -- Changed for the testing of Bug 3517529, But missed to remove it
2993: -- Changing back to the correct condition.

Line 2997: msc_sch_wb.atp_debug('Update 1 Table');

2993: -- Changing back to the correct condition.
2994: -- IF p_refresh_number < (p_refresh_number + 1) THEN
2995: IF p_refresh_number < p_end_refresh_number THEN
2996: IF PG_DEBUG in ('Y', 'C') THEN
2997: msc_sch_wb.atp_debug('Update 1 Table');
2998: END IF;
2999:
3000: update msc_demands
3001: set refresh_number = p_end_refresh_number

Line 3020: msc_sch_wb.atp_debug('No of rows updated: msc_demands ' || SQL%ROWCOUNT );

3016: and identifier1 is not NULL
3017: );
3018:
3019: IF PG_DEBUG in ('Y', 'C') THEN
3020: msc_sch_wb.atp_debug('No of rows updated: msc_demands ' || SQL%ROWCOUNT );
3021: END IF;
3022: END IF;
3023: END IF;
3024: END UPDATE_TABLES;