Search Results get_attr_val_varchar2




Overview

The APPS.ONT_SHIP_FROM_ORG_DEF_UTIL package body is a utility (API classification: UTIL) that supports the Oracle Order Management ship-from organization definition framework in Oracle E-Business Suite 12.1.1 and 12.2.2. Its primary business function is to provide standardized attribute extraction and cache synchronization services for records sourced from the OE_AK_SHIP_FROM_ORGS_V view, which exposes ship-from organization data used during order fulfillment and shipping setup.

The package header comment block identifies it as the body of package ONT_SHIP_FROM_ORG_Def_Util, created on 13-AUG-13, and carries the source control revision OEXDFWKB.pls 115.0. It declares a global constant G_PKG_NAME and a global variable g_database_object_name set to 'OE_AK_SHIP_FROM_ORGS_V', confirming the underlying database object from which the utility reads.

The user's search term get_attr_val_varchar2 corresponds directly to one of the three documented routines exposed by this package body.

Key Procedures and Functions

  • GET_ATTR_VAL_VARCHAR2 — Returns a VARCHAR2 representation of an attribute value for a supplied attribute code and a record typed after OE_AK_SHIP_FROM_ORGS_V%ROWTYPE. In the documented body, only the ORGANIZATION_ID attribute code is handled; the function checks the record's ORGANIZATION_ID against FND_API.G_MISS_NUM and returns the value, or NULL otherwise. All unrecognized attribute codes also return NULL.
  • GET_ATTR_VAL_DATE — Returns a DATE representation of the same attribute. For ORGANIZATION_ID it converts the stored value to a date using the format 'RRRR/MM/DD HH24:MI:SS' when the value is populated, and returns NULL otherwise, mirroring the guard logic of the varchar2 variant.
  • SYNC_SHIP_FROM_ORG_CACHE — Returns a NUMBER and synchronizes the package's internal cached record from OE_AK_SHIP_FROM_ORGS_V for a supplied organization identifier. A supporting procedure, CLEAR_SHIP_FROM_ORG_CACHE, resets the cached ORGANIZATION_ID to NULL.

The paired GET routines exist so that callers can extract the same underlying view attribute in either string or date form, depending on the data type required by the consuming application.

Tables Accessed

The documented source references the view OE_AK_SHIP_FROM_ORGS_V, accessed in the APPS schema through its synonym. This object is the single documented data source. The SYNC_SHIP_FROM_ORG_CACHE cursor selects all columns from this view filtered by ORGANIZATION_ID. The two attribute-value functions do not query the database directly; they operate on an already-fetched OE_AK_SHIP_FROM_ORGS_V%ROWTYPE record passed in by the caller, making them lightweight extractors rather than data-access routines. No additional tables are documented in the supplied metadata.

Usage Notes

This package is characteristic of the Oracle Application Framework attribute-value utility pattern, where a definition framework retrieves attribute values from a row of a view by attribute code. It is typically invoked from Oracle EBS forms or programmatic layers that drive ship-from organization setup, and it is referenced by two other packages according to the ETRM metadata, indicating reuse across the Order Management definition stack. Because the GET functions accept a full rowtype and return NULL for unrecognized codes, custom code should pass only the supported ORGANIZATION_ID attribute code unless the package is extended. Cache synchronization should be called before attribute extraction when freshly committed ship-from organization changes must be reflected, and the clear procedure used to invalidate the cache. As with any Oracle-supplied utility body, customization should be avoided; extension is best handled through supported APIs.