<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: GL Chart of Accounts Mapping Rules -->
 <REPORTS_ROW>
  <GUID>5213EEE37675046AE0630100007F3A91</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select
gcm.name coa_mapping,
gcm.description coa_mapping_description,
fifsv_from.id_flex_structure_name from_chart_of_accounts,
fifsv_to.id_flex_structure_name to_chart_of_accounts,
gcm.start_date_active,
gcm.end_date_active,
x.rule_type,
x.segment_number,
x.target_segment,
x.segment_map_type,
x.source_segment,
x.source_value,
x.target_value,
x.target_parent_rollup_value,
x.source_range_from,
x.source_range_to,
x.from_code_combination_low,
x.from_code_combination_high,
x.to_code_combination,
xxen_util.user_name(x.last_updated_by) last_updated_by,
xxen_util.client_time(x.last_update_date) last_update_date
from
gl_coa_mappings gcm,
fnd_id_flex_structures_vl fifsv_from,
fnd_id_flex_structures_vl fifsv_to,
(
select
&apos;Segment Rule&apos; rule_type,
gcm.coa_mapping_id,
fsp.segment_num segment_number,
fsp.segment_name target_segment,
xxen_util.meaning(csm.segment_map_type,&apos;SEGMENT_MAP_TYPE&apos;,101) segment_map_type,
fss.segment_name source_segment,
case csm.segment_map_type when &apos;S&apos; then csm.single_value end source_value,
case csm.segment_map_type when &apos;C&apos; then null when &apos;S&apos; then null else csm.single_value end target_value,
csm.parent_rollup_value target_parent_rollup_value,
coalesce(gcfh.child_flex_value_low,ffvh.child_flex_value_low) source_range_from,
coalesce(gcfh.child_flex_value_high,ffvh.child_flex_value_high) source_range_to,
cast(null as varchar2(800)) from_code_combination_low,
cast(null as varchar2(800)) from_code_combination_high,
cast(null as varchar2(800)) to_code_combination,
csm.last_updated_by,
csm.last_update_date
from
gl_coa_mappings gcm,
fnd_id_flex_segments fsp,
gl_cons_segment_map csm,
fnd_id_flex_segments fss,
gl_cons_flex_hierarchies gcfh,
fnd_flex_value_hierarchies ffvh
where
1=1 and
fsp.application_id=101 and
fsp.id_flex_code=&apos;GL#&apos; and
fsp.id_flex_num=gcm.to_coa_id and
fsp.enabled_flag=&apos;Y&apos; and
csm.to_value_set_id(+)=fsp.flex_value_set_id and
csm.to_application_column_name(+)=fsp.application_column_name and
csm.coa_mapping_id(+)=gcm.coa_mapping_id and
fss.application_id(+)=101 and
fss.id_flex_code(+)=&apos;GL#&apos; and
fss.id_flex_num(+)=gcm.from_coa_id and
fss.enabled_flag(+)=&apos;Y&apos; and
fss.application_column_name(+)=csm.from_application_column_name and
gcfh.segment_map_id(+)=decode(csm.segment_map_type,&apos;R&apos;,csm.segment_map_id,&apos;U&apos;,csm.segment_map_id,-1) and
gcfh.parent_flex_value(+)=csm.single_value and
ffvh.flex_value_set_id(+)=decode(csm.segment_map_type,&apos;P&apos;,csm.from_value_set_id,-1) and
ffvh.parent_flex_value(+)=csm.parent_rollup_value
union all
select
&apos;Code Combination Rule&apos; rule_type,
gcm.coa_mapping_id,
to_number(null) segment_number,
cast(null as varchar2(60)) target_segment,
cast(null as varchar2(80)) segment_map_type,
cast(null as varchar2(60)) source_segment,
cast(null as varchar2(25)) source_value,
cast(null as varchar2(25)) target_value,
cast(null as varchar2(25)) target_parent_rollup_value,
cast(null as varchar2(25)) source_range_from,
cast(null as varchar2(25)) source_range_to,
(select rtrim(
nvl2(cfm.segment1_low,cfm.segment1_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment2_low,cfm.segment2_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment3_low,cfm.segment3_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment4_low,cfm.segment4_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment5_low,cfm.segment5_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment6_low,cfm.segment6_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment7_low,cfm.segment7_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment8_low,cfm.segment8_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment9_low,cfm.segment9_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment10_low,cfm.segment10_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment11_low,cfm.segment11_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment12_low,cfm.segment12_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment13_low,cfm.segment13_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment14_low,cfm.segment14_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment15_low,cfm.segment15_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment16_low,cfm.segment16_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment17_low,cfm.segment17_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment18_low,cfm.segment18_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment19_low,cfm.segment19_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment20_low,cfm.segment20_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment21_low,cfm.segment21_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment22_low,cfm.segment22_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment23_low,cfm.segment23_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment24_low,cfm.segment24_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment25_low,cfm.segment25_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment26_low,cfm.segment26_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment27_low,cfm.segment27_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment28_low,cfm.segment28_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment29_low,cfm.segment29_low||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment30_low,cfm.segment30_low||fifsv2.concatenated_segment_delimiter,null),
fifsv2.concatenated_segment_delimiter)
from fnd_id_flex_structures_vl fifsv2
where fifsv2.application_id=101 and fifsv2.id_flex_code=&apos;GL#&apos; and fifsv2.id_flex_num=gcm.from_coa_id) from_code_combination_low,
(select rtrim(
nvl2(cfm.segment1_high,cfm.segment1_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment2_high,cfm.segment2_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment3_high,cfm.segment3_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment4_high,cfm.segment4_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment5_high,cfm.segment5_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment6_high,cfm.segment6_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment7_high,cfm.segment7_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment8_high,cfm.segment8_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment9_high,cfm.segment9_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment10_high,cfm.segment10_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment11_high,cfm.segment11_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment12_high,cfm.segment12_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment13_high,cfm.segment13_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment14_high,cfm.segment14_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment15_high,cfm.segment15_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment16_high,cfm.segment16_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment17_high,cfm.segment17_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment18_high,cfm.segment18_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment19_high,cfm.segment19_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment20_high,cfm.segment20_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment21_high,cfm.segment21_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment22_high,cfm.segment22_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment23_high,cfm.segment23_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment24_high,cfm.segment24_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment25_high,cfm.segment25_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment26_high,cfm.segment26_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment27_high,cfm.segment27_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment28_high,cfm.segment28_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment29_high,cfm.segment29_high||fifsv2.concatenated_segment_delimiter,null)||
nvl2(cfm.segment30_high,cfm.segment30_high||fifsv2.concatenated_segment_delimiter,null),
fifsv2.concatenated_segment_delimiter)
from fnd_id_flex_structures_vl fifsv2
where fifsv2.application_id=101 and fifsv2.id_flex_code=&apos;GL#&apos; and fifsv2.id_flex_num=gcm.from_coa_id) from_code_combination_high,
gcck.concatenated_segments to_code_combination,
cfm.last_updated_by,
cfm.last_update_date
from
gl_coa_mappings gcm,
gl_cons_flexfield_map cfm,
gl_code_combinations_kfv gcck
where
2=2 and
gcm.coa_mapping_id=cfm.coa_mapping_id and
cfm.to_code_combination_id=gcck.code_combination_id and
gcck.enabled_flag=&apos;Y&apos;
) x
where
gcm.coa_mapping_id=x.coa_mapping_id and
gcm.from_coa_id=fifsv_from.id_flex_num and
fifsv_from.application_id=101 and
fifsv_from.id_flex_code=&apos;GL#&apos; and
gcm.to_coa_id=fifsv_to.id_flex_num and
fifsv_to.application_id=101 and
fifsv_to.id_flex_code=&apos;GL#&apos;
order by
gcm.name,
case x.rule_type when &apos;Segment Rule&apos; then 1 else 2 end,
x.segment_number,
x.source_segment,
x.target_value,
x.target_parent_rollup_value,
x.source_range_from,
x.source_range_to,
x.to_code_combination</SQL_TEXT>
  <VERSION_COMMENTS>Conversion of the Oracle BI Publisher report &apos;Chart of Accounts - Mapping Rules (XML)&apos; (concurrent program GLXCOCRR_XML, data definition SQLGL/GLXCOCRR_XML). Consolidates the two BIP queries (Q_FLEX_RULES for code combination rules and Q_SEGMENT_RULES for segment rules) into a single SQL with a Rule Type discriminator. Segment-rule rollup ranges are read directly from gl_cons_flex_hierarchies and fnd_flex_value_hierarchies (instead of gl_cons_rollup_ranges_v) to avoid the &apos;R&apos;/&apos;U&apos; fan-out caused by the view&apos;s UNION ALL branches. Source-side concatenated segments (gl_cons_flexfield_map) are assembled per-row using the source COA&apos;s actual delimiter from fnd_id_flex_structures. The COA Mapping parameter is duplicated as a linked parameter so the filter is pushed inside both UNION branches (anchor 1=1 inside the segment-rules branch, anchor 2=2 inside the code-combination-rules branch).</VERSION_COMMENTS>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>GL Chart of Accounts Mapping Rules</REPORT_NAME>
    <DESCRIPTION>Lists the segment mapping rules and code combination mappings defined for a Global Consolidation System (GCS) chart of accounts mapping. Converted from the Oracle BI Publisher report &apos;Chart of Accounts - Mapping Rules (XML)&apos; (GLXCOCRR_XML).</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>R12 only</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>2=2</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>gcm.coa_mapping_id=:p_coa_mapping_id</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
gcm.coa_mapping_id id,
gcm.name value,
fifsv_from.id_flex_structure_name||&apos; -&gt; &apos;||fifsv_to.id_flex_structure_name||nvl2(gcm.description,&apos;: &apos;||gcm.description,null) description
from
gl_coa_mappings gcm,
fnd_id_flex_structures_vl fifsv_from,
fnd_id_flex_structures_vl fifsv_to
where
gcm.from_coa_id=fifsv_from.id_flex_num and
fifsv_from.application_id=101 and
fifsv_from.id_flex_code=&apos;GL#&apos; and
gcm.to_coa_id=fifsv_to.id_flex_num and
fifsv_to.application_id=101 and
fifsv_to.id_flex_code=&apos;GL#&apos;
order by
gcm.name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>xxen_util.previous_parameter_value(:parameter_id)</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>COA Mapping</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>gcm.coa_mapping_id=:p_coa_mapping_id</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>COA Mapping</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>
