Search Results xtr_xtrrevgl_xmlp_pkg




Overview

APPS.XTR_XTRREVGL_XMLP_PKG is the server-side PL/SQL package body that supports the XTRREVGL Oracle XML Publisher report within the ETRM (Enterprise Treasury and Risk Management) module of Oracle E-Business Suite. The package implements the report's data logic for treasury revaluation and general ledger reconciliation, converting batch-level fair value movements into reportable balances. Its principal business role is to compute opening (beginning) and closing (ending) fair values for deals, by reference number, company code, and accounting period, while respecting the realized/unrealized distinction driven by the report parameter P_REALIZED_FLAG. The package also handles report lifecycle events and formatting formulas used by the XML Publisher template.

Key Procedures and Functions

  • BEGIN_FVFORMULA — Returns the beginning fair value for a given company, reference number, period start, and deal type. It sums fair value from the revaluation summary view joined to batch data for periods ending before the period start, filtered by the realized flag. If no batch-derived value exists, it falls back to the initial fair value from either XTR_DEALS (for standard deal types) or XTR_ROLLOVER_TRANSACTIONS (for 'NI' deal types), and divides the result by the unit parameter (P_UNIT, default 1000).
  • END_FVFORMULA — Returns the ending fair value, summing fair value for periods ending on or before the specified period end, again filtered by the realized flag. It mirrors the beginning-value calculation at the close of the reporting period.
  • BEFOREREPORT / AFTERPFORM / AFTERREPORT — Standard Oracle Reports/XML Publisher report triggers for pre-report initialization, post-formatting, and post-report processing.
  • C_DATEFORMATFORMULA, CO_SHT_NAMEFORMULA, C_REPORT_NAMEFORMULA, C_REV_PERIODFORMULA — Formula columns supplying the report date format, company sheet name, report name, and revaluation period to the template.
  • USER_DEAL_SUBTYPEFORMULA, USER_DEAL_TYPEFORMULA — Formula columns that resolve and display user-defined deal type and subtype descriptions, sourced from the deal type and subtype setup tables.

Tables Accessed

  • XTR_REVALUATION_DETAILS_SUM_V — Summary view of revaluation details providing aggregate fair value by company, batch, and reference number; joined to batch data for period filtering.
  • XTR_BATCHES — Supplies processing batch context, including period start and period end used to bound the fair value calculations.
  • XTR_DEALS — Source of initial fair value for standard deal types when no prior batch revaluation exists.
  • XTR_ROLLOVER_TRANSACTIONS — Source of initial fair value for rollover ('NI') deals.
  • XTR_DEAL_TYPES, XTR_DEAL_SUBTYPES — Provide descriptive codes for the deal type/subtype formula columns.
  • XTR_BATCH_EVENTS, XTR_PARTY_INFO — Supporting batch event and counterparty information used in report derivation.
  • FND_CONCURRENT_REQUESTS, FND_NEW_MESSAGES — Standard concurrent manager and message lookup tables used for report submission context and error messaging.

Usage Notes

This package is invoked indirectly through the XTRREVGL XML Publisher concurrent program rather than being called from application forms. When a user submits the revaluation report, the concurrent manager executes the report, which references this package to populate data columns and formula fields. The key user input is p_realized_flag, which filters revaluation records to realized or unrealized fair values; this parameter propagates into the cursors in BEGIN_FVFORMULA and END_FVFORMULA. The package is classified as API classification OTHER and is referenced by zero other packages, indicating it is not a shared utility — it should be treated as report-internal logic. Customizations should avoid direct dependency on it, and any extension of realized/unrealized reporting should be implemented through supported ETRM report parameters or views rather than modifying this package body directly.