<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 No PII) -->
 <LOVS_ROW>
  <GUID>A486BD05719A2A82E053BB6B6358FC8E</GUID>
  <LOV_NAME>CST Cost Type (No AvgRates No PII)</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
cct.cost_type value,
cct.description
from
cst_cost_types cct
where
nvl(cct.disable_date,sysdate)&gt;=sysdate and
cct.organization_id is null and
(cct.cost_type not like &apos;%PII%&apos; or cct.cost_type like &apos;%ICP%&apos;) 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</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 Currency Conversion Type -->
 <LOVS_ROW>
  <GUID>91D3167A335F1204E053BB6B63585EE3</GUID>
  <LOV_NAME>GL Currency Conversion Type</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
gdct.user_conversion_type value, 
gdct.description
from
gl_daily_conversion_types gdct
order by 1</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>
</LOVS>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: CAC PO Price vs. Costing Method Comparison -->
 <REPORTS_ROW>
  <GUID>92DADAD6B551A363E053BB6B6358D65B</GUID>
  <SQL_TEXT>select  nvl(gl.short_name, gl.name) Ledger,
        haou2.name Operating_Unit,
        mp.organization_code Org_Code,
        pv.vendor_name Supplier,
        emp.full_name Buyer,
        msiv.concatenated_segments Item_Number,
        msiv.description Item_Description,
        fcl.meaning Item_Type,
        -- Revision for version 1.19
        -- msiv.inventory_item_status_code Item_Status,
        misv.inventory_item_status_code Item_Status,
        ml.meaning Make_Buy_Code,
        -- Revision for version 1.16 and 1.20
&amp;category_columns
        -- End revision for version 1.16
        -- Revision for version 1.17
        cic.resource_code OSP_Resource,
        pl.vendor_product_num Supplier_Item,
        -- Revision for version 1.20
        round(msiv.list_price_per_unit,5) Target_or_List_Price,
        ph.segment1 PO_Number,
        to_char(pl.line_num) PO_Line,
        -- Revision for version 1.19
        pp.segment1 Project_Number,
        pp.name Project_Name,
        -- Revision for version 1.20
        pll.creation_date Creation_Date,
        pll.promised_date Promised_Date,
        pll.need_by_date Need_by_Date,
        to_char(pr.release_num) PO_Release,
        pr.release_date Release_Date,
        (select max(ms.expected_delivery_date)
         from   mtl_supply ms
         where  ms.supply_type_code in (&apos;PO&apos;,&apos;RECEIVING&apos;,&apos;SHIPMENT&apos;)
         and    ms.item_id                      = msiv.inventory_item_id
         and    ms.to_organization_id           = msiv.organization_id
         and    ms.destination_type_code        in (&apos;INVENTORY&apos;,&apos;SHOP FLOOR&apos;)
         and    ms.po_distribution_id           = pod.po_distribution_id
        ) Expected_Receipt_Date,
        -- End revision for version 1.20
        -- Revision for version 1.19
        -- pll.unit_meas_lookup_code PO_UOM,
        muomv_po.uom_code PO_UOM,
        pll.quantity PO_Quantity,
        pll.quantity_received PO_Quantity_Received,
        nvl(ph.currency_code, gl.currency_code) PO_Currency_Code,
        nvl(pll.price_override, pl.unit_price) PO_Unit_Price,
        -- Revision for version 1.20
        -- pod.rate_date Currency_Rate_Date,
        -- nvl(pod.rate,1) PO_Exchange_Rate,
        decode(pll.match_option, 
                &apos;P&apos;, trunc(nvl(pod.rate_date, pll.creation_date)),
                &apos;R&apos;, trunc(nvl(gdr1.conversion_date, sysdate)),
                trunc(nvl(gdr1.conversion_date, sysdate))) Currency_Rate_Date,
        decode(pll.match_option, 
                &apos;P&apos;, nvl(pod.rate,1),
                &apos;R&apos;, gdr1.conversion_rate,
                gdr1.conversion_rate) PO_Exchange_Rate,
        gl.currency_code GL_Currency_Code,
        decode(pll.match_option, 
                &apos;P&apos;, nvl(pod.rate,1),
                &apos;R&apos;, gdr1.conversion_rate,
                gdr1.conversion_rate) * nvl(pll.price_override, pl.unit_price) Converted_PO_Unit_Price,
        ucr.conversion_rate PO_UOM_Conversion_Rate,
        decode(pll.match_option, 
                &apos;P&apos;, nvl(pod.rate,1),
                &apos;R&apos;, gdr1.conversion_rate,
                gdr1.conversion_rate) * nvl(pll.price_override, pl.unit_price) * ucr.conversion_rate Converted_PO_at_Primary_UOM,
        -- End revision for version 1.20
        -- Revision for version 1.19
        -- msiv.primary_uom_code UOM_Code,
        muomv_msi.uom_code UOM_Code,
        -- Revision for version 1.21
        cic.cost_type Cost_Type,
        nvl(cic.unburdened_cost,0) Unburdened_Unit_Cost,
        -- Revision for version 1.20
        -- PO Price - Unburdened Cost = Unit Cost Difference
        round((decode(pll.match_option, 
                &apos;P&apos;, nvl(pod.rate,1),
                &apos;R&apos;, gdr1.conversion_rate,
                gdr1.conversion_rate) * 
                nvl(pll.price_override, pl.unit_price)) - nvl(cic.unburdened_cost,0),5) Unit_Cost_Difference,
        -- PO Price - Unburdened Cost X Quantity = Extended Cost Difference
        round((decode(pll.match_option, 
                &apos;P&apos;, nvl(pod.rate,1),
                &apos;R&apos;, gdr1.conversion_rate,
                gdr1.conversion_rate) * nvl(pll.price_override, pl.unit_price) -
                nvl(cic.unburdened_cost,0)) * nvl(pll.quantity,0),2) Extended_Cost_Difference,
        -- Revision for version 1.20
        -- round(((nvl(ph.rate,1) * nvl(pll.price_override, pl.unit_price)) - nvl(cic.unburdened_cost,0)) /
        --         decode(nvl(cic.unburdened_cost,0),0,1,nvl(cic.unburdened_cost,0)) * 100,1) Percent,
        -- Calculate the Percent Difference
        -- when PO price - item cost = 0 then 0
        -- when item cost = 0 then 100 * SIGN PO price
        -- when PO price  = 0 then -100 * SIGN item cost
        -- else (PO price - item cost) / item cost
        case
           when round(decode(pll.match_option, 
                        &apos;P&apos;, nvl(pod.rate,1), 
                        &apos;R&apos;, gdr1.conversion_rate,
                        gdr1.conversion_rate
                     ) * nvl(pll.price_override, pl.unit_price) - nvl(cic.unburdened_cost,0),5) = 0
                then 0
           when round(nvl(cic.unburdened_cost,0),5) = 0
                then 100 * SIGN(nvl(pll.price_override, pl.unit_price))
           when round(decode(pll.match_option, 
                        &apos;P&apos;, nvl(pod.rate,1), 
                        &apos;R&apos;, gdr1.conversion_rate,
                        gdr1.conversion_rate
                     ) * nvl(pll.price_override, pl.unit_price),5) = 0
                then -100 * SIGN(nvl(cic.unburdened_cost,0))
           -- Revision for version 1.23
           -- else round(decode(pll.match_option, 
           --      &apos;P&apos;, nvl(pod.rate,1), 
           --      &apos;R&apos;, gdr1.conversion_rate,
           --      gdr1.conversion_rate) * nvl(pll.price_override, pl.unit_price) - nvl(cic.unburdened_cost,0) /
           --      nvl(cic.unburdened_cost,0) * 100,2)
           else round((decode(pll.match_option, 
                                &apos;P&apos;, nvl(pod.rate,1), 
                                &apos;R&apos;, gdr1.conversion_rate,
                                gdr1.conversion_rate) * nvl(pll.price_override, pl.unit_price) - nvl(cic.unburdened_cost,0)) /
                                nvl(cic.unburdened_cost,0) * 100,2)
           -- End revision for version 1.23
        end Percent_Difference,
        -- End revision for version 1.20
        -- Revision for version 1.21
        cic.cost_type               Cost_Type,
        cic.material_cost           Material_Cost,
        cic.material_overhead_cost  Material_Overhead_Cost,
        cic.resource_cost           Resource_Cost,
        cic.outside_processing_cost Outside_Processing_Cost,
        cic.overhead_cost           Overhead_Cost,
        cic.item_cost               Item_Cost
from    po_headers_all              ph,
        po_lines_all                pl,
        po_line_locations_all       pll,
        po_distributions_all        pod,
        po_releases_all             pr,
        po_vendors                  pv,
        -- Revision for version 1.19
        pa_projects_all             pp,
        mtl_system_items_vl         msiv,
        mtl_uom_conversions_view    ucr,
        -- Revision for version 1.19
        mtl_units_of_measure_vl     muomv_po,
        mtl_units_of_measure_vl     muomv_msi,
        mtl_item_status_vl          misv,
        -- End revision for version 1.10
        mfg_lookups                 ml,
        fnd_common_lookups          fcl,
        (select cct.cost_type,
                msiv.inventory_item_id inventory_item_id,
                crc.organization_id organization_id,
                -- Revision for version 1.17
                br.resource_code,
                0 material_cost,
                0 material_overhead_cost,
                0 resource_cost,
                nvl(crc.resource_rate,0) outside_processing_cost,
                0 overhead_cost,
                nvl(crc.resource_rate,0) unburdened_cost,
                nvl(crc.resource_rate,0) item_cost
         from   cst_resource_costs  crc,
                cst_cost_types      cct,
                bom_resources       br,
                mtl_system_items_vl msiv,
                mtl_parameters      mp
         where  crc.cost_type_id      = cct.cost_type_id
         and    crc.resource_id       = br.resource_id
         and    crc.organization_id   = br.organization_id
         and    crc.organization_id   = mp.organization_id
         and    br.purchase_item_id   = msiv.inventory_item_id
         and    br.organization_id    = msiv.organization_id
         and    mp.organization_id    = msiv.organization_id
         and    msiv.item_type        = &apos;OP&apos;
         -- Revision for version 1.22
         -- and    cct.cost_type_id      = mp.primary_cost_method
         and    2=2                   -- p_org_code
         and    3=3                   -- p_cost_type
         and    mp.organization_code in (select oav.organization_code from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
         -- End revision for version 1.22
         -- Revision for version 1.21
         -- union all
         union
         select cct.cost_type,
                cic.inventory_item_id inventory_item_id,
                cic.organization_id organization_id,
                -- Revision for version 1.17
                null resource_code,
                nvl(cic.material_cost,0) material_cost,
                nvl(cic.material_overhead_cost,0) material_overhead_cost,
                nvl(cic.resource_cost,0) resource_cost,
                nvl(cic.outside_processing_cost,0) outside_processing_cost,
                nvl(cic.overhead_cost,0) overhead_cost,
                nvl(cic.unburdened_cost,0) unburdened_cost,
                nvl(cic.item_cost,0) item_cost
         from   cst_item_costs      cic,
                cst_cost_types      cct,
                mtl_system_items_vl msiv,
                mtl_parameters      mp
         where  cic.organization_id   = msiv.organization_id
         and    mp.organization_id    = msiv.organization_id
         and    cic.inventory_item_id = msiv.inventory_item_id
         and    msiv.item_type        &lt;&gt; &apos;OP&apos;
         and    cic.cost_type_id      = cct.cost_type_id
         -- Revision for version 1.22
         -- and    cct.cost_type_id      = mp.primary_cost_method
         and    2=2                   -- p_org_code
         and    3=3                   -- p_cost_type
         and    mp.organization_code in (select oav.organization_code from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
         -- End revision for version 1.22
        ) cic, -- costs per the Cost Method
        hr_employees                 emp,
        mtl_parameters               mp,
        hr_locations                 hl,
        hr_organization_information  hoi,
        hr_all_organization_units_vl haou,  -- inv_organization_id
        hr_all_organization_units_vl haou2, -- operating unit
        gl_ledgers                   gl,
        -- Revision for version 1.20
        -- ===========================================================================
        -- Select current Currency Rates based on the currency conversion date
        -- ===========================================================================
        (select gdr1.from_currency,
                gdr1.to_currency,
                gdct1.user_conversion_type,
                gdr1.conversion_date,
                gdr1.conversion_rate
         from   gl_daily_rates gdr1,
                gl_daily_conversion_types gdct1
         where  exists (
                        select  &apos;x&apos;
                        from    mtl_parameters mp,
                                hr_organization_information hoi,
                                hr_all_organization_units_vl haou,
                                hr_all_organization_units_vl haou2,
                                gl_ledgers gl
                        -- =================================================
                        -- Get inventory ledger and operating unit information
                        -- =================================================
                        where   hoi.org_information_context   = &apos;Accounting Information&apos;
                        and     hoi.organization_id           = mp.organization_id
                        and     hoi.organization_id           = haou.organization_id            -- this gets the organization name
                        and     haou2.organization_id         = to_number(hoi.org_information3) -- this gets the operating unit id
                        and     gl.ledger_id                  = to_number(hoi.org_information1) -- get the ledger_id
                        and     gdr1.to_currency              = gl.currency_code
                        -- Do not report the master inventory organization
                        and     mp.organization_id           &lt;&gt; mp.master_organization_id
                       )
         and    gdr1.conversion_type           = gdct1.conversion_type
         and    4=4                            -- p_curr_conv_date1
         and    5=5                            -- p_curr_conv_type1
         union all
         select gl.currency_code,              -- from_currency
                gl.currency_code,              -- to_currency
                gdct1.user_conversion_type,    -- user_conversion_type
                :p_curr_conv_date1,            -- conversion_date                                             -- p_curr_conv_date1
                1                              -- conversion_rate
         from   gl_ledgers gl,
                gl_daily_conversion_types gdct1
         where  5=5                            -- p_curr_conv_type1
         group by
                gl.currency_code,
                gl.currency_code,
                gdct1.user_conversion_type,                                                                  -- p_curr_conv_date1
                :p_curr_conv_date1,           -- conversion_date                                             -- p_curr_conv_date1
                1
        ) gdr1 -- Current Currency Rates
        -- End for revision 1.20
where   ph.po_header_id                 = pl.po_header_id
and     pl.po_line_id                   = pll.po_line_id
and     pll.line_location_id            = pod.line_location_id
and     pr.po_release_id (+)            = pod.po_release_id
and     pll.closed_code                 =  &apos;OPEN&apos;
and     pv.vendor_id                    = ph.vendor_id
-- Revision for version 1.19
and     pp.project_id (+)               = pod.project_id
and     muomv_po.unit_of_measure        = pll.unit_meas_lookup_code
and     muomv_msi.uom_code              = msiv.primary_uom_code
and     misv.inventory_item_status_code = msiv.inventory_item_status_code
-- End revision for version 1.19
and     msiv.inventory_item_id          = ucr.inventory_item_id
and     msiv.organization_id            = ucr.organization_id
and     ucr.unit_of_measure             = pl.unit_meas_lookup_code
and     pl.item_id                      = msiv.inventory_item_id
and     cic.inventory_item_id           = msiv.inventory_item_id
and     cic.organization_id             = msiv.organization_id
and     ml.lookup_type                  = &apos;MTL_PLANNING_MAKE_BUY&apos;
and     ml.lookup_code                  = msiv.planning_make_buy_code
and     fcl.lookup_type (+)             = &apos;ITEM_TYPE&apos;
and     fcl.lookup_code (+)             = msiv.item_type
and     ph.agent_id                     = emp.employee_id
and     mp.organization_id              = msiv.organization_id
and     pll.ship_to_location_id         = hl.ship_to_location_id
and     msiv.organization_id            = pll.ship_to_organization_id
and     1=1 -- p_creation_date_from, p_creation_date_to, p_min_value_diff, p_min_cost_diff, p_operating_unit, p_ledger
and     2=2 -- p_org_code
-- ===================================================================
-- Joins for the currency exchange rates
-- ===================================================================
-- Current FX rate
and     ph.currency_code                = gdr1.from_currency
and     gl.currency_code                = gdr1.to_currency
-- ===================================================================
-- Using the base tables instead of HR organization views
-- ===================================================================
and     hoi.org_information_context     = &apos;Accounting Information&apos;
and     hoi.organization_id             = mp.organization_id
and     hoi.organization_id             = haou.organization_id   -- this gets the organization name
and     haou2.organization_id           = to_number(hoi.org_information3) -- this gets the operating unit id
and     gl.ledger_id                    = to_number(hoi.org_information1) -- get the ledger_id
-- Revision for version 1.22
and     mp.organization_code in (select oav.organization_code from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
-- ===================================================================
order by
        nvl(gl.short_name, gl.name), -- Ledger
        haou2.name, -- Operating_Unit
        mp.organization_code, -- Org_Code
        pv.vendor_name, -- Supplier
        msiv.concatenated_segments, -- Item_Number
        pl.vendor_product_num, -- Supplier_Item
        ph.segment1, -- PO_Number
        to_char(pl.line_num), -- PO_Line
        to_char(pr.release_num) -- PO_Rel</SQL_TEXT>
  <VERSION_COMMENTS>1.23    18 Jul 2024 Douglas Volz   Fix for Percent Difference calculation.</VERSION_COMMENTS>
  <ENABLED>Y</ENABLED>
  <NUMBER_FORMAT>#,##0.00000;[Red](#,##0.00000)</NUMBER_FORMAT>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>CAC PO Price vs. Costing Method Comparison</REPORT_NAME>
    <DESCRIPTION>Report to compare the open purchase order lines and unit prices with the costing method item cost in Oracle (Average, Standard, FIFO or LIFO).  Used by the buyers and cost accounting to check the accuracy of the recently created purchase orders and run using a range of purchase order line creation dates.  Foreign currency purchase orders convert to the inventory organization&apos;s currency by either using the original purchase order exchange rate, if the Invoice Match Option is &quot;Purchase Order&quot; or by using the latest exchange rate date if the Invoice Match Option is &quot;Receipt&quot;.

Parameters:
===========
Creation Date From:  purchase order starting creation date (mandatory).
Creation Date To: purchase order ending creation date (mandatory).
Cost Type:  enter the cost type you wish to report (mandatory).  Defaults to your Costing Method.
Minimum Value Difference:  the absolute smallest difference you want to report (mandatory).
Minimum Cost Difference:  the absolute smallest difference you want to report (mandatory).
Currency Conversion Type:  enter the currency conversion type for translating PO unit prices, used if the Invoice Match Option is &quot;Receipt&quot;, defaults to Corporate (mandatory).
Currency Conversion Date:  enter the currency conversion date for translating PO unit prices, used if the Invoice Match Option is &quot;Receipt&quot; (mandatory).
Category Set 1:  the first item category set to report, typically the Cost or Product Line Category Set (optional).
Category Set 2:  the second item category set to report, typically the Inventory Category Set (optional).
Item Number:  enter the item numbers 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 2006-2024 Douglas Volz Consulting, Inc.
-- |  All rights reserved.
-- |  Permission to use this code is granted provided the original author is
-- |  acknowledged. No warranties, express or otherwise is included in this
-- |  permission.
-- +=============================================================================+
-- |
-- |  Original Author: Douglas Volz (doug@volzconsulting.com
-- | 
-- |  Version Modified on Modified  by   Description
-- |  ======= =========== ============== =========================================
-- |  1.0     02 APR 2006 Douglas Volz   Initial Coding
-- |  1.17    13 Jun 2017 Douglas Volz   Added OSP Resource Code
-- |  1.18    19 Aug 2019 Douglas Volz   Removed non-generic item categories
-- |  1.19    27 Jan 2020 Douglas Volz   Changed to multi-language views for the item
-- |                                     master, inventory orgs and operating units.
-- |                                     Added project number to report.
-- |  1.20    19 Dec 2020 Douglas Volz   Add these columns: PO Need By Date, PO Promise Date,
-- |                                     PO Expected Receipt Date, Target Price (PO List Price),
-- |                                     Customer Name (description for category set 1).  
-- |                                     And added Minimum Cost Difference parameter.
-- |  1.21    22 Dec 2020 Douglas Volz   Changed the item cost &quot;union all&quot; to just &quot;union&quot;, 
-- |                                     which eliminated a full table scan on cst_item_costs.
-- |  1.22    02 Nov 2023 Douglas Volz   Add Cost Type as a parameter, remove tabs and
-- |                                     add org access controls.
-- |  1.23    18 Jul 2024 Douglas Volz   Fix for Percent Difference calculation.
-- +=============================================================================+*/</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>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_ROW>
    <ANCHOR>5=5</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_curr_conv_date1</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>pll.creation_date &gt;= :p_creation_date_from</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>sysdate-7</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Creation Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>pll.creation_date &lt; :p_creation_date_to + 1</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>sysdate</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Creation Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>3=3</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 No PII)</LOV_NAME>
    <LOV_GUID>A486BD05719A2A82E053BB6B6358FC8E</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
cct.cost_type value,
cct.description
from
cst_cost_types cct
where
nvl(cct.disable_date,sysdate)&gt;=sysdate and
cct.organization_id is null and
(cct.cost_type not like &apos;%PII%&apos; or cct.cost_type like &apos;%ICP%&apos;) 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</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select
cct.cost_type value,
cct.description
from
cst_cost_types cct,
mtl_parameters mp
where
nvl(cct.disable_date,sysdate + 1) &gt; sysdate and
cct.organization_id is null and
cct.cost_type_id = mp.primary_cost_method and
(mp.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;)
 or
 (fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;) is null and cct.cost_type_id = mp.primary_cost_method)
) and
rownum &lt; 2
group by
cct.cost_type, cct.description
order by
cct.cost_type</DEFAULT_VALUE>
    <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>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>abs(round((decode(pll.match_option,&apos;P&apos;, nvl(pod.rate,1),&apos;R&apos;, gdr1.conversion_rate, gdr1.conversion_rate)
  * nvl(pll.price_override, pl.unit_price) - nvl(cic.unburdened_cost,0)) * nvl(pll.quantity,0),2)) &gt;= :p_min_value_diff</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>1</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Minimum Value Difference</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>abs(round((decode(pll.match_option,&apos;P&apos;, nvl(pod.rate,1),&apos;R&apos;, gdr1.conversion_rate, gdr1.conversion_rate)
  * nvl(pll.price_override, pl.unit_price) - nvl(cic.unburdened_cost,0)),2)) &gt;= :p_min_cost_diff</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>.001</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Minimum Cost Difference</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>5=5</ANCHOR>
    <SQL_TEXT>gdct1.user_conversion_type = :p_curr_conv_type</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Currency Conversion Type</LOV_NAME>
    <LOV_GUID>91D3167A335F1204E053BB6B63585EE3</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
gdct.user_conversion_type value, 
gdct.description
from
gl_daily_conversion_types gdct
order by 1</LOV_QUERY_DSP>
    <DEFAULT_VALUE>Corporate</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Currency Conversion Type</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>gdr1.conversion_date = :p_curr_conv_date1</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>select oap.schedule_close_date value,
 oap.period_name description
from apps.org_acct_periods oap
where oap.acct_period_id =
 (select max(oap2.acct_period_id)
  from org_acct_periods oap2
  where oap2.schedule_close_date =
  (select max(oap3.schedule_close_date)
   from org_acct_periods oap3,
   org_organization_definitions ood
   where ood.organization_id = oap3.organization_id
   and nvl(ood.disable_date,sysdate + 1) &gt; sysdate
  ) 
 )</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Currency Conversion Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</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>9</SORT_ORDER>
    <DISPLAY_SEQUENCE>90</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>10</SORT_ORDER>
    <DISPLAY_SEQUENCE>100</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>11</SORT_ORDER>
    <DISPLAY_SEQUENCE>110</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>12</SORT_ORDER>
    <DISPLAY_SEQUENCE>120</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>mp.organization_code = :p_org_code</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Organization Code (excluding master)</LOV_NAME>
    <LOV_GUID>91D3167A33531204E053BB6B63585EE3</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
ood.organization_code value,
ood.organization_name description
from
org_organization_definitions ood
where
ood.organization_id not in (select mp.organization_id from mtl_parameters mp where mp.organization_id=mp.master_organization_id) and
(:$flex$.operating_unit is null or ood.operating_unit in (select haouv.organization_id from hr_all_organization_units_vl haouv where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos;)) and
(:$flex$.ledger is null or ood.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
nvl(ood.disable_date,sysdate)&gt;=sysdate
order by
ood.organization_code</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select mp.organization_code from mtl_parameters mp where mp.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Organization Code</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>13</SORT_ORDER>
    <DISPLAY_SEQUENCE>130</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>14</SORT_ORDER>
    <DISPLAY_SEQUENCE>140</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>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
  <UPLOAD_DEPENDENCIES>
  </UPLOAD_DEPENDENCIES>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
