<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 -->
 <LOVS_ROW>
  <GUID>92C63F4C20A21E85E053BB6B63585CC8</GUID>
  <LOV_NAME>CST Cost Type</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 or
 cct.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) 
)
order by
cct.cost_type</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </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 Category Set -->
 <LOVS_ROW>
  <GUID>8E2FF36EDECA79D2E0530100007F1FF2</GUID>
  <LOV_NAME>INV Category Set</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select distinct
mcsv.category_set_name value,
mcsv.description
from
mtl_category_sets_vl mcsv
where
:$flex$.organization_code is null or
mcsv.category_set_id in (select mic.category_set_id from mtl_parameters mp, mtl_item_categories mic where xxen_util.contains(:$flex$.organization_code,mp.organization_code)=&apos;Y&apos; and mp.organization_id=mic.organization_id)
order by
mcsv.category_set_name</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: INV Item Number (costing enabled only items) -->
 <LOVS_ROW>
  <GUID>EC5CECA520510FC8E0530100007F5EB3</GUID>
  <LOV_NAME>INV Item Number (costing enabled only items)</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <FILTER_BEFORE_DISPLAY>Y</FILTER_BEFORE_DISPLAY>
  <LOV_QUERY>select distinct
msiv.concatenated_segments value,
msiv.description
from
mtl_system_items_vl msiv,
mtl_parameters mp
where
msiv.organization_id = mp.organization_id and
(xxen_util.contains(:$flex$.organization_code,mp.organization_code) = &apos;Y&apos; or
 (:$flex$.organization_code is null 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
(msiv.costing_enabled_flag=&apos;Y&apos; or mp.process_enabled_flag=&apos;Y&apos;)
order by
msiv.concatenated_segments</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </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>
<!-- loader xml for Enginatics Blitz Report lov: MRP Assignment Set -->
 <LOVS_ROW>
  <GUID>92EDCA82621F0FBDE053BB6B6358DEED</GUID>
  <LOV_NAME>MRP Assignment Set</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
mas.assignment_set_name value,
mas.description 
from
mrp_assignment_sets mas 
order by
mas.assignment_set_name</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
</LOVS>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: CAC Cost vs. Planning Item Controls -->
 <REPORTS_ROW>
  <GUID>C1B7B7403A5D7839E053BB6B6358045B</GUID>
  <SQL_TEXT>with rept as
        (select mp.organization_code,
                cct.cost_type,
                cct.cost_type_id,
                msiv.concatenated_segments,
                msiv.description,
                muomv.uom_code,
                msiv.item_type,
                misv.inventory_item_status_code_tl,
                msiv.planning_make_buy_code,
                msiv.inventory_item_id,
                msiv.organization_id,
                -- check to see if a bom exists
                -- Revision for version 1.38, fix ORA-43916
                -- nvl((select distinct &apos;Y&apos;
                nvl((select distinct mp.organization_code
                     from   bom_structures_b bom
                     where  bom.organization_id     = mp.organization_id
                     and    bom.assembly_item_id    = msiv.inventory_item_id
                     and    bom.alternate_bom_designator is null
                -- Revision for version 1.38, fix ORA-43916
                -- ), &apos;N&apos;) bom,
                ), null) bom,
                -- check to see if a routing exists
                -- Revision for version 1.38, fix ORA-43916
                -- nvl((select distinct &apos;Y&apos;
                nvl((select distinct mp.organization_code
                     from   bom_operational_routings bor
                     where  bor.organization_id     = mp.organization_id
                     and    bor.assembly_item_id    = msiv.inventory_item_id
                     and    bor.alternate_routing_designator is null
                -- Revision for version 1.38, fix ORA-43916
                -- ), &apos;N&apos;) routing,
                ), null) routing,
                -- check to see if a sourcing rule exists for the receipt org
                -- Revision for version 1.38, fix ORA-43916
                -- nvl((select distinct &apos;Y&apos;
                nvl((select distinct mp.organization_code
                     from   mrp_sr_receipt_org msro,
                            mrp_sr_source_org msso,
                            mrp_sourcing_rules msr,
                            mrp_sr_assignments msa,
                            mrp_assignment_sets mas
                     where  msr.sourcing_rule_id    = msro.sourcing_rule_id
                     -- fix for version 1.4, check to see if the sourcing rule is
                     -- for an inventory org, not a vendor
                     and    msso.sr_receipt_id      = msro.sr_receipt_id
                     and    msso.source_organization_id is not null
                     and    msa.sourcing_rule_id    = msr.sourcing_rule_id
                     and    msa.assignment_set_id   = mas.assignment_set_id
                     and    msiv.organization_id    = msa.organization_id
                     and    msiv.inventory_item_id  = msa.inventory_item_id
                     and    mp.organization_id      = msa.organization_id
                     and    3=3                     -- p_assignment_set
                     -- Revision for version 1.38, fix ORA-43916
                -- ), &apos;N&apos;) sourcing_rule,
                ), null) sourcing_rule,
                cic.based_on_rollup_flag,
                -- Revision for version 1.35
                cic.defaulted_flag,
                msiv.costing_enabled_flag,
                msiv.inventory_asset_flag,
                to_char(cic.inventory_asset_flag) cost_asset_flag,
                msiv.std_lot_size,
                cic.lot_size cost_lot_size,
                cic.item_cost,
                -- Revision for version 1.36
                onhand.quantity Onhand_Quantity,
                cic.creation_date cost_creation_date,
                -- End revision for version 1.36
                msiv.creation_date item_creation_date
         from   mtl_system_items_vl msiv,
                mtl_units_of_measure_vl muomv,
                mtl_item_status_vl misv, 
                cst_item_costs cic,
                cst_cost_types cct,
                mtl_parameters mp,
                -- Revision for version 1.36
                (select moqd.organization_id,
                        moqd.inventory_item_id,
                        sum(moqd.transaction_quantity) quantity
                 from   mtl_onhand_quantities_detail moqd,
                        mtl_parameters mp
                 where  moqd.is_consigned               = 2 -- No
                 and    mp.organization_id              = moqd.organization_id
                 and    4=4                             -- p_org_code
                 group by
                        moqd.organization_id,
                        moqd.inventory_item_id
                ) onhand
                -- End revision for version 1.36
         -- ===================================================================
         -- Cost type, organization, item master and report specific controls
         -- ===================================================================
         where  cic.cost_type_id                = cct.cost_type_id
         and    mp.organization_id              = cic.organization_id
         and    msiv.organization_id            = cic.organization_id
         and    msiv.inventory_item_id          = cic.inventory_item_id
         and    msiv.primary_uom_code           = muomv.uom_code
         and    misv.inventory_item_status_code = msiv.inventory_item_status_code
         and    msiv.inventory_item_status_code &lt;&gt; &apos;Inactive&apos;
         -- Revision for version 1.36
         and    onhand.inventory_item_id (+)    = msiv.inventory_item_id
         and    onhand.organization_id (+)      = msiv.organization_id
         -- End revision for version 1.36
         -- Avoid unused inventory organizations
         and    mp.organization_id             &lt;&gt; mp.master_organization_id -- the item master org usually does not have costs
         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    2=2                             -- p_cost_type, p_item_number
         and    4=4                             -- p_org_code
        )

--------------- main sql starts here -----------------------


select  rept_all.report_type,
        nvl(gl.short_name, gl.name) Ledger,
        haou2.name Operating_Unit,
        rept_all.organization_code Org_Code,
        rept_all.cost_type Cost_Type,
        rept_all.concatenated_segments Item_Number,
        rept_all.description Item_Description,
        rept_all.uom_code UOM_Code,
        fcl.meaning Item_Type,
        rept_all.inventory_item_status_code_tl Item_Status,
        ml1.meaning Make_Buy_Code,
&amp;category_columns
        fl1.meaning BOM,
        fl2.meaning Routing,
        fl3.meaning Sourcing_Rule,
        ml2.meaning Based_on_Rollup,
        -- Revision for version 1.35
        ml4.meaning Defaulted_Flag,
        fl4.meaning Costing_Enabled,
        fl5.meaning Item_Inventory_Asset,
        ml3.meaning Cost_Inventory_Asset,
        rept_all.std_lot_size Item_Std_Lot_Size,
        rept_all.cost_lot_size Cost_Lot_Size,
        gl.currency_code Currency_Code,
        rept_all.Item_Cost,
        -- Revision for version 1.36
        rept_all.Onhand_Quantity,
        rept_all.Cost_Creation_Date,
        rept_all.item_creation_date Item_Creation_Date
        -- End revision for version 1.36
from    mfg_lookups ml1, -- Make/buy code, MTL_PLANNING_MAKE_BUY
        mfg_lookups ml2, -- based on rollup, CST_BONROLLUP_VAL
        mfg_lookups ml3, -- Cost inventory_asset_flag, SYS_YES_NO
        -- Revision for version 1.35
        mfg_lookups ml4, -- Cost defaulted_flag, SYS_YES_NO
        fnd_lookups fl1, -- BOM, YES_NO
        fnd_lookups fl2, -- Routing, YES_NO
        fnd_lookups fl3, -- Sourcing_Rule, YES_NO
        fnd_lookups fl4, -- Item costing enabled, YES_NO
        fnd_lookups fl5, -- Item inventory asset, YES_NO
        fnd_common_lookups fcl, -- Item Type
        hr_organization_information hoi,
        hr_all_organization_units_vl haou,  -- inv_organization_id
        hr_all_organization_units_vl haou2, -- operating unit
        gl_ledgers gl,
        (
         -- ===============================================
         -- Report 1 - &apos;Based on Rollup Yes - No BOMs&apos;
         -- ===============================================
         select &apos;Based on Rollup Yes - No BOMs&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and rept.planning_make_buy_code = 1 and rept.based_on_rollup_flag = 1 and rept.bom = &apos;N&apos; 
         union all
         -- ===============================================
         -- Report 2 - &apos;Based on Rollup Yes - No Routing&apos;
         -- ===============================================
         select &apos;Based on Rollup Yes - No Routing&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and rept.planning_make_buy_code = 1 and rept.based_on_rollup_flag = 1 and rept.routing = &apos;N&apos;
         union all
         -- ===============================================
         -- Report 3 - &apos;Based on Rollup Yes - No Rollup&apos;
         -- ===============================================
         select &apos;Based on Rollup Yes - No Rollup&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and (rept.planning_make_buy_code = 1 or (rept.planning_make_buy_code = 2 and rept.sourcing_rule = &apos;Y&apos;)) and rept.based_on_rollup_flag = 1
                and not exists
                        (select &apos;x&apos;
                         from   cst_item_cost_details cicd
                         where  cicd.organization_id    = rept.organization_id
                         and    cicd.inventory_item_id  = rept.inventory_item_id
                         and    cicd.cost_type_id       = rept.cost_type_id
                         and    cicd.rollup_source_type = 3 -- rolled up
                        )
         union all
         -- ===============================================
         -- Report 4 - &apos;Based on Rollup Yes - Buy Items&apos;
         -- ===============================================
         select &apos;Based on Rollup Yes - Buy Items&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and rept.planning_make_buy_code = 2 and rept.based_on_rollup_flag = 1 and rept.sourcing_rule = &apos;N&apos;
         union all
         -- ===============================================
         -- Report 5 - &apos;Based on Rollup No - With BOMs&apos;
         -- ===============================================
         select &apos;Based on Rollup No - With BOMs&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and rept.planning_make_buy_code = 1 and rept.based_on_rollup_flag = 2 and (rept.bom = &apos;Y&apos; or rept.routing = &apos;Y&apos;)
         union all 
         -- ===============================================
         -- Report 6 - &apos;Based on Rollup No - With Sourcing Rules&apos;
         -- ===============================================
         select &apos;Based on Rollup No - With Sourcing Rules&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and rept.based_on_rollup_flag = 2 and rept.sourcing_rule = &apos;Y&apos;
         union all
         -- ===============================================
         -- Report 7 - &apos;Based on Rollup No - Make Items&apos;
         -- ===============================================
         select &apos;Based on Rollup No - Make Items&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and rept.planning_make_buy_code = 1 and rept.based_on_rollup_flag = 2
         union all
         -- ===============================================
         -- Report 8 - &apos;Lot-Based Resources With Lot Size 1&apos;
         -- ===============================================
         select &apos;Lot-Based Resources With Lot Size 1&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and nvl(rept.cost_lot_size,1) = 1 and rept.planning_make_buy_code = 1
                and exists
                        -- check to see if there are material or resource charges based on Lot
                        (select &apos;x&apos;
                         from   cst_item_cost_details cicd
                         where  cicd.organization_id    = rept.organization_id
                         and    cicd.inventory_item_id  = rept.inventory_item_id
                         and    cicd.cost_type_id       = rept.cost_type_id
                         and    cicd.basis_type         = 2 -- Lot
                        )
         union all
         -- ===============================================
         -- Report 9 - BOMs With No Components
         -- ===============================================
         select &apos;BOMs With No Components&apos; report_type, rept.* from rept where rept.costing_enabled_flag = &apos;Y&apos; and rept.based_on_rollup_flag = 1 and rept.bom = &apos;Y&apos;
                and not exists
                        -- check to see if a BOM exists with components
                        (select &apos;x&apos;
                         from   bom_structures_b bom,
                                bom_components_b comp
                         where  bom.organization_id     = rept.organization_id
                         and    bom.assembly_item_id    = rept.inventory_item_id
                         and    bom.bill_sequence_id    = comp.bill_sequence_id
                         and    comp.effectivity_date  &lt;= sysdate
                         and    nvl(comp.disable_date, sysdate+1) &gt;  sysdate        
                        )
         union all
         -- ==========================================
         -- Report 10 - Item Costing vs. Item Asset Controls
         -- ==========================================
         -- Costing_Enabled &lt;&gt; Item_Inventory_Asset
         select &apos;Item Costing vs. Item Asset Controls&apos; report_type, rept.* from rept where rept.costing_enabled_flag &lt;&gt; rept.inventory_asset_flag
         union all
         -- ===============================================
         -- Report 11 - Item Asset vs. Costing Asset Controls
         -- ===============================================
         -- Item_Inventory_Asset &lt;&gt; Cost Inventory_Asset
         select &apos;Item Asset vs. Costing Asset Controls&apos; report_type, rept.* from rept where rept.inventory_asset_flag &lt;&gt; decode(rept.cost_asset_flag, 1, &apos;Y&apos;, &apos;N&apos;)
         -- Revision for version 1.35
         union all
         -- ===============================================
         -- Report 12 - Based on Rollup No - Defaulted Costs
         -- ===============================================
         select &apos;Based on Rollup No - Defaulted Costs&apos; report_type, rept.* from rept where rept.defaulted_flag = 1 and rept.based_on_rollup_flag = 2
        -- End revision for version 1.35
        ) rept_all
-- ===================================================================
-- Joins for the lookup codes
-- ===================================================================
where   ml1.lookup_type             = &apos;MTL_PLANNING_MAKE_BUY&apos;
and     ml1.lookup_code             = rept_all.planning_make_buy_code
and     ml2.lookup_type             = &apos;CST_BONROLLUP_VAL&apos;
and     ml2.lookup_code             = rept_all.based_on_rollup_flag
and     ml3.lookup_type             = &apos;SYS_YES_NO&apos;
and     ml3.lookup_code             = rept_all.cost_asset_flag
-- Revision for version 1.35
and     ml4.lookup_type             = &apos;SYS_YES_NO&apos;
and     ml4.lookup_code             = rept_all.defaulted_flag
-- End revision for version 1.35
-- Revision for version 1.38
and     fl1.lookup_type             = &apos;YES_NO&apos;
and     fl1.lookup_code             = decode(rept_all.bom, rept_all.organization_code, &apos;Y&apos;, &apos;N&apos;)
and     fl2.lookup_type             = &apos;YES_NO&apos;
and     fl2.lookup_code             = decode(rept_all.routing, rept_all.organization_code, &apos;Y&apos;, &apos;N&apos;)
and     fl3.lookup_type             = &apos;YES_NO&apos;
and     fl3.lookup_code             = decode(rept_all.sourcing_rule, rept_all.organization_code, &apos;Y&apos;, &apos;N&apos;)
-- End revision for version 1.38
and     fl4.lookup_type             = &apos;YES_NO&apos;
and     fl4.lookup_code             = rept_all.costing_enabled_flag
and     fl5.lookup_type             = &apos;YES_NO&apos;
and     fl5.lookup_code             = rept_all.inventory_asset_flag
and     fcl.lookup_type (+)         = &apos;ITEM_TYPE&apos;
and     fcl.lookup_code (+)         = rept_all.item_type
-- ===================================================================
-- using the base tables to avoid hr views
-- ===================================================================
and     hoi.org_information_context = &apos;Accounting Information&apos;
and     hoi.organization_id         = rept_all.organization_id
and     hoi.organization_id         = haou.organization_id -- this gets the organization name
-- avoid selecting disabled inventory organizations
and     sysdate &lt; nvl(haou.date_to, sysdate + 1)
and     haou2.organization_id       = to_number(hoi.org_information3) -- this gets the operating unit id
and     hoi.org_information1        = gl.ledger_id      -- this gets the ledger id
-- Revision for version 1.37
-- Revision for Operating Unit and Ledger Controls and Parameters, replacing prior method.
and     (nvl(fnd_profile.value(&apos;XXEN_REPORT_USE_LEDGER_SECURITY&apos;),&apos;N&apos;)=&apos;N&apos; or gl.ledger_id in (select nvl(glsnav.ledger_id,gasna.ledger_id) from gl_access_set_norm_assign gasna, gl_ledger_set_norm_assign_v glsnav where gasna.access_set_id=fnd_profile.value(&apos;GL_ACCESS_SET_ID&apos;) and gasna.ledger_id=glsnav.ledger_set_id(+)))
and     (nvl(fnd_profile.value(&apos;XXEN_REPORT_USE_OPERATING_UNIT_SECURITY&apos;),&apos;N&apos;)=&apos;N&apos; or haou2.organization_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11))
-- End revision for version 1.37
and     1=1                         -- p_operating_unit, p_ledger
-- Order by Report Type, Ledger, Operating_Unit, Org_Code, Cost_Type, Item_Number
order by
        rept_all.report_type,
        nvl(gl.short_name, gl.name),
        haou2.name,
        rept_all.organization_code,
        rept_all.cost_type,
        rept_all.concatenated_segments</SQL_TEXT>
  <VERSION_COMMENTS>1.38 13 Apr 2025 Douglas Volz Second fix ORA-43916 Collation Error for character expressions &apos;Y&apos;, &apos;N&apos;.</VERSION_COMMENTS>
  <ENABLED>Y</ENABLED>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>CAC Cost vs. Planning Item Controls</REPORT_NAME>
    <DESCRIPTION>Compare item make/buy controls vs. costing based on rollup controls, to find errors with your cost rollup results.  There are twelve included reports, see below description for more information.

Available Reports:
1.  Based on Rollup Yes - No BOMS
     Find make items where the item is set to be rolled up but there are no BOMs.  May roll up to a zero cost.
2.  Based on Rollup Yes - No Routing
     Find make items costs are based on the cost rollup, but there are no routings.
3.  Based on Rollup Yes - No Rollup
     Find make items where it is set to be rolled up but there are no rolled up costs
4.  Based on Rollup Yes - Buy Items
     Find buy items where the item is set to rolled up 
5.  Based on Rollup No - With BOMS
     Find make items where the item is not set to be rolled up but BOMS or routings exist.
6.  Based on Rollup No - With Sourcing Rules
     Find buy items where costs are not based on the cost rollup, but sourcing rules exist.
7.  Based on Rollup No - Make Items
     Find make items where the item is not set to rolled up, whether or not BOMs or routings exist. 
8.  Lot-Based Resources With Lot Size One
     Find make items where there are charges based on Lot but the lot size is one.  Duplicates the setup charges for each item you make.
9.  BOMs With No Components
     Find make items with BOMS that have no components.
10.  Item Costing vs. Item Asset Controls
        Find items where the item master costed flag (costed enabled) and the item asset flag do not match.
11.  Item Asset vs. Costing Asset Controls
        Find items where the item master asset and the costing asset flags do not match.
 12.  Based on Rollup No - Defaulted Costs
        Find items where the item is not rolled up but the defaulted flag says Yes

Parameters:
===========
Cost Type:  the Frozen or Pending cost type you wish to report (mandatory).
Assignment Set:  for your organization sourcing rules, enter an assignment set (optional).
Category Sets 1 - 3:  any item category you wish, typically the Cost or Product Line category sets (optional).
Item Number:  enter the specific item number(s) you wish to report (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 2008-2025 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.
-- +=============================================================================+
-- |  1.0     15 Oct 2008 Douglas Volz   Initial Coding
-- |  1.34    06 May 2021 Douglas Volz   Using a with statement, summarized report type queries for efficiency.
-- |  1.35    23 Apr 2022 Douglas Volz   Add new column &quot;Defaulted Costs&quot; and new report type &quot;Based on
-- |                                     Rollup No - Defaulted Costs&quot;.  The defaulted flag indicates
-- |                                     whether the cost of the item is defaulted from the default cost
-- |                                     type during cost rollup.
-- |  1.36   07 Jan 2024 Douglas Volz    Add current onhand quantities, to help find valuation issues.  Remove
-- |                                     tabs, add operating unit and ledger security and inventory access controls.
-- |  1.37   10 Apr 2025 Douglas Volz    Added in new GL and OU security profiles.
-- |  1.38   13 Apr 2025 Douglas Volz    Fix ORA-43916 Collation Error for character expressions &apos;Y&apos;, &apos;N&apos;.
-- +=============================================================================+*/
</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>R12 only</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;category_columns</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>2=2</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>3=3</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>4=4</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</LOV_NAME>
    <LOV_GUID>92C63F4C20A21E85E053BB6B63585CC8</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 or
 cct.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) 
)
order by
cct.cost_type</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Cost Type</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;category_columns</ANCHOR>
    <SQL_TEXT>select xxen_util.item_category_columns(p_category_set_name=&gt;&apos;&lt;parameter_value&gt;&apos;, p_table_alias=&gt;&apos;rept_all&apos;) sql_text from dual</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Category Set</LOV_NAME>
    <LOV_GUID>8E2FF36EDECA79D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select distinct
mcsv.category_set_name value,
mcsv.description
from
mtl_category_sets_vl mcsv
where
:$flex$.organization_code is null or
mcsv.category_set_id in (select mic.category_set_id from mtl_parameters mp, mtl_item_categories mic where xxen_util.contains(:$flex$.organization_code,mp.organization_code)=&apos;Y&apos; and mp.organization_id=mic.organization_id)
order by
mcsv.category_set_name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>coalesce(xxen_util.previous_parameter_value(:parameter_id),(select mdsv.category_set_name from mtl_default_sets_view mdsv where mdsv.functional_area_id=11))</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Category Set 1</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;category_columns</ANCHOR>
    <SQL_TEXT>select xxen_util.item_category_columns(p_category_set_name=&gt;&apos;&lt;parameter_value&gt;&apos;, p_table_alias=&gt;&apos;rept_all&apos;) sql_text from dual</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Category Set</LOV_NAME>
    <LOV_GUID>8E2FF36EDECA79D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select distinct
mcsv.category_set_name value,
mcsv.description
from
mtl_category_sets_vl mcsv
where
:$flex$.organization_code is null or
mcsv.category_set_id in (select mic.category_set_id from mtl_parameters mp, mtl_item_categories mic where xxen_util.contains(:$flex$.organization_code,mp.organization_code)=&apos;Y&apos; and mp.organization_id=mic.organization_id)
order by
mcsv.category_set_name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>coalesce(xxen_util.previous_parameter_value(:parameter_id),(select mdsv.category_set_name from mtl_default_sets_view mdsv where mdsv.functional_area_id=5))</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Category Set 2</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;category_columns</ANCHOR>
    <SQL_TEXT>select xxen_util.item_category_columns(p_category_set_name=&gt;&apos;&lt;parameter_value&gt;&apos;, p_table_alias=&gt;&apos;rept_all&apos;) sql_text from dual</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Category Set</LOV_NAME>
    <LOV_GUID>8E2FF36EDECA79D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select distinct
mcsv.category_set_name value,
mcsv.description
from
mtl_category_sets_vl mcsv
where
:$flex$.organization_code is null or
mcsv.category_set_id in (select mic.category_set_id from mtl_parameters mp, mtl_item_categories mic where xxen_util.contains(:$flex$.organization_code,mp.organization_code)=&apos;Y&apos; and mp.organization_id=mic.organization_id)
order by
mcsv.category_set_name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>xxen_util.previous_parameter_value(:parameter_id)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Category Set 3</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>3=3</ANCHOR>
    <SQL_TEXT>mas.assignment_set_name = :p_assignment_set</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>MRP Assignment Set</LOV_NAME>
    <LOV_GUID>92EDCA82621F0FBDE053BB6B6358DEED</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
mas.assignment_set_name value,
mas.description 
from
mrp_assignment_sets mas 
order by
mas.assignment_set_name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Assignment Set</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>msiv.concatenated_segments = :p_item_number</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Item Number (costing enabled only items)</LOV_NAME>
    <LOV_GUID>EC5CECA520510FC8E0530100007F5EB3</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select distinct
msiv.concatenated_segments value,
msiv.description
from
mtl_system_items_vl msiv,
mtl_parameters mp
where
msiv.organization_id = mp.organization_id and
(xxen_util.contains(:$flex$.organization_code,mp.organization_code) = &apos;Y&apos; or
 (:$flex$.organization_code is null 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
(msiv.costing_enabled_flag=&apos;Y&apos; or mp.process_enabled_flag=&apos;Y&apos;)
order by
msiv.concatenated_segments</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Item Number</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>7</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</DISPLAY_SEQUENCE>
    <ANCHOR>4=4</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>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</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>9</SORT_ORDER>
    <DISPLAY_SEQUENCE>90</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_ROW>
    <FLEX_BIND>:$flex$.organization_code</FLEX_BIND>
    <PARAMETER_NAME>Organization Code</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Category Set 1</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.organization_code</FLEX_BIND>
    <PARAMETER_NAME>Organization Code</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Category Set 2</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.organization_code</FLEX_BIND>
    <PARAMETER_NAME>Organization Code</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Category Set 3</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.organization_code</FLEX_BIND>
    <PARAMETER_NAME>Organization Code</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Item Number</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
  </PARAMETER_DEPENDENCIES>
  <TEMPLATES>
   <TEMPLATES_ROW>
    <GUID>3B553ECA773852E56D3B7976734CA583</GUID>
    <TEMPLATE_NAME>Count by Report, Org and Cost Type</TEMPLATE_NAME>
    <DYNAMIC_COLUMNS>Y</DYNAMIC_COLUMNS>
    <DESCRIPTION>Count by Report Type, Ledger, OU, Org Code and Cost Type</DESCRIPTION>
    <OWNER>MFG</OWNER>
    <TEMPLATE_COLUMNS>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
      <COLUMN_NAME>BASED_ON_ROLLUP</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>17</DISPLAY_SEQUENCE>
      <COLUMN_NAME>BOM</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>22</DISPLAY_SEQUENCE>
      <COLUMN_NAME>COSTING_ENABLED</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
      <COLUMN_NAME>COST_CREATION_DATE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>24</DISPLAY_SEQUENCE>
      <COLUMN_NAME>COST_INVENTORY_ASSET</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>26</DISPLAY_SEQUENCE>
      <COLUMN_NAME>COST_LOT_SIZE</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>27</DISPLAY_SEQUENCE>
      <COLUMN_NAME>CURRENCY_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>15</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Class</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>21</DISPLAY_SEQUENCE>
      <COLUMN_NAME>DEFAULTED_FLAG</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>14</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Family</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>28</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_COST</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>31</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_CREATION_DATE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>7</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_DESCRIPTION</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>23</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_INVENTORY_ASSET</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>6</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_NUMBER</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_STATUS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>25</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_STD_LOT_SIZE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>9</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_TYPE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>16</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Inv.Items Description</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>11</DISPLAY_SEQUENCE>
      <COLUMN_NAME>MAKE_BUY_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>29</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ONHAND_QUANTITY</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>12</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Product Cat</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>13</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Product Description</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>1</DISPLAY_SEQUENCE>
      <COLUMN_NAME>REPORT_TYPE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>18</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ROUTING</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>19</DISPLAY_SEQUENCE>
      <COLUMN_NAME>SOURCING_RULE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>8</DISPLAY_SEQUENCE>
      <COLUMN_NAME>UOM_CODE</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>ITEM_NUMBER</COLUMN_NAME>
      <FIELD_TYPE>VALUE</FIELD_TYPE>
      <DISPLAY_SEQUENCE>1</DISPLAY_SEQUENCE>
      <AGGREGATION>COUNT</AGGREGATION>
     </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>REPORT_TYPE</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>3B553ECA773852E56D3B7976734CA583</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>
