Search Results validate_attribute_code




Overview

APPS.PV_ATTRIBUTE_CODE_PVT is the private application programming interface (API) package body that encapsulates the business logic for maintaining attribute code definitions within the Oracle E-Business Suite Product Lifecycle Management / Partner Management (PV) schema. Attribute codes in the PV module act as the metadata backbone that classifies the configurable characteristics associated with partner programs, entitlement records, and entity selection criteria. The package resides entirely inside the PL/SQL Private API layer and is therefore never intended for direct consumption by end users or user interfaces; instead, it supplies the validation, locking, and persistence mechanics that a corresponding public wrapper or higher-level business process invokes.

The header identifies the underlying source file as pvxvatcb.pls (version 120.1, last shipped 2005/06/30), confirming that this body has been part of the PV codebase across the EBS 12.1.1 and 12.2.2 releases and has remained stable through the 12.2 online-patching transition. The package follows the standard EBS API programming conventions: a package-level constant G_PKG_NAME is bound to PV_ATTRIBUTE_CODE_PVT, global session context is captured into G_USER_ID and G_LOGIN_ID via FND_GLOBAL, and the public procedures honour the FND_API contract for message lists, commit control, return status, and savepoints.

Key Procedures and Functions

The documented API surface comprises seven entry points:

  • CREATE_ATTRIBUTE_CODE — Inserts a new attribute code record. The visible source shows the standard FND_API signature (p_api_version_number, p_init_msg_list, p_commit, p_validation_level, x_return_status, x_msg_count, x_msg_data) plus the record-based parameter p_attribute_code_rec and the out-bound primary key x_attr_code_id. The body opens a savepoint named CREATE_Attribute_Code_PVT, calls FND_API.Compatible_API_Call for version compatibility, and obtains a surrogate key from the sequence PV_ATTRIBUTE_CODES_S.NEXTVAL, guarding against collisions with the c_id_exists cursor.
  • UPDATE_ATTRIBUTE_CODE — Applies changes to an existing attribute code, using optimistic locking semantics consistent with the row's object version.
  • DELETE_ATTRIBUTE_CODE — Removes an attribute code definition, subject to validation that no dependent records remain.
  • LOCK_ATTRIBUTE_CODE — Acquires a row-level lock so that a subsequent update in the same transaction cannot be overwritten concurrently.
  • VALIDATE_ATTRIBUTE_CODE — The procedure most closely associated with the search term validate_attribute_code. It performs non-destructive validation of attribute code data, driving the full validation level used by the create and update paths.
  • CHECK_ATTR_CODE_ITEMS — Verifies the dependent items / values that belong to an attribute code, returning a status that callers use before permitting a delete or update.
  • VALIDATE_ATTR_CODE_REC — Validates the individual attributes of an attribute_code_rec_type record, providing field-level checks that feed the higher-level validation procedure.

Tables Accessed

The package reads and writes through APPS synonyms for the PV entity model. The base table PV_ATTRIBUTE_CODES_B stores the attribute code rows (with ATTR_CODE_ID as primary key), while PV_ATTRIBUTE_CODES_S is the sequence that supplies new identifiers. Dependent data is held in PV_ATTRIBUTE_USAGES, PV_ENTY_ATTR_VALUES, PV_ENTY_SELECT_CRITERIA, PV_SELECTED_ATTR_VALUES, PV_PARTNER_PROGRAM_TYPE_B and PV_PROGRAM_PARTNER_TYPES; these are consulted by the validation and check procedures to confirm that an attribute code is not still referenced before it is allowed to change or be removed. DUAL is used only for sequence retrieval and does not represent business data.

Usage Notes

Because this is a private API (classification PVT), it is not exposed for customer extension. It is typically invoked from PV module forms, from the public API layer, or from concurrent programs that seed and maintain partner program and entitlement attribute configuration. Custom code should never call PV_ATTRIBUTE_CODE_PVT directly; the supported integration path is through the corresponding public package. The package is referenced by two other packages inside the PV schema, and its validation entry points are designed to run only within an existing transaction where the caller has already established the FND_API message stack and, where appropriate, a savepoint.