Search Results xtr_md_num_table




Overview

QRM_PA_CALCULATION_P is a public PL/SQL package body owned by the APPS schema and delivered as part of Oracle E-Business Suite's Enterprise Treasury and Risk Management (ETRM) module, specifically the Quantitative Risk Management (QRM) product family. The package implements the calculation engine that drives portfolio and position analysis for deal portfolios held within QRM. Its principal responsibility is to orchestrate the evaluation of analysis settings, retrieve candidate deals, execute the configured calculation measures, convert monetary amounts into the appropriate reporting currency, and persist results and errors into the deal calculation and treasury-balance calculation tables. The package is classified as OTHER within the ETRM API taxonomy, meaning it is not a formal open interface but is invoked internally by concurrent programs and other QRM calculation routines. It is designed for batch, set-based processing rather than interactive use, and it leverages the QRM analysis settings framework to drive parameterized runs triggered from both scheduler and application-level entry points.

Key Procedures and Functions

  • RUN_ANALYSIS_CP — Concurrent-program entry point. Accepts a source identifier, analysis name, and reference date, initializes the risk debug package, resolves the reference datetime (defaulting to the system date when null), and delegates to RUN_ANALYSIS. Designed to be registered as a concurrent program executable.
  • RUN_ANALYSIS_AM — Alternate entry point that processes a table of analysis names and a reference datetime. It validates analysis settings and concurrent request status through FND_CONCURRENT before invoking the core analysis logic.
  • RUN_ANALYSIS — The core driver that performs the actual analysis execution, coordinating deal retrieval, measure evaluation, and result persistence.
  • REMOVE_EXPIRED_DEALS — Purges deals that have dropped out of the analysis scope, maintaining calculation table hygiene.
  • GET_THRESHOLD_DATE — Resolves the boundary date used for filtering deals within a given analysis window.
  • GET_GAP_DATE — Derives gap or interval dates used in date-based calculations and bucketing.
  • GET_SIGNED_AMOUNT — Applies buy/sell or pay/receive directional sign to a raw monetary amount so that aggregation nets correctly.
  • CONVERT_AMOUNTS — Performs currency conversion of calculated amounts from the deal currency into the analysis reporting currency, the routine associated with the user's convert_amounts search term.
  • FILTER_MEASURE — Applies configured filter conditions to determine which deals or measures qualify for inclusion in the analysis result set.

Tables Accessed

The package reads analysis configuration from QRM_ANALYSIS_SETTINGS, QRM_ANALYSIS_ATTS, and QRM_ANA_ATTS_LOOKUPS, which define which measures run and how they are parameterized. Deal data is drawn from QRM_DEALS_S and associated analyses in QRM_DEALS_ANALYSES. Filter criteria are resolved from QRM_FILTERS and QRM_FILTER_CONDITIONS, while results are written to QRM_DEAL_CALCULATIONS and QRM_TB_CALCULATIONS, with failures logged to QRM_DEAL_CALC_ERRORS. Instrument reference data is read from XTR_BOND_ISSUES, XTR_BOND_COUPON_DATES, and XTR_PARTY_INFO. DBMS_SQL supports dynamic measure evaluation, and DUAL is used for scalar derivations.

Usage Notes

QRM_PA_CALCULATION_P is typically invoked through the QRM concurrent program framework, with RUN_ANALYSIS_CP serving as the executable entry point and RUN_ANALYSIS_AM supporting aggregated multi-analysis runs. It may also be called from custom code where an organization needs to trigger analysis programmatically. Because the package performs bulk inserts, updates, and deletions against the calculation tables and depends on REF CURSOR and dynamic SQL constructs, it should not be executed outside a controlled batch window. Debug tracing flows through XTR_RISK_DEBUG_PKG, so diagnostic output requires that instrumentation to be enabled. No other QRM packages reference this body directly, confirming its role as a terminal calculation component rather than a shared utility.