DBA Data[Home] [Help]

APPS.MSC_ATP_24X7 dependencies on FND_API

Line 156: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then

152: l_new_plan_id,
153: l_return_status,
154: ERRBUF);
155:
156: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
157: RETCODE := G_TFS_ERRCODE;
158: ERRBUF := G_TFS_ERROR;
159: end if;
160:

Line 212: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then

208: Update_Summary_Flag ( p_new_plan_id,
209: G_SF_SYNC_RUNNING,
210: l_return_status);
211:
212: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
213: conc_log (' Cannot update ATP Summary status flag.');
214: ATP_Sync_Error(p_old_plan_id, p_new_plan_id);
215: G_TFS_ERROR := 'Unable to update Plan Information';
216: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;

Line 250: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

246: exception
247: when others then
248: conc_log ('Unable to get a sequence number for ATP Call');
249: conc_log ('Error is : ' || sqlerrm);
250: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
251: end;
252:
253: conc_log ('Getting Records based on refresh number with session_id : ' || l_session_id);
254:

Line 273: if (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) then

269:
270: -- Copy demand IDs
271: l_demand_id_arr := l_atp_rec.attribute_03;
272:
273: if (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) then
274: ATP_Sync_Error (p_old_plan_id, p_new_plan_id);
275: G_TFS_ERROR := 'Unable to get records for synchronization';
276: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
277:

Line 282: if (l_return_status = FND_API.G_RET_STS_ERROR) or (l_record_count <= 0) then

278: commit;
279: return;
280: end if;
281:
282: if (l_return_status = FND_API.G_RET_STS_ERROR) or (l_record_count <= 0) then
283: l_to_call_ATP := 0;
284: end if;
285:
286: if (l_record_count <= G_TF7_SO_THRESHOLD) and l_sync_done = 0 then

Line 300: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

296: exception
297: when others then
298: conc_log ('Unable to access timer');
299: conc_log ('Error is: ' || sqlerrm);
300: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
301: end;
302:
303: -- Signal ATP Downtime
304: ATP_Downtime_Init (p_old_plan_id, p_new_plan_id, l_return_status);

Line 306: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then

302:
303: -- Signal ATP Downtime
304: ATP_Downtime_Init (p_old_plan_id, p_new_plan_id, l_return_status);
305:
306: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
307: conc_log ('Something wrong in call to ATP Downtime Init');
308: -- Rollback changes made by ATP downtim INIt
309: rollback;
310: G_TFS_ERROR := 'Unable to Initiate ATP Downtime';

Line 331: if (l_return_status <> FND_API.G_RET_STS_SUCCESS ) then

327: l_total_time,
328: l_return_status
329: );
330:
331: if (l_return_status <> FND_API.G_RET_STS_SUCCESS ) then
332: ROLLBACK;
333: G_TFS_ERROR := 'Call to ATP API for Synchronization failed';
334: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
335: ATP_Sync_Error (p_old_plan_id, p_new_plan_id);

Line 354: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then

350: p_old_plan_id,
351: l_return_status
352: );
353:
354: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
355: conc_log ('Unable to update sync flag ');
356: ROLLBACK;
357: G_TFS_ERROR := 'Unable to update Plan Information';
358: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;

Line 383: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

379: exception
380: when others then
381: conc_log ('Unable to access timer');
382: conc_log ('Error is: ' || sqlerrm);
383: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
384: end;
385:
386: l_downtime_total := (l_downtime_end - l_downtime_start ) / 60;
387: conc_log (' ');

Line 442: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

438: exception
439: when others then
440: conc_log ('Unable to get a sequence number for ATP Call');
441: conc_log ('Error is : ' || sqlerrm);
442: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
443: end;
444:
445: conc_log ('Getting Records based on refresh number with session_id : ' || l_session_id);
446:

Line 462: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) or (l_record_count <= 0) then

458: );
459:
460: conc_log ('Number of records : ' || l_record_count);
461:
462: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) or (l_record_count <= 0) then
463: conc_log ('Nothing to synchronize');
464: l_to_call_ATP := 0;
465: end if;
466:

Line 478: if (l_return_status <> FND_API.G_RET_STS_SUCCESS ) then

474: l_total_time,
475: l_return_status
476: );
477:
478: if (l_return_status <> FND_API.G_RET_STS_SUCCESS ) then
479: ROLLBACK;
480: conc_log ('Something wrong in call to ATP');
481: conc_log ('Stray records do exist, and may not be synchronized');
482: G_TFS_ERROR := 'Error in call to ATP API for Extended Synchronization';

Line 493: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then

489: p_old_plan_id,
490: l_return_status
491: );
492:
493: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
494: conc_log ('Unable to update sync flag ');
495: -- Commit whatever we have done so far
496: end if;
497:

Line 513: x_return_status := FND_API.G_RET_STS_ERROR;

509: conc_log ('Error is : ' || sqlerrm);
510:
511: G_TFS_ERROR := sqlerrm;
512: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
513: x_return_status := FND_API.G_RET_STS_ERROR;
514:
515: END ATP_SYNCHRONIZE;
516:
517: ---------------------------------------------------------------------------------

Line 549: x_return_status := FND_API.G_RET_STS_SUCCESS;

545:
546: Print_Input_Rec (p_atp_table);
547:
548: -- Initialize
549: x_return_status := FND_API.G_RET_STS_SUCCESS;
550:
551: -- CTO Re-arch changes, changed session_id to an IN param, as it will now be retrieved in ATP_Synchronize
552: /*
553: x_session_id := -1;

Line 565: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

561: exception
562: when others then
563: conc_log ('Unable to get a sequence number for ATP Call');
564: conc_log ('Error is : ' || sqlerrm);
565: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
566: end;
567: x_session_id := l_session_id;
568: conc_log (' Session ID for ATP Call : ' || x_session_id);
569:

Line 583: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

579: exception
580: when others then
581: conc_log ('Unable to access timer');
582: conc_log ('Error is: ' || sqlerrm);
583: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
584: end;
585:
586: l_refresh_number := p_atp_table.attribute_04(1);
587: l_instance_id := NULL;

Line 610: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

606: l_atp_details -- atp details
607: );
608: conc_log ('After calling schedule: l_return_status : ' || l_return_status);
609:
610: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
611: conc_log ('Error in call to Call_Schedule');
612: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
613: END IF;
614:

Line 612: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

608: conc_log ('After calling schedule: l_return_status : ' || l_return_status);
609:
610: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
611: conc_log ('Error in call to Call_Schedule');
612: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
613: END IF;
614:
615: exception
616: when MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND then

Line 620: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

616: when MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND then
617: conc_log ('Invalid Objects found in call to Call_Schedule');
618: conc_log ('Return Status : ' || l_return_status);
619: conc_log ('Error Message : ' || sqlerrm);
620: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
621: when others then
622: conc_log ('Exception in call to Call_Schedule');
623: conc_log ('Return Status : ' || l_return_status);
624: conc_log ('Error Message : ' || sqlerrm);

Line 625: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

621: when others then
622: conc_log ('Exception in call to Call_Schedule');
623: conc_log ('Return Status : ' || l_return_status);
624: conc_log ('Error Message : ' || sqlerrm);
625: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
626: end;
627:
628:
629: -- Get End Time

Line 638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

634: exception
635: when others then
636: conc_log ('Unable to access timer');
637: conc_log ('Error is: ' || sqlerrm);
638: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
639: end;
640:
641: -- Calculate Total Time
642: x_total_time := l_timer_end - l_timer_start;

Line 652: when FND_API.G_EXC_UNEXPECTED_ERROR then

648: conc_debug ('Total time taken for this ATP call : ' || x_total_time);
649:
650:
651: EXCEPTION
652: when FND_API.G_EXC_UNEXPECTED_ERROR then
653: conc_log ('Unexpected Error. Sync Call To ATP failed');
654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
655:
656: when FND_API.G_EXC_ERROR then

Line 654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

650:
651: EXCEPTION
652: when FND_API.G_EXC_UNEXPECTED_ERROR then
653: conc_log ('Unexpected Error. Sync Call To ATP failed');
654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
655:
656: when FND_API.G_EXC_ERROR then
657: conc_log ('Expected Error. Sync Call To ATP failed');
658: x_return_status := FND_API.G_RET_STS_ERROR;

Line 656: when FND_API.G_EXC_ERROR then

652: when FND_API.G_EXC_UNEXPECTED_ERROR then
653: conc_log ('Unexpected Error. Sync Call To ATP failed');
654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
655:
656: when FND_API.G_EXC_ERROR then
657: conc_log ('Expected Error. Sync Call To ATP failed');
658: x_return_status := FND_API.G_RET_STS_ERROR;
659:
660: when others then

Line 658: x_return_status := FND_API.G_RET_STS_ERROR;

654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
655:
656: when FND_API.G_EXC_ERROR then
657: conc_log ('Expected Error. Sync Call To ATP failed');
658: x_return_status := FND_API.G_RET_STS_ERROR;
659:
660: when others then
661: conc_log ('Exception Others. Sync Call To ATP failed');
662: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 662: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

658: x_return_status := FND_API.G_RET_STS_ERROR;
659:
660: when others then
661: conc_log ('Exception Others. Sync Call To ATP failed');
662: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
663:
664: END Synchronize_Call_To_ATP;
665:
666: ---------------------------------------------------------------------------------

Line 684: x_return_status := FND_API.G_RET_STS_SUCCESS;

680: ) IS
681: BEGIN
682:
683: conc_debug ('------------------Get_Records_Pre_Collections------------------');
684: x_return_status := FND_API.G_RET_STS_SUCCESS;
685: x_record_count := 0;
686:
687: BEGIN
688: select

Line 882: if x_return_status <> FND_API.G_RET_STS_SUCCESS then

878: -- new attributes added for CTO re-arch project.
879:
880: --extend_atp_rec_typ (x_atp_rec, x_record_count);
881: MSC_SATP_FUNC.New_Extend_Atp(x_atp_rec, x_record_count, x_return_status);
882: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
883: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
884: end if;
885: end if;
886:

Line 883: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

879:
880: --extend_atp_rec_typ (x_atp_rec, x_record_count);
881: MSC_SATP_FUNC.New_Extend_Atp(x_atp_rec, x_record_count, x_return_status);
882: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
883: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
884: end if;
885: end if;
886:
887: conc_debug ('Records obtained in query : ' || x_record_count);

Line 896: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

892: conc_debug ('Get Records Pre Coll: No data found ');
893: when OTHERS then
894: conc_log ('Get_Records_Pre_Coll: Error while getting records from old plan');
895: conc_log ('Error Is : ' || sqlerrm);
896: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
897: G_TFS_ERROR := sqlerrm;
898: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
899:
900: END;

Line 923: x_return_status := FND_API.G_RET_STS_SUCCESS;

919: BEGIN
920:
921: conc_debug ('-----------------Get_Records_Post_Collections -----------------');
922: -- Initialize Return Variables
923: x_return_status := FND_API.G_RET_STS_SUCCESS;
924: x_record_count := 0;
925:
926: -- Main query
927: BEGIN

Line 1103: if x_return_status <> FND_API.G_RET_STS_SUCCESS then

1099: -- new attributes added for CTO re-arch project.
1100:
1101: --extend_atp_rec_typ (x_atp_rec, x_record_count);
1102: MSC_SATP_FUNC.New_Extend_Atp(x_atp_rec, x_record_count, x_return_status);
1103: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
1104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1105: end if;
1106: elsif (x_record_count = 0) then
1107: -- No need to progress further if count = 0

Line 1104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1100:
1101: --extend_atp_rec_typ (x_atp_rec, x_record_count);
1102: MSC_SATP_FUNC.New_Extend_Atp(x_atp_rec, x_record_count, x_return_status);
1103: if x_return_status <> FND_API.G_RET_STS_SUCCESS then
1104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1105: end if;
1106: elsif (x_record_count = 0) then
1107: -- No need to progress further if count = 0
1108: RETURN;

Line 1223: x_return_status := FND_API.G_RET_STS_ERROR;

1219: conc_debug ('---------------------------------------------------------');
1220: EXCEPTION
1221: when NO_DATA_FOUND then
1222: conc_debug ('Get Records Post Coll: No data found ');
1223: x_return_status := FND_API.G_RET_STS_ERROR;
1224: when OTHERS then
1225: conc_log ('Get_Records_Post_Coll: Error while getting records from old plan');
1226: conc_log ('Error Is : ' || sqlerrm);
1227: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1227: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1223: x_return_status := FND_API.G_RET_STS_ERROR;
1224: when OTHERS then
1225: conc_log ('Get_Records_Post_Coll: Error while getting records from old plan');
1226: conc_log ('Error Is : ' || sqlerrm);
1227: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1228: G_TFS_ERROR := sqlerrm;
1229: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
1230:
1231: END;

Line 1249: x_return_status := FND_API.G_RET_STS_SUCCESS;

1245: BEGIN
1246: conc_debug ('----Update Sync Flag ----');
1247: conc_debug (' Total Records : ' || p_atp_table.calling_module.count);
1248:
1249: x_return_status := FND_API.G_RET_STS_SUCCESS;
1250:
1251:
1252: conc_debug ('Updating Data at :' || l_sysdate);
1253:

Line 1295: x_return_status := FND_API.G_RET_STS_ERROR;

1291: EXCEPTION
1292: when OTHERS then
1293: conc_log ('Error in Update Sync Flag');
1294: conc_log ('Error is : ' || sqlerrm);
1295: x_return_status := FND_API.G_RET_STS_ERROR;
1296: END Update_Sync_flag;
1297:
1298: ---------------------------------------------------------------------------------
1299:

Line 1309: x_return_status := FND_API.G_RET_STS_SUCCESS;

1305: BEGIN
1306: conc_debug ('------ATP_Downtime_Init--------');
1307: conc_debug (' Old Plan: ' || p_old_plan_id);
1308:
1309: x_return_status := FND_API.G_RET_STS_SUCCESS;
1310: -- Update MSC Plans to null out the date.
1311: /* update msc_plans
1312: set plan_completion_date = NULL
1313: where plan_id = p_old_plan_id;

Line 1325: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1321: EXCEPTION
1322: when others then
1323: conc_log ('Error in Downtime INIT');
1324: conc_log ('Error is : ' || sqlerrm);
1325: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1326:
1327: END ATP_Downtime_Init;
1328:
1329: ---------------------------------------------------------------------------------

Line 1374: x_return_status := FND_API.G_RET_STS_ERROR;

1370: EXCEPTION
1371: when OTHERS then
1372: conc_log ('Concurrent program error. Code : ' || sqlcode);
1373: conc_log (' Error : ' || sqlerrm);
1374: x_return_status := FND_API.G_RET_STS_ERROR;
1375: G_TFS_ERROR := 'Unable to switch plans';
1376: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
1377: return;
1378: END;

Line 1396: x_return_status := FND_API.G_RET_STS_ERROR;

1392: conc_debug ('Phase : ' || l_dev_phase || ' Status : ' || l_dev_status );
1393:
1394: if (l_dev_status <> 'NORMAL') then
1395: conc_log ('Switch plans returned with ' || l_dev_status);
1396: x_return_status := FND_API.G_RET_STS_ERROR;
1397: G_TFS_ERROR := 'Unable to switch plans - program returned with error';
1398: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
1399:
1400: return;

Line 1458: x_return_status := FND_API.G_RET_STS_ERROR;

1454: conc_debug ('Phase : ' || l_dev_phase || ' Status : ' || l_dev_status );
1455:
1456: if (l_dev_status <> 'NORMAL') then
1457: conc_log ('Analyze plan partition returned with ' || l_dev_status);
1458: x_return_status := FND_API.G_RET_STS_ERROR;
1459: return;
1460: end if;
1461: */
1462:

Line 1481: x_return_status := FND_API.G_RET_STS_SUCCESS;

1477: COMMIT;
1478:
1479: --msc_util.msc_log('Request ID :' || l_request_id);
1480: --Dbms_Output.put_line('Request ID :' || l_request_id);
1481: x_return_status := FND_API.G_RET_STS_SUCCESS;
1482: conc_log ('Refresh Complete');
1483: EXCEPTION
1484: WHEN OTHERS THEN
1485: --msc_util.msc_log ('Conc. program error : ' || sqlcode || ':' || sqlerrm);

Line 1491: x_return_status := FND_API.G_RET_STS_ERROR;

1487:
1488: conc_log ('Exception in Refresh Snapshot');
1489: conc_log ('SqlCode : ' || sqlcode);
1490: conc_log ('Sql error MSG : ' || sqlerrm);
1491: x_return_status := FND_API.G_RET_STS_ERROR;
1492: END;
1493:
1494: END ATP_Downtime_Complete;
1495:

Line 1566: x_return_status := FND_API.G_RET_STS_SUCCESS;

1562: BEGIN
1563: conc_debug ('------- Update_Summary_Flag -----');
1564: conc_debug (' Plan ID : '|| p_plan_id || ' Status : ' || p_status);
1565:
1566: x_return_status := FND_API.G_RET_STS_SUCCESS;
1567:
1568: update msc_plans
1569: set summary_flag = p_status
1570: where plan_id = p_plan_id;

Line 1575: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1571:
1572: EXCEPTION
1573: WHEN OTHERS THEN
1574: conc_debug ('Cannot Update. Error : ' || sqlerrm);
1575: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1576:
1577: END Update_Summary_Flag;
1578:
1579: ---------------------------------------------------------------------------------

Line 1792: x_return_status := FND_API.G_RET_STS_SUCCESS;

1788: DBMS_SNAPSHOT.REFRESH( lv_msc_schema||'.MSC_ATP_PLAN_SN', 'C');
1789: conc_log ('Refresh Complete');
1790: end if;
1791:
1792: x_return_status := FND_API.G_RET_STS_SUCCESS;
1793:
1794: EXCEPTION
1795:
1796: WHEN OTHERS THEN

Line 1800: x_return_status := FND_API.G_RET_STS_ERROR;

1796: WHEN OTHERS THEN
1797: conc_log ('Exception in Refresh Snapshot');
1798: conc_log ('SqlCode : ' || sqlcode);
1799: conc_log ('Sql error MSG : ' || sqlerrm);
1800: x_return_status := FND_API.G_RET_STS_ERROR;
1801:
1802: END Refresh_Snapshot;
1803: ---------------------------------------------------------------------------------
1804: