1 PACKAGE BODY gr_toxic_calculations AS
2 /* $Header: GRTXCALB.pls 120.1 2005/09/06 14:45:12 pbamb noship $ */
3
4 /*===========================================================================
5 -- FUNCTION:
6 -- calculate_toxic_value
7 --
8 -- DESCRIPTION:
9 -- This PL/SQL procedure is used to calculate a products toxicity value
10 -- based upon the toxicity values of its ingredients.
11 --
12 -- PARAMETERS:
13 -- p_item_code IN VARCHAR2 - Item code of product
14 -- p_rollup_type IN NUMBER - The type of toxic calculation
15 -- p_label_code IN VARCHAR2 - The toxicity calculation label code
16 -- x_ingred_value_tbl OUT GR_TOXIC_CALCULATIONS.t_ingredient_values
17 -- - Table of values used in calculation
18 -- x_error_message OUT VARCHAR2 - If there is an error, send back the approriate message
19 -- x_return_status OUT VARCHAR2 - 'S'uccess, 'E'rror, 'U'nexpected Error
20 --
21 -- SYNOPSIS:
22 -- l_prod_tox := calculate_toxic_value(l_item_code,l_rollup_type,l_label_code,l_table
23 -- l_err_message,l_return_status);
24 --
25 -- HISTORY
26 -- Melanie Grosser 18-Mar-2002 BUG 1323951 - Modified return statement
27 -- to round the return value to 9 decimal
28 -- places.
29 -- Melanie Grosser 11-Apr-2002 BUG 1323951 - Changed cursors to select
30 -- toxicity_reporting_level instead of
31 -- exposure_reporting_level
32 -- Melanie Grosser 23-Apr-2002 BUG 1323951 - Modified code to use
33 -- ingredients with a value greater than OR
34 -- equal to the disclosure value
35 --=========================================================================== */
36 FUNCTION calculate_toxic_value (p_item_code IN VARCHAR2,
37 p_rollup_type IN NUMBER,
38 p_label_code IN VARCHAR2,
39 x_ingred_value_tbl OUT NOCOPY GR_TOXIC_CALCULATIONS.t_ingredient_values,
40 x_error_message OUT NOCOPY VARCHAR2,
41 x_return_status OUT NOCOPY VARCHAR2
42 ) RETURN NUMBER IS
43 BEGIN
44
45 NULL;
46 x_return_status := FND_API.G_RET_STS_SUCCESS;
47 RETURN 0;
48
49 EXCEPTION
50
51 WHEN OTHERS THEN
52 x_return_status := FND_API.G_RET_STS_SUCCESS;
53 RETURN 0;
54
55
56 END calculate_toxic_value;
57
58
59
60 END gr_toxic_calculations;
61