Search Results validate_constraint_dleg




Overview

The WSH_FTE_COMP_CONSTRAINT_PKG package is a Shipping Execution (WSH) component within Oracle E-Business Suite that enforces compatibility constraints across delivery, trip, and stop entities. Its primary business function is to validate that lines and containers being consolidated or modified do not violate the compatibility rules defined in the WSH_FTE_COMP_CONSTRAINTS setup. These constraints govern whether specific delivery details, delivery legs, intermediate ship-to locations, or shipping methods may be grouped together within the same delivery, trip, or stop.

The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling user. It maintains a global session identifier (g_session_id) and a validity cache (g_valid_const_cache) used to optimize repeated constraint lookups during a single processing run. The package also defines several PL/SQL collection types — failed_line_tab_type, line_group_tab_type, and cc_group_tab_type — that support the identification and grouping of lines that fail or pass compatibility checks, as well as grouping of constraints applicable to delivery legs.

Key Procedures and Functions

  • VALIDATE_CONSTRAINT_MAIN — The principal entry point for constraint validation. It serves as a wrapper that populates appropriate parameters for the different actions a caller may request. Based on the entity type ('D' for delivery, 'L' for line, 'T' for trip, 'S' for stop), it dispatches to the underlying validation routine, passing either the relevant attribute table (p_del_attr_tab, p_det_attr_tab, p_trip_attr_tab, or p_stop_attr_tab) or the input identifiers (p_in_ids). The target identifier (p_target_id) reflects the container, delivery, or trip being acted upon.
  • VALIDATE_CONSTRAINT_DLEG — Validates compatibility constraints specifically against delivery leg data. It evaluates the combination of intermediate ship-to location and ship method against the constraint setup, and is the routine to which the wrapper VALIDATE_CONSTRAINT_MAIN ultimately delegates when leg-level attributes must be checked. This is the object referenced by the search term validate_constraint_dleg.

Tables Accessed

  • WSH_DELIVERY_DETAILS — Source of line-level delivery detail records validated against constraints.
  • WSH_DELIVERY_LEGS — Provides delivery leg attributes (intermediate ship-to, ship method) evaluated during leg-level validation.
  • WSH_FTE_COMP_CONSTRAINTS — The configuration table holding the compatibility constraint definitions that the package enforces.
  • WSH_NEW_DELIVERIES — Header-level delivery context for the entities being validated.
  • WSH_TRIPS — Trip-level context used when validation is invoked for trip entities.
  • WSH_TRIP_STOPS — Stop-level data validated when the entity type is a stop.
  • PLITBLM — A standard Oracle EBS PL/SQL table synonym frequently used for temporary/global temporary table processing within validation logic.

Usage Notes

This package is invoked by consolidation and compatibility-checking logic within the Shipping Execution module. It is referenced by eleven other packages, indicating it is a shared validation utility called from delivery consolidation, trip building, and stop management flows rather than being executed directly by an end user. Typical invocation occurs through concurrent programs and forms that perform auto-packing, delivery consolidation, or trip assignment, where the calling program passes an entity type and identifier set. Because the wrapper abstracts the entity type, integrators and extension developers should call VALIDATE_CONSTRAINT_MAIN rather than VALIDATE_CONSTRAINT_DLEG directly, ensuring the correct attribute table is populated for the action being performed. The internal validity cache reduces redundant constraint lookups within a session, so callers should be aware that constraint changes made mid-session may not be immediately reflected.