Skip to main content

Oracle Apps AP/AR Aged Trial Balance Report (R12)


How to customize the Account Analysis Report (XLAAARPT) for AR Aged Trial Balance Report ?

Introduction : 
       When we were doing an R12 re-implementation from release 11.5.10, we thought of migrating the custom 11i reports to R12, by just changing the outdated tables and the policy context. Hoping that, this should be enough for getting the desired results.Then, when we actually test the result with 11i, they were not matching. 
Finally we decided to take the standard R12 Account Analysis Report and customize it.

AR Aged Trial Balance Report : 

Now, why would we need the AR Aged Trial Balance Report ? How will this be used by a business user ?


Sample AR Trial Balance Report
Above is a sample report, if we see this report, we can ascertain, how many customers have outstanding payment and how long they have not paid. In other words, it represents the number of days of average charges that are yet to be collected from each customer. Not only that, it can also give us the summary based on Customers, Accounts and Ledger.

Account Analysis Report(XLAAARPT) 

The standard Account Analysis Report(XLAAARPT), has got the enough information for us to customize the report to AR Aged Trial Balance Report.

  • The report is an XML publisher report with Data template and RTF template.
  • The data template has a call to XLA_ACCT_ANALYSIS_RPT_PKG, which will be used to construct the xml data file.
  • We need to rename all the relevant procedure calls to custom procedure calls names.
Steps:

  1. Copy the existing Account Analysis Report(XLAAARPT) to a custom program name , say XXXXLAAARPT.
  2. Switch Responsibility to XML Publisher Administrator -->Home-->Data Definition -->Query for XLAAARPT.
  3. Create a new Data Definition similar to XLAAARPT, say XXXXLAAARPT.
  4. Similarly create a new template for Data definition: Account Analysis Report, say XX Account Analysis Report.
  5. Now for getting the aging buckets, we need the  ar_payment_schedules_all.DUE_DATE, this needs to be included in the xml data template. 
To include this column, we need to customize the XLA_ACCT_ANALYSIS_RPT_PKG. The variable C_TB_SOURCE_SQL holds the SQL query. 

Append in the select query the following :

     ,(select due_date from ar_payment_schedules_all where trx_number =tbg.transaction_number) DUE_DATE     
     , CASE 
          WHEN ROUND((sysdate - (select due_date from ar_payment_schedules_all where trx_number =tbg.transaction_number))/30)<= 0 THEN tbg.entered_rounded_orig_amount
          ELSE 0 
       END BUCKET0
     , CASE 
          WHEN ROUND((sysdate - (select due_date from ar_payment_schedules_all where trx_number =tbg.transaction_number))/30)  = 1 THEN tbg.entered_rounded_orig_amount
          ELSE 0 
       END BUCKET1
     , CASE 
          WHEN ROUND((sysdate - (select due_date from ar_payment_schedules_all where trx_number =tbg.transaction_number))/30)  = 2 THEN tbg.entered_rounded_orig_amount
          ELSE 0 
       END BUCKET2
     , CASE 
          WHEN ROUND((sysdate - (select due_date from ar_payment_schedules_all where trx_number =tbg.transaction_number))/30)  = 3 THEN tbg.entered_rounded_orig_amount
          ELSE 0 
       END BUCKET3
     , CASE 
          WHEN ROUND((sysdate - (select due_date from ar_payment_schedules_all where trx_number =tbg.transaction_number))/30)  = 4 THEN tbg.entered_rounded_orig_amount
          ELSE 0 
       END BUCKET4
     , CASE 
          WHEN ROUND((sysdate - (select due_date from ar_payment_schedules_all where trx_number =tbg.transaction_number))/30) = 5 THEN tbg.entered_rounded_orig_amount
          ELSE 0 
       END BUCKET5
     , CASE 
          WHEN ROUND((sysdate - (select due_date from ar_payment_schedules_all where trx_number =tbg.transaction_number))/30) >= 6 THEN tbg.entered_rounded_orig_amount
          ELSE 0                

       END BUCKET6 



The new column names need to be included in the XML data template as well.

Customize the rtf, by including the bucket range with the corresponding total.



AP Aged Trial Balance Report : 

Now, why would we need the AP Aged Trial Balance Report ? How will this be used by a business user ?

Similar to the AR Aged Trial Balance Report, we need to know how much we owe to our Suppliers. We need to know, to which supplier, we are supposed to pay for more than 100 or 180 days. 

Not only that,the standard report can also give the outstanding based on Supplier, Account and Ledger.

Open Account AP Balances Listing(XLAAPRPT) : 

Similar to AR, the standard report Open Account AP Balances Listing, has rich information, enough to create the AP Aged Trial Balance Report. We need to create custom program keeping the Open Account AP Balances Listing as a baseline.

Customizing Open Account AP Balances Listing :

To customize just follow the steps we did for AR. Finally fill the customized RTF template with the bucket information as below
Template for AP Aged Trial Balance Report


I will upload the code shortly, which will be a plug and play :)

Conclusion

Aging Reports in R12, is no longer a complex development, if we use the XML publisher, instead of the conventional way of developing in RDF. 

Cheers and Happy Coding :) !!!

Comments

Popular posts from this blog

Create Accounting for a Payment generates errors 95333 and 95359

Create Accounting for a Payment generates errors 95333 and 95359 Error: 95333: A conversion rate does not exist to convert USD to AUD for the conversion type Corporate and conversion date 20-MAR-09 for line -25. Please use the Daily Rates form in General Ledger to enter a conversion rate for these currencies, conversion date and conversion type. 95359: There is no accounted amount for the subledger journal entry line. Please inform your system administrator or support representative that: The source assigned to the accounting attribute Accounted Amount has no value for extract line number 88547. Please make sure the source assigned to the accounting attribute Accounted Amount has a valid value, or assign a different source to this accounting attribute. Solution: 1. Specify a conversion rate for the currencies and conversion date mentioned in the error message 95333 Navigation under the General Ledger responsibility: Setup > Currencies > Currency Rates Manager > Daily Rates ...

Public API’s for FA Transactions

Public API’s for FA Transactions So far Oracle FA is have all the good things except the lack on reporting.Oracle FA is now offer lot of public API's that can be used to interfacing with third party or Oracle application other modules. Here are some of transaction's API's:   Additions API if you have requirement to add assets directly via PL/SQL then use  FA_ADDITION_PUB.DO_ADDITION. If you have selected the Allow CIP Assets check box on the Book Controls window of a tax book when adding CIP assets using the Additions API, the this API automatically adds those CIP assets to that tax book at the same time that they are added to the corporate book. Adjustments API you can make cost adjustments to your assetsdirectly via PL/SQL using  FA_ADJUSTMENT_PUB.DO_ADJUSTMENT  for any  process adjustment. Detail can be found in appendix H) You can use this API if you have a custom interface that makes it difficult to use with the existing Oracle Assets interfaces for adjusti...

AP Table Relation Oracle Apps

AP Table Relation Oracle Apps ORACLE PAYABLE TABLE RELATION Source Table Dependent Table Condition AP_INVOICE_LINES_ALL AIL ZX_LINES_SUMMARY ZLS AIL.invoice_id = ZLS.trx_id and  ZLS.application_id  = 200 and  ZLS.entity_code  = 'AP_INVOICES' and  ZLS.event_class_code  in ('STANDARD INVOICES', 'PREPAYMENT INVOICES', 'EXPENSE REPORTS') and  AIL.summary_tax_line_id = ZLS.summary_tax_line_id AP_INVOICE_LINES_ALL AIL ZX_LINES ZL AIL.invoice_id = ZL.trx_id and  ZL.application_id  = 200 and  ZL.entity_code  = 'AP_INVOICES' and  ZL.event_class_code  in ('STANDARD INVOICES', 'PREPAYMENT INVOICES', 'EXPENSE REPORTS') and  AIL.line_number = ZL.trx_line_number AP_INVOICE_DISTRIBUTIONS_ALL AID ZX_REC_NREC_DIST ZD AID.invoice_id = ZD.trx_id and  ZD.application_id  = 200 and  ZD.entity_code  = 'AP_INVOICES' and  ZD.event_class_code  in ('STANDARD INVOICES', 'PREPAYMENT INVOICES', 'EXPENSE REPORTS') and...