Search Results g_invalid_dates




Overview

OKL_SETUPTQUALITYS_PUB is the public (PUB-classified) PL/SQL API package within the Oracle Lease and Finance Management (OKL) module of Oracle E-Business Suite. It belongs to the OKL setup family of APIs and provides the externally callable interface for maintaining setup data related to quality/qualification attributes (the "TQUALITYS" entity, referenced through the ptqv_rec_type record and ptqv_tbl_type table structures delegated from the private package OKL_SETUPTQUALITYS_PVT). In Oracle EBS the PUB/PVT split is a deliberate design convention: the PUB package exposes a stable, supported API surface while the PVT package encapsulates the business logic and validation. This package allows external callers — forms, concurrent programs, and custom code — to retrieve, insert, and update quality setup records in a controlled fashion, with consistent error handling and messaging driven by the FND_MSG_PUB / OKC_API infrastructure.

A notable feature of the package is its extensive set of global constants, which encode the error and token identifiers used throughout its processing logic. The user's search term g_invalid_dates corresponds to line 13 of the specification, where G_INVALID_DATES CONSTANT VARCHAR2(200) := 'OKL_INVALID_DATES' is declared. This constant supplies the message name raised when a date validation fails during a setup quality insert or update — for example, when an effective start date and end date are supplied in an invalid relationship. Related constants such as G_START_DATE and G_DATES_MISMATCH confirm that date consistency is a first-order concern within this API.

Other declared globals include G_UNEXPECTED_ERROR, G_SQLERRM_TOKEN, G_SQLCODE_TOKEN, G_PAST_RECORDS, G_PARENT_TABLE_TOKEN and G_CHILD_TABLE_TOKEN (the latter two inherited from OKL_API). The package also declares the exception G_EXCEPTION_HALT_PROCESSING, used to abort processing when a fatal validation condition is encountered. It is compiled AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking schema rather than the definer, and its header carries the revision marker $Header: OKLPSTQS.pls 115.2 2002/02/06.

Key Procedures and Functions

  • GET_REC — Retrieves a single setup quality record into the ptqv_rec_type record structure. It populates the output record and returns status information via x_return_status, x_msg_data, and x_no_data_found (which indicates whether the requested row existed).
  • INSERT_TQUALITYS — Creates a new setup quality record. It accepts the standard EBS API parameters p_api_version and p_init_msg_list, returns status and message information (x_return_status, x_msg_count, x_msg_data), takes the input record p_ptqv_rec, and returns the persisted record in x_ptqv_rec.
  • UPDATE_TQUALITYS — Modifies an existing setup quality record, following the same standard API signature pattern as the insert procedure, including version, message-list, status, and record parameters.

All three procedures conform to the Oracle Applications API standard (version checking, message initialization, and the return-status contract), which is why the PUB package is the sanctioned entry point rather than the PVT implementation.

Tables Accessed

The ETRM metadata does not enumerate specific base tables for this package; access is performed indirectly through APPS synonyms and through the record/table types defined in OKL_SETUPTQUALITYS_PVT. In practice the API operates on the OKL setup quality tables that underlie the TQUALITYS entity, with the get, insert, and update operations reading and writing rows in those tables on behalf of the caller. The parent and child table tokens (G_PARENT_TABLE_TOKEN, G_CHILD_TABLE_TOKEN) suggest that the record belongs to a parent/child table hierarchy typical of OKL setup data.

Usage Notes

OKL_SETUPTQUALITYS_PUB is invoked from the Oracle Lease and Finance Management setup forms, from concurrent programs, and from custom extensions that need to maintain setup quality data without directly touching the underlying tables. Because it is a PUB API, callers should always supply a valid p_api_version value, respect the p_init_msg_list convention, check x_return_status after every call, and drain the message stack when x_msg_count is greater than one. The G_INVALID_DATES constant is the message identifier applications should anticipate when date validation fails, and G_EXCEPTION_HALT_PROCESSING signals that processing must be abandoned rather than continued. The package is referenced by at least one other package, and its record/table types are shared with the private package, so callers should treat those structures as part of the published contract.