1014:
1015: DELETE FROM XLA_EVENTS_INT_GT;
1016: log_mesg(fnd_log.LEVEL_STATEMENT, l_module,
1017: '# of rows deleted from xla_events_int_gt: '|| SQL%ROWCOUNT );
1018: fnd_file.put_line(fnd_file.log,
1019: '-------------------------------------------------------');
1020: fnd_file.put_line(fnd_file.log,'Deleting Federal events, if any.');
1021: l_event_count := 0;
1022:
1016: log_mesg(fnd_log.LEVEL_STATEMENT, l_module,
1017: '# of rows deleted from xla_events_int_gt: '|| SQL%ROWCOUNT );
1018: fnd_file.put_line(fnd_file.log,
1019: '-------------------------------------------------------');
1020: fnd_file.put_line(fnd_file.log,'Deleting Federal events, if any.');
1021: l_event_count := 0;
1022:
1023: FOR rec_events IN c_get_unprocessed_fv_events
1024: LOOP
1038: IF l_event_count > 0 THEN
1039: FORALL i IN 1..l_event_count
1040: INSERT INTO XLA_EVENTS_INT_GT
1041: VALUES l_events_tab(i) ;
1042: fnd_file.put_line(fnd_file.log,' # of rows inserted into xla_events_int_gt table: ' || l_event_count);
1043: fnd_file.put_line(fnd_file.log,'Calling XLA_EVENTS_PUB_PKG.DELETE_BULK_EVENT ');
1044:
1045: XLA_EVENTS_PUB_PKG.DELETE_BULK_EVENTS(p_application_id => 8901);
1046:
1039: FORALL i IN 1..l_event_count
1040: INSERT INTO XLA_EVENTS_INT_GT
1041: VALUES l_events_tab(i) ;
1042: fnd_file.put_line(fnd_file.log,' # of rows inserted into xla_events_int_gt table: ' || l_event_count);
1043: fnd_file.put_line(fnd_file.log,'Calling XLA_EVENTS_PUB_PKG.DELETE_BULK_EVENT ');
1044:
1045: XLA_EVENTS_PUB_PKG.DELETE_BULK_EVENTS(p_application_id => 8901);
1046:
1047: fnd_file.put_line(fnd_file.log,'After Deletion of Federal Unprocessed Events');
1043: fnd_file.put_line(fnd_file.log,'Calling XLA_EVENTS_PUB_PKG.DELETE_BULK_EVENT ');
1044:
1045: XLA_EVENTS_PUB_PKG.DELETE_BULK_EVENTS(p_application_id => 8901);
1046:
1047: fnd_file.put_line(fnd_file.log,'After Deletion of Federal Unprocessed Events');
1048: fnd_file.put_line(fnd_file.log,'The following Federal BC unprocessed/Error events have been deleted');
1049: fnd_file.put_line(fnd_file.log ,'Event ID Event Status Code Process Status Code');
1050: fnd_file.put_line(fnd_file.log ,'--------- ----------------- -------------------');
1051:
1044:
1045: XLA_EVENTS_PUB_PKG.DELETE_BULK_EVENTS(p_application_id => 8901);
1046:
1047: fnd_file.put_line(fnd_file.log,'After Deletion of Federal Unprocessed Events');
1048: fnd_file.put_line(fnd_file.log,'The following Federal BC unprocessed/Error events have been deleted');
1049: fnd_file.put_line(fnd_file.log ,'Event ID Event Status Code Process Status Code');
1050: fnd_file.put_line(fnd_file.log ,'--------- ----------------- -------------------');
1051:
1052: FOR i IN 1..l_event_count
1045: XLA_EVENTS_PUB_PKG.DELETE_BULK_EVENTS(p_application_id => 8901);
1046:
1047: fnd_file.put_line(fnd_file.log,'After Deletion of Federal Unprocessed Events');
1048: fnd_file.put_line(fnd_file.log,'The following Federal BC unprocessed/Error events have been deleted');
1049: fnd_file.put_line(fnd_file.log ,'Event ID Event Status Code Process Status Code');
1050: fnd_file.put_line(fnd_file.log ,'--------- ----------------- -------------------');
1051:
1052: FOR i IN 1..l_event_count
1053: LOOP
1046:
1047: fnd_file.put_line(fnd_file.log,'After Deletion of Federal Unprocessed Events');
1048: fnd_file.put_line(fnd_file.log,'The following Federal BC unprocessed/Error events have been deleted');
1049: fnd_file.put_line(fnd_file.log ,'Event ID Event Status Code Process Status Code');
1050: fnd_file.put_line(fnd_file.log ,'--------- ----------------- -------------------');
1051:
1052: FOR i IN 1..l_event_count
1053: LOOP
1054: fnd_file.put_line(fnd_file.log ,l_events_tab(i).event_id||' '||
1050: fnd_file.put_line(fnd_file.log ,'--------- ----------------- -------------------');
1051:
1052: FOR i IN 1..l_event_count
1053: LOOP
1054: fnd_file.put_line(fnd_file.log ,l_events_tab(i).event_id||' '||
1055: l_events_tab(i).event_status_code ||' '||
1056: l_events_tab(i).process_status_code);
1057:
1058:
1071:
1072: END LOOP;
1073:
1074: ELSE
1075: fnd_file.put_line(fnd_file.log,'**** No Federal events found to delete ****');
1076: END IF;
1077: p_status := 'S';
1078:
1079: log_mesg(fnd_log.LEVEL_STATEMENT, l_module, 'END');
1076: END IF;
1077: p_status := 'S';
1078:
1079: log_mesg(fnd_log.LEVEL_STATEMENT, l_module, 'END');
1080: fnd_file.put_line(fnd_file.log,'-------------------------------------------------------');
1081: EXCEPTION WHEN OTHERS THEN
1082: log_mesg(fnd_log.LEVEL_UNEXPECTED, l_module, 'When others error: '||SQLERRM);
1083: p_status := 'E';
1084: END delete_fv_bc_orphan;