Search Results oke_change_status_pub




Overview

OKE_CHANGE_STATUS_PUB is the public (PUB-classified) PL/SQL API package in the Oracle E-Business Suite Contracts suite (OKE/OKC modules) responsible for changing the status of contract header records. The package body is owned by APPS and carries the revision identifier OKEPCSTB.pls 120.0.12020000.2, indicating it is a release 12.2 maintenance version. Its scope is deliberately narrow: it exposes a controlled, API-layer mechanism for transitioning an existing contract header from one status to another, rather than allowing direct DML against the underlying header tables.

The package follows standard EBS PL/SQL API conventions. It declares message constants sourced from FND_API and OKE_API, including G_FALSE, G_TRUE, G_REQUIRED_VALUE, G_INVALID_VALUE, G_UNEXPECTED_ERROR, and the token placeholders G_SQLERRM_TOKEN, G_SQLCODE_TOKEN, and G_COL_NAME_TOKEN. It defines g_api_version as 1 and g_api_type as '_PUB', signalling that this is a published, callable interface rather than an internal helper. A global exception E_Resource_Busy is registered against Oracle error -00054, enabling the package to detect and report row-lock contention when a contract header is concurrently modified.

Key Procedures and Functions

  • UPDATE_HEADER_STATUS — The principal documented procedure in this package. It accepts an API version, returns the standard EBS out-parameters x_return_status, x_msg_data, and x_msg_count, and takes an initialization-list flag and a status-table structure of type chr_sts_tbl_type. The procedure performs the header status transition, applying API-level validation and returning success, error, or unexpected-error status through the standard return parameters. A local variable l_api_name is set to 'Update_header_status' for message-stack identification.

The ETRM metadata for this object lists two documented procedures, with UPDATE_HEADER_STATUS being the substantive entry point. Because the package is classified as PUB, both documented procedures are considered part of the supported integration surface and should be treated as stable across patch levels.

Tables Accessed

  • OKC_K_HEADERS_B — The base contract header table. The status change operation updates the status column on the header row identified by the caller, making this the primary target of the procedure.
  • OKC_STATUSES_B — The status definition table. It is read to validate that the requested status code is a legitimate, active status and to retrieve related status metadata during the transition.
  • DUAL — Used for single-row evaluations such as validations, sequence or constant checks, and conditional logic within the API.
  • PLITBLM — The standard EBS message-table synonym used by the FND message stack to accumulate and expose error and warning messages returned through x_msg_data and x_msg_count.

Usage Notes

OKE_CHANGE_STATUS_PUB is invoked whenever a contract header must move to a new status without altering the header through direct SQL. Typical callers include the Contracts forms, concurrent programs that automate contract lifecycle transitions, and custom extensions that need to change header status as part of an approved business process. The ETRM metadata records that no other packages reference this package, so it is intended to be called directly by application or integration code rather than consumed as an internal dependency.

Because the package is a _PUB API, callers must honour the standard FND_API contract: pass FND_API.G_TRUE for the initialization-list parameter where a fresh message stack is required, and always inspect x_return_status before proceeding. The registration of E_Resource_Busy against error -00054 indicates that callers should be prepared to handle a resource-busy condition when the header is locked by a concurrent transaction, and to retry after the lock clears.