Search Results g_app_name_oks




Overview

OKS_AUTH_INT_PUB is a public PL/SQL package in the APPS schema that provides authorization and integration services for Oracle Service Contracts (OKS) within Oracle E-Business Suite 12.1.1 and 12.2.2. The package name and its global constants indicate its role as an interface layer between Service Contracts processing and the shared Contract Core (OKC) application programming interfaces. Declared globals such as G_APP_NAME_OKS (value 'OKS') and G_APP_NAME_OKC (value 'OKC') identify the two applications whose authorization logic the package reconciles, and the naming convention g_app_name_oks reflects the standard OKS application identifier used throughout the Service Contracts schema for logging, message resolution, and diagnostic tracing.

The package is declared AUTHID CURRENT_USER, meaning privileges are evaluated against the invoking user rather than the package owner, which is significant because concurrent managers, forms sessions, and custom integrations may all call it under different security contexts. Standard OKC return-status and message constants (G_RET_STS_SUCCESS, G_RET_STS_ERROR, G_RET_STS_UNEXP_ERROR) are inherited from OKC_API, confirming that the package participates in the uniform OKC API messaging protocol.

Key Procedures and Functions

The ETRM documentation records two public program units:

  • OK_TO_COMMIT — A function that determines whether a pending transaction against a Service Contracts document may be committed. It accepts the API version, an initialization-message flag, a document identifier, and a document validation string, and returns a BOOLEAN result alongside the standard OKC output parameters for return status, message count, and message data. Its purpose is to prevent a commit when the document fails authorization or validation checks, allowing the caller to abort cleanly.
  • CHECK_FOR_ACTIVE_PROCESS — A function that inspects a contract (identified by contract number) for an in-progress process, such as an active workflow, concurrent request, or conflicting contract action. If an active process is detected, the caller is expected to defer or reject the operation, guarding against concurrent modification of the same contract record.

The package also declares the exception G_EXCEPTION_HALT_VALIDATION, used internally to signal that validation must stop. No parameter lists are reproduced here beyond those exposed in the documented source excerpt.

Tables Accessed

The documented table reference is OKC_K_HEADERS_ALL_B, the base table of the Contract Core header entity, accessed through an APPS synonym. Service Contracts headers are stored in OKS-specific header tables that link to this OKC header record, so a header-level lookup is sufficient to establish the contract's identity and status before authorization or commit decisions are made. All access is read-oriented in support of validation; the package itself does not perform the transactional DML, it gates it.

Usage Notes

OKS_AUTH_INT_PUB is invoked before commit operations in Service Contracts forms and in concurrent or custom programs that create, revise, or terminate contracts. Typical callers first run Check_For_Active_Process to confirm no competing process holds the contract, then call ok_to_commit to obtain authorization to persist changes. Because the package is classified PUB and is referenced by one other package, it should be treated as a supported extension point; custom code should call it with the documented API version and honor the returned message stack via FND_MSG_PUB rather than interpreting return codes directly. In 12.2.2 the OKS and OKC schemas remain compatible with the 12.1.1 signature, so integrations written for 12.1.1 generally continue to function. Diagnostic searches for g_app_name_oks frequently lead here because the constant appears in package-level logging output and error message context.