1 PACKAGE WMS_CATCH_WEIGHT_GRP AUTHID CURRENT_USER as
2 /* $Header: WMSGCWTS.pls 115.4 2004/04/09 00:04:34 jsheu noship $ */
3
4 -- Constants for MTL_SYSTEM_ITEMS_B.ONT_PRICING_QTY_SOURCE
5 -- Possible values are P/S (primary/secondary)
6 G_PRICE_PRIMARY CONSTANT VARCHAR(30) := WMS_CATCH_WEIGHT_PVT.G_PRICE_PRIMARY;
7 G_PRICE_SECONDARY CONSTANT VARCHAR(30) := WMS_CATCH_WEIGHT_PVT.G_PRICE_SECONDARY;
8
9 -- Start of comments
10 -- API name: Get_Default_Secondary_Quantity
11 -- Type : Group
12 -- Function: For the given item, org, quantity and uom passed by user for it will
13 -- return the ONT_PRICING_QTY_SOURCE, from MTL_SYSTEM_ITEMS and it will
14 -- also return secondary_uom_code and calculate the secondary quantity if
15 -- the item is set up to be priced on secondary. Unlike the private API this
16 -- API will calculate secondary quantity for secondary priced items regardless
17 -- to whether the the secondary quantity is 'defaultable' or not.
18 -- Parameters:
19 -- IN: p_organization_id IN NUMBER Required
20 -- Item organization id. Part of the unique key
21 -- that uniquely identifies an item record.
22 -- p_inventory_item_id IN NUMBER Required
23 -- Item ID of item which secondary quantity should be calculated for.
24 -- p_quantity IN NUMBER Required
25 -- Quantity which secondary quantity should be calculated from
26 -- p_uom_code IN NUMBER Optional
27 -- The UOM in which secondary quantity should be calculated from
28 -- If no UOM is passes, API will use the primary UOM
29 -- p_secondary_uom_code IN VARCHAR2 Optional
30 -- value to be used to calcuate default secondary quantity. If left null
31 -- will use secondary_uom_code defined in MTL_SYSTEM_ITEMS.
32 -- OUT:
33 -- return
34 -- returns table value in MTL_SYSTEM_ITEMS.ONT_PRICING_QTY_SOURCE
35 -- Possible values are G_PRICE_PRIMARY = primary G_PRICE_SECONDARY = secondary
36 -- x_secondary_quantity OUT NOCOPY NUMBER
37 -- If item is catch weight enabled and can be defaulted, returns
38 -- the default secondary quantity based on the conversion of p_quantity
39 -- into the secondary uom. Returns null otherwise.
40 -- x_secondary_uom_code OUT NOCOPY VARCHAR2
41 -- returns the default secondary uom if item is catch weight is enabled
42 -- null otherwise
43 -- Version : Current version 1.0
44 -- End of comments
45
46 FUNCTION Get_Default_Secondary_Quantity (
47 p_api_version IN NUMBER
48 , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
49 , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
50 , x_return_status OUT NOCOPY VARCHAR2
51 , x_msg_count OUT NOCOPY NUMBER
52 , x_msg_data OUT NOCOPY VARCHAR2
53 , p_organization_id IN NUMBER
54 , p_inventory_item_id IN NUMBER
55 , p_quantity IN NUMBER
56 , p_uom_code IN VARCHAR2
57 , x_secondary_quantity OUT NOCOPY NUMBER
58 , x_secondary_uom_code OUT NOCOPY VARCHAR2
59 ) RETURN VARCHAR2;
60
61 END WMS_CATCH_WEIGHT_GRP;