Search Results oks_k_headers
Overview
OKS_CHANGE_STATUS_PVT is a private PL/SQL package body in the Oracle E-Business Suite Service Contracts (OKS) module. Its principal business function is the controlled modification of contract and subscription status. It provides the internal logic that moves a contract header, its lines, and sub-lines from one lifecycle status to another — for example activating, terminating, or cancelling a service agreement — while keeping dependent records consistent. Because the package is classified as PVT, it is not intended as a public integration API; it is invoked by other OKS packages and by the public wrapper layers that expose status change to forms and concurrent processes. The header comment confirms its purpose: it "accepts contract_id and the new_sts_code and changes the status of the Contract, the lines and sub-lines," and for cancellation, the amount on both header and lines is adjusted to reflect the cancel action. The source for a cancellation (MANUAL versus IBTRANSFER) is passed in as a parameter.
The package depends on the FND_API framework for message handling and return status, using standard constants such as G_FALSE, G_TRUE, and G_API_VERSION. It also declares a Resource Busy exception (ORA-00054) to handle row-lock contention, an important consideration when concurrent programs and forms attempt status changes on the same contract.
Key Procedures and Functions
The metadata documents sixteen procedures and functions:
- UPDATE_HEADER_STATUS — the core routine that changes the status of a contract header and cascades the status to lines and sub-lines.
- UPDATE_LINE_STATUS — applies status changes at the line level independently of the header.
- VALIDATE_STATUS — verifies that a requested status transition is legitimate before it is applied.
- CHECK_ALLOWED_STATUS — evaluates whether a given status is permitted for the contract or operation context.
- UPDATE_CONTRACT_TAX_AMOUNT and UPDATE_SUBSCRIPTION_TAX_AMOUNT — recalculate and persist tax amounts for contracts and subscriptions respectively, typically when status changes affect billable value.
- RENEWED_YN — indicates whether a contract has already been renewed.
- GET_SOURCE_LIST and GET_TARGET_LIST — return the permissible source or target status values for use in UI lists of values.
- TARGET_CANCELLED and TARGET_EXISTS — determine whether a target status is cancelled or whether a target record exists.
- IS_ENTERED and IS_NOT_ENTERED_CANCELLED — test whether a contract is in an entered state or an entered-but-cancelled state.
- POPULATE_TABLE — populates a PL/SQL table (via PLITBLM) with status-related data.
- GET_TAX_FOR_SUBS_LINE — retrieves the tax applicable to a subscription line.
Tables Accessed
The package reads and writes the OKS and OKC contract tables through APPS synonyms. OKS_K_HEADERS_B and OKS_K_LINES_B are the primary Service Contracts header and line tables updated during a status change. OKC_K_HEADERS_ALL_B and OKC_K_HEADERS_B hold the corresponding Core Contracts header data, while OKC_K_LINES_B stores contract lines. OKC_K_VERS_NUMBERS tracks versioning of contracts. OKC_STATUSES_B supplies the valid status definitions. OKC_CLASS_OPERATIONS, OKC_OPERATION_INSTANCES, and OKC_OPERATION_LINES support the operation/action model that governs permitted transitions. DUAL is used for single-row lookups, and PLITBLM supports PL/SQL table population.
Usage Notes
OKS_CHANGE_STATUS_PVT is referenced by six other packages and is not called directly by end users. It is normally invoked from the Service Contracts forms when a user activates, terminates, or cancels an agreement, and from concurrent programs performing bulk status maintenance. Custom code should avoid calling this private package directly; instead, customizations should use the supported public OKS API layer that in turn delegates to OKS_CHANGE_STATUS_PVT. The presence of the Resource Busy exception means callers should be prepared for lock contention on the header row during concurrent status changes, and should handle the standard FND_API return status and message stack.
-
APPS.OKS_COPY_CONTRACT_PVT dependencies on OKS_K_HEADERS_B
12.1.1
-
APPS.OKS_COPY_CONTRACT_PVT dependencies on OKS_K_HEADERS_B
12.2.2
-
PACKAGE BODY: APPS.OKS_CHANGE_STATUS_PVT
12.1.1
-
PACKAGE BODY: APPS.OKS_CHANGE_STATUS_PVT
12.2.2
-
PACKAGE BODY: APPS.OKS_COPY_CONTRACT_PVT
12.2.2
-
PACKAGE BODY: APPS.OKS_COPY_CONTRACT_PVT
12.1.1