Search Results insert_tqualitys




Overview

OKL_SETUPTQUALITYS_PUB is the public (PUB) API package body for the Oracle E-Business Suite Lease Management (OKL) module, which forms part of the Enterprise Territory and Resource Management (ETRM) family of applications. Its business purpose is to expose a supported, versioned entry point for maintaining setup data for lease quality classifications, backed by the OKL_PTL_QUALITYS_V view. The package follows the standard EBS PL/SQL API architecture in which a public layer (this _PUB package) wraps a private implementation layer (OKL_SETUPTQUALITYS_PVT) that performs the actual DML and validation. This separation shields calling code from internal schema changes, centralizes error handling through FND_API and FND_MESSAGE, and enforces consistent return-status and message-count conventions. The package is classified as an API in the ETRM metadata and is documented with three procedures: GET_REC, INSERT_TQUALITYS, and UPDATE_TQUALITYS. The header comment ($Header: OKLPSTQB.pls 115.6 2004/04/13) indicates the package has been stable since the early 11i era and continues to be shipped in 12.1.1 and 12.2.2. It is a wrapper-style API: it validates and normalizes parameters, delegates to the private package, interprets the private layer's return status, and translates unexpected errors into FND_API.G_RET_STS_UNEXP_ERROR with a message populated from FND_MESSAGE using the G_APP_NAME and G_UNEXPECTED_ERROR globals.

Key Procedures and Functions

  • GET_REC — Retrieves a single lease quality setup record. It accepts a record of type ptqv_rec_type as input, delegates the query to OKL_SETUPTQUALITYS_pvt.get_rec, and returns the fetched record along with a return status, an optional message, and a BOOLEAN flag indicating whether no data was found. If the private layer signals an unexpected error, the wrapper raises FND_API.G_EXC_UNEXPECTED_ERROR; the OTHERS handler sets the return status to G_RET_STS_UNEXP_ERROR and populates the message data.
  • INSERT_TQUALITYS — Creates a new lease quality setup record. This is the procedure users locate when searching for "insert_tqualitys". It accepts an API version, an initialization flag for the message list, a ptqv_rec_type input record, and returns the standard x_return_status, x_msg_count, and x_msg_data outputs together with the created record. It maintains a local API name constant ('insert_tqualitys') used for message and error context, and follows the EBS API calling convention rather than performing direct inserts itself.
  • UPDATE_TQUALITYS — Modifies an existing lease quality setup record, mirroring INSERT_TQUALITYS in its API signature style and delegating the update to the private implementation.

Tables Accessed

The documented metadata does not enumerate physical tables accessed through APPS synonyms; the package operates primarily against the OKL_PTL_QUALITYS_V view, which the header comment explicitly associates with the GET_REC procedure and with the insert_tqualitys wrapper (section heading "Public wrapper for OKL_PTL_QUALITYS_V"). By EBS convention, the underlying base table for this view stores lease quality setup rows that define quality classifications applied during lease origination and servicing. All reads and writes are performed by the private package OKL_SETUPTQUALITYS_PVT; the _PUB layer itself executes no direct SQL, which is why no table list appears in the metadata.

Usage Notes

The package is typically invoked from Lease Management setup forms, from concurrent programs that load or migrate quality setup data, and from custom or extension code that must create and maintain quality records through a supported interface rather than by direct table manipulation. Callers should supply a valid p_api_version, pass OKL_API.G_FALSE for p_init_msg_list unless they require message-list initialization, inspect x_return_status for FND_API.G_RET_STS_SUCCESS before consuming x_ptqv_rec, and use FND_MSG_PUB to retrieve messages when x_msg_count exceeds zero. Because the package is classified as PUBLIC, Oracle supports its use across 12.1.1 and 12.2.2; the private companion package should never be called directly. The ETRM metadata records that one other package references this API, confirming its role as a shared dependency within the OKL setup stack.