Results for “g_unable_to_reserve_rec”
50+ results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
OKC_API is the foundational server-side PL/SQL package for Oracle Contracts (OKC) in Oracle E-Business Suite 12.1.1 and 12.2.2. It provides the common runtime infrastructure shared by the Contracts family of APIs: standardized global constants, message and error handling structures, activity (transaction) boundaries, and contract type resolution utilities. Rather than implementing a single business transaction, OKC_API supplies the plumbing that other Contracts APIs — and the Contracts forms themselves — use to execute consistently within the Oracle Application Object Library framework.
The package is of particular interest when diagnosing the Oracle Forms error FORM_COULD_NOT_RESERVE_RECORD. The formal global constant G_FORM_UNABLE_TO_RESERVE_REC is assigned the literal value FORM_COULD_NOT_RESERVE_RECORD, and the alias G_UNABLE_TO_RESERVE_REC carries the same value. This constant is the message token raised when a form fails to lock (reserve) a Contracts record for update, typically because another user session holds the row lock, the row has been deleted, or a lost-update conflict was detected.
Key Procedures and Functions
The ETRM metadata documents eleven program units within OKC_API. Their purposes are as follows.
- INIT_MSG_LIST — Initializes the global message list used by the package's error-collection structures, ensuring a clean message buffer before an activity begins.
- START_ACTIVITY — Opens an API activity, establishing the savepoint and transaction context for a logical unit of work.
- END_ACTIVITY — Closes the activity, committing or rolling back to the activity savepoint according to the outcome.
- HANDLE_EXCEPTIONS — Centralized exception handler that inspects SQLCODE and SQLERRM, records them into the error table structure, and standardizes error propagation to the calling form or API.
- SET_MESSAGE — Places a message (token, application name, and message data) onto the global message stack; this is the mechanism through which tokens such as FORM_COULD_NOT_RESERVE_RECORD are surfaced to the user.
- RESOLVE_MESSAGE — Translates a stored message token into user-facing text, resolving the message name against the FND message dictionary.
- RESOLVE_HDR_TOKEN — Resolves header-level tokens, typically for header records that were changed or deleted by a concurrent session (OKC_RECORD_CHANGED, OKC_RECORD_DELETED).
- RESOLVE_DEL_TOKEN — Resolves deletion tokens, supporting detection of records removed between query and update.
- GET_CONTRACT_TYPE — Returns the contract type classification for a given contract, supporting conditional logic in forms and APIs.
- GET_CONTRACT_TYPE_UI_FUNC — Returns the UI function associated with a contract type, used to drive form navigation and menu behavior.
- INIT_MSG_LIST — (as above) clears and prepares the FND message list prior to activity processing.
Tables Accessed
- OKC_BUS_DOC_TYPES_B — The business document type base table, read by GET_CONTRACT_TYPE and GET_CONTRACT_TYPE_UI_FUNC to resolve contract type and UI function metadata.
- OKC_REP_CONTRACTS_ALL — The repository of contracts, accessed when resolving contract-level tokens and contract type information.
- DBMS_TRANSACTION — The Oracle-supplied transaction control package, used to set savepoints and manage activity boundaries supporting START_ACTIVITY and END_ACTIVITY.
Usage Notes
OKC_API is invoked indirectly rather than as an end-user entry point. Oracle Contracts forms call it to open activities, register messages, and convert error tokens into visible text; when a form cannot lock a row for update, the form layer calls SET_MESSAGE with G_FORM_UNABLE_TO_RESERVE_REC (FORM_COULD_NOT_RESERVE_RECORD) and RESOLVE_MESSAGE renders the diagnostic for the operator. Custom extensions and the approximately 1,768 dependent packages that reference OKC_API should follow the same pattern: call INIT_MSG_LIST, wrap processing in START_ACTIVITY/END_ACTIVITY, and route all failures through HANDLE_EXCEPTIONS. Because the error constants are public and fixed, administrators and developers should treat FORM_COULD_NOT_RESERVE_RECORD as an expected concurrency signal from OKC_API rather than a defect, and investigate lock contention, stale form sessions, or uncommitted transactions before escalating.
-
PACKAGE: APPS.OKC_API 12.1.1
-
PACKAGE: APPS.PA_API 12.2.2
-
PACKAGE: APPS.OKC_API 12.2.2