<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: Test segment value -->
 <REPORTS_ROW>
  <GUID>35CBBB3F96488581E06362FB09056702</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>with gl as
(
select
fifs.flex_value_set_id,
fifs.application_column_name,
fifs.segment_name,
fifs.segment_num
from
fnd_id_flex_segments fifs,
fnd_id_flex_segments_tl fifst
where
fifs.application_id=101 and
fifs.id_flex_code=&apos;GL#&apos; and
fifs.id_flex_num=(select gl.chart_of_accounts_id from gl_ledgers gl where gl.name=:ledger) and
fifs.application_id=fifst.application_id and
fifs.id_flex_code=fifst.id_flex_code and
fifs.id_flex_num=fifst.id_flex_num and
fifs.application_column_name=fifst.application_column_name and
fifst.language=&apos;US&apos; and
fifs.segment_num=1
)
select
case when connect_by_isleaf is null then &apos;P&apos; else &apos;C&apos; end id,
ffvnh.flex_value value,
replace(ffvv.description,chr(9),&apos; &apos;) description
from
(
select
gl.segment_num,
gl.segment_name,
gl.application_column_name,
ffvnh.parent_flex_value flex_value,
ffvnh.child_flex_value_low,
ffvnh.child_flex_value_high,
ffvnh.range_attribute,
ffvnh.flex_value_set_id,
ffvnh.created_by,
ffvnh.creation_date,
ffvnh.last_updated_by,
ffvnh.last_update_date
from
fnd_flex_value_norm_hierarchy ffvnh,
gl
where
:hierarchy_name is not null and
ffvnh.flex_value_set_id=gl.flex_value_set_id
union all
select
gl.segment_num,
gl.segment_name,
gl.application_column_name,
ffv2.flex_value flex_value,
null child_flex_value_low,
null child_flex_value_high,
&apos;x&apos; range_attribute,
ffv2.flex_value_set_id,
ffv2.created_by,
ffv2.creation_date,
ffv2.last_updated_by,
ffv2.last_update_date
from
fnd_flex_values ffv2,
gl
where
:hierarchy_name is not null and
ffv2.summary_flag=&apos;N&apos; and
ffv2.flex_value_set_id=gl.flex_value_set_id
) ffvnh,
fnd_flex_values_vl ffvv
where
ffvnh.flex_value=ffvv.flex_value and
gl_security_pkg.validate_segval(ffvnh.segment_num,null,ffvv.flex_value)=&apos;TRUE&apos; and
ffvnh.flex_value_set_id=ffvv.flex_value_set_id
connect by nocycle
ffvnh.flex_value between prior ffvnh.child_flex_value_low and prior ffvnh.child_flex_value_high and
decode(nvl(prior ffvnh.range_attribute,&apos;P&apos;),&apos;P&apos;,&apos;Y&apos;,&apos;N&apos;)=ffvv.summary_flag
start with
ffvnh.flex_value=:hierarchy_name
union all
select
x.*
from
(
select
decode(ffvv.summary_flag,&apos;Y&apos;,&apos;P&apos;,&apos;C&apos;) id,
ffvv.flex_value value,
replace(ffvv.description,chr(9),&apos; &apos;) description
from
gl,
fnd_flex_values_vl ffvv
where
gl.flex_value_set_id=ffvv.flex_value_set_id and
gl_security_pkg.validate_segval(gl.segment_num,null,ffvv.flex_value)=&apos;TRUE&apos; and
:hierarchy_name is null
order by
ffvv.flex_value
) x</SQL_TEXT>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>Test segment value</REPORT_NAME>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>:hierarchy_name</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 custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
gl.name id,
gl.name value,
gl.ledger_id||&apos;: &apos;||gl.description description
from
gl_ledgers gl,
fnd_id_flex_structures_vl fifsv,
gl_access_set_norm_assign gasna, 
gl_ledger_set_norm_assign_v glsnav,
fnd_responsibility_vl frv
where 
(frv.responsibility_key=:$flex$.responsibility_key or (:$flex$.responsibility_key is null and frv.responsibility_id=fnd_global.resp_id)) and
gasna.access_set_id=fnd_profile.value_specific(&apos;GL_ACCESS_SET_ID&apos;,null,frv.responsibility_id,frv.application_id,null,null) and 
gasna.ledger_id=glsnav.ledger_set_id(+)and
gl.ledger_id = nvl(glsnav.ledger_id,gasna.ledger_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
id</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>
