<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>
<LOVS>
<!-- loader xml for Enginatics Blitz Report lov: CST Cost Type (No ICP PII) -->
 <LOVS_ROW>
  <GUID>A486BD05719B2A82E053BB6B6358FC8E</GUID>
  <LOV_NAME>CST Cost Type (No ICP PII)</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
cct.cost_type value,
cct.description
from
cst_cost_types cct
where
nvl(cct.disable_date,sysdate)&gt;=sysdate and
cct.organization_id is null and
(cct.cost_type not like &apos;%PII%&apos; or cct.cost_type like &apos;%ICP%&apos;)
order by
cct.cost_type</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>All cost types except ICP (intercompany profit) or PII (profit in inventory).</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: GL Ledger (inv org related) -->
 <LOVS_ROW>
  <GUID>8E2FF36EDF3A79D2E0530100007F1FF2</GUID>
  <LOV_NAME>GL Ledger (inv org related)</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
gl.name value,
fifsv.id_flex_structure_name||&apos;: &apos;||gl.description description
from
gl_ledgers gl,
fnd_id_flex_structures_vl fifsv
where
gl.ledger_id in (select ood.set_of_books_id from org_organization_definitions ood where nvl(ood.disable_date,sysdate)&gt;=sysdate) and
(:$flex$.chart_of_accounts is null or xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos;) and
gl.chart_of_accounts_id=fifsv.id_flex_num and
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.application_id=101
order by
fifsv.id_flex_structure_name,
gl.name</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>جميع دفاتر الأستاذ المتعلقة بجميع منظمات المخزون النشطة</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Alle Ledger, die sich auf alle aktiven Inventarorganisationen beziehen</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Todos los libros de contabilidad relacionados con todas las organizaciones de inventario activas</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Tous les grands livres relatifs à tous les organismes d&apos;inventaire actifs</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Tutti i libri contabili relativi a tutte le organizzazioni di inventario attive</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>すべてのアクティブな在庫組織に関連するすべての台帳</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>모든 활성 재고 조직과 관련된 모든 원장</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Todos os livros contábeis relacionados a todas as organizações de inventário ativas</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Все бухгалтерские книги, относящиеся ко всем организациям, занимающимся активным инвентаризацией.</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Alla huvudböcker relaterade till alla aktiva lagerorganisationer</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Tüm aktif envanter organizasyonlarıyla ilgili tüm defterler</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>All ledgers related to all active inventory organizations</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>与所有现行清单组织有关的所有分类账</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: INV Operating Unit -->
 <LOVS_ROW>
  <GUID>9B9627743E84607DE053BB6B635805FB</GUID>
  <LOV_NAME>INV Operating Unit</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
haouv.name value,
&apos;Operating Unit&apos; description
from
hr_all_organization_units_vl haouv
where
haouv.organization_id in 
(
select
to_number(hoi.org_information3)
from
mtl_parameters mp,
hr_organization_information hoi,
hr_all_organization_units haou
where
mp.organization_id&lt;&gt;mp.master_organization_id and
mp.organization_id=hoi.organization_id and
hoi.org_information_context=&apos;Accounting Information&apos; and 
hoi.organization_id=haou.organization_id and
nvl(haou.date_to,sysdate)&gt;=sysdate
)
order by 1</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>جميع وحدات التشغيل المرتبطة بمؤسسة مخزون غير رئيسية نشطة</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Alle Betriebseinheiten, die mit einer aktiven Nicht-Master-Inventarisierungsorganisation verbunden sind</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Todas las unidades operativas relacionadas con una organización de inventario no maestra activa</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Toutes les unités opérationnelles liées à un organisme d&apos;inventaire non maître actif</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Tutte le unità operative legate a un&apos;organizzazione di inventario non master attiva</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>アクティブな非マスターインベントリ組織に関連するすべてのオペレーティング・ユニット</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>활성 비 마스터 재고 조직과 관련된 모든 운영 단위</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Todas as unidades operacionais relacionadas a uma organização ativa de inventário não-mestre</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Все операционные единицы, относящиеся к действующей организации, не являющейся ведущим поставщиком инвентарных запасов.</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Alla operativa enheter relaterade till en aktiv organisation som inte är huvudlager</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Etkin bir ana envanter organizasyonu ile ilgili tüm işletim birimleri</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>All operating units related to an active non master inventory organization</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>与在用的非总清单组织有关的所有业务单位：</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: INV Organization Code (excluding master) -->
 <LOVS_ROW>
  <GUID>91D3167A33531204E053BB6B63585EE3</GUID>
  <LOV_NAME>INV Organization Code (excluding master)</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
ood.organization_code value,
ood.organization_name description
from
org_organization_definitions ood
where
ood.organization_id not in (select mp.organization_id from mtl_parameters mp where mp.organization_id=mp.master_organization_id) and
(:$flex$.operating_unit is null or ood.operating_unit in (select haouv.organization_id from hr_all_organization_units_vl haouv where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos;)) and
(:$flex$.ledger is null or ood.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
nvl(ood.disable_date,sysdate)&gt;=sysdate
order by
ood.organization_code</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>جميع رموز تنظيم المخزون النشط باستثناء المؤسسات الرئيسية</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Alle aktiven Inventar-Organisationscodes mit Ausnahme von Master-Organisationen</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Todos los códigos de organización de inventario activos, excluyendo las organizaciones maestras</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Tous les codes d&apos;organisation de l&apos;inventaire actif, à l&apos;exclusion des organisations maîtresses</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Tutti i codici di organizzazione dell&apos;inventario attivi, escluse le organizzazioni master</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>マスター組織を除くすべてのアクティブなインベントリ組織コード</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>마스터 조직을 제외한 모든 활성 재고 조직 코드</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Todos os códigos ativos de organização de inventário, excluindo organizações mestre</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Все действующие инвентаризационные коды организаций, за исключением основных организаций</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Alla aktiva organisationskoder för inventarier exklusive huvudorganisationer</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Ana organizasyonlar hariç tüm aktif envanter organizasyon kodları</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>All active inventory organization codes excluding master organizations</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>所有现行清单组织代码，不包括主组织</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
</LOVS>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: CAC Resources Associated with Overheads Setup -->
 <REPORTS_ROW>
  <GUID>A3BFC166CC567F77E053BB6B6358CAD3</GUID>
  <SQL_TEXT>with crc as
        -- Revision for version 1.6
        -- Possible to have an time-basis overhead
        -- associated to an uncosted resource which
        -- is not in cst_resource_costs.  Avoiding
        -- outer join issue with Release 12.1.3.
        (select crc2.cost_type_id,
                crc2.resource_id,
                crc2.resource_rate
         from   cst_resource_costs crc2,
                mtl_parameters mp,
                cst_cost_types cct,
                cst_cost_types cct2 -- Avg Rates Cost Type
         where  cct.cost_type_id            = crc2.cost_type_id (+)
         and    cct.cost_type               = nvl(:p_cost_type, cct2.cost_type)                                     -- p_cost_type
         and    cct2.cost_type_id           = nvl(mp.avg_rates_cost_type_id, mp.primary_cost_method)
         and    mp.organization_id          = crc2.organization_id
         and    2=2                         -- p_org_code, p_cost_type
        ) -- crc
        -- End revision for version 1.6

----------------main query starts here--------------

select  flv.meaning Status, -- Set Up
        nvl(gl.short_name, gl.name) Ledger,
        haou.name Operating_Unit,
        mp.organization_code Org_Code,
        cct.cost_type Cost_Type,
        brr.resource_code Resource_Code,
        brr.unit_of_measure Resource_UOM,
        -- Revision for version 1.1
        cce.cost_element Cost_Element,
        -- Revision for version 1.7
        gl.currency_code Currency_Code,
        crc.resource_rate Resource_Rate,
        -- Revision for version 1.7
 ml3.meaning Resource_Type,
 ml4.meaning Charge_Type,
        ml1.meaning Resource_Basis,
        -- End revision for version 1.7
        -- Revision for version 1.6
        ml2.meaning Allow_Costs,
        bd.department_code Department,
        bro.resource_code Overhead_Code,
        bro.unit_of_measure Overhead_UOM
from    cst_resource_overheads cro,
        bom_department_resources bdr,
        bom_departments bd,
        -- Revision for version 1.6
        -- cst_resource_costs crc,
        crc,
        -- End revision for version 1.6
        bom_resources bro, -- Overhead Sub-Elements
        bom_resources brr, -- Resource and OSP Sub-Elements
        cst_cost_types cct,
        -- Revision for version 1.4
        cst_cost_types cct2, -- Avg Rates Cost Type
        cst_cost_elements cce,
        mtl_parameters mp,
        mfg_lookups ml1, -- Basis
        -- Revision for version 1.6
        mfg_lookups ml2, -- Allow Costs
        -- Revision for version 1.7
 mfg_lookups ml3, -- Resource Type
 mfg_lookups ml4, -- Charge Type
         -- End revision for version 1.7
        hr_organization_information hoi,
        hr_all_organization_units_vl haou,
        hr_all_organization_units_vl haou2,
        gl_ledgers gl,
        -- Revision for version 1.5
        fnd_lookup_values flv
where   brr.resource_id             = cro.resource_id
and     bro.resource_id             = cro.overhead_id
and     brr.resource_id             = bdr.resource_id
and     bdr.department_id           = bd.department_id
and     brr.resource_id             = crc.resource_id (+)
and     cct.cost_type_id            = cro.cost_type_id
-- Revision for version 1.6
-- and     cct.cost_type_id            = crc.cost_type_id
-- Revision for version 1.4
and     cct2.cost_type_id           = nvl(mp.avg_rates_cost_type_id, mp.primary_cost_method)
and     cct.cost_type               = nvl(:p_cost_type, cct2.cost_type)                                     -- p_cost_type
-- End revision for version 1.4
and     mp.organization_id          = brr.organization_id
and     brr.organization_id         = bro.organization_id
and     ml1.lookup_type             = &apos;CST_BASIS_SHORT&apos;
and     ml1.lookup_code             = brr.default_basis_type
-- Revision for version 1.6
and     ml2.lookup_type             = &apos;SYS_YES_NO&apos;
and     ml2.lookup_code             = brr.allow_costs_flag
-- End revision for version 1.6
-- Revision for version 1.7
and ml3.lookup_type             = &apos;BOM_RESOURCE_TYPE&apos;
and ml3.lookup_code             = brr.resource_type
and ml4.lookup_type             = &apos;BOM_AUTOCHARGE_TYPE&apos;
and ml4.lookup_code             = brr.autocharge_type
-- End revision for version 1.7
-- Revision for version 1.5
and     flv.lookup_type             = &apos;CHECK RANGE STATUS&apos;
and     flv.lookup_code             = &apos;SET UP&apos;
and     flv.language                = userenv(&apos;lang&apos;)
-- Revision for version 1.1
and     cce.cost_element_id         = brr.cost_element_id
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and     hoi.org_information_context = &apos;Accounting Information&apos;
and     hoi.organization_id         = mp.organization_id
and     hoi.organization_id         = haou.organization_id -- this gets the organization name
and     haou2.organization_id       = to_number(hoi.org_information3) -- this gets the operating unit id
and     gl.ledger_id                = to_number(hoi.org_information1) -- get the ledger_id
-- Revision for version 1.6
and     mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
and     1=1                         -- p_operating_unit, p_ledger
and     2=2                         -- p_org_code, p_cost_type
-- Revision for version 1.1
-- Add check for resources which are not associated with overheads
union all
select  fcl.meaning Status, -- Missing
        nvl(gl.short_name, gl.name) Ledger,
        haou.name Operating_Unit,
        mp.organization_code Org_Code,
        cct.cost_type Cost_Type,
        brr.resource_code Resource_Code,
        brr.unit_of_measure Resource_UOM,
        -- Revision for version 1.1
        cce.cost_element Cost_Element,
        -- Revision for version 1.7
        gl.currency_code Currency_Code,
        crc.resource_rate Resource_Rate,
        -- Revision for version 1.7
 ml3.meaning Resource_Type,
 ml4.meaning Charge_Type,
        ml1.meaning Resource_Basis,
        -- End revision for version 1.7
        -- Revision for version 1.6
        ml2.meaning Allow_Costs,
        bd.department_code Department,
        fcl.meaning Overhead_Code, -- Missing
        null Overhead_UOM
from    bom_department_resources bdr,
        bom_departments bd,
        -- Revision for version 1.6
        -- cst_resource_costs crc,
        crc,
        -- End revision for version 1.6
        bom_resources brr, -- Resource and OSP Sub-Elements
        cst_cost_types cct,
        -- Revision for version 1.4
        cst_cost_types cct2,
        -- Revision for version 1.1
        cst_cost_elements cce,
        mtl_parameters mp,
        mfg_lookups ml1, -- Basis
        -- Revision for version 1.6
        mfg_lookups ml2, -- Allow Costs
        -- Revision for version 1.7
 mfg_lookups ml3, -- Resource Type
 mfg_lookups ml4, -- Charge Type
         -- End revision for version 1.7
        hr_organization_information hoi,
        hr_all_organization_units_vl haou,
        hr_all_organization_units_vl haou2,
        gl_ledgers gl,
        fnd_common_lookups fcl
where   brr.resource_id             = bdr.resource_id
and     bdr.department_id           = bd.department_id
and     brr.resource_id             = crc.resource_id (+)
-- Revision for version 1.6
-- and     cct.cost_type_id            = crc.cost_type_id
-- Revision for version 1.4
and     cct2.cost_type_id           = nvl(mp.avg_rates_cost_type_id, mp.primary_cost_method)
and     cct.cost_type               = nvl(:p_cost_type, cct2.cost_type)                                     -- p_cost_type
-- End revision for version 1.4   
and     mp.organization_id          = brr.organization_id
and     ml1.lookup_type             = &apos;CST_BASIS_SHORT&apos;
and     ml1.lookup_code             = brr.default_basis_type
-- Revision for version 1.6
and     ml2.lookup_type             = &apos;SYS_YES_NO&apos;
and     ml2.lookup_code             = brr.allow_costs_flag
-- End revision for version 1.6
-- Revision for version 1.7
and ml3.lookup_type             = &apos;BOM_RESOURCE_TYPE&apos;
and ml3.lookup_code             = brr.resource_type
and ml4.lookup_type             = &apos;BOM_AUTOCHARGE_TYPE&apos;
and ml4.lookup_code             = brr.autocharge_type
-- End revision for version 1.7
-- Revision for version 1.5
and     fcl.lookup_type             = &apos;NL_IZA_REJECT_REASON&apos;
and     fcl.lookup_code             = &apos;MISSING&apos;
-- Revision for version 1.1
and     cce.cost_element_id         = brr.cost_element_id
and     brr.resource_id not in 
                (select cro.resource_id
                 from   cst_resource_overheads cro
                 where  cro.resource_id             = brr.resource_id
                 and    cro.organization_id         = brr.organization_id
                 and    cct.cost_type_id            = cro.cost_type_id)
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and     hoi.org_information_context = &apos;Accounting Information&apos;
and     hoi.organization_id         = mp.organization_id
and     hoi.organization_id         = haou.organization_id -- this gets the organization name
and     haou2.organization_id       = to_number(hoi.org_information3) -- this gets the operating unit id
and     gl.ledger_id                = to_number(hoi.org_information1) -- get the ledger_id
-- Revision for version 1.6
and     mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
and     1=1                         -- p_operating_unit, p_ledger
and     2=2                         -- p_org_code, p_cost_type
-- Order by Status, Ledger, Operating_Unit, Org_Code, Cost_Type, Resource_Code, Res Basis, Department and Overhead Code
order by 
        1,2,3,4,5,6,8,14,15</SQL_TEXT>
  <VERSION_COMMENTS>Replaced tab characters with spaces</VERSION_COMMENTS>
  <ENABLED>Y</ENABLED>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>CAC Resources Associated with Overheads Setup</REPORT_NAME>
    <DESCRIPTION>Report to show which resources are associated with which overheads and which resources are associated with which departments.  And find any resources which do not have any overhead associations.  If there are no overhead associations the first report column will say &quot;Missing&quot;.
If the resource/overhead association exists, the first column of the report will say &quot;Set Up&quot;.

Note:  if a resource does not have a cost, the Resource Rate column has a blank or empty value.

Parameters:
===========
Resource/Overhead Cost Type:  enter the cost type you wish to report for your resources and overheads.  If left blank, depending on your Costing Method, it defaults to your AvgRates or Frozen Cost Type (optional).
Category Set 1:  any item category you wish, typically the Cost or Product Line category set (optional).
Category Set 2:  any item category you wish, typically the Inventory category set (optional).
Organization Code:  enter the specific inventory organization(s) you wish to report (optional).
Operating Unit:  enter the specific operating unit(s) you wish to report (optional).
Ledger:  enter the specific ledger(s) you wish to report (optional).

/* +=============================================================================+
-- |  Copyright 2016 - 2024 Douglas Volz Consulting, Inc.
-- |  All rights reserved.
-- |  Permission to use this code is granted provided the original author is
-- |  acknowledged.  No warranties, express or otherwise is included in this permission.
-- +=============================================================================+
-- |
-- |  Original Author: Douglas Volz (doug@volzconsulting.com)
-- |
-- |  Program Name:  xxx_res_ovhd_setup.sql
-- | 
-- |  Version Modified on Modified  by   Description
-- |  ======= =========== ============== =========================================
-- |  1.0     11 Nov 2016 Douglas Volz   Initial Coding
-- |  1.1     16 Jun 2017 Douglas Volz   Add check for resources which are not
-- |                                     associated with overheads and added the
-- |                                     resource cost element.
-- |  1.2     17 Jul 2018 Douglas Volz   Made Cost Type parameter optional
-- |  1.3     16 Jan 2020 Douglas Volz   Added org code and operating unit parameters.
-- |  1.4     20 Apr 2020 Douglas Volz   Make Cost Type default work for all cost methods
-- |  1.5     09 Jul 2022 Douglas Volz   Changes for multi-language lookup values.
-- |  1.6     22 Jan 2024 Douglas Volz   Add with statement for cst_resource_costs, overheads
-- |                                     were not reported if the resource cost was missing.
-- |                                     Added resource &quot;Allow Costs&quot; column.  Removed
-- |                                     tabs and added inventory access controls.
-- |  1.7     31 Jan 2024 Douglas Volz   Add Currency Code, Resource Type and Charge Type columns.
-- +=============================================================================+*/</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>2=2</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_cost_type</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>cct.cost_type = :p_cost_type</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>CST Cost Type (No ICP PII)</LOV_NAME>
    <LOV_GUID>A486BD05719B2A82E053BB6B6358FC8E</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
cct.cost_type value,
cct.description
from
cst_cost_types cct
where
nvl(cct.disable_date,sysdate)&gt;=sysdate and
cct.organization_id is null and
(cct.cost_type not like &apos;%PII%&apos; or cct.cost_type like &apos;%ICP%&apos;)
order by
cct.cost_type</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select cct.cost_type value,
 cct.description
from cst_cost_types cct,
 mtl_parameters mp
where nvl(cct.disable_date,sysdate + 1) &gt; sysdate
and cct.organization_id is null
and cct.cost_type_id = decode(mp.primary_cost_method, 1, 1, mp.avg_rates_cost_type_id)
and (mp.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;)
  or
  (fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;) is null and cct.cost_type_id = decode(mp.primary_cost_method, 1, 1, mp.avg_rates_cost_type_id))
 )
and rownum &lt; 2
group by cct.cost_type, cct.description
order by cct.cost_type</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Resource/Overhead Cost Type</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>mp.organization_code = :p_org_code</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Organization Code (excluding master)</LOV_NAME>
    <LOV_GUID>91D3167A33531204E053BB6B63585EE3</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
ood.organization_code value,
ood.organization_name description
from
org_organization_definitions ood
where
ood.organization_id not in (select mp.organization_id from mtl_parameters mp where mp.organization_id=mp.master_organization_id) and
(:$flex$.operating_unit is null or ood.operating_unit in (select haouv.organization_id from hr_all_organization_units_vl haouv where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos;)) and
(:$flex$.ledger is null or ood.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
nvl(ood.disable_date,sysdate)&gt;=sysdate
order by
ood.organization_code</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select mp.organization_code from mtl_parameters mp where mp.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Organization Code</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>haou2.name = :p_operating_unit</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Operating Unit</LOV_NAME>
    <LOV_GUID>9B9627743E84607DE053BB6B635805FB</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
haouv.name value,
&apos;Operating Unit&apos; description
from
hr_all_organization_units_vl haouv
where
haouv.organization_id in 
(
select
to_number(hoi.org_information3)
from
mtl_parameters mp,
hr_organization_information hoi,
hr_all_organization_units haou
where
mp.organization_id&lt;&gt;mp.master_organization_id and
mp.organization_id=hoi.organization_id and
hoi.org_information_context=&apos;Accounting Information&apos; and 
hoi.organization_id=haou.organization_id and
nvl(haou.date_to,sysdate)&gt;=sysdate
)
order by 1</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Operating Unit</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>gl.name = :p_ledger</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Ledger (inv org related)</LOV_NAME>
    <LOV_GUID>8E2FF36EDF3A79D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
gl.name value,
fifsv.id_flex_structure_name||&apos;: &apos;||gl.description description
from
gl_ledgers gl,
fnd_id_flex_structures_vl fifsv
where
gl.ledger_id in (select ood.set_of_books_id from org_organization_definitions ood where nvl(ood.disable_date,sysdate)&gt;=sysdate) and
(:$flex$.chart_of_accounts is null or xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos;) and
gl.chart_of_accounts_id=fifsv.id_flex_num and
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.application_id=101
order by
fifsv.id_flex_structure_name,
gl.name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <PARAMETER_DEPENDENCIES>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.ledger</FLEX_BIND>
    <PARAMETER_NAME>Ledger</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Organization Code</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.operating_unit</FLEX_BIND>
    <PARAMETER_NAME>Operating Unit</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Organization Code</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
  </PARAMETER_DEPENDENCIES>
  <TEMPLATES>
   <TEMPLATES_ROW>
    <GUID>4742FEED4458541D5247AC8495BD494C</GUID>
    <TEMPLATE_NAME>Count by Org by Resource</TEMPLATE_NAME>
    <DESCRIPTION>Count by Status, Ledger, Operating Unit, Org Code and Resource</DESCRIPTION>
    <OWNER>MFG</OWNER>
    <TEMPLATE_COLUMNS>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>14</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ALLOW_COSTS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>12</DISPLAY_SEQUENCE>
      <COLUMN_NAME>CHARGE_TYPE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>8</DISPLAY_SEQUENCE>
      <COLUMN_NAME>COST_ELEMENT</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>5</DISPLAY_SEQUENCE>
      <COLUMN_NAME>COST_TYPE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>9</DISPLAY_SEQUENCE>
      <COLUMN_NAME>CURRENCY_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>15</DISPLAY_SEQUENCE>
      <COLUMN_NAME>DEPARTMENT</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>2</DISPLAY_SEQUENCE>
      <COLUMN_NAME>LEDGER</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>3</DISPLAY_SEQUENCE>
      <COLUMN_NAME>OPERATING_UNIT</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>4</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ORG_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>16</DISPLAY_SEQUENCE>
      <COLUMN_NAME>OVERHEAD_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>17</DISPLAY_SEQUENCE>
      <COLUMN_NAME>OVERHEAD_UOM</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>13</DISPLAY_SEQUENCE>
      <COLUMN_NAME>RESOURCE_BASIS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>6</DISPLAY_SEQUENCE>
      <COLUMN_NAME>RESOURCE_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
      <COLUMN_NAME>RESOURCE_RATE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>11</DISPLAY_SEQUENCE>
      <COLUMN_NAME>RESOURCE_TYPE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>7</DISPLAY_SEQUENCE>
      <COLUMN_NAME>RESOURCE_UOM</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>1</DISPLAY_SEQUENCE>
      <COLUMN_NAME>STATUS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
    </TEMPLATE_COLUMNS>
    <TEMPLATE_PIVOT>
     <TEMPLATE_PIVOT_ROW>
      <COLUMN_NAME>COST_TYPE</COLUMN_NAME>
      <FIELD_TYPE>ROW</FIELD_TYPE>
      <DISPLAY_SEQUENCE>5</DISPLAY_SEQUENCE>
     </TEMPLATE_PIVOT_ROW>
     <TEMPLATE_PIVOT_ROW>
      <COLUMN_NAME>LEDGER</COLUMN_NAME>
      <FIELD_TYPE>ROW</FIELD_TYPE>
      <DISPLAY_SEQUENCE>2</DISPLAY_SEQUENCE>
     </TEMPLATE_PIVOT_ROW>
     <TEMPLATE_PIVOT_ROW>
      <COLUMN_NAME>OPERATING_UNIT</COLUMN_NAME>
      <FIELD_TYPE>ROW</FIELD_TYPE>
      <DISPLAY_SEQUENCE>3</DISPLAY_SEQUENCE>
     </TEMPLATE_PIVOT_ROW>
     <TEMPLATE_PIVOT_ROW>
      <COLUMN_NAME>ORG_CODE</COLUMN_NAME>
      <FIELD_TYPE>ROW</FIELD_TYPE>
      <DISPLAY_SEQUENCE>4</DISPLAY_SEQUENCE>
     </TEMPLATE_PIVOT_ROW>
     <TEMPLATE_PIVOT_ROW>
      <COLUMN_NAME>RESOURCE_CODE</COLUMN_NAME>
      <FIELD_TYPE>VALUE</FIELD_TYPE>
      <DISPLAY_SEQUENCE>1</DISPLAY_SEQUENCE>
      <AGGREGATION>COUNT</AGGREGATION>
     </TEMPLATE_PIVOT_ROW>
     <TEMPLATE_PIVOT_ROW>
      <COLUMN_NAME>STATUS</COLUMN_NAME>
      <FIELD_TYPE>ROW</FIELD_TYPE>
      <DISPLAY_SEQUENCE>1</DISPLAY_SEQUENCE>
     </TEMPLATE_PIVOT_ROW>
    </TEMPLATE_PIVOT>
    <TEMPLATE_SHARED_STRINGS>
    </TEMPLATE_SHARED_STRINGS>
    <TEMPLATE_PARAMETER_DEFAULTS>
    </TEMPLATE_PARAMETER_DEFAULTS>
    <TEMPLATE_STYLES>
    </TEMPLATE_STYLES>
    <TEMPLATE_SHARING>
     <TEMPLATE_SHARING_ROW>
      <SHARING_LEVEL>S</SHARING_LEVEL>
      <LEVEL_VALUE>Site</LEVEL_VALUE>
     </TEMPLATE_SHARING_ROW>
    </TEMPLATE_SHARING>
    <PARAMETER_EXCLUSION>
    </PARAMETER_EXCLUSION>
   </TEMPLATES_ROW>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
   <DEFAULT_TEMPLATES_ROW>
    <TEMPLATE_GUID>4742FEED4458541D5247AC8495BD494C</TEMPLATE_GUID>
   </DEFAULT_TEMPLATES_ROW>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
  <UPLOAD_DEPENDENCIES>
  </UPLOAD_DEPENDENCIES>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
