65: END IF;
66:
67: -- Generates "Warning" message in the Status column
68: -- of Concurrent Manager "Requests" table
69: edw_log.put_line(' ');
70: edw_log.put_line('INSERTING ' || to_char(sql%rowcount) ||
71: ' rows into poa_edw_po_dist_inc table');
72: END;
73:
66:
67: -- Generates "Warning" message in the Status column
68: -- of Concurrent Manager "Requests" table
69: edw_log.put_line(' ');
70: edw_log.put_line('INSERTING ' || to_char(sql%rowcount) ||
71: ' rows into poa_edw_po_dist_inc table');
72: END;
73:
74: -----------------------------------------------------------
114: END IF;
115:
116: IF(fnd_profile.value('POA_POPULATE_SAVINGS_TXN') = 'Y') then
117: poa_savings_main.populate_savings(g_push_from_date, g_push_to_date+1, FALSE);
118: edw_log.put_line('Populated Savings table');
119: END IF;
120:
121: l_duration := sysdate - l_temp_date;
122: edw_log.put_line('Process Time (populating saving table): '
118: edw_log.put_line('Populated Savings table');
119: END IF;
120:
121: l_duration := sysdate - l_temp_date;
122: edw_log.put_line('Process Time (populating saving table): '
123: || edw_log.duration(l_duration) || ', Current system time: ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
124: l_temp_date := sysdate;
125:
126: /* End Faustina's Addition */
119: END IF;
120:
121: l_duration := sysdate - l_temp_date;
122: edw_log.put_line('Process Time (populating saving table): '
123: || edw_log.duration(l_duration) || ', Current system time: ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
124: l_temp_date := sysdate;
125:
126: /* End Faustina's Addition */
127:
135: -- progress until the push_to_local procedure for
136: -- all view types has completed successfully.
137: -- ------------------------------------------------
138:
139: edw_log.put_line(' ');
140: edw_log.put_line('Start inserting to local staging table... ');
141:
142: -- Prepare all initial variables for POA_EDW_VARIABLES_PKG
143:
136: -- all view types has completed successfully.
137: -- ------------------------------------------------
138:
139: edw_log.put_line(' ');
140: edw_log.put_line('Start inserting to local staging table... ');
141:
142: -- Prepare all initial variables for POA_EDW_VARIABLES_PKG
143:
144: POA_EDW_VARIABLES_PKG.init;
479:
480: tmp_count := sql%rowcount;
481:
482: l_duration := sysdate - l_temp_date;
483: edw_log.put_line('Process Time (inserting to local staging table): '
484: || edw_log.duration(l_duration) || ', Current system time: ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
485: edw_log.put_line(' ');
486:
487: RETURN (tmp_count);
480: tmp_count := sql%rowcount;
481:
482: l_duration := sysdate - l_temp_date;
483: edw_log.put_line('Process Time (inserting to local staging table): '
484: || edw_log.duration(l_duration) || ', Current system time: ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
485: edw_log.put_line(' ');
486:
487: RETURN (tmp_count);
488:
481:
482: l_duration := sysdate - l_temp_date;
483: edw_log.put_line('Process Time (inserting to local staging table): '
484: || edw_log.duration(l_duration) || ', Current system time: ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
485: edw_log.put_line(' ');
486:
487: RETURN (tmp_count);
488:
489: EXCEPTION
605: SET seq_id = l_seq_id
606: WHERE seq_id IS NULL;
607:
608: p_count := sql%rowcount;
609: edw_log.put_line( 'Updated ' || p_count || ' records');
610:
611: open v_changed_rows(g_push_from_date, g_push_to_date, l_batch_size);
612: loop
613: fetch v_changed_rows bulk collect into
713:
714: g_push_to_date := nvl(l_to_date,
715: EDW_COLLECTION_UTIL.G_local_curr_push_start_date);
716:
717: edw_log.put_line( 'The collection range is from '||
718: to_char(g_push_from_date,'MM/DD/YYYY HH24:MI:SS')||' to '||
719: to_char(g_push_to_date,'MM/DD/YYYY HH24:MI:SS'));
720: edw_log.put_line(' ');
721:
716:
717: edw_log.put_line( 'The collection range is from '||
718: to_char(g_push_from_date,'MM/DD/YYYY HH24:MI:SS')||' to '||
719: to_char(g_push_to_date,'MM/DD/YYYY HH24:MI:SS'));
720: edw_log.put_line(' ');
721:
722: -- --------------------------------------------
723: -- Deleting the incremental table
724: -- --------------------------------------------
722: -- --------------------------------------------
723: -- Deleting the incremental table
724: -- --------------------------------------------
725:
726: edw_log.put_line('Deleting incremental table...');
727: edw_log.put_line('System time at start of deletion of inc. table ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
728: DELETE_INC;
729: edw_log.put_line('System time at end of deletion of inc. table ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
730: edw_log.put_line('Incremental table deleted');
723: -- Deleting the incremental table
724: -- --------------------------------------------
725:
726: edw_log.put_line('Deleting incremental table...');
727: edw_log.put_line('System time at start of deletion of inc. table ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
728: DELETE_INC;
729: edw_log.put_line('System time at end of deletion of inc. table ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
730: edw_log.put_line('Incremental table deleted');
731:
725:
726: edw_log.put_line('Deleting incremental table...');
727: edw_log.put_line('System time at start of deletion of inc. table ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
728: DELETE_INC;
729: edw_log.put_line('System time at end of deletion of inc. table ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
730: edw_log.put_line('Incremental table deleted');
731:
732: -- --------------------------------------------
733: -- Identify Change
726: edw_log.put_line('Deleting incremental table...');
727: edw_log.put_line('System time at start of deletion of inc. table ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
728: DELETE_INC;
729: edw_log.put_line('System time at end of deletion of inc. table ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
730: edw_log.put_line('Incremental table deleted');
731:
732: -- --------------------------------------------
733: -- Identify Change
734: -- --------------------------------------------
731:
732: -- --------------------------------------------
733: -- Identify Change
734: -- --------------------------------------------
735: edw_log.put_line(' ');
736: edw_log.put_line('Identifying changes...');
737: edw_log.put_line('System time at start of identify change ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
738: l_seq_id1 := IDENTIFY_CHANGE1(1,l_row_count);
739: edw_log.put_line('System time at end of identify change ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
732: -- --------------------------------------------
733: -- Identify Change
734: -- --------------------------------------------
735: edw_log.put_line(' ');
736: edw_log.put_line('Identifying changes...');
737: edw_log.put_line('System time at start of identify change ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
738: l_seq_id1 := IDENTIFY_CHANGE1(1,l_row_count);
739: edw_log.put_line('System time at end of identify change ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
740:
733: -- Identify Change
734: -- --------------------------------------------
735: edw_log.put_line(' ');
736: edw_log.put_line('Identifying changes...');
737: edw_log.put_line('System time at start of identify change ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
738: l_seq_id1 := IDENTIFY_CHANGE1(1,l_row_count);
739: edw_log.put_line('System time at end of identify change ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
740:
741: if (l_seq_id1 = -1) THEN
735: edw_log.put_line(' ');
736: edw_log.put_line('Identifying changes...');
737: edw_log.put_line('System time at start of identify change ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
738: l_seq_id1 := IDENTIFY_CHANGE1(1,l_row_count);
739: edw_log.put_line('System time at end of identify change ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
740:
741: if (l_seq_id1 = -1) THEN
742: RAISE l_iden_change_failure;
743: end if;
740:
741: if (l_seq_id1 = -1) THEN
742: RAISE l_iden_change_failure;
743: end if;
744: edw_log.put_line('Identified '||l_row_count||' changed records');
745:
746: -- -------------------------------------------
747: -- Delete delicates in the Inc Table
748: -- --------------------------------------------
745:
746: -- -------------------------------------------
747: -- Delete delicates in the Inc Table
748: -- --------------------------------------------
749: edw_log.put_line(' ');
750: edw_log.put_line('Deleting duplicate records from inc. table...');
751: edw_log.put_line('System time at start of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
752: DELETE_DUPLICATES;
753: edw_log.put_line('System time at end of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
746: -- -------------------------------------------
747: -- Delete delicates in the Inc Table
748: -- --------------------------------------------
749: edw_log.put_line(' ');
750: edw_log.put_line('Deleting duplicate records from inc. table...');
751: edw_log.put_line('System time at start of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
752: DELETE_DUPLICATES;
753: edw_log.put_line('System time at end of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
754: edw_log.put_line('Duplicate records deleted in Inc Table');
747: -- Delete delicates in the Inc Table
748: -- --------------------------------------------
749: edw_log.put_line(' ');
750: edw_log.put_line('Deleting duplicate records from inc. table...');
751: edw_log.put_line('System time at start of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
752: DELETE_DUPLICATES;
753: edw_log.put_line('System time at end of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
754: edw_log.put_line('Duplicate records deleted in Inc Table');
755:
749: edw_log.put_line(' ');
750: edw_log.put_line('Deleting duplicate records from inc. table...');
751: edw_log.put_line('System time at start of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
752: DELETE_DUPLICATES;
753: edw_log.put_line('System time at end of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
754: edw_log.put_line('Duplicate records deleted in Inc Table');
755:
756: -- --------------------------------------------
757: -- Push to local staging table for view type 1
750: edw_log.put_line('Deleting duplicate records from inc. table...');
751: edw_log.put_line('System time at start of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
752: DELETE_DUPLICATES;
753: edw_log.put_line('System time at end of delete duplicates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
754: edw_log.put_line('Duplicate records deleted in Inc Table');
755:
756: -- --------------------------------------------
757: -- Push to local staging table for view type 1
758: -- --------------------------------------------
756: -- --------------------------------------------
757: -- Push to local staging table for view type 1
758: -- --------------------------------------------
759:
760: edw_log.put_line(' ');
761: edw_log.put_line('Inserting into local staging table for view type 1');
762: edw_log.put_line('System time at start of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
763: l_row_count1 := PUSH_TO_LOCAL(1, l_seq_id1);
764: edw_log.put_line('System time at end of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
757: -- Push to local staging table for view type 1
758: -- --------------------------------------------
759:
760: edw_log.put_line(' ');
761: edw_log.put_line('Inserting into local staging table for view type 1');
762: edw_log.put_line('System time at start of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
763: l_row_count1 := PUSH_TO_LOCAL(1, l_seq_id1);
764: edw_log.put_line('System time at end of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
765:
758: -- --------------------------------------------
759:
760: edw_log.put_line(' ');
761: edw_log.put_line('Inserting into local staging table for view type 1');
762: edw_log.put_line('System time at start of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
763: l_row_count1 := PUSH_TO_LOCAL(1, l_seq_id1);
764: edw_log.put_line('System time at end of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
765:
766: IF (l_row_count1 = -1) THEN RAISE L_push_local_failure; END IF;
760: edw_log.put_line(' ');
761: edw_log.put_line('Inserting into local staging table for view type 1');
762: edw_log.put_line('System time at start of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
763: l_row_count1 := PUSH_TO_LOCAL(1, l_seq_id1);
764: edw_log.put_line('System time at end of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
765:
766: IF (l_row_count1 = -1) THEN RAISE L_push_local_failure; END IF;
767:
768: edw_log.put_line('Inserted ' || nvl(l_row_count1,0) ||
764: edw_log.put_line('System time at end of push to local ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
765:
766: IF (l_row_count1 = -1) THEN RAISE L_push_local_failure; END IF;
767:
768: edw_log.put_line('Inserted ' || nvl(l_row_count1,0) ||
769: ' rows into the local staging table for view type 1');
770: edw_log.put_line(' ');
771:
772: g_row_count := g_row_count + nvl(l_row_count1,0);
766: IF (l_row_count1 = -1) THEN RAISE L_push_local_failure; END IF;
767:
768: edw_log.put_line('Inserted ' || nvl(l_row_count1,0) ||
769: ' rows into the local staging table for view type 1');
770: edw_log.put_line(' ');
771:
772: g_row_count := g_row_count + nvl(l_row_count1,0);
773:
774: -- --------------------------------------------
773:
774: -- --------------------------------------------
775: -- Delete all incremental tables' record
776: -- --------------------------------------------
777: edw_log.put_line(' ');
778: edw_log.put_line('Truncating incremental table...');
779: edw_log.put_line('System time at start of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
780: TRUNCATE_INC;
781: edw_log.put_line('System time at end of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
774: -- --------------------------------------------
775: -- Delete all incremental tables' record
776: -- --------------------------------------------
777: edw_log.put_line(' ');
778: edw_log.put_line('Truncating incremental table...');
779: edw_log.put_line('System time at start of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
780: TRUNCATE_INC;
781: edw_log.put_line('System time at end of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
782: edw_log.put_line('truncated Increment Table');
775: -- Delete all incremental tables' record
776: -- --------------------------------------------
777: edw_log.put_line(' ');
778: edw_log.put_line('Truncating incremental table...');
779: edw_log.put_line('System time at start of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
780: TRUNCATE_INC;
781: edw_log.put_line('System time at end of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
782: edw_log.put_line('truncated Increment Table');
783:
777: edw_log.put_line(' ');
778: edw_log.put_line('Truncating incremental table...');
779: edw_log.put_line('System time at start of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
780: TRUNCATE_INC;
781: edw_log.put_line('System time at end of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
782: edw_log.put_line('truncated Increment Table');
783:
784: -- --------------------------------------------
785: -- Insert Missing Rates from Local Staging Into Inc Tables
778: edw_log.put_line('Truncating incremental table...');
779: edw_log.put_line('System time at start of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
780: TRUNCATE_INC;
781: edw_log.put_line('System time at end of truncate inc ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
782: edw_log.put_line('truncated Increment Table');
783:
784: -- --------------------------------------------
785: -- Insert Missing Rates from Local Staging Into Inc Tables
786: -- to repush them next time
784: -- --------------------------------------------
785: -- Insert Missing Rates from Local Staging Into Inc Tables
786: -- to repush them next time
787: -- --------------------------------------------
788: edw_log.put_line(' ');
789: edw_log.put_line('Inserting missing rates...');
790: edw_log.put_line('System time at start of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
791: INSERT_MISSING_RATES;
792: edw_log.put_line('System time at end of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
785: -- Insert Missing Rates from Local Staging Into Inc Tables
786: -- to repush them next time
787: -- --------------------------------------------
788: edw_log.put_line(' ');
789: edw_log.put_line('Inserting missing rates...');
790: edw_log.put_line('System time at start of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
791: INSERT_MISSING_RATES;
792: edw_log.put_line('System time at end of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
793: edw_log.put_line(' ');
786: -- to repush them next time
787: -- --------------------------------------------
788: edw_log.put_line(' ');
789: edw_log.put_line('Inserting missing rates...');
790: edw_log.put_line('System time at start of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
791: INSERT_MISSING_RATES;
792: edw_log.put_line('System time at end of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
793: edw_log.put_line(' ');
794: edw_log.put_line('Checked records for Missing Rates');
788: edw_log.put_line(' ');
789: edw_log.put_line('Inserting missing rates...');
790: edw_log.put_line('System time at start of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
791: INSERT_MISSING_RATES;
792: edw_log.put_line('System time at end of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
793: edw_log.put_line(' ');
794: edw_log.put_line('Checked records for Missing Rates');
795: edw_log.put_line(' ');
796:
789: edw_log.put_line('Inserting missing rates...');
790: edw_log.put_line('System time at start of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
791: INSERT_MISSING_RATES;
792: edw_log.put_line('System time at end of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
793: edw_log.put_line(' ');
794: edw_log.put_line('Checked records for Missing Rates');
795: edw_log.put_line(' ');
796:
797: OPEN Invalid_Rates;
790: edw_log.put_line('System time at start of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
791: INSERT_MISSING_RATES;
792: edw_log.put_line('System time at end of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
793: edw_log.put_line(' ');
794: edw_log.put_line('Checked records for Missing Rates');
795: edw_log.put_line(' ');
796:
797: OPEN Invalid_Rates;
798: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,
791: INSERT_MISSING_RATES;
792: edw_log.put_line('System time at end of insert missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
793: edw_log.put_line(' ');
794: edw_log.put_line('Checked records for Missing Rates');
795: edw_log.put_line(' ');
796:
797: OPEN Invalid_Rates;
798: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,
799: 'FROM CURRENCY CONVERSION DATE COLLECTION STATUS');
807: end loop;
808:
809: close Invalid_Rates;
810:
811: edw_log.put_line(' ');
812: edw_log.put_line('Report created for records with Missing Rates');
813: edw_log.put_line(' ');
814:
815: -- --------------------------------------------
808:
809: close Invalid_Rates;
810:
811: edw_log.put_line(' ');
812: edw_log.put_line('Report created for records with Missing Rates');
813: edw_log.put_line(' ');
814:
815: -- --------------------------------------------
816: -- Delete records with missing rates from local staging table
809: close Invalid_Rates;
810:
811: edw_log.put_line(' ');
812: edw_log.put_line('Report created for records with Missing Rates');
813: edw_log.put_line(' ');
814:
815: -- --------------------------------------------
816: -- Delete records with missing rates from local staging table
817: -- --------------------------------------------
814:
815: -- --------------------------------------------
816: -- Delete records with missing rates from local staging table
817: -- --------------------------------------------
818: edw_log.put_line(' ');
819: edw_log.put_line('Deleting missing rates from local staging table...');
820: edw_log.put_line('System time at start of delete stg missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
821: DELETE_STG_MISSING_RATES;
822: edw_log.put_line('System time at end of delete stg missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
815: -- --------------------------------------------
816: -- Delete records with missing rates from local staging table
817: -- --------------------------------------------
818: edw_log.put_line(' ');
819: edw_log.put_line('Deleting missing rates from local staging table...');
820: edw_log.put_line('System time at start of delete stg missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
821: DELETE_STG_MISSING_RATES;
822: edw_log.put_line('System time at end of delete stg missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
823:
816: -- Delete records with missing rates from local staging table
817: -- --------------------------------------------
818: edw_log.put_line(' ');
819: edw_log.put_line('Deleting missing rates from local staging table...');
820: edw_log.put_line('System time at start of delete stg missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
821: DELETE_STG_MISSING_RATES;
822: edw_log.put_line('System time at end of delete stg missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
823:
824: -- --------------------------------------------
818: edw_log.put_line(' ');
819: edw_log.put_line('Deleting missing rates from local staging table...');
820: edw_log.put_line('System time at start of delete stg missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
821: DELETE_STG_MISSING_RATES;
822: edw_log.put_line('System time at end of delete stg missing rates ' || to_char(sysdate, 'MM/DD/YYYY HH24:MI:SS'));
823:
824: -- --------------------------------------------
825: -- No exception raised so far. Call wrapup to transport
826: -- data to target database, and insert messages into logs
824: -- --------------------------------------------
825: -- No exception raised so far. Call wrapup to transport
826: -- data to target database, and insert messages into logs
827: -- -----------------------------------------------
828: edw_log.put_line(' ');
829: edw_log.put_line('Inserted '||nvl(g_row_count,0)||
830: ' rows into the staging table');
831: edw_log.put_line(' ');
832:
825: -- No exception raised so far. Call wrapup to transport
826: -- data to target database, and insert messages into logs
827: -- -----------------------------------------------
828: edw_log.put_line(' ');
829: edw_log.put_line('Inserted '||nvl(g_row_count,0)||
830: ' rows into the staging table');
831: edw_log.put_line(' ');
832:
833: EDW_COLLECTION_UTIL.wrapup(TRUE, g_row_count, l_exception_msg,
827: -- -----------------------------------------------
828: edw_log.put_line(' ');
829: edw_log.put_line('Inserted '||nvl(g_row_count,0)||
830: ' rows into the staging table');
831: edw_log.put_line(' ');
832:
833: EDW_COLLECTION_UTIL.wrapup(TRUE, g_row_count, l_exception_msg,
834: g_push_from_date, g_push_to_date);
835:
849: end if;
850:
851: l_exception_msg := Retcode || ':' || Errbuf;
852: rollback; -- Rollback insert into local staging
853: edw_log.put_line('Inserting into local staging have failed');
854: EDW_COLLECTION_UTIL.wrapup(FALSE, 0, l_exception_msg,
855: g_push_from_date, g_push_to_date);
856: raise;
857:
864: end if;
865:
866: l_exception_msg := Retcode || ':' || Errbuf;
867: rollback;
868: edw_log.put_line('Identifying changed records have Failed');
869: EDW_COLLECTION_UTIL.wrapup(FALSE, 0, l_exception_msg,
870: g_push_from_date, g_push_to_date);
871: raise;
872:
879: end if;
880:
881: l_exception_msg := Retcode || ':' || Errbuf;
882: rollback;
883: edw_log.put_line('Other errors');
884: EDW_COLLECTION_UTIL.wrapup(FALSE, 0, l_exception_msg,
885: g_push_from_date, g_push_to_date);
886: raise;
887: