Search Results fair_valueformula
Overview
APPS.XTR_XTRCCYGL_XMLP_PKG is a report-support PL/SQL package within the Oracle E-Business Suite Treasury (ETRM) module. Its role is to service the XML Publisher concurrent program that produces the Currency Gain/Loss report, identified internally as XTRCCYGL. The report presents realized and unrealized currency gain or loss positions derived from treasury deals, revaluation details, rollover transactions, and their associated accounting entries in the general ledger. The package declares a large set of global variables that mirror the report's runtime parameters — company, portfolio, deal type, deal subtype, product type, batch identifiers, date ranges, currency, realized flag, and factor — and exposes formula functions that XML Publisher templates invoke during rendering to derive display values such as formatted dates, currency codes, report headings, rate columns, and rounded fair value and gain/loss amounts. The header comment shows a last revision of 120.1 dated 2007/12/28, consistent with the long-standing, stable nature of this reporting component across EBS 12.1.1 and 12.2.2.
Key Procedures and Functions
The package contains sixteen documented procedures and functions, most of which exist to feed the XML Publisher data and layout templates.
- BEFOREREPORT — the standard XML Publisher pre-execution hook; initializes session and report state before the data model query runs.
- AFTERPFORM — executes after the parameter form or parameter submission, applying parameter-driven adjustments such as user-specific or grouping overrides.
- AFTERREPORT — the post-execution hook used to reset package state or release resources after the report completes.
- END_RATEFORMULA — returns the formatted end rate value for each reported row, the formula the user specifically searched for; it supplies the reporting-period closing rate used to convert or revalue the deal currency against the ledger currency.
- BEGIN_RATEFORMULA — the counterpart beginning-rate formula for the opening position of the reporting period.
- C_DATEFORMATFORMULA — supplies the date format mask applied to the report's from and to date parameters.
- C_REPORT_NAMEFORMULA and CO_SHT_NAMEFORMULA — return the report name and the company/ledger short name used in report headings and title blocks.
- USER_DEAL_TYPEFORMULA and USER_DEAL_SUBTYPEFORMULA — return deal type and subtype labels filtered by the user's parameter selection and security profile.
- REPORT_PRDFORMULA — derives the reporting period label displayed on the output.
- SOB_CCYFORMULA — returns the set of books (ledger) currency for the reporting context.
- FAIR_VALUEFORMULA — returns the fair value amount computed for revalued positions.
- FAIR_VALUE_RNDFORMULA, GAIN_LOSS_RNDFORMULA, and BASE_AMT_RNDFORMULA — apply the report rounding factor to fair value, gain/loss, and base amounts respectively for consistent presentation.
Tables Accessed
Through APPS synonyms, the package and its report query reference the following tables:
- XTR_DEALS, XTR_DEAL_TYPES, XTR_DEAL_SUBTYPES — the core transaction data and its classifications, filtered by the user's company, portfolio, deal type, and subtype parameters.
- XTR_BATCHES and XTR_BATCH_EVENTS — batch-level processing context used to constrain the report by batch ID range.
- XTR_REVALUATION_DETAILS — revaluation results supplying fair value and unrealized gain/loss figures.
- XTR_ROLLOVER_TRANSACTIONS — rollover legs that contribute to realized gain/loss.
- XTR_PARTY_INFO — counterparty details shown in report output.
- FND_CONCURRENT_REQUESTS — concurrent request context for the running program.
- FND_NEW_MESSAGES — Oracle Applications messages used for user-facing error or informational text such as the no-data-found indicator.
Usage Notes
XTR_XTRCCYGL_XMLP_PKG is invoked by the Currency Gain/Loss XML Publisher concurrent program rather than by forms or custom code. Users submit it from the Standard Request Submission or Treasury responsibility, entering parameters such as company, portfolio, deal type, batch ID range, and date range. The package's globals are populated from those parameters, its BEFOREREPORT hook initializes state, the data model query retrieves transactions, and the formula functions are called within the XML template to render each display column — including END_RATEFORMULA for the closing rate. It is documented as referenced by zero other packages, confirming its role as a standalone report driver.