[Home] [Help]
PACKAGE BODY: APPS.CMP_CONTROLLER
Source
1 PACKAGE BODY CMP_Controller AS
2 /* $Header: ENGCCMPB.pls 120.0 2005/05/26 18:36:15 appldev noship $ */
3
4 -- Procedure Create_Exp_Unexp_Rec
5
6 PROCEDURE Create_Exp_Unexp_Rec
7 ( p_controller_CMP_rec IN Controller_CMP_Rec_Type
8 , x_CMP_tbl OUT NOCOPY BOM_BO_PUB.Rev_Component_Tbl_Type
9 , x_unexp_CMP_rec OUT NOCOPY BOM_BO_PUB.Rev_Comp_Unexposed_Rec_Type
10 )
11 IS
12 BEGIN
13 -- Create exposed record
14
15 x_CMP_tbl(1).eco_name := p_controller_CMP_rec.change_notice;
16 x_CMP_tbl(1).organization_code := p_controller_CMP_rec.organization_code;
17 x_CMP_tbl(1).revised_item_name := p_controller_CMP_rec.revised_item_name;
18 x_CMP_tbl(1).new_revised_item_revision := p_controller_CMP_rec.new_item_revision;
19 x_CMP_tbl(1).start_effective_date := p_controller_CMP_rec.scheduled_date;
20 x_CMP_tbl(1).disable_date := p_controller_CMP_rec.disable_date;
21 x_CMP_tbl(1).operation_sequence_number := p_controller_CMP_rec.operation_sequence_number;
22 x_CMP_tbl(1).old_operation_sequence_number := p_controller_CMP_rec.old_operation_sequence_number;
23 x_CMP_tbl(1).old_effectivity_date := p_controller_CMP_rec.old_effectivity_date;
24 x_CMP_tbl(1).old_from_end_item_unit_number := p_controller_CMP_rec.old_from_end_item_unit_number;
25 x_CMP_tbl(1).new_operation_sequence_number := p_controller_CMP_rec.new_operation_sequence_number;
26 x_CMP_tbl(1).Component_Item_Name := p_controller_CMP_rec.component_item_name;
27 x_CMP_tbl(1).Alternate_BOM_Code := p_controller_CMP_rec.alternate_bom_code;
28 x_CMP_tbl(1).acd_type := p_controller_CMP_rec.acd_type;
29 x_CMP_tbl(1).item_sequence_number := p_controller_CMP_rec.item_sequence_number;
30 x_CMP_tbl(1).Quantity_Per_Assembly := p_controller_CMP_rec.component_quantity;
31 x_CMP_tbl(1).Planning_Percent := p_controller_CMP_rec.planning_factor;
32 x_CMP_tbl(1).Projected_Yield := p_controller_CMP_rec.component_yield_factor;
33 x_CMP_tbl(1).Include_In_Cost_Rollup := p_controller_CMP_rec.Include_In_Cost_Rollup;
34 x_CMP_tbl(1).Wip_Supply_Type := p_controller_CMP_rec.wip_supply;
35 x_CMP_tbl(1).So_Basis := p_controller_CMP_rec.so_basis;
36 x_CMP_tbl(1).Basis_Type := p_controller_CMP_rec.Basis_Type;
37 x_CMP_tbl(1).Optional := p_controller_CMP_rec.Optional;
38 x_CMP_tbl(1).Mutually_Exclusive := p_controller_CMP_rec.Mutually_Exclusive;
39 x_CMP_tbl(1).Check_Atp := p_controller_CMP_rec.Check_Atp;
40 x_CMP_tbl(1).Shipping_Allowed := p_controller_CMP_rec.Shipping_Allowed;
41 x_CMP_tbl(1).Required_To_Ship := p_controller_CMP_rec.Required_To_Ship;
42 x_CMP_tbl(1).Required_For_Revenue := p_controller_CMP_rec.Required_For_Revenue;
43 x_CMP_tbl(1).Include_On_Ship_Docs := p_controller_CMP_rec.Include_On_Ship_Docs;
44 x_CMP_tbl(1).Quantity_Related := p_controller_CMP_rec.Quantity_Related;
45 x_CMP_tbl(1).Supply_Subinventory := p_controller_CMP_rec.Supply_Subinventory;
46 x_CMP_tbl(1).Location_Name := p_controller_CMP_rec.supply_locator;
47 x_CMP_tbl(1).Minimum_Allowed_Quantity := p_controller_CMP_rec.low_quantity;
48 x_CMP_tbl(1).Maximum_Allowed_Quantity := p_controller_CMP_rec.high_quantity;
49 x_CMP_tbl(1).comments := p_controller_CMP_rec.component_remarks;
50 x_CMP_tbl(1).cancel_comments := p_controller_CMP_rec.cancel_comments;
51 x_CMP_tbl(1).attribute_category := p_controller_CMP_rec.attribute_category;
52 x_CMP_tbl(1).attribute1 := p_controller_CMP_rec.attribute1;
53 x_CMP_tbl(1).attribute2 := p_controller_CMP_rec.attribute2;
54 x_CMP_tbl(1).attribute3 := p_controller_CMP_rec.attribute3;
55 x_CMP_tbl(1).attribute4 := p_controller_CMP_rec.attribute4;
56 x_CMP_tbl(1).attribute5 := p_controller_CMP_rec.attribute5;
57 x_CMP_tbl(1).attribute6 := p_controller_CMP_rec.attribute6;
58 x_CMP_tbl(1).attribute7 := p_controller_CMP_rec.attribute7;
59 x_CMP_tbl(1).attribute8 := p_controller_CMP_rec.attribute8;
60 x_CMP_tbl(1).attribute9 := p_controller_CMP_rec.attribute9;
61 x_CMP_tbl(1).attribute10 := p_controller_CMP_rec.attribute10;
62 x_CMP_tbl(1).attribute11 := p_controller_CMP_rec.attribute11;
63 x_CMP_tbl(1).attribute12 := p_controller_CMP_rec.attribute12;
64 x_CMP_tbl(1).attribute13 := p_controller_CMP_rec.attribute13;
65 x_CMP_tbl(1).attribute14 := p_controller_CMP_rec.attribute14;
66 x_CMP_tbl(1).attribute15 := p_controller_CMP_rec.attribute15;
67 x_CMP_tbl(1).from_end_item_unit_number := p_controller_CMP_rec.from_end_item_unit_number;
68 x_CMP_tbl(1).to_end_item_unit_number := p_controller_CMP_rec.to_end_item_unit_number;
69 x_CMP_tbl(1).enforce_int_requirements := p_controller_CMP_rec.enforce_int_requirements;
70
71 -- Create unexposed record
72
73 x_unexp_CMP_rec.organization_id := p_controller_CMP_rec.organization_id;
74 x_unexp_CMP_rec.component_item_id := p_controller_CMP_rec.component_item_id;
75 x_unexp_CMP_rec.old_component_sequence_id := p_controller_CMP_rec.old_component_sequence_id;
76 x_unexp_CMP_rec.component_sequence_id := p_controller_CMP_rec.component_sequence_id;
77 x_unexp_CMP_rec.pick_components := p_controller_CMP_rec.pick_components;
78 x_unexp_CMP_rec.bill_sequence_id := p_controller_CMP_rec.bill_sequence_id;
79 x_unexp_CMP_rec.supply_locator_id := p_controller_CMP_rec.supply_locator_id;
80 x_unexp_CMP_rec.bom_item_type := p_controller_CMP_rec.bom_item_type;
81 x_unexp_CMP_rec.revised_item_id := p_controller_CMP_rec.revised_item_id;
82 x_unexp_CMP_rec.revised_item_sequence_id := p_controller_CMP_rec.revised_item_sequence_id;
83 x_unexp_CMP_rec.include_on_bill_docs := p_controller_CMP_rec.include_on_bill_docs;
84 x_unexp_CMP_rec.enforce_int_requirements_code := p_controller_CMP_rec.enforce_int_requirements_code;
85
86 END Create_Exp_Unexp_Rec;
87
88 PROCEDURE Create_Controller_Rec
89 ( p_CMP_tbl IN BOM_BO_PUB.Rev_Component_Tbl_Type
90 , p_unexp_CMP_rec IN BOM_BO_PUB.Rev_Comp_Unexposed_Rec_Type
91 , x_controller_CMP_rec OUT NOCOPY Controller_CMP_Rec_Type
92 )
93 IS
94 BEGIN
95
96 -- Create exposed record
97
98 x_controller_CMP_rec.change_notice := p_CMP_tbl(1).eco_name;
99 x_controller_CMP_rec.organization_code := p_CMP_tbl(1).organization_code;
100 x_controller_CMP_rec.revised_item_name := p_CMP_tbl(1).revised_item_name;
101 x_controller_CMP_rec.new_item_revision := p_CMP_tbl(1).new_revised_item_revision;
102 x_controller_CMP_rec.scheduled_date := p_CMP_tbl(1).start_effective_date;
103 x_controller_CMP_rec.disable_date := p_CMP_tbl(1).disable_date;
104 x_controller_CMP_rec.operation_sequence_number := p_CMP_tbl(1).operation_sequence_number;
105 x_controller_CMP_rec.old_operation_sequence_number :=
106 p_CMP_tbl(1).old_operation_sequence_number;
107 x_controller_CMP_rec.old_effectivity_date := p_CMP_tbl(1).old_effectivity_date;
108 x_controller_CMP_rec.old_from_end_item_unit_number := p_CMP_tbl(1).old_from_end_item_unit_number;
109 x_controller_CMP_rec.new_operation_sequence_number := p_CMP_tbl(1).new_operation_sequence_number;
110 x_controller_CMP_rec.Component_Item_Name := p_CMP_tbl(1).component_item_name;
111 x_controller_CMP_rec.Alternate_BOM_Code := p_CMP_tbl(1).alternate_bom_code;
112 x_controller_CMP_rec.acd_type := p_CMP_tbl(1).acd_type;
113 x_controller_CMP_rec.item_sequence_number := p_CMP_tbl(1).item_sequence_number;
114 x_controller_CMP_rec.component_quantity := p_CMP_tbl(1).quantity_per_assembly;
115 x_controller_CMP_rec.Planning_factor := p_CMP_tbl(1).planning_percent;
116 x_controller_CMP_rec.component_yield_factor := p_CMP_tbl(1).projected_yield;
117 x_controller_CMP_rec.Include_In_Cost_Rollup := p_CMP_tbl(1).Include_In_Cost_Rollup;
118 x_controller_CMP_rec.Wip_Supply := p_CMP_tbl(1).wip_supply_type;
119 x_controller_CMP_rec.So_Basis := p_CMP_tbl(1).so_basis;
120 x_controller_CMP_rec.Optional := p_CMP_tbl(1).Optional;
121 x_controller_CMP_rec.Mutually_Exclusive := p_CMP_tbl(1).Mutually_Exclusive;
122 x_controller_CMP_rec.Check_Atp := p_CMP_tbl(1).Check_Atp;
123 x_controller_CMP_rec.Shipping_Allowed := p_CMP_tbl(1).Shipping_Allowed;
124 x_controller_CMP_rec.Required_To_Ship := p_CMP_tbl(1).Required_To_Ship;
125 x_controller_CMP_rec.Required_For_Revenue := p_CMP_tbl(1).Required_For_Revenue;
126 x_controller_CMP_rec.Include_On_Ship_Docs := p_CMP_tbl(1).Include_On_Ship_Docs;
127 x_controller_CMP_rec.Quantity_Related := p_CMP_tbl(1).Quantity_Related;
128 x_controller_CMP_rec.Supply_Subinventory := p_CMP_tbl(1).Supply_Subinventory;
129 x_controller_CMP_rec.supply_locator := p_CMP_tbl(1).location_name;
130 x_controller_CMP_rec.low_quantity := p_CMP_tbl(1).Minimum_Allowed_Quantity;
131 x_controller_CMP_rec.high_quantity := p_CMP_tbl(1).maximum_allowed_quantity;
132 x_controller_CMP_rec.component_remarks := p_CMP_tbl(1).comments;
133 x_controller_CMP_rec.cancel_comments := p_CMP_tbl(1).cancel_comments;
134 x_controller_CMP_rec.attribute_category := p_CMP_tbl(1).attribute_category;
135 x_controller_CMP_rec.attribute1 := p_CMP_tbl(1).attribute1;
136 x_controller_CMP_rec.attribute2 := p_CMP_tbl(1).attribute2;
137 x_controller_CMP_rec.attribute3 := p_CMP_tbl(1).attribute3;
138 x_controller_CMP_rec.attribute4 := p_CMP_tbl(1).attribute4;
139 x_controller_CMP_rec.attribute5 := p_CMP_tbl(1).attribute5;
140 x_controller_CMP_rec.attribute6 := p_CMP_tbl(1).attribute6;
141 x_controller_CMP_rec.attribute7 := p_CMP_tbl(1).attribute7;
142 x_controller_CMP_rec.attribute8 := p_CMP_tbl(1).attribute8;
143 x_controller_CMP_rec.attribute9 := p_CMP_tbl(1).attribute9;
144 x_controller_CMP_rec.attribute10 := p_CMP_tbl(1).attribute10;
145 x_controller_CMP_rec.attribute11 := p_CMP_tbl(1).attribute11;
146 x_controller_CMP_rec.attribute12 := p_CMP_tbl(1).attribute12;
147 x_controller_CMP_rec.attribute13 := p_CMP_tbl(1).attribute13;
148 x_controller_CMP_rec.attribute14 := p_CMP_tbl(1).attribute14;
149 x_controller_CMP_rec.attribute15 := p_CMP_tbl(1).attribute15;
150 x_controller_CMP_rec.basis_type := p_CMP_tbl(1).basis_type;
151 x_controller_CMP_rec.from_end_item_unit_number := p_CMP_tbl(1).from_end_item_unit_number;
152 x_controller_CMP_rec.to_end_item_unit_number := p_CMP_tbl(1).to_end_item_unit_number;
153 x_controller_CMP_rec.enforce_int_requirements := p_CMP_tbl(1).enforce_int_requirements;
154
155 x_controller_CMP_rec.organization_id := p_unexp_CMP_rec.organization_id;
156 x_controller_CMP_rec.component_item_id := p_unexp_CMP_rec.component_item_id;
157 x_controller_CMP_rec.old_component_sequence_id := p_unexp_CMP_rec.old_component_sequence_id;
158 x_controller_CMP_rec.component_sequence_id := p_unexp_CMP_rec.component_sequence_id;
159 x_controller_CMP_rec.pick_components := p_unexp_CMP_rec.pick_components;
160 x_controller_CMP_rec.bill_sequence_id := p_unexp_CMP_rec.bill_sequence_id;
161 x_controller_CMP_rec.supply_locator_id := p_unexp_CMP_rec.supply_locator_id;
162 x_controller_CMP_rec.bom_item_type := p_unexp_CMP_rec.bom_item_type;
163 x_controller_CMP_rec.revised_item_sequence_id := p_unexp_CMP_rec.revised_item_sequence_id;
164 x_controller_CMP_rec.include_on_bill_docs := p_unexp_CMP_rec.include_on_bill_docs;
165 x_controller_CMP_rec.enforce_int_requirements_code := p_unexp_CMP_rec.enforce_int_requirements_code;
166 END Create_Controller_Rec;
167
168 -- Procedure Initialize_Record
169
170 PROCEDURE Initialize_Record
171 ( p_CMP_controller_rec IN Controller_CMP_Rec_Type
172 , p_control_rec IN BOM_BO_PUB.Control_Rec_Type
173 , x_CMP_controller_rec IN OUT NOCOPY Controller_CMP_Rec_Type
174 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
175 , x_return_status OUT NOCOPY VARCHAR2
176 )
177 IS
178 l_control_rec BOM_BO_PUB.Control_Rec_Type := p_control_rec;
179 l_CMP_controller_rec Controller_CMP_Rec_Type := p_CMP_controller_rec;
180 l_ECO_rec ENG_ECO_PUB.ECO_Rec_Type;
181 l_unexp_eco_rec ENG_ECO_PUB.ECO_Unexposed_Rec_Type;
182 l_unexp_eco_rev_rec ENG_ECO_PUB.Eco_Rev_Unexposed_Rec_Type;
183 l_unexp_rev_item_rec ENG_ECO_PUB.Rev_Item_Unexposed_Rec_Type;
184 l_unexp_CMP_rec BOM_BO_PUB.Rev_Comp_Unexposed_Rec_Type;
185 l_unexp_SBC_rec BOM_BO_PUB.Sub_Comp_Unexposed_Rec_Type;
186 l_unexp_RFD_rec BOM_BO_PUB.Ref_Desg_Unexposed_Rec_Type;
187 l_unexp_rev_op_rec BOM_RTG_PUB.Rev_Op_Unexposed_Rec_Type; --add
188 l_unexp_rev_op_res_rec BOM_RTG_PUB.Rev_Op_Res_Unexposed_Rec_Type; --add
189 l_unexp_rev_sub_res_rec BOM_RTG_PUB.Rev_Sub_Res_Unexposed_Rec_Type; --add
190 l_eco_revision_tbl ENG_Eco_PUB.Eco_Revision_Tbl_Type;
191 l_revised_item_tbl ENG_Eco_PUB.Revised_Item_Tbl_Type;
192 l_rev_component_tbl BOM_BO_PUB.Rev_Component_Tbl_Type;
193 l_ref_designator_tbl BOM_BO_PUB.Ref_Designator_Tbl_Type;
194 l_sub_component_tbl BOM_BO_PUB.Sub_Component_Tbl_Type;
195 l_rev_operation_tbl BOM_RTG_PUB.Rev_Operation_Tbl_Type; --add
196 l_rev_op_resource_tbl BOM_RTG_PUB.Rev_Op_Resource_Tbl_Type; --add
197 l_rev_sub_resource_tbl BOM_RTG_PUB.Rev_Sub_Resource_Tbl_Type; --add
198 l_mesg_token_tbl Error_Handler.Mesg_Token_Tbl_Type;
199 l_return_status VARCHAR2(1);
200 l_msg_count NUMBER;
201 l_disable_revision NUMBER:=2; --BUG 3034642
202 BEGIN
203 Create_Exp_Unexp_Rec
204 ( p_controller_CMP_rec => l_CMP_controller_rec
205 , x_CMP_tbl => l_rev_component_tbl
206 , x_unexp_CMP_rec => l_unexp_CMP_rec
207 );
208
209 l_rev_component_tbl(1).transaction_type := 'CREATE';
210
211 ENG_FORM_ECO_PVT.Process_ECO
212 ( x_return_status => l_return_status
213 , x_msg_count => l_msg_count
214 , p_control_rec => l_control_rec
215 , p_rev_component_tbl => l_rev_component_tbl
216 , p_unexp_rev_comp_rec => l_unexp_CMP_rec
217 , x_eco_rec => l_eco_rec
218 , x_unexp_eco_rec => l_unexp_eco_rec
219 , x_unexp_eco_rev_rec => l_unexp_eco_rev_rec
220 , x_unexp_revised_item_rec => l_unexp_rev_item_rec
221 , x_unexp_rev_comp_rec => l_unexp_CMP_rec
222 , x_unexp_sub_comp_rec => l_unexp_SBC_rec
223 , x_unexp_ref_desg_rec => l_unexp_RFD_rec
224 , x_unexp_rev_op_rec => l_unexp_rev_op_rec --add
225 , x_unexp_rev_op_res_rec => l_unexp_rev_op_res_rec --add
226 , x_unexp_rev_sub_res_rec => l_unexp_rev_sub_res_rec --add
227 , x_eco_revision_tbl => l_eco_revision_tbl
228 , x_revised_item_tbl => l_revised_item_tbl
229 , x_rev_Component_tbl => l_rev_Component_tbl
230 , x_ref_designator_tbl => l_ref_designator_tbl
231 , x_sub_component_tbl => l_sub_component_tbl
232 , x_rev_operation_tbl => l_rev_operation_tbl --add
233 , x_rev_op_resource_tbl => l_rev_op_resource_tbl --add
234 , x_rev_sub_resource_tbl => l_rev_sub_resource_tbl --add
235 , x_disable_revision => l_disable_revision --BUG 3034642
236 );
237
238 Create_Controller_Rec
239 ( p_CMP_tbl => l_rev_component_tbl
240 , p_unexp_CMP_rec => l_unexp_CMP_rec
241 , x_controller_CMP_rec => l_CMP_controller_rec
242 );
243
244 x_CMP_controller_rec := l_CMP_controller_rec;
245 x_return_status := l_return_status;
246 END Initialize_Record;
247
248 -- Procedure Validate_And_Write
249
250 PROCEDURE Validate_And_Write
251 ( p_CMP_controller_rec IN Controller_CMP_Rec_Type
252 , p_control_rec IN BOM_BO_PUB.Control_Rec_Type
253 , p_record_status IN VARCHAR2
254 , x_CMP_controller_rec IN OUT NOCOPY Controller_CMP_Rec_Type
255 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
256 , x_return_status OUT NOCOPY VARCHAR2
257 )
258 IS
259 l_control_rec BOM_BO_PUB.Control_Rec_Type := p_control_rec;
260 l_CMP_controller_rec Controller_CMP_Rec_Type := p_CMP_controller_rec;
261 l_ECO_rec ENG_ECO_PUB.ECO_Rec_Type;
262 l_unexp_eco_rec ENG_ECO_PUB.ECO_Unexposed_Rec_Type;
263 l_unexp_eco_rev_rec ENG_ECO_PUB.Eco_Rev_Unexposed_Rec_Type;
264 l_unexp_rev_item_rec ENG_ECO_PUB.Rev_Item_Unexposed_Rec_Type;
265 l_unexp_CMP_rec BOM_BO_PUB.Rev_Comp_Unexposed_Rec_Type;
266 l_unexp_SBC_rec BOM_BO_PUB.Sub_Comp_Unexposed_Rec_Type;
267 l_unexp_RFD_rec BOM_BO_PUB.Ref_Desg_Unexposed_Rec_Type;
268 l_unexp_rev_op_rec BOM_RTG_PUB.Rev_Op_Unexposed_Rec_Type; --add
269 l_unexp_rev_op_res_rec BOM_RTG_PUB.Rev_Op_Res_Unexposed_Rec_Type; --add
270 l_unexp_rev_sub_res_rec BOM_RTG_PUB.Rev_Sub_Res_Unexposed_Rec_Type; --add
271 l_eco_revision_tbl ENG_Eco_PUB.Eco_Revision_Tbl_Type;
275 l_sub_component_tbl BOM_BO_PUB.Sub_Component_Tbl_Type;
272 l_revised_item_tbl ENG_Eco_PUB.Revised_Item_Tbl_Type;
273 l_rev_component_tbl BOM_BO_PUB.Rev_Component_Tbl_Type;
274 l_ref_designator_tbl BOM_BO_PUB.Ref_Designator_Tbl_Type;
276 l_rev_operation_tbl BOM_RTG_PUB.Rev_Operation_Tbl_Type; --add
277 l_rev_op_resource_tbl BOM_RTG_PUB.Rev_Op_Resource_Tbl_Type; --add
278 l_rev_sub_resource_tbl BOM_RTG_PUB.Rev_Sub_Resource_Tbl_Type; --add
279
280 l_mesg_token_tbl Error_Handler.Mesg_Token_Tbl_Type;
281 l_return_status VARCHAR2(1);
282 l_msg_count NUMBER;
283 l_disable_revision NUMBER:=2; --BUG 3034642
284 BEGIN
285 Create_Exp_Unexp_Rec
286 ( p_controller_CMP_rec => l_CMP_controller_rec
287 , x_CMP_tbl => l_rev_component_tbl
288 , x_unexp_CMP_rec => l_unexp_CMP_rec
289 );
290
291 IF p_record_status IN ('NEW', 'INSERT')
292 THEN
293 l_rev_component_tbl(1).transaction_type := 'CREATE';
294 ELSIF p_record_status IN ('QUERY', 'CHANGED')
295 THEN
296 l_rev_component_tbl(1).transaction_type := 'UPDATE';
297 ELSIF p_record_status = 'DELETE'
298 THEN
299 l_rev_component_tbl(1).transaction_type := 'DELETE';
300 END IF;
301
302 ENG_FORM_ECO_PVT.Process_ECO
303 ( x_return_status => l_return_status
304 , x_msg_count => l_msg_count
305 , p_control_rec => l_control_rec
306 , p_rev_component_tbl => l_rev_component_tbl
307 , p_unexp_rev_comp_rec => l_unexp_CMP_rec
308 , x_eco_rec => l_eco_rec
309 , x_unexp_eco_rec => l_unexp_eco_rec
310 , x_unexp_eco_rev_rec => l_unexp_eco_rev_rec
311 , x_unexp_revised_item_rec => l_unexp_rev_item_rec
312 , x_unexp_rev_comp_rec => l_unexp_CMP_rec
313 , x_unexp_sub_comp_rec => l_unexp_SBC_rec
314 , x_unexp_ref_desg_rec => l_unexp_RFD_rec
315 , x_unexp_rev_op_rec => l_unexp_rev_op_rec --add
316 , x_unexp_rev_op_res_rec => l_unexp_rev_op_res_rec --add
317 , x_unexp_rev_sub_res_rec => l_unexp_rev_sub_res_rec --add
318 , x_eco_revision_tbl => l_eco_revision_tbl
319 , x_revised_item_tbl => l_revised_item_tbl
320 , x_rev_Component_tbl => l_rev_Component_tbl
321 , x_ref_designator_tbl => l_ref_designator_tbl
322 , x_sub_component_tbl => l_sub_component_tbl
323 , x_rev_operation_tbl => l_rev_operation_tbl --add
324 , x_rev_op_resource_tbl => l_rev_op_resource_tbl --add
325 , x_rev_sub_resource_tbl => l_rev_sub_resource_tbl --add
326 , x_disable_revision => l_disable_revision --BUG 3034642
327 );
328
329 Create_Controller_Rec
330 ( p_CMP_tbl => l_rev_component_tbl
331 , p_unexp_CMP_rec => l_unexp_CMP_rec
332 , x_controller_CMP_rec => l_CMP_controller_rec
333 );
334
335 x_CMP_controller_rec := l_CMP_controller_rec;
336 x_return_status := l_return_status;
337
338 END Validate_And_Write;
339
340 -- Procedure Delete_Row
341
342 PROCEDURE Delete_Row
343 ( p_CMP_controller_rec IN Controller_CMP_Rec_Type
344 , p_control_rec IN BOM_BO_PUB.Control_Rec_Type
345 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
346 , x_return_status OUT NOCOPY VARCHAR2
347 )
348 IS
349 l_control_rec BOM_BO_PUB.Control_Rec_Type := p_control_rec;
350 l_CMP_controller_rec Controller_CMP_Rec_Type := p_CMP_controller_rec;
351 l_ECO_rec ENG_ECO_PUB.ECO_Rec_Type;
352 l_unexp_eco_rec ENG_ECO_PUB.ECO_Unexposed_Rec_Type;
353 l_unexp_eco_rev_rec ENG_ECO_PUB.Eco_Rev_Unexposed_Rec_Type;
354 l_unexp_rev_item_rec ENG_ECO_PUB.Rev_Item_Unexposed_Rec_Type;
355 l_unexp_CMP_rec BOM_BO_PUB.Rev_Comp_Unexposed_Rec_Type;
356 l_unexp_SBC_rec BOM_BO_PUB.Sub_Comp_Unexposed_Rec_Type;
357 l_unexp_RFD_rec BOM_BO_PUB.Ref_Desg_Unexposed_Rec_Type;
358 l_unexp_rev_op_rec BOM_RTG_PUB.Rev_Op_Unexposed_Rec_Type; --add
359 l_unexp_rev_op_res_rec BOM_RTG_PUB.Rev_Op_Res_Unexposed_Rec_Type; --add
360 l_unexp_rev_sub_res_rec BOM_RTG_PUB.Rev_Sub_Res_Unexposed_Rec_Type; --add
361 l_eco_revision_tbl ENG_Eco_PUB.Eco_Revision_Tbl_Type;
362 l_revised_item_tbl ENG_Eco_PUB.Revised_Item_Tbl_Type;
363 l_rev_component_tbl BOM_BO_PUB.Rev_Component_Tbl_Type;
364 l_ref_designator_tbl BOM_BO_PUB.Ref_Designator_Tbl_Type;
365 l_sub_component_tbl BOM_BO_PUB.Sub_Component_Tbl_Type;
366 l_rev_operation_tbl BOM_RTG_PUB.Rev_Operation_Tbl_Type; --add
367 l_rev_op_resource_tbl BOM_RTG_PUB.Rev_Op_Resource_Tbl_Type; --add
368 l_rev_sub_resource_tbl BOM_RTG_PUB.Rev_Sub_Resource_Tbl_Type; --add
369
370
371
372 l_mesg_token_tbl Error_Handler.Mesg_Token_Tbl_Type;
373 l_return_status VARCHAR2(1);
374 l_msg_count NUMBER;
375 l_disable_revision NUMBER:=2; --BUG 3034642
376 BEGIN
377 Create_Exp_Unexp_Rec
378 ( p_controller_CMP_rec => l_CMP_controller_rec
379 , x_CMP_tbl => l_rev_component_tbl
380 , x_unexp_CMP_rec => l_unexp_CMP_rec
381 );
382
383 l_rev_component_tbl(1).transaction_type := 'DELETE';
384
385 ENG_FORM_ECO_PVT.Process_ECO
386 ( x_return_status => l_return_status
387 , x_msg_count => l_msg_count
388 , p_control_rec => l_control_rec
389 , p_rev_component_tbl => l_rev_component_tbl
390 , p_unexp_rev_comp_rec => l_unexp_CMP_rec
391 , x_eco_rec => l_eco_rec
392 , x_unexp_eco_rec => l_unexp_eco_rec
393 , x_unexp_eco_rev_rec => l_unexp_eco_rev_rec
397 , x_unexp_ref_desg_rec => l_unexp_RFD_rec
394 , x_unexp_revised_item_rec => l_unexp_rev_item_rec
395 , x_unexp_rev_comp_rec => l_unexp_CMP_rec
396 , x_unexp_sub_comp_rec => l_unexp_SBC_rec
398 , x_unexp_rev_op_rec => l_unexp_rev_op_rec --add
399 , x_unexp_rev_op_res_rec => l_unexp_rev_op_res_rec --add
400 , x_unexp_rev_sub_res_rec => l_unexp_rev_sub_res_rec --add
401 , x_eco_revision_tbl => l_eco_revision_tbl
402 , x_revised_item_tbl => l_revised_item_tbl
403 , x_rev_Component_tbl => l_rev_Component_tbl
404 , x_ref_designator_tbl => l_ref_designator_tbl
405 , x_sub_component_tbl => l_sub_component_tbl
406 , x_rev_operation_tbl => l_rev_operation_tbl --add
407 , x_rev_op_resource_tbl => l_rev_op_resource_tbl --add
408 , x_rev_sub_resource_tbl => l_rev_sub_resource_tbl --add
409 , x_disable_revision => l_disable_revision --BUG 3034642
410 );
411
412 Create_Controller_Rec
413 ( p_CMP_tbl => l_rev_component_tbl
414 , p_unexp_CMP_rec => l_unexp_CMP_rec
415 , x_controller_CMP_rec => l_CMP_controller_rec
416 );
417
418 x_return_status := l_return_status;
419 END Delete_Row;
420
421 --Procedure Change_Attibute
422
423 PROCEDURE Change_Attribute
424 ( p_CMP_controller_rec IN Controller_CMP_Rec_Type
425 , p_control_rec IN BOM_BO_PUB.Control_Rec_Type
426 , p_record_status IN VARCHAR2
427 , x_CMP_controller_rec IN OUT NOCOPY Controller_CMP_Rec_Type
428 , x_Mesg_Token_Tbl OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
429 , x_return_status OUT NOCOPY VARCHAR2
430 )
431 IS
432 l_control_rec BOM_BO_PUB.Control_Rec_Type := p_control_rec;
433 l_CMP_controller_rec Controller_CMP_Rec_Type := p_CMP_controller_rec;
434 l_ECO_rec ENG_ECO_PUB.ECO_Rec_Type;
435 l_unexp_eco_rec ENG_ECO_PUB.ECO_Unexposed_Rec_Type;
436 l_unexp_eco_rev_rec ENG_ECO_PUB.Eco_Rev_Unexposed_Rec_Type;
437 l_unexp_rev_item_rec ENG_ECO_PUB.Rev_Item_Unexposed_Rec_Type;
438 l_unexp_CMP_rec BOM_BO_PUB.Rev_Comp_Unexposed_Rec_Type;
439 l_unexp_SBC_rec BOM_BO_PUB.Sub_Comp_Unexposed_Rec_Type;
440 l_unexp_RFD_rec BOM_BO_PUB.Ref_Desg_Unexposed_Rec_Type;
441 l_unexp_rev_op_rec BOM_RTG_PUB.Rev_Op_Unexposed_Rec_Type; --add
442 l_unexp_rev_op_res_rec BOM_RTG_PUB.Rev_Op_Res_Unexposed_Rec_Type; --add
443 l_unexp_rev_sub_res_rec BOM_RTG_PUB.Rev_Sub_Res_Unexposed_Rec_Type; --add
444 l_eco_revision_tbl ENG_Eco_PUB.Eco_Revision_Tbl_Type;
445 l_revised_item_tbl ENG_Eco_PUB.Revised_Item_Tbl_Type;
446 l_rev_component_tbl BOM_BO_PUB.Rev_Component_Tbl_Type;
447 l_ref_designator_tbl BOM_BO_PUB.Ref_Designator_Tbl_Type;
448 l_sub_component_tbl BOM_BO_PUB.Sub_Component_Tbl_Type;
449 l_rev_operation_tbl BOM_RTG_PUB.Rev_Operation_Tbl_Type; --add
450 l_rev_op_resource_tbl BOM_RTG_PUB.Rev_Op_Resource_Tbl_Type; --add
451 l_rev_sub_resource_tbl BOM_RTG_PUB.Rev_Sub_Resource_Tbl_Type; --add
452
453
454 l_mesg_token_tbl Error_Handler.Mesg_Token_Tbl_Type;
455 l_return_status VARCHAR2(1);
456 l_msg_count NUMBER;
457 l_disable_revision NUMBER:=2; --BUG 3034642
458 BEGIN
459 Create_Exp_Unexp_Rec
460 ( p_controller_CMP_rec => l_CMP_controller_rec
461 , x_CMP_tbl => l_rev_component_tbl
462 , x_unexp_CMP_rec => l_unexp_CMP_rec
463 );
464
465 IF p_record_status IN ('NEW', 'INSERT')
466 THEN
467 l_rev_component_tbl(1).transaction_type := 'CREATE';
468 ELSIF p_record_status IN ('QUERY', 'CHANGED')
469 THEN
470 l_rev_component_tbl(1).transaction_type := 'UPDATE';
471 ELSIF p_record_status = 'DELETE'
472 THEN
473 l_rev_component_tbl(1).transaction_type := 'DELETE';
474 END IF;
475
476 ENG_FORM_ECO_PVT.Process_ECO
477 ( x_return_status => l_return_status
478 , x_msg_count => l_msg_count
479 , p_control_rec => l_control_rec
480 , p_rev_component_tbl => l_rev_component_tbl
481 , p_unexp_rev_comp_rec => l_unexp_CMP_rec
482 , x_eco_rec => l_eco_rec
483 , x_unexp_eco_rec => l_unexp_eco_rec
484 , x_unexp_eco_rev_rec => l_unexp_eco_rev_rec
485 , x_unexp_revised_item_rec => l_unexp_rev_item_rec
486 , x_unexp_rev_comp_rec => l_unexp_CMP_rec
487 , x_unexp_sub_comp_rec => l_unexp_SBC_rec
488 , x_unexp_ref_desg_rec => l_unexp_RFD_rec
489 , x_unexp_rev_op_rec => l_unexp_rev_op_rec --add
490 , x_unexp_rev_op_res_rec => l_unexp_rev_op_res_rec --add
491 , x_unexp_rev_sub_res_rec => l_unexp_rev_sub_res_rec --add
492 , x_eco_revision_tbl => l_eco_revision_tbl
493 , x_revised_item_tbl => l_revised_item_tbl
494 , x_rev_Component_tbl => l_rev_Component_tbl
495 , x_ref_designator_tbl => l_ref_designator_tbl
496 , x_sub_component_tbl => l_sub_component_tbl
497 , x_rev_operation_tbl => l_rev_operation_tbl --add
498 , x_rev_op_resource_tbl => l_rev_op_resource_tbl --add
499 , x_rev_sub_resource_tbl => l_rev_sub_resource_tbl --add
500 , x_disable_revision => l_disable_revision --BUG 3034642
501 );
502
503 Create_Controller_Rec
504 ( p_CMP_tbl => l_rev_component_tbl
505 , p_unexp_CMP_rec => l_unexp_CMP_rec
506 , x_controller_CMP_rec => l_CMP_controller_rec
507 );
508
509 x_CMP_controller_rec := l_CMP_controller_rec;
510 x_return_status := l_return_status;
511 END Change_Attribute;
512
516 , p_CMP_tbl(1) IN ENG_Eco_PUB.Rit_Rec_Type
513 /*PROCEDURE Lock_Row
514 ( x_return_status OUT NOCOPY VARCHAR2
515 , x_err_text OUT NOCOPY VARCHAR2
517 , x_CMP_tbl(1) OUT NOCOPY ENG_Eco_PUB.Rit_Rec_Type
518 );
519 */
520
521 END CMP_Controller;