EAM Senfor Intl - eAM Preventative Maintenance Planning

Description
Categories: EAM Senfor Intl
This report will extract all eAM preventative maintenance work orders that are pending release from the last forecast run.

The report can be run by any combination of organization, department, scheduled start dates, asset group and asset; see below. Additional parameters may be added as required.

Version Modified on Modified  by   Description 
===== ======== == ====== ========
  1.0     09 Jun 2020 Ion Yılmaz     Initial Release

Copyright 2020 Senfor International Yönetim Danışmanlık Hizmetleri Ltd. Şti.

Original Author: İon Yılmaz ([email protected]) Senfor International, www.senfor-intl.eu ... 
This report will extract all eAM preventative maintenance work orders that are pending release from the last forecast run.

The report can be run by any combination of organization, department, scheduled start dates, asset group and asset; see below. Additional parameters may be added as required.

Version Modified on Modified  by   Description 
===== ======== == ====== ========
  1.0     09 Jun 2020 Ion Yılmaz     Initial Release

Copyright 2020 Senfor International Yönetim Danışmanlık Hizmetleri Ltd. Şti.

Original Author: İon Yılmaz ([email protected]) Senfor International, www.senfor-intl.eu
All rights reserved. Permission to use this code is granted provided the original author is acknowledged.

This code is made available on an "As-Is" basis and may require modification depending upon the configuration of the system it is being used on.

The author does not assume or hereby disclaim any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from negligence, accident, or any other cause.   |

Parameters:
===========
Organization:  Select the specific inventory organization(s) to be extracted (Mandatory).
Department: Select the specific owning departments(s) required (optional).
Scheduled start from/to: Enter the scheduled start date range (Optional).
Asset Group: Select the asset group(s) to be included (Optional).
Asset: Select the asset(s) to be included (Optional).
   more
select distinct
        (select msib.segment1 
            from inv.mtl_system_items_b msib
            where msib.inventory_item_id = ow.asset_activity_id
            and msib.organization_id = ow.organization_id) "Activity",
--ow.asset_activity_id,
        ow.WORK_ORDER_PM_ACTION_MEANING Action,
        ow.WORK_ORDER_PM_TYPE_MEANING "PM Type",
        (select mean.area 
            from apps.mtl_eam_asset_numbers_all_v mean
            where ow.asset_number = mean.instance_number) Area,
--       ow3.area,
        ow.ASSET_NUMBER Asset,
        (select mean.concatenated_segments 
            from apps.mtl_eam_asset_numbers_all_v mean
            where ow.asset_number = mean.instance_number) "Group",       
 --       ow3.concatenated_segments,
        ow.SCHEDULED_START_DATE,
        ow.SCHEDULED_COMPLETION_DATE,
        ow.WIP_ENTITY_NAME OT,
        ow.DESCRIPTION,
        ow.WO_STATUS_DISP "OT Status",
        ow.PM_NAME "PM Schedule",
        ow.WORK_ORDER_START_DATE "OT Start Date",
        ow.WORK_ORDER_COMPLETION_DATE "OT Completion Date",
        ow.OWNING_DEPARTMENT_CODE "Owning Department",
        ow.PRIORITY_MEANING Priority,
        ow.SHUTDOWN_TYPE_MEANING "Shutdown",
        ow.WORK_ORDER_TYPE_MEANING "OT Type",
        ow.ACTIVITY_TYPE_MEANING "Activity Type"
from apps.eam_outstanding_work_orders_v ow
left join apps.eam_outstanding_work_orders_v ow1 
on (ow.asset_activity_id = ow1.asset_activity_id
and ow.forecast_id < ow1.forecast_id
and OW.SCHEDULED_START_DATE = OW1.SCHEDULED_START_DATE)
where 1=1
/*ow.organization_id = (select organization_id 
                                from apps.mtl_parameters 
                                where organization_code = 'EM1')*/
and OW.SCHEDULED_START_DATE >= '29-DEC-18' 
and OW.SCHEDULED_START_DATE <= '29-JAN-19' 
--and ow.OWNING_DEPARTMENT_CODE >= :Department_from
--and ow.OWNING_DEPARTMENT_CODE <= :Department_to
--and ow.status_type = 1
--and ow.asset_number = '191-M14388'
order by 1, ow.SCHEDULED_START_DATE
Parameter NameSQL textValidation
Organization
ow.organization_id =:organization_id
LOV Oracle