<ROOT>
 <APPS_INITIALIZE_DATA>
  <USER_NAME>ENGINATICS</USER_NAME>
  <RESPONSIBILITY_KEY>SYSTEM_ADMINISTRATOR</RESPONSIBILITY_KEY>
  <APPLICATION_SHORT_NAME>SYSADMIN</APPLICATION_SHORT_NAME>
 </APPS_INITIALIZE_DATA>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: AR Customer Statement -->
 <REPORTS_ROW>
  <GUID>82288223EE9F3869E053B46B63588994</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>with q_customer as (select 
   hca.cust_account_id customer_party_id,
   hcsu.site_use_id customer_party_site_id,
   ar_tp_stmt_pkg.balance_brought_forward(hca.cust_account_id,hcsu.site_use_id,hcas.org_id) brought_forward_amount,
   hca.account_number customer_number,
   hpar.party_name customer_name,
   hps.party_site_number party_site_number,
   hps.party_site_name party_site_name,
   hpar.address1||&apos; &apos;|| hpar.address2||&apos; &apos;|| hpar.address3||&apos; &apos;|| hpar.address4||&apos; &apos;|| hpar.city ||&apos; &apos;|| hpar.postal_code customer_address,
   hpar.jgzz_fiscal_code customer_tax_payer_id,
   nvl(zptp.rep_registration_number,hpar.tax_reference) customer_tax_ref_number,
   hou.name organization_name,
   hou.organization_id organization_id
  from 
   hz_cust_accounts hca,
   hz_parties hpar,
   hz_cust_site_uses_all hcsu,
   hz_cust_acct_sites_all hcas,
   hz_party_sites hps,
   hr_operating_units hou,
   zx_party_tax_profile zptp
  where
   hca.party_id = hpar.party_id
   and hcsu.cust_acct_site_id = hcas.cust_acct_site_id
   and hcas.party_site_id = hps.party_site_id
   and hcsu.site_use_code = &apos;BILL_TO&apos;
   and hpar.party_id = hps.party_id
   and hcas.org_id = hou.organization_id
   and hpar.party_id = zptp.party_id(+)
   and zptp.party_type_code(+) = &apos;THIRD_PARTY&apos;
   &amp;gc_reporting_entity 
   &amp;gc_customer_name 
   &amp;gc_cust_category 
   &amp;gc_cust_class 
   ),
q_main as (select 
   &apos;T&apos; trx_type,
   rctt.name transaction_type,
   null adjustment_number,
   rct.trx_number transaction_number,
   rctld.gl_date gl_date,
   rct.trx_date transaction_date,
   apsa.due_date transaction_due_date,
   rct.invoice_currency_code transaction_currency,
   rctld.amount entered_amount,
   rctld.acctd_amount accounted_amount,
   gp.period_name gp_period_name,
   gp.period_num gp_period_num,
   gp.start_date gp_start_date,
   apsa.amount_due_original due_original,
   apsa.amount_due_remaining due_remaining,
   rct.status_trx trx_status,
   rct.bill_to_customer_id customer_party_id,
   rct.bill_to_site_use_id customer_party_site_id
  from 
   ra_customer_trx rct,
   ar_payment_schedules_all apsa,
   ra_cust_trx_types_all rctt,
   ra_cust_trx_line_gl_dist_all rctld,
   gl_periods gp,
   gl_ledgers gled
  where
   rct.customer_trx_id = apsa.customer_trx_id(+)
   and rct.customer_trx_id = rctld.customer_trx_id
   and rct.cust_trx_type_id = rctt.cust_trx_type_id
   and rct.org_id = rctt.org_id
   and gled.period_set_name = gp.period_set_name
   and gled.accounted_period_type = gp.period_type
   and gled.ledger_id = rct.set_of_books_id
   and rctld.gl_date between gp.start_date and gp.end_date
   and rctld.latest_rec_flag = &apos;Y&apos;
   and rctld.account_class = &apos;REC&apos;
   and rctt.post_to_gl = &apos;Y&apos; -- Only Postable to GL are picked
   and rctt.type in (&apos;CB&apos;,&apos;INV&apos;,&apos;DM&apos;,&apos;CM&apos;,&apos;BR&apos;,&apos;DEP&apos;) -- Guarantees are not picked
   and rctld.gl_date between :p_from_gl_date and :p_to_gl_date
   and gp.adjustment_period_flag = &apos;N&apos;
   and 1=1 
   &amp;gc_org_id 
   &amp;gc_currency 
   &amp;gc_accounted 
   &amp;gc_incomplete_trx 
  union all 
  select 
   &apos;R&apos; trx_type,
   arm.name transaction_type,
   null adjustment_number,
   acr.receipt_number transaction_number,
   acrh.gl_date gl_date,
   acr.receipt_date transaction_date,
   apsa.due_date transaction_due_date,
   acr.currency_code transaction_currency,
   acr.amount entered_amount,
   acr.amount * nvl(acr.exchange_rate,1) accounted_amount,
   gp.period_name gp_period_name,
   gp.period_num gp_period_num,
   gp.start_date gp_start_date,
   apsa.amount_due_original due_original,
   apsa.amount_due_remaining due_remaining,
   acrh.status trx_status,
   acr.pay_from_customer customer_party_id,
   acr.customer_site_use_id customer_party_site_id
  from 
   ar_cash_receipts acr,
   ar_receipt_methods arm,
   ar_cash_receipt_history_all acrh,
   ar_payment_schedules_all apsa,
   gl_periods gp,
   gl_ledgers gled
  where
   acr.cash_receipt_id = apsa.cash_receipt_id(+)
   and acr.org_id = apsa.org_id(+)
   and acr.receipt_method_id = arm.receipt_method_id
   and acr.cash_receipt_id = acrh.cash_receipt_id
   and acr.org_id = acrh.org_id
   and gled.period_set_name = gp.period_set_name
   and gled.accounted_period_type = gp.period_type
   and acr.set_of_books_id = gled.ledger_id
   and acrh.gl_date between gp.start_date and gp.end_date
   and acrh.first_posted_record_flag = &apos;Y&apos;
   and acrh.gl_date between :p_from_gl_date and :p_to_gl_date
   and gp.adjustment_period_flag = &apos;N&apos;
   and 2=2 
   &amp;gc_rcpt_org_id 
   &amp;gc_rcpt_currency 
   &amp;gc_rcpt_accounted 
  union all 
  select 
   &apos;R&apos; trx_type,
   arm.name transaction_type,
   null adjustment_number,
   acr.receipt_number transaction_number,
   acrh.gl_date gl_date,
   acr.receipt_date transaction_date,
   apsa.due_date transaction_due_date,
   acr.currency_code transaction_currency,
   acr.amount entered_amount,
   acr.amount * nvl(acr.exchange_rate,1) accounted_amount,
   gp.period_name gp_period_name,
   gp.period_num gp_period_num,
   gp.start_date gp_start_date,
   apsa.amount_due_original due_original,
   apsa.amount_due_remaining due_remaining,
   acrh.status trx_status,
   acr.pay_from_customer customer_party_id,
   acr.customer_site_use_id customer_party_site_id
  from 
   ar_cash_receipts acr,
   ar_receipt_methods arm,
   ar_cash_receipt_history_all acrh,
   ar_payment_schedules_all apsa,
   gl_periods gp,
   gl_ledgers gled
  where
   acr.cash_receipt_id = apsa.cash_receipt_id(+)
   and acr.org_id = apsa.org_id(+)
   and acr.receipt_method_id = arm.receipt_method_id
   and acr.cash_receipt_id = acrh.cash_receipt_id
   and acr.org_id = acrh.org_id
   and gled.period_set_name = gp.period_set_name
   and gled.accounted_period_type = gp.period_type
   and acr.set_of_books_id = gled.ledger_id
   and acrh.gl_date between gp.start_date and gp.end_date
   and acr.reversal_date is not null
   and acrh.current_record_flag = &apos;Y&apos;
   and acrh.status = &apos;REVERSED&apos; 
   and acrh.gl_date between :p_from_gl_date and :p_to_gl_date
-- To Consider the first status for Reversed Receipts
   and gp.adjustment_period_flag = &apos;N&apos;
   and 3=3 
   &amp;gc_rcpt_org_id 
   &amp;gc_rcpt_currency 
   &amp;gc_rcpt_accounted 
  union all 
  select 
   &apos;A&apos; trx_type,
   al.meaning transaction_type,
   aa.adjustment_number adjustment_number,
   rct.trx_number transaction_number,
   aa.gl_date gl_date,
   aa.apply_date transaction_date,
   aa.apply_date transaction_due_date,
   rct.invoice_currency_code transaction_currency,
   aa.amount entered_amount,
   aa.acctd_amount accounted_amount,
   gp.period_name gp_period_name,
   gp.period_num gp_period_num,
   gp.start_date gp_start_date,
   apsa.amount_due_original due_original,
   apsa.amount_due_remaining due_remaining,
   aa.status trx_status,
   rct.bill_to_customer_id customer_party_id,
   rct.bill_to_site_use_id customer_party_site_id
  from 
   ar_adjustments aa,
   ar_lookups al,
   ra_customer_trx_all rct,
   ra_cust_trx_types_all rctt,
   ar_payment_schedules_all apsa,
   gl_periods gp,
   gl_ledgers gled
  where
   rct.customer_trx_id = apsa.customer_trx_id(+)
   and rct.org_id = apsa.org_id(+)
   and rct.cust_trx_type_id = rctt.cust_trx_type_id
   and rct.org_id = rctt.org_id
   and rct.customer_trx_id = aa.customer_trx_id
   and rct.org_id = aa.org_id
   and gled.period_set_name = gp.period_set_name
   and gled.accounted_period_type = gp.period_type
   and gled.ledger_id = aa.set_of_books_id
   and al.lookup_type = &apos;ADJUSTMENT_TYPE&apos;
   and aa.status = &apos;A&apos; -- For approved Adjustments
   and aa.type = al.lookup_code
   and aa.gl_date between gp.start_date and gp.end_date
   and aa.gl_date between :p_from_gl_date and :p_to_gl_date
   and gp.adjustment_period_flag = &apos;N&apos;
   and rctt.post_to_gl = &apos;Y&apos; -- Only Postable to GL are picked
   and rctt.type in (&apos;CB&apos;,&apos;INV&apos;,&apos;DM&apos;,&apos;CM&apos;,&apos;BR&apos;,&apos;DEP&apos;) -- Guarantees are not picked
   and 4=4 
   &amp;gc_org_id 
   &amp;gc_currency 
   &amp;gc_adj_accounted 
   &amp;gc_incomplete_trx 
  union all 
  select 
   &apos;R&apos; trx_type,
   art.name transaction_type,
   null adjustment_number,
   acr.receipt_number transaction_number,
   ara.gl_date gl_date,
   ara.apply_date transaction_date,
   ara.apply_date transaction_due_date,
   acr.currency_code transaction_currency,
   -1*(ara.amount_applied) entered_amount,
   -1*(ara.acctd_amount_applied_from) accounted_amount,
   gp.period_name gp_period_name,
   gp.period_num gp_period_num,
   gp.start_date gp_start_date,
   0 due_original,
   0 due_remaining,
   art.status trx_status,
   acr.pay_from_customer customer_party_id,
   acr.customer_site_use_id customer_party_site_id
  from 
   ar_cash_receipts acr,
   ar_receivable_applications_all ara,
   ar_receivables_trx_all art,
   gl_periods gp,
   gl_ledgers gled
  where
   acr.cash_receipt_id = ara.cash_receipt_id
   and acr.org_id = ara.org_id
   and ara.receivables_trx_id = art.receivables_trx_id
   and ara.org_id = art.org_id
   and gled.period_set_name = gp.period_set_name
   and gled.accounted_period_type = gp.period_type
   and acr.set_of_books_id = gled.ledger_id
   and ara.gl_date between gp.start_date and gp.end_date
   and ara.gl_date between :p_from_gl_date and :p_to_gl_date
   and art.type = &apos;WRITEOFF&apos; 
   --AND art.status                 = &apos;A&apos; --Only Active Receipt WriteOffs
   and gp.adjustment_period_flag = &apos;N&apos; 
   and 5=5
   &amp;gc_rcpt_org_id 
   &amp;gc_rcpt_currency 
   &amp;gc_app_accounted 
   )
--
-- Main Query Start Here
--
select 
 :p_reporting_entity_name &amp;reporting_entity_col_name,
 q.customer_name,
 q.customer_number,
 q.customer_tax_registration,
 q.customer_site_name,
 q.customer_site_number,
 q.customer_address,
 &amp;lp_operating_unit_column
 q.period_name,
 replace(q.record_type,&apos;_&apos;,&apos; &apos;) record_type,
 q.balance_brought_forward_debit,
 q.balance_brought_forward_credit,
 q.net_debit,
 q.net_credit,
 q.cumulative_debit,
 q.cumulative_credit,
 q.balance_brought_forward_credit - q.balance_brought_forward_debit balance_brought_forward_amount,
 q.net_credit - q.net_debit net_amount,
 q.cumulative_credit - q.cumulative_debit cumulative_amount,
 q.opening_balance,
 q.closing_balance
 &amp;document_columns
from 
 (select 
   z.*,
   case z.record_type
    when &apos;Period Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row) + sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id) - sum(nvl(z.debit,0)) over (partition by z.customer_party_site_id,z.period_name)
    when &apos;Customer Site Summary&apos; then sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id)
    when &apos;Operating Unit Summary&apos; then sum(nvl(z.bbf,0)) over (partition by z.customer_party_id,z.organization_id)
    when &apos;Customer Summary&apos; then sum(nvl(z.bbf,0)) over (partition by z.customer_party_id)
    when &apos;&amp;reporting_entity_col_name Summary&apos; then sum(nvl(z.bbf,0)) over ()
    else null
   end balance_brought_forward_debit,
   case z.record_type
    when &apos;Period Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row) - sum(nvl(z.credit,0)) over (partition by z.customer_party_site_id,z.period_name)
    when &apos;Customer Site Summary&apos; then 0
    when &apos;Operating Unit Summary&apos; then 0
    when &apos;Customer Summary&apos; then 0
    when &apos;&amp;reporting_entity_col_name Summary&apos; then 0
    else null
   end balance_brought_forward_credit,
   case z.record_type
    when &apos;Period Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_site_id,z.period_name)
    when &apos;Customer Site Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_site_id)
    when &apos;Operating Unit Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_id,z.organization_id)
    when &apos;Customer Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_id)
    when &apos;&amp;reporting_entity_col_name Summary&apos; then sum(nvl(z.debit,0)) over ()
    else null
   end net_debit,
   case z.record_type
    when &apos;Period Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_site_id,z.period_name)
    when &apos;Customer Site Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_site_id)
    when &apos;Operating Unit Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_id,z.organization_id)
    when &apos;Customer Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_id)
    when &apos;&amp;reporting_entity_col_name Summary&apos; then sum(nvl(z.credit,0)) over ()
    else null
   end net_credit,
   case z.record_type
    when &apos;Period Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row) + sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id)
    when &apos;Customer Site Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row) + sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id)
    when &apos;Operating Unit Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_id,z.organization_id order by z.seq rows between unbounded preceding and current row) + sum(nvl(z.bbf,0)) over (partition by z.customer_party_id,z.organization_id)
    when &apos;Customer Summary&apos; then sum(nvl(z.debit,0)) over (partition by z.customer_party_id order by z.seq rows between unbounded preceding and current row) + sum(nvl(z.bbf,0)) over (partition by z.customer_party_id)
    when &apos;&amp;reporting_entity_col_name Summary&apos; then sum(nvl(z.debit,0)) over () + sum(nvl(z.bbf,0)) over ()
    else null
   end cumulative_debit,
   case z.record_type
    when &apos;Period Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row)
    when &apos;Customer Site Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row)
    when &apos;Operating Unit Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_id,z.organization_id order by z.seq rows between unbounded preceding and current row)
    when &apos;Customer Summary&apos; then sum(nvl(z.credit,0)) over (partition by z.customer_party_id order by z.seq rows between unbounded preceding and current row)
    when &apos;&amp;reporting_entity_col_name Summary&apos; then sum(nvl(z.credit,0)) over ()
    else null
   end cumulative_credit,
   case z.record_type
    when &apos;Transaction&apos; then
     sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id) +
     nvl(sum(nvl(z.debit,0)-nvl(z.credit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and 1 preceding),0)
    when &apos;Period Summary&apos; then
     sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id) +
     sum(nvl(z.debit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row) -
     sum(nvl(z.debit,0)) over (partition by z.customer_party_site_id,z.period_name) -
     sum(nvl(z.credit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row) +
     sum(nvl(z.credit,0)) over (partition by z.customer_party_site_id,z.period_name)
    when &apos;Customer Site Summary&apos; then sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id)
    when &apos;Operating Unit Summary&apos; then sum(nvl(z.bbf,0)) over (partition by z.customer_party_id,z.organization_id)
    when &apos;Customer Summary&apos; then sum(nvl(z.bbf,0)) over (partition by z.customer_party_id)
    when &apos;&amp;reporting_entity_col_name Summary&apos; then sum(nvl(z.bbf,0)) over ()
   end opening_balance,
   case z.record_type
    when &apos;Transaction&apos; then
     sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id) +
     sum(nvl(z.debit,0)-nvl(z.credit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row)
    when &apos;Period Summary&apos; then
     sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id) +
     sum(nvl(z.debit,0)-nvl(z.credit,0)) over (partition by z.customer_party_site_id order by z.seq rows between unbounded preceding and current row)
    when &apos;Customer Site Summary&apos; then
     sum(nvl(z.bbf,0)) over (partition by z.customer_party_site_id) +
     sum(nvl(z.debit,0)-nvl(z.credit,0)) over (partition by z.customer_party_site_id)
    when &apos;Operating Unit Summary&apos; then
     sum(nvl(z.bbf,0)) over (partition by z.customer_party_id,z.organization_id) +
     sum(nvl(z.debit,0)-nvl(z.credit,0)) over (partition by z.customer_party_id,z.organization_id)
    when &apos;Customer Summary&apos; then
     sum(nvl(z.bbf,0)) over (partition by z.customer_party_id) +
     sum(nvl(z.debit,0)-nvl(z.credit,0)) over (partition by z.customer_party_id)
    when &apos;&amp;reporting_entity_col_name Summary&apos; then
     sum(nvl(z.bbf,0)) over () +
     sum(nvl(z.debit,0)-nvl(z.credit,0)) over ()
   end closing_balance
  from
   (select 
     rownum seq,
     y.*
    from 
     (select 
       x.*
      from 
       (-- dummy period summary record
select distinct 
         &apos;Period Summary&apos; record_type,
         q_customer.customer_name,
         q_customer.customer_number,
         q_customer.customer_tax_ref_number customer_tax_registration,
         q_customer.organization_name operating_unit,
         q_customer.party_site_name customer_site_name,
         q_customer.party_site_number customer_site_number,
         q_customer.customer_address,
         q_main.gp_period_name period_name,
         null document_type,
         null document_number,
         to_date(null) document_date,
         to_date(null) maturity_date,
         null document_status,
         to_date(null) gl_date,
         to_number(null) debit,
         to_number(null) credit,
         to_number(null) original_amount,
         null currency_code,
         1 sort_order,
         q_main.gp_start_date period_start_date,
         q_main.gp_period_num period_num,
         q_customer.customer_party_id,
         q_customer.customer_party_site_id,
         q_customer.organization_id,
         to_number(null) bbf
        from 
         q_customer,
         q_main
        where
         q_main.customer_party_id = q_customer.customer_party_id
         and q_main.customer_party_site_id = q_customer.customer_party_site_id 
        union all 
        -- dummy customer site summary record
        select distinct
         &apos;Customer Site Summary&apos; record_type,
         q_customer.customer_name,
         q_customer.customer_number,
         q_customer.customer_tax_ref_number customer_tax_registration,
         q_customer.organization_name operating_unit,
         q_customer.party_site_name customer_site_name,
         q_customer.party_site_number customer_site_number,
         q_customer.customer_address,
         null period_name,
         null document_type,
         null document_number,
         to_date(null) document_date,
         to_date(null) maturity_date,
         null document_status,
         to_date(null) gl_date,
         to_number(null) debit,
         to_number(null) credit,
         to_number(null) original_amount,
         null currency_code,
         2 sort_order,
         to_date(null) period_start_date,
         to_number(null) period_num,
         q_customer.customer_party_id,
         q_customer.customer_party_site_id,
         q_customer.organization_id,
         q_customer.brought_forward_amount bbf
        from 
         q_customer
        union all 
        -- dummy operating unit summary record
        select distinct 
         &apos;Operating Unit Summary&apos; record_type,
         q_customer.customer_name,
         q_customer.customer_number,
         q_customer.customer_tax_ref_number customer_tax_registration,
         q_customer.organization_name operating_unit,
         null customer_site_name,
         null customer_site_number,
         null customer_address,
         null period_name,
         null document_type,
         null document_number,
         to_date(null) document_date,
         to_date(null) maturity_date,
         null document_status,
         to_date(null) gl_date,
         to_number(null) debit,
         to_number(null) credit,
         to_number(null) original_amount,
         null currency_code,
         3 sort_order,
         to_date(null) period_start_date,
         to_number(null) period_num,
         q_customer.customer_party_id,
         to_number(null) customer_party_site_id,
         q_customer.organization_id,
         to_number(null) bbf
        from 
         q_customer
        where
         :p_reporting_level != &apos;3000&apos; -- don&apos;t show OU Summary when run by OU
        union all 
        -- dummy customer summary record
        select distinct
         &apos;Customer Summary&apos; record_type,
         q_customer.customer_name,
         q_customer.customer_number,
         q_customer.customer_tax_ref_number customer_tax_registration,
         null operating_unit,
         null customer_site_name,
         null customer_site_number,
         null customer_address,
         null period_name,
         null document_type,
         null document_number,
         to_date(null) document_date,
         to_date(null) maturity_date,
         null document_status,
         to_date(null) gl_date,
         to_number(null) debit,
         to_number(null) credit,
         to_number(null) original_amount,
         null currency_code,
         4 sort_order,
         to_date(null) period_start_date,
         to_number(null) period_num,
         q_customer.customer_party_id,
         to_number(null) customer_party_site_id,
         to_number(null) organization_id,
         to_number(null) bbf
        from 
         q_customer
        union all 
        -- dummy reporting entity summary record
        select distinct
         &apos;&amp;reporting_entity_col_name Summary&apos; record_type,
         null customer_name,
         null customer_number,
         null customer_tax_registration,
         null operating_unit,
         null customer_site_name,
         null customer_site_number,
         null customer_address,
         null period_name,
         null document_type,
         null document_number,
         to_date(null) document_date,
         to_date(null) maturity_date,
         null document_status,
         to_date(null) gl_date,
         to_number(null) debit,
         to_number(null) credit,
         to_number(null) original_amount,
         null currency_code,
         5 sort_order,
         to_date(null) period_start_date,
         to_number(null) period_num,
         to_number(null) customer_party_id,
         to_number(null) customer_party_site_id,
         to_number(null) organization_id,
         to_number(null) bbf
        from 
         dual
        union all 
        -- transactions
        select 
         &apos;Transaction&apos; record_type,
         q_customer.customer_name,
         q_customer.customer_number,
         q_customer.customer_tax_ref_number customer_tax_registration,
         q_customer.organization_name operating_unit,
         q_customer.party_site_name customer_site_name,
         q_customer.party_site_number customer_site_number,
         q_customer.customer_address,
         q_main.gp_period_name period_name,
         q_main.transaction_type document_type,
         nvl(q_main.adjustment_number ,q_main.transaction_number) document_number,
         q_main.transaction_date document_date,
         q_main.transaction_due_date maturity_date,
         case
          when q_main.due_remaining = 0 then
           case q_main.trx_type
            when &apos;T&apos; then &apos;Closed&apos;
            when &apos;R&apos; then &apos;Fully Applied&apos;
           end
          else
           case q_main.trx_type
            when &apos;T&apos; then &apos;Open&apos;
            when &apos;R&apos; then
             case
              when q_main.due_original - q_main.due_remaining &lt; 0 then &apos;Partially Applied&apos;
              else &apos;Not Applied&apos;
             end
            else null
           end
         end ||case q_main.trx_status
          when &apos;CLEARED&apos; then &apos;/Cleared&apos;
          when &apos;REVERSED&apos; then &apos;/Reversed&apos;
          else null
         end ||case q_main.trx_type
          when &apos;A&apos; then &apos;Approved&apos;
          else null
         end document_status,
         q_main.gl_date gl_date,
         case q_main.trx_type
          when &apos;R&apos; then to_number(null)
          else q_main.accounted_amount
         end debit,
         case q_main.trx_type
          when &apos;R&apos; then
           case q_main.trx_status
            when &apos;REVERSED&apos; then -1 * q_main.accounted_amount
            else q_main.accounted_amount
           end
          else to_number(null)
         end credit,
         case q_main.trx_status
          when &apos;REVERSED&apos; then -1 * q_main.entered_amount
          else q_main.entered_amount
         end original_amount,
         q_main.transaction_currency currency_code,
         -1 sort_order,
         q_main.gp_start_date period_start_date,
         q_main.gp_period_num period_num,
         q_customer.customer_party_id,
         q_customer.customer_party_site_id,
         q_customer.organization_id,
         to_number(null) bbf
        from 
         q_customer,
         q_main
        where
         q_main.customer_party_id = q_customer.customer_party_id
         and q_main.customer_party_site_id = q_customer.customer_party_site_id ) x
      order by 
       x.customer_name,
       x.customer_number,
       x.customer_party_id,
       x.operating_unit,
       x.customer_site_number,
       x.customer_party_site_id,
       nvl(x.period_start_date,to_date(&apos;31/12/4712&apos;,&apos;DD/MM/YYYY&apos;)),
       nvl(x.period_num,99),
       nvl(x.period_name,&apos;####&apos;),
       x.sort_order,
       x.gl_date,
       x.document_date) y) z
  order by 
   z.seq) q
where
 (     (:p_summary_only = &apos;N&apos; and q.record_type = &apos;Transaction&apos;) 
  or (:p_summary_level = &apos;Period&apos; and q.record_type not in (&apos;Transaction&apos;)) 
  or (:p_summary_level = &apos;Customer Site&apos; and q.record_type not in (&apos;Period Summary&apos;,&apos;Transaction&apos;)) 
  or (:p_summary_level = &apos;Operating Unit&apos; and q.record_type not in (&apos;Customer Site Summary&apos;,&apos;Period Summary&apos;,&apos;Transaction&apos;)) 
  or (:p_summary_level = &apos;Customer&apos; and q.record_type = &apos;Customer Summary&apos;) 
  or (:p_reporting_level = &apos;3000&apos; and q.record_type = &apos;Operating_Unit Summary&apos;) 
  or (:p_reporting_level = &apos;1000&apos; and q.record_type = &apos;Ledger Summary&apos;) 
) 
order by 
 q.seq</SQL_TEXT>
  <VERSION_COMMENTS>Fixed duplicate join, and typos 
Added opening and closing balance columns</VERSION_COMMENTS>
  <XDO_APPLICATION_SHORT_NAME>AR</XDO_APPLICATION_SHORT_NAME>
  <XDO_DATA_SOURCE_CODE>ARSTMTRPT</XDO_DATA_SOURCE_CODE>
  <NUMBER_FORMAT>#,##0.00;[Red]-#,##0.00</NUMBER_FORMAT>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <REPORT_NAME>AR كشف حساب العميل</REPORT_NAME>
    <DESCRIPTION>Application: المقبوضات
Source: كشف حساب العميل
Short Name: ARSTMTRPT
DB package: AR_TP_STMT_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <REPORT_NAME>AR Kundenauszug</REPORT_NAME>
    <DESCRIPTION>Application: Debitoren
Source: Kundenauszug
Short Name: ARSTMTRPT
DB package: AR_TP_STMT_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <REPORT_NAME>AR Relevé de client</REPORT_NAME>
    <DESCRIPTION>Application: Receivables
Source: Relevé de client
Short Name: ARSTMTRPT
DB package: AR_TP_STMT_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>AR Customer Statement</REPORT_NAME>
    <DESCRIPTION>Application: Receivables
Source: Customer Statement
Short Name: ARSTMTRPT
DB package: AR_TP_STMT_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>AR 客户对帐单</REPORT_NAME>
    <DESCRIPTION>Application: 应收帐款
Source: 客户对帐单
Short Name: ARSTMTRPT
DB package: AR_TP_STMT_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>&amp;document_columns</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_adj_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_app_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_currency</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_cust_category</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_cust_class</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_customer_name</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_incomplete_trx</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_org_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_rcpt_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_rcpt_currency</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_rcpt_org_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;gc_reporting_entity</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;lp_operating_unit_column</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>&amp;reporting_entity_col_name</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>4=4</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>5=5</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_adj_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_app_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_currency</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_cust_category</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_cust_class</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_customer_name</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_incomplete_trx</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_org_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_rcpt_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_rcpt_currency</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_rcpt_org_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:gc_reporting_entity</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_accounted</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_currency</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_cust_category</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_cust_class</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_from_cust_name</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_from_doc_date</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_from_gl_date</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_incomplete_trx</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_reporting_entity_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_reporting_entity_name</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_reporting_level</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_summary_level</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_summary_only</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_to_cust_name</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_to_doc_date</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_to_gl_date</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>-10</DISPLAY_SEQUENCE>
    <ANCHOR>:p_reporting_entity_name</ANCHOR>
    <PARAMETER_TYPE_DSP>Char</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>:$flex$.reporting_context.value</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>اسم سياق التقرير</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Kontextbezeichnung</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Nom du contexte de rapport</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Reporting Context Name</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>申报环境 - 名称</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>:p_reporting_level</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>FND_MO_REPORTING_LEVEL</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 lookup_type=&apos;FND_MO_REPORTING_LEVEL&apos;
and lookup_code in (1000,3000)
order by value,description</LOV_QUERY_DSP>
    <DEFAULT_VALUE>1000</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>مستوى التقرير</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Auswertungsebene</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Niveau de rapport</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Reporting Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>申报级别</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <ANCHOR>&amp;lp_operating_unit_column</ANCHOR>
    <SQL_TEXT> q.operating_unit,</SQL_TEXT>
    <MATCHING_VALUE>1000</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Niveau de rapport</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Reporting Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <ANCHOR>&amp;lp_operating_unit_column</ANCHOR>
    <SQL_TEXT>select null from dual</SQL_TEXT>
    <MATCHING_VALUE>3000</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Niveau de rapport</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Reporting Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <ANCHOR>&amp;reporting_entity_col_name</ANCHOR>
    <SQL_TEXT>select case :p_reporting_level when &apos;1000&apos; then &apos;Ledger&apos; when &apos;3000&apos; then  &apos;Operating_Unit&apos; end 
from dual</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Niveau de rapport</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Reporting Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>:p_reporting_entity_id</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>FND_MO_REPORTING_ENTITY</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
entity_id id,
entity_name value,
null description
from
fnd_mo_reporting_entities_v
where reporting_level=:$flex$.fnd_mo_reporting_level
order by value,description</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select fmrev.entity_id from fnd_mo_reporting_entities_v fmrev where fmrev.reporting_level=:$flex$.fnd_mo_reporting_level and rownum=1</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>سياق التقرير</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Auswertungskontext</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Contexte du rapport</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Reporting Context</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>申报环境</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>7</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>:p_from_gl_date</ANCHOR>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>trunc(sysdate,&apos;MON&apos;)</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>تاريخ الأستاذ العام من</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Von Buchungsdatum</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>GL Date du</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>GL Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>GL 日期自</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>:p_to_gl_date</ANCHOR>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>last_day(:$flex$.Gl_Date_From)</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>تاريخ الأستاذ العام إلى</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Bis Buchungsdatum</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>GL Date à</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>GL Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>GL 日期至</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>9</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>:p_from_doc_date</ANCHOR>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>تاريخ المستند من</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Von Belegdatum</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>单据日期自</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>10</SORT_ORDER>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>rct.trx_date &gt;= trunc(:p_from_doc_date)</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>11</SORT_ORDER>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>acrh.trx_date &gt;= trunc(:p_from_doc_date)</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>12</SORT_ORDER>
    <ANCHOR>3=3</ANCHOR>
    <SQL_TEXT>acrh.trx_date &gt;= trunc(:p_from_doc_date)</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>13</SORT_ORDER>
    <ANCHOR>4=4</ANCHOR>
    <SQL_TEXT>aa.apply_date &gt;= trunc(:p_from_doc_date)</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>14</SORT_ORDER>
    <ANCHOR>5=5</ANCHOR>
    <SQL_TEXT>ara.apply_date &gt;= trunc(:p_from_doc_date)</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>15</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>:p_to_doc_date</ANCHOR>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>last_day(:$flex$.Document_Date_From)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>تاريخ المستند إلى</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Bis Belegdatum</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document au</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>单据日期至</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>16</SORT_ORDER>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>rct.trx_date &lt; trunc(:p_to_doc_date)+1</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document au</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>17</SORT_ORDER>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>acrh.trx_date &lt; trunc(:p_to_doc_date)+1</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document au</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>18</SORT_ORDER>
    <ANCHOR>3=3</ANCHOR>
    <SQL_TEXT>acrh.trx_date &lt; trunc(:p_to_doc_date)+1</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document au</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>19</SORT_ORDER>
    <ANCHOR>4=4</ANCHOR>
    <SQL_TEXT>aa.apply_date &lt; trunc(:p_to_doc_date)+1</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document au</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>20</SORT_ORDER>
    <ANCHOR>5=5</ANCHOR>
    <SQL_TEXT>ara.apply_date &lt; trunc(:p_to_doc_date)+1</SQL_TEXT>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Date du document au</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Document Date To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>21</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</DISPLAY_SEQUENCE>
    <ANCHOR>:p_from_cust_name</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR_CUSTOMER_NAME_WIDE</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
party.party_name id,
party.party_name value,
null description
from
hz_cust_accounts cu,hz_parties party
where cu.party_id=party.party_id
and exists (select cas.cust_account_id from hz_cust_acct_sites cas
where cas.cust_account_id=cu.cust_account_id)
order by value,description</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>اسم العميل من</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Von Kundenname</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Nom du client De</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Customer Name From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>客户名称自</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>22</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</DISPLAY_SEQUENCE>
    <ANCHOR>:p_to_cust_name</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR_CUSTOMER_NAME_WIDE</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
party.party_name id,
party.party_name value,
null description
from
hz_cust_accounts cu,hz_parties party
where cu.party_id=party.party_id
and exists (select cas.cust_account_id from hz_cust_acct_sites cas
where cas.cust_account_id=cu.cust_account_id)
order by value,description</LOV_QUERY_DSP>
    <DEFAULT_VALUE>:$flex$.Customer_Name_From</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>اسم العميل إلى</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Bis Kundenname</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Nom du client à</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Customer Name To</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>客户名称至</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>23</SORT_ORDER>
    <DISPLAY_SEQUENCE>90</DISPLAY_SEQUENCE>
    <ANCHOR>:p_currency</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR_SRS_CURRENCY</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
currency_code id,
currency_code value,
name description
from
fnd_currencies_vl
where currency_flag=&apos;Y&apos;
and enabled_flag in (&apos;Y&apos;,&apos;N&apos;)
order by currency_code</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>العملة</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Währung</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Monnaie</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Currency</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>币种</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>24</SORT_ORDER>
    <DISPLAY_SEQUENCE>100</DISPLAY_SEQUENCE>
    <ANCHOR>:p_cust_category</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR_BR_CUST_CATEGORY</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
ar_lookups
where lookup_type=&apos;CUSTOMER_CATEGORY&apos;
order by meaning</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>فئة العميل</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Kundenkategorie</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Catégorie de client</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Customer Category</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>客户类别</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>25</SORT_ORDER>
    <DISPLAY_SEQUENCE>110</DISPLAY_SEQUENCE>
    <ANCHOR>:p_cust_class</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR_BR_CUST_CLASS</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
ar_lookups
where lookup_type=&apos;CUSTOMER CLASS&apos;
order by meaning
</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>طبقة العميل</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Kundenklasse</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Classe de clients</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Customer Class</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>客户分类</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>26</SORT_ORDER>
    <DISPLAY_SEQUENCE>120</DISPLAY_SEQUENCE>
    <ANCHOR>:p_incomplete_trx</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>AR_SRS_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 lookup_type=&apos;YES_NO&apos;
order by meaning</LOV_QUERY_DSP>
    <DEFAULT_VALUE>N</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>تضمين الحركات غير التامة</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Mit unvollständigen Transaktionen</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Inclure les transactions incomplètes</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Include Incomplete Transactions</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>包括未完成的事务处理</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>27</SORT_ORDER>
    <DISPLAY_SEQUENCE>130</DISPLAY_SEQUENCE>
    <ANCHOR>:p_accounted</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>ZX_TRL_ACCOUNTED_STATUS</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 lookup_type=&apos;ZX_TRL_ACCOUNTED_STATUS&apos;
order by meaning</LOV_QUERY_DSP>
    <DEFAULT_VALUE>BOTH</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>AR</LANGUAGE>
      <PARAMETER_NAME>الحركات المحتسبة</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>D</LANGUAGE>
      <PARAMETER_NAME>Verbuchte Transaktionen</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Transactions comptabilisées</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Accounted Transactions</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>已入帐的事务处理</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>28</SORT_ORDER>
    <DISPLAY_SEQUENCE>140</DISPLAY_SEQUENCE>
    <ANCHOR>:p_summary_level</ANCHOR>
    <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;Period&apos; value, &apos;Include Summary by Period&apos; description from dual union all
 select &apos;Customer Site&apos;, &apos;Include Summary by Customer Site&apos; from dual union all
 select &apos;Operating Unit&apos;, &apos;Include Summary by Customer/Operating Unit&apos; from dual union all
 select &apos;Customer&apos;, &apos;Include Summary by Customer&apos; from dual
) x
order by
  x.value</LOV_QUERY_DSP>
    <DEFAULT_VALUE>Customer</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Niveau de résumé</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Summarization Level</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>29</SORT_ORDER>
    <DISPLAY_SEQUENCE>150</DISPLAY_SEQUENCE>
    <ANCHOR>:p_summary_only</ANCHOR>
    <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>
    <DEFAULT_VALUE>N</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Afficher le résumé uniquement</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Summary Only</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>30</SORT_ORDER>
    <ANCHOR>&amp;document_columns</ANCHOR>
    <SQL_TEXT>  , q.GL_Date
  , q.Debit  Document_Debit
  , q.Credit  Document_Credit
  , q.Document_Type
  , q.Document_Number
  , q.Document_Date
  , q.Maturity_Date
  , q.Document_Status
  , q.Original_Amount
  , q.Currency_Code</SQL_TEXT>
    <MATCHING_VALUE>N</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Afficher le résumé uniquement</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Summary Only</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>31</SORT_ORDER>
    <ANCHOR>&amp;document_columns</ANCHOR>
    <SQL_TEXT>select null from dual</SQL_TEXT>
    <MATCHING_VALUE>Y</MATCHING_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>F</LANGUAGE>
      <PARAMETER_NAME>Afficher le résumé uniquement</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Show Summary Only</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
