Search Results is_valid_ag




Overview

PO_UDA_DEFAULTING_PKG is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that implements User Defined Attribute (UDA) defaulting and validation logic for the Oracle Purchasing module. In EBS 12.1.1 and 12.2.2, UDAs are configurable, attribute-group-based data points attached to purchasing documents such as requisitions and purchase orders. The package resolves which attribute groups apply to a given document, constructs the usage objects that describe those attribute groups, defaults non-rendered attributes, and validates user submissions against the defined attribute group templates.

The package is declared with AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the invoking session rather than as DEFINER rights. This is significant because the package is designed to be called from multiple entry points — including Oracle Forms-based purchasing pages, the EGO (Enterprise Generic Objects) attribute framework, and custom extensions — where the caller's security context must govern data access.

Key Procedures and Functions

  • IS_VALID_AG_LIST — Evaluates whether the supplied primary key values, template identifier, and a list of attribute group identifiers together form a valid attribute group configuration.
  • IS_VALID_AG — Performs the same validation for a single attribute group identifier rather than a list.
  • CONSTRUCT_USAGE_OBJECT_ARRAY — The package's central construction routine. Given up to five primary key values and a template identifier, it returns a PO_UDA_USAGE_OBJECT_ARRAY describing how the UDAs are to be used, along with standard return status, error code, message count, and message data OUT parameters. This is the specific routine users reference when searching for attribute-group usage metadata construction.
  • UDA_SUBMISSION_CHECK — Validates externally supplied attribute name/value pairs at submission time, accepting an optional address lookup type, and returns processed pairs plus status information.
  • PO_UDA_SUBMISSION_CHECK — Header-oriented variant of the submission check scoped to a purchase order header and draft identifier.
  • DEFAULTING_NON_RENDERERED_AGS — Populates default values for attribute groups that are not rendered in the current UI context.
  • DEFAULTING_ATTRIBUTE_GROUPS and DEFAULT_AGS_FROM_USAGE_OBJECT — Drive the defaulting of attribute group values, the latter sourced from a previously constructed usage object.
  • UDA_EXECUTE_ACTIONS and PO_UDA_EXECUTE_ACTIONS — Execute the configured EGO actions associated with UDA attribute groups.
  • CONSTRUCT_PK_OBJECT, SET_EXT_ATTR_NAME_VALUE_PAIR, GET_EXT_ATTR_NAME_VALUE_PAIR, and DEBUG — Supporting utilities for building key objects, managing external attribute name/value pairs, and diagnostic output.

Tables Accessed

The package reads and writes purchasing base and extension tables: PO_HEADERS_ALL and PO_HEADERS_ALL_EXT_B, PO_LINES_ALL and PO_LINES_ALL_EXT_B, PO_LINE_LOCATIONS_ALL and PO_LINE_LOCATIONS_ALL_EXT_B, plus the draft variants PO_LINES_DRAFT_ALL and PO_LINE_LOCATIONS_DRAFT_ALL. UDA configuration is held in PO_UDA_AG_TEMPLATES and PO_UDA_AG_TEMPLATE_USAGES. The EGO action framework tables EGO_ACTIONS_B and EGO_ACTION_DISPLAYS_B supply configurable actions, while EGO_FND_DSC_FLX_CTX_EXT and FND_DESCR_FLEX_COLUMN_USAGES provide descriptive flexfield context and column usage metadata. DBMS_SQL supports dynamic SQL construction.

Usage Notes

PO_UDA_DEFAULTING_PKG is invoked indirectly rather than by end users. Standard purchasing forms and the EGO attribute framework call it when a document is entered, changed, or submitted, so that applicable attribute groups are determined, non-rendered groups are defaulted, and submitted values are validated before persistence. The ETRM metadata records the package as referenced by ten other packages. Because of its AUTHID CURRENT_USER declaration and NOCOPY OUT parameters, it is also suited to custom code that needs to build UDA usage arrays or pre-validate attribute submissions for a given document template.