DBA Data[Home] [Help]

APPS.EAM_WB_UTILS SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 20

    current_forecasts.DELETE(p_pm_forecast_id);
Line: 21

    current_forecasts_index.delete(current_forecasts_index2(p_pm_forecast_id));
Line: 22

    current_forecasts_index2.DELETE(p_pm_forecast_id);
Line: 32

    current_forecasts_index.delete;
Line: 110

  SELECT fw.asset_activity_id, fw.pm_schedule_id, fw.action_type,
  fw.wip_entity_id, fw.wo_status, fw.system_status, fw.cycle_id, fw.seq_id,
  fw.maintenance_object_type, fw.maintenance_object_id,
  fw.inventory_item_id, fw.eam_item_type, fw.scheduled_start_date,
  fw.scheduled_completion_date, fw.organization_id organization_id,
  fw.pm_base_meter_reading
  FROM
  (SELECT meaa.asset_activity_id, fw.pm_schedule_id, fw.action_type,
  fw.wip_entity_id, fw.wo_status, ewsv.system_status, fw.cycle_id, fw.seq_id,
  meaa.maintenance_object_type, meaa.maintenance_object_id,
  msi.inventory_item_id, msi.eam_item_type, fw.scheduled_start_date,
  fw.scheduled_completion_date, fw.organization_id organization_id,
  fw.pm_base_meter_reading
   from eam_forecasted_work_orders fw, mtl_eam_asset_activities meaa,
   eam_wo_statuses_v ewsv, csi_item_instances cii, mtl_system_items_b msi
 where PM_FORECAST_ID = l_forecast_id and
  fw.activity_association_id = meaa.activity_association_id and
  ewsv.status_id=fw.wo_status and meaa.maintenance_object_type = 3 and
  meaa.maintenance_object_id = cii.instance_id and cii.inventory_item_id =
  msi.inventory_item_id and cii.last_vld_organization_id = msi.organization_id
union all
SELECT meaa.asset_activity_id, fw.pm_schedule_id, fw.action_type,
 fw.wip_entity_id, fw.wo_status, ewsv.system_status, fw.cycle_id, fw.seq_id,
 meaa.maintenance_object_type, meaa.maintenance_object_id,
 meaa.maintenance_object_id as inventory_item_id, 3 as eam_item_type, fw.scheduled_start_date,
 fw.scheduled_completion_date, fw.organization_id organization_id,
 fw.pm_base_meter_reading
from eam_forecasted_work_orders fw, mtl_eam_asset_activities meaa,
 eam_wo_statuses_v ewsv
where PM_FORECAST_ID = l_forecast_id and fw.activity_association_id =
 meaa.activity_association_id and ewsv.status_id=fw.wo_status and
 meaa.maintenance_object_type = 2) fw
 order by fw.cycle_id,fw.seq_id ; --added order by  for bug13903329
Line: 162

    l_eam_wo_tbl.delete;
Line: 163

    l_eam_wo_relations_tbl.delete;
Line: 172

        fnd_message.set_name('EAM', 'EAM_FORECAST_DELETED');
Line: 176

      select decode(eps.RESCHEDULING_POINT,6,epr.meter_id ,null) into l_base_meter_id
      from eam_pm_schedulings eps,eam_pm_scheduling_rules epr where
      eps.pm_schedule_id = epr.pm_schedule_id and rownum = 1
      and eps.pm_schedule_id =  sugg_rec.pm_schedule_id;
Line: 193

 	        select description into l_eam_wo_tbl(i).description
 	        from mtl_system_items_vl
 	        where inventory_item_id = sugg_rec.asset_activity_id
 	        and organization_id = sugg_rec.organization_id;
Line: 207

          l_eam_wo_tbl(i).transaction_type := eam_process_wo_pub.G_OPR_UPDATE;
Line: 234

          l_eam_wo_tbl(i).transaction_type := eam_process_wo_pub.G_OPR_UPDATE;
Line: 288

          SELECT FAILURE_CODE_REQUIREd INTO  l_eam_wo_tbl(i).FAILURE_CODE_REQUIRED
          FROM EAM_FAILURE_SET_ASSOCIATIONS
          WHERE inventory_item_id = sugg_rec.inventory_item_id;
Line: 298

          fnd_message.set_name('EAM', 'EAM_FORECAST_DELETED');
Line: 342

         select planner_maintenance into l_planner_code from eam_pm_schedulings
         where pm_schedule_id = sugg_rec.pm_schedule_id;
Line: 512

    SELECT meaa.asset_activity_id, fw.pm_schedule_id, fw.action_type,
  fw.wip_entity_id, fw.wo_status, ewsv.system_status, fw.cycle_id, fw.seq_id,
  meaa.maintenance_object_type, meaa.maintenance_object_id,
  msi.inventory_item_id, msi.eam_item_type, fw.scheduled_start_date,
  fw.scheduled_completion_date, fw.organization_id organization_id,
  fw.pm_base_meter_reading
   from eam_forecasted_work_orders fw, mtl_eam_asset_activities meaa,
   eam_wo_statuses_v ewsv, csi_item_instances cii, mtl_system_items_b msi
 where group_id = l_group_id and
  fw.activity_association_id = meaa.activity_association_id and
  ewsv.status_id=fw.wo_status and meaa.maintenance_object_type = 3 and
  meaa.maintenance_object_id = cii.instance_id and cii.inventory_item_id =
  msi.inventory_item_id and cii.last_vld_organization_id = msi.organization_id
union all
SELECT meaa.asset_activity_id, fw.pm_schedule_id, fw.action_type,
 fw.wip_entity_id, fw.wo_status, ewsv.system_status, fw.cycle_id, fw.seq_id,
 meaa.maintenance_object_type, meaa.maintenance_object_id,
 meaa.maintenance_object_id, 3, fw.scheduled_start_date,
 fw.scheduled_completion_date, fw.organization_id organization_id,
 fw.pm_base_meter_reading
from eam_forecasted_work_orders fw, mtl_eam_asset_activities meaa,
 eam_wo_statuses_v ewsv
where group_id = l_group_id and fw.activity_association_id =
 meaa.activity_association_id and ewsv.status_id=fw.wo_status and
 meaa.maintenance_object_type = 2 ;
Line: 555

    l_eam_wo_tbl.delete;
Line: 556

    l_eam_wo_relations_tbl.delete;
Line: 729

	SELECT PROCESS_FLAG
	from eam_forecasted_work_orders
	where PM_FORECAST_ID = l_forecast_id
	for update of process_flag nowait;
Line: 747

        fnd_message.set_name('EAM', 'EAM_FORECAST_DELETED');
Line: 753

        update eam_forecasted_work_orders
        set process_flag = 'Y'
	where pm_forecast_id = l_forecast_id;
Line: 856

    delete from eam_forecasted_work_orders
    where group_id = p_group_id and
    process_flag = 'N';
Line: 880

      work_orders_not_ready.DELETE(p_wip_entity_id);
Line: 882

        work_orders_released.DELETE(p_wip_entity_id);
Line: 884

      work_orders_unreleased.DELETE(p_wip_entity_id);
Line: 999

	select scheduled_start_date,scheduled_completion_date,shutdown_type
        into l_scheduled_start_date,l_scheduled_completion_date,l_shutdown_type
	from wip_discrete_jobs where wip_entity_id = l_wip_entity_id;
Line: 1201

      l_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PUB.G_OPR_UPDATE;
Line: 1276

      l_eam_wo_rec_1.transaction_type := EAM_PROCESS_WO_PUB.G_OPR_UPDATE;
Line: 1394

             select fwo.cycle_id,fwo.seq_id,eps.maintenance_object_id,eps.maintenance_object_type,fwo.activity_association_id
	     from eam_forecasted_work_orders fwo,eam_pm_schedulings eps
	     where fwo.pm_schedule_id=eps.pm_schedule_id and fwo.pm_forecast_id in (
	     ( select * from table( cast ( current_forecasts_index as system.eam_wipid_tab_type
	                                 )
				   )
	     )                                                                      )
	     and action_type <>3 and action_type <> 4 order by maintenance_object_id,maintenance_object_type,fwo.activity_association_id,cycle_id desc,seq_id desc
	   )
loop
  l_cycle_id := c1.cycle_id;
Line: 1422

   select count(1) into l_cnt from
      eam_forecasted_work_orders fwo,eam_pm_schedulings eps
       where fwo.pm_schedule_id = eps.pm_schedule_id and group_id = p_pm_group_id
       and (cycle_id >0 and seq_id >0 and (( cycle_id=l_cycle_id and seq_id <= l_seq_id) or cycle_id < l_cycle_id ))
       and action_type NOT IN(3,4)
       and maintenance_object_id =l_maint_id
       and maintenance_object_type = l_maint_type
       and l_act_ass_id = fwo.activity_association_id;
Line: 1439

      delete from eam_forecasted_work_orders
      where PM_FORECAST_ID = l_forecast_id;