Search Results oks_subscription_pub




Overview

OKS_SUBSCRIPTION_PUB is the public application programming interface for Oracle Service Contracts (OKS) subscription processing within the Oracle E-Business Suite. In releases 12.1.1 and 12.2.2, the package resides in the APPS schema and is classified as a PUB API, meaning it is the supported entry point through which external modules, forms, and custom code should interact with subscription logic. The package delegates the majority of its substantive processing to OKS_SUBSCRIPTION_PVT, the private implementation package, while exposing a stable, wrapped surface for callers.

The package is central to the service contracts lifecycle for subscription-based offerings: it handles schedule generation, instance recreation, subscription copy and undo operations, renewal and reprice support, and the various quantity, effectivity, and termination calculations that the Service Contracts UI and concurrent programs depend upon. Because it is referenced by ten other packages — including OKC_COPY_CONTRACT_PVT, OKS_BILL_REC_PUB, OKS_BILL_SCH, OKS_OCINT_PUB, OKS_QP_PKG, OKS_RENEW_CONTRACT_PVT, OKS_REPRICE_PVT, and OKS_SETUP_UTIL_PUB — it functions as a foundational service rather than an isolated utility.

Key Procedures and Functions

The documented API surface comprises twelve procedures and functions. Their purposes are as follows (parameter lists are intentionally omitted):

  • CREATE_DEFAULT_SCHEDULE — generates the default billing or service schedule for a subscription based on its defined pricing and coverage pattern.
  • RECREATE_SCHEDULE — rebuilds an existing schedule, typically after changes to subscription terms, pricing, or effectivity.
  • RECREATE_INSTANCE — regenerates the subscription instance records that represent the covered items or deliverables.
  • COPY_SUBSCRIPTION — duplicates an existing subscription into a new one, supporting order and contract copy scenarios.
  • UNDO_SUBSCRIPTION — reverses subscription creation or updates, restoring prior state and removing generated artifacts.
  • VALIDATE_PATTERN — validates the subscription usage or billing pattern against configured rules before processing continues.
  • GET_SUBS_QTY — returns the quantity associated with a subscription, used by pricing and billing callers.
  • STRETCH_EFFECTIVITY — extends or aligns subscription effectivity dates, commonly used during renewal or term changes.
  • SUBS_TERMN_AMOUNT — computes the termination amount owed when a subscription is terminated early.
  • IS_SUBS_TANGIBLE — determines whether a subscription represents a tangible item, influencing downstream accounting and service treatment.
  • MAP_FREQ_UOM — maps a pricing frequency to its corresponding unit of measure for billing period calculation.
  • DB_COMMIT — performs the transactional commit following a set of subscription operations, allowing callers to control transaction boundaries.

Tables Accessed

The ETRM extract for this package lists no tables referenced directly through APPS synonyms. In practice, OKS_SUBSCRIPTION_PUB relies on OKS_SUBSCRIPTION_PVT for its table-level access; the private package is the layer that reads and writes the underlying Service Contracts subscription, schedule, instance, and pricing tables. The public package therefore acts as a thin, contract-stable façade over that private implementation, with STANDARD providing the base PL/SQL package support.

Usage Notes

OKS_SUBSCRIPTION_PUB is normally invoked indirectly. Oracle Service Contracts forms, order-to-contract flows, and concurrent programs such as billing schedule generation and reprice processes call this package rather than manipulating subscription data directly. Its inclusion in the call graph of OKC_COPY_CONTRACT_PVT and OKS_RENEW_CONTRACT_PVT confirms that contract copy and renewal processes depend on it.

Custom extensions should call OKS_SUBSCRIPTION_PUB instead of OKS_SUBSCRIPTION_PVT, and should observe the API classification boundary between PUB and PVT. Because DB_COMMIT is exposed, callers bear responsibility for transaction control; commit only after all related subscription operations in a logical unit of work have succeeded. As with all APPS PUB APIs, the package is wrapped, so callers cannot inspect its source body and must rely on documented signatures and behavior.