<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 Oracle FSG Converter -->
 <REPORTS_ROW>
  <GUID>1D3054367EA507B3E06362FB09059659</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select x.* from (
with merged_data as (
select
listagg(y.column_header,&apos;|&apos;) within group (order by y.sequence_) column_header,
listagg(y.sequence,&apos;|&apos;) within group (order by y.sequence_) sequence,
listagg(y.description,&apos;|&apos;) within group (order by y.sequence_) description,
replace(listagg(y.amount_type,&apos;|&apos;) within group (order by y.sequence_),&apos;~^&apos;) amount_type,
replace(listagg(y.period,&apos;|&apos;) within group (order by y.sequence_),&apos;~^&apos;) period,
replace(listagg(nvl(y.calculation,&apos;~^&apos;),&apos;|&apos;) within group (order by y.sequence_),&apos;~^&apos;) calculation,
y.report_title,
&amp;column_segments
y.segment_name override_segment_name,
replace(listagg(nvl(y.segment_override_value,&apos;~^&apos;),&apos;|&apos;) within group (order by y.sequence_),&apos;~^&apos;) override_segment_value,
replace(listagg(nvl(y.calculation_precedence_flag,&apos;~^&apos;),&apos;|&apos;) within group (order by y.sequence_),&apos;~^&apos;) calculation_precedence_flag,
replace(listagg(nvl(y.multiply,&apos;~^&apos;),&apos;|&apos;) within group (order by y.sequence_),&apos;~^&apos;) multiply,
replace(listagg(nvl(y.movement,&apos;~^&apos;),&apos;|&apos;) within group (order by y.sequence_),&apos;~^&apos;) movement
from
(
select distinct
&amp;column_segments_
x.report_title,
x.position,
x.segment_override,
x.column_header,
x.sequence,
x.sequence_,
x.description,
x.amount_type,
x.period,
x.calculation,
x.segment_name,
x.segment_override_value,
x.calculation_precedence_flag,
x.multiply,
x.movement,
x.cnt
from
(
select distinct
rrv.report_title,
rrav.position,
rrv.segment_override,
rrav.name column_header,
rrav.sequence,
rrav.sequence sequence_,
rrav.description,
nvl(rrav.amount_type,&apos;~^&apos;) amount_type,
case
when rrav.period_offset=0 then &apos;&apos;&apos;=enter_period_name&apos;
when nvl(rrav.period_offset,0)&lt;&gt;0 then &apos;&apos;&apos;=br_period_offset(enter_period_name,&quot;&apos;||rrav.period_offset||&apos;&quot;,,,)&apos;
when rrav.amount_type is not null then &apos;&apos;&apos;=enter_period_name&apos;
else &apos;~^&apos;
end period,
nvl(replace((select distinct
&apos;&apos;&apos;=&apos;||listagg(case when rrc.axis_seq_low=rrc.axis_seq_high then replace(rrc.operator||rrc.axis_seq_low,&apos;ENTER&apos;) when  rrc.axis_name_low=rrc.axis_name_high or (rrc.axis_name_low is not null and rrc.axis_name_high is null)  or (rrc.axis_name_low is null and rrc.axis_name_high is not null) then replace(rrc.operator||rrc.axis_name_low,&apos;ENTER&apos;)
else
case when rrc.operator=&apos;+&apos; then case when rrc.constant is null then  &apos;+sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos; else &apos;+#&apos;||rrc.constant end
when rrc.operator=&apos;-&apos; then case when rrc.constant is null then  &apos;-sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos; else &apos;-#&apos;||rrc.constant end
when rrc.operator=&apos;*&apos; then case when rrc.constant is null then  &apos;*sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos; else &apos;*#&apos;||rrc.constant end
when rrc.operator=&apos;/&apos; then case when rrc.constant is null then  &apos;/sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos; else &apos;/#&apos;||rrc.constant end
when rrc.operator=&apos;ENTER&apos; then  case
when nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low) is not null and nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high) is not null then &apos;sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos;
when rrc.constant is null then &apos;+&apos;||nvl(nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high),nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low))
else &apos;+#&apos;||rrc.constant
end
else nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;%&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low) end
end,&apos;&apos;) within group (order by rrc.calculation_seq) over (partition by rrc.axis_seq)
from
rg_report_calculations rrc
where
rrav.axis_set_id=rrc.axis_set_id and
rrav.sequence=rrc.axis_seq ),&apos;=+&apos;,&apos;=&apos;),&apos;~^&apos;) calculation,
rrasv.segment_name,
rrav.segment_override_value,
rrav.calculation_precedence_flag,
&apos;1&apos; multiply,
case when rrac.dr_cr_net_code=&apos;N&apos; then &apos;Net&apos; when rrac.dr_cr_net_code=&apos;D&apos; then &apos;Dr&apos; when rrac.dr_cr_net_code=&apos;C&apos; then &apos;Cr&apos; end movement,
&amp;column_segments_base
count(*) over (partition by rrav.sequence) cnt
from
rg_reports_v rrv,
rg_report_axes_v rrav,
rg_report_axis_contents rrac,
rg_report_axis_sets_v rrasv
where
1=1 and
rrv.column_set_id=rrasv.axis_set_id(+) and
rrav.axis_set_id=rrv.column_set_id and
rrav.axis_set_id=rrac.axis_set_id(+) and
rrav.sequence=rrac.axis_seq(+)
order by
rrav.position
) x
) y
group by
y.report_title,
y.segment_name
)
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Ledger:&apos; description, null sequence, null calculation, null line_format, :ledger column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Report Title:&apos; description, null sequence, null calculation, null line_format, report_title column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Current Period:&apos; description, null sequence, null calculation, null line_format, xxen_util.latest_open_period(:ledger) column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Override Segment Name&apos; description, null sequence, null calculation, null line_format, override_segment_name column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Calculation Precedence&apos; description, null sequence, null calculation, null line_format, calculation_precedence_flag column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Sequence&apos; description, null sequence, null calculation, null line_format, sequence column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Column Calculations&apos; description, null sequence, null calculation, null line_format, calculation column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Column Header&apos; description, null sequence, null calculation, null line_format, column_header column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Amount Type&apos; description, null sequence, null calculation, null line_format, amount_type column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Periods&apos; description, null sequence, null calculation, null line_format, period column_value from merged_data
union all select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Multiply&apos; description, null sequence, null calculation, null line_format, multiply column_value from merged_data
union all select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Movement&apos; description, null sequence, null calculation, null line_format, movement column_value from merged_data
union all
select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments &apos;Override Segment Value&apos; description, null sequence, null calculation, null line_format, override_segment_value column_value from merged_data
&amp;column_segments_union
) x
union all
select y.* from (
select
case when x.row_type=&apos;R&apos; then decode(x.sign,&apos;-&apos;,-1,1) end multiply,
case when x.dr_cr_net_code=&apos;N&apos; then &apos;Net&apos; when x.dr_cr_net_code=&apos;D&apos; then &apos;Dr&apos; when x.dr_cr_net_code=&apos;C&apos; then &apos;Cr&apos; end movement,
x.change_sign_flag change_sign,
x.display_flag display,
case when x.row_type=&apos;R&apos; then x.segment_display end segment_display,
&amp;rowset_segments_case
x.description,
x.sequence||&apos;:&apos;||x.axis_name sequence,
case when x.row_type=&apos;C&apos; then
replace((select distinct
&apos;&apos;&apos;=&apos;||listagg(case when rrc.axis_seq_low=rrc.axis_seq_high then replace(rrc.operator||rrc.axis_seq_low,&apos;ENTER&apos;) when rrc.axis_name_low=rrc.axis_name_high or (rrc.axis_name_low is not null and rrc.axis_name_high is null)  or (rrc.axis_name_low is null and rrc.axis_name_high is not null) then replace(rrc.operator||rrc.axis_name_low,&apos;ENTER&apos;)
else
case when rrc.operator=&apos;+&apos; then  case when rrc.constant is null then &apos;+sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos; else &apos;+#&apos;||rrc.constant end
when rrc.operator=&apos;-&apos; then case when rrc.constant is null then &apos;-sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos; else &apos;-#&apos;||rrc.constant end
when rrc.operator=&apos;*&apos; then case when rrc.constant is null then &apos;*sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos; else &apos;*#&apos;||rrc.constant end
when rrc.operator=&apos;/&apos; then case when rrc.constant is null then &apos;/sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos; else &apos;/#&apos;||rrc.constant end
when rrc.operator=&apos;ENTER&apos; then  case
when nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low) is not null and nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high) is not null then &apos;sum(&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low)||&apos;:&apos;||nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;)&apos;
when rrc.constant is null then &apos;+&apos;||nvl(nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high),nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low))
else &apos;+#&apos;||rrc.constant
end
else nvl(to_char(rrc.axis_seq_high),rrc.axis_name_high)||&apos;%&apos;||nvl(to_char(rrc.axis_seq_low),rrc.axis_name_low) end
end,&apos;&apos;) within group (order by rrc.calculation_seq) over (partition by rrc.axis_seq)
from
rg_report_calculations rrc
where
rrc.axis_set_id=x.axis_set_id and
rrc.axis_seq=x.sequence),&apos;=+&apos;,&apos;=&apos;) end calculation,
x.line_format,
null column_value
from
(
select
rrav.sequence,
rrac.range_mode,
rrac.sign,
rrac.dr_cr_net_code,
rrav.change_sign_flag,
rrav.display_flag,
&amp;rowset_segment_display
&amp;rowset_segments
rrav.description,
case when exists (select null from rg_report_calculations rrc where rrc.axis_set_id=rrav.axis_set_id and rrc.axis_seq=rrav.sequence) then &apos;C&apos; when rrac.axis_set_id is not null then &apos;R&apos; else &apos;T&apos; end row_type,
rrav.before_axis_string||&apos;:&apos;||rrav.after_axis_string||&apos;:&apos;||rrav.number_lines_skipped_before||&apos;:&apos;||rrav.number_lines_skipped_after line_format,
rrav.axis_set_id,
rrav.name axis_name,
row_number() over (partition by rrav.sequence order by rrac.segment1_low, rrac.segment2_low, rrac.segment3_low, rrac.segment4_low, rrac.segment5_low, rrac.segment6_low, rrac.segment7_low, rrac.segment8_low, rrac.segment9_low, rrac.segment10_low, rrac.rowid) range_seq
from
rg_reports_v rrv,
rg_report_axes_v rrav,
rg_report_axis_contents rrac
where
1=1 and
rrav.axis_set_id=rrv.row_set_id and
rrav.axis_set_id=rrac.axis_set_id(+) and
rrav.sequence=rrac.axis_seq(+)
&amp;rowset_summary_filter
) x
where
x.row_type=&apos;R&apos; or x.range_seq=1
order by
to_number(substr(sequence,1,instr(sequence,&apos;:&apos;)-1)),
x.range_seq
) y
union all
select y.* from(
select
null multiply,
null movement,
null change_sign,
null display,
null segment_display,
&amp;contentset_select_segments
&apos;Content Set&apos; description,
null sequence,
null calculation,
null line_format,
null column_value
from
(
select
&amp;contentset_case_segments
rrco.override_seq
from
rg_reports_v rrv,
rg_report_content_overrides rrco
where
1=1 and
rrv.content_set_id=rrco.content_set_id
) x
order by
x.override_seq
) y</SQL_TEXT>
  <VERSION_COMMENTS>The column set is merged with aggregate listagg and group by instead of one analytic listagg per field over a single window: databases before 12.2 raise ORA-01467 (sort key too long) at 16 window listaggs, which a chart of accounts with six or more segments reaches.</VERSION_COMMENTS>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>GL Oracle FSG Converter</REPORT_NAME>
    <DESCRIPTION>** This report is used by the GL Financial Statement and Drilldown report, to migrate financial statement reports from Oracle FSG. **

The GL Oracle FSG Converter is used for migration of financial statement reports from Oracle Financial Statement Generator (FSG) into the GL Financial Statement and Drilldown (FSG) report. This converter simplifies the process of transferring the existing Oracle FSG reports, allowing users to leverage advanced reporting and drilldown capabilities with minimal setup.

This version supports DB versions above 12c. To apply the converter, the profile &apos;Blitz FSG Oracle to Blitz Report Converter&apos; must be updated with the relevant report name based on the db version.

For a quick demonstration of GL Financial Statement and Drilldown (FSG), refer to our YouTube video.
https://youtu.be/dsRWXT2bem8?si=bA8cAxuXjfrMI-SI</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;column_segments</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;column_segments_</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;column_segments_base</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;column_segments_union</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;columnset_null_segments</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;contentset_case_segments</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;contentset_select_segments</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;rowset_segment_display</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;rowset_segments</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;rowset_segments_case</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;rowset_summary_filter</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:ledger</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>:ledger</ANCHOR>
    <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>
    <DEFAULT_VALUE>select coalesce(xxen_util.previous_parameter_value(:parameter_id),xxen_util.default_ledger) from dual where :$flex$.ledger_category is null</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <ANCHOR>&amp;column_segments</ANCHOR>
    <SQL_TEXT>select distinct
&apos;replace(listagg(nvl(y.&apos;||lower(fifsv.application_column_name)||&apos;_,&apos;&apos;~^&apos;&apos;),&apos;&apos;|&apos;&apos;) within group (order by y.sequence_),&apos;&apos;%&apos;&apos;) &apos;||lower(fifsv.application_column_name)||&apos;, &apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <ANCHOR>&amp;column_segments_</ANCHOR>
    <SQL_TEXT>select distinct
&apos;nvl(case when x.cnt&gt;1 then regexp_replace(listagg(x.&apos;||lower(fifsv.application_column_name)||&apos;,&apos;&apos;;&apos;&apos;) within group (order by x.&apos;||lower(fifsv.application_column_name)||&apos;) over (partition by x.sequence),&apos;&apos;([^;]+)(;\1)+(;|$)&apos;&apos;,&apos;&apos;\1\3&apos;&apos;) else x.&apos;||lower(fifsv.application_column_name)||&apos; end,&apos;&apos;%&apos;&apos;) &apos;||lower(fifsv.application_column_name)||&apos;_, &apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <ANCHOR>&amp;column_segments_base</ANCHOR>
    <SQL_TEXT>select distinct
&apos;case when rrac.&apos;||lower(fifsv.application_column_name)||&apos;_low is not null and rrac.sign = &apos;&apos;-&apos;&apos; then &apos;&apos;~&apos;&apos; end||&apos;||&apos;rrac.&apos;||lower(fifsv.application_column_name)||&apos;_low||case when rrac.&apos;||lower(fifsv.application_column_name)||&apos;_low is not null and rrac.&apos;||lower(fifsv.application_column_name)||&apos;_low&lt;&gt;rrac.&apos;||lower(fifsv.application_column_name)||&apos;_high then &apos;&apos;-&apos;&apos;||regexp_replace(rrac.&apos;||lower(fifsv.application_column_name)||&apos;_high,&apos;&apos;z&apos;&apos;,&apos;&apos;9&apos;&apos;,1,0,&apos;&apos;i&apos;&apos;) end &apos;||lower(fifsv.application_column_name)||&apos;, &apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <ANCHOR>&amp;column_segments_union</ANCHOR>
    <SQL_TEXT>select distinct
&apos;union all select null multiply, null movement, null change_sign, null display, null segment_display, &amp;columnset_null_segments  &apos;&apos;&apos;||Initcap(fifsv.application_column_name)||&apos;&apos;&apos; description, null sequence, null calculation, null line_format, &apos;||lower(fifsv.application_column_name)||&apos; column_value from merged_data&apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <ANCHOR>&amp;columnset_null_segments</ANCHOR>
    <SQL_TEXT>select distinct
&apos; null &apos;||lower(fifsv.application_column_name)||&apos;, &apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>7</SORT_ORDER>
    <ANCHOR>&amp;contentset_case_segments</ANCHOR>
    <SQL_TEXT>select distinct
&apos;rrco.&apos;||lower(fifsv.application_column_name)||&apos;_type,
rrco.&apos;||lower(fifsv.application_column_name)||&apos;_low||case when rrco.&apos;||lower(fifsv.application_column_name)||&apos;_low is not null and rrco.&apos;||lower(fifsv.application_column_name)||&apos;_low&lt;&gt;rrco.&apos;||lower(fifsv.application_column_name)||&apos;_high then &apos;&apos;-&apos;&apos;||regexp_replace(rrco.&apos;||lower(fifsv.application_column_name)||&apos;_high,&apos;&apos;z&apos;&apos;,&apos;&apos;9&apos;&apos;,1,0,&apos;&apos;i&apos;&apos;) end &apos;||lower(fifsv.application_column_name)||&apos;, &apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>8</SORT_ORDER>
    <ANCHOR>&amp;contentset_select_segments</ANCHOR>
    <SQL_TEXT>select distinct
&apos;case when x.&apos;||lower(fifsv.application_column_name)||&apos; is not null then x.&apos;||lower(fifsv.application_column_name)||&apos;_type||&apos;&apos;:&apos;&apos;||x.&apos;||lower(fifsv.application_column_name)||&apos; end &apos;||lower(fifsv.application_column_name)||&apos;, &apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>9</SORT_ORDER>
    <ANCHOR>&amp;rowset_segment_display</ANCHOR>
    <SQL_TEXT>select distinct
listagg(x.text_,&apos;||&apos;&apos;-&apos;&apos;||&apos;) within group (order by x.min_segment_num) over (partition by 1)||&apos; segment_display,&apos; text
from
(
select distinct
&apos;rrac.&apos;||lower(fifsv.application_column_name)||&apos;_type&apos;  text_,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num
) x</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>10</SORT_ORDER>
    <ANCHOR>&amp;rowset_segments</ANCHOR>
    <SQL_TEXT>select distinct
&apos;rrac.&apos;||lower(fifsv.application_column_name)||&apos;_low||case when rrac.&apos;||lower(fifsv.application_column_name)||&apos;_low is not null and rrac.&apos;||lower(fifsv.application_column_name)||&apos;_low&lt;&gt;rrac.&apos;||lower(fifsv.application_column_name)||&apos;_high then &apos;&apos;-&apos;&apos;||regexp_replace(rrac.&apos;||lower(fifsv.application_column_name)||&apos;_high,&apos;&apos;z&apos;&apos;,&apos;&apos;9&apos;&apos;,1,0,&apos;&apos;i&apos;&apos;) end &apos;||lower(fifsv.application_column_name)||&apos;, &apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>11</SORT_ORDER>
    <ANCHOR>&amp;rowset_segments_case</ANCHOR>
    <SQL_TEXT>select distinct
&apos;case when x.row_type=&apos;&apos;R&apos;&apos; then nvl(x.&apos;||lower(fifsv.application_column_name)||&apos;,&apos;&apos;%&apos;&apos;) end &apos;||lower(fifsv.application_column_name)||&apos;, &apos; text,
min(fifsv.id_flex_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_id_flex_num,
min(fifsv.segment_num) over (partition by fifsv.application_column_name, fifsv.form_left_prompt) min_segment_num
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.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
order by
min_id_flex_num,
min_segment_num</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>12</SORT_ORDER>
    <ANCHOR>&amp;rowset_summary_filter</ANCHOR>
    <SQL_TEXT>select
case when count(*)=0 then null else
&apos;and not (rrac.range_mode=&apos;&apos;Y&apos;&apos; and (&apos;||listagg(&apos;exists (select null from fnd_flex_values ffv where ffv.flex_value_set_id=&apos;||x.flex_value_set_id||&apos; and rrac.&apos;||x.column_name||&apos;_low=rrac.&apos;||x.column_name||&apos;_high and ffv.flex_value=rrac.&apos;||x.column_name||&apos;_low and ffv.summary_flag=&apos;&apos;Y&apos;&apos;) and not exists (select null from gl_code_combinations gcc where gcc.chart_of_accounts_id=&apos;||x.id_flex_num||&apos; and gcc.summary_flag=&apos;&apos;Y&apos;&apos; and gcc.&apos;||x.column_name||&apos;=rrac.&apos;||x.column_name||&apos;_low)&apos;,&apos; or &apos;) within group (order by x.column_name)||&apos;))&apos;
end text
from
(
select distinct
lower(fifsv.application_column_name) column_name,
fifsv.flex_value_set_id,
fifsv.id_flex_num
from
fnd_id_flex_segments_vl fifsv
where
fifsv.application_id=101 and
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.id_flex_num in (select gl.chart_of_accounts_id from gl_ledgers gl where xxen_util.contains(:ledger,gl.name)=&apos;Y&apos;)
) x</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Ledger</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>13</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>rrv.name=:report_name</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
rrv.name value,
rrv.report_title description
from
rg_reports_v rrv,
gl_ledgers gl
where
gl.name=:$flex$.Ledger and
rrv.structure_id=gl.chart_of_accounts_id
order by
value</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Report Name</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>
