<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: ECC Discrete Manufacturing, Components -->
 <REPORTS_ROW>
  <GUID>EEE75CEB4B056AD8E05362FB09051F8B</GUID>
  <SQL_TEXT>select
x.*
from
(
 SELECT * FROM ( WITH lookup_details as (SELECT /*+ materialize */ meaning,
                                            lookup_code,
                                            language,
                                            lookup_type,
                                            security_group_id,
                                            view_application_id
                                          FROM fnd_lookup_values
                                          WHERE lookup_type      IN (&apos;WIP_VIEW_ITEM&apos;,&apos;WIP_VIEW_ITEM_RESERVATION&apos;,&apos;BOM_BASIS_TYPE&apos;,&apos;WIP_JOB_STATUS&apos;,&apos;WIP_SUPPLY&apos;,&apos;WIP_SERIAL_YIELD&apos;)
                                          AND view_application_id = 700
                                          AND security_group_id   = 0
                                          ) SELECT src.*,
                                         CASE WHEN status_type   IN (3,4,6) THEN
                                         CASE WHEN onhand_quantity_actual &gt; open_quantity
                                           THEN 0
                                           ELSE open_quantity - (onhand_quantity_actual + reserved_non_inv_qty)
                                         END  END  shortage_quantity,
                                         (CASE WHEN status_type   IN (3,4,6) THEN
                                           CASE WHEN onhand_quantity_actual &gt; open_quantity
                                           THEN 0
                                           ELSE open_quantity - (onhand_quantity_actual + reserved_non_inv_qty)
                                         END END )*-1 shortage_quantity_tbl FROM (SELECT src.*,
                                           CASE WHEN status_type   IN (3,4,6) THEN
                                           CASE WHEN (src.onhand_quantity - NVL(lag(open_qty_sum) over (partition BY inventory_item_id, organization_id order by component_date_required, job),0)) &lt; 0
                                             THEN 0
                                             ELSE src.onhand_quantity - NVL(lag(open_qty_sum) over (partition BY inventory_item_id, organization_id order by component_date_required, job),0)
                                           END END onhand_quantity_actual
                                         FROM
                                         (select src.*,
                                       CASE WHEN status_type   IN (3,4,6)
                                            THEN NVL(src.required_quantity,0) - NVL(src.issued_quantity,0)
                                             END open_quantity,
                                             (SUM( CASE WHEN status_type   IN (3,4,6) THEN
                                               CASE
                                                WHEN NVL(src.required_quantity,0) - NVL(src.issued_quantity,0) &lt; 0
                                                THEN 0
                                                ELSE NVL(src.required_quantity,0) - nvl(src.issued_quantity,0)
                                               END
                                             END ) over (partition BY src.inventory_item_id, src.organization_id order by src.component_date_required, src.rid)) open_qty_sum,
                                             NVL(WIP_ECC_UTIL_PVT.get_qty_onhand(organization_id,inventory_item_id,NULL,NULL),0)  onhand_quantity,
                                            NVL(WIP_ECC_UTIL_PVT.get_qty_onhand(organization_id,substitute_component_id,NULL,NULL),0) substitute_comp_onhand
                                      from (select * from (SELECT TO_CHAR (wdj.wip_entity_id
                                       ||&apos;-&apos;
                                       ||wro.operation_seq_num
                                       ||&apos;-&apos;
                                       ||wro.inventory_item_id
                                       ||&apos;-&apos;
                                       ||wdj.organization_id
                                       ||&apos;-COMP&apos;) ecc_spec_id,
                                       TO_CHAR (we.wip_entity_name
                                       ||&apos;:&apos;
                                       ||wro.operation_seq_num
                                       ||&apos;:&apos;
                                       ||msi2.concatenated_segments
                                       ) wo_op_comp,
                                       wro.wip_entity_id JOB,
                                       wro.inventory_item_id,
                                       wo.first_unit_start_date planned_start_date ,
                                       wo.last_unit_completion_date Planned_completion_date ,
                                       we.wip_entity_name job_name ,
                                       WIP_ECC_UTIL_PVT.get_concatenated_segments(wdj.organization_id,wdj.primary_item_id) assembly,
                                       WIP_ECC_UTIL_PVT.get_description(wdj.organization_id,wdj.primary_item_id) assembly_description,
                                       wdj.organization_id organization_id ,
                                       mp.organization_code organization_code ,
                                       haout.NAME organization_name ,
                                       wdj.status_type,
                                       wdj.project_id ,
                                       wdj.task_id,
                                       status_lkp.meaning job_status,
                                       wro.operation_seq_num operation_sequence_number,
                                       (SELECT bso.operation_code
                                       FROM bom_standard_operations bso,
                                         wip_operations wo
                                       WHERE wo.wip_entity_id        =wdj.wip_entity_id
                                       AND wo.operation_seq_num      = wro.operation_seq_num
                                       AND wo.standard_operation_id  = bso.standard_operation_id(+)
                                       AND NVL(bso.operation_type,1) = 1
                                       AND bso.line_id              IS NULL
                                       ) operation_code,
                                       msi2.concatenated_segments component,
                                       msi2.description component_description,
                                       msi2.primary_uom_code component_uom,
                                      CASE WHEN (SELECT SUM(CASE
                                                          WHEN autocharge_type IN(3,4)
                                                          THEN 1
                                                          ELSE 0
                                                           END)
                                                     FROM wip_operation_resources wor
                                                     WHERE wdj.wip_entity_id   = wor.wip_entity_id
                                                     AND wdj.organization_id   = wor.organization_id
                                        ) &gt; 0 THEN 1 ELSE 2 END  osp_operation_flag,
                                       (SELECT m_cat.concatenated_segments
                                       FROM mtl_item_catalog_groups_b_kfv m_cat
                                       WHERE m_cat.item_catalog_group_id = msi2.item_catalog_group_id
                                       ) component_category,
                                       wro.quantity_per_assembly quantity_per_assembly ,
                                       NVL(wro.quantity_allocated,0) quantity_allocated,
                                       supply_type_lkp.meaning component_wip_supply_type ,
                                       haout.language Language,
                                       wro.supply_subinventory component_supply_subinventory ,
                                       (SELECT milk2.concatenated_segments
                                       FROM mtl_item_locations_kfv milk2
                                       WHERE milk2.inventory_location_id = wro.supply_locator_id
                                       and milk2.organization_id = wro.organization_id
                                       ) component_supply_locator ,
                                       TO_CHAR(wro.comments) component_comments ,
                                       wro.date_required component_date_required ,
                                       basis_type_lkp.meaning component_basis_type,
                                       &apos;fwkhp_sswafunc.gif&apos; as /* item_reservation_lkp.meaning */ item_reservation_link,
                                       &apos;fwkhp_sswafunc.gif&apos; as /* view_comp_link.meaning */ comp_link,
                                      &apos;fwkhp_sswafunc.gif&apos; as  /* view_sub_comp_link.meaning */  sub_comp_link,
                                       wro.required_quantity required_quantity ,
                                       wip_ecc_util_pvt.get_resv_qty(wdj.organization_id,wro.wip_entity_id,wro.operation_seq_num ,wro.inventory_item_id) reserved_quantity,
                                       wip_ecc_util_pvt.get_resv_non_inv_qty(wdj.organization_id,wro.wip_entity_id,wro.operation_seq_num ,wro.inventory_item_id) reserved_non_inv_qty,
                                       wro.quantity_issued issued_quantity ,
                                       bsc_1.substitute_components substitute_component,
                                       bsc_1.substitute_comp_uom substitute_component_uom,
                                       bsc_1.substitute_description substitute_description,
                                       bsc_1.inventory_item_id substitute_component_id,
                                       CASE
                                         WHEN wdj.status_type                                                                                                                     IN (3,4,6)
                                         AND ( (wro.quantity_per_assembly * (DECODE(wro.basis_type,2,1,NVL((wo.quantity_completed ), wdj.quantity_completed)))                    &gt; wro.quantity_issued
                                         AND wro.wip_supply_type                                                                                                                  &lt;&gt; 1
                                         AND wro.quantity_per_assembly                                                                                                            &gt;= 0)
                                         OR (wro.quantity_per_assembly * (DECODE(wro.basis_type,2,1,NVL((wo.quantity_running + wo.quantity_in_queue ), wdj.quantity_completed))) &gt; wro.quantity_issued
                                         AND wro.wip_supply_type                                                                                                                   = 1
                                         AND wro.quantity_per_assembly                                                                                                            &gt;= 0) )
                                         THEN 1
                                         ELSE 0
                                       END pending_material_issue,
                                       wo.scheduled_quantity ,
                                        wo.cumulative_scrap_quantity,
                                       wro.basis_type,
                                       wro.rowid rid
                                     FROM
                                       wip_requirement_operations wro,
                                       wip_operations wo,
                                       wip_discrete_jobs wdj,
                                       wip_entities we,
                                       mtl_parameters mp,
                                       hr_all_organization_units_tl haout,
                                       mtl_system_items_vl msi2,
                                       (SELECT
                                         meaning,
                                         lookup_code,
                                         language
                                       FROM lookup_details supptype
                                       WHERE supptype.lookup_type       = &apos;WIP_SUPPLY&apos;
                                       AND supptype.view_application_id = 700
                                       AND supptype.security_group_id   = 0
                                       ) supply_type_lkp,
                                       (SELECT
                                         ml1.meaning,
                                         ml1.lookup_code,
                                         ml1.language
                                       FROM lookup_details ml1
                                       WHERE ml1.lookup_type       = &apos;WIP_JOB_STATUS&apos;
                                       AND ml1.view_application_id = 700
                                       AND ml1.security_group_id   = 0
                                       ) status_lkp,
                                       (SELECT
                                         basistype.meaning,
                                         basistype.lookup_code,
                                         basistype.language
                                       FROM lookup_details basistype
                                       WHERE basistype.lookup_type       = &apos;BOM_BASIS_TYPE&apos;
                                       AND basistype.view_application_id = 700
                                       AND basistype.security_group_id   = 0
                                       ) basis_type_lkp,
                                    /*   (SELECT
                                         basistype.meaning,
                                         basistype.lookup_code,
                                         basistype.language
                                       FROM lookup_details basistype
                                       WHERE basistype.lookup_type       = &apos;WIP_VIEW_ITEM_RESERVATION&apos;
                                       AND basistype.view_application_id = 700
                                       AND basistype.lookup_code         = &apos;1&apos;
                                       AND basistype.security_group_id   = 0
                                       ) item_reservation_lkp, */
                                      /* (SELECT
                                        nonelk.meaning,
                                        nonelk.language,
                                        nonelk.lookup_code
                                        FROM lookup_details nonelk
                                        WHERE nonelk.lookup_type       = &apos;WIP_VIEW_ITEM&apos;
                                        AND nonelk.view_application_id = 700
                                        AND nonelk.lookup_code         = &apos;2&apos;
                                        AND nonelk.security_group_id   = 0
                                        ) view_comp_link,*/
                                    /*  (SELECT
                                        nonelk.meaning,
                                        nonelk.language,
                                        nonelk.lookup_code
                                        FROM lookup_details nonelk
                                        WHERE nonelk.lookup_type       = &apos;WIP_VIEW_ITEM&apos;
                                        AND nonelk.view_application_id = 700
                                        AND nonelk.lookup_code         = &apos;3&apos;
                                        AND nonelk.security_group_id   = 0
                                        ) view_sub_comp_link,*/
                                       (SELECT DISTINCT wro2.component_sequence_id ,
                                         bsc_3.concatenated_segments substitute_components,
                                         bsc_3.description substitute_description,
                                         bsc_3.inventory_item_id,
                                         bsc_3.primary_uom_code substitute_comp_uom
                                       FROM wip_requirement_operations wro2,
                                         (SELECT bsc_2.component_sequence_id,
                                           msi7.inventory_item_id,
                                           msi7.organization_id,
                                           msi7.concatenated_segments concatenated_segments,
                                           msi7.description,
                                           msi7.primary_uom_code
                                         FROM bom_substitute_components bsc_2,
                                           mtl_system_items_kfv msi7
                                         WHERE bsc_2.substitute_component_id = msi7.inventory_item_id
                                         ) bsc_3
                                       WHERE wro2.component_sequence_id IS NOT NULL
                                       AND wro2.component_sequence_id    = bsc_3.component_sequence_id
                                       AND bsc_3.organization_id           = wro2.organization_id
                                       ) bsc_1
                                     WHERE we.wip_entity_id                                       = wdj.wip_entity_id
                                     AND wdj.wip_entity_id                                        = wro.wip_entity_id
                                     AND mp.organization_id                                       = we.organization_id
                                     AND haout.organization_id                                    = mp.organization_id
                                     AND wdj.wip_entity_id                                         = wo.wip_entity_id
                                     and wdj.organization_id = wo .organization_id
                                     AND wo.operation_seq_num(+) = wro.operation_seq_num
                                     AND wo.wip_entity_id(+) = wro.wip_entity_id
                                     AND wo.organization_id(+) = wro.organization_id
                                     AND msi2.inventory_item_id                                   = wro.inventory_item_id
                                     AND msi2.organization_id                                     = wro.organization_id
                                     AND wdj.status_type                                          = status_lkp.lookup_code(+)
                                     AND wro.component_sequence_id                                = bsc_1.component_sequence_id(+)
                                     AND wro.wip_supply_type                                      = supply_type_lkp.lookup_code(+)
                                     AND TO_CHAR(NVL(wro.basis_type,1))                           = basis_type_lkp.lookup_code(+)
                                     AND haout.language                                = NVL(basis_type_lkp.language,haout.language)
                                     AND haout.language                                = NVL(supply_type_lkp.language,haout.language)
                                     AND haout.language                                = NVL(status_lkp.language,haout.language)
                                  /* AND haout.language = NVL(item_reservation_lkp.language,haout.language)
                                     AND haout.language = NVL(view_comp_link.language,haout.language)
                                     AND haout.language = NVL(view_sub_comp_link.language,haout.language) */
                                     AND wdj.status_type                                         IN (1,3,4,5,6,7,12,14,15)
                                     AND we.entity_type                                          IN (1,3) AND (NVL(wdj.date_completed,wdj.scheduled_completion_date) &gt;= SYSDATE - 30
                                          OR wdj.status_type  IN (3,6)
                                          OR (wdj.status_type  = 1

                                          AND wdj.scheduled_start_date  &lt;= SYSDATE + 7 ))  ) src WHERE src.language in (&apos;US&apos;) ) PIVOT ( MAX(COMPONENT_WIP_SUPPLY_TYPE) AS 
        COMPONENT_WIP_SUPPLY_TYPE ,MAX(COMPONENT_BASIS_TYPE) AS COMPONENT_BASIS_TYPE,MAX(ORGANIZATION_NAME) AS ORGANIZATION_NAME,  MAX(JOB_STATUS) AS JOB_STATUS  /* , MAX(ITEM_RESERVATION_LINK) AS ITEM_RESERVATION_LINK , MAX(COMP_LINK) AS COMP_LINK , MAX(SUB_COMP_LINK) AS SUB_COMP_LINK */   FOR LANGUAGE IN (&apos;US&apos; &quot;US&quot;)) src )src) src) src
) x
where
2=2</SQL_TEXT>
  <ENABLED>Y</ENABLED>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <REPORT_NAME>ECC التصنيع التجميعي, المكونات</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: تحتوي مجموعة البيانات هذه على معلومات متعلقة بمكونات أوامر الشغل
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <REPORT_NAME>ECC Diskrete Fertigung, Komponenten</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Dieses DatenSet speichert Informationen über Fertigungsauftragskomponenten
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <REPORT_NAME>ECC Discrete Manufacturing, Componentes</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Juego de datos con información sobre componentes de la orden de trabajo
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <REPORT_NAME>ECC Discrete Manufacturing, Composants</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Ce jeu de données contient des infos sur composants des ordres de fabrication
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <REPORT_NAME>ECC Produzione discreta, Componenti</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Questa serie di dati contiene informazioni sui componenti dell&apos;OdL
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <REPORT_NAME>ECC ショップ型製造, 構成部品</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: このデータ・セットには作業指示構成部品に関する情報が含まれています
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <REPORT_NAME>ECC Discrete Manufacturing, 구성품</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: 이 데이터 세트에는 작업 지시 구성품 정보가 포함되어 있습니다.
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <REPORT_NAME>ECC Дискретное производство, Компоненты</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: В этом наборе данных содержатся сведения о компонентах заказов на работы
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <REPORT_NAME>ECC Diskret tillverkning, Komponenter</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Den här datauppsättningen innehåller information om arbetsorderkomponenter
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <REPORT_NAME>ECC Kesikli Üretim, Bileşenler</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Bu veri kümesinde iş emri bileşenleri hakkında bilgiler saklanır
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>ECC Discrete Manufacturing, Components</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: This data set holds information about work order components.
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>ECC Discrete Manufacturing, 组件</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: 此数据集包含有关工作单组件的信息
Dataset Key: wip-compdetails
Query Procedure: WIP_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: wip_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enterprise Command Center</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
  </ANCHORS>
  <PARAMETERS>
  </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>
