Search Results c_amount_agr_round
Overview
PO_POXPOSTD_XMLP_PKG is the packaged PL/SQL body associated with the Oracle E-Business Suite concurrent program "POXPOSTD" (Purchase Order Printed Document / PO Print). It exists to support the XML Publisher (BI Publisher) report execution model, where the concurrent program defines a set of report-level parameters and the accompanying package supplies the PL/SQL functions that format, filter, and pre-process data before the XML template is rendered. The package version header (120.0, dated 2008/01/02) indicates it is a long-standing shipping object present in both 12.1.1 and 12.2.2.
The package is an "OTHER" classified API, meaning it is not intended as a public integration interface; it is internal plumbing for the PO Print concurrent program. It declares a broad set of public package variables that mirror the report's user-entered parameters (title, status, buyer, vendor range, PO number range and type, category and item flexfield ranges, structure numbers, quantity precision, and category/item WHERE clauses). These variables hold the parameter values passed at submission time so that the report's data query and formatting logic can reference them consistently.
Key Procedures and Functions
The package exposes six documented callable units:
- BeforeReport — Standard Oracle Reports/XML Publisher trigger-style function returning a boolean. It performs pre-query setup (typically initializing working variables and applying derived WHERE fragments) before the report's data model executes.
- AfterPForm — Invoked after the parameter form values are captured, allowing the package to post-process or validate the submitted parameters prior to report execution.
- AfterReport — Boolean function invoked after the report completes, used for cleanup or final state handling.
- GET_PRECISION — Procedure that determines and populates the quantity/currency precision used for formatting numeric output (corresponding to P_qty_precision).
- GET_P_STRUCT_NUM — Boolean function that resolves the flexfield structure number used for category or item key flexfield validation/filtering.
- c_amount_agr_round — The function the user searched for. It accepts a numeric amount (C_AMOUNT_AGR) and an FND precision value (C_FND_PRECISION) and returns a rounded number. In the PO Print context it rounds agreement/committed amount figures to the currency precision configured in FND, ensuring consistent display of monetary values on the printed purchase order.
Tables Accessed
Per the documented metadata, the package references PO_SYSTEM_PARAMETERS (via APPS synonym). This table stores purchasing operating unit system options, and the package reads it to obtain default precision and rounding behavior used by c_amount_agr_round and GET_PRECISION. The report's primary transactional sources (PO_HEADERS, PO_LINES, etc.) are typically accessed through the report's data model SQL rather than directly by this package body.
Usage Notes
PO_POXPOSTD_XMLP_PKG is invoked exclusively through the PO Print concurrent program and its XML Publisher template; it is not called from Oracle Forms or from custom code. Because it is a report-support package with non-public ("OTHER") classification, customization should be avoided. The searched symbol c_amount_agr_round is a helper for currency rounding and is only meaningful within report execution. The declared variable WHERE_PERFORMANCE initializes to 'and 1=2', a standard no-op guard that is overridden at runtime when performance predicates are required.