1: PACKAGE BODY EAM_WB_UTILS AS
2: /* $Header: EAMWBUTB.pls 120.19.12000000.2 2007/06/15 14:18:35 vmec ship $ */
3:
4: g_pkg_name CONSTANT VARCHAR2(30):= 'EAM_WB_UTILS';
5:
1: PACKAGE BODY EAM_WB_UTILS AS
2: /* $Header: EAMWBUTB.pls 120.19.12000000.2 2007/06/15 14:18:35 vmec ship $ */
3:
4: g_pkg_name CONSTANT VARCHAR2(30):= 'EAM_WB_UTILS';
5:
6: procedure add_forecast(p_pm_forecast_id number) IS
7: begin
8: if current_forecasts.COUNT = 0 then
1291: l_maint_type := -1;
1292: l_prev_maint_id := -2;
1293: l_prev_maint_type := -2;
1294: i:=1;
1295: l_forecast_total := eam_wb_utils.get_forecast_total;
1296:
1297: for c1 in (
1298: select fwo.cycle_id,fwo.seq_id,eps.maintenance_object_id,eps.maintenance_object_type
1299: from eam_forecasted_work_orders fwo,eam_pm_schedulings eps
1330: end loop;
1331:
1332: if l_total = l_cnt then
1333: i:=1;
1334: l_forecast_id :=eam_wb_utils.current_forecasts.FIRST;
1335: while ( i <= l_forecast_total ) loop
1336:
1337: delete from eam_forecasted_work_orders
1338: where PM_FORECAST_ID = l_forecast_id;
1337: delete from eam_forecasted_work_orders
1338: where PM_FORECAST_ID = l_forecast_id;
1339:
1340: if i < l_forecast_total then
1341: l_forecast_id := eam_wb_utils.current_forecasts.NEXT(l_forecast_id);
1342: end if;
1343: i:=i+1;
1344: end loop;
1345: return true;
1379: );
1380: return l_owning_department_id;
1381: END get_owning_dept_default;
1382:
1383: END eam_wb_utils;
1384: