<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: AP Supplier -->
 <LOVS_ROW>
  <GUID>B9847D20A0E4742FE0538931640A6379</GUID>
  <LOV_NAME>AP Supplier</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <FILTER_BEFORE_DISPLAY>Y</FILTER_BEFORE_DISPLAY>
  <LOV_QUERY>select
aps.vendor_name value,
aps.segment1 description
from
ap_suppliers aps
where
(:$flex$.operating_unit is null or aps.vendor_id in (select assa.vendor_id from hr_all_organization_units_vl haouv, ap_supplier_sites_all assa where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos; and haouv.organization_id=assa.org_id)) and
(:$flex$.organization_code is null or aps.vendor_id in (select assa.vendor_id from org_organization_definitions ood, ap_supplier_sites_all assa where xxen_util.contains(:$flex$.organization_code,ood.organization_code)=&apos;Y&apos; and ood.operating_unit=assa.org_id))
order by
aps.vendor_name,
aps.vendor_id</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: GL Chart of Accounts -->
 <LOVS_ROW>
  <GUID>8E2FF36EDEE379D2E0530100007F1FF2</GUID>
  <LOV_NAME>GL Chart of Accounts</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>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 gl.chart_of_accounts_id from gl_ledgers gl where 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(+)))
order by
fifsv.id_flex_structure_name</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>مخطط حسابات جميع دفاتر الأستاذ التي يمكن الوصول إليها من خلال تعيين مجموعة الوصول إلى دفتر الأستاذ</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Kontenplan aller Ledger, die über die Ledger-Zugriffs-Set-Zuordnung zugänglich sind</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Plan de cuentas de todos los libros de contabilidad accesibles mediante la asignación de conjuntos de acceso a los libros de contabilidad</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Plan comptable de tous les grands livres accessibles par affectation d&apos;un ensemble d&apos;accès aux grands livres</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Piano dei conti di tutti i registri accessibili tramite l&apos;assegnazione del set di accesso ai registri</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>元帳アクセスセットの割り当てでアクセス可能なすべての元帳の勘定科目一覧表</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>원장 액세스 세트 할당으로 액세스 할 수있는 모든 원장의 계정과 목표</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Plano de contas de todos os ledgers acessíveis por atribuição de conjunto de acesso ao ledger</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>План счетов всех бухгалтерских книг, доступных по назначению наборов доступа к бухгалтерским книгам</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Kontoplan för alla reskontrar som är tillgängliga genom tilldelning av reservertillgång</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Defter erişim seti ataması ile erişilebilen tüm defterlerin hesap planı</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>Chart of accounts of all ledgers accessible by ledger access set assignment</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>通过分类账访问集分配可进入的所有分类账的账目表。</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- 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: GL Segment1 -->
 <LOVS_ROW>
  <GUID>8E2FF36EDECC79D2E0530100007F1FF2</GUID>
  <LOV_NAME>GL Segment1</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
ffvv.flex_value value,
ffvv.description||case when ffvv.enabled_flag=&apos;Y&apos; and sysdate between nvl(ffvv.start_date_active,sysdate) and nvl(ffvv.end_date_active,sysdate) then null else &apos; (inactive)&apos; end description
from
fnd_id_flex_segments_vl fifsgv,
fnd_flex_values_vl ffvv
where
gl_security_pkg.validate_segval(fifsgv.segment_num,null,ffvv.flex_value)=&apos;TRUE&apos; and
fifsgv.application_id=101 and
fifsgv.id_flex_code=&apos;GL#&apos; and
fifsgv.enabled_flag=&apos;Y&apos; and
fifsgv.application_column_name=&apos;SEGMENT1&apos; and
fifsgv.flex_value_set_id=ffvv.flex_value_set_id and
fifsgv.id_flex_num in (
select /*+ no_unnest*/ fifsv.id_flex_num from fnd_id_flex_structures_vl fifsv where fifsv.application_id=101 and fifsv.id_flex_code=&apos;GL#&apos; and
(
xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos; or 
fifsgv.id_flex_num in 
(
select gl.chart_of_accounts_id from gl_ledgers gl where
(xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos; or gl.ledger_category_code=xxen_util.lookup_code(:$flex$.ledger_category,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101,&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(+))
)
)
)
)
order by
ffvv.flex_value</LOV_QUERY>
  <VERSION_COMMENTS>Concatenate (inactive) to the description of inactive segment values</VERSION_COMMENTS>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: GL Segment4 -->
 <LOVS_ROW>
  <GUID>8E2FF36EDECF79D2E0530100007F1FF2</GUID>
  <LOV_NAME>GL Segment4</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
ffvv.flex_value value,
ffvv.description||case when ffvv.enabled_flag=&apos;Y&apos; and sysdate between nvl(ffvv.start_date_active,sysdate) and nvl(ffvv.end_date_active,sysdate) then null else &apos; (inactive)&apos; end description
from
fnd_id_flex_segments_vl fifsgv,
fnd_flex_values_vl ffvv
where
gl_security_pkg.validate_segval(fifsgv.segment_num,null,ffvv.flex_value)=&apos;TRUE&apos; and
fifsgv.application_id=101 and
fifsgv.id_flex_code=&apos;GL#&apos; and
fifsgv.enabled_flag=&apos;Y&apos; and
fifsgv.application_column_name=&apos;SEGMENT4&apos; and
fifsgv.flex_value_set_id=ffvv.flex_value_set_id and
fifsgv.id_flex_num in (
select /*+ no_unnest*/ fifsv.id_flex_num from fnd_id_flex_structures_vl fifsv where fifsv.application_id=101 and fifsv.id_flex_code=&apos;GL#&apos; and
(
xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos; or 
fifsgv.id_flex_num in 
(
select gl.chart_of_accounts_id from gl_ledgers gl where
(xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos; or gl.ledger_category_code=xxen_util.lookup_code(:$flex$.ledger_category,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101,&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(+))
)
)
)
)
order by
ffvv.flex_value</LOV_QUERY>
  <VERSION_COMMENTS>Concatenate (inactive) to the description of inactive segment values</VERSION_COMMENTS>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
<!-- loader xml for Enginatics Blitz Report lov: Yes -->
 <LOVS_ROW>
  <GUID>8E2FF36EDEA679D2E0530100007F1FF2</GUID>
  <LOV_NAME>Yes</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
</LOVS>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: AI AP Trial Balance -->
 <REPORTS_ROW>
  <GUID>22F9F98651AB8733E06362FB09059E54</GUID>
  <SQL_TEXT>with apg_trial_balance_lvl2_base as
(
--noetix_sys.apg0_ou_acl_map_base xmap replaced by gl_ledgers and hr_operating_unit
--noetix_env_pkg.get_language replaced by userenv(&apos;lang&apos;)
select /*+ materialize */
xlatb.applied_to_application_id,
tbent.entity_code applied_to_entity_code,
xlatb.applied_to_entity_id,
tbent.transaction_number applied_to_transaction_num,
(case when tbent.entity_code = &apos;AP_INVOICES&apos; then &apos;Invoice&apos; when tbent.entity_code = &apos;AP_PAYMENTS&apos; then &apos;Payment&apos; else tbent.entity_code end) applied_to_transaction_type,
xlatb.code_combination_id,
xlatb.ledger_id,
xlatb.definition_code report_definition_code,
sum(nvl(xlatb.entered_rounded_dr,0))-sum(nvl(xlatb.entered_rounded_cr, 0)) rounded_applied_amount,
sum(nvl(xlatb.acctd_rounded_dr,0))-sum(nvl(xlatb.acctd_rounded_cr,0)) rounded_applied_amount_base,
:p_trial_bal_effective_date trial_balance_effective_date
from
xla.xla_transaction_entities tbent,
xla_trial_balances xlatb,
hr_operating_units hou,
gl_ledgers gl
where 3=3 and
2=2 and
nvl(tbent.security_id_int_1,-9999) = hou.organization_id and
hou.set_of_books_id= gl.ledger_id and
tbent.ledger_id=gl.ledger_id and
xlatb.applied_to_entity_id is not null and
tbent.ledger_id = xlatb.ledger_id and
xlatb.applied_to_entity_id = tbent.entity_id and
tbent.application_id = 200 and
xlatb.gl_date &lt;= :p_trial_bal_effective_date
group by
(case when tbent.entity_code = &apos;AP_INVOICES&apos; then &apos;Invoice&apos; when tbent.entity_code = &apos;AP_PAYMENTS&apos; then &apos;Payment&apos; else tbent.entity_code end),
:p_trial_bal_effective_date,
tbent.entity_code,
tbent.transaction_number,
xlatb.applied_to_application_id,
xlatb.applied_to_entity_id,
xlatb.code_combination_id,
xlatb.definition_code,
xlatb.ledger_id
),
apg_trial_balance_lvl_base as
(
select /*+ materialize */
xlatb.applied_to_entity_id,
min(xlatb.gl_date) gl_date
from
xla_trial_balances xlatb,
hr_operating_units hou,
gl_ledgers gl
where 3=3 and
2=2 and
xlatb.applied_to_entity_id is not null and
hou.set_of_books_id= gl.ledger_id and
xlatb.ledger_id=gl.ledger_id
group by xlatb.applied_to_entity_id
),
apg_trial_balance_lvl1_base as
(
select /*+ materialize */
evcls.name accounting_event_class_name,
xlatb.code_combination_id code_combination_id,
max(xlatb.gl_date) gl_date,
xlatb.ledger_id ledger_id,
nvl(entty.security_id_int_1,-9999) org_id,
sum(nvl(xlatb.entered_rounded_cr,0)-nvl(xlatb.entered_rounded_dr,0)) original_amount,
sum(nvl(xlatb.acctd_rounded_cr,0)-nvl(xlatb.acctd_rounded_dr,0)) original_amount_base,
xlatb.party_id party_id,
xlatb.record_type_code record_type_code,
xlatb.definition_code report_definition_code,
tbdfn.name report_definition_name,
xlatb.source_entity_id source_entity_id,
vend.vendor_name supplier_name,
party.party_name third_party_name,
(case when vend.vendor_id is null then party.party_type  else &apos;SUPPLIER&apos; end) third_party_type_code,
xlatb.trx_currency_code transaction_currency_code,
entty.entity_code transaction_entity_code,
entty.source_id_int_1 transaction_id,
entty.transaction_number transaction_number,
(case when entty.entity_code = &apos;AP_INVOICES&apos; then &apos;Invoice&apos; when entty.entity_code=&apos;AP_PAYMENTS&apos; then &apos;Payment&apos; else entty.entity_code end)transaction_type,
:p_trial_bal_effective_date Trial_Balance_Effective_Date
from
apg_trial_balance_lvl_base inv,
xla_event_classes_tl evcls,
xla_tb_definitions_tl tbdfn,
hz_parties party,
ap_suppliers vend,
xla_trial_balances xlatb,
xla.xla_transaction_entities entty,
hr_operating_units hou,
gl_ledgers gl 
where 3=3 and
2=2 and
nvl(entty.security_id_int_1,-9999) = hou.organization_id and
hou.set_of_books_id= gl.ledger_id and
entty.ledger_id=gl.ledger_id and
xlatb.source_entity_id = entty.entity_id and
xlatb.applied_to_entity_id is null and
entty.ledger_id = xlatb.ledger_id and
xlatb.source_application_id = entty.application_id and
xlatb.definition_code = tbdfn.definition_code and
xlatb.party_id = vend.vendor_id and
vend.party_id = party.party_id and
entty.application_id = 200 and
(inv.gl_date &lt;= :p_trial_bal_effective_date or xlatb.gl_date&lt;=:p_trial_bal_effective_date) and
evcls.language = userenv(&apos;lang&apos;) and 
evcls.entity_code = entty.entity_code and
evcls.application_id = entty.application_id and
evcls.event_class_code = xlatb.event_class_code and
tbdfn.language = userenv(&apos;lang&apos;) and 
inv.applied_to_entity_id (+) = entty.entity_id
group by
(case when entty.entity_code = &apos;AP_INVOICES&apos; then &apos;Invoice&apos; when entty.entity_code=&apos;AP_PAYMENTS&apos; then &apos;Payment&apos; else entty.entity_code end),
entty.entity_code,
entty.source_id_int_1,
entty.transaction_number,
evcls.name,
:p_trial_bal_effective_date,
nvl(entty.security_id_int_1,-9999),
party.party_name,
tbdfn.name,
vend.vendor_name,
xlatb.code_combination_id,
xlatb.definition_code,
xlatb.ledger_id,
xlatb.party_id,
(case when vend.vendor_id is null then party.party_type  else &apos;SUPPLIER&apos; end),
xlatb.record_type_code,
xlatb.source_entity_id,
xlatb.trx_currency_code
),
apg_trial_balance_details as
(
select
tbase.accounting_event_class_name,
tbase.code_combination_id,
ltb.rounded_applied_amount applied_amount,
ltb.rounded_applied_amount_base applied_amount_base,
ltb.applied_to_entity_code,
ltb.applied_to_transaction_num,
ltb.applied_to_transaction_type,
gl.currency_code currency_code_base, 
gl.name ledger_name,
hou.name operating_unit_name,
tbase.original_amount,
tbase.original_amount_base,
tbase.record_type_code,
(
case when ltb.trial_balance_effective_date &lt; tbase.gl_date
then - 1 * ltb.rounded_applied_amount
else
nvl(tbase.original_amount, 0) - nvl(ltb.rounded_applied_amount, 0)
end
) remaining_amount,
(
case when ltb.trial_balance_effective_date &lt; tbase.gl_date
then - 1 * ltb.rounded_applied_amount_base
else
nvl(tbase.original_amount_base, 0) - nvl(ltb.rounded_applied_amount_base, 0)
end
) remaining_amount_base,
tbase.report_definition_name,
tbase.supplier_name supplier_name,
tbase.third_party_name third_party_name,
tbase.third_party_type_code third_party_type_code,
tbase.transaction_currency_code transaction_currency_code,
(select inv.invoice_date from ap_invoices_all inv where inv.invoice_id = tbase.transaction_id)transaction_date,
tbase.transaction_entity_code,
tbase.gl_date transaction_gl_date,
tbase.transaction_number,
tbase.transaction_type,
tbase.trial_balance_effective_date,
round((to_date(tbase.trial_balance_effective_date)-tbase.gl_date),0)age_days
from
apg_trial_balance_lvl2_base ltb,
apg_trial_balance_lvl1_base tbase,
hr_operating_units hou, 
gl_ledgers gl
where 2=2 and
tbase.org_id = hou.organization_id and
hou.set_of_books_id= gl.ledger_id and
ltb.applied_to_entity_id (+) = tbase.source_entity_id and
ltb.code_combination_id (+) = tbase.code_combination_id and
tbase.trial_balance_effective_date = ltb.trial_balance_effective_date (+) and
ltb.report_definition_code (+) = tbase.report_definition_code
)
select
x.ledger_name,
&amp;chart_of_accounts_name
x.operating_unit_name,
x.accounting_event_class_name,
&amp;segment_columns
x.applied_amount,
x.applied_amount_base,
x.applied_to_entity_code,
x.applied_to_transaction_num,
x.applied_to_transaction_type,
x.currency_code_base,
x.original_amount,
x.original_amount_base,
x.record_type_code,
x.remaining_amount,
x.remaining_amount_base,
x.report_definition_name,
x.supplier_name,
x.third_party_name,
x.third_party_type_code,
x.transaction_currency_code,
x.transaction_date,
x.transaction_entity_code,
&apos;&apos; pmt,
x.transaction_gl_date,
x.transaction_number document_no,
x.transaction_type,
x.trial_balance_effective_date,
case when x.age_days&gt;120 
then &apos;120 + days&apos;
when x.age_days&gt;91 and x.age_days&lt;=120 
then &apos;90 -120 days&apos; 
when x.age_days&gt;61 and x.age_days&lt;=90 
then &apos;60 - 90 days&apos;
when x.age_days&gt;31 and x.age_days&lt;=60
then &apos;30 - 60 days&apos;
else
&apos;Current&apos; end ageing,
x.age_days &quot;Age(Days)&quot;
from
apg_trial_balance_details x,
gl_code_combinations_kfv gcck
where
1=1 and
gcck.code_combination_id=x.code_combination_id</SQL_TEXT>
  <ENABLED>Y</ENABLED>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>AI AP Trial Balance</REPORT_NAME>
    <DESCRIPTION>Adcock Ingram AP Trial Balance Report</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Adcock Ingram</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;chart_of_accounts_name</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;segment_columns</ANCHOR>
   </ANCHORS_ROW>
   <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_ROW>
    <ANCHOR>:p_trial_bal_effective_date</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>-20</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>gl.name=:ledger 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)</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>
    <DEFAULT_VALUE>coalesce(xxen_util.previous_parameter_value(:parameter_id),xxen_util.default_ledger)</DEFAULT_VALUE>
    <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>
    <DISPLAY_SEQUENCE>-10</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>gl.chart_of_accounts_id in (select fifsv.id_flex_num from fnd_id_flex_structures_vl fifsv where fifsv.application_id=101 and fifsv.id_flex_code=&apos;GL#&apos; and fifsv.id_flex_structure_name=:chart_of_accounts)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Chart of Accounts</LOV_NAME>
    <LOV_GUID>8E2FF36EDEE379D2E0530100007F1FF2</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 gl.chart_of_accounts_id from gl_ledgers gl where 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(+)))
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 in (select gl.chart_of_accounts_id from gl_ledgers gl where 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
rownum=1</DEFAULT_VALUE>
    <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>3</SORT_ORDER>
    <ANCHOR>&amp;chart_of_accounts_name</ANCHOR>
    <SQL_TEXT>:chart_of_accounts chart_of_accounts_name,</SQL_TEXT>
    <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>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>:p_trial_bal_effective_date</ANCHOR>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>sysdate</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Trial Balance Effective Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.transaction_date&lt;=:p_trial_bal_effective_date</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Trial Balance Effective Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>gcck.segment1=:p_segment1</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Segment1</LOV_NAME>
    <LOV_GUID>8E2FF36EDECC79D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
ffvv.flex_value value,
ffvv.description||case when ffvv.enabled_flag=&apos;Y&apos; and sysdate between nvl(ffvv.start_date_active,sysdate) and nvl(ffvv.end_date_active,sysdate) then null else &apos; (inactive)&apos; end description
from
fnd_id_flex_segments_vl fifsgv,
fnd_flex_values_vl ffvv
where
gl_security_pkg.validate_segval(fifsgv.segment_num,null,ffvv.flex_value)=&apos;TRUE&apos; and
fifsgv.application_id=101 and
fifsgv.id_flex_code=&apos;GL#&apos; and
fifsgv.enabled_flag=&apos;Y&apos; and
fifsgv.application_column_name=&apos;SEGMENT1&apos; and
fifsgv.flex_value_set_id=ffvv.flex_value_set_id and
fifsgv.id_flex_num in (
select /*+ no_unnest*/ fifsv.id_flex_num from fnd_id_flex_structures_vl fifsv where fifsv.application_id=101 and fifsv.id_flex_code=&apos;GL#&apos; and
(
xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos; or 
fifsgv.id_flex_num in 
(
select gl.chart_of_accounts_id from gl_ledgers gl where
(xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos; or gl.ledger_category_code=xxen_util.lookup_code(:$flex$.ledger_category,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101,&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(+))
)
)
)
)
order by
ffvv.flex_value</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>GL Company Segment</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>7</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>1=1</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select xxen_util.segment_description(:$flex$.gl_company_segment,&apos;SEGMENT1&apos;,(select fifsv.id_flex_num from fnd_id_flex_structures_vl fifsv where fifsv.application_id=101 and fifsv.id_flex_code=&apos;GL#&apos; and fifsv.id_flex_structure_name=:$flex$.chart_of_accounts)) value,
&apos;&apos; description
from dual</LOV_QUERY_DSP>
    <DEFAULT_VALUE>xxen_util.segment_description(:$flex$.gl_company_segment,&apos;SEGMENT1&apos;,(select fifsv.id_flex_num from fnd_id_flex_structures_vl fifsv where fifsv.application_id=101 and fifsv.id_flex_code=&apos;GL#&apos; and fifsv.id_flex_structure_name=:$flex$.chart_of_accounts))</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>GL Company Segment Description</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>gcck.segment4=:p_segment4</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Segment4</LOV_NAME>
    <LOV_GUID>8E2FF36EDECF79D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
ffvv.flex_value value,
ffvv.description||case when ffvv.enabled_flag=&apos;Y&apos; and sysdate between nvl(ffvv.start_date_active,sysdate) and nvl(ffvv.end_date_active,sysdate) then null else &apos; (inactive)&apos; end description
from
fnd_id_flex_segments_vl fifsgv,
fnd_flex_values_vl ffvv
where
gl_security_pkg.validate_segval(fifsgv.segment_num,null,ffvv.flex_value)=&apos;TRUE&apos; and
fifsgv.application_id=101 and
fifsgv.id_flex_code=&apos;GL#&apos; and
fifsgv.enabled_flag=&apos;Y&apos; and
fifsgv.application_column_name=&apos;SEGMENT4&apos; and
fifsgv.flex_value_set_id=ffvv.flex_value_set_id and
fifsgv.id_flex_num in (
select /*+ no_unnest*/ fifsv.id_flex_num from fnd_id_flex_structures_vl fifsv where fifsv.application_id=101 and fifsv.id_flex_code=&apos;GL#&apos; and
(
xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos; or 
fifsgv.id_flex_num in 
(
select gl.chart_of_accounts_id from gl_ledgers gl where
(xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos; or gl.ledger_category_code=xxen_util.lookup_code(:$flex$.ledger_category,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101,&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(+))
)
)
)
)
order by
ffvv.flex_value</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>GL Natural Account</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>9</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.report_definition_name not like &apos;%&apos;||:p_pattern||&apos;%&apos;</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Char</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>Total</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Definition (does not contain)</PARAMETER_NAME>
      <DESCRIPTION>Report Definition Name (does not contain)</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>10</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.remaining_amount&lt;&gt;0</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes</LOV_NAME>
    <LOV_GUID>8E2FF36EDEA679D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY_DSP>
    <DEFAULT_VALUE>Y</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Amount Not Equals Zero</PARAMETER_NAME>
      <DESCRIPTION>Remaining Amount Not Equals Zero</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>11</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</DISPLAY_SEQUENCE>
    <ANCHOR>&amp;segment_columns</ANCHOR>
    <SQL_TEXT>with x as (
select
fifsv.application_column_name,
fifsv.form_left_prompt
from
fnd_id_flex_segments_vl 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
)
select &apos;gcck.concatenated_segments,&apos; text from x union 
select &apos;gcck.code_combination_id,&apos; text from x union 
select &apos;&apos;&apos;&apos;||:chart_of_accounts||&apos;&apos;&apos;&apos;||&apos; flexfield,&apos; text from x union 
select &apos;&apos;&apos;&apos;||listagg(x.form_left_prompt,&apos;-&apos;) within group (order by x.application_column_name)||&apos;&apos;&apos;&apos;||&apos; segment_name_list,&apos; text from x union
select &apos;gcck.&apos;||lower(x.application_column_name)||&apos; &quot;&apos;||substrb(x.form_left_prompt,1,xxen_report.max_column_length-9)||&apos;&quot;,&apos; text from x</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes_No</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
fnd_lookups
where fnd_lookups.lookup_type=&apos;YES_NO&apos;
order by value,description</LOV_QUERY_DSP>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <DEFAULT_VALUE>N</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show All Accounts</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>12</SORT_ORDER>
    <ANCHOR>&amp;segment_columns</ANCHOR>
    <SQL_TEXT>with x as (
select
fifsv.application_column_name,
fifsv.form_left_prompt
from
fnd_id_flex_segments_vl fifsv
where
fifsv.application_id=101 and
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.application_column_name=&apos;SEGMENT1&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
)
select &apos;&apos;&apos;&apos;||:chart_of_accounts||&apos;&apos;&apos;&apos;||&apos; flexfield,&apos; text from x union
select &apos;gcck.&apos;||lower(x.application_column_name)||&apos; &quot;&apos;||substrb(x.form_left_prompt,1,xxen_report.max_column_length-9)||&apos;&quot;,&apos; text from x</SQL_TEXT>
    <MATCHING_VALUE>N</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show All Accounts</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>13</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</DISPLAY_SEQUENCE>
    <ANCHOR>3=3</ANCHOR>
    <SQL_TEXT>xlatb.party_id in (select vendor_id from ap_suppliers where vendor_name=:vendor_name)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>AP Supplier</LOV_NAME>
    <LOV_GUID>B9847D20A0E4742FE0538931640A6379</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
aps.vendor_name value,
aps.segment1 description
from
ap_suppliers aps
where
(:$flex$.operating_unit is null or aps.vendor_id in (select assa.vendor_id from hr_all_organization_units_vl haouv, ap_supplier_sites_all assa where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos; and haouv.organization_id=assa.org_id)) and
(:$flex$.organization_code is null or aps.vendor_id in (select assa.vendor_id from org_organization_definitions ood, ap_supplier_sites_all assa where xxen_util.contains(:$flex$.organization_code,ood.organization_code)=&apos;Y&apos; and ood.operating_unit=assa.org_id))
order by
aps.vendor_name,
aps.vendor_id</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Supplier Name</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <PARAMETER_DEPENDENCIES>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.chart_of_accounts</FLEX_BIND>
    <PARAMETER_NAME>Chart of Accounts</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>GL Company Segment</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.chart_of_accounts</FLEX_BIND>
    <PARAMETER_NAME>Chart of Accounts</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>GL Company Segment Description</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.chart_of_accounts</FLEX_BIND>
    <PARAMETER_NAME>Chart of Accounts</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>GL Natural Account</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.chart_of_accounts</FLEX_BIND>
    <PARAMETER_NAME>Chart of Accounts</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Ledger</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.gl_company_segment</FLEX_BIND>
    <PARAMETER_NAME>GL Company Segment</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>GL Company Segment Description</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.ledger</FLEX_BIND>
    <PARAMETER_NAME>Ledger</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>GL Company Segment</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.ledger</FLEX_BIND>
    <PARAMETER_NAME>Ledger</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>GL Natural Account</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>
