Search Results calculate_freight_costs
Overview
WSH_FC_INTERFACE_PKG is an Oracle E-Business Suite package owned by the APPS schema that serves as the interface and processing engine for freight cost calculations within the Oracle Shipping (WSH) module. Its primary responsibility is to bridge shipping execution data with freight cost records stored in WSH_FREIGHT_COSTS, applying rating logic and proration rules to derive the charges owed to carriers for moving goods. The package is classified as a non-public (OTHER) API and is invoked internally by Oracle Shipping's freight cost infrastructure rather than being a formally published integration point.
In both release 12.1.1 and 12.2.2 the package remains VALID, and its dependency footprint confirms its central role: it consumes order management data (OE_ORDER_HEADERS_ALL, OE_ORDER_LINES_ALL, OE_SHIP_CONFIRMATION_PUB, OE_WSH_BULK_GRP) and shipping execution data (WSH_DELIVERY_DETAILS, WSH_DELIVERY_LEGS, WSH_NEW_DELIVERIES, WSH_TRIP_STOPS) to build and persist freight cost lines. Because freight costs frequently need to be allocated back to the originating order lines, the package supports both line-level sourcing and proportional distribution of a total charge.
Key Procedures and Functions
The documented package exposes six procedures and functions: ROUND_COST_AMOUNT, SOURCE_LINE_LEVEL_COST, CALCULATE_FREIGHT_COSTS, PROCESS_FREIGHT_COSTS, PRORATE_FREIGHT_CHARGE, and GET_COST_FACTOR.
- CALCULATE_FREIGHT_COSTS — the core rating entry point. It evaluates the applicable freight cost type and derives the charge for a shipment, delivery, or delivery leg based on the configured freight cost type and associated rating rules.
- PROCESS_FREIGHT_COSTS — the orchestration routine that drives the end-to-end interface flow, gathering the relevant shipping records, invoking the calculation logic, and persisting the resulting rows into WSH_FREIGHT_COSTS.
- SOURCE_LINE_LEVEL_COST — determines the cost that originates at the individual order line level, ensuring that line-specific charges are attributed directly rather than being spread across the shipment.
- PRORATE_FREIGHT_CHARGE — distributes a total freight charge across multiple lines or deliveries on a proportional basis, typically weighted by quantity, weight, or value, so that each line carries its fair share of the overall cost.
- ROUND_COST_AMOUNT — applies the currency and precision rounding rules to a computed amount before it is written to the freight cost table.
- GET_COST_FACTOR — retrieves the multiplier or conversion factor used in rating, such as a currency conversion rate drawn from FND_CURRENCIES or an internal weighting factor applied during proration.
Tables Accessed
WSH_FREIGHT_COSTS is the primary target table, holding the calculated freight charges. WSH_FREIGHT_COST_TYPES supplies the rating configuration, and FND_CURRENCIES provides currency definitions for conversion and rounding. Order-side context comes from OE_ORDER_HEADERS_ALL and OE_ORDER_LINES_ALL. Shipping execution context comes from WSH_DELIVERY_DETAILS, WSH_DELIVERY_LEGS, WSH_NEW_DELIVERIES, and WSH_TRIP_STOPS. PLITBLM is the standard PL/SQL integer table type used for passing numeric arrays (for example, lists of line or delivery identifiers) between internal routines.
Usage Notes
WSH_FC_INTERFACE_PKG is not intended for direct customer invocation. It is called by Oracle Shipping components including WSH_SHIP_CONFIRM_ACTIONS (during ship confirmation), WSH_FREIGHT_COSTS_PVT, WSH_TPA_FREIGHT_COSTS_PKG (the Transportation Planning and Execution integration layer), and the WSH_DSNO_ALLOWANCE_CHARGES_V view. Ship confirmation through OE_SHIP_CONFIRMATION_PUB and OE_WSH_BULK_GRP ultimately triggers the freight cost creation path in which this package participates. Customizations that need to influence freight cost derivation should generally be implemented by extending the freight cost type setup or by wrapping the shipped Oracle logic, rather than by modifying WSH_FC_INTERFACE_PKG directly, because the package is a private Oracle implementation subject to change across patch levels. Any direct call from custom code must be treated as unsupported.
-
PACKAGE: APPS.WSH_FC_INTERFACE_PKG
12.1.1
-
PACKAGE: APPS.WSH_FC_INTERFACE_PKG
12.2.2
-
PACKAGE BODY: APPS.WSH_FC_INTERFACE_PKG
12.2.2
-
PACKAGE BODY: APPS.WSH_FC_INTERFACE_PKG
12.1.1
-
APPS.WSH_FC_INTERFACE_PKG dependencies on WSH_UTIL_CORE
12.2.2
-
APPS.WSH_FC_INTERFACE_PKG dependencies on WSH_UTIL_CORE
12.1.1
-
APPS.WSH_FC_INTERFACE_PKG dependencies on WSH_DEBUG_SV
12.1.1
-
APPS.WSH_FC_INTERFACE_PKG dependencies on WSH_DEBUG_SV
12.2.2