135: l_program_login_id := NVL(fnd_global.CONC_LOGIN_ID, -1);
136: l_program_application_id := NVL(fnd_global.PROG_APPL_ID, -1);
137: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
138:
139: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the initial refresh process for Repair Orders fact ...');
140:
141: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_REPAIR_ORDERS_F name ...');
142:
143: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_REPAIR_ORDERS_F;
137: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
138:
139: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the initial refresh process for Repair Orders fact ...');
140:
141: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_REPAIR_ORDERS_F name ...');
142:
143: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_REPAIR_ORDERS_F;
144:
145: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
141: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_REPAIR_ORDERS_F name ...');
142:
143: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_REPAIR_ORDERS_F;
144:
145: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
146:
147: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_REPAIR_ORDERS_F ...');
148:
149: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_REPAIR_ORDERS_F');
143: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_REPAIR_ORDERS_F;
144:
145: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
146:
147: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_REPAIR_ORDERS_F ...');
148:
149: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_REPAIR_ORDERS_F');
150:
151: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
147: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_REPAIR_ORDERS_F ...');
148:
149: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_REPAIR_ORDERS_F');
150:
151: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
152:
153: l_run_date := sysdate - 5 / (24 * 60);
154:
155: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting into CSD_REPAIR_ORDERS_F ...');
151: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
152:
153: l_run_date := sysdate - 5 / (24 * 60);
154:
155: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting into CSD_REPAIR_ORDERS_F ...');
156:
157: INSERT INTO CSD_REPAIR_ORDERS_F
158: (repair_line_id,
159: inventory_item_id,
193: AND UOM.inventory_item_id = RO.inventory_item_id
194: AND UOM.organization_id = RO.inventory_org_id
195: AND UOM.uom_code = RO.unit_of_measure;
196:
197: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
198:
199: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting a record into CSD_FACT_DETAILS ...');
200:
201: INSERT INTO CSD_FACT_DETAILS
195: AND UOM.uom_code = RO.unit_of_measure;
196:
197: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
198:
199: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting a record into CSD_FACT_DETAILS ...');
200:
201: INSERT INTO CSD_FACT_DETAILS
202: (fact_name,
203: last_run_date,
222: l_program_login_id,
223: l_program_application_id,
224: l_request_id);
225:
226: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
227:
228: commit;
229: retcode := C_OK;
230:
227:
228: commit;
229: retcode := C_OK;
230:
231: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Leaving the initial refresh process for Repair Orders fact ...');
232:
233: EXCEPTION
234:
235: WHEN OTHERS THEN
233: EXCEPTION
234:
235: WHEN OTHERS THEN
236: retcode := C_ERROR;
237: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Unknown exception. SQLERRM = ' || SQLERRM);
238: ROLLBACK;
239: RAISE;
240:
241: END Initial_Load_Ro_ETL;
271: l_program_login_id := NVL(fnd_global.CONC_LOGIN_ID, -1);
272: l_program_application_id := NVL(fnd_global.PROG_APPL_ID, -1);
273: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
274:
275: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the incremental refresh process for Repair Orders fact ...');
276:
277: l_last_run_date := get_last_run_date(C_CSD_REPAIR_ORDERS_F);
278:
279: l_run_date := sysdate - 5 / (24 * 60);
277: l_last_run_date := get_last_run_date(C_CSD_REPAIR_ORDERS_F);
278:
279: l_run_date := sysdate - 5 / (24 * 60);
280:
281: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merging data into CSD_REPAIR_ORDERS_F ...');
282:
283: MERGE INTO CSD_REPAIR_ORDERS_F fact
284: USING (SELECT RO.repair_line_id,
285: RO.inventory_item_id,
331: l_program_login_id,
332: l_program_application_id,
333: l_request_id);
334:
335: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merge complete.');
336:
337: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Updating CSD_FACT_DETAILS ...');
338:
339: UPDATE CSD_FACT_DETAILS
333: l_request_id);
334:
335: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merge complete.');
336:
337: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Updating CSD_FACT_DETAILS ...');
338:
339: UPDATE CSD_FACT_DETAILS
340: SET last_run_date = l_run_date,
341: last_update_date = sysdate,
346: program_application_id = l_program_application_id,
347: request_id = l_request_id
348: WHERE fact_name = C_CSD_REPAIR_ORDERS_F;
349:
350: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Update complete.');
351:
352: commit;
353: retcode := C_OK;
354:
351:
352: commit;
353: retcode := C_OK;
354:
355: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Leaving the incremental refresh process for Repair Orders fact ...');
356:
357: EXCEPTION
358:
359: WHEN OTHERS THEN
358:
359: WHEN OTHERS THEN
360:
361: retcode := C_ERROR;
362: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Unknown exception. SQLERRM = ' || SQLERRM);
363: ROLLBACK;
364: RAISE;
365:
366: END Incr_Load_Ro_ETL;
395: l_program_login_id := NVL(fnd_global.CONC_LOGIN_ID, -1);
396: l_program_application_id := NVL(fnd_global.PROG_APPL_ID, -1);
397: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
398:
399: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the initial refresh process for Materials Consumed fact ...');
400:
401: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_MTL_CONSUMED_F name ...');
402:
403: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_MTL_CONSUMED_F;
397: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
398:
399: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the initial refresh process for Materials Consumed fact ...');
400:
401: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_MTL_CONSUMED_F name ...');
402:
403: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_MTL_CONSUMED_F;
404:
405: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
401: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_MTL_CONSUMED_F name ...');
402:
403: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_MTL_CONSUMED_F;
404:
405: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
406:
407: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_MTL_CONSUMED_F ...');
408:
409: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_MTL_CONSUMED_F');
403: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_MTL_CONSUMED_F;
404:
405: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
406:
407: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_MTL_CONSUMED_F ...');
408:
409: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_MTL_CONSUMED_F');
410:
411: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
407: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_MTL_CONSUMED_F ...');
408:
409: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_MTL_CONSUMED_F');
410:
411: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
412:
413: l_run_date := sysdate - 5 / (24 * 60);
414:
415: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting into CSD_MTL_CONSUMED_F ...');
411: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
412:
413: l_run_date := sysdate - 5 / (24 * 60);
414:
415: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting into CSD_MTL_CONSUMED_F ...');
416:
417: INSERT INTO CSD_MTL_CONSUMED_F
418: (repair_line_id,
419: inventory_item_id,
466: GROUP BY RO.repair_line_id,
467: MMT.inventory_item_id,
468: MSI.primary_uom_code;
469:
470: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
471:
472: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting a record into CSD_FACT_DETAILS ...');
473:
474: INSERT INTO CSD_FACT_DETAILS
468: MSI.primary_uom_code;
469:
470: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
471:
472: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting a record into CSD_FACT_DETAILS ...');
473:
474: INSERT INTO CSD_FACT_DETAILS
475: (fact_name,
476: last_run_date,
495: l_program_login_id,
496: l_program_application_id,
497: l_request_id);
498:
499: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
500:
501: commit;
502: retcode := C_OK;
503:
500:
501: commit;
502: retcode := C_OK;
503:
504: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Leaving the initial refresh process for Materials Consumed fact ...');
505:
506: EXCEPTION
507:
508: WHEN OTHERS THEN
506: EXCEPTION
507:
508: WHEN OTHERS THEN
509: retcode := C_ERROR;
510: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Unknown exception. SQLERRM = ' || SQLERRM);
511: ROLLBACK;
512: RAISE;
513:
514: END Initial_Load_Mtl_ETL;
544: l_program_login_id := NVL(fnd_global.CONC_LOGIN_ID, -1);
545: l_program_application_id := NVL(fnd_global.PROG_APPL_ID, -1);
546: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
547:
548: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the incremental refresh process for Materials Consumed fact ...');
549:
550: l_last_run_date := get_last_run_date(C_CSD_MTL_CONSUMED_F);
551:
552: l_run_date := sysdate - 5 / (24 * 60);
550: l_last_run_date := get_last_run_date(C_CSD_MTL_CONSUMED_F);
551:
552: l_run_date := sysdate - 5 / (24 * 60);
553:
554: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merging data into CSD_MTL_CONSUMED_F ...');
555:
556: MERGE INTO CSD_MTL_CONSUMED_F fact
557: USING (SELECT RO.repair_line_id,
558: mmt.inventory_item_id INVENTORY_ITEM_ID,
612: l_program_login_id,
613: l_program_application_id,
614: l_request_id);
615:
616: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merge complete.');
617:
618: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Updating CSD_FACT_DETAILS ...');
619:
620: UPDATE CSD_FACT_DETAILS
614: l_request_id);
615:
616: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merge complete.');
617:
618: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Updating CSD_FACT_DETAILS ...');
619:
620: UPDATE CSD_FACT_DETAILS
621: SET last_run_date = l_run_date,
622: last_update_date = sysdate,
627: program_application_id = l_program_application_id,
628: request_id = l_request_id
629: WHERE fact_name = C_CSD_MTL_CONSUMED_F;
630:
631: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Update complete.');
632:
633: commit;
634: retcode := C_OK;
635:
632:
633: commit;
634: retcode := C_OK;
635:
636: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Leaving the incremental refresh process for Materials Consumed fact ...');
637:
638: EXCEPTION
639:
640: WHEN OTHERS THEN
639:
640: WHEN OTHERS THEN
641:
642: retcode := C_ERROR;
643: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Unknown exception. SQLERRM = ' || SQLERRM);
644: ROLLBACK;
645: RAISE;
646:
647: END Incr_Load_Mtl_ETL;
676: l_program_login_id := NVL(fnd_global.CONC_LOGIN_ID, -1);
677: l_program_application_id := NVL(fnd_global.PROG_APPL_ID, -1);
678: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
679:
680: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the initial refresh process for Resources Consumed fact ...');
681:
682: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_RES_CONSUMED_F name ...');
683:
684: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_RES_CONSUMED_F;
678: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
679:
680: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the initial refresh process for Resources Consumed fact ...');
681:
682: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_RES_CONSUMED_F name ...');
683:
684: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_RES_CONSUMED_F;
685:
686: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
682: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Deleting record from CSD_FACT_DETAILS for CSD_RES_CONSUMED_F name ...');
683:
684: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_RES_CONSUMED_F;
685:
686: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
687:
688: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_RES_CONSUMED_F ...');
689:
690: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_RES_CONSUMED_F');
684: DELETE FROM CSD_FACT_DETAILS where fact_name = C_CSD_RES_CONSUMED_F;
685:
686: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Delete successful.');
687:
688: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_RES_CONSUMED_F ...');
689:
690: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_RES_CONSUMED_F');
691:
692: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
688: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncating table CSD_RES_CONSUMED_F ...');
689:
690: EXECUTE IMMEDIATE ('TRUNCATE TABLE CSD.CSD_RES_CONSUMED_F');
691:
692: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
693:
694: l_run_date := sysdate - 5 / (24 * 60);
695:
696: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting into CSD_RES_CONSUMED_F ...');
692: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Truncate successful.');
693:
694: l_run_date := sysdate - 5 / (24 * 60);
695:
696: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting into CSD_RES_CONSUMED_F ...');
697:
698: INSERT INTO CSD_RES_CONSUMED_F
699: (repair_line_id,
700: resource_id,
735: AND WTXN.transaction_type IN (1, 2, 3)
736: AND WTXN.resource_id IS NOT NULL
737: GROUP BY RO.repair_line_id, WTXN.primary_uom, WTXN.resource_id;
738:
739: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
740:
741: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting a record into CSD_FACT_DETAILS ...');
742:
743: INSERT INTO CSD_FACT_DETAILS
737: GROUP BY RO.repair_line_id, WTXN.primary_uom, WTXN.resource_id;
738:
739: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
740:
741: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Inserting a record into CSD_FACT_DETAILS ...');
742:
743: INSERT INTO CSD_FACT_DETAILS
744: (fact_name,
745: last_run_date,
764: l_program_login_id,
765: l_program_application_id,
766: l_request_id);
767:
768: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Insert successful.');
769:
770: commit;
771: retcode := C_OK;
772:
769:
770: commit;
771: retcode := C_OK;
772:
773: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Leaving the initial refresh process for Resources Consumed fact ...');
774:
775: EXCEPTION
776:
777: WHEN OTHERS THEN
775: EXCEPTION
776:
777: WHEN OTHERS THEN
778: retcode := C_ERROR;
779: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Unknown exception. SQLERRM = ' || SQLERRM);
780: ROLLBACK;
781: RAISE;
782:
783: END Initial_Load_Res_ETL;
813: l_program_login_id := NVL(fnd_global.CONC_LOGIN_ID, -1);
814: l_program_application_id := NVL(fnd_global.PROG_APPL_ID, -1);
815: l_request_id := NVL(fnd_global.CONC_REQUEST_ID, -1);
816:
817: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Entering the incremental refresh process for Resources Consumed fact ...');
818:
819: l_last_run_date := get_last_run_date(C_CSD_RES_CONSUMED_F);
820:
821: l_run_date := sysdate - 5 / (24 * 60);
819: l_last_run_date := get_last_run_date(C_CSD_RES_CONSUMED_F);
820:
821: l_run_date := sysdate - 5 / (24 * 60);
822:
823: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merging data into CSD_RES_CONSUMED_F ...');
824:
825: MERGE INTO CSD_RES_CONSUMED_F fact
826: USING (SELECT RO.repair_line_id,
827: WTXN.resource_id resource_id,
869: l_program_login_id,
870: l_program_application_id,
871: l_request_id);
872:
873: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merge complete.');
874:
875: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Updating CSD_FACT_DETAILS ...');
876:
877: UPDATE CSD_FACT_DETAILS
871: l_request_id);
872:
873: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Merge complete.');
874:
875: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Updating CSD_FACT_DETAILS ...');
876:
877: UPDATE CSD_FACT_DETAILS
878: SET last_run_date = l_run_date,
879: last_update_date = sysdate,
884: program_application_id = l_program_application_id,
885: request_id = l_request_id
886: WHERE fact_name = C_CSD_RES_CONSUMED_F;
887:
888: FND_FILE.PUT_LINE(FND_FILE.LOG,lc_proc_name || ': ' || 'Update complete.');
889:
890: commit;
891: retcode := C_OK;
892:
889:
890: commit;
891: retcode := C_OK;
892:
893: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Leaving the incremental refresh process for Resources Consumed fact ...');
894:
895: EXCEPTION
896:
897: WHEN OTHERS THEN
896:
897: WHEN OTHERS THEN
898:
899: retcode := C_ERROR;
900: FND_FILE.PUT_LINE(FND_FILE.LOG, lc_proc_name || ': ' || 'Unknown exception. SQLERRM = ' || SQLERRM);
901: ROLLBACK;
902: RAISE;
903:
904: END Incr_Load_Res_ETL;
918: l_errbuf VARCHAR2(2000);
919: l_retcode VARCHAR2(1);
920:
921: BEGIN
922: FND_FILE.PUT_LINE(FND_FILE.LOG,
923: 'Entering the initial refresh process ...');
924:
925: FND_FILE.PUT_LINE(FND_FILE.LOG,
926: 'Calling the initial refresh process for Repair Orders fact ...');
921: BEGIN
922: FND_FILE.PUT_LINE(FND_FILE.LOG,
923: 'Entering the initial refresh process ...');
924:
925: FND_FILE.PUT_LINE(FND_FILE.LOG,
926: 'Calling the initial refresh process for Repair Orders fact ...');
927:
928: -- Initializing to success.
929: retcode := c_OK;
931: CSD_HVR_BI_PVT.initial_load_Ro_etl(errbuf => l_errbuf,
932: retcode => l_retcode);
933:
934: if (l_retcode = c_OK) then
935: FND_FILE.PUT_LINE(FND_FILE.LOG,
936: 'Initial refresh process for Repair Orders fact completed succesfully...');
937: else
938: FND_FILE.PUT_LINE(FND_FILE.LOG,
939: 'Initial refresh process for Repair Orders fact failed with following error: ' || l_errbuf);
934: if (l_retcode = c_OK) then
935: FND_FILE.PUT_LINE(FND_FILE.LOG,
936: 'Initial refresh process for Repair Orders fact completed succesfully...');
937: else
938: FND_FILE.PUT_LINE(FND_FILE.LOG,
939: 'Initial refresh process for Repair Orders fact failed with following error: ' || l_errbuf);
940: if (retcode < l_retcode) then
941: retcode := l_retcode;
942: errbuf := l_errbuf;
942: errbuf := l_errbuf;
943: end if;
944: end if;
945:
946: FND_FILE.PUT_LINE(FND_FILE.LOG,
947: 'Calling the initial refresh process for Material Consumption fact ...');
948:
949: CSD_HVR_BI_PVT.initial_load_MTL_etl(errbuf => l_errbuf,
950: retcode => l_retcode);
949: CSD_HVR_BI_PVT.initial_load_MTL_etl(errbuf => l_errbuf,
950: retcode => l_retcode);
951:
952: if (l_retcode = c_OK) then
953: FND_FILE.PUT_LINE(FND_FILE.LOG,
954: 'Initial refresh process for Material Consumption fact completed succesfully...');
955: else
956: if (retcode < l_retcode) then
957: retcode := l_retcode;
956: if (retcode < l_retcode) then
957: retcode := l_retcode;
958: errbuf := l_errbuf;
959: end if;
960: FND_FILE.PUT_LINE(FND_FILE.LOG,
961: 'Initial refresh process for Material Consumption fact failed with following error: ' || l_errbuf);
962: end if;
963:
964: FND_FILE.PUT_LINE(FND_FILE.LOG,
960: FND_FILE.PUT_LINE(FND_FILE.LOG,
961: 'Initial refresh process for Material Consumption fact failed with following error: ' || l_errbuf);
962: end if;
963:
964: FND_FILE.PUT_LINE(FND_FILE.LOG,
965: 'Calling the initial refresh process for Resource fact ...');
966:
967: CSD_HVR_BI_PVT.initial_load_RES_etl(errbuf => l_errbuf,
968: retcode => l_retcode);
967: CSD_HVR_BI_PVT.initial_load_RES_etl(errbuf => l_errbuf,
968: retcode => l_retcode);
969:
970: if (l_retcode = c_OK) then
971: FND_FILE.PUT_LINE(FND_FILE.LOG,
972: 'Initial refresh process for resource fact completed succesfully...');
973: else
974: if (retcode < l_retcode) then
975: retcode := l_retcode;
974: if (retcode < l_retcode) then
975: retcode := l_retcode;
976: errbuf := l_errbuf;
977: end if;
978: FND_FILE.PUT_LINE(FND_FILE.LOG,
979: 'Initial refresh process for Resource fact failed with following error: ' || l_errbuf);
980: end if;
981:
982: -- commit;
980: end if;
981:
982: -- commit;
983:
984: FND_FILE.PUT_LINE(FND_FILE.LOG,
985: 'Leaving the initial refresh process ...');
986:
987: EXCEPTION
988:
987: EXCEPTION
988:
989: WHEN OTHERS THEN
990: retcode := C_ERROR;
991: FND_FILE.PUT_LINE(FND_FILE.LOG,
992: 'Unknown exception. SQLERRM = ' || SQLERRM);
993: ROLLBACK;
994: RAISE;
995:
1009: l_errbuf VARCHAR2(2000);
1010: l_retcode VARCHAR2(1);
1011:
1012: BEGIN
1013: FND_FILE.PUT_LINE(FND_FILE.LOG,
1014: 'Entering the incremental refresh process ...');
1015:
1016: FND_FILE.PUT_LINE(FND_FILE.LOG,
1017: 'Calling the incremental refresh process for Repair Orders fact ...');
1012: BEGIN
1013: FND_FILE.PUT_LINE(FND_FILE.LOG,
1014: 'Entering the incremental refresh process ...');
1015:
1016: FND_FILE.PUT_LINE(FND_FILE.LOG,
1017: 'Calling the incremental refresh process for Repair Orders fact ...');
1018:
1019: CSD_HVR_BI_PVT.Incr_load_Ro_etl(errbuf => l_errbuf,
1020: retcode => l_retcode);
1019: CSD_HVR_BI_PVT.Incr_load_Ro_etl(errbuf => l_errbuf,
1020: retcode => l_retcode);
1021:
1022: if (retcode = c_OK) then
1023: FND_FILE.PUT_LINE(FND_FILE.LOG,
1024: 'Incremental refresh process for Repair Orders fact completed succesfully...');
1025: else
1026: if (retcode < l_retcode) then
1027: retcode := l_retcode;
1026: if (retcode < l_retcode) then
1027: retcode := l_retcode;
1028: errbuf := l_errbuf;
1029: end if;
1030: FND_FILE.PUT_LINE(FND_FILE.LOG,
1031: 'Incremental refresh process for Repair Orders fact failed with following error: ' || l_errbuf);
1032: end if;
1033:
1034: FND_FILE.PUT_LINE(FND_FILE.LOG,
1030: FND_FILE.PUT_LINE(FND_FILE.LOG,
1031: 'Incremental refresh process for Repair Orders fact failed with following error: ' || l_errbuf);
1032: end if;
1033:
1034: FND_FILE.PUT_LINE(FND_FILE.LOG,
1035: 'Calling the incremental refresh process for Material Consumption fact ...');
1036:
1037: CSD_HVR_BI_PVT.Incr_load_MTL_etl(errbuf => l_errbuf,
1038: retcode => l_retcode);
1037: CSD_HVR_BI_PVT.Incr_load_MTL_etl(errbuf => l_errbuf,
1038: retcode => l_retcode);
1039:
1040: if (retcode = c_OK) then
1041: FND_FILE.PUT_LINE(FND_FILE.LOG,
1042: 'Incremental refresh process for Material Consumption fact completed succesfully...');
1043: else
1044: if (retcode < l_retcode) then
1045: retcode := l_retcode;
1044: if (retcode < l_retcode) then
1045: retcode := l_retcode;
1046: errbuf := l_errbuf;
1047: end if;
1048: FND_FILE.PUT_LINE(FND_FILE.LOG,
1049: 'Incremental refresh process for Material Consumption fact failed with following error: ' || l_errbuf);
1050: end if;
1051:
1052: FND_FILE.PUT_LINE(FND_FILE.LOG,
1048: FND_FILE.PUT_LINE(FND_FILE.LOG,
1049: 'Incremental refresh process for Material Consumption fact failed with following error: ' || l_errbuf);
1050: end if;
1051:
1052: FND_FILE.PUT_LINE(FND_FILE.LOG,
1053: 'Calling the incremental refresh process for Resource fact ...');
1054:
1055: CSD_HVR_BI_PVT.Incr_load_RES_etl(errbuf => l_errbuf,
1056: retcode => l_retcode);
1055: CSD_HVR_BI_PVT.Incr_load_RES_etl(errbuf => l_errbuf,
1056: retcode => l_retcode);
1057:
1058: if (retcode = c_OK) then
1059: FND_FILE.PUT_LINE(FND_FILE.LOG,
1060: 'Incremental refresh process for resource fact completed succesfully...');
1061: else
1062: if (retcode < l_retcode) then
1063: retcode := l_retcode;
1062: if (retcode < l_retcode) then
1063: retcode := l_retcode;
1064: errbuf := l_errbuf;
1065: end if;
1066: FND_FILE.PUT_LINE(FND_FILE.LOG,
1067: 'Incremental refresh process for Resource fact failed with following error: ' || l_errbuf);
1068: end if;
1069:
1070: -- commit;
1068: end if;
1069:
1070: -- commit;
1071:
1072: FND_FILE.PUT_LINE(FND_FILE.LOG,
1073: 'Leaving the incremental refresh process ...');
1074:
1075: EXCEPTION
1076:
1075: EXCEPTION
1076:
1077: WHEN OTHERS THEN
1078: retcode := C_ERROR;
1079: FND_FILE.PUT_LINE(FND_FILE.LOG,
1080: 'Unknown exception. SQLERRM = ' || SQLERRM);
1081: ROLLBACK;
1082: RAISE;
1083:
1095: l_refresh_method VARCHAR2(3);
1096:
1097: BEGIN
1098:
1099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Entering the concurrent program...');
1100:
1101: IF (p_refresh_type = 'INITIAL') then
1102: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Initial_Load ...');
1103: initial_load(errbuf, retcode);
1098:
1099: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Entering the concurrent program...');
1100:
1101: IF (p_refresh_type = 'INITIAL') then
1102: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Initial_Load ...');
1103: initial_load(errbuf, retcode);
1104: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Initial_Load ...');
1105: l_refresh_method := 'C';
1106: else
1100:
1101: IF (p_refresh_type = 'INITIAL') then
1102: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Initial_Load ...');
1103: initial_load(errbuf, retcode);
1104: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Initial_Load ...');
1105: l_refresh_method := 'C';
1106: else
1107: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Incr_Load ...');
1108: incr_load(errbuf, retcode);
1103: initial_load(errbuf, retcode);
1104: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Initial_Load ...');
1105: l_refresh_method := 'C';
1106: else
1107: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Incr_Load ...');
1108: incr_load(errbuf, retcode);
1109: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Incr_Load ...');
1110: l_refresh_method := '?';
1111: END IF;
1105: l_refresh_method := 'C';
1106: else
1107: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Incr_Load ...');
1108: incr_load(errbuf, retcode);
1109: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Incr_Load ...');
1110: l_refresh_method := '?';
1111: END IF;
1112:
1113: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Refresh_Mviews...');
1109: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Incr_Load ...');
1110: l_refresh_method := '?';
1111: END IF;
1112:
1113: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Refresh_Mviews...');
1114: Refresh_Mviews(p_method => l_refresh_method);
1115: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Refresh_Mviews...');
1116:
1117: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Leaving the concurrent program...');
1111: END IF;
1112:
1113: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Refresh_Mviews...');
1114: Refresh_Mviews(p_method => l_refresh_method);
1115: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Refresh_Mviews...');
1116:
1117: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Leaving the concurrent program...');
1118:
1119: EXCEPTION
1113: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Calling Refresh_Mviews...');
1114: Refresh_Mviews(p_method => l_refresh_method);
1115: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Returning from Refresh_Mviews...');
1116:
1117: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Leaving the concurrent program...');
1118:
1119: EXCEPTION
1120:
1121: WHEN OTHERS THEN
1119: EXCEPTION
1120:
1121: WHEN OTHERS THEN
1122: retcode := C_ERROR;
1123: FND_FILE.PUT_LINE(FND_FILE.LOG,
1124: 'Unknown exception. SQLERRM = ' || SQLERRM);
1125: ROLLBACK;
1126: RAISE;
1127: