Information Systems:AR Detail Report
A special type of A/R report was created (upon shareholder request) to provide a list of A/R transactions broken down to the item level. The utility is called IN2_ARCUST.PGM in Infonet. The query logic behind this report attempts to simulate the business logic that runs when the system produces an invoice, because this data is not logged to the database (rather, it is calculated ad-hoc during invoice generation). As the report is recalculating data and working around the limitations of not having the actual data to work with, this page details the caveats and flaws of this report.
Files
These are the files implicated in the query in order to be able to recalculate the values that would normally show up on an A/R statement (which this report is supposed).
- Invoice lines (for items) are kept in SROISDPL.
- Surcharge invoice lines are kept in SROISDSU.
- Admin fee invoice lines are kept in SROISA.
- The tax amount and discounts for invoice lines are logged to UZIVLIL1. This is a custom table that presumably was too close in proximity to base functionality so it was put in the ASW library (UP1480BFVA) instead of UWDASWPRDD.
- AR transaction lines are stored in SRODTA.
Query Logic
Trying to recreate data and simulate application logic using query logic will be prone to error. These are some of the potential issues regarding this report.
- Invoices and credit notes are kept in the same file, but with positive values. Another field - invoice type - determines whether the value should be positive or negative.
- Discounts are calculated during invoice generation according to terms code and invoice. The discount amount for the invoice line is logged to UZIVLIL1, but if a line follow.