Search Results target_exists
Overview
OKS_CHANGE_STATUS_PVT is a private (PVT) PL/SQL package in the Oracle E-Business Suite Service Contracts (OKS) and Contracts (OKC) modules. It encapsulates the business logic that governs status transitions on contract and subscription records, providing centralized, validated control over lifecycle changes such as activation, cancellation, termination, and status updates. The package is declared with AUTHID CURRENT_USER, meaning its SQL executes under the privileges of the calling user rather than the package owner. Its private classification indicates it is an internal implementation layer consumed by public APIs and other service modules rather than being called directly by end users. The corresponding header was last revised in Release 12.0.0 under revision 120.2.12000000.1, and the package remains present and documented in both 12.1.1 and 12.2.2.
A significant behavior associated with this package relates to the RENEWED_YN function. This program unit evaluates whether a given contract or subscription line has been renewed, returning the renewal indicator that drives downstream status and eligibility logic. Because it is embedded in the status-change layer, renewal evaluation is tightly coupled to the transition rules enforced by this package.
Key Procedures and Functions
Sixteen documented program units comprise this package. The principal groups are described below.
- UPDATE_HEADER_STATUS — Overloaded to accept either a header record collection or an individual header identifier with a target status code. Applies the requested status change to a contract or subscription header, capturing cancellation reason, comments, cancellation source, cancellation date, and an optional validation switch.
- UPDATE_LINE_STATUS — Performs the equivalent status transition at the contract line level, accepting both line and header identifiers plus old and new status codes.
- VALIDATE_STATUS — Checks whether a proposed status transition is permissible before it is applied.
- CHECK_ALLOWED_STATUS — Returns the set of statuses that may legitimately succeed the current status, driven by class operation rules.
- UPDATE_CONTRACT_TAX_AMOUNT and UPDATE_SUBSCRIPTION_TAX_AMOUNT — Recalculate and persist tax amounts at contract and subscription levels when a status change affects financial treatment.
- RENEWED_YN — Evaluates and reports whether the record in question has been renewed, supplying the renewed indicator referenced in renewal-aware status processing.
- GET_SOURCE_LIST and GET_TARGET_LIST — Return the valid origin and destination statuses for transition evaluation.
- TARGET_CANCELLED, TARGET_EXISTS, IS_ENTERED, and IS_NOT_ENTERED_CANCELLED — Predicate-style helpers that test the state of source or target records to support transition decisions.
- POPULATE_TABLE — Builds the internal working collections used by the update routines.
Two package-level subtypes are declared: chrv_tbl_type and clev_tbl_type, both inherited from OKC_CONTRACT_PUB, along with a control record type drawn from OKC_UTIL and internal numeric and VARCHAR2(30) indexed tables.
Tables Accessed
The package operates across the Contracts and Service Contracts base tables through APPS synonyms. OKS_K_HEADERS_B and OKS_K_LINES_B store subscription headers and lines; OKC_K_HEADERS_B, OKC_K_HEADERS_ALL_B, and OKC_K_LINES_B hold the corresponding contracts data. OKC_CLASS_OPERATIONS and OKC_OPERATION_INSTANCES define the operation and status-transition rules used by VALIDATE_STATUS and CHECK_ALLOWED_STATUS. OKC_STATUSES_B supplies status code descriptions. OKC_K_VERS_NUMBERS supports version tracking. OKC_OPERATION_LINES links operations to affected lines. DUAL is used for single-row evaluation, and PLITBLM provides the PL/SQL index-by table type used internally.
Usage Notes
OKS_CHANGE_STATUS_PVT is invoked indirectly. It is referenced by six other packages, which call its update and validation routines as part of broader contract lifecycle processing. Typical entry points include the Service Contracts and Contracts forms when a user changes a contract or subscription status, concurrent programs that batch-activate or cancel contracts, and custom extensions that must honour the same validation rules. Because these routines are private and their signatures are not part of the supported public API surface, custom code should generally call the corresponding public APIs rather than invoking OKS_CHANGE_STATUS_PVT directly, to avoid breakage across upgrades. The RENEWED_YN function is particularly relevant when custom logic must determine renewal eligibility without duplicating the package's internal status logic.
-
PACKAGE: APPS.OKS_CHANGE_STATUS_PVT
12.2.2
-
PACKAGE: APPS.OKS_CHANGE_STATUS_PVT
12.1.1
-
PACKAGE BODY: APPS.OKS_CHANGE_STATUS_PVT
12.1.1
-
PACKAGE BODY: APPS.OKS_CHANGE_STATUS_PVT
12.2.2
-
APPS.OKS_CHANGE_STATUS_PVT dependencies on FND_MESSAGE
12.1.1
-
APPS.OKS_CHANGE_STATUS_PVT dependencies on FND_MESSAGE
12.2.2
-
APPS.OKS_CHANGE_STATUS_PVT dependencies on OKC_API
12.1.1
-
APPS.OKS_CHANGE_STATUS_PVT dependencies on OKC_API
12.2.2
-
APPS.OKS_CHANGE_STATUS_PVT dependencies on FND_API
12.1.1
-
APPS.OKS_CHANGE_STATUS_PVT dependencies on FND_API
12.2.2
-
APPS.OKS_CHANGE_STATUS_PVT dependencies on FND_MSG_PUB
12.1.1
-
APPS.OKS_CHANGE_STATUS_PVT dependencies on FND_MSG_PUB
12.2.2
-
APPS.PA_ALLOC_RUN SQL Statements
12.1.1
-
APPS.PA_ALLOC_RUN SQL Statements
12.2.2
-
PACKAGE BODY: APPS.PA_ALLOC_RUN
12.1.1
-
PACKAGE BODY: APPS.PA_ALLOC_RUN
12.2.2
-
APPS.PA_ALLOC_RUN dependencies on PA_ALLOC_RUN_TARGETS
12.1.1
-
APPS.PA_ALLOC_RUN dependencies on PA_ALLOC_RUN_TARGETS
12.2.2
-
APPS.PA_ALLOC_RUN dependencies on PA_DEBUG
12.2.2
-
APPS.PA_ALLOC_RUN dependencies on PA_DEBUG
12.1.1
-
APPS.PA_ALLOC_RUN dependencies on PA_ALLOC_RUN
12.1.1
-
APPS.PA_ALLOC_RUN dependencies on PA_ALLOC_RUN
12.2.2