Search Results tp_attribute




Overview

WSH_FLEXFIELD_UTILS is an Oracle EBS Shipping (WSH) utility package that centralizes descriptive flexfield (DFF) handling for the delivery and trip data model. Its business purpose is to allow Shipping forms and APIs to read, default, validate, and persist the attribute columns (the user-defined "attribute" segments, collectively known as the DFF attribute set) attached to core WSH entities such as delivery details, deliveries, and trips. The package is a private service layer rather than an end-user-facing API; it encapsulates the flexfield metadata retrieval logic that would otherwise be duplicated throughout Shipping code.

The body carries the source header $Header: WSHFFUTB.pls 120.1.12000000.3 2007/03/30, indicating a long-lived component carried forward from 11i into the 12.1.1 and 12.2.2 code lines. The GET_FLEXFIELD procedure is explicitly documented in the source comments as having been copied from AFFFDDUB.pls and then modified to add the context_required_flag to the flexfield information record (dflex_dr), which is significant because it allows Shipping code to determine whether the DFF context segment is mandatory before attempting a write.

Key Procedures and Functions

  • CACHE_DFF_SEGMENTS — Populates the package-level cache of segment definitions and default attribute values. This is the priming routine that subsequent read/validate/default calls rely upon, avoiding repeated dictionary queries within a session.
  • GET_DFF_DEFAULTS — Returns the default values configured for a flexfield's attribute segments, so a form or API can pre-populate the DFF columns when a new delivery, detail, or trip record is created.
  • WRITE_DFF_ATTRIBUTES — Persists the supplied attribute segment values into the target table's DFF columns, applying the required validation state already determined for the record.
  • READ_TABLE_ATTRIBUTES — Reads the current DFF attribute values from a given table and returns them for display or for use by calling code, including the context and segment values.
  • VALIDATE_DFF — Enforces the flexfield rules for a record: whether the context segment is required, whether individual segments are required, and whether the supplied values conform to those requirements.
  • GET_FLEXFIELD — Retrieves the flexfield definition itself, returning both the standard fnd_dflex.dflex_r structure and the extended dflex_dr information record, which includes the context_required_flag modification noted in the source comments.

The body also declares several private PL/SQL record and index-by-table types (Attribute_Rec, DFF_Check_Req_Rec, Context_Check_Req_Rec) and global cache variables such as g_def_attribute_values, g_req_attribute_values, and g_check_req that support this caching and validation model. Notably, no procedure named TP_ATTRIBUTE exists in the documented interface; a search on "tp_attribute" most likely reflects the internal table/attribute naming used by WRITE_DFF_ATTRIBUTES and READ_TABLE_ATTRIBUTES, which operate generically against a table name and attribute list.

Tables Accessed

  • FND_APPLICATION — Resolves the application short name used to identify the correct descriptive flexfield definition.
  • WSH_DELIVERY_DETAILS — Source and target of DFF attribute values for delivery line records.
  • WSH_NEW_DELIVERIES — Source and target of DFF attribute values at the delivery header level.
  • WSH_TRIPS — Source and target of trip-level DFF attribute values.
  • PLITBLM — The generic PL/SQL table storage used by the flexfield validation routines.

Usage Notes

WSH_FLEXFIELD_UTILS is referenced by six other packages in the Shipping application and is therefore an internal dependency rather than a public API. It is typically invoked from Shipping forms and concurrent programs that create or maintain deliveries and trips, whenever DFF context and segment values must be defaulted, validated, or written. Because it is classified as OTHER in ETRM, it carries no supported external API contract; customizations should call the documented public Shipping APIs instead of this utility directly.