<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>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: CAC Category Accounts Setup -->
 <REPORTS_ROW>
  <GUID>C9AE7AF806C8EA8FE0530100007FBF9F</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select nvl(gl.short_name, gl.name) Ledger,
-- Get the Material Account
 haou2.name Operating_Unit,
 mp.organization_code Org_Code,
 haou.name Organization_Name,
 mc.category_concat_segs Category,
 (select ccg.cost_group
  from cst_cost_groups ccg
  where ccg.cost_group_id  = mca.cost_group_id) Cost_Group,
 mca.subinventory_code Subinventory,
 (select ml.meaning
  from mfg_lookups ml,
  mtl_secondary_inventories msub
  where msub.secondary_inventory_name = mca.subinventory_code
  and msub.organization_id          = mca.organization_id
  and ml.lookup_type                = &apos;SYS_YES_NO&apos;
  and ml.lookup_code                = msub.asset_inventory) Inventory_Asset,
 &apos;Material Account&apos; Account_Type,
 &amp;segment_columns
 mca.creation_date Creation_Date,
 mca.last_update_date Last_Update_Date,
 fu1.user_name Created_By,
 fu2.user_name Last_Updated_By
from mtl_category_accounts mca,
 mtl_categories_v mc,
 mtl_parameters mp,
 gl_code_combinations gcc,
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,
 hr_all_organization_units_vl haou2,
 gl_ledgers gl,
 fnd_user fu1,
 fnd_user fu2
where mca.category_id                = mc.category_id
and mp.organization_id             = mca.organization_id
and mca.material_account           = gcc.code_combination_id (+)
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and hoi.org_information_context    = &apos;Accounting Information&apos;
and hoi.organization_id            = mp.organization_id
and hoi.organization_id            = haou.organization_id -- this gets the organization name
and haou2.organization_id          = to_number(hoi.org_information3) -- this gets the operating unit id
and gl.ledger_id                   = to_number(hoi.org_information1) -- get the ledger_id
-- Avoid selecting disabled inventory organizations
and sysdate &lt; nvl(haou.date_to, sysdate + 1)
and fu1.user_id                    = mca.created_by
and fu2.user_id                    = mca.last_updated_by
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_org_code, p_operating_unit, p_ledger
union all
-- Get the Material Overhead Account
select nvl(gl.short_name, gl.name) Ledger,
 haou2.name Operating_Unit,
 mp.organization_code Org_Code,
 haou.name Organization_Name,
 mc.category_concat_segs Category,
 (select ccg.cost_group
  from cst_cost_groups ccg
  where ccg.cost_group_id  = mca.cost_group_id) Cost_Group,
 mca.subinventory_code Subinventory,
 (select ml.meaning
  from mfg_lookups ml,
  mtl_secondary_inventories msub
  where msub.secondary_inventory_name = mca.subinventory_code
  and msub.organization_id          = mca.organization_id
  and ml.lookup_type                = &apos;SYS_YES_NO&apos;
  and ml.lookup_code                = msub.asset_inventory) Inventory_Asset,
 &apos;Material Overhead Account&apos; Account_Type,
 &amp;segment_columns
 mca.creation_date Creation_Date,
 mca.last_update_date Last_Update_Date,
 fu1.user_name Created_By,
 fu2.user_name Last_Updated_By
from mtl_category_accounts mca,
 mtl_categories_v mc,
 mtl_parameters mp,
 gl_code_combinations gcc,
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,
 hr_all_organization_units_vl haou2,
 gl_ledgers gl,
 fnd_user fu1,
 fnd_user fu2
where mca.category_id                = mc.category_id
and mp.organization_id             = mca.organization_id
and mca.material_overhead_account  = gcc.code_combination_id (+)
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and hoi.org_information_context    = &apos;Accounting Information&apos;
and hoi.organization_id            = mp.organization_id
and hoi.organization_id            = haou.organization_id -- this gets the organization name
and haou2.organization_id          = to_number(hoi.org_information3) -- this gets the operating unit id
and gl.ledger_id                   = to_number(hoi.org_information1) -- get the ledger_id
-- Avoid selecting disabled inventory organizations
and sysdate &lt; nvl(haou.date_to, sysdate + 1)
and fu1.user_id                    = mca.created_by
and fu2.user_id                    = mca.last_updated_by
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_org_code, p_operating_unit, p_ledger
union all
-- Get the Resource Account
select nvl(gl.short_name, gl.name) Ledger,
 haou2.name Operating_Unit,
 mp.organization_code Org_Code,
 haou.name Organization_Name,
 mc.category_concat_segs Category,
 (select ccg.cost_group
  from cst_cost_groups ccg
  where ccg.cost_group_id  = mca.cost_group_id) Cost_Group,
 mca.subinventory_code Subinventory,
 (select ml.meaning
  from mfg_lookups ml,
  mtl_secondary_inventories msub
  where msub.secondary_inventory_name = mca.subinventory_code
  and msub.organization_id          = mca.organization_id
  and ml.lookup_type                = &apos;SYS_YES_NO&apos;
  and ml.lookup_code                = msub.asset_inventory) Inventory_Asset,
 &apos;Resource Account&apos; Account_Type,
 &amp;segment_columns
 mca.creation_date Creation_Date,
 mca.last_update_date Last_Update_Date,
 fu1.user_name Created_By,
 fu2.user_name Last_Updated_By
from mtl_category_accounts mca,
 mtl_categories_v mc,
 mtl_parameters mp,
 gl_code_combinations gcc,
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,
 hr_all_organization_units_vl haou2,
 gl_ledgers gl,
 fnd_user fu1,
 fnd_user fu2
where mca.category_id                = mc.category_id
and mp.organization_id             = mca.organization_id
and mca.resource_account           = gcc.code_combination_id (+)
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and hoi.org_information_context    = &apos;Accounting Information&apos;
and hoi.organization_id            = mp.organization_id
and hoi.organization_id            = haou.organization_id -- this gets the organization name
and haou2.organization_id          = to_number(hoi.org_information3) -- this gets the operating unit id
and gl.ledger_id                   = to_number(hoi.org_information1) -- get the ledger_id
-- Avoid selecting disabled inventory organizations
and sysdate &lt; nvl(haou.date_to, sysdate + 1)
and fu1.user_id                    = mca.created_by
and fu2.user_id                    = mca.last_updated_by
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_org_code, p_operating_unit, p_ledger
union all
-- Get the Outside Processing Account
select nvl(gl.short_name, gl.name) Ledger,
 haou2.name Operating_Unit,
 mp.organization_code Org_Code,
 haou.name Organization_Name,
 mc.category_concat_segs Category,
 (select ccg.cost_group
  from cst_cost_groups ccg
  where ccg.cost_group_id  = mca.cost_group_id) Cost_Group,
 mca.subinventory_code Subinventory,
 (select ml.meaning
  from mfg_lookups ml,
  mtl_secondary_inventories msub
  where msub.secondary_inventory_name = mca.subinventory_code
  and msub.organization_id          = mca.organization_id
  and ml.lookup_type                = &apos;SYS_YES_NO&apos;
  and ml.lookup_code                = msub.asset_inventory) Inventory_Asset,
 &apos;Outside Processing Account&apos; Account_Type,
 &amp;segment_columns
 mca.creation_date Creation_Date,
 mca.last_update_date Last_Update_Date,
 fu1.user_name Created_By,
 fu2.user_name Last_Updated_By
from mtl_category_accounts mca,
 mtl_categories_v mc,
 mtl_parameters mp,
 gl_code_combinations gcc,
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,
 hr_all_organization_units_vl haou2,
 gl_ledgers gl,
 fnd_user fu1,
 fnd_user fu2
where mca.category_id                = mc.category_id
and mp.organization_id             = mca.organization_id
and mca.outside_processing_account = gcc.code_combination_id (+)
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and hoi.org_information_context    = &apos;Accounting Information&apos;
and hoi.organization_id            = mp.organization_id
and hoi.organization_id            = haou.organization_id -- this gets the organization name
and haou2.organization_id          = to_number(hoi.org_information3) -- this gets the operating unit id
and gl.ledger_id                   = to_number(hoi.org_information1) -- get the ledger_id
-- Avoid selecting disabled inventory organizations
and sysdate &lt; nvl(haou.date_to, sysdate + 1)
and fu1.user_id                    = mca.created_by
and fu2.user_id                    = mca.last_updated_by
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_org_code, p_operating_unit, p_ledger
union all
-- Get the Overhead Account
select nvl(gl.short_name, gl.name) Ledger,
 haou2.name Operating_Unit,
 mp.organization_code Org_Code,
 haou.name Organization_Name,
 mc.category_concat_segs Category,
 (select ccg.cost_group
  from cst_cost_groups ccg
  where ccg.cost_group_id  = mca.cost_group_id) Cost_Group,
 mca.subinventory_code Subinventory,
 (select ml.meaning
  from mfg_lookups ml,
  mtl_secondary_inventories msub
  where msub.secondary_inventory_name = mca.subinventory_code
  and msub.organization_id          = mca.organization_id
  and ml.lookup_type                = &apos;SYS_YES_NO&apos;
  and ml.lookup_code                = msub.asset_inventory) Inventory_Asset,
 &apos;Overhead Account&apos; Account_Type,
 &amp;segment_columns
 mca.creation_date Creation_Date,
 mca.last_update_date Last_Update_Date,
 fu1.user_name Created_By,
 fu2.user_name Last_Updated_By
from mtl_category_accounts mca,
 mtl_categories_v mc,
 mtl_parameters mp,
 gl_code_combinations gcc,
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,
 hr_all_organization_units_vl haou2,
 gl_ledgers gl,
 fnd_user fu1,
 fnd_user fu2
where mca.category_id                = mc.category_id
and mp.organization_id             = mca.organization_id
and mca.overhead_account           = gcc.code_combination_id (+)
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and hoi.org_information_context    = &apos;Accounting Information&apos;
and hoi.organization_id            = mp.organization_id
and hoi.organization_id            = haou.organization_id -- this gets the organization name
and haou2.organization_id          = to_number(hoi.org_information3) -- this gets the operating unit id
and gl.ledger_id                   = to_number(hoi.org_information1) -- get the ledger_id
-- Avoid selecting disabled inventory organizations
and sysdate &lt; nvl(haou.date_to, sysdate + 1)
and fu1.user_id                    = mca.created_by
and fu2.user_id                    = mca.last_updated_by
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_org_code, p_operating_unit, p_ledger
union all
-- Get the Expense Account
select nvl(gl.short_name, gl.name) Ledger,
 haou2.name Operating_Unit,
 mp.organization_code Org_Code,
 haou.name Organization_Name,
 mc.category_concat_segs Category,
 (select ccg.cost_group
  from cst_cost_groups ccg
  where ccg.cost_group_id  = mca.cost_group_id) Cost_Group,
 mca.subinventory_code Subinventory,
 (select ml.meaning
  from mfg_lookups ml,
  mtl_secondary_inventories msub
  where msub.secondary_inventory_name = mca.subinventory_code
  and msub.organization_id          = mca.organization_id
  and ml.lookup_type                = &apos;SYS_YES_NO&apos;
  and ml.lookup_code                = msub.asset_inventory) Inventory_Asset,
 &apos;Expense Account&apos; Account_Type,
 &amp;segment_columns
 mca.creation_date Creation_Date,
 mca.last_update_date Last_Update_Date,
 fu1.user_name Created_By,
 fu2.user_name Last_Updated_By
from mtl_category_accounts mca,
 mtl_categories_v mc,
 mtl_parameters mp,
 gl_code_combinations gcc,
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,
 hr_all_organization_units_vl haou2,
 gl_ledgers gl,
 fnd_user fu1,
 fnd_user fu2
where mca.category_id                = mc.category_id
and mp.organization_id             = mca.organization_id
and mca.expense_account            = gcc.code_combination_id (+)
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and hoi.org_information_context    = &apos;Accounting Information&apos;
and hoi.organization_id            = mp.organization_id
and hoi.organization_id            = haou.organization_id -- this gets the organization name
and haou2.organization_id          = to_number(hoi.org_information3) -- this gets the operating unit id
and gl.ledger_id                   = to_number(hoi.org_information1) -- get the ledger_id
-- Avoid selecting disabled inventory organizations
and sysdate &lt; nvl(haou.date_to, sysdate + 1)
and fu1.user_id                    = mca.created_by
and fu2.user_id                    = mca.last_updated_by
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_org_code, p_operating_unit, p_ledger
union all
-- Get the Encumbrance Account
select nvl(gl.short_name, gl.name) Ledger,
 haou2.name Operating_Unit,
 mp.organization_code Org_Code,
 haou.name Organization_Name,
 mc.category_concat_segs Category,
 (select ccg.cost_group
  from cst_cost_groups ccg
  where ccg.cost_group_id  = mca.cost_group_id) Cost_Group,
 mca.subinventory_code Subinventory,
 (select ml.meaning
  from mfg_lookups ml,
  mtl_secondary_inventories msub
  where msub.secondary_inventory_name = mca.subinventory_code
  and msub.organization_id          = mca.organization_id
  and ml.lookup_type                = &apos;SYS_YES_NO&apos;
  and ml.lookup_code                = msub.asset_inventory) Inventory_Asset,
 &apos;Encumbrance Account&apos; Account_Type,
 &amp;segment_columns
 mca.creation_date Creation_Date,
 mca.last_update_date Last_Update_Date,
 fu1.user_name Created_By,
 fu2.user_name Last_Updated_By
from mtl_category_accounts mca,
 mtl_categories_v mc,
 mtl_parameters mp,
 gl_code_combinations gcc,
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,
 hr_all_organization_units_vl haou2,
 gl_ledgers gl,
 fnd_user fu1,
 fnd_user fu2
where mca.category_id                = mc.category_id
and mp.organization_id             = mca.organization_id
and mca.encumbrance_account        = gcc.code_combination_id (+)
and mca.encumbrance_account is not null
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and hoi.org_information_context    = &apos;Accounting Information&apos;
and hoi.organization_id            = mp.organization_id
and hoi.organization_id            = haou.organization_id -- this gets the organization name
and haou2.organization_id          = to_number(hoi.org_information3) -- this gets the operating unit id
and gl.ledger_id                   = to_number(hoi.org_information1) -- get the ledger_id
-- Avoid selecting disabled inventory organizations
and sysdate &lt; nvl(haou.date_to, sysdate + 1)
and fu1.user_id                    = mca.created_by
and fu2.user_id                    = mca.last_updated_by
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_org_code, p_operating_unit, p_ledger
union all
-- Get the Bridging Account
select nvl(gl.short_name, gl.name) Ledger,
 haou2.name Operating_Unit,
 mp.organization_code Org_Code,
 haou.name Organization_Name,
 mc.category_concat_segs Category,
 (select ccg.cost_group
  from cst_cost_groups ccg
  where ccg.cost_group_id  = mca.cost_group_id) Cost_Group,
 mca.subinventory_code Subinventory,
 (select ml.meaning
  from mfg_lookups ml,
  mtl_secondary_inventories msub
  where msub.secondary_inventory_name = mca.subinventory_code
  and msub.organization_id          = mca.organization_id
  and ml.lookup_type                = &apos;SYS_YES_NO&apos;
  and ml.lookup_code                = msub.asset_inventory) Inventory_Asset,
 &apos;Bridging Account&apos; Account_Type,
 &amp;segment_columns
 mca.creation_date Creation_Date,
 mca.last_update_date Last_Update_Date,
 fu1.user_name Created_By,
 fu2.user_name Last_Updated_By
from mtl_category_accounts mca,
 mtl_categories_v mc,
 mtl_parameters mp,
 gl_code_combinations gcc,
 hr_organization_information hoi,
 hr_all_organization_units_vl haou,
 hr_all_organization_units_vl haou2,
 gl_ledgers gl,
 fnd_user fu1,
 fnd_user fu2
where mca.category_id                = mc.category_id
and mp.organization_id             = mca.organization_id
and mca.bridging_account           = gcc.code_combination_id (+)
and mca.bridging_account is not null
-- ===========================================
-- Organization joins to the HR org model
-- ===========================================
and hoi.org_information_context    = &apos;Accounting Information&apos;
and hoi.organization_id            = mp.organization_id
and hoi.organization_id            = haou.organization_id -- this gets the organization name
and haou2.organization_id          = to_number(hoi.org_information3) -- this gets the operating unit id
and gl.ledger_id                   = to_number(hoi.org_information1) -- get the ledger_id
-- Avoid selecting disabled inventory organizations
and sysdate &lt; nvl(haou.date_to, sysdate + 1)
and fu1.user_id                    = mca.created_by
and fu2.user_id                    = mca.last_updated_by
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_org_code, p_operating_unit, p_ledger
-- Order by Status, Ledger, Operating_Unit, Org_Code, Category, Subinventory, Account Type
order by 1,2,3,5,7,9</SQL_TEXT>
  <VERSION_COMMENTS>Added operating unit security</VERSION_COMMENTS>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>CAC Category Accounts Setup</REPORT_NAME>
    <DESCRIPTION>Report to show the category accounts in use.  If category accounts have been set up with your Subledger Accounting Rules, the Inventory Cost Processor can use them and bypass the organization accounts (Average, LIFO, FIFO Costing) or the subinventory accounts (Standard Costing).

/* +=============================================================================+
-- |  Copyright 2021 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_category_setup_accts_rept.sql
-- |
-- |  Parameters:
-- |  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 show accounts used for the subinventories
-- | 
-- |  Version Modified on Modified  by   Description
-- |  ======= =========== ============== =========================================
-- |  1.0     16 Aug 2021 Douglas Volz   Initial Coding
-- +=============================================================================+*/</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;segment_columns</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>-100</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;segment_columns</ANCHOR>
    <SQL_TEXT>select
&apos;gcc.&apos;||lower(fifsv.application_column_name)||&apos; &quot;&apos;||substrb(fifsv.form_left_prompt_,1,xxen_report.max_column_length)||&apos;&quot;,&apos; text
from
(select xxen_util.init_cap(fifsv.form_left_prompt) form_left_prompt_, fifsv.* from fnd_id_flex_segments_vl fifsv) fifsv
where
fifsv.application_id=101 and
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.enabled_flag=&apos;Y&apos; and
fifsv.id_flex_num=(select fifsv0.id_flex_num from fnd_id_flex_structures_vl fifsv0 where fifsv0.application_id=101 and fifsv0.id_flex_code=&apos;GL#&apos; and fifsv0.id_flex_structure_name=:chart_of_accounts)
order by
fifsv.segment_num</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Chart of Accounts (inv org related)</LOV_NAME>
    <LOV_GUID>8E2FF36EDEC879D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
fifsv.id_flex_structure_name value,
fifsv.id_flex_structure_code description
from
fnd_id_flex_structures_vl fifsv
where
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.application_id=101 and
fifsv.id_flex_num in (select ood.chart_of_accounts_id from org_organization_definitions ood where nvl(ood.disable_date,sysdate + 1) &gt; sysdate)
order by
fifsv.id_flex_structure_name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select
fifsv.id_flex_structure_name
from
fnd_id_flex_structures_vl fifsv
where
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.application_id=101 and
fifsv.id_flex_num=(select ood.chart_of_accounts_id from org_organization_definitions ood where ood.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;))</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Chart of Accounts</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</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>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</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>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</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>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
