<ROOT>
 <APPS_INITIALIZE_DATA>
  <USER_NAME>ENGINATICS</USER_NAME>
  <RESPONSIBILITY_KEY>SYSTEM_ADMINISTRATOR</RESPONSIBILITY_KEY>
  <APPLICATION_SHORT_NAME>SYSADMIN</APPLICATION_SHORT_NAME>
 </APPS_INITIALIZE_DATA>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: EAM Senfor Intl Work Order Details Extract for multiple activity assignments -->
 <REPORTS_ROW>
  <GUID>A81BE7BC615891F5E053B46B6358FE3F</GUID>
  <SQL_TEXT>select distinct 
          ecwo.asset_number &quot;Equipement&quot;
        , ecwo.asset_number_description &quot;Equipement designation&quot;
        , NVL(ecwo.area, &apos; &apos;) &quot;Zone&quot;
        , NVL(ecwo.asset_activity, &apos;NA&apos;) &quot;Activité&quot;
        , NVL(ecwo.asset_activity_description, &apos; &apos;) &quot;Designation activité&quot;
        , ecwo.scheduled_start_date &quot;Date de début programmé&quot;
        , ecwo.wip_entity_name &quot;Ordre de travail&quot;
        , ecwo.system_status_disp &quot;OT status&quot;
        , NVL(to_char(msib.cumulative_total_lead_time*24, &apos;999.99&apos;), &apos; &apos;) &quot;Temps prévu&quot;
        , NVL(ecwo.activity_cause_disp, &apos; &apos;) &quot;Cause d&apos;activité&quot;
        , NVL(meaa.attribute2, &apos; &apos;) &quot;Activité à risque&quot;
        , ecwo.class_code &quot;Classe en-cours&quot;
        , ecwo.owning_department_code &quot;Département&quot;
        , ecwo.activity_type &quot;Type d&apos;activité&quot;
        , NVL(ecwo.priority_disp, &apos; &apos;) &quot;Priorité de travail&quot;
        , ecwo.shutdown_type_disp &quot;Arrét&quot;
from  apps.eam_cfr_work_order_v ecwo
     ,apps.mtl_eam_asset_activities_v meaa
     ,apps.mtl_system_items_b msib
     ,dual
where 1=1
and     ecwo.asset_activity_id = meaa.asset_activity_id
and     ecwo.organization_id = meaa.organization_id
and     NVL(meaa.end_date_active,sysdate + 1) &gt; sysdate
and     ecwo.asset_activity_id = msib.inventory_item_id
order by 4, 3</SQL_TEXT>
  <COPIED_FROM_GUID>A7813C36ACADFEBCE053B46B63580ECB</COPIED_FROM_GUID>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>EAM Senfor Intl Work Order Details Extract for multiple activity assignments</REPORT_NAME>
    <DESCRIPTION>This report extracts eAM work order details from the eAM Work Order View. 
The particularity of this report is that it will also search for any valid attributes from the eAM asset activities view. For example, in this case the asset activity attribute2 is used to identify if the asset activity is an &apos;&apos;At Risk&apos;&apos; activity.  This attribute is also extracted in this report.
The cumulative total lead time, if present, of the activities is also output.
The primary usage of this report is in the tracking and planning of eAM maintenance work orders.

The report can be run by any combination of organization, scheduled start dates, work order status; see below. Additional parameters may be added as required.

Version     Modified on      Modified  by      Description 
=====   ========   == ======  ======== 
  1.0         15 Jun 2019    Ion Yılmaz        Initial Release
  2.0         15 Jun 2020    Ion Yılmaz        Modified version of EAM Work Order Details Extract to ensure that multiple activity assignments are correctly output.

Copyright 2019 Senfor International Yönetim Danışmanlık Hizmetleri Ltd. Şti.

Original Author: İon Yılmaz (iyilmaz@senfor-intl.com.tr) 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 &quot;As-Is&quot; 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).
Scheduled start from/to:  Enter the scheduled start date range (Optional).
Order Status:                  Select the work order status(es) to be included (Optional).
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>EAM Senfor Intl</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>ecwo.organization_id=(select organization_id from apps.mtl_parameters where organization_code = :P_ORGANIZATION)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_SRS_ORG</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
to_char(organization_id) id,
organization_code value,
organization_name description
from
org_organization_definitions
where nvl(disable_date,sysdate+1)&gt;sysdate
order by value,description</LOV_QUERY_DSP>
    <DEFAULT_VALUE>coalesce(
(select mp.organization_code from mtl_parameters mp where mp.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;)),
(select oav.organization_code from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id and rownum=1)
)</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Organization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>ecwo.scheduled_start_date&gt;=:P_SCHED_START_FROM</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Scheduled start from</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>ecwo.scheduled_start_date&lt;=:P_SCHED_START_TO</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Scheduled start to</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>ecwo.user_defined_status_disp = :P_ORDER_STATUS</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select 
EWSV.WORK_ORDER_STATUS value,
EWSV.System_status_desc Description
from 
EAM_WO_STATUSES_V EWSV
where 
EWSV.SYSTEM_STATUS in (1,3,4,6,17)
and
EWSV.ENABLED_FLAG=&apos;Y&apos;
ORDER BY EWSV.SYSTEM_STATUS,
EWSV.WORK_ORDER_STATUS
</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Order Status</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <PARAMETER_DEPENDENCIES>
  </PARAMETER_DEPENDENCIES>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
  <UPLOAD_DEPENDENCIES>
  </UPLOAD_DEPENDENCIES>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
