DBA Data[Home] [Help]

PACKAGE: APPS.OE_PROCESS_OPTIONS_PVT

Source


1 PACKAGE OE_Process_Options_Pvt AS
2 /* $Header: OEXVOPTS.pls 120.2 2005/11/16 02:47:21 apani ship $ */
3 
4 /*----------------------------------------------------------------
5  1) UI and configuration validation wrapper will populate this
6     table and call process_config_options procedure.
7  2) The bom item type in this  record type is a manipulated one,
8     where a model under a model will have a bom_item_type of 2
9     instead of 1.
10  3) The operation
11     CREATE  => options created but not yet commited, mainly
12     for order import delayed request.
13     INSERT  => to be created options, in case of UI
14                and in case  OE_Config_Uti.Bom_Config_Validation
15                after the fill in classes, to be passed to
16                handle_create.
17     UPDATE  => updated, not used
18     DELETED => deleted, not used
19     NONE    => no specific operation
20 
21 Change Record:
22 additional flex columns for bug 2184255
23 ------------------------------------------------------------------*/
24 
25 TYPE SELECTED_OPTIONS_REC IS RECORD
26 (  line_id               NUMBER         := null
27   ,component_code        VARCHAR2(2000) := null
28   ,inventory_item_id     NUMBER         := null
29   ,component_sequence_id NUMBER         := null
30   ,sort_order            VARCHAR2(2000) := null  -- 4336446
31   ,order_quantity_uom    VARCHAR2(3)    := null
32   ,ordered_quantity      NUMBER         := null
33   ,old_ordered_quantity  NUMBER         := null
34   ,ordered_item          VARCHAR2(4000) := null
35   ,bom_item_type         NUMBER         := null
36   ,operation             VARCHAR2(30)   := null
37   ,change_reason         VARCHAR2(30)   := null
38   ,change_comments       VARCHAR2(2000) := null
39   ,configuration_id      NUMBER
40   ,attribute1            VARCHAR2(240)
41   ,attribute2            VARCHAR2(240)
42   ,attribute3            VARCHAR2(240)
43   ,attribute4            VARCHAR2(240)
44   ,attribute5            VARCHAR2(240)
45   ,attribute6            VARCHAR2(240)
46   ,attribute7            VARCHAR2(240)
47   ,attribute8            VARCHAR2(240)
48   ,attribute9            VARCHAR2(240)
49   ,attribute10           VARCHAR2(240)
50   ,attribute11           VARCHAR2(240)
51   ,attribute12           VARCHAR2(240)
52   ,attribute13           VARCHAR2(240)
53   ,attribute14           VARCHAR2(240)
54   ,attribute15           VARCHAR2(240)
55   ,attribute16           VARCHAR2(240)
56   ,attribute17           VARCHAR2(240)
57   ,attribute18           VARCHAR2(240)
58   ,attribute19           VARCHAR2(240)
59   ,attribute20           VARCHAR2(240)
60   ,context               VARCHAR2(240)
61   ,option_number         NUMBER
62   ,disabled_flag         VARCHAR2(1)    := 'N'
63 );
64 
65 TYPE SELECTED_OPTIONS_TBL_TYPE IS TABLE OF SELECTED_OPTIONS_REC
66 INDEX BY BINARY_INTEGER;
67 
68 /*-------------------------------------------------------------------
69 Procedure: Process_Config_Options
70 This Procedure is called when user presses OK on options window, in OM.
71 --------------------------------------------------------------------*/
72 
73 Procedure Process_Config_Options
74 ( p_options_tbl         IN  OE_Process_Options_Pvt.Selected_Options_Tbl_Type
75  ,p_header_id           IN  NUMBER
76  ,p_top_model_line_id   IN  NUMBER
77  ,p_ui_flag             IN  VARCHAR2 := 'Y'
78  ,p_caller              IN  VARCHAR2 := '' -- bug 4636208
79  ,x_valid_config        OUT NOCOPY /* file.sql.39 change */ VARCHAR2
80  ,x_complete_config     OUT NOCOPY /* file.sql.39 change */ VARCHAR2
81  ,x_change_flag         OUT NOCOPY /* file.sql.39 change */ VARCHAR2
82  ,x_msg_count           OUT NOCOPY /* file.sql.39 change */ NUMBER
83  ,x_msg_data            OUT NOCOPY /* file.sql.39 change */ VARCHAR2
84  ,x_return_status       OUT NOCOPY /* file.sql.39 change */ VARCHAR2
85 );
86 
87 /*-------------------------------------------------------------------
88 FUNCTION: Use_Configurator
89 This API takes into consideration product configurator installation
90 and profile option OM: Use Configurator setting.
91 Will be used to decide wheter to use configurator or options window.
92 --------------------------------------------------------------------*/
93 
94 FUNCTION Use_Configurator
95 RETURN BOOLEAN;
96 
97 /*-------------------------------------------------------------------
98 PROCEDURE: Get_Options_From_DB
99 --------------------------------------------------------------------*/
100 
101 PROCEDURE Get_Options_From_DB
102 ( p_top_model_line_id IN  NUMBER
103  ,p_get_model_line    IN  BOOLEAN := FALSE
104  ,p_caller            IN  VARCHAR2:= ''
105  ,p_query_criteria    IN  NUMBER  := 1
106  ,x_disabled_options  OUT NOCOPY VARCHAR2
107  ,x_options_tbl       OUT NOCOPY
108   OE_Process_Options_Pvt.SELECTED_OPTIONS_TBL_TYPE);
109 
110 
111 /*-------------------------------------------------------------------
112 PROCEDURE: Find_Matching_Comp_Index
113 --------------------------------------------------------------------*/
114 
115 FUNCTION Find_Matching_Comp_Index
116 ( p_options_tbl  IN OE_Process_Options_Pvt.Selected_Options_Tbl_Type
117  ,p_comp_code    IN VARCHAR2)
118 RETURN NUMBER;
119 
120 
121 /*-------------------------------------------------------------------
122 PROCEDURE: Prepare_Cascade_Tables
123 used to prepare i/p tables for cascade_update_deletes API.
124 handles diabled options also.
125 --------------------------------------------------------------------*/
126 
127 PROCEDURE Prepare_Cascade_Tables
128 ( p_options_tbl           IN OUT NOCOPY
129                           OE_Process_Options_Pvt.Selected_Options_Tbl_Type
130  ,p_top_model_line_id     IN NUMBER
131  ,p_x_updated_options_tbl IN OUT NOCOPY OE_Order_PUB.request_tbl_type
132  ,p_x_deleted_options_tbl IN OUT NOCOPY OE_Order_PUB.request_tbl_type);
133 
134 /*-------------------------------------------------------------------
135 helper functions
136 --------------------------------------------------------------------*/
137 
138 PROCEDURE Handle_Ret_Status(p_return_Status   VARCHAR2);
139 
140 PROCEDURE Print_Time(p_msg   IN  VARCHAR2);
141 
142 
143 END OE_Process_Options_Pvt;