<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: 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 (master, costing enabled only) -->
 <LOVS_ROW>
  <GUID>91D022B15B12FFB9E053BB6B63587F0B</GUID>
  <LOV_NAME>INV Item (master, costing enabled only)</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <FILTER_BEFORE_DISPLAY>Y</FILTER_BEFORE_DISPLAY>
  <LOV_QUERY>select
msiv.concatenated_segments value,
msiv.description
from
mtl_system_items_vl msiv
where
msiv.organization_id=(
select
max(mp.master_organization_id) master_organization_id
from
mtl_parameters mp
where
mp.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;) or
fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;) 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;
order by
msiv.concatenated_segments</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>All costing enabled items from item master org</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: INV Period -->
 <LOVS_ROW>
  <GUID>8E2FF36EDF2279D2E0530100007F1FF2</GUID>
  <LOV_NAME>INV Period</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select distinct
oap.period_name value,
max(oap.period_year||&apos;-&apos;||oap.period_num||&apos;, &apos;||xxen_util.meaning(nvl2(oap.period_close_date,decode(oap.open_flag,&apos;P&apos;,2,&apos;N&apos;,decode(oap.summarized_flag,&apos;N&apos;,65,66),4),3),&apos;MTL_ACCT_PERIOD_STATUS&apos;,700)||&apos; (&apos;||oap.period_start_date||&apos; - &apos;||oap.schedule_close_date||&apos;)&apos;) over (partition by oap.period_name) description,
max(oap.period_start_date) over (partition by oap.period_name) period_start_date,
max(oap.effective_period_num) over (partition by oap.period_name) effective_period_num
from
gl_ledgers gl,
org_organization_definitions ood,
mtl_parameters mp,
(select oap.period_year*10000+oap.period_num effective_period_num, oap.* from org_acct_periods oap) oap
where
oap.period_start_date&lt;=sysdate and
(:$flex$.ledger is null or xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;) and
(:$flex$.organization_code is null or xxen_util.contains(:$flex$.organization_code,ood.organization_code)=&apos;Y&apos;) and
ood.organization_id=mp.organization_id and
mp.organization_id&lt;&gt;mp.master_organization_id and 
gl.period_set_name=oap.period_set_name and
gl.ledger_id=ood.set_of_books_id and
ood.organization_id=oap.organization_id
order by
period_start_date desc,
effective_period_num desc,
oap.period_name</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>فترات دفتر الأستاذ العام السابقة للمخزون (تعتمد على دفتر الأستاذ و / أو معلمة رمز المؤسسة) للمؤسسات غير الرئيسية</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Vergangene Bestands-GL-Perioden (abhängig von Ledger- und/oder Organisationscode-Parameter) für Nicht-Master-Organisationen</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Períodos GL de inventario pasados (dependientes de los parámetros del libro mayor y/o del código de organización) para organizaciones no maestras</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Périodes passées de GL d&apos;inventaire (dépendant du grand livre et/ou du code d&apos;organisation) pour les organisations non maîtresses</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Periodi GL di inventario passati (dipendente dal parametro del ledger e/o del codice dell&apos;organizzazione) per organizzazioni non master</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>非マスター組織の過去のインベントリGL期間（元帳および/または組織コードパラメータに依存する）。</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>비 마스터 조직에 대한 과거 재고 GL 기간 (원장 및 / 또는 조직 코드 매개 변수에 따라 다름)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Períodos GL de inventário anteriores (ledger e/ou código de organização dependente do parâmetro) para organizações não-mestras</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Прошлые инвентаризационные GL-периоды (зависящие от бухгалтерской книги и/или параметра организационного кода) для неосновных организаций</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Tidigare lager GL-perioder (storbok och / eller organisationskodparameter beroende) för icke-huvudorganisationer</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Ana olmayan kuruluşlar için geçmiş envanter GL dönemleri (genel muhasebe ve / veya kuruluş kodu parametresine bağlı)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>Past inventory GL periods (ledger and/or organization code parameter dependent) for non master organizations</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>非主组织的过去库存GL期(分类账和/或组织代码参数而定)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
</LOVS>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: CAC WIP Period Balances to Accounting Activity Reconciliation -->
 <REPORTS_ROW>
  <GUID>BF6B2BB8A56B2447E0530100007FAE1C</GUID>
  <SQL_TEXT>select wipsum.period_name Period_Name,
 -- Revision for version 1.1
 nvl(gl.short_name, gl.name) Ledger,
 haou2.name Operating_Unit,
 -- End revision for version 1.1
 wip.organization_code Org_Code,
 wip.organization_id Org_Id,
 msiv.concatenated_segments Assembly_Number,
 msiv.description Description,
 fcl.meaning Item_Type,
 misv.inventory_item_status_code Item_Status,
 ml1.meaning Make_Buy_Code,
 wac.class_code WIP_Class,
 ml2.meaning Class_Type,
 ml3.meaning WIP_Type,
 wip.wip_entity_name WIP_Job,
 wip.date_closed Date_Closed,
 wip.status Job_Status,
 wip.date_released Date_Released,
 wip.date_completed Date_Completed,
 muomv.uom_code UOM_Code,
 wip.start_quantity Start_Quantity,
 wip.quantity_completed Quantity_Completed,
 wip.quantity_scrapped Quantity_Scrapped,
 wipsum.wip_costs_in WIP_Costs_In,
 wipsum.wip_costs_out WIP_Costs_Out,
 wipsum.wip_close_var WIP_Relief,
 wipsum.wip_value WIP_Value,
 wipsum.wip_acct_in WIP_Accounted_Costs_In,
 wipsum.wip_acct_out WIP_Accounted_Costs_Out,
 wipsum.wip_acct_var WIP_Accounted_Relief,
 wipsum.wip_acct_value WIP_Accounted_Value,
 wipsum.wip_costs_in - wipsum.wip_acct_in WIP_Costs_In_Difference,
 wipsum.wip_costs_out - wipsum.wip_acct_out WIP_Costs_Out_Difference,
 wipsum.wip_close_var  - wipsum.wip_acct_var WIP_Relief_Difference,
 wipsum.wip_value - wipsum.wip_acct_value WIP_Value_Difference
from wip_accounting_classes wac,
 mtl_system_items_vl msiv,
 mtl_item_status_vl misv,
 mtl_units_of_measure_vl muomv,
 mfg_lookups ml1, -- planning make/buy code
 mfg_lookups ml2, -- class type
 mfg_lookups ml3, -- WIP type
 fnd_common_lookups fcl, -- item type
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,  -- inv_organization_id
 hr_all_organization_units_vl haou2, -- operating unit
 gl_ledgers gl,
 -- ===========================================
 -- Get WIP_Jobs and Flow Schedule information
 -- ===========================================
 (select mp.organization_id,
  mp.organization_code,
  we.wip_entity_name,
  wdj.wip_entity_id,
  we.entity_type,
  wdj.class_code,
  wdj.date_closed,
  ml.meaning status,
  wdj.date_released,
  wdj.date_completed,
  wdj.start_quantity,
  wdj.quantity_completed,
  wdj.quantity_scrapped,
  wdj.primary_item_id
  from wip_discrete_jobs wdj,
  wip_entities we,
  org_acct_periods oap,
  mtl_parameters mp,
  mfg_lookups ml
  where we.wip_entity_id               = wdj.wip_entity_id
  and oap.organization_id            = wdj.organization_id
  -- Revision for version 1.2
  and mp.organization_id             = wdj.organization_id
  and ml.lookup_type                 = &apos;WIP_JOB_STATUS&apos;
  and ml.lookup_code                 = wdj.status_type
  and mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
  and 2=2                            -- p_org_code
  and 3=3                            -- p_period_name
  -- find jobs that were open or closed during or after the report period
  -- the job is open or opened before the period close date
  and ((wdj.date_closed is null -- the job is open
    and trunc(wdj.creation_date) &lt;=  oap.schedule_close_date
   )
    or -- the job is closed and ...the job was closed after the accounting period 
   (wdj.date_closed is not null
    and trunc(wdj.date_closed) &gt; oap.schedule_close_date
   )
    or -- find jobs that were closed during the report period
   (wdj.date_closed &gt;= oap.period_start_date 
    and trunc(wdj.date_closed) &lt; oap.schedule_close_date + 1
   )
  )
  union all
  select mp.organization_id,
  mp.organization_code,
  we.wip_entity_name,
  wfs.wip_entity_id,
  we.entity_type,
  wfs.class_code,
  wfs.date_closed,
  ml.meaning status,
  wfs.creation_date date_released,
  wfs.date_closed date_completed,
  wfs.planned_quantity start_quantity,
  wfs.quantity_completed,
  0 quantity_scrapped,
  wfs.primary_item_id
  from wip_flow_schedules wfs,
  wip_entities we,
  org_acct_periods oap,
  mtl_parameters mp,
  mfg_lookups ml
  where we.wip_entity_id               = wfs.wip_entity_id
  and we.entity_type                 = 4 -- Flow schedule
  and oap.organization_id            = wfs.organization_id
  -- Revision for version 1.2
  and mp.organization_id             = wfs.organization_id
  and ml.lookup_type                 = &apos;WIP_FLOW_SCHEDULE_STATUS&apos;
  and ml.lookup_code                 = wfs.status
  and mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
  and 2=2                            -- p_org_code
  and 3=3                            -- p_period_name
  -- find jobs that were open or closed during or after the report period
  -- the job is open or opened before the period close date
  and ((wfs.date_closed is null -- the job is open
    and trunc(wfs.creation_date) &lt;=  oap.schedule_close_date
   )
    or -- the job is closed and ...the job was closed after the accounting period 
   (wfs.date_closed is not null
    and trunc(wfs.date_closed) &gt; oap.schedule_close_date
   )
    or -- find jobs that were closed during the report period
   (wfs.date_closed &gt;= oap.period_start_date 
    and trunc(wfs.date_closed) &lt; oap.schedule_close_date + 1
   )
  )
 ) wip,
 -- ===========================================
 -- Condense WIP Balances and Accounting Entries
 -- ===========================================
 (select wip.organization_id,
  wip.wip_entity_id,
  wip.period_name,
  wip.acct_period_id,
  sum(wip_costs_in) wip_costs_in,
  sum(wip_costs_out) wip_costs_out,
  sum(wip_close_var) wip_close_var,
  sum(wip_value) wip_value,
  sum(round(wip_acct_in,2)) wip_acct_in,
  sum(round(wip_acct_out,2)) wip_acct_out,
  sum(round(wip_acct_var,2)) wip_acct_var,
  sum(round(wip_acct_value,2)) wip_acct_value
  from (
   -- ===========================================
   -- Get the WIP Period Balances
   -- ===========================================
   select mp.organization_id,
   wpb.wip_entity_id,
   oap.period_name,
   wpb.acct_period_id,
   sum(nvl(tl_scrap_in,0)+
   nvl(pl_material_in,0)+
   nvl(pl_material_overhead_in,0)+
   nvl(tl_resource_in,0)+
   nvl(pl_resource_in,0)+
   nvl(tl_outside_processing_in,0)+
   nvl(pl_outside_processing_in,0)+
   nvl(tl_overhead_in,0)+
   nvl(pl_overhead_in,0))  wip_costs_in,
   sum(nvl(tl_material_out,0)+
   nvl(tl_scrap_out,0)+
   nvl(pl_material_out,0)+
   nvl(tl_material_overhead_out,0)+
   nvl(pl_material_overhead_out,0)+
   nvl(tl_resource_out,0)+
   nvl(pl_resource_out,0)+
   nvl(tl_outside_processing_out,0)+
   nvl(pl_outside_processing_out,0)+
   nvl(tl_overhead_out,0)+
   nvl(pl_overhead_out,0)) wip_costs_out,
   sum(nvl(tl_material_var,0)+
   nvl(tl_scrap_var,0)+
   nvl(pl_material_var,0)+
   nvl(tl_material_overhead_var,0)+
   nvl(pl_material_overhead_var,0)+
   nvl(tl_resource_var,0)+
   nvl(pl_resource_var,0)+
   nvl(tl_outside_processing_var,0)+
   nvl(pl_outside_processing_var,0)+
   nvl(tl_overhead_var,0)+
   nvl(pl_overhead_var,0)) wip_close_var,
   sum(nvl(tl_scrap_in,0)+
   nvl(pl_material_in,0)-
   nvl(tl_material_out,0)-
   nvl(tl_scrap_out,0)-
   nvl(pl_material_out,0)-
   nvl(tl_material_var,0)-
   nvl(tl_scrap_var,0)-
   nvl(pl_material_var,0)+
   nvl(pl_material_overhead_in,0)-
   nvl(tl_material_overhead_out,0)-
   nvl(pl_material_overhead_out,0)-
   nvl(tl_material_overhead_var,0)-
   nvl(pl_material_overhead_var,0)+
   nvl(tl_resource_in,0)+
   nvl(pl_resource_in,0)-
   nvl(tl_resource_out,0)-
   nvl(pl_resource_out,0)-
   nvl(tl_resource_var,0)-
   nvl(pl_resource_var,0)+
   nvl(tl_outside_processing_in,0)+
   nvl(pl_outside_processing_in,0)-
   nvl(tl_outside_processing_out,0)-
   nvl(pl_outside_processing_out,0)-
   nvl(tl_outside_processing_var,0)-
   nvl(pl_outside_processing_var,0)+
   nvl(tl_overhead_in,0)+
   nvl(pl_overhead_in,0)-
   nvl(tl_overhead_out,0)-
   nvl(pl_overhead_out,0)-
   nvl(tl_overhead_var,0)-
   nvl(pl_overhead_var,0)) wip_value,
   sum(0) wip_acct_in,
   sum(0) wip_acct_out,
   sum(0) wip_acct_var,
   sum(0) wip_acct_value
   from wip_period_balances wpb,
   org_acct_periods oap,
   mtl_parameters mp
   where mp.organization_id             = wpb.organization_id
   and oap.acct_period_id             = wpb.acct_period_id
   and mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
  and 2=2                            -- p_org_code
   and 3=3                            -- p_period_name
   group by
   mp.organization_id,
   wpb.wip_entity_id,
   oap.period_name,
   wpb.acct_period_id
   union all
   -- ===========================================
   -- Get the WIP Material Transactions
   -- ===========================================
   select mp.organization_id,
   mmt.transaction_source_id wip_entity_id,
   oap.period_name,
   mmt.acct_period_id,
   sum(0) wip_costs_in,
   sum(0) wip_costs_out,
   sum(0) wip_close_var,
   sum(0) wip_value,
   sum(decode(mmt.transaction_type_id,
    35, mta.base_transaction_value, -- WIP Component Issue
    38, mta.base_transaction_value, -- WIP Component Negative Issue
    43, mta.base_transaction_value, -- WIP Return
    48, mta.base_transaction_value, -- WIP Negative Return
    55, mta.base_transaction_value, -- WIP Lot Split
    56, mta.base_transaction_value, -- WIP Lot Merge
    57, mta.base_transaction_value, -- WIP Lot Bonus
     0)
      ) wip_acct_in,
   sum(decode(mmt.transaction_type_id,
    17, mta.base_transaction_value * -1, -- WIP Completion Return
    44, mta.base_transaction_value * -1, -- WIP Completion
    90, mta.base_transaction_value * -1, -- WIP Assembly Scrap
    91, mta.base_transaction_value * -1, -- WIP return from scrap
    92, mta.base_transaction_value * -1, -- WIP estimated scrap
    1002, mta.base_transaction_value * -1, -- WIP Byproduct Completion
    1003, mta.base_transaction_value * -1, -- WIP Byproduct Return
     0)
      ) wip_acct_out,
   sum(0) wip_acct_var,
   sum(decode(mmt.transaction_type_id,
    35, mta.base_transaction_value, -- WIP Component Issue
    38, mta.base_transaction_value, -- WIP Component Negative Issue
    43, mta.base_transaction_value, -- WIP Return
    48, mta.base_transaction_value, -- WIP Negative Return
    55, mta.base_transaction_value, -- WIP Lot Split
    56, mta.base_transaction_value, -- WIP Lot Merge
    57, mta.base_transaction_value, -- WIP Lot Bonus
    17, mta.base_transaction_value, -- WIP Completion Return
    44, mta.base_transaction_value, -- WIP Completion
    90, mta.base_transaction_value, -- WIP Assembly Scrap
    91, mta.base_transaction_value, -- WIP return from scrap
    92, mta.base_transaction_value, -- WIP estimated scrap
    1002, mta.base_transaction_value, -- WIP Byproduct Completion
    1003, mta.base_transaction_value, -- WIP Byproduct Return
     0)
      ) wip_acct_value
   from mtl_transaction_accounts mta,
   mtl_material_transactions mmt,
   org_acct_periods oap,
   mtl_parameters mp
   where mta.transaction_id             = mmt.transaction_id
   and mp.organization_id             = mta.organization_id
   and mta.transaction_source_type_id = 5
   and mta.accounting_line_type       = 7 -- WIP valuation
   and mmt.transaction_date          &gt;= oap.period_start_date
   and mmt.transaction_date          &lt;  oap.schedule_close_date + 1
   and mta.transaction_date          &gt;= oap.period_start_date
   and mta.transaction_date          &lt;  oap.schedule_close_date + 1
   and oap.acct_period_id             = mmt.acct_period_id
   and mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
  and 2=2                            -- p_org_code
   and 3=3                            -- p_period_name
   group by
   mp.organization_id,
   mmt.transaction_source_id,
   oap.period_name,
   mmt.acct_period_id
   union all
   -- ===========================================
   -- Get the WIP_Resource Transactions
   -- ===========================================
   select mp.organization_id,
   wt.wip_entity_id,
   oap.period_name,
   wt.acct_period_id,
   sum(0) wip_costs_in,
   sum(0) wip_costs_out,
   sum(0) wip_close_var,
   sum(0) wip_value,
   sum(decode(wt.transaction_type,
     1, wta.base_transaction_value, -- Resource transaction
     2, wta.base_transaction_value, -- Overhead transaction
     3, wta.base_transaction_value, -- Outside processing
    11, wta.base_transaction_value, -- WIP Lot Split
    12, wta.base_transaction_value, -- WIP Lot Merge
    13, wta.base_transaction_value, -- WIP Lot Bonus
    14, wta.base_transaction_value, -- WIP Lot Quantity Update
     0)
      ) wip_acct_in,
   sum(decode(wt.transaction_type,
    15, wta.base_transaction_value, -- Estimated Scrap Absorption
    16, wta.base_transaction_value, -- Estimated Scrap Reallocation
    17, wta.base_transaction_value, -- Direct Shopfloor Delivery
     0)
      ) wip_acct_out,
   sum(decode(wt.transaction_type,
     5, wta.base_transaction_value * -1, -- Period close variance
     6, wta.base_transaction_value * -1, -- Job close variance
     7, wta.base_transaction_value * -1, -- Final completion variance
     0)
      ) wip_acct_var,
   sum(decode(wt.transaction_type,
     1, wta.base_transaction_value, -- Resource transaction
     2, wta.base_transaction_value, -- Overhead transaction
     3, wta.base_transaction_value, -- Outside processing
    11, wta.base_transaction_value, -- WIP Lot Split
    12, wta.base_transaction_value, -- WIP Lot Merge
    13, wta.base_transaction_value, -- WIP Lot Bonus
    14, wta.base_transaction_value, -- WIP Lot Quantity Update
    15, wta.base_transaction_value, -- Estimated Scrap Absorption
    16, wta.base_transaction_value, -- Estimated Scrap Reallocation
    17, wta.base_transaction_value, -- Direct Shopfloor Delivery
     5, wta.base_transaction_value, -- Period close variance
     6, wta.base_transaction_value, -- Job close variance
     7, wta.base_transaction_value, -- Final completion variance
     0)
      ) wip_acct_value
   from wip_transaction_accounts wta,
   wip_transactions wt,
   org_acct_periods oap,
   mtl_parameters mp
   where wta.transaction_id             = wt.transaction_id
   and mp.organization_id             = wta.organization_id
   and wta.accounting_line_type       = 7 -- WIP valuation
   and wta.transaction_date          &gt;= oap.period_start_date
   and wta.transaction_date          &lt;  oap.schedule_close_date + 1
   and wt.transaction_date           &gt;= oap.period_start_date
   and wt.transaction_date           &lt;  oap.schedule_close_date + 1
   and oap.acct_period_id             = wt.acct_period_id
   and mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
  and 2=2                            -- p_org_code
   and 3=3                            -- p_period_name
   group by
   mp.organization_id,
   wt.wip_entity_id,
   oap.period_name,
   wt.acct_period_id
   union all
   -- ===========================================
   -- Get the WIP Cost Update Transactions
   -- ===========================================
   select mp.organization_id,
   cscav.wip_entity_id,
   oap.period_name,
   oap.acct_period_id,
   sum(0) wip_costs_in,
   sum(0) wip_costs_out,
   sum(0) wip_close_var,
   sum(0) wip_value,
   round(sum(decode(cscav.transaction_type,
     3, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- WIP component issue
     6, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Resource
     7, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Resource overhead
     8, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Item based overhead
     9, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Lot based overhead
    10, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Resource / Overhead
     0)
      ),2) wip_acct_in,
   round(sum(decode(cscav.transaction_type,
     4, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- WIP assembly completion
     5, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- WIP scrap transaction
     0)
      ),2) wip_acct_out,
   sum(0) wip_acct_var,
   round(sum(decode(cscav.transaction_type,
     3, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- WIP component issue
     6, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Resource
     7, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Resource overhead
     8, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Item based overhead
     9, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Lot based overhead
    10, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost), -- Resource / Overhead
     4, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost) * cscav.in_out_flag, -- WIP assembly completion
     5, cscav.adjustment_quantity * (new_unit_cost - old_unit_cost) * cscav.in_out_flag, -- WIP scrap transaction
     0)
      ),2) wip_acct_value
   from cst_std_cost_adj_values cscav,
   cst_cost_updates ccu,
   org_acct_periods oap,
   mtl_parameters mp
   where ccu.cost_update_id             = cscav.cost_update_id
   and mp.organization_id             = ccu.organization_id
   and ccu.update_date               &gt;= oap.period_start_date
   and ccu.update_date               &lt;  oap.schedule_close_date + 1
   and oap.organization_id            = ccu.organization_id
   and mp.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id)
  and 2=2                            -- p_org_code
   and 3=3                            -- p_period_name
   group by
   mp.organization_id,
   cscav.wip_entity_id,
   oap.period_name,
   oap.acct_period_id
  ) wip
  group by
   wip.organization_id,
  wip.wip_entity_id,
  wip.period_name,
  wip.acct_period_id
 ) wipsum
-- ===========================================
-- WIP_Job Entity and accounting period joins
-- ===========================================
where wip.wip_entity_id               = wipsum.wip_entity_id
and wac.organization_id             = wip.organization_id
and wac.class_code                  = wip.class_code
and msiv.inventory_item_id          = wip.primary_item_id
and msiv.organization_id            = wip.organization_id
and msiv.primary_uom_code           = muomv.uom_code
and msiv.inventory_item_status_code = misv.inventory_item_status_code
and ml1.lookup_type                 = &apos;MTL_PLANNING_MAKE_BUY&apos;
and ml1.lookup_code                 = msiv.planning_make_buy_code
and ml2.lookup_type                 = &apos;WIP_CLASS_TYPE&apos;
and ml2.lookup_code                 = wac.class_type
and ml3.lookup_type                 = &apos;WIP_ENTITY&apos;
and ml3.lookup_code                 = wip.entity_type
and fcl.lookup_type (+)             = &apos;ITEM_TYPE&apos;
and fcl.lookup_code (+)             = msiv.item_type
-- ===================================================================
-- using the base tables for organizations
-- ===================================================================
and hoi.org_information_context     = &apos;Accounting Information&apos;
and hoi.organization_id             = wip.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
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)
and 1=1                             -- p_operating_unit, p_ledger</SQL_TEXT>
  <VERSION_COMMENTS>Added operating unit security</VERSION_COMMENTS>
  <ENABLED>Y</ENABLED>
  <NUMBER_FORMAT>#,##0.00;[Red](#,##0.00)</NUMBER_FORMAT>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>CAC WIP Period Balances to Accounting Activity Reconciliation</REPORT_NAME>
    <DESCRIPTION>Report to compare the monthly WIP Period Balances with the pre-Create Accounting WIP accounting entries for material, resource, overhead, outside processing, job close variance and standard cost update transactions.  With WIP class, job status, name and other details.  This report shows both WIP jobs which were open during the accounting period as well as jobs closed during the accounting period.  If the stored WIP period balances agree to the period WIP accounting activity, the &quot;Difference&quot; columns have a zero amount.

//* +=============================================================================+
-- | Copyright 2022 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_reconcile_wip_balances.sql
-- |
-- |  Parameters:
-- |  p_period_name          -- The desired accounting period you wish to report
-- |  p_org_code             -- Specific inventory organization you wish to report (optional)
-- |  p_operating_unit       -- Operating Unit you wish to report, leave blank for all
-- |                            operating units (optional) 
-- |  p_ledger               -- general ledger you wish to report, leave blank for all
-- |                            ledgers (optional)
-- | Description:
-- | Report to compare the monthly WIP transactions against the WIP period balances.
-- |
-- | Version Modified on Modified by Description
-- | ======= =========== ============== =========================================
-- | 1.0     07 Apr 2021 Douglas Volz   Initial Coding based on item_cost_history.sql
-- | 1.1     10 Jul 2022 Douglas Volz   Add Ledger and Operating Unit columns
-- | 1.2     19 Oct 2022 Douglas Volz   Bug fix for missing organization join
-- +=============================================================================+*/


</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>2=2</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>3=3</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>3=3</ANCHOR>
    <SQL_TEXT>oap.period_name = :p_period_name</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Period</LOV_NAME>
    <LOV_GUID>8E2FF36EDF2279D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select distinct
oap.period_name value,
max(oap.period_year||&apos;-&apos;||oap.period_num||&apos;, &apos;||xxen_util.meaning(nvl2(oap.period_close_date,decode(oap.open_flag,&apos;P&apos;,2,&apos;N&apos;,decode(oap.summarized_flag,&apos;N&apos;,65,66),4),3),&apos;MTL_ACCT_PERIOD_STATUS&apos;,700)||&apos; (&apos;||oap.period_start_date||&apos; - &apos;||oap.schedule_close_date||&apos;)&apos;) over (partition by oap.period_name) description,
max(oap.period_start_date) over (partition by oap.period_name) period_start_date,
max(oap.effective_period_num) over (partition by oap.period_name) effective_period_num
from
gl_ledgers gl,
org_organization_definitions ood,
mtl_parameters mp,
(select oap.period_year*10000+oap.period_num effective_period_num, oap.* from org_acct_periods oap) oap
where
oap.period_start_date&lt;=sysdate and
(:$flex$.ledger is null or xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;) and
(:$flex$.organization_code is null or xxen_util.contains(:$flex$.organization_code,ood.organization_code)=&apos;Y&apos;) and
ood.organization_id=mp.organization_id and
mp.organization_id&lt;&gt;mp.master_organization_id and 
gl.period_set_name=oap.period_set_name and
gl.ledger_id=ood.set_of_books_id and
ood.organization_id=oap.organization_id
order by
period_start_date desc,
effective_period_num desc,
oap.period_name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select distinct oap.period_name value
from org_acct_periods oap,
 (select max(oap.schedule_close_date) default_date
  from org_acct_periods oap,
  org_organization_definitions ood
  where ood.organization_id = oap.organization_id
  and nvl(ood.disable_date, sysdate + 1) &gt; sysdate) max
where oap.schedule_close_date = max.default_date
and rownum = 1
</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Period Name</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>1=1</ANCHOR>
    <SQL_TEXT>msiv.segment1 = :p_item_number</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Item (master, costing enabled only)</LOV_NAME>
    <LOV_GUID>91D022B15B12FFB9E053BB6B63587F0B</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
msiv.concatenated_segments value,
msiv.description
from
mtl_system_items_vl msiv
where
msiv.organization_id=(
select
max(mp.master_organization_id) master_organization_id
from
mtl_parameters mp
where
mp.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;) or
fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;) 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;
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>6</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</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>7</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</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>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</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$.ledger</FLEX_BIND>
    <PARAMETER_NAME>Ledger</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Period Name</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>Period Name</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>
