Search Results get_cur_month_rev




Overview

OKI_DISCO_UTIL_PUB is a public API package body in the Oracle EBS Service Contracts (OKI) module, specifically related to the Disclosure (DISCO) functionality used for revenue recognition and contract period calculations. It functions as a thin public wrapper over the corresponding private package, OKI_DISCO_UTIL_PVT, delegating core business logic to that internal package while exposing a stable interface for external callers. The package encapsulates utility routines that derive period counts, period identifiers, durations, end dates, and revenue amounts from a given set of contract or date-range inputs. It is classified as a PUB (public) API, meaning it is intended for invocation by forms, concurrent programs, and custom extensions rather than being restricted to internal use. The package body carries a header version of OKIPDULB.pls 115.2, dated 2002/12/02, indicating that the object has remained stable across EBS releases including 12.1.1 and 12.2.2.

Key Procedures and Functions

The package exposes eight documented functions, each delegating to OKI_DISCO_UTIL_PVT:

  • GET_NUM_PERIODS — Derives the number of accounting periods falling between a start date and an end date for a given set of books (p_sob_id). This is the function most commonly referenced in searches, as it underpins period-based revenue spreading and contract duration calculations.
  • GET_ORDER_NUMBER — Returns the original license order number associated with a given contract header identifier (chr_id).
  • GET_PERIOD — Determines the most suitable period for a given start and end date. The body notes it should be used in conjunction with GET_DURATION and includes a caching optimization: if the passed dates match the cached global dates (g_start_date, g_end_date), the previously computed global period (g_period) is returned directly.
  • GET_DURATION — Computes the duration associated with a date range, complementing GET_PERIOD.
  • GET_END_DATE — Derives an end date from the provided inputs, used to complete period boundaries.
  • GET_ANNUALIZED_AMOUNT — Returns an annualized revenue amount, typically used to normalize contract values to a yearly basis for reporting.
  • GET_CUR_MONTH_REV — Returns the current month's revenue figure for the contract context supplied.
  • GET_BACKDATED_REV — Returns the backdated revenue amount, used when recognition begins before the current period.

Tables Accessed

The ETRM metadata for this package does not enumerate specific tables accessed via APPS synonyms. In practice, this package operates primarily on derived calculations passed through its parameters and delegates all data retrieval to OKI_DISCO_UTIL_PVT, which in turn reads Service Contracts and revenue-related tables such as the contract headers, contract lines, and accounting period definitions needed to translate dates into period counts. Because the public body contains no direct SQL, the table access footprint is inherited entirely from the private package.

Usage Notes

OKI_DISCO_UTIL_PUB is invoked by two other packages within the EBS environment and is intended for use wherever period-based revenue recognition logic is required. Typical invocation scenarios include Service Contracts forms, concurrent programs that process revenue recognition or contract disclosures, and custom PL/SQL extensions that need consistent period derivation. Callers should use GET_PERIOD together with GET_DURATION to obtain aligned period and duration values. Because the public body simply forwards calls to OKI_DISCO_UTIL_PVT, customizations should never modify this package's logic directly; instead, they should call the public API so that upgrades to 12.2.2 and beyond preserve behavior. No direct table access is performed at this layer, so commits and transaction control remain the responsibility of the calling application.