Search Results c_amount_tot_roundformula
Overview
The APPS.PO_POXPRIPR_XMLP_PKG package is the PL/SQL library generated to support the Oracle Purchasing XML Publisher report POXPRIPR, an item price and purchase/invoice price variance report. Its role is to hold the report-specific bind parameters, report-level global variables, and the formula functions that the XML Publisher (BI Publisher) engine invokes during report execution. The package is declared with AUTHID CURRENT_USER, so all SQL executed inside the report runs under the privileges of the invoking APPS user rather than the package owner.
The header comment ($Header: POXPRIPRS.pls 120.3 2008/01/22 ...) identifies the source file as POXPRIPRS.pls, confirming that this is a report-support package rather than a business API. It does not expose transaction-processing entry points; instead it supplies the procedural scaffolding needed to render the price comparison report. In EBS 12.1.1 and 12.2.2 the package name and body are unchanged; the 12.2 multi-org and Online Patching architecture does not alter its behavior.
Key Procedures and Functions
The package exposes 18 documented routines. They fall into three groups.
- Report life-cycle routines — BEFOREREPORT, AFTERREPORT, and AFTERPFORM orchestrate the report startup, teardown, and post-parameter-form processing respectively.
- Parameter and precision helpers — GET_PRECISION derives the quantity precision used in the report, GET_P_STRUCT_NUM resolves the item category structure, and ORDERBY_CLAUSEFORMULA builds the ORDER BY clause for the query.
- Formula functions — these are the calculation callbacks the report template invokes: IPVFORMULA (invoice price variance), AVERAGE_PURCHASE_ROUNDFORMULA, AVERAGE_INVOICE_ROUNDFORMULA, AVERAGE_PURCHASEFORMULA, AVERAGE_INVOICEFORMULA, C_AMOUNT_ROUNDFORMULA, C_AMOUNT_TOT_ROUNDFORMULA, RATEFORMULA, PO_PRIMARY_QTYFORMULA, AP_PRIMARY_QTYFORMULA, ITEM_AVERAGE_PURCHASE_ROUNDFOR, and ITEM_AVERAGE_INVOICE_ROUNDFORM. The latter is the routine the user searched for as item_average_invoice_roundform; it accepts an average invoice amount and an FND precision value and returns the rounded result used in the item-level column of the report output.
Tables Accessed
Two reference tables are documented as being accessed through APPS synonyms:
- FINANCIALS_SYSTEM_PARAMETERS — read to obtain ledger-level defaults such as the base (functional) currency, which the report fixes into P_BASE_CURRENCY and uses when converting and rounding monetary amounts.
- GL_PERIOD_STATUSES — read to validate the period range supplied by the user and to translate P_PERIOD_FROM and P_PERIOD_TO into actual start and end dates (P_PERIOD_START_DATE, P_PERIOD_END_DATE) and the PERIOD_WHERE predicate.
The package does not write to either table; it is strictly a read-only reporting support unit.
Usage Notes
PO_POXPRIPR_XMLP_PKG is invoked exclusively by the POXPRIPR concurrent program when its XML Publisher template is executed. Users never call it directly, and ETRM records that it is referenced by no other packages. During submission the concurrent manager populates the P_* globals (period, creation date, vendor, category, item, structure, and ordering parameters), calls BEFOREREPORT to resolve periods and precision, then evaluates the formula functions as each report row is formatted by the template. AFTERREPORT performs cleanup. Because the package is regenerated whenever the report definition is modified, custom code should not extend it; any extension should instead be placed in a separate custom package or a report trigger.