<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: 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: HR Operating Unit -->
 <LOVS_ROW>
  <GUID>8E2FF36EDEB979D2E0530100007F1FF2</GUID>
  <LOV_NAME>HR Operating Unit</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
hou.name value,
null description
from
hr_operating_units hou
where
sysdate between hou.date_from and nvl(hou.date_to,sysdate) and
(:$flex$.ledger is null or hou.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
hou.organization_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11)
order by
hou.name</LOV_QUERY>
  <VERSION_COMMENTS>Fixed where clause duplication</VERSION_COMMENTS>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>وحدة التشغيل مقيدة بالتحكم في الوصول متعدد المنظمات (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Bedieneinheit eingeschränkt durch Multi Org Access Control (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Unidad operativa restringida por el control de acceso multiorgánico (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Unité opérationnelle restreinte par un contrôle d&apos;accès multi-organismes (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Unità operativa limitata dal controllo di accesso multiorgano (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>多機関アクセス制御(MOAC)で制限された操作ユニット</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>다중 조직 액세스 제어 (MOAC)에 의해 제한되는 운영 단위</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Unidade operacional restrita por controle de acesso multi org (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Операционное устройство, ограниченное мультиорганизованным контролем доступа (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Styrenhet begränsad av multi-org access control (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Çoklu kuruluş erişim kontrolü (MOAC) tarafından kısıtlanan işletim birimi</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>Operating unit restricted by multi org access control (MOAC)</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>受多机构访问控制（MOAC）限制的操作单元。</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
</LOVS>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: GL MoFU KPI Dashboard Exceptions -->
 <REPORTS_ROW>
  <GUID>D7C6B5A4E3F2D1C0B9A8D7E6F5C4B3C2</GUID>
  <SQL_TEXT>select
x.vote_code,
(select ffv.description from fnd_flex_values_vl ffv, fnd_id_flex_segments fifs where fifs.application_id=101 and fifs.id_flex_code=&apos;GL#&apos; and fifs.id_flex_num=gl.chart_of_accounts_id and fifs.application_column_name=&apos;SEGMENT4&apos; and ffv.flex_value_set_id=fifs.flex_value_set_id and ffv.flex_value=x.vote_code) vote_name,
x.module,
x.kpi_code,
x.kpi_name,
x.trx_ref,
x.trx_date,
x.batch_name,
x.trx_name,
x.description,
x.amount,
x.currency,
x.status,
x.party_name,
x.org_name,
x.period_name
from
(
-- GL01: Excess Expenditure per Budget Line
select
gb_a.ledger_id,
substr(gcck.segment4,1,3) vote_code,
&apos;GL&apos; module,
&apos;GL01&apos; kpi_code,
&apos;Excess Expenditure per Budget Line&apos; kpi_name,
gcck.segment1||&apos;.&apos;||gcck.segment2||&apos;.&apos;||gcck.segment3||&apos;.&apos;||gcck.segment4 trx_ref,
gps.start_date trx_date,
null batch_name,
null trx_name,
null description,
(gb_a.period_net_dr-gb_a.period_net_cr)-(nvl(gb_b.period_net_dr,0)-nvl(gb_b.period_net_cr,0)) amount,
gb_a.currency_code currency,
null status,
null party_name,
null org_name,
gb_a.period_name
from
gl_code_combinations gcck,
gl_balances gb_a,
gl_balances gb_b,
gl_period_statuses gps
where
gcck.code_combination_id=gb_a.code_combination_id and
gcck.summary_flag=&apos;N&apos; and
gcck.account_type=&apos;E&apos; and
gb_a.actual_flag=&apos;A&apos; and
gb_a.translated_flag is null and
gb_b.code_combination_id(+)=gb_a.code_combination_id and
gb_b.ledger_id(+)=gb_a.ledger_id and
gb_b.period_name(+)=gb_a.period_name and
gb_b.actual_flag(+)=&apos;B&apos; and
gb_b.currency_code(+)=gb_a.currency_code and
gb_b.translated_flag(+) is null and
gps.application_id=101 and
gps.ledger_id=gb_a.ledger_id and
gps.period_name=gb_a.period_name and
gps.start_date&lt;=:as_of_date and
(gb_a.period_net_dr-gb_a.period_net_cr)&gt;(nvl(gb_b.period_net_dr,0)-nvl(gb_b.period_net_cr,0))
union all
-- GL02: Negative Encumbrance
select
gb.ledger_id,
substr(gcck.segment4,1,3) vote_code,
&apos;GL&apos; module,
&apos;GL02&apos; kpi_code,
&apos;Negative Encumbrance&apos; kpi_name,
gcck.segment1||&apos;.&apos;||gcck.segment2||&apos;.&apos;||gcck.segment3||&apos;.&apos;||gcck.segment4 trx_ref,
gps.start_date trx_date,
null batch_name,
null trx_name,
null description,
gb.period_net_dr-gb.period_net_cr amount,
gb.currency_code currency,
null status,
null party_name,
null org_name,
gb.period_name
from
gl_code_combinations gcck,
gl_balances gb,
gl_period_statuses gps
where
gcck.code_combination_id=gb.code_combination_id and
gcck.summary_flag=&apos;N&apos; and
gb.actual_flag=&apos;E&apos; and
gb.translated_flag is null and
gps.application_id=101 and
gps.ledger_id=gb.ledger_id and
gps.period_name=gb.period_name and
gps.start_date&lt;=:as_of_date and
gb.period_net_dr-gb.period_net_cr&lt;0
union all
-- GL03: Negative Actuals (expense accounts with credit net balance)
select
gb.ledger_id,
substr(gcck.segment4,1,3) vote_code,
&apos;GL&apos; module,
&apos;GL03&apos; kpi_code,
&apos;Negative Actuals&apos; kpi_name,
gcck.segment1||&apos;.&apos;||gcck.segment2||&apos;.&apos;||gcck.segment3||&apos;.&apos;||gcck.segment4 trx_ref,
gps.start_date trx_date,
null batch_name,
null trx_name,
null description,
gb.period_net_dr-gb.period_net_cr amount,
gb.currency_code currency,
null status,
null party_name,
null org_name,
gb.period_name
from
gl_code_combinations gcck,
gl_balances gb,
gl_period_statuses gps
where
gcck.code_combination_id=gb.code_combination_id and
gcck.summary_flag=&apos;N&apos; and
gcck.account_type=&apos;E&apos; and
gb.actual_flag=&apos;A&apos; and
gb.translated_flag is null and
gps.application_id=101 and
gps.ledger_id=gb.ledger_id and
gps.period_name=gb.period_name and
gps.start_date&lt;=:as_of_date and
gb.period_net_dr-gb.period_net_cr&lt;0
union all
-- GL04/GL05: Unposted and Error Journals
select
gjh.ledger_id,
substr(gcck.segment4,1,3) vote_code,
&apos;GL&apos; module,
case gjh.status when &apos;U&apos; then &apos;GL04&apos; when &apos;E&apos; then &apos;GL05&apos; end kpi_code,
case gjh.status when &apos;U&apos; then &apos;Unposted Journals&apos; when &apos;E&apos; then &apos;Journals in Errors&apos; end kpi_name,
to_char(gjh.je_header_id) trx_ref,
gjh.default_effective_date trx_date,
gjb.name batch_name,
gjh.name trx_name,
gjh.description,
sum(nvl(gjl.accounted_dr,0)-nvl(gjl.accounted_cr,0)) amount,
gjh.currency_code currency,
gjh.status,
null party_name,
null org_name,
gjh.period_name
from
gl_je_batches gjb,
gl_je_headers gjh,
gl_je_lines gjl,
gl_code_combinations gcck
where
gjh.default_effective_date&lt;=:as_of_date and
gjh.status in (&apos;U&apos;,&apos;E&apos;) and
gjb.je_batch_id=gjh.je_batch_id and
gjl.je_header_id=gjh.je_header_id and
gcck.code_combination_id=gjl.code_combination_id and
gcck.summary_flag=&apos;N&apos;
group by
gjh.ledger_id,
gcck.segment4,
gjh.je_header_id,
gjh.default_effective_date,
gjb.name,
gjh.name,
gjh.description,
gjh.currency_code,
gjh.status,
gjh.period_name
union all
-- AR01: Unposted AR Receipts (not transferred to GL)
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AR&apos; module,
&apos;AR01&apos; kpi_code,
&apos;Unposted Items&apos; kpi_name,
acra.receipt_number trx_ref,
acra.receipt_date trx_date,
null batch_name,
null trx_name,
acra.comments description,
acra.amount,
acra.currency_code currency,
acra.status,
hp.party_name,
ou_s.org_name,
null period_name
from
ar_cash_receipts_all acra,
ar_cash_receipt_history_all arcrh,
hz_cust_accounts hca,
hz_parties hp,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
acra.receipt_date&lt;=:as_of_date and
arcrh.cash_receipt_id=acra.cash_receipt_id and
arcrh.current_record_flag=&apos;Y&apos; and
arcrh.posting_control_id&lt;0 and
acra.org_id=ou_s.organization_id and
acra.pay_from_customer=hca.cust_account_id(+) and
hca.party_id=hp.party_id(+)
union all
-- AR02: Unapplied Standard Receipts
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AR&apos; module,
&apos;AR02&apos; kpi_code,
&apos;Unapplied Standard Receipts&apos; kpi_name,
acra.receipt_number trx_ref,
acra.receipt_date trx_date,
null batch_name,
null trx_name,
acra.comments description,
acra.amount,
acra.currency_code currency,
acra.status,
hp.party_name,
ou_s.org_name,
null period_name
from
ar_cash_receipts_all acra,
hz_cust_accounts hca,
hz_parties hp,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
acra.receipt_date&lt;=:as_of_date and
acra.org_id=ou_s.organization_id and
acra.status=&apos;UNAPP&apos; and
acra.pay_from_customer=hca.cust_account_id(+) and
hca.party_id=hp.party_id(+)
union all
-- AR03: Unreconciled Receipts (reversed but not reconciled)
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AR&apos; module,
&apos;AR03&apos; kpi_code,
&apos;Unreconciled Receipts&apos; kpi_name,
acra.receipt_number trx_ref,
acra.receipt_date trx_date,
null batch_name,
null trx_name,
acra.comments description,
acra.amount,
acra.currency_code currency,
acra.status,
hp.party_name,
ou_s.org_name,
null period_name
from
ar_cash_receipts_all acra,
hz_cust_accounts hca,
hz_parties hp,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
acra.receipt_date&lt;=:as_of_date and
acra.org_id=ou_s.organization_id and
acra.status=&apos;REV&apos; and
acra.pay_from_customer=hca.cust_account_id(+) and
hca.party_id=hp.party_id(+)
union all
-- CM01: Transactions Available for Reconciliation
select
(select to_number(hou.set_of_books_id) from ce_bank_acct_uses_all cbau, hr_operating_units hou where cbau.bank_account_id=cba.bank_account_id and cbau.org_id=hou.organization_id and cbau.end_date is null and rownum=1) ledger_id,
null vote_code,
&apos;CM&apos; module,
&apos;CM01&apos; kpi_code,
&apos;Transactions Available for Reconciliation&apos; kpi_name,
csl.bank_trx_number trx_ref,
csl.trx_date trx_date,
null batch_name,
cba.bank_account_name trx_name,
nvl(csl.invoice_text,csl.customer_text) description,
csl.amount,
csl.currency_code currency,
csl.status,
null party_name,
null org_name,
to_char(csh.statement_date,&apos;MON-RR&apos;) period_name
from
ce_statement_lines csl,
ce_statement_headers csh,
ce_bank_accounts cba
where
csh.statement_date&lt;=:as_of_date and
csl.statement_header_id=csh.statement_header_id and
csh.bank_account_id=cba.bank_account_id and
csl.status=&apos;UNRECONCILED&apos;
union all
-- CM02: Bank Statement Summary - statements not fully reconciled
select
(select to_number(hou.set_of_books_id) from ce_bank_acct_uses_all cbau, hr_operating_units hou where cbau.bank_account_id=cba.bank_account_id and cbau.org_id=hou.organization_id and cbau.end_date is null and rownum=1) ledger_id,
null vote_code,
&apos;CM&apos; module,
&apos;CM02&apos; kpi_code,
&apos;Bank Statement Summary Report per Account&apos; kpi_name,
csh.statement_number trx_ref,
csh.statement_date trx_date,
null batch_name,
cba.bank_account_name trx_name,
null description,
null amount,
csh.currency_code currency,
decode(csh.statement_complete_flag,&apos;Y&apos;,&apos;RECONCILED&apos;,&apos;INCOMPLETE&apos;) status,
null party_name,
null org_name,
to_char(csh.statement_date,&apos;MON-RR&apos;) period_name
from
ce_statement_headers csh,
ce_bank_accounts cba
where
csh.statement_date&lt;=:as_of_date and
csh.bank_account_id=cba.bank_account_id and
csh.statement_complete_flag&lt;&gt;&apos;Y&apos;
union all
-- CM03: GL Reconciliation Differences (bank accounts with unreconciled lines)
select
(select to_number(hou.set_of_books_id) from ce_bank_acct_uses_all cbau, hr_operating_units hou where cbau.bank_account_id=cba.bank_account_id and cbau.org_id=hou.organization_id and cbau.end_date is null and rownum=1) ledger_id,
null vote_code,
&apos;CM&apos; module,
&apos;CM03&apos; kpi_code,
&apos;GL Reconciliation Differences&apos; kpi_name,
cba.bank_account_name trx_ref,
csh.statement_date trx_date,
null batch_name,
cba.bank_account_name trx_name,
null description,
csh.control_total_dr-csh.control_total_cr amount,
csh.currency_code currency,
&apos;UNRECONCILED&apos; status,
null party_name,
null org_name,
to_char(csh.statement_date,&apos;MON-RR&apos;) period_name
from
ce_statement_headers csh,
ce_bank_accounts cba
where
csh.statement_date&lt;=:as_of_date and
csh.bank_account_id=cba.bank_account_id and
exists (
select 1 from ce_statement_lines csl where csl.statement_header_id=csh.statement_header_id and csl.status=&apos;UNRECONCILED&apos;
)
union all
-- AP01: Never Validated Invoices
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP01&apos; kpi_code,
&apos;Never Validated Invoices&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
&apos;Unvalidated&apos; status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
aia.wfapproval_status not in (&apos;WFAPPROVED&apos;,&apos;MANUALLY APPROVED&apos;,&apos;NOT REQUIRED&apos;) and
aia.validation_request_id is null and
aia.invoice_type_lookup_code&lt;&gt;&apos;PREPAYMENT&apos; and
aia.cancelled_date is null
union all
-- AP02: Invoices on Hold
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP02&apos; kpi_code,
&apos;Invoices on Hold&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
&apos;On Hold&apos; status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select aph.invoice_id from ap_holds_all aph where aph.release_lookup_code is null group by aph.invoice_id) aph,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
aia.invoice_id=aph.invoice_id and
aia.cancelled_date is null
union all
-- AP03: Validated Invoice - No Payment Required &gt; 1 Week
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP03&apos; kpi_code,
&apos;Invoice Validated Not Required &gt; 1 Week&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
aia.wfapproval_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date-7 and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
aia.wfapproval_status=&apos;NOT REQUIRED&apos; and
aia.payment_status_flag=&apos;N&apos; and
aia.cancelled_date is null and
aia.invoice_type_lookup_code&lt;&gt;&apos;PREPAYMENT&apos;
union all
-- AP04: Validated Invoice - Payment Required &gt; 1 Week
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP04&apos; kpi_code,
&apos;Invoice Validated Required &gt; 1 Week&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
aia.wfapproval_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date-7 and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
aia.wfapproval_status in (&apos;WFAPPROVED&apos;,&apos;MANUALLY APPROVED&apos;) and
aia.payment_status_flag=&apos;N&apos; and
aia.cancelled_date is null and
aia.invoice_type_lookup_code&lt;&gt;&apos;PREPAYMENT&apos; and
(select min(aips.due_date) from ap_payment_schedules_all aips where aips.invoice_id=aia.invoice_id)&lt;=:as_of_date
union all
-- AP05: Validated Invoice - Payment Initiated &gt; 1 Month (partially paid)
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP05&apos; kpi_code,
&apos;Invoice Validated Initiated &gt; 1 Month&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
aia.payment_status_flag status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date-30 and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
aia.payment_status_flag=&apos;P&apos; and
aia.cancelled_date is null
union all
-- AP06: Invoices Rejected by Approver
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP06&apos; kpi_code,
&apos;Invoice with Status Rejected&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
aia.wfapproval_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
aia.wfapproval_status=&apos;REJECTED&apos; and
aia.cancelled_date is null
union all
-- AP07: Invoices with Stopped Payment
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP07&apos; kpi_code,
&apos;Invoice with Status Stopped&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
&apos;Stopped&apos; status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
aia.cancelled_date is null and
exists (
select 1 from ap_checks_all aca, ap_invoice_payments_all aipa
where aipa.invoice_id=aia.invoice_id and aca.check_id=aipa.check_id
and aca.status_lookup_code in (&apos;STOP INITIATED&apos;,&apos;VOIDED&apos;)
)
union all
-- AP08: Unaccounted Transactions (not posted to GL)
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP08&apos; kpi_code,
&apos;Unaccounted Transactions&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
nvl(aia.posting_status,&apos;Unposted&apos;) status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
(aia.posting_status is null or aia.posting_status&lt;&gt;&apos;Available&apos;) and
aia.cancelled_date is null
union all
-- AP09: Unretired Prepayments &gt; 2 Months
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;AP&apos; module,
&apos;AP09&apos; kpi_code,
&apos;Unretired Prepayments &gt; 2 Months&apos; kpi_name,
aia.invoice_num trx_ref,
aia.invoice_date trx_date,
null batch_name,
null trx_name,
aia.description,
aia.invoice_amount amount,
aia.invoice_currency_code currency,
aia.payment_status_flag status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
ap_invoices_all aia,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
aia.invoice_date&lt;=:as_of_date-60 and
aia.org_id=ou_s.organization_id and
aia.vendor_id=aps.vendor_id(+) and
aia.invoice_type_lookup_code=&apos;PREPAYMENT&apos; and
aia.payment_status_flag&lt;&gt;&apos;Y&apos; and
aia.cancelled_date is null
union all
-- PO01: Uninvoiced Receipts (Received not Invoiced)
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO01&apos; kpi_code,
&apos;Uninvoiced Receipts&apos; kpi_name,
to_char(rt.transaction_id) trx_ref,
rt.transaction_date trx_date,
null batch_name,
pha.segment1 trx_name,
null description,
rt.quantity*nvl(rt.po_unit_price,0) amount,
pha.currency_code currency,
rt.transaction_type status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
rcv_transactions rt,
po_headers_all pha,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
rt.transaction_date&lt;=:as_of_date and
rt.transaction_type=&apos;RECEIVE&apos; and
rt.po_header_id=pha.po_header_id and
pha.org_id=ou_s.organization_id and
pha.vendor_id=aps.vendor_id(+) and
not exists (
select 1 from ap_invoice_distributions_all aida
where aida.rcv_transaction_id=rt.transaction_id
)
union all
-- PO02: Expected Receipts (PO Lines not yet received, past need-by date)
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO02&apos; kpi_code,
&apos;Expected Receipts&apos; kpi_name,
pha.segment1 trx_ref,
nvl(plla.need_by_date,plla.promised_date) trx_date,
null batch_name,
null trx_name,
pha.comments description,
null amount,
pha.currency_code currency,
pha.authorization_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
po_line_locations_all plla,
po_headers_all pha,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
nvl(plla.need_by_date,plla.promised_date)&lt;=:as_of_date and
plla.po_header_id=pha.po_header_id and
pha.org_id=ou_s.organization_id and
pha.vendor_id=aps.vendor_id(+) and
plla.quantity&gt;nvl(plla.quantity_received,0) and
plla.cancel_flag=&apos;N&apos; and
nvl(plla.closed_code,&apos;OPEN&apos;) not in (&apos;CLOSED&apos;,&apos;FINALLY CLOSED&apos;)
union all
-- PO03: Overdue Encumbrance - Requisitions &gt; 2 Months
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO03&apos; kpi_code,
&apos;Overdue Encumbrance - Requisitions &gt; 2 Months&apos; kpi_name,
prha.segment1 trx_ref,
prha.creation_date trx_date,
null batch_name,
null trx_name,
prha.description,
null amount,
null currency,
prha.authorization_status status,
null party_name,
ou_s.org_name,
null period_name
from
po_requisition_headers_all prha,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
prha.creation_date&lt;=:as_of_date-60 and
prha.org_id=ou_s.organization_id and
prha.type_lookup_code=&apos;PURCHASE&apos; and
prha.authorization_status=&apos;APPROVED&apos;
union all
-- PO04: Overdue Encumbrance - Purchase Orders &gt; 2 Months
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO04&apos; kpi_code,
&apos;Overdue Encumbrance - Purchase Orders &gt; 2 Months&apos; kpi_name,
pha.segment1 trx_ref,
pha.creation_date trx_date,
null batch_name,
null trx_name,
pha.comments description,
null amount,
pha.currency_code currency,
pha.authorization_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
po_headers_all pha,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
pha.creation_date&lt;=:as_of_date-60 and
pha.org_id=ou_s.organization_id and
pha.type_lookup_code=&apos;STANDARD&apos; and
pha.vendor_id=aps.vendor_id(+) and
pha.authorization_status=&apos;APPROVED&apos; and
pha.authorization_status&lt;&gt;&apos;FINALLY CLOSED&apos;
union all
-- PO05: Incomplete Requisitions
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO05&apos; kpi_code,
&apos;Incomplete Requisitions&apos; kpi_name,
prha.segment1 trx_ref,
prha.creation_date trx_date,
null batch_name,
null trx_name,
prha.description,
null amount,
null currency,
prha.authorization_status status,
null party_name,
ou_s.org_name,
null period_name
from
po_requisition_headers_all prha,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
prha.creation_date&lt;=:as_of_date and
prha.org_id=ou_s.organization_id and
prha.type_lookup_code=&apos;PURCHASE&apos; and
prha.authorization_status in (&apos;INCOMPLETE&apos;,&apos;IN PROCESS&apos;)
union all
-- PO06: Rejected Requisitions
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO06&apos; kpi_code,
&apos;Rejected Requisitions&apos; kpi_name,
prha.segment1 trx_ref,
prha.creation_date trx_date,
null batch_name,
null trx_name,
prha.description,
null amount,
null currency,
prha.authorization_status status,
null party_name,
ou_s.org_name,
null period_name
from
po_requisition_headers_all prha,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
prha.creation_date&lt;=:as_of_date and
prha.org_id=ou_s.organization_id and
prha.type_lookup_code=&apos;PURCHASE&apos; and
prha.authorization_status=&apos;REJECTED&apos;
union all
-- PO07: Incomplete Purchase Orders
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO07&apos; kpi_code,
&apos;Incomplete Purchase Orders&apos; kpi_name,
pha.segment1 trx_ref,
pha.creation_date trx_date,
null batch_name,
null trx_name,
pha.comments description,
null amount,
pha.currency_code currency,
pha.authorization_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
po_headers_all pha,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
pha.creation_date&lt;=:as_of_date and
pha.org_id=ou_s.organization_id and
pha.type_lookup_code=&apos;STANDARD&apos; and
pha.vendor_id=aps.vendor_id(+) and
pha.authorization_status in (&apos;INCOMPLETE&apos;,&apos;IN PROCESS&apos;)
union all
-- PO08: Rejected Purchase Orders
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO08&apos; kpi_code,
&apos;Rejected Purchase Orders&apos; kpi_name,
pha.segment1 trx_ref,
pha.creation_date trx_date,
null batch_name,
null trx_name,
pha.comments description,
null amount,
pha.currency_code currency,
pha.authorization_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
po_headers_all pha,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
pha.creation_date&lt;=:as_of_date and
pha.org_id=ou_s.organization_id and
pha.type_lookup_code=&apos;STANDARD&apos; and
pha.vendor_id=aps.vendor_id(+) and
pha.authorization_status=&apos;REJECTED&apos;
union all
-- PO09: Purchase Orders Requiring Re-approval
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO09&apos; kpi_code,
&apos;POs Requiring Re-approval&apos; kpi_name,
pha.segment1 trx_ref,
pha.creation_date trx_date,
null batch_name,
null trx_name,
pha.comments description,
null amount,
pha.currency_code currency,
pha.authorization_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
po_headers_all pha,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
pha.creation_date&lt;=:as_of_date and
pha.org_id=ou_s.organization_id and
pha.type_lookup_code=&apos;STANDARD&apos; and
pha.vendor_id=aps.vendor_id(+) and
pha.authorization_status=&apos;REQUIRES REAPPROVAL&apos;
union all
-- PO10: Open Purchase Orders (Approved, not finally closed)
select
ou_s.ledger_id,
ou_s.segment2 vote_code,
&apos;PO&apos; module,
&apos;PO10&apos; kpi_code,
&apos;Open Purchase Orders&apos; kpi_name,
pha.segment1 trx_ref,
pha.creation_date trx_date,
null batch_name,
null trx_name,
pha.comments description,
null amount,
pha.currency_code currency,
pha.authorization_status status,
aps.vendor_name party_name,
ou_s.org_name,
null period_name
from
po_headers_all pha,
ap_suppliers aps,
(select hou.organization_id, to_number(hou.set_of_books_id) ledger_id, hou.name org_name, (select substr(gcck_m.segment4,1,3) from ap_invoice_distributions_all aida_m, gl_code_combinations gcck_m where aida_m.org_id=hou.organization_id and gcck_m.code_combination_id=aida_m.dist_code_combination_id and gcck_m.summary_flag=&apos;N&apos; and rownum=1) segment2 from hr_operating_units hou) ou_s
where
pha.creation_date&lt;=:as_of_date and
pha.org_id=ou_s.organization_id and
pha.type_lookup_code=&apos;STANDARD&apos; and
pha.vendor_id=aps.vendor_id(+) and
pha.authorization_status=&apos;APPROVED&apos; and
pha.authorization_status&lt;&gt;&apos;FINALLY CLOSED&apos;
union all
-- FA01/FA02/FA03: FA Mass Additions
select
fbc.set_of_books_id ledger_id,
substr(gcck.segment4,1,3) vote_code,
&apos;FA&apos; module,
case fma.queue_name when &apos;NEW&apos; then &apos;FA01&apos; when &apos;ON HOLD&apos; then &apos;FA02&apos; when &apos;POST&apos; then &apos;FA03&apos; end kpi_code,
case fma.queue_name when &apos;NEW&apos; then &apos;Assets in Queue New&apos; when &apos;ON HOLD&apos; then &apos;Assets in Queue Hold&apos; when &apos;POST&apos; then &apos;Assets in Queue Post&apos; end kpi_name,
fma.asset_number trx_ref,
fma.creation_date trx_date,
null batch_name,
null trx_name,
fma.description,
fma.fixed_assets_cost amount,
null currency,
fma.queue_name status,
null party_name,
null org_name,
null period_name
from
fa_book_controls fbc,
fa_mass_additions fma,
gl_code_combinations gcck
where
fma.creation_date&lt;=:as_of_date and
fma.book_type_code=fbc.book_type_code and
gcck.code_combination_id=fma.expense_code_combination_id and
gcck.summary_flag=&apos;N&apos; and
fma.queue_name in (&apos;NEW&apos;,&apos;ON HOLD&apos;,&apos;POST&apos;)
union all
-- BU01: Dossiers in status Creating &gt; 2 Weeks
select
idtd.sob_id ledger_id,
substr(idtd.segment4,1,3) vote_code,
&apos;BU&apos; module,
&apos;BU01&apos; kpi_code,
&apos;Dossiers Creating &gt; 2 Weeks&apos; kpi_name,
idth.trx_number trx_ref,
idth.creation_date trx_date,
null batch_name,
null trx_name,
idth.description,
sum(idtd.budget_amount) amount,
idtd.currency_code currency,
idth.trx_status status,
null party_name,
null org_name,
idtd.period_name
from
igi_dos_trx_headers idth,
igi_dos_trx_dest idtd
where
idth.creation_date&lt;=:as_of_date-14 and
idtd.trx_id=idth.trx_id and
idtd.sob_id=idth.sob_id and
idth.trx_status=&apos;Creating&apos;
group by
idtd.sob_id,
idtd.segment4,
idth.trx_id,
idth.trx_number,
idth.creation_date,
idth.description,
idtd.currency_code,
idth.trx_status,
idtd.period_name
union all
-- BU02: Dossiers in status Rejected
select
idtd.sob_id ledger_id,
substr(idtd.segment4,1,3) vote_code,
&apos;BU&apos; module,
&apos;BU02&apos; kpi_code,
&apos;Dossiers Rejected&apos; kpi_name,
idth.trx_number trx_ref,
idth.creation_date trx_date,
null batch_name,
null trx_name,
idth.description,
sum(idtd.budget_amount) amount,
idtd.currency_code currency,
idth.trx_status status,
null party_name,
null org_name,
idtd.period_name
from
igi_dos_trx_headers idth,
igi_dos_trx_dest idtd
where
idth.creation_date&lt;=:as_of_date and
idtd.trx_id=idth.trx_id and
idtd.sob_id=idth.sob_id and
idth.trx_status=&apos;Rejected&apos;
group by
idtd.sob_id,
idtd.segment4,
idth.trx_id,
idth.trx_number,
idth.creation_date,
idth.description,
idtd.currency_code,
idth.trx_status,
idtd.period_name
union all
-- BU03: Dossiers in status In Process &gt; 1 Month
select
idtd.sob_id ledger_id,
substr(idtd.segment4,1,3) vote_code,
&apos;BU&apos; module,
&apos;BU03&apos; kpi_code,
&apos;Dossiers In Process &gt; 1 Month&apos; kpi_name,
idth.trx_number trx_ref,
idth.creation_date trx_date,
null batch_name,
null trx_name,
idth.description,
sum(idtd.budget_amount) amount,
idtd.currency_code currency,
idth.trx_status status,
null party_name,
null org_name,
idtd.period_name
from
igi_dos_trx_headers idth,
igi_dos_trx_dest idtd
where
idth.creation_date&lt;=:as_of_date-30 and
idtd.trx_id=idth.trx_id and
idtd.sob_id=idth.sob_id and
idth.trx_status=&apos;In Process&apos;
group by
idtd.sob_id,
idtd.segment4,
idth.trx_id,
idth.trx_number,
idth.creation_date,
idth.description,
idtd.currency_code,
idth.trx_status,
idtd.period_name
union all
-- BU04: Unwarranted Cash Limits (negative destination balance)
select
idtd.sob_id ledger_id,
substr(idtd.segment4,1,3) vote_code,
&apos;BU&apos; module,
&apos;BU04&apos; kpi_code,
&apos;Unwarranted Cash Limits&apos; kpi_name,
idth.trx_number trx_ref,
idth.creation_date trx_date,
null batch_name,
null trx_name,
idth.description,
sum(idtd.new_balance) amount,
idtd.currency_code currency,
idth.trx_status status,
null party_name,
null org_name,
idtd.period_name
from
igi_dos_trx_headers idth,
igi_dos_trx_dest idtd
where
idth.creation_date&lt;=:as_of_date and
idtd.trx_id=idth.trx_id and
idtd.sob_id=idth.sob_id and
idtd.new_balance&lt;0
group by
idtd.sob_id,
idtd.segment4,
idth.trx_id,
idth.trx_number,
idth.creation_date,
idth.description,
idtd.currency_code,
idth.trx_status,
idtd.period_name
) x,
gl_ledgers gl
where
1=1 and
x.ledger_id=gl.ledger_id
order by x.vote_code, x.module, x.kpi_code, x.trx_date</SQL_TEXT>
  <VERSION_COMMENTS>Full KPI alignment with KPIS TEMPLATE: GL01-GL05, AR01-AR03, CM01-CM03, AP01-AP09, PO01-PO10, BU01-BU04, FA01-FA03 (35 codes); add Module and KPI Code required parameters</VERSION_COMMENTS>
  <ENABLED>Y</ENABLED>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>GL MoFU KPI Dashboard Exceptions</REPORT_NAME>
    <DESCRIPTION>Ministry of Finance Uganda - KPI exceptions at transaction level across GL, AR, CM, AP, PO, BU, and FA modules by Vote Code. Use Module and KPI Code parameters to drill into a specific exception type.</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>GL</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:as_of_date</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>gl.name=:ledger</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>GL Ledger</LOV_NAME>
    <LOV_GUID>8E2FF36EDEB879D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
gl.name value,
fifsv.id_flex_structure_name||&apos;: &apos;||decode(gl.ledger_category_code,&apos;NONE&apos;,xxen_util.meaning(gl.object_type_code,&apos;LEDGERS&apos;,101),xxen_util.meaning(gl.ledger_category_code,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101))||&apos;: &apos;||gl.description description
from
gl_ledgers gl,
fnd_id_flex_structures_vl fifsv
where
(:$flex$.ledger_category is null or gl.ledger_category_code=xxen_util.lookup_code(:$flex$.ledger_category,&apos;GL_ASF_LEDGER_CATEGORY&apos;,101,&apos;Y&apos;)) and
(:$flex$.chart_of_accounts is null or xxen_util.contains(:$flex$.chart_of_accounts,fifsv.id_flex_structure_name)=&apos;Y&apos;) and
gl.ledger_id in (select nvl(glsnav.ledger_id,gasna.ledger_id) from gl_access_set_norm_assign gasna, gl_ledger_set_norm_assign_v glsnav where gasna.access_set_id=fnd_profile.value(&apos;GL_ACCESS_SET_ID&apos;) and gasna.ledger_id=glsnav.ledger_set_id(+)) and
gl.chart_of_accounts_id=fifsv.id_flex_num and
fifsv.id_flex_code=&apos;GL#&apos; and
fifsv.application_id=101
order by
fifsv.id_flex_structure_name,
decode(gl.ledger_category_code,&apos;PRIMARY&apos;,1,&apos;SECONDARY&apos;,2,&apos;ALC&apos;,3,&apos;NONE&apos;,4),
gl.name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>coalesce(xxen_util.previous_parameter_value(:parameter_id),xxen_util.default_ledger)</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>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.org_name=:operating_unit</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>HR Operating Unit</LOV_NAME>
    <LOV_GUID>8E2FF36EDEB979D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
hou.name value,
null description
from
hr_operating_units hou
where
sysdate between hou.date_from and nvl(hou.date_to,sysdate) and
(:$flex$.ledger is null or hou.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
hou.organization_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11)
order by
hou.name</LOV_QUERY_DSP>
    <DEFAULT_VALUE>coalesce(xxen_util.default_operating_unit,xxen_util.previous_parameter_value(:parameter_id))</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Operating Unit</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>:as_of_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>As of Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.module=:module</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;AP&apos; value, &apos;Payables&apos; description from dual union all
select &apos;AR&apos;, &apos;Receivables&apos; from dual union all
select &apos;BU&apos;, &apos;Budgeting&apos; from dual union all
select &apos;CM&apos;, &apos;Cash Management&apos; from dual union all
select &apos;FA&apos;, &apos;Fixed Assets&apos; from dual union all
select &apos;GL&apos;, &apos;General Ledger&apos; from dual union all
select &apos;PO&apos;, &apos;Purchasing&apos; from dual
order by 1</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Module</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.kpi_code=:kpi_code</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select x.value, x.description from (
select &apos;AP01&apos; value, &apos;Never Validated Invoices&apos; description from dual
union all
select &apos;AP02&apos; value, &apos;Invoices on Hold&apos; description from dual
union all
select &apos;AP03&apos; value, &apos;Invoice Validated Not Required &gt; 1 Week&apos; description from dual
union all
select &apos;AP04&apos; value, &apos;Invoice Validated Required &gt; 1 Week&apos; description from dual
union all
select &apos;AP05&apos; value, &apos;Invoice Validated Initiated &gt; 1 Month&apos; description from dual
union all
select &apos;AP06&apos; value, &apos;Invoice with Status Rejected&apos; description from dual
union all
select &apos;AP07&apos; value, &apos;Invoice with Status Stopped&apos; description from dual
union all
select &apos;AP08&apos; value, &apos;Unaccounted Transactions&apos; description from dual
union all
select &apos;AP09&apos; value, &apos;Unretired Prepayments &gt; 2 Months&apos; description from dual
union all
select &apos;AR01&apos; value, &apos;Unposted Items&apos; description from dual
union all
select &apos;AR02&apos; value, &apos;Unapplied Standard Receipts&apos; description from dual
union all
select &apos;AR03&apos; value, &apos;Unreconciled Receipts&apos; description from dual
union all
select &apos;BU01&apos; value, &apos;Dossiers Creating &gt; 2 Weeks&apos; description from dual
union all
select &apos;BU02&apos; value, &apos;Dossiers Rejected&apos; description from dual
union all
select &apos;BU03&apos; value, &apos;Dossiers In Process &gt; 1 Month&apos; description from dual
union all
select &apos;BU04&apos; value, &apos;Unwarranted Cash Limits&apos; description from dual
union all
select &apos;CM01&apos; value, &apos;Transactions Available for Reconciliation&apos; description from dual
union all
select &apos;CM02&apos; value, &apos;Bank Statement Summary Report per Account&apos; description from dual
union all
select &apos;CM03&apos; value, &apos;GL Reconciliation Differences&apos; description from dual
union all
select &apos;FA01&apos; value, &apos;Assets in Queue New&apos; description from dual
union all
select &apos;FA02&apos; value, &apos;Assets in Queue Hold&apos; description from dual
union all
select &apos;FA03&apos; value, &apos;Assets in Queue Post&apos; description from dual
union all
select &apos;GL01&apos; value, &apos;Excess Expenditure per Budget Line&apos; description from dual
union all
select &apos;GL02&apos; value, &apos;Negative Encumbrance&apos; description from dual
union all
select &apos;GL03&apos; value, &apos;Negative Actuals&apos; description from dual
union all
select &apos;GL04&apos; value, &apos;Unposted Journals&apos; description from dual
union all
select &apos;GL05&apos; value, &apos;Journals in Errors&apos; description from dual
union all
select &apos;PO01&apos; value, &apos;Uninvoiced Receipts&apos; description from dual
union all
select &apos;PO02&apos; value, &apos;Expected Receipts&apos; description from dual
union all
select &apos;PO03&apos; value, &apos;Overdue Encumbrance - Requisitions &gt; 2 Months&apos; description from dual
union all
select &apos;PO04&apos; value, &apos;Overdue Encumbrance - Purchase Orders &gt; 2 Months&apos; description from dual
union all
select &apos;PO05&apos; value, &apos;Incomplete Requisitions&apos; description from dual
union all
select &apos;PO06&apos; value, &apos;Rejected Requisitions&apos; description from dual
union all
select &apos;PO07&apos; value, &apos;Incomplete Purchase Orders&apos; description from dual
union all
select &apos;PO08&apos; value, &apos;Rejected Purchase Orders&apos; description from dual
union all
select &apos;PO09&apos; value, &apos;POs Requiring Re-approval&apos; description from dual
union all
select &apos;PO10&apos; value, &apos;Open Purchase Orders&apos; description from dual
) x
where :$flex$.Module is null or x.value like :$flex$.Module||&apos;%&apos;
order by x.value</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>KPI Code</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <PARAMETER_DEPENDENCIES>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.Module</FLEX_BIND>
    <PARAMETER_NAME>Module</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>KPI Code</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.ledger</FLEX_BIND>
    <PARAMETER_NAME>Ledger</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Operating Unit</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>
