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 1100: if x_return_status <> FND_API.G_RET_STS_SUCCESS then

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

Line 1101: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

Line 1220: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1224: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

Line 1246: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 1292: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 1306: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 1322: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

Line 1360: x_return_status := FND_API.G_RET_STS_ERROR;

1356: EXCEPTION
1357: when OTHERS then
1358: conc_log ('Concurrent program error. Code : ' || sqlcode);
1359: conc_log (' Error : ' || sqlerrm);
1360: x_return_status := FND_API.G_RET_STS_ERROR;
1361: G_TFS_ERROR := 'Unable to switch plans';
1362: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
1363: return;
1364: END;

Line 1382: x_return_status := FND_API.G_RET_STS_ERROR;

1378: conc_debug ('Phase : ' || l_dev_phase || ' Status : ' || l_dev_status );
1379:
1380: if (l_dev_status <> 'NORMAL') then
1381: conc_log ('Switch plans returned with ' || l_dev_status);
1382: x_return_status := FND_API.G_RET_STS_ERROR;
1383: G_TFS_ERROR := 'Unable to switch plans - program returned with error';
1384: G_TFS_ERRCODE := MSC_POST_PRO.G_ERROR;
1385:
1386: return;

Line 1432: x_return_status := FND_API.G_RET_STS_ERROR;

1428: conc_debug ('Phase : ' || l_dev_phase || ' Status : ' || l_dev_status );
1429:
1430: if (l_dev_status <> 'NORMAL') then
1431: conc_log ('Analyze plan partition returned with ' || l_dev_status);
1432: x_return_status := FND_API.G_RET_STS_ERROR;
1433: return;
1434: end if;
1435: */
1436:

Line 1512: x_return_status := FND_API.G_RET_STS_SUCCESS;

1508: BEGIN
1509: conc_debug ('------- Update_Summary_Flag -----');
1510: conc_debug (' Plan ID : '|| p_plan_id || ' Status : ' || p_status);
1511:
1512: x_return_status := FND_API.G_RET_STS_SUCCESS;
1513:
1514: update msc_plans
1515: set summary_flag = p_status
1516: where plan_id = p_plan_id;

Line 1521: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1517:
1518: EXCEPTION
1519: WHEN OTHERS THEN
1520: conc_debug ('Cannot Update. Error : ' || sqlerrm);
1521: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1522:
1523: END Update_Summary_Flag;
1524:
1525: ---------------------------------------------------------------------------------

Line 1738: x_return_status := FND_API.G_RET_STS_SUCCESS;

1734: DBMS_SNAPSHOT.REFRESH( lv_msc_schema||'.MSC_ATP_PLAN_SN', 'C');
1735: conc_log ('Refresh Complete');
1736: end if;
1737:
1738: x_return_status := FND_API.G_RET_STS_SUCCESS;
1739:
1740: EXCEPTION
1741:
1742: WHEN OTHERS THEN

Line 1746: x_return_status := FND_API.G_RET_STS_ERROR;

1742: WHEN OTHERS THEN
1743: conc_log ('Exception in Refresh Snapshot');
1744: conc_log ('SqlCode : ' || sqlcode);
1745: conc_log ('Sql error MSG : ' || sqlerrm);
1746: x_return_status := FND_API.G_RET_STS_ERROR;
1747:
1748: END Refresh_Snapshot;
1749: ---------------------------------------------------------------------------------
1750: