37: g_global_start_date := bis_common_parameters.get_global_start_date;
38: g_bom_hour_code := fnd_profile.value('BOM:HOUR_UOM_CODE');
39: g_bom_time_class := fnd_profile.value('BOM:TIME_UOM_CLASS');
40:
41: bis_collection_utilities.log('BOM:HOUR_UOM_CODE -> ' || g_bom_hour_code, 3);
42: bis_collection_utilities.log('BOM:TIME_UOM_CLASS -> ' || g_bom_time_class, 3);
43:
44: -- the base UOM_CODE for the UOM_CLASS may not be the same as the
45: -- UOM_CODE for "hours". We need to convert everything to "hours"
38: g_bom_hour_code := fnd_profile.value('BOM:HOUR_UOM_CODE');
39: g_bom_time_class := fnd_profile.value('BOM:TIME_UOM_CLASS');
40:
41: bis_collection_utilities.log('BOM:HOUR_UOM_CODE -> ' || g_bom_hour_code, 3);
42: bis_collection_utilities.log('BOM:TIME_UOM_CLASS -> ' || g_bom_time_class, 3);
43:
44: -- the base UOM_CODE for the UOM_CLASS may not be the same as the
45: -- UOM_CODE for "hours". We need to convert everything to "hours"
46: -- so we
47: open c_time_base;
48: fetch c_time_base into g_time_base_to_hours;
49: close c_time_base;
50:
51: bis_collection_utilities.log('TIME_BASE_TO_HOURS -> ' || g_time_base_to_hours, 3);
52:
53: end local_init;
54:
55: procedure logger
60: as
61:
62: begin
63:
64: bis_collection_utilities.log
65: ( substr( g_pkg_name || '.' || p_proc_name || ' #' || p_stmt_id || p_message
66: , 1
67: , 1991 -- [2000 - (3*3)]
68: )
133: l_work_order_tbl t_number_tab;
134:
135: begin
136:
137: bis_collection_utilities.log('Begin Refresh');
138: local_init;
139: l_stmt_id := 0;
140: if not bis_collection_utilities.setup( g_object_name ) then
141: l_error_message := 'Error in BIS_COLLECTION_UTILITIES.Setup';
136:
137: bis_collection_utilities.log('Begin Refresh');
138: local_init;
139: l_stmt_id := 0;
140: if not bis_collection_utilities.setup( g_object_name ) then
141: l_error_message := 'Error in BIS_COLLECTION_UTILITIES.Setup';
142: logger( l_proc_name, l_stmt_id, l_error_message );
143: raise g_bis_setup_exception;
144: end if;
137: bis_collection_utilities.log('Begin Refresh');
138: local_init;
139: l_stmt_id := 0;
140: if not bis_collection_utilities.setup( g_object_name ) then
141: l_error_message := 'Error in BIS_COLLECTION_UTILITIES.Setup';
142: logger( l_proc_name, l_stmt_id, l_error_message );
143: raise g_bis_setup_exception;
144: end if;
145:
175: , l_error_message ) <> 0 then
176: logger( l_proc_name, l_stmt_id, l_error_message );
177: raise l_exception;
178: end if;
179: bis_collection_utilities.log('Base Summary table Truncated',1);
180:
181: --------------------------------------------- load ----------------------------------
182:
183: -- This inserts all the instances of the labor backlog into the fact table.
279:
280:
281: l_stmt_id := 90;
282:
283: bis_collection_utilities.log(l_rowcount||' rows inserted into the Base Summary Table',1);
284: bis_collection_utilities.log('End Refresh ');
285:
286: bis_collection_utilities.wrapup( p_status => true
287: , p_period_from => l_collect_from_date
280:
281: l_stmt_id := 90;
282:
283: bis_collection_utilities.log(l_rowcount||' rows inserted into the Base Summary Table',1);
284: bis_collection_utilities.log('End Refresh ');
285:
286: bis_collection_utilities.wrapup( p_status => true
287: , p_period_from => l_collect_from_date
288: , p_period_to => l_collect_to_date
282:
283: bis_collection_utilities.log(l_rowcount||' rows inserted into the Base Summary Table',1);
284: bis_collection_utilities.log('End Refresh ');
285:
286: bis_collection_utilities.wrapup( p_status => true
287: , p_period_from => l_collect_from_date
288: , p_period_to => l_collect_to_date
289: , p_count => l_rowcount
290: );
305: l_error_message := substr(sqlerrm,1,4000);
306: end if;
307:
308: logger( l_proc_name, l_stmt_id, l_error_message );
309: bis_collection_utilities.wrapup( p_status => false
310: , p_message => l_error_message
311: , p_period_from => l_collect_from_date
312: , p_period_to => l_collect_to_date
313: );