133: BEGIN
134: Errbuf :=NULL;
135: Retcode:=0;
136:
137: IF (Not EDW_COLLECTION_UTIL.setup(l_fact_name,
138: l_staging_table,
139: l_staging_table,
140: l_exception_msg)) THEN
141: errbuf := fnd_message.get;
152: -- date is NULL.
153: -- --------------------------------------------
154:
155: g_push_from_date := nvl(g_push_from_date,
156: EDW_COLLECTION_UTIL.G_local_last_push_start_date -
157: EDW_COLLECTION_UTIL.g_offset);
158: g_push_to_date := nvl(g_push_to_date,
159: EDW_COLLECTION_UTIL.G_local_curr_push_start_date);
160:
153: -- --------------------------------------------
154:
155: g_push_from_date := nvl(g_push_from_date,
156: EDW_COLLECTION_UTIL.G_local_last_push_start_date -
157: EDW_COLLECTION_UTIL.g_offset);
158: g_push_to_date := nvl(g_push_to_date,
159: EDW_COLLECTION_UTIL.G_local_curr_push_start_date);
160:
161:
155: g_push_from_date := nvl(g_push_from_date,
156: EDW_COLLECTION_UTIL.G_local_last_push_start_date -
157: EDW_COLLECTION_UTIL.g_offset);
158: g_push_to_date := nvl(g_push_to_date,
159: EDW_COLLECTION_UTIL.G_local_curr_push_start_date);
160:
161:
162: -- End of code change for bug fix 2140267.
163:
207: edw_log.put_line( 'The system time after insert is ' ||
208: to_char(sysdate,'MM/DD/YYYY HH24:MI:SS') );
209: edw_log.put_line(' ');
210:
211: EDW_COLLECTION_UTIL.wrapup(TRUE,
212: g_row_count,
213: l_exception_msg,
214: g_push_from_date,
215: g_push_to_date);
234: Retcode:=g_retcode;
235: l_exception_msg := Retcode || ':' || Errbuf;
236: rollback; -- Rollback insert into local staging
237: edw_log.put_line('Inserting into local staging have failed');
238: EDW_COLLECTION_UTIL.wrapup(FALSE, 0, l_exception_msg,
239: g_push_from_date, g_push_to_date);
240: raise;
241:
242: WHEN OTHERS THEN
244: Retcode:=sqlcode;
245: l_exception_msg := Retcode || ':' || Errbuf;
246: rollback;
247: edw_log.put_line('Other errors');
248: EDW_COLLECTION_UTIL.wrapup(FALSE, 0, l_exception_msg,
249: g_push_from_date, g_push_to_date);
250: raise;
251:
252: END push;