Search Results create_default_schedule




Overview

OKS_SUBSCRIPTION_PUB is the public (API-classified PUB) PL/SQL package body owned by APPS in Oracle E-Business Suite Release 12.1.1 and 12.2.2. It belongs to the Service Contracts (OKS) module and forms part of the subscription management layer used to model service and subscription agreements. The package acts as a thin public wrapper around the private implementation package OKS_SUBSCRIPTION_PVT, exposing a controlled, upgrade-safe API surface for external callers. Each public procedure delegates its work to the corresponding procedure in OKS_SUBSCRIPTION_PVT, preserving the standard EBS API conventions of p_api_version, p_init_msg_list, x_return_status, x_msg_count, and x_msg_data.

The business purpose of the package is to support the lifecycle of subscription-based service agreements: generating default billing and service schedules, recreating schedules and instances when contract lines change, copying and undoing subscription records, validating subscription patterns, computing subscription quantities, and adjusting effectivity or termination amounts. It is a foundational utility for Oracle Service Contracts subscription processing.

Key Procedures and Functions

  • CREATE_DEFAULT_SCHEDULE — Creates the default schedule for a subscription contract line, driven by the contract line (CLE) identifier and an intent qualifier.
  • RECREATE_SCHEDULE — Rebuilds the schedule for a given contract line, returning the resulting quantity through x_quantity.
  • RECREATE_INSTANCE — Recreates the subscription instance for a contract line in the context of a customer account.
  • COPY_SUBSCRIPTION — Copies an existing subscription, typically to support contract duplication or amendment scenarios.
  • UNDO_SUBSCRIPTION — Reverses a previously applied subscription operation, restoring prior state.
  • VALIDATE_PATTERN — Validates the subscription/billing pattern supplied by the caller before it is persisted.
  • GET_SUBS_QTY — The procedure most relevant to the search term "get_subs_qty". It returns the subscription quantity for a contract line, central to pricing, scheduling, and coverage calculations.
  • STRETCH_EFFECTIVITY — Extends or adjusts the effectivity dates of a subscription, used when coverage periods are lengthened.
  • SUBS_TERMN_AMOUNT — Calculates or returns the subscription termination amount, supporting early-termination settlement.
  • IS_SUBS_TANGIBLE — Determines whether a subscription is tangible, affecting accounting and asset handling.
  • MAP_FREQ_UOM — Maps frequency values to their corresponding unit of measure, aligning billing periods with UOM definitions.
  • DB_COMMIT — Performs an explicit database commit, allowing callers to persist a completed unit of subscription work.

Tables Accessed

The ETRM metadata for this package body does not enumerate base tables directly; access is performed through APPS synonyms and is largely encapsulated within OKS_SUBSCRIPTION_PVT. In practice the subscription APIs read and write the OKS service contract and subscription entities — contract headers and lines (OKS_K_HEADERS, OKS_K_LINES and their _B/_T counterparts), subscription header/line and quantity records (OKS_SUBSCRIPTIONS, OKS_SUBSCRIBE_LINES), schedule and pricing records, and the frequency/UOM reference data used by MAP_FREQ_UOM. These objects are manipulated to create and maintain the schedule, instance, and quantity information that defines an active subscription.

Usage Notes

OKS_SUBSCRIPTION_PUB is invoked from Service Contracts forms, from concurrent programs that process subscription scheduling and billing, and from custom PL/SQL that must manipulate subscriptions without calling the private PVT layer directly. The metadata records that this package is referenced by 10 other packages, confirming its role as a shared, stable integration point.

Callers should initialize the message list, check x_return_status after every call, and use FND_MSG_PUB to retrieve messages when x_msg_count exceeds one. DB_COMMIT should be called deliberately, only after all logical operations of a transaction have succeeded, since the underlying PVT procedures may perform multiple related DML statements. Because the package is a wrapper over OKS_SUBSCRIPTION_PVT, business logic changes are delivered in the PVT layer, and the public signatures remain backward compatible across 12.1.1 and 12.2.2. For quantity retrieval, GET_SUBS_QTY should be preferred over direct queries against subscription tables to ensure consistency with the supported API behavior.