<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 AvgRates) -->
 <LOVS_ROW>
  <GUID>91D3167A335B1204E053BB6B63585EE3</GUID>
  <LOV_NAME>CST Cost Type (No AvgRates)</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.cost_type_id not in (select mp.avg_rates_cost_type_id from mtl_parameters mp where mp.avg_rates_cost_type_id is not null)
order by cct.cost_type desc</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 -->
 <LOVS_ROW>
  <GUID>8E2FF36EDEB879D2E0530100007F1FF2</GUID>
  <LOV_NAME>GL Ledger</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
gl.name value,
fifsv.id_flex_structure_name||&apos;: &apos;||decode(gl.ledger_category_code,&apos;NONE&apos;,xxen_util.meaning(gl.object_type_code,&apos;LEDGERS&apos;,101),xxen_util.meaning(gl.ledger_category_code,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101))||&apos;: &apos;||gl.description description
from
gl_ledgers gl,
fnd_id_flex_structures_vl fifsv
where
(:$flex$.ledger_category is null or gl.ledger_category_code=xxen_util.lookup_code(:$flex$.ledger_category,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101,&apos;Y&apos;)) 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.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
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,
decode(gl.ledger_category_code,&apos;PRIMARY&apos;,1,&apos;SECONDARY&apos;,2,&apos;ALC&apos;,3,&apos;NONE&apos;,4),
gl.name</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>دفاتر الأستاذ المقيدة بمجموعة الوصول ، المحددة بواسطة قيمة الملف الشخصي &quot;مجموعة الوصول إلى بيانات GL&quot; لمسؤولية تسجيل الدخول الحالية</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Ledger, die durch das Zugriffsset eingeschränkt sind, definiert durch den Profilwert &apos;GL Data Access Set&apos; der aktuellen Anmeldeverantwortung</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Libros restringidos por el conjunto de acceso, definido por el valor del perfil &quot;Conjunto de acceso a datos GL&quot; de la responsabilidad de inicio de sesión actual</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Grands livres limités par un ensemble d&apos;accès, défini par la valeur du profil &quot;GL Data Access Set&quot; de la responsabilité de connexion actuelle</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Libri mastri limitati dal set di accesso, definito dal valore del profilo &apos;GL Data Access Set&apos; della responsabilità di login corrente</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>現在のログイン責任者のプロファイル値&apos;GL Data Access Set&apos;によって定義されたアクセスセットによって制限された元帳</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>현재 로그인 권한의 프로파일 값 &apos;GL 데이터 액세스 세트&apos;로 정의 된 액세스 세트로 제한되는 원장</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Ledgers restritos pelo conjunto de acesso, definido pelo valor do perfil &apos;GL Data Access Set&apos; da atual responsabilidade de login</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Леджеры, ограниченные набором доступа, определяемые значением профиля &quot;GL Data Access Set&quot; текущей ответственности за вход в систему</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Ledgers begränsade av åtkomstuppsättning, definierade av profilvärde &apos;GL Data Access Set&apos; för det aktuella inloggningsansvaret</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Mevcut oturum açma sorumluluğunun profil değeri &apos;GL Veri Erişim Kümesi&apos; ile tanımlanan erişim kümesiyle kısıtlanmış defterler</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>Ledgers restricted by access set, defined by profile value &apos;GL Data Access Set&apos; of the current login responsibility</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>由访问集限制的分类账，由当前登录责任的配置文件值 &quot;GL数据访问集 &quot;定义。</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: HR Operating Unit -->
 <LOVS_ROW>
  <GUID>8E2FF36EDEB979D2E0530100007F1FF2</GUID>
  <LOV_NAME>HR Operating Unit</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
hou.name value,
null description
from
hr_operating_units hou
where
sysdate between hou.date_from and nvl(hou.date_to,sysdate) and
(:$flex$.ledger is null or hou.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
hou.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)
order by
hou.name</LOV_QUERY>
  <VERSION_COMMENTS>Fixed where clause duplication</VERSION_COMMENTS>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>وحدة التشغيل مقيدة بالتحكم في الوصول متعدد المنظمات (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Bedieneinheit eingeschränkt durch Multi Org Access Control (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Unidad operativa restringida por el control de acceso multiorgánico (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Unité opérationnelle restreinte par un contrôle d&apos;accès multi-organismes (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Unità operativa limitata dal controllo di accesso multiorgano (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>多機関アクセス制御(MOAC)で制限された操作ユニット</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>다중 조직 액세스 제어 (MOAC)에 의해 제한되는 운영 단위</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Unidade operacional restrita por controle de acesso multi org (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Операционное устройство, ограниченное мультиорганизованным контролем доступа (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Styrenhet begränsad av multi-org access control (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Çoklu kuruluş erişim kontrolü (MOAC) tarafından kısıtlanan işletim birimi</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>Operating unit restricted by multi org access control (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>受多机构访问控制（MOAC）限制的操作单元。</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: 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 User-Defined and Rolled Up Costs -->
 <REPORTS_ROW>
  <GUID>C1BE24025092C29EE053BB6B63586215</GUID>
  <SQL_TEXT>select  nvl(gl.short_name, gl.name) Ledger,
        haou2.name Operating_Unit,
        mp.organization_code Org_Code,
        cct.cost_type Cost_Type,
        msiv.concatenated_segments Item_Number,
        msiv.description Item_Description,
        -- Revision for version 1.4
        muomv.uom_code UOM_Code,
        fcl.meaning Item_Type,
        -- Revision for version 1.4
        misv.inventory_item_status_code Item_Status,
        ml1.meaning Make_Buy_Code,
&amp;category_columns
        -- Revision for version 1.2 and 1.4
        nvl((select max(ml2.meaning)
             from   bom_resources br,
                    cst_item_cost_details cicd,
                    mfg_lookups ml2 -- rollup source type
             where  br.resource_id         = cicd.resource_id
             and    cicd.inventory_item_id = cic.inventory_item_id
             and    cicd.organization_id   = cic.organization_id
             and    cicd.cost_type_id      = cic.cost_type_id
             and    cicd.item_cost        &lt;&gt; 0
             and    cicd.cost_element_id   = 1
             and    ml2.lookup_type        = &apos;CST_SOURCE_TYPE&apos;
             and    ml2.lookup_code        = cicd.rollup_source_type),&apos;&apos;)  Rollup_Source_Type,
        -- End revision for version 1.2
        -- Bug fix for version 1.1
        -- (select distinct br.resource_code
        (select max(br.resource_code)
        -- End bug fix for version 1.1
         from   bom_resources br,
                cst_item_cost_details cicd
         where  br.resource_id         = cicd.resource_id
         and    cicd.inventory_item_id = cic.inventory_item_id
         and    cicd.organization_id   = cic.organization_id
         and    cicd.cost_type_id      = cic.cost_type_id
         and    cicd.item_cost        &lt;&gt; 0
         -- End bug fix for version 1.1
         and    cicd.cost_element_id   = 1) Material_Sub_Element,
        -- check to see if a bom exists
        (select fl.meaning
         from   fnd_lookups fl
         where  fl.lookup_type = &apos;YES_NO&apos;
         and    fl.lookup_code =  
                nvl((select distinct &apos;Y&apos;
                     from   bom_structures_b bom
                     where  bom.organization_id      = mp.organization_id
                     and    bom.assembly_item_id     = cic.inventory_item_id
                     and    bom.alternate_bom_designator is null),
                &apos;N&apos;)
        ) BOM,
        -- check to see if a routing exists
        (select fl.meaning
         from   fnd_lookups fl
         where  fl.lookup_type = &apos;YES_NO&apos;
         and    fl.lookup_code =  
                nvl((select distinct &apos;Y&apos;
                     from   bom_operational_routings bor
                     where  bor.organization_id      = mp.organization_id
                     and    bor.assembly_item_id     = cic.inventory_item_id
                     and    bor.alternate_routing_designator is null),
                &apos;N&apos;)
        ) Routing,
        -- check to see if a sourcing rule exists for the receipt org
        (select fl.meaning
         from   fnd_lookups fl
         where  fl.lookup_type = &apos;YES_NO&apos;
         and    fl.lookup_code =  
                 nvl((select distinct &apos;Y&apos;
                      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    2=2),                  -- p_assignment_set
        &apos;N&apos;)
        ) Sourcing_Rule,
        -- Revision for version 1.4
        ml2.meaning Based_on_Rollup,
        ml3.meaning Inventory_Asset,
        -- End revision for version 1.4
        gl.currency_code Currency_Code,
        cic.item_cost Item_Cost,
        nvl((select sum(nvl(cicd.item_cost,0))
             from   bom_resources br,
                    cst_item_cost_details cicd
             where  br.resource_id          = cicd.resource_id
             and    cicd.inventory_item_id  = cic.inventory_item_id
             and    cicd.organization_id    = cic.organization_id
             and    cicd.cost_type_id       = cic.cost_type_id
             and    cicd.item_cost         &lt;&gt; 0
             and    cicd.cost_element_id    = 1 -- Material Costs
             and    cicd.level_type         = 1 -- This Level
             -- Revision for version 1.5
             -- and    cicd.rollup_source_type in (1,2) -- manually entered or defaulted
             and    cicd.rollup_source_type = 1      -- manually entered
             and    cicd.cost_element_id    = 1),0) Manual_Material_Costs,
        nvl((select sum(nvl(cicd.item_cost,0))
             from   cst_item_cost_details cicd
             where  cicd.inventory_item_id  = cic.inventory_item_id
             and    cicd.organization_id    = cic.organization_id
             and    cicd.cost_type_id       = cic.cost_type_id
             and    cicd.item_cost         &lt;&gt; 0
             and    cicd.cost_element_id    = 1 -- Material Costs
             and    cicd.level_type         = 2 -- Previous Level
             and    cicd.rollup_source_type = 3 -- rolled up material costs
             and    cicd.cost_element_id    = 1),0) Rolled_Up_Material_Costs,
        -- Revision for version 1.2
        nvl((select sum(nvl(cicd.item_cost,0))
             -- Revision for version 1.6
             -- from   bom_resources br,
             --        cst_item_cost_details cicd
             from   cst_item_cost_details cicd
             -- Revision for version 1.6
             -- where  br.resource_id          = cicd.resource_id
             -- and    cicd.inventory_item_id  = cic.inventory_item_id
             where  cicd.inventory_item_id  = cic.inventory_item_id
             and    cicd.organization_id    = cic.organization_id
             and    cicd.cost_type_id       = cic.cost_type_id
             and    cicd.item_cost         &lt;&gt; 0
             and    cicd.cost_element_id   &lt;&gt; 1 -- Material Costs
             and    cicd.level_type         = 1 -- This Level
             -- Revision for version 1.5
             -- and    cicd.rollup_source_type in (1,2) -- manually entered or defaulted
             and    cicd.rollup_source_type = 1      -- manually entered
             -- Revision for version 1.6
             -- and    cicd.cost_element_id    = 1),0) Manual_Other_Costs,
            ),0) Manual_Other_Costs,
        nvl((select sum(nvl(cicd.item_cost,0))
             from   cst_item_cost_details cicd
             where  cicd.inventory_item_id  = cic.inventory_item_id
             and    cicd.organization_id    = cic.organization_id
             and    cicd.cost_type_id       = cic.cost_type_id
             and    cicd.item_cost         &lt;&gt; 0
             and    cicd.cost_element_id   &lt;&gt; 1 -- Material Costs
             -- Revision for version 1.6
             -- and    cicd.level_type         = 2 -- Previous Level
             -- Revision for version 1.5
             -- and    cicd.rollup_source_type = 3      -- rolled up material costs
             and    cicd.rollup_source_type in (2,3) -- rolled up and defaulted material costs
             -- Revision for version 1.6
             -- and    cicd.cost_element_id    = 1),0) Rolled_Up_Other_Costs,
            ),0) Rolled_Up_Other_Costs,
        -- End revision for version 1.6
        -- Revision for version 1.8
        onhand.quantity Onhand_Quantity,
        -- End revision for version 1.8
        cic.creation_date Cost_Creation_Date,
        msiv.creation_date Item_Creation_Date
        -- End revision for version 1.2
from    mtl_parameters mp,
        mtl_system_items_vl msiv,
        -- Revision for version 1.4
        mtl_units_of_measure_vl muomv,
        mtl_item_status_vl misv, 
        -- End revision for version 1.4
        cst_item_costs cic,
        cst_cost_types cct,
        -- Revision for version 1.8
        (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    3=3                            -- p_org_code
         group by
                moqd.organization_id,
                moqd.inventory_item_id
        ) onhand,
        -- End revision for version 1.8
        mfg_lookups ml1, -- planning make buy code
        -- Revision for version 1.4
        mfg_lookups ml2, -- based on rollup, CST_BONROLLUP_VAL
        mfg_lookups ml3, -- Cost inventory_asset_flag, SYS_YES_NO
        -- End revision for version 1.4
        fnd_common_lookups fcl,
        hr_organization_information hoi,
        hr_all_organization_units haou,  -- inv_organization_id
        hr_all_organization_units haou2, -- operating unit
        gl_ledgers gl
-- ===================================================================
-- Cost type, organization, item master and report specific controls
-- ===================================================================
where   cic.cost_type_id                = cct.cost_type_id
and     cct.cost_type                   = nvl(&apos;&amp;p_cost_type&apos;,cct.cost_type)                             -- p_cost_type
and     mp.organization_id              = cic.organization_id
and     msiv.organization_id            = cic.organization_id
and     msiv.inventory_item_id          = cic.inventory_item_id
and     cic.based_on_rollup_flag        = 1 -- rolled up
-- Revision for version 1.2
and     msiv.inventory_item_status_code &lt;&gt; &apos;Inactive&apos;
-- Revision for version 1.4
and     msiv.primary_uom_code           = muomv.uom_code
and     msiv.inventory_item_status_code = misv.inventory_item_status_code
-- End revision for version 1.4
-- Revision for version 1.8
and     onhand.organization_id (+)      = cic.organization_id
and     onhand.inventory_item_id (+)    = cic.inventory_item_id
-- End revision for version 1.8
-- Avoid master inventory organizations
and     mp.organization_id             &lt;&gt; mp.master_organization_id -- the item master org usually does not have costs
-- ===================================================================
-- Joins for the lookup codes
-- ===================================================================
and     ml1.lookup_type                 = &apos;MTL_PLANNING_MAKE_BUY&apos;
and     ml1.lookup_code                 = msiv.planning_make_buy_code
-- Revision for version 1.4
and     ml2.lookup_type                 = &apos;CST_BONROLLUP_VAL&apos;
and     ml2.lookup_code                 = cic.based_on_rollup_flag
and     ml3.lookup_type                 = &apos;SYS_YES_NO&apos;
and     ml3.lookup_code                 = cic.inventory_asset_flag
-- End revision for version 1.4
and     fcl.lookup_type (+)             = &apos;ITEM_TYPE&apos;
and     fcl.lookup_code (+)             = msiv.item_type
-- ===================================================================
-- Using the base tables for HR organization information
-- ===================================================================
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
-- 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.7
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     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     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.7
and     1=1                             -- p_cost_type, p_item_number, p_operating_unit, p_ledger
and     3=3                             -- p_org_code
-- ===================================================================
-- Check to see if BOMS or Routings or Sourcing Rules exist
-- ===================================================================
and     exists 
                -- check to see if a BOM exists
                ((select &apos;x&apos; 
                  from   bom_structures_b bsb
                  where  bsb.organization_id        = cic.organization_id
                  and    bsb.assembly_item_id       = cic.inventory_item_id
                  and    bsb.alternate_bom_designator is null)
                  union all
                  -- check to see if a routing exists
                 (select &apos;x&apos; 
                  from   bom_operational_routings bor
                  where  bor.organization_id        = cic.organization_id
                  and    bor.assembly_item_id       = cic.inventory_item_id)
                union all
                 (select &apos;x&apos;
                  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    2=2)                    -- p_assignment_set
                )
-- ===================================================================
-- Check to see if manually entered costs exist for This Level Costs
-- ===================================================================
and     exists
                (select &apos;x&apos;
                 from   cst_item_cost_details cicd
                 where  cicd.organization_id    = cic.organization_id
                 and    cicd.inventory_item_id  = cic.inventory_item_id
                 and    cicd.cost_type_id       = cic.cost_type_id
                 and    cicd.item_cost         &lt;&gt; 0
                 and    cicd.level_type         = 1 -- This Level
                 and    cicd.cost_element_id    = 1 -- Material Costs
                 -- Revision for version 1.5
                 -- and    cicd.rollup_source_type in (1,2)) -- manually entered or defaulted
                 and    cicd.rollup_source_type = 1)      -- manually entered
-- ===================================================================
-- Check to see if costs exist for Previous Levels / Rolled Up Costs
-- ===================================================================
and     exists
                (select &apos;x&apos;
                 from   cst_item_cost_details cicd
                 where  cicd.organization_id    = cic.organization_id
                 and    cicd.inventory_item_id  = cic.inventory_item_id
                 and    cicd.cost_type_id       = cic.cost_type_id
                 and    cicd.item_cost         &lt;&gt; 0
                 and    cicd.cost_element_id    = 1 -- Material Costs
                 and    cicd.level_type         = 2 -- Previous Level
                 and    cicd.rollup_source_type in (3)) -- rolled up
-- Order by Ledger, Operating Unit, Org Code, Cost Type, Item Number
order by
        nvl(gl.short_name, gl.name),
        haou2.name,
        mp.organization_code,
        cct.cost_type,
        msiv.concatenated_segments</SQL_TEXT>
  <ENABLED>Y</ENABLED>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>CAC User-Defined and Rolled Up Costs</REPORT_NAME>
    <DESCRIPTION>Use this report to find items with both user-defined (manually entered) and rolled up costs, for material and other cost elements.  Useful to find rolled up assemblies where the item costs have been accidentally doubled-up.

Parameters:
===========
Cost Type: enter the cost type to report (mandatory).
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).
Assignment Set:  enter the sourcing rule assignment set, used when transferring items between inventory organizations on internal requisitions.
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 2010-2023 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_user_defined_rolled_up_cost_rept.sql
-- | 
-- |  Version Modified on Modified  by   Description
-- |  ======= =========== ============== =========================================
-- |  1.0     29 Dec 2010 Douglas Volz   Create new report to find items with
-- |                                     both manually entered and rolled up material costs
-- |  1.1     24 May 2011 Douglas Volz   Bug fix for the resource code column
-- |  1.2     19 Oct 2019 Douglas Volz   Add columns for non-material costs
-- |  1.3     27 Jan 2020 Douglas Volz   Added Operating_Unit parameter and outer
-- |                                     join for Item_Type.
-- |  1.4     05 May 2021 Douglas Volz   Modify for multi-language tables.
-- |  1.5     12 Jan 2023 Douglas Volz   Correction for definition of manually entered 
-- |                                     material costs.
-- |  1.6     20 Nov 2023 Douglas Volz   Fix for Manual Other Costs and Rolled Up Other Costs columns.
-- |  1.7     05 Dec 2023 Douglas Volz   Added G/L and Operating Unit security restrictions.
-- |  1.8     07 Jan 2024 Douglas Volz   Add onhand quantities, to help find valuation issues.  Remove tabs.
-- +=============================================================================+*/</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;category_columns</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;p_cost_type</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>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>cct.cost_type = :p_cost_type</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>CST Cost Type (No AvgRates)</LOV_NAME>
    <LOV_GUID>91D3167A335B1204E053BB6B63585EE3</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.cost_type_id not in (select mp.avg_rates_cost_type_id from mtl_parameters mp where mp.avg_rates_cost_type_id is not null)
order by cct.cost_type desc</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;) 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;) 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;) 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>2=2</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>1=1</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>3=3</ANCHOR>
    <SQL_TEXT>mp.organization_code = :p_org_code</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <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
ood.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
(:$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>HR Operating Unit</LOV_NAME>
    <LOV_GUID>8E2FF36EDEB979D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
hou.name value,
null description
from
hr_operating_units hou
where
sysdate between hou.date_from and nvl(hou.date_to,sysdate) and
(:$flex$.ledger is null or hou.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
hou.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)
order by
hou.name</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</LOV_NAME>
    <LOV_GUID>8E2FF36EDEB879D2E0530100007F1FF2</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;||decode(gl.ledger_category_code,&apos;NONE&apos;,xxen_util.meaning(gl.object_type_code,&apos;LEDGERS&apos;,101),xxen_util.meaning(gl.ledger_category_code,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101))||&apos;: &apos;||gl.description description
from
gl_ledgers gl,
fnd_id_flex_structures_vl fifsv
where
(:$flex$.ledger_category is null or gl.ledger_category_code=xxen_util.lookup_code(:$flex$.ledger_category,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101,&apos;Y&apos;)) 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.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
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,
decode(gl.ledger_category_code,&apos;PRIMARY&apos;,1,&apos;SECONDARY&apos;,2,&apos;ALC&apos;,3,&apos;NONE&apos;,4),
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>Operating Unit</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <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>179BBEF0E93DB29DA0862FDD053C6AE4</GUID>
    <TEMPLATE_NAME>Count by Org by Cost Type</TEMPLATE_NAME>
    <DYNAMIC_COLUMNS>Y</DYNAMIC_COLUMNS>
    <OWNER>MFG</OWNER>
    <TEMPLATE_COLUMNS>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>21</DISPLAY_SEQUENCE>
      <COLUMN_NAME>BASED_ON_ROLLUP</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>18</DISPLAY_SEQUENCE>
      <COLUMN_NAME>BOM</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>4</DISPLAY_SEQUENCE>
      <COLUMN_NAME>COST_TYPE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>23</DISPLAY_SEQUENCE>
      <COLUMN_NAME>CURRENCY_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>14</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Class</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>13</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Family</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>22</DISPLAY_SEQUENCE>
      <COLUMN_NAME>INVENTORY_ASSET</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>24</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_COST</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>29</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_CREATION_DATE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>6</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_DESCRIPTION</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>5</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_NUMBER</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>9</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_STATUS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>8</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ITEM_TYPE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>15</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Inv.Items Description</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>1</DISPLAY_SEQUENCE>
      <COLUMN_NAME>LEDGER</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
      <COLUMN_NAME>MAKE_BUY_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>25</DISPLAY_SEQUENCE>
      <COLUMN_NAME>MANUAL_MATERIAL_COSTS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>27</DISPLAY_SEQUENCE>
      <COLUMN_NAME>MANUAL_OTHER_COSTS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>17</DISPLAY_SEQUENCE>
      <COLUMN_NAME>MATERIAL_SUB_ELEMENT</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>2</DISPLAY_SEQUENCE>
      <COLUMN_NAME>OPERATING_UNIT</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>3</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ORG_CODE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>11</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Product Cat</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>12</DISPLAY_SEQUENCE>
      <COLUMN_NAME>Product Description</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>26</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ROLLED_UP_MATERIAL_COSTS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>28</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ROLLED_UP_OTHER_COSTS</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>16</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ROLLUP_SOURCE_TYPE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>19</DISPLAY_SEQUENCE>
      <COLUMN_NAME>ROUTING</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
      <COLUMN_NAME>SOURCING_RULE</COLUMN_NAME>
     </TEMPLATE_COLUMNS_ROW>
     <TEMPLATE_COLUMNS_ROW>
      <DISPLAY_SEQUENCE>7</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>4</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>1</DISPLAY_SEQUENCE>
     </TEMPLATE_PIVOT_ROW>
     <TEMPLATE_PIVOT_ROW>
      <COLUMN_NAME>OPERATING_UNIT</COLUMN_NAME>
      <FIELD_TYPE>ROW</FIELD_TYPE>
      <DISPLAY_SEQUENCE>2</DISPLAY_SEQUENCE>
     </TEMPLATE_PIVOT_ROW>
     <TEMPLATE_PIVOT_ROW>
      <COLUMN_NAME>ORG_CODE</COLUMN_NAME>
      <FIELD_TYPE>ROW</FIELD_TYPE>
      <DISPLAY_SEQUENCE>3</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>179BBEF0E93DB29DA0862FDD053C6AE4</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>
