DBA Data[Home] [Help]

PACKAGE: APPS.BOM_CONFIG_VALIDATION_PUB

Source


1 PACKAGE BOM_Config_Validation_Pub AUTHID CURRENT_USER AS
2 /* $Header: BOMPCFGS.pls 120.1 2005/12/02 04:42:41 hgelli noship $ */
3 
4 /*------------------------------------------------------------------
5 These globals are used to indicate the caller if the configuration
6 is valid and complete.
7 ------------------------------------------------------------------*/
8 G_VALID_CONFIG       VARCHAR2(10) := 'TRUE';
9 G_COMPLETE_CONFIG    VARCHAR2(10) := 'TRUE';
10 
11 /*------------------------------------------------------------------
12 These datatypes are used by the caller to provide the API with
13 all options of a configuration that needs to be validated.
14 ------------------------------------------------------------------*/
15 TYPE BOM_VALIDATION_REC IS RECORD
16 ( component_code        VARCHAR2(2000) := null,
17   ordered_quantity      NUMBER         := null,
18   ordered_item          VARCHAR2(4000) := null,
19   bom_item_type         NUMBER         := null,
20   sort_order            NUMBER         := null
21 );
22 
23 TYPE VALIDATE_OPTIONS_TBL_TYPE IS TABLE OF BOM_VALIDATION_REC
24 INDEX BY BINARY_INTEGER;
25 
26 /*------------------------------------------------------------------
27 This API performs follwoing checks,
28 
29 1) if the ordered quantity of any option is not out side of
30    the Min - Max quantity settings in BOM.
31 2) if the ratio of ordered quantity of a class to model
32    and option to class is integer ratio i.e. exact multiple.
33 3) to see that a class does not exist w/o any options selected for it.
34 4) if a class that has mutually exclusive options, does not have
35    more than one options selected under it.
36 5) if at least one option is selected per mandatory class.
37 
38 -------------------------------------------------------------------*/
39 
40 Procedure Bom_Based_Config_Validation
41 ( p_top_model_line_id     IN      NUMBER
42  ,p_options_tbl           IN      VALIDATE_OPTIONS_TBL_TYPE
43  ,x_valid_config          OUT NOCOPY  VARCHAR2
44  ,x_complete_config       OUT NOCOPY  VARCHAR2
45  ,x_return_status         OUT NOCOPY  VARCHAR2
46  );
47 
48 END BOM_Config_Validation_Pub;