Beruflich Dokumente
Kultur Dokumente
This article outlines the application setups required and the code snippet called, that wed
utilized to implement automatic freight charge application based on shipped weight, in our
work with different clients.
Applications: Advanced Pricing/Order Management/Shipping
Minimum version: 11.5.8
Business Scenario:
In some industries, notably Distribution and Logistics, wed witnessed that the ability to
automatically assign freight charges in Order Management based on shipped weight, to be a
common requirement. And wed used the standard setups, in conjunction with a custom
function (sourced attribute) in Advanced Pricing, to address this need.
Application Setups:
At a high level, wed set up the application in the following way:
1. Create a new pricing context and pricing attribute.
2. Use Attribute Mapping to custom source this pricing attribute to return the shipped
weight.
3. Define a pricing formula with the pricing attribute as a component
4. Define a Freight and Special Charges modifier that uses the formula. Add qualifiers
to ensure that the modifier gets applied only after shipment.
In our experience, wed defined the pricing formula in one of two ways with the pricing
attribute and factors (when the freight charge is based on a range, say $45 for 50-100 lbs
shipped) or a numeric constant multiplied by the pricing attribute (for instance, say the freight
charge is $0.60 per pound shipped).Having the unit weight of the items set in the item master
is a prerequisite. The details on custom sourcing for step 2 are given below.
Value
Application Name
Request Type
User source type
User Value String
Advanced Pricing
ONT
PL/SQL API
Freight_formula_pkg.Get_line_shipped_weight
(oe_order_pub.g_line.line_id)
Code Snippet:
CREATE OR REPLACE PACKAGE freight_formula_pkg
IS
FUNCTION get_line_shipped_weight (
p_line_id IN NUMBER
)
RETURN NUMBER;
END;
BEGIN
SELECT SUM (NVL (wdd.gross_weight, 0))
INTO l_unit_weight
FROM wsh_delivery_details wdd
WHERE wdd.source_line_id = p_line_id;
RETURN (l_unit_weight);
EXCEPTION
WHEN OTHERS THEN
RETURN (0);
END get_line_shipped_weight;
END freight_formula_pkg;
Disclaimer: The information in this document is the opinion of the author, not of Oracle Corporation. Any
content, materials, information or software downloaded or otherwise obtained through the use of the site is
done at your own discretion and risk. Oracle shall have no responsibility for any damage to your computer
system or loss of data that results form the download of any content, materials, information or software.