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 500: msc_sch_wb.set_session_id(p_session_id);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

567:
568: END LOOP;
569:
570: IF PG_DEBUG in ('Y', 'C') THEN
571: msc_sch_wb.atp_debug('Call_ATP: ' || 'After Assigning values for x_atp_rec');
572: END IF;
573:
574: ELSE
575:

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

606: p_session_id
607: );
608:
609: IF PG_DEBUG in ('Y', 'C') THEN
610: msc_sch_wb.atp_debug('Call_ATP: Inserted data into msc_oe_data_temp');
611: msc_sch_wb.atp_debug('Records selected in mrp_oe_data_temp : ' || SQL%ROWCOUNT);
612: END IF;
613:
614: select oe_flag,internal_org_id,seq_id

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

607: );
608:
609: IF PG_DEBUG in ('Y', 'C') THEN
610: msc_sch_wb.atp_debug('Call_ATP: Inserted data into msc_oe_data_temp');
611: msc_sch_wb.atp_debug('Records selected in mrp_oe_data_temp : ' || SQL%ROWCOUNT);
612: END IF;
613:
614: select oe_flag,internal_org_id,seq_id
615: bulk collect into

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

620: where session_id = p_session_id
621: order by seq_id;
622:
623: IF PG_DEBUG in ('Y', 'C') THEN
624: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');
625: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
626: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
627: FOR l in 1..l_atp_rec.action.LAST LOOP
628: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));

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

621: order by seq_id;
622:
623: IF PG_DEBUG in ('Y', 'C') THEN
624: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');
625: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
626: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
627: FOR l in 1..l_atp_rec.action.LAST LOOP
628: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));
629: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));

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

622:
623: IF PG_DEBUG in ('Y', 'C') THEN
624: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');
625: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
626: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
627: FOR l in 1..l_atp_rec.action.LAST LOOP
628: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));
629: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));
630: END LOOP;

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

624: msc_sch_wb.atp_debug('Call_ATP: selected data back into the l_atp_rec');
625: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
626: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
627: FOR l in 1..l_atp_rec.action.LAST LOOP
628: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));
629: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));
630: END LOOP;
631: END IF;
632: EXCEPTION

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

625: msc_sch_wb.atp_debug('Internal Org. Count :=' || l_atp_rec.internal_org_id.count);
626: msc_sch_wb.atp_debug('OE_FLAG count:= ' || l_atp_rec.oe_flag.count);
627: FOR l in 1..l_atp_rec.action.LAST LOOP
628: msc_sch_wb.atp_debug('call_atp: OE_FLAG : ' || l_atp_rec.oe_flag(l));
629: msc_sch_wb.atp_debug('call_atp: Internal Org.Id : ' || l_atp_rec.internal_org_id(l));
630: END LOOP;
631: END IF;
632: EXCEPTION
633: WHEN msc_oe_data_temp_in_use THEN --Bug 9651251

Line 634: msc_sch_wb.atp_debug('Call_ATP: In msc_oe_data_temp_in_use excp.');

630: END LOOP;
631: END IF;
632: EXCEPTION
633: WHEN msc_oe_data_temp_in_use THEN --Bug 9651251
634: msc_sch_wb.atp_debug('Call_ATP: In msc_oe_data_temp_in_use excp.');
635: FOR i in 1..l_atp_rec.action.COUNT LOOP
636: l_atp_rec.oe_flag(i) := NULL;
637: l_atp_rec.internal_org_id(i) := NULL;
638: l_atp_rec.attribute_11(i) := i;

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

639: END LOOP;
640:
641: WHEN OTHERS THEN
642: IF PG_DEBUG in ('Y', 'C') THEN
643: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
644: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
645: END IF;
646: END;
647: END IF;

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

640:
641: WHEN OTHERS THEN
642: IF PG_DEBUG in ('Y', 'C') THEN
643: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
644: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
645: END IF;
646: END;
647: END IF;
648: -- End 4279623

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

665: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status);
666:
667: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
668: IF PG_DEBUG in ('Y', 'C') THEN
669: msc_sch_wb.atp_debug('Call_ATP_Commit: ' || 'error in mrp_ap_apps_instances');
670: END IF;
671: END IF;
672:
673: i := p_atp_rec.Calling_Module.FIRST;

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

672:
673: i := p_atp_rec.Calling_Module.FIRST;
674: IF i IS NOT NULL THEN
675: IF PG_DEBUG in ('Y', 'C') THEN
676: msc_sch_wb.atp_debug('ATP Running in non autonomous mode');
677: END IF;
678: Call_ATP_No_Commit( p_session_id,
679: p_atp_rec,
680: x_atp_rec,

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

685: x_msg_data,
686: x_msg_count);
687: IF l_a2m_dblink IS NOT NULL THEN
688: IF PG_DEBUG in ('Y', 'C') THEN
689: msc_sch_wb.atp_debug(' before closing DB Link');
690: END IF;
691: cursor_name := dbms_sql.open_cursor;
692: DBMS_SQL.PARSE(cursor_name, 'alter session close database link ' ||l_a2m_dblink,
693: dbms_sql.native);

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

697: rows_processed := dbms_sql.execute(cursor_name);
698: EXCEPTION
699: WHEN DBLINK_NOT_OPEN THEN
700: IF PG_DEBUG in ('Y', 'C') THEN
701: msc_sch_wb.atp_debug('inside DBLINK_NOT_OPEN');
702: END IF;
703: END;
704: DBMS_SQL.close_cursor(cursor_name);
705: IF PG_DEBUG in ('Y', 'C') THEN

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

702: END IF;
703: END;
704: DBMS_SQL.close_cursor(cursor_name);
705: IF PG_DEBUG in ('Y', 'C') THEN
706: msc_sch_wb.atp_debug('after commit, after closing DB Link');
707: END IF;
708: END IF;
709: END IF;
710: ELSE

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

708: END IF;
709: END IF;
710: ELSE
711: IF PG_DEBUG in ('Y', 'C') THEN
712: msc_sch_wb.atp_debug('ATP Running in autonomous mode'); --5195929 End
713: END IF;
714:
715: Call_ATP_Commit( p_session_id,
716: l_atp_rec,

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

728:
729: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
730: -- something wrong so we want to rollback;
731: IF PG_DEBUG in ('Y', 'C') THEN
732: msc_sch_wb.atp_debug('expected error in Call_ATP_No_Commit');
733: END IF;
734: RAISE FND_API.G_EXC_ERROR ;
735: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
736: IF PG_DEBUG in ('Y', 'C') THEN

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

733: END IF;
734: RAISE FND_API.G_EXC_ERROR ;
735: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
736: IF PG_DEBUG in ('Y', 'C') THEN
737: msc_sch_wb.atp_debug('something wrong in Call_ATP_No_Commit');
738: END IF;
739: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
740: END IF;
741:

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

739: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
740: END IF;
741:
742: IF PG_DEBUG in ('Y', 'C') THEN
743: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status : '||x_return_status);
744: END IF;
745:
746:
747: -- Bug 2387242 : krajan

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

753: END IF;
754: END IF;
755:
756: IF PG_DEBUG in ('Y', 'C') THEN
757: msc_sch_wb.atp_debug('End Call_ATP');
758: END IF;
759: EXCEPTION
760:
761: -- Error Handling fix : krajan

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

761: -- Error Handling fix : krajan
762: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
763: -- something wrong so we want to rollback;
764: IF PG_DEBUG in ('Y', 'C') THEN
765: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
766: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
767: msc_sch_wb.atp_debug('Call_ATP: Invalid Objects found.');
768: END IF;
769:

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

762: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
763: -- something wrong so we want to rollback;
764: IF PG_DEBUG in ('Y', 'C') THEN
765: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
766: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
767: msc_sch_wb.atp_debug('Call_ATP: Invalid Objects found.');
768: END IF;
769:
770: -- Step1: Assign output record

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

763: -- something wrong so we want to rollback;
764: IF PG_DEBUG in ('Y', 'C') THEN
765: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
766: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
767: msc_sch_wb.atp_debug('Call_ATP: Invalid Objects found.');
768: END IF;
769:
770: -- Step1: Assign output record
771: IF (x_atp_rec.Inventory_item_id.COUNT = 0) THEN

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

786: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Call_ATP');
787: END IF;
788: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
789: IF PG_DEBUG in ('Y', 'C') THEN
790: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status in excpetion : '||x_return_status);
791: END IF;
792: -- End Error Handling Fix
793:
794: -- Bug 2387242 : krajan

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

803:
804: WHEN others THEN
805: -- something wrong so we want to rollback;
806: IF PG_DEBUG in ('Y', 'C') THEN
807: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
808: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
809: END IF;
810:
811: -- Error Handling fix : krajan

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

804: WHEN others THEN
805: -- something wrong so we want to rollback;
806: IF PG_DEBUG in ('Y', 'C') THEN
807: msc_sch_wb.atp_debug('something wrong in Call_ATP : ' || sqlcode);
808: msc_sch_wb.atp_debug('Call_ATP: ' || sqlerrm);
809: END IF;
810:
811: -- Error Handling fix : krajan
812: IF (x_atp_rec.Inventory_item_id.COUNT = 0) THEN

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

838: IF nvl(p_atp_rec.Action(i),100) <> 100 and
839: NVL(p_atp_rec.Calling_Module(i), -99) <> 724 and
840: nvl(l_atp_rec.attribute_14(1),2) = 1 THEN
841: IF PG_DEBUG in ('Y', 'C') THEN
842: msc_sch_wb.atp_debug('before rollback, before closing DB Link');
843: END IF;
844: ROLLBACK TO SAVEPOINT start_of_call_atp;
845: IF PG_DEBUG in ('Y', 'C') THEN
846: msc_sch_wb.atp_debug('after rollback, before closing DB Link');

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

842: msc_sch_wb.atp_debug('before rollback, before closing DB Link');
843: END IF;
844: ROLLBACK TO SAVEPOINT start_of_call_atp;
845: IF PG_DEBUG in ('Y', 'C') THEN
846: msc_sch_wb.atp_debug('after rollback, before closing DB Link');
847: END IF;
848: IF l_a2m_dblink IS NOT NULL THEN
849: cursor_name := dbms_sql.open_cursor;
850: DBMS_SQL.PARSE(cursor_name, 'alter session close database link ' ||l_a2m_dblink,

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

853: rows_processed := dbms_sql.execute(cursor_name);
854: EXCEPTION
855: WHEN DBLINK_NOT_OPEN THEN
856: IF PG_DEBUG in ('Y', 'C') THEN
857: msc_sch_wb.atp_debug('inside DBLINK_NOT_OPEN exception');
858: END IF;
859: END;
860: DBMS_SQL.close_cursor(cursor_name);
861: IF PG_DEBUG in ('Y', 'C') THEN

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

858: END IF;
859: END;
860: DBMS_SQL.close_cursor(cursor_name);
861: IF PG_DEBUG in ('Y', 'C') THEN
862: msc_sch_wb.atp_debug('after rollback, after closing DB Link');
863: END IF;
864: END IF;
865: END IF;
866: --5195929 End

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

865: END IF;
866: --5195929 End
867: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
868: IF PG_DEBUG in ('Y', 'C') THEN
869: msc_sch_wb.atp_debug('Call_ATP: ' || 'Return Status in excpetion : '||x_return_status);
870: END IF;
871:
872: END Call_ATP;
873:

Line 993: msc_sch_wb.set_session_id(p_session_id);

989: BEGIN
990: --Started change for bug 4421391
991: L_RETURN_NUM := 1;
992: IF G_CALL_ATP = 2 THEN
993: msc_sch_wb.set_session_id(p_session_id);
994: IF order_sch_wb.mr_debug in ('T','C') THEN
995: enable_trace(L_RETURN_NUM);
996: IF L_RETURN_NUM =-1 THEN
997: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;

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

1001:
1002: --4421391
1003:
1004: IF PG_DEBUG in ('Y', 'C') THEN
1005: msc_sch_wb.atp_debug('Begin Call_ATP_No_Commit');
1006: END IF;
1007:
1008: -- initialize API returm status to success
1009: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

1010:
1011: -- created a savepoint
1012: SAVEPOINT start_of_call_atp_no_commit;
1013: IF PG_DEBUG in ('Y', 'C') THEN
1014: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'oe_flag count : ' || p_atp_rec.oe_flag.count);
1015: END IF;
1016:
1017: l_atp_rec := p_atp_rec;
1018:

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

1020:
1021: IF i IS NOT NULL THEN
1022:
1023: IF PG_DEBUG in ('Y', 'C') THEN
1024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));
1025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1026: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1027: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1028: ||p_atp_rec.requested_ship_date(i));

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

1021: IF i IS NOT NULL THEN
1022:
1023: IF PG_DEBUG in ('Y', 'C') THEN
1024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));
1025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1026: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1027: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1028: ||p_atp_rec.requested_ship_date(i));
1029: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '

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

1022:
1023: IF PG_DEBUG in ('Y', 'C') THEN
1024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));
1025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1026: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1027: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1028: ||p_atp_rec.requested_ship_date(i));
1029: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '
1030: ||p_atp_rec.requested_arrival_date(i));

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

1023: IF PG_DEBUG in ('Y', 'C') THEN
1024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.Calling_Module : '||p_atp_rec.Calling_Module(i));
1025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1026: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1027: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1028: ||p_atp_rec.requested_ship_date(i));
1029: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '
1030: ||p_atp_rec.requested_arrival_date(i));
1031: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.attribute_02 : '

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

1025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.ship_set_name : '||p_atp_rec.ship_set_name(i));
1026: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_INV_CTP : '||G_INV_CTP);
1027: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1028: ||p_atp_rec.requested_ship_date(i));
1029: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '
1030: ||p_atp_rec.requested_arrival_date(i));
1031: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.attribute_02 : '
1032: ||p_atp_rec.attribute_02(i));
1033: END IF;

Line 1031: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.attribute_02 : '

1027: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_ship_date : '
1028: ||p_atp_rec.requested_ship_date(i));
1029: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.requested_arrival_date : '
1030: ||p_atp_rec.requested_arrival_date(i));
1031: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_atp_rec.attribute_02 : '
1032: ||p_atp_rec.attribute_02(i));
1033: END IF;
1034:
1035: -- Set l_cto_flag = 1 in case call is from OM or Configurator

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

1042: G_INV_CTP = 4 and p_atp_rec.ship_set_name(i) IS NOT NULL THEN
1043: G_CTO_FLAG := 1;
1044: END IF;
1045: IF PG_DEBUG in ('Y', 'C') THEN
1046: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG : '||G_CTO_FLAG);
1047: END IF;
1048: */
1049: --Web Service, lets always set l_instance_id. For non-aps instances it will be NULL and hence
1050: --below ELSE condition will be taken care of.

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

1060:
1061: l_instance_id := p_atp_rec.instance_id(i);
1062:
1063: IF PG_DEBUG in ('Y', 'C') THEN
1064: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id = '||l_instance_id);
1065: END IF;
1066: -- get the assignment set from profile in msc. if it is null,
1067: -- the assignment get from msc_apps_instance.
1068: --diag_atp

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

1077: l_assign_set_id := FND_PROFILE.value('MSC_ATP_ASSIGN_SET');
1078: END IF;
1079:
1080: IF PG_DEBUG in ('Y', 'C') THEN
1081: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id = '||l_assign_set_id);
1082: END IF;
1083:
1084: IF l_assign_set_id is NULL THEN
1085: SELECT assignment_set_id

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

1105: l_assign_set_id := FND_PROFILE.value('MRP_ATP_ASSIGN_SET');
1106: END IF;
1107:
1108: IF PG_DEBUG in ('Y', 'C') THEN
1109: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id = '||l_assign_set_id);
1110: END IF;
1111:
1112: END IF;
1113:

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

1126: EXCEPTION
1127: WHEN others THEN
1128: -- something wrong so we want to rollback
1129: IF PG_DEBUG in ('Y', 'C') THEN
1130: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'No instance Id record found in mrp_ap_apps_instances');
1131: END IF;
1132: x_atp_rec := l_atp_rec;
1133: RAISE FND_API.G_EXC_ERROR ;
1134: END;

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

1138: --s_cto_rearch
1139: g_atp_check := 'N';
1140:
1141: IF PG_DEBUG in ('Y', 'C') THEN
1142: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Before Calling ATI for finding CTO-ATP Items');
1143: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1144: END IF;
1145:
1146: IF l_instance_id IS NULL and NVL(p_atp_rec.Calling_Module(i), -99) <> 724 THEN

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

1139: g_atp_check := 'N';
1140:
1141: IF PG_DEBUG in ('Y', 'C') THEN
1142: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Before Calling ATI for finding CTO-ATP Items');
1143: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1144: END IF;
1145:
1146: IF l_instance_id IS NULL and NVL(p_atp_rec.Calling_Module(i), -99) <> 724 THEN
1147: IF PG_DEBUG in ('Y', 'C') THEN

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

1144: END IF;
1145:
1146: IF l_instance_id IS NULL and NVL(p_atp_rec.Calling_Module(i), -99) <> 724 THEN
1147: IF PG_DEBUG in ('Y', 'C') THEN
1148: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Query from non-APS instance, find instance_id');
1149: END IF;
1150:
1151: /* BEGIN
1152: SELECT instance_id, a2m_dblink

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

1156: EXCEPTION
1157: WHEN others THEN
1158: -- something wrong so we want to rollback;
1159: IF PG_DEBUG in ('Y', 'C') THEN
1160: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Error in mrp_ap_apps_instances : ' || sqlcode);
1161: END IF;
1162: x_atp_rec := l_atp_rec;
1163:
1164: FOR i in 1..x_atp_rec.Calling_Module.LAST LOOP

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

1171: -- Uncommenting get_dblink_profile for bug 3632914
1172: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start
1173:
1174: IF PG_DEBUG in ('Y', 'C') THEN
1175: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1176: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_a2m_dblink := ' || l_a2m_dblink);
1177: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_return_status of := get_dblink_profile ' || l_return_status);
1178: END IF;
1179:

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

1172: MSC_SATP_FUNC.get_dblink_profile(l_a2m_dblink,l_instance_id,l_return_status); --bug3049003 start
1173:
1174: IF PG_DEBUG in ('Y', 'C') THEN
1175: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1176: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_a2m_dblink := ' || l_a2m_dblink);
1177: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_return_status of := get_dblink_profile ' || l_return_status);
1178: END IF;
1179:
1180: --bug3940999 dumping the profiles on source

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

1173:
1174: IF PG_DEBUG in ('Y', 'C') THEN
1175: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id := ' || NVL(l_instance_id, -1));
1176: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_a2m_dblink := ' || l_a2m_dblink);
1177: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_return_status of := get_dblink_profile ' || l_return_status);
1178: END IF;
1179:
1180: --bug3940999 dumping the profiles on source
1181: IF l_a2m_dblink is not NULL THEN

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

1182: MSC_SATP_FUNC.put_src_to_dstn_profiles(p_session_id,
1183: l_return_status);
1184: END IF;
1185: IF PG_DEBUG in ('Y', 'C') THEN
1186: msc_sch_wb.atp_debug('Call_ATP_No_Commit : ' || 'l_return_status of put_src_to_dstn_profiles:= ' || l_return_status);
1187: END IF;
1188:
1189: /* bug 3623018: Do not raise this error here. Raise it only when some item is found to be atpbale
1190: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

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

1204: --- if MRP:ATP Database link profile option and mrp_ap_apps_instances table not in sync then
1205: --- raise an error
1206: /*IF (NVL(UPPER(l_a2m_dblink), -1) <> NVL(UPPER(G_DB_PROFILE), -1)) THEN
1207: IF PG_DEBUG in ('Y', 'C') THEN
1208: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MRP:ATP DATABASE LINK profile option and MRP_AP_APPS_INSTANCES table
1209: not in SYNC');
1210: END IF;
1211: x_atp_rec := l_atp_rec;
1212:

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

1240:
1241: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1242: -- something wrong so we want to rollback;
1243: IF PG_DEBUG in ('Y', 'C') THEN
1244: msc_sch_wb.atp_debug('l_return_status := ' || l_return_status);
1245: msc_sch_wb.atp_debug('Call_ATP: ' || 'expected error in Call to Check_CTO');
1246: END IF;
1247: x_return_status := l_return_status;
1248: x_atp_rec := l_atp_rec;

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

1241: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1242: -- something wrong so we want to rollback;
1243: IF PG_DEBUG in ('Y', 'C') THEN
1244: msc_sch_wb.atp_debug('l_return_status := ' || l_return_status);
1245: msc_sch_wb.atp_debug('Call_ATP: ' || 'expected error in Call to Check_CTO');
1246: END IF;
1247: x_return_status := l_return_status;
1248: x_atp_rec := l_atp_rec;
1249: RAISE FND_API.G_EXC_ERROR;

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

1299: BEGIN --bug3583705
1300: -- savirine, Sep 05, 2001: call get_regions to get regions info to be used for ATP request.
1301:
1302: IF PG_DEBUG in ('Y', 'C') THEN
1303: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j : ' ||j);
1304: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date : ' ||l_atp_rec.requested_ship_date(j));
1305: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date : ' ||l_atp_rec.requested_arrival_date(j));
1306: END IF;
1307: l_past_due_ship_date := 2; --bug4291375 resetting variable to no past due date

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

1300: -- savirine, Sep 05, 2001: call get_regions to get regions info to be used for ATP request.
1301:
1302: IF PG_DEBUG in ('Y', 'C') THEN
1303: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j : ' ||j);
1304: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date : ' ||l_atp_rec.requested_ship_date(j));
1305: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date : ' ||l_atp_rec.requested_arrival_date(j));
1306: END IF;
1307: l_past_due_ship_date := 2; --bug4291375 resetting variable to no past due date
1308: -- 3000016

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

1301:
1302: IF PG_DEBUG in ('Y', 'C') THEN
1303: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j : ' ||j);
1304: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_ship_date : ' ||l_atp_rec.requested_ship_date(j));
1305: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date : ' ||l_atp_rec.requested_arrival_date(j));
1306: END IF;
1307: l_past_due_ship_date := 2; --bug4291375 resetting variable to no past due date
1308: -- 3000016
1309: IF G_ATP_CHECK = 'N' THEN

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

1309: IF G_ATP_CHECK = 'N' THEN
1310:
1311: IF PG_DEBUG in ('Y', 'C') THEN
1312:
1313: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Item Is non atpable');
1314: END IF;
1315:
1316: IF l_atp_rec.attribute_06(j) is null THEN
1317:

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

1316: IF l_atp_rec.attribute_06(j) is null THEN
1317:
1318: IF PG_DEBUG in ('Y', 'C') THEN
1319:
1320: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Invalid Item Org Combo');
1321: END IF;
1322:
1323: l_atp_rec.error_code(j) := MSC_ATP_PVT.INVALID_ITEM_ORG_COMBINATION;
1324:

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

1323: l_atp_rec.error_code(j) := MSC_ATP_PVT.INVALID_ITEM_ORG_COMBINATION;
1324:
1325: l_end := j;
1326: IF PG_DEBUG in ('Y', 'C') THEN
1327: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));
1328: msc_sch_wb.atp_debug('ato_model_line_id :== ' || l_atp_rec.ato_model_line_id(l_end));
1329: msc_sch_wb.atp_debug('bom_item_type := ' || l_atp_rec.bom_item_type(l_end));
1330: END IF;
1331: -- advance l_end to the end of the set

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

1324:
1325: l_end := j;
1326: IF PG_DEBUG in ('Y', 'C') THEN
1327: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));
1328: msc_sch_wb.atp_debug('ato_model_line_id :== ' || l_atp_rec.ato_model_line_id(l_end));
1329: msc_sch_wb.atp_debug('bom_item_type := ' || l_atp_rec.bom_item_type(l_end));
1330: END IF;
1331: -- advance l_end to the end of the set
1332: while l_end < l_atp_rec.action.count() and

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

1325: l_end := j;
1326: IF PG_DEBUG in ('Y', 'C') THEN
1327: msc_sch_wb.atp_debug('identifier := ' || l_atp_rec.identifier(l_end));
1328: msc_sch_wb.atp_debug('ato_model_line_id :== ' || l_atp_rec.ato_model_line_id(l_end));
1329: msc_sch_wb.atp_debug('bom_item_type := ' || l_atp_rec.bom_item_type(l_end));
1330: END IF;
1331: -- advance l_end to the end of the set
1332: while l_end < l_atp_rec.action.count() and
1333: (nvl(l_atp_rec.ship_set_name(l_end+1), -99) = nvl(l_atp_rec.ship_set_name(l_start), -99) and

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

1338:
1339: IF l_atp_rec.identifier(l_end) = l_atp_rec.ato_model_line_id(l_end) THEN
1340: MSC_ATP_CTO.G_MODEL_IS_PRESENT := 1;
1341: IF PG_DEBUG in ('Y', 'C') THEN
1342: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');
1343: END IF;
1344: END IF;
1345: end loop;
1346: mrp_atp_pvt.assign_atp_input_rec(l_atp_rec,l_end,x_atp_rec,x_return_status);

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

1347:
1348: IF l_atp_rec.identifier(l_end) = l_atp_rec.ato_model_line_id(l_end) THEN
1349: MSC_ATP_CTO.G_MODEL_IS_PRESENT := 1;
1350: IF PG_DEBUG in ('Y', 'C') THEN
1351: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');
1352: END IF;
1353: END IF;
1354:
1355:

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

1374: END IF;
1375: END IF;
1376: END IF; -- F G_ATP_CHECK := 'N' THEN
1377: IF PG_DEBUG in ('Y', 'C') THEN
1378: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1379: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1380: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1381: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));

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

1375: END IF;
1376: END IF; -- F G_ATP_CHECK := 'N' THEN
1377: IF PG_DEBUG in ('Y', 'C') THEN
1378: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1379: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1380: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1381: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));

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

1376: END IF; -- F G_ATP_CHECK := 'N' THEN
1377: IF PG_DEBUG in ('Y', 'C') THEN
1378: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1379: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1380: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1381: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1384: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));

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

1377: IF PG_DEBUG in ('Y', 'C') THEN
1378: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1379: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1380: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1381: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1384: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));
1385: END IF;

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

1378: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' Before finding region based sourcing');
1379: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1380: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1381: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1384: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));
1385: END IF;
1386: IF (NVL(l_customer_site_id, -1) <> l_atp_rec.customer_site_id(j))

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

1379: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_site_id(j));
1380: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1381: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1384: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));
1385: END IF;
1386: IF (NVL(l_customer_site_id, -1) <> l_atp_rec.customer_site_id(j))
1387: --2814895, added checks for address parameters and party_site_id

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

1380: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_country(j));
1381: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_state(j));
1382: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_city(j));
1383: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.customer_postal_code(j));
1384: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.party_site_id(j));
1385: END IF;
1386: IF (NVL(l_customer_site_id, -1) <> l_atp_rec.customer_site_id(j))
1387: --2814895, added checks for address parameters and party_site_id
1388: OR (NVL(l_party_site_id, -1) <> l_atp_rec.party_site_id(j))

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

1430: p_order_line_id => l_atp_rec.identifier(j) --2814895, added identifier for address parameters
1431: );
1432:
1433: IF PG_DEBUG in ('Y', 'C') THEN
1434: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Get_Regions, return status : ' || l_return_status);
1435: END IF;
1436:
1437: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1438: -- something wrong so we want to rollback;

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

1436:
1437: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1438: -- something wrong so we want to rollback;
1439: IF PG_DEBUG in ('Y', 'C') THEN
1440: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'expected error in Call to Get_Regions');
1441: END IF;
1442: x_atp_rec := l_atp_rec;
1443: --bug3583705 if this xcptn is raised then processing for all line will not stop
1444: -- as it will be handled in when others xcptn

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

1444: -- as it will be handled in when others xcptn
1445: RAISE FND_API.G_EXC_ERROR ;
1446: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
1447: IF PG_DEBUG in ('Y', 'C') THEN
1448: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'something wrong in Call to Get_Regions');
1449: END IF;
1450: x_atp_rec := l_atp_rec;
1451: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
1452: END IF;

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

1452: END IF;
1453: END IF;
1454:
1455: IF PG_DEBUG in ('Y', 'C') THEN
1456: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'g_atp_check := ' || g_atp_check);
1457: END IF;
1458:
1459: IF NVL(g_atp_check, '@') = 'N' THEN
1460:

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

1458:
1459: IF NVL(g_atp_check, '@') = 'N' THEN
1460:
1461: IF PG_DEBUG in ('Y', 'C') THEN
1462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'No ATPable item or CTO model in the ATP request from source');
1463: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Set values for ship and group date and error code');
1464: END IF;
1465: -- we cannot assign this directly since the l_atp_rec may not be a
1466: -- complete record, that is, there are some elements that are not initialized before.

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

1459: IF NVL(g_atp_check, '@') = 'N' THEN
1460:
1461: IF PG_DEBUG in ('Y', 'C') THEN
1462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'No ATPable item or CTO model in the ATP request from source');
1463: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Set values for ship and group date and error code');
1464: END IF;
1465: -- we cannot assign this directly since the l_atp_rec may not be a
1466: -- complete record, that is, there are some elements that are not initialized before.
1467: -- x_atp_rec := l_atp_rec;

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

1467: -- x_atp_rec := l_atp_rec;
1468:
1469: IF l_atp_rec.identifier(j) = l_atp_rec.ato_model_line_id(j) and l_atp_rec.bom_item_type(j) = 1 THEN
1470: MSC_ATP_CTO.G_MODEL_IS_PRESENT := 1;
1471: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Model is present');
1472: END IF;
1473: mrp_atp_pvt.assign_atp_input_rec(l_atp_rec,j,x_atp_rec,x_return_status);
1474:
1475: if x_atp_rec.action(j) = 100 then

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

1486: l_ship_method := x_atp_rec.ship_method(j);
1487: l_delivery_lead_time := x_atp_rec.delivery_lead_time(j);
1488:
1489: IF PG_DEBUG in ('Y', 'C') THEN
1490: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_delivery_lead_time : ' || l_delivery_lead_time);
1491: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'quantity_ordered(' || j || ') : ' || x_atp_rec.quantity_ordered(j));
1492: END IF;
1493:
1494: -- krajan : 2748041

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

1487: l_delivery_lead_time := x_atp_rec.delivery_lead_time(j);
1488:
1489: IF PG_DEBUG in ('Y', 'C') THEN
1490: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_delivery_lead_time : ' || l_delivery_lead_time);
1491: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'quantity_ordered(' || j || ') : ' || x_atp_rec.quantity_ordered(j));
1492: END IF;
1493:
1494: -- krajan : 2748041
1495: -- Defaulting the delivery lead time for ATO delete flag case

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

1497: -- By setting it to 0, we dont have to go through the whole delivery
1498: -- lead time calculation.
1499: if (x_atp_rec.quantity_ordered(j) = 0 ) then
1500: IF PG_DEBUG in ('Y', 'C') THEN
1501: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG is 2 for non_atpable item or');
1502: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'A non ATPable item is being cancelled');
1503: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Setting the delivery lead time to 0');
1504: END IF;
1505: l_delivery_lead_time := 0;

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

1498: -- lead time calculation.
1499: if (x_atp_rec.quantity_ordered(j) = 0 ) then
1500: IF PG_DEBUG in ('Y', 'C') THEN
1501: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG is 2 for non_atpable item or');
1502: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'A non ATPable item is being cancelled');
1503: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Setting the delivery lead time to 0');
1504: END IF;
1505: l_delivery_lead_time := 0;
1506: --bug 3979115:

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

1499: if (x_atp_rec.quantity_ordered(j) = 0 ) then
1500: IF PG_DEBUG in ('Y', 'C') THEN
1501: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'G_CTO_FLAG is 2 for non_atpable item or');
1502: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'A non ATPable item is being cancelled');
1503: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Setting the delivery lead time to 0');
1504: END IF;
1505: l_delivery_lead_time := 0;
1506: --bug 3979115:
1507: x_atp_rec.receiving_cal_code(j) := MSC_CALENDAR.FOC;

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

1543: l_customer_site_id := x_atp_rec.customer_site_id(j);
1544: */
1545:
1546: IF PG_DEBUG in ('Y', 'C') THEN
1547: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);
1548: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);
1549: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1550: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1551: END IF;

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

1544: */
1545:
1546: IF PG_DEBUG in ('Y', 'C') THEN
1547: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);
1548: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);
1549: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1550: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1551: END IF;
1552:

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

1545:
1546: IF PG_DEBUG in ('Y', 'C') THEN
1547: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);
1548: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);
1549: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1550: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1551: END IF;
1552:
1553: l_from_location := MSC_SATP_FUNC.src_location_id(l_source_organization_id, null, null);

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

1546: IF PG_DEBUG in ('Y', 'C') THEN
1547: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_source_organization_id : ' || l_source_organization_id);
1548: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_to_organization_id : ' || l_to_organization_id);
1549: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_id : ' || l_customer_id);
1550: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_customer_site_id : ' || l_customer_site_id);
1551: END IF;
1552:
1553: l_from_location := MSC_SATP_FUNC.src_location_id(l_source_organization_id, null, null);
1554:

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

1552:
1553: l_from_location := MSC_SATP_FUNC.src_location_id(l_source_organization_id, null, null);
1554:
1555: IF PG_DEBUG in ('Y', 'C') THEN
1556: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_from_location : ' || l_from_location);
1557: END IF;
1558:
1559: -- Bug 3449812 - Base DLT on internal_org_id if available
1560: -- IF NVL(x_atp_rec.internal_org_id(j),l_to_organization_id) IS NOT NULL THEN

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

1567: l_to_location := MSC_SATP_FUNC.src_location_id(null, l_customer_id, l_customer_site_id);
1568: END IF;
1569:
1570: IF PG_DEBUG in ('Y', 'C') THEN
1571: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'l_to_location : ' || l_to_location);
1572: END IF;
1573:
1574: -- dsting dlt
1575: -- IF x_atp_rec.internal_org_id(j) IS NOT NULL THEN

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

1580: AND ((l_customer_id IS NULL AND l_customer_site_id IS NULL)
1581: OR l_party_site_id IS NULL
1582: OR l_country IS NULL )) THEN --2814895, added conditions for address parameter and party_site_id
1583: IF PG_DEBUG in ('Y', 'C') THEN
1584: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside Org code');
1585: END IF;
1586: MSC_SATP_FUNC.get_src_transit_time(
1587: l_source_organization_id,
1588: l_from_location,

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

1594: l_ship_method,
1595: l_delivery_lead_time);
1596: ELSIF ( l_customer_site_id is not NULL) THEN --2814895
1597: IF PG_DEBUG in ('Y', 'C') THEN
1598: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside customer code');
1599: END IF;
1600: MSC_SATP_FUNC.get_src_transit_time(
1601: l_source_organization_id,
1602: l_from_location,

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

1610: 2 --2814895, partner_type for customer
1611: );
1612: ELSIF ( l_party_site_id is not NULL) THEN --2814895
1613: IF PG_DEBUG in ('Y', 'C') THEN
1614: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside party_site code');
1615: END IF;
1616: MSC_SATP_FUNC.get_src_transit_time(
1617: l_source_organization_id,
1618: l_from_location,

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

1625: 4 --2814895, partner_type for party_site_id
1626: );
1627: ELSIF (l_country IS NOT NULL) THEN --2814895
1628: IF PG_DEBUG in ('Y', 'C') THEN
1629: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Inside address_parameter code');
1630: END IF;
1631: MSC_SATP_FUNC.get_src_transit_time(
1632: l_source_organization_id,
1633: l_from_location,

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

1646: ELSE
1647:
1648: -- Bug3593394 - Use from previous line
1649: IF PG_DEBUG in ('Y', 'C') THEN
1650: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'DLT parameters have not changed');
1651: END IF;
1652: l_delivery_lead_time := x_atp_rec.delivery_lead_time(j-1);
1653: l_ship_method := x_atp_rec.ship_method(j-1);
1654:

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

1674: x_atp_rec.source_organization_id(j),
1675: sysdate);
1676: IF l_sysdate IS NULL THEN
1677: IF PG_DEBUG in ('Y', 'C') THEN
1678: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');
1679: END IF;
1680: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1681: RAISE NO_DATA_FOUND;
1682: END IF;

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

1690: x_atp_rec.source_organization_id(J),
1691: x_atp_rec.ship_date(j));
1692: IF l_prev_work_ship_date IS NULL THEN
1693: IF PG_DEBUG in ('Y', 'C') THEN
1694: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'prev date for ship date not found in Calendar');
1695: END IF;
1696: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1697: RAISE NO_DATA_FOUND;
1698: END IF;

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

1703: -- and l_atp_rec.ship_date is D9 (previous working day) 0:00.
1704: -- we want to return ship date as D9 0:00 instead of D10 5pm.
1705:
1706: IF PG_DEBUG in ('Y', 'C') THEN
1707: 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'));
1708: 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'));
1709: 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'));
1710: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1711: 'dd/mm/yyyy hh:mi:ss'));

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

1704: -- we want to return ship date as D9 0:00 instead of D10 5pm.
1705:
1706: IF PG_DEBUG in ('Y', 'C') THEN
1707: 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'));
1708: 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'));
1709: 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'));
1710: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1711: 'dd/mm/yyyy hh:mi:ss'));
1712: END IF;*/

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

1705:
1706: IF PG_DEBUG in ('Y', 'C') THEN
1707: 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'));
1708: 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'));
1709: 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'));
1710: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1711: 'dd/mm/yyyy hh:mi:ss'));
1712: END IF;*/
1713:

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

1706: IF PG_DEBUG in ('Y', 'C') THEN
1707: 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'));
1708: 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'));
1709: 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'));
1710: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1711: 'dd/mm/yyyy hh:mi:ss'));
1712: END IF;*/
1713:
1714: /* Bug 3335268 - We dont require calendar/date calculation in unschedule cases */

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

1739: x_atp_rec.ship_method(j), MSC_CALENDAR.VIC);
1740: ELSE
1741: x_atp_rec.intransit_cal_code(j) := x_atp_rec.intransit_cal_code(j-1);
1742: IF PG_DEBUG in ('Y', 'C') THEN
1743: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for VIC');
1744: END IF;
1745: END IF;
1746: ELSE
1747: -- Bug 3647208

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

1765: AND NVL(x_atp_rec.ship_method(j),'@@@') = NVL(x_atp_rec.ship_method(j-1),'@@@') THEN
1766:
1767: x_atp_rec.receiving_cal_code(j) := x_atp_rec.receiving_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 ORC/CRC');
1770: END IF;
1771: ELSIF (x_atp_rec.internal_org_id(j) IS NOT NULL) OR
1772: (l_to_organization_id IS NOT NULL AND l_customer_id IS NULL AND l_customer_site_id IS NULL) THEN
1773: x_atp_rec.receiving_cal_code(j) := MSC_SATP_FUNC.src_get_calendar_code(null, null,

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

1794: x_atp_rec.ship_method(j), MSC_CALENDAR.OSC);
1795: ELSE
1796: x_atp_rec.shipping_cal_code(j) := x_atp_rec.shipping_cal_code(j-1);
1797: IF PG_DEBUG in ('Y', 'C') THEN
1798: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'Parameters have not changed for OSC');
1799: END IF;
1800: END IF;
1801:
1802: IF PG_DEBUG in ('Y', 'C') THEN

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

1799: END IF;
1800: END IF;
1801:
1802: IF PG_DEBUG in ('Y', 'C') THEN
1803: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'receiving_cal_code : ' || x_atp_rec.receiving_cal_code(j));
1804: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'intransit_cal_code : ' || x_atp_rec.intransit_cal_code(j));
1805: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'shipping_cal_code : ' || x_atp_rec.shipping_cal_code(j));
1806: END IF;
1807: /* ship_rec_cal changes end */

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

1800: END IF;
1801:
1802: IF PG_DEBUG in ('Y', 'C') THEN
1803: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'receiving_cal_code : ' || x_atp_rec.receiving_cal_code(j));
1804: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'intransit_cal_code : ' || x_atp_rec.intransit_cal_code(j));
1805: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'shipping_cal_code : ' || x_atp_rec.shipping_cal_code(j));
1806: END IF;
1807: /* ship_rec_cal changes end */
1808:

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

1801:
1802: IF PG_DEBUG in ('Y', 'C') THEN
1803: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'receiving_cal_code : ' || x_atp_rec.receiving_cal_code(j));
1804: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'intransit_cal_code : ' || x_atp_rec.intransit_cal_code(j));
1805: msc_sch_wb.atp_debug('Call_ATP_NO_Commit: ' || 'shipping_cal_code : ' || x_atp_rec.shipping_cal_code(j));
1806: END IF;
1807: /* ship_rec_cal changes end */
1808:
1809: -- Begin Bug 2232555, 2250456

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

1809: -- Begin Bug 2232555, 2250456
1810:
1811: -- bug 2649670 dsting. Handle override case for nonatpable items
1812: IF (NVL(x_atp_rec.override_flag(j), 'N') = 'Y') THEN
1813: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Override case. Do not mess with the dates');
1814:
1815: IF (x_atp_rec.requested_ship_date(j) is not null) THEN
1816: -- ship_rec_cal project changes. Honor atleast VIC and CRC to compute right arrival date
1817: -- x_atp_rec.arrival_date(j) := x_atp_rec.ship_date(j) + x_atp_rec.delivery_lead_time(j);

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

1876:
1877: --bug3583705 not required
1878: /*IF l_sysdate IS NULL OR l_sysdate_osc IS NULL or l_sysdate_orc IS NULL THEN
1879: IF PG_DEBUG in ('Y', 'C') THEN
1880: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Next date not found in Calendar');
1881: END IF;
1882: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1883: RAISE NO_DATA_FOUND;
1884: END IF;*/

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

1906: END IF;
1907: */
1908: L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929
1909: IF PG_DEBUG in ('Y', 'C') THEN
1910: msc_sch_wb.atp_debug('Schedule: ' || 'MOVE_PAST_DUE_TO_SYS_DATE :'|| L_MOVE_PAST_DUE_TO_SYSDATE);
1911: END IF;
1912: if L_MOVE_PAST_DUE_TO_SYSDATE = 'Y' THEN -- Bug 5584634/5618929
1913: IF x_atp_rec.ship_date(j) < l_sysdate_osc THEN
1914:

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

1914:
1915: x_atp_rec.ship_date(j) := l_sysdate_osc;
1916: l_past_due_ship_date := 1; --bug4291375 setting variable to point pass due request ship date.
1917: IF PG_DEBUG in ('Y', 'C') THEN
1918: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'New ship_date := ' || l_sysdate_osc);
1919: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Request date is less than sysdate');
1920: END IF;
1921: END IF;
1922:

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

1915: x_atp_rec.ship_date(j) := l_sysdate_osc;
1916: l_past_due_ship_date := 1; --bug4291375 setting variable to point pass due request ship date.
1917: IF PG_DEBUG in ('Y', 'C') THEN
1918: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'New ship_date := ' || l_sysdate_osc);
1919: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Request date is less than sysdate');
1920: END IF;
1921: END IF;
1922:
1923: IF x_atp_rec.requested_ship_date(j) IS NOT NULL THEN

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

1951: -- and l_atp_rec.ship_date is D9 (previous working day) 0:00.
1952: -- we want to return ship date as D9 0:00 instead of D10 5pm.
1953:
1954: IF PG_DEBUG in ('Y', 'C') THEN
1955: 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'));
1956: 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'));
1957: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1958: 'dd/mm/yyyy hh:mi:ss'));
1959: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375

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

1952: -- we want to return ship date as D9 0:00 instead of D10 5pm.
1953:
1954: IF PG_DEBUG in ('Y', 'C') THEN
1955: 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'));
1956: 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'));
1957: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1958: 'dd/mm/yyyy hh:mi:ss'));
1959: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375
1960: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375

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

1953:
1954: IF PG_DEBUG in ('Y', 'C') THEN
1955: 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'));
1956: 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'));
1957: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1958: 'dd/mm/yyyy hh:mi:ss'));
1959: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375
1960: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375
1961: END IF;

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

1955: 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'));
1956: 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'));
1957: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1958: 'dd/mm/yyyy hh:mi:ss'));
1959: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375
1960: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375
1961: END IF;
1962: -- ship_rec_cal project changes end
1963: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on

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

1956: 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'));
1957: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'requested_arrival_date(j): ' || to_char(x_atp_rec.requested_arrival_date(j),
1958: 'dd/mm/yyyy hh:mi:ss'));
1959: msc_sch_wb.atp_debug('l_sysdate_orc_new := ' || l_sysdate_orc_new); --bug4291375
1960: msc_sch_wb.atp_debug('l_past_due_ship_date := ' || l_past_due_ship_date); --bug4291375
1961: END IF;
1962: -- ship_rec_cal project changes end
1963: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on
1964: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');

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

1963: --s_cto_rearch: bug 3169831 : Honor lead time only when profile option is turned on
1964: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');
1965:
1966: IF PG_DEBUG in ('Y', 'C') THEN
1967: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);
1968: msc_sch_wb.atp_debug('atp lead time := ' || x_atp_rec.atp_lead_time(j));
1969: END IF;
1970:
1971: -- 2833417 dsting add atp_lead_time if any

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

1964: l_enforce_model_lt := NVL(FND_PROFILE.VALUE('MSC_ENFORCE_MODEL_LT'), 'Y');
1965:
1966: IF PG_DEBUG in ('Y', 'C') THEN
1967: msc_sch_wb.atp_debug('l_enforce_model_lt := ' || l_enforce_model_lt);
1968: msc_sch_wb.atp_debug('atp lead time := ' || x_atp_rec.atp_lead_time(j));
1969: END IF;
1970:
1971: -- 2833417 dsting add atp_lead_time if any
1972: if nvl(x_atp_rec.atp_lead_time(j), 0) > 0 and MSC_ATP_PVT.G_INV_CTP = 5

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

1977: l_sysdate,
1978: x_atp_rec.atp_lead_time(j));
1979: --bug3583705 not required.
1980: /*IF l_ato_ship_date IS NULL THEN
1981: msc_sch_wb.atp_debug('prev date for ship date not found in Calendar');
1982: x_atp_rec.error_code(j) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
1983: RAISE NO_DATA_FOUND;
1984: END IF;*/
1985: else

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

1985: else
1986: -- 2894867
1987: l_ato_ship_date := x_atp_rec.ship_date(j);
1988: end if;
1989: msc_sch_wb.atp_debug('l_ato_ship_date: ' || l_ato_ship_date);
1990:
1991: -- dsting
1992: -- 2833417
1993: -- As part of ship_rec_cal remove the redundant if clause and compute the arrival date here.

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

2015: x_atp_rec.requested_date_quantity(j) := x_atp_rec.quantity_ordered(j);
2016: END IF;
2017:
2018: IF PG_DEBUG in ('Y', 'C') THEN
2019: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
2020: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
2021: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));

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

2016: END IF;
2017:
2018: IF PG_DEBUG in ('Y', 'C') THEN
2019: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
2020: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
2021: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
2024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));

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

2017:
2018: IF PG_DEBUG in ('Y', 'C') THEN
2019: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
2020: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
2021: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
2024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
2025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));

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

2018: IF PG_DEBUG in ('Y', 'C') THEN
2019: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
2020: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
2021: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
2024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
2025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));
2026: END IF;

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

2019: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_osc : ' || l_sysdate_osc);
2020: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
2021: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
2024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
2025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));
2026: END IF;
2027: --bug3439591 end

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

2020: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_sysdate_orc : ' || l_sysdate_orc);
2021: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
2024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
2025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));
2026: END IF;
2027: --bug3439591 end
2028: END IF; -- override bug 2649670

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

2021: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.latest_acceptable_date(j) : ' || x_atp_rec.latest_acceptable_date(j));
2022: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.delivery_lead_time(j) : ' || x_atp_rec.delivery_lead_time(j));
2023: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.ship_date(j) : ' || x_atp_rec.ship_date(j));
2024: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_atp_rec.arrival_date(j) : ' || x_atp_rec.arrival_date(j));
2025: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'error_code(j) : ' || x_atp_rec.error_code(j));
2026: END IF;
2027: --bug3439591 end
2028: END IF; -- override bug 2649670
2029:

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

2035: -- Bug 2406242, 2463608
2036: /* Bug 3345563 - At this point arrival date has already been calculated.
2037: Done with Enforce Pur LT changes
2038: IF PG_DEBUG in ('Y', 'C') THEN
2039: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival Date is always calculated ');
2040: END IF;
2041: IF x_atp_rec.requested_arrival_date(j) is not null THEN
2042: x_atp_rec.arrival_date(j) := GREATEST(x_atp_rec.arrival_date(j),
2043: x_atp_rec.requested_arrival_date(j));

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

2047:
2048: IF (x_atp_rec.ship_set_name(j) IS NOT NULL OR
2049: x_atp_rec.arrival_set_name(j) IS NOT NULL) THEN
2050: IF PG_DEBUG in ('Y', 'C') THEN
2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Within Ship Set '||x_atp_rec.ship_set_name(j));
2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'OR Arrival Set '||x_atp_rec.arrival_set_name(j));
2053: END IF;
2054:
2055: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;

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

2048: IF (x_atp_rec.ship_set_name(j) IS NOT NULL OR
2049: x_atp_rec.arrival_set_name(j) IS NOT NULL) THEN
2050: IF PG_DEBUG in ('Y', 'C') THEN
2051: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Within Ship Set '||x_atp_rec.ship_set_name(j));
2052: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'OR Arrival Set '||x_atp_rec.arrival_set_name(j));
2053: END IF;
2054:
2055: x_atp_rec.error_code(j) :=MSC_ATP_PVT.ATP_NOT_APPL;
2056: --bug 3365376: Pass earliest acceptable date as this date is used to calculate LAD for the line

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

2058: MSC_ATP_PROC.Process_Set_Line(x_atp_rec, j, l_line_status);
2059: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382
2060: ELSE -- If in shipset or arrival set
2061: IF PG_DEBUG in ('Y', 'C') THEN
2062: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');
2063: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));
2064: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));
2065: END IF;
2066:

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

2059: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j);--4460369/4500382
2060: ELSE -- If in shipset or arrival set
2061: IF PG_DEBUG in ('Y', 'C') THEN
2062: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');
2063: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));
2064: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));
2065: END IF;
2066:
2067: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j); --4967040:

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

2060: ELSE -- If in shipset or arrival set
2061: IF PG_DEBUG in ('Y', 'C') THEN
2062: msc_sch_wb.atp_debug('Call_ATP_No_Commit: Not a Set');
2063: msc_sch_wb.atp_debug('x_atp_rec.ship_date: ' || x_atp_rec.ship_date(j));
2064: msc_sch_wb.atp_debug('x_atp_rec.arrival_date: ' || x_atp_rec.arrival_date(j));
2065: END IF;
2066:
2067: MSC_ATP_PVT.process_time_stamp_errors(x_atp_rec, j); --4967040:
2068: END IF;

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

2076: NVL(l_atp_rec.Arrival_Set_Name(j+1),-100))
2077: THEN
2078: l_end := j;
2079: IF PG_DEBUG in ('Y', 'C') THEN
2080: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2081: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2082: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2083: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2084: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));

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

2077: THEN
2078: l_end := j;
2079: IF PG_DEBUG in ('Y', 'C') THEN
2080: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2081: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2082: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2083: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2084: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));
2085: END IF;

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

2078: l_end := j;
2079: IF PG_DEBUG in ('Y', 'C') THEN
2080: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2081: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2082: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2083: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2084: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));
2085: END IF;
2086: END IF;

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

2079: IF PG_DEBUG in ('Y', 'C') THEN
2080: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2081: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2082: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2083: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2084: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));
2085: END IF;
2086: END IF;
2087: -- Bug 2413888, 2281628

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

2080: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'setting l_end = '||l_end);
2081: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(j));
2082: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Ship_set_name '||x_atp_rec.ship_set_name(l_start));
2083: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || l_atp_rec.action.count);
2084: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Arrival_set '||x_atp_rec.Arrival_set_name(j));
2085: END IF;
2086: END IF;
2087: -- Bug 2413888, 2281628
2088:

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

2103: IF l_start <= l_atp_rec.action.count THEN
2104: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
2105: END IF;
2106: IF PG_DEBUG in ('Y', 'C') THEN
2107: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2108: END IF;
2109: END IF;
2110: -- End of changes for Bug 2413888, 2281628
2111:

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

2109: END IF;
2110: -- End of changes for Bug 2413888, 2281628
2111:
2112: IF PG_DEBUG in ('Y', 'C') THEN
2113: 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'));
2114: 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'));
2115: END IF;
2116:
2117: END IF; -- IF NVL(g_atp_check, '@') = 'N' THEN

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

2110: -- End of changes for Bug 2413888, 2281628
2111:
2112: IF PG_DEBUG in ('Y', 'C') THEN
2113: 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'));
2114: 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'));
2115: END IF;
2116:
2117: END IF; -- IF NVL(g_atp_check, '@') = 'N' THEN
2118: j := l_atp_rec.inventory_item_id.NEXT(j);

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

2118: j := l_atp_rec.inventory_item_id.NEXT(j);
2119: EXCEPTION --bug3583705 start
2120: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
2121: IF PG_DEBUG in ('Y', 'C') THEN
2122: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2123: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2124: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2125: END IF;
2126: l_end := l_start;

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

2119: EXCEPTION --bug3583705 start
2120: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
2121: IF PG_DEBUG in ('Y', 'C') THEN
2122: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2123: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2124: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2125: END IF;
2126: l_end := l_start;
2127:

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

2120: WHEN MSC_ATP_PVT.NO_MATCHING_DATE_IN_CAL THEN
2121: IF PG_DEBUG in ('Y', 'C') THEN
2122: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2123: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2124: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2125: END IF;
2126: l_end := l_start;
2127:
2128: WHILE l_end is not null and

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

2138: END IF;
2139:
2140: l_end := l_atp_rec.inventory_item_id.next(l_end);
2141: IF PG_DEBUG in ('Y', 'C') THEN
2142: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_end: '||l_end);
2143: END IF;
2144: END LOOP;
2145:
2146: j := l_end;

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

2150: IF l_start <= l_atp_rec.action.count THEN
2151: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
2152: END IF;
2153: IF PG_DEBUG in ('Y', 'C') THEN
2154: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2155: END IF;
2156:
2157: WHEN OTHERS THEN
2158: IF PG_DEBUG in ('Y', 'C') THEN

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

2155: END IF;
2156:
2157: WHEN OTHERS THEN
2158: IF PG_DEBUG in ('Y', 'C') THEN
2159: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2160: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2161: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2162: END IF;
2163: /* Check if this is actually coming from a calendar routine*/

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

2156:
2157: WHEN OTHERS THEN
2158: IF PG_DEBUG in ('Y', 'C') THEN
2159: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2160: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2161: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2162: END IF;
2163: /* Check if this is actually coming from a calendar routine*/
2164: l_encoded_text := fnd_message.GET_ENCODED;

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

2157: WHEN OTHERS THEN
2158: IF PG_DEBUG in ('Y', 'C') THEN
2159: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || ' NO_MATCHING_DATE_IN_CAL');
2160: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2161: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'j: '||j);
2162: END IF;
2163: /* Check if this is actually coming from a calendar routine*/
2164: l_encoded_text := fnd_message.GET_ENCODED;
2165: IF l_encoded_text IS NULL THEN

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

2182: IF (x_atp_rec.error_code(l_end) IS NULL) or (x_atp_rec.error_code(l_end) IN (0,61,150)) THEN
2183: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
2184: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.NO_MATCHING_CAL_DATE;
2185: IF PG_DEBUG in ('Y', 'C') THEN
2186: msc_sch_wb.atp_debug('Call_ATP_No_Commit: NO_MATCHING_CAL_DATE');
2187: END IF;
2188: ELSE
2189: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error
2190: IF PG_DEBUG in ('Y', 'C') THEN

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

2187: END IF;
2188: ELSE
2189: x_atp_rec.error_code(l_end) := MSC_ATP_PVT.ATP_PROCESSING_ERROR; -- ATP Processing Error
2190: IF PG_DEBUG in ('Y', 'C') THEN
2191: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ATP_PROCESSING_ERROR');
2192: END IF;
2193: END IF;
2194: END IF;
2195: l_end := l_atp_rec.inventory_item_id.next(l_end);

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

2202: IF l_start <= l_atp_rec.action.count THEN
2203: MSC_ATP_PROC.Initialize_Set_Processing(l_atp_rec, l_start);
2204: END IF;
2205: IF PG_DEBUG in ('Y', 'C') THEN
2206: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_start: '||l_start);
2207: END IF;
2208:
2209: END; --bug3583705 end
2210:

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

2219: DELETE msc_regions_temp
2220: WHERE session_id = p_session_id;
2221:
2222: IF PG_DEBUG in ('Y', 'C') THEN
2223: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Rows deleted from msc_regions_temp : '||sql%rowcount);
2224: END IF;
2225:
2226: --bug3940999 Delete temp records before exiting
2227: DELETE msc_atp_src_profile_temp

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

2227: DELETE msc_atp_src_profile_temp
2228: WHERE session_id = p_session_id;
2229:
2230: IF PG_DEBUG in ('Y', 'C') THEN
2231: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Rows deleted from msc_atp_src_profile_temp : '||sql%rowcount);
2232: END IF;
2233:
2234: -- No ATP needed as No ATPable item or CTO model in the ATP request from source.
2235:

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

2234: -- No ATP needed as No ATPable item or CTO model in the ATP request from source.
2235:
2236: -- Bug 2280196 Base Bug 2262291 Added by : krajan
2237: IF PG_DEBUG in ('Y', 'C') THEN
2238: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Put into temp table for MSCBALWB');
2239: END IF;
2240: MSC_ATP_UTILS.put_into_temp_table(
2241: NULL,
2242: p_session_id,

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

2271: -- krajan : 2748041
2272: -- If it is an ATO delete case,then call the POST ATP CTO procedure
2273: if (NVL(G_CTO_FLAG, -1) = 2 ) then
2274: IF PG_DEBUG in ('Y', 'C') THEN
2275: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'ATO Delete Flag Case - setting G_CTO_FLAG to 3');
2276: END IF;
2277: G_CTO_FLAG := 3;
2278: end if;
2279:

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

2332: x_atp_period,
2333: x_atp_details);
2334: ---custom_api chnages: Call customer API for calculating arrival datea
2335: IF PG_DEBUG in ('Y', 'C') THEN
2336: msc_sch_wb.atp_debug('Before calling Custom_Post_ATP_API');
2337: END IF;
2338: MSC_ATP_CUSTOM.Custom_Post_ATP_API(l_atp_rec_temp,
2339: l_custom_atp_rec,
2340: l_modify_flag,

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

2339: l_custom_atp_rec,
2340: l_modify_flag,
2341: l_custom_ret_sts);
2342: IF PG_DEBUG in ('Y', 'C') THEN
2343: msc_sch_wb.atp_debug('After calling Custom_Post_ATP_API');
2344: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2345: END IF;
2346:
2347: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0

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

2340: l_modify_flag,
2341: l_custom_ret_sts);
2342: IF PG_DEBUG in ('Y', 'C') THEN
2343: msc_sch_wb.atp_debug('After calling Custom_Post_ATP_API');
2344: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2345: END IF;
2346:
2347: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0
2348: and l_custom_ret_sts = FND_API.G_RET_STS_SUCCESS THEN

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

2346:
2347: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0
2348: and l_custom_ret_sts = FND_API.G_RET_STS_SUCCESS THEN
2349:
2350: msc_sch_wb.atp_debug('Assign Custom rec to ATP output rec');
2351: l_atp_rec_temp := l_custom_atp_rec;
2352:
2353: END IF;
2354:

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

2407: x_msg_data,
2408: x_msg_count);
2409:
2410: IF PG_DEBUG in ('Y', 'C') THEN
2411: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'instance_id = '||l_instance_id);
2412: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before remote procedure call');
2413: END IF;
2414: e_cto_reach */
2415:

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

2408: x_msg_count);
2409:
2410: IF PG_DEBUG in ('Y', 'C') THEN
2411: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'instance_id = '||l_instance_id);
2412: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before remote procedure call');
2413: END IF;
2414: e_cto_reach */
2415:
2416: --bug3520746

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

2420: from gv$instance;
2421: IF l_rac_count > 1 then
2422: l_node_id := userenv('INSTANCE');
2423: IF PG_DEBUG in ('Y', 'C') THEN
2424: msc_sch_wb.atp_debug('RAC Instance id is:' || l_node_id);
2425: END IF;
2426: ELSE
2427: l_node_id := null;
2428: END IF;

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

2430: WHEN OTHERS THEN
2431: l_node_id := null;
2432: END;
2433: IF PG_DEBUG in ('Y', 'C') THEN
2434: msc_sch_wb.atp_debug('node id is:' || l_node_id);
2435: END IF;
2436:
2437: --bug3520746 pass the node to the remote call in case of RAC
2438: /* added inv_ctp, default assignment set in procedure call for bug 2368426 starts */

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

2453: :node_id
2454: ); END;';
2455:
2456: IF PG_DEBUG in ('Y', 'C') THEN
2457: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2458: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2459: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2460: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);

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

2454: ); END;';
2455:
2456: IF PG_DEBUG in ('Y', 'C') THEN
2457: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2458: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2459: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2460: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);

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

2455:
2456: IF PG_DEBUG in ('Y', 'C') THEN
2457: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2458: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2459: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2460: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2463: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));

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

2456: IF PG_DEBUG in ('Y', 'C') THEN
2457: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2458: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2459: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2460: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2463: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2464: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);

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

2457: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block' || plsql_block);
2458: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2459: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2460: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2463: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2464: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);
2465: END IF;

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

2458: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'p_session_id ' || p_session_id);
2459: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2460: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2463: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2464: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);
2465: END IF;
2466:

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

2459: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_instance_id ' || l_instance_id);
2460: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2463: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2464: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);
2465: END IF;
2466:
2467: EXECUTE IMMEDIATE plsql_block USING

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

2460: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_assign_set_id ' || l_assign_set_id);
2461: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_refresh_number ' || l_refresh_number);
2462: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_def_assign_set_id ' || l_def_assign_set_id);
2463: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'MSC_ATP_DEBUG ' || FND_PROFILE.value('MSC_ATP_DEBUG'));
2464: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'l_node_id ' || l_node_id);
2465: END IF;
2466:
2467: EXECUTE IMMEDIATE plsql_block USING
2468: p_session_id,

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

2501: l_details_flag);
2502:
2503: ---custom_api changes: Call customer API for calculating arrival datea
2504: IF PG_DEBUG in ('Y', 'C') THEN
2505: msc_sch_wb.atp_debug('Before calling Custom_Post_ATP_API');
2506: END IF;
2507: MSC_ATP_CUSTOM.Custom_Post_ATP_API(l_atp_rec_temp,
2508: l_custom_atp_rec,
2509: l_modify_flag,

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

2509: l_modify_flag,
2510: l_custom_ret_sts);
2511:
2512: IF PG_DEBUG in ('Y', 'C') THEN
2513: msc_sch_wb.atp_debug('after calling Custom_Post_ATP_API');
2514: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2515: msc_sch_wb.atp_debug('l_modify_flag := ' || l_modify_flag);
2516: END IF;
2517:

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

2510: l_custom_ret_sts);
2511:
2512: IF PG_DEBUG in ('Y', 'C') THEN
2513: msc_sch_wb.atp_debug('after calling Custom_Post_ATP_API');
2514: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2515: msc_sch_wb.atp_debug('l_modify_flag := ' || l_modify_flag);
2516: END IF;
2517:
2518: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0

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

2511:
2512: IF PG_DEBUG in ('Y', 'C') THEN
2513: msc_sch_wb.atp_debug('after calling Custom_Post_ATP_API');
2514: msc_sch_wb.atp_debug('l_custom_ret_sts := ' || l_custom_ret_sts);
2515: msc_sch_wb.atp_debug('l_modify_flag := ' || l_modify_flag);
2516: END IF;
2517:
2518: IF l_modify_flag = 1 and l_custom_atp_rec.inventory_item_id.count > 0
2519: and l_custom_ret_sts = FND_API.G_RET_STS_SUCCESS THEN

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

2528:
2529: -- Debug message added for bug 2368426
2530: IF l_atp_rec_temp.error_code(1) = 230 THEN
2531: IF PG_DEBUG in ('Y', 'C') THEN
2532: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'INV_CTP profile not in sync with destination');
2533: END IF;
2534: END IF;
2535:
2536: END IF;

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

2538: x_atp_rec := l_atp_rec_temp;
2539:
2540: -- 2688113 : krajan : Copy ato_delete_flag
2541: IF PG_DEBUG in ('Y', 'C') THEN
2542: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Extending ATO_Delete Flag');
2543: END IF;
2544: x_atp_rec.ato_delete_flag := p_atp_rec.ato_delete_flag;
2545:
2546: IF G_INV_CTP = 4 THEN

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

2547: --call substitution workflow
2548: IF x_atp_rec.action(1) <> 100 and x_atp_rec.calling_module(i) = 660 THEN
2549: l_wf_profile := NVL(fnd_profile.value('MSC_ALLOCATED_ATP_WORKFLOW'), 'N');
2550: IF PG_DEBUG in ('Y', 'C') THEN
2551: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'WF Profile:' || l_wf_profile);
2552: END IF;
2553: IF l_wf_profile = 'Y' THEN
2554: Subst_workflow(x_atp_rec);
2555: END IF;

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

2556: END IF;
2557: END IF;
2558:
2559: IF PG_DEBUG in ('Y', 'C') THEN
2560: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'x_return_status : '||x_return_status);
2561: END IF;
2562:
2563: -- Added by ngoel 10/18/2000. This procedure is called if there
2564: -- was a CTO model included in the request and either BOM was supplied

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

2569: -- OM and Configurator.
2570:
2571: i := x_atp_rec.Action.FIRST;
2572: IF PG_DEBUG in ('Y', 'C') THEN
2573: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before x_atp_rec.Action: '||x_atp_rec.Action(i));
2574: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before l_atp_rec_temp.Error_Code: '||i||':'||
2575: l_atp_rec_temp.Error_Code(i));
2576: END IF;
2577:

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

2570:
2571: i := x_atp_rec.Action.FIRST;
2572: IF PG_DEBUG in ('Y', 'C') THEN
2573: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before x_atp_rec.Action: '||x_atp_rec.Action(i));
2574: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'before l_atp_rec_temp.Error_Code: '||i||':'||
2575: l_atp_rec_temp.Error_Code(i));
2576: END IF;
2577:
2578:

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

2581: --Collection Enhancement changes start
2582: IF ((G_INV_CTP = 4) AND ( NVL (p_atp_rec.action(p_atp_rec.calling_module.FIRST), -99) in (110,120) ))THEN
2583: -- need to do this only for PDS cases
2584: IF PG_DEBUG in ('Y', 'C') THEN
2585: msc_sch_wb.atp_debug('Call_ATP_No_Commit: --Now processing refresh numbers--');
2586: msc_sch_wb.atp_debug('Call_ATP_No_Commit: First check if this is required because of summary');
2587: END IF;
2588: -- check if summary is enabled
2589: -- Bug 3762695: Use source side profile value for 'MSC: Enable ATP Summary mode'

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

2582: IF ((G_INV_CTP = 4) AND ( NVL (p_atp_rec.action(p_atp_rec.calling_module.FIRST), -99) in (110,120) ))THEN
2583: -- need to do this only for PDS cases
2584: IF PG_DEBUG in ('Y', 'C') THEN
2585: msc_sch_wb.atp_debug('Call_ATP_No_Commit: --Now processing refresh numbers--');
2586: msc_sch_wb.atp_debug('Call_ATP_No_Commit: First check if this is required because of summary');
2587: END IF;
2588: -- check if summary is enabled
2589: -- Bug 3762695: Use source side profile value for 'MSC: Enable ATP Summary mode'
2590: l_summary_flag := 'N';

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

2600: EXCEPTION
2601: When Others then
2602: l_summary_flag := 'N';
2603: IF PG_DEBUG in ('Y', 'C') THEN
2604: msc_sch_wb.atp_debug('Inside exception');
2605: END IF;
2606: END;
2607: END IF;
2608:

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

2616: FROM mrp_ap_apps_instances;
2617: END IF;
2618:
2619: IF PG_DEBUG in ('Y', 'C') THEN
2620: msc_sch_wb.atp_debug('l_end_refresh_number ' || l_end_refresh_number);
2621: msc_sch_wb.atp_debug('l_summary_flag ' || l_summary_flag );
2622: END IF;
2623:
2624: IF (l_a2m_dblink IS NOT NULL) THEN

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

2617: END IF;
2618:
2619: IF PG_DEBUG in ('Y', 'C') THEN
2620: msc_sch_wb.atp_debug('l_end_refresh_number ' || l_end_refresh_number);
2621: msc_sch_wb.atp_debug('l_summary_flag ' || l_summary_flag );
2622: END IF;
2623:
2624: IF (l_a2m_dblink IS NOT NULL) THEN
2625: plsql_block := 'BEGIN MSC_ATP_PUB.UPDATE_TABLES'

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

2629: :p_refresh_number,
2630: :p_session_id);
2631: END;';
2632: IF PG_DEBUG in ('Y', 'C') THEN
2633: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'plsql_block ' || plsql_block);
2634: END IF;
2635: EXECUTE IMMEDIATE plsql_block USING
2636: l_summary_flag,
2637: l_end_refresh_number,

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

2663: --bug3520746 Delete temp records before exiting
2664: delete from msc_regions_temp where session_id = p_session_id;
2665:
2666: IF PG_DEBUG in ('Y', 'C') THEN
2667: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);
2668: END IF;
2669:
2670: --bug3940999 Delete temp records before exiting
2671: delete from msc_atp_src_profile_temp where session_id = p_session_id;

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

2670: --bug3940999 Delete temp records before exiting
2671: delete from msc_atp_src_profile_temp where session_id = p_session_id;
2672:
2673: IF PG_DEBUG in ('Y', 'C') THEN
2674: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);
2675: msc_sch_wb.atp_debug('End Call_ATP_No_Commit');
2676: END IF;
2677:
2678: IF G_CALL_ATP = 2 THEN --4421391

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

2671: delete from msc_atp_src_profile_temp where session_id = p_session_id;
2672:
2673: IF PG_DEBUG in ('Y', 'C') THEN
2674: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);
2675: msc_sch_wb.atp_debug('End Call_ATP_No_Commit');
2676: END IF;
2677:
2678: IF G_CALL_ATP = 2 THEN --4421391
2679: IF order_sch_wb.mr_debug in ('T','C') THEN

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

2686:
2687: EXCEPTION
2688: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
2689: IF PG_DEBUG in ('Y', 'C') THEN
2690: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2691: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Invalid Objects found');
2692: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2693: END IF;
2694: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);

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

2687: EXCEPTION
2688: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
2689: IF PG_DEBUG in ('Y', 'C') THEN
2690: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2691: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Invalid Objects found');
2692: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2693: END IF;
2694: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2695: IF PG_DEBUG in ('Y', 'C') THEN

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

2688: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
2689: IF PG_DEBUG in ('Y', 'C') THEN
2690: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2691: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Invalid Objects found');
2692: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2693: END IF;
2694: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2695: IF PG_DEBUG in ('Y', 'C') THEN
2696: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);

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

2692: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2693: END IF;
2694: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2695: IF PG_DEBUG in ('Y', 'C') THEN
2696: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2697: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2698: END IF;
2699:
2700: --ATP Debug Workflow, atp debug changes.

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

2693: END IF;
2694: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2695: IF PG_DEBUG in ('Y', 'C') THEN
2696: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2697: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2698: END IF;
2699:
2700: --ATP Debug Workflow, atp debug changes.
2701:

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

2711: ROLLBACK TO SAVEPOINT start_of_call_atp_no_commit;
2712: EXCEPTION
2713: WHEN OTHERS THEN
2714: IF PG_DEBUG in ('Y', 'C') THEN
2715: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2716: END IF;
2717: IF (sqlcode = -1086) THEN
2718: null;
2719: END IF;

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

2733:
2734: --bug3520746 Delete temp records before exiting
2735: delete from msc_regions_temp where session_id = p_session_id;
2736: IF PG_DEBUG in ('Y', 'C') THEN
2737: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);
2738: END IF;
2739:
2740: --bug3940999 Delete temp records before exiting
2741: delete from msc_atp_src_profile_temp where session_id = p_session_id;

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

2739:
2740: --bug3940999 Delete temp records before exiting
2741: delete from msc_atp_src_profile_temp where session_id = p_session_id;
2742: IF PG_DEBUG in ('Y', 'C') THEN
2743: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);
2744: END IF;
2745:
2746: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
2747: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME , 'Call_ATP_No_Commit');

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

2777:
2778: WHEN others THEN
2779: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2780: IF PG_DEBUG in ('Y', 'C') THEN
2781: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2782: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2783: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2784: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2785: END IF;

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

2778: WHEN others THEN
2779: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2780: IF PG_DEBUG in ('Y', 'C') THEN
2781: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2782: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2783: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2784: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2785: END IF;
2786:

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

2779: x_return_status := NVL(x_return_status, FND_API.G_RET_STS_ERROR);
2780: IF PG_DEBUG in ('Y', 'C') THEN
2781: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2782: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2783: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2784: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2785: END IF;
2786:
2787: --bug3520746 Delete temp records before exiting

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

2780: IF PG_DEBUG in ('Y', 'C') THEN
2781: msc_sch_wb.atp_debug('Error in Call_ATP_No_Commit :'||sqlcode);
2782: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2783: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'shipset count ' ||p_atp_rec.error_code.count);
2784: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || 'Exception x_return_status : '||x_return_status);
2785: END IF;
2786:
2787: --bug3520746 Delete temp records before exiting
2788: delete from msc_regions_temp where session_id = p_session_id;

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

2786:
2787: --bug3520746 Delete temp records before exiting
2788: delete from msc_regions_temp where session_id = p_session_id;
2789: IF PG_DEBUG in ('Y', 'C') THEN
2790: msc_sch_wb.atp_debug('Rows deleted from msc_regions_temp:'|| sql%rowcount);
2791: END IF;
2792:
2793: --bug3940999 Delete temp records before exiting
2794: delete from msc_atp_src_profile_temp where session_id = p_session_id;

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

2792:
2793: --bug3940999 Delete temp records before exiting
2794: delete from msc_atp_src_profile_temp where session_id = p_session_id;
2795: IF PG_DEBUG in ('Y', 'C') THEN
2796: msc_sch_wb.atp_debug('Rows deleted from msc_atp_src_profile_temp:'|| sql%rowcount);
2797: END IF;
2798:
2799: --ATP Debug Workflow, atp debug changes.
2800:

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

2810: ROLLBACK TO SAVEPOINT start_of_call_atp_no_commit;
2811: EXCEPTION
2812: WHEN OTHERS THEN
2813: IF PG_DEBUG in ('Y', 'C') THEN
2814: msc_sch_wb.atp_debug('Call_ATP_No_Commit: ' || sqlerrm);
2815: END IF;
2816: IF (sqlcode = -1086) THEN
2817: null;
2818: END IF;

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

2881: l_identifier3 MRP_ATP_PUB.number_arr := MRP_ATP_PUB.number_arr();
2882:
2883: BEGIN
2884: IF PG_DEBUG in ('Y', 'C') THEN
2885: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2886: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2887: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2888: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2889: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);

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

2882:
2883: BEGIN
2884: IF PG_DEBUG in ('Y', 'C') THEN
2885: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2886: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2887: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2888: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2889: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);
2890:

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

2883: BEGIN
2884: IF PG_DEBUG in ('Y', 'C') THEN
2885: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2886: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2887: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2888: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2889: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);
2890:
2891: END IF;

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

2884: IF PG_DEBUG in ('Y', 'C') THEN
2885: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2886: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2887: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2888: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2889: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);
2890:
2891: END IF;
2892: IF p_summary_flag = 'Y' THEN

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

2885: msc_sch_wb.atp_debug('Inside Procedure UPDATE_TABLES');
2886: msc_sch_wb.atp_debug('UPDATE_TABLES : p_end_refresh_number ' || p_end_refresh_number);
2887: msc_sch_wb.atp_debug('UPDATE_TABLES : p_refresh_number ' || p_refresh_number);
2888: msc_sch_wb.atp_debug('UPDATE_TABLES : p_summary_flag ' || p_summary_flag);
2889: msc_sch_wb.atp_debug('UPDATE_TABLES : p_session_id ' || p_session_id);
2890:
2891: END IF;
2892: IF p_summary_flag = 'Y' THEN
2893: -- Summary is enabled in destination and at least one line did not result in PDS-ODS switch

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

2918: and madt.identifier3 is not NULL
2919: and madt.identifier1 is not NULL;
2920:
2921: IF PG_DEBUG in ('Y', 'C') THEN
2922: msc_sch_wb.atp_debug('No of rows selected ' || SQL%ROWCOUNT );
2923: END IF;
2924:
2925: IF l_end_refresh_number > p_refresh_number THEN
2926: -- need to bump up all records

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

2924:
2925: IF l_end_refresh_number > p_refresh_number THEN
2926: -- need to bump up all records
2927: IF PG_DEBUG in ('Y', 'C') THEN
2928: msc_sch_wb.atp_debug('Update 5 tables');
2929: END IF;
2930:
2931: -- Bug 3517529: anbansal
2932: -- Used identifier1, identifier2 and identifier3 from pegging records to have additional check on

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

2948: and identifier3 is not NULL
2949: and identifier1 is not NULL;
2950:
2951: IF PG_DEBUG in ('Y', 'C') THEN
2952: msc_sch_wb.atp_debug('No of rows selected by BULK SELECT ' || SQL%ROWCOUNT );
2953: END IF;
2954:
2955: FORALL i in 1..l_identifier1.COUNT
2956: update msc_demands

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

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

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

2972: and transaction_id = l_identifier3(i)
2973: and sr_instance_id = l_identifier1(i);
2974:
2975: IF PG_DEBUG in ('Y', 'C') THEN
2976: msc_sch_wb.atp_debug('No of rows updated: msc_supplies ' || SQL%ROWCOUNT );
2977: END IF;
2978:
2979: FORALL i in 1..l_identifier1.COUNT
2980: update msc_resource_requirements

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

2984: and transaction_id = l_identifier3(i)
2985: and sr_instance_id = l_identifier1(i);
2986:
2987: IF PG_DEBUG in ('Y', 'C') THEN
2988: msc_sch_wb.atp_debug('No of rows updated: msc_resource_requirements ' || SQL%ROWCOUNT );
2989: END IF;
2990:
2991: FORALL i in 1..l_identifier1.COUNT
2992: update msc_alloc_demands

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

2996: and parent_demand_id = l_identifier3(i)
2997: and sr_instance_id = l_identifier1(i);
2998:
2999: IF PG_DEBUG in ('Y', 'C') THEN
3000: msc_sch_wb.atp_debug('No of rows updated: msc_alloc_demands ' || SQL%ROWCOUNT );
3001: END IF;
3002:
3003: FORALL i in 1..l_identifier1.COUNT
3004: update msc_alloc_supplies

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

3008: and parent_transaction_id = l_identifier3(i)
3009: and sr_instance_id = l_identifier1(i);
3010:
3011: IF PG_DEBUG in ('Y', 'C') THEN
3012: msc_sch_wb.atp_debug('No of rows updated: msc_alloc_supplies ' || SQL%ROWCOUNT );
3013: END IF;
3014:
3015: ELSE
3016: l_end_refresh_number := null;

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

3019: END IF;
3020:
3021: IF (l_end_refresh_number is null) THEN
3022: IF PG_DEBUG in ('Y', 'C') THEN
3023: msc_sch_wb.atp_debug('Need to bump refresh number up for 24X7');
3024: END IF;
3025:
3026: -- Changed for the testing of Bug 3517529, But missed to remove it
3027: -- Changing back to the correct condition.

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

3027: -- Changing back to the correct condition.
3028: -- IF p_refresh_number < (p_refresh_number + 1) THEN
3029: IF p_refresh_number < p_end_refresh_number THEN
3030: IF PG_DEBUG in ('Y', 'C') THEN
3031: msc_sch_wb.atp_debug('Update 1 Table');
3032: END IF;
3033:
3034: update msc_demands
3035: set refresh_number = p_end_refresh_number

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

3050: and identifier1 is not NULL
3051: );
3052:
3053: IF PG_DEBUG in ('Y', 'C') THEN
3054: msc_sch_wb.atp_debug('No of rows updated: msc_demands ' || SQL%ROWCOUNT );
3055: END IF;
3056: END IF;
3057: END IF;
3058: END UPDATE_TABLES;