1 PACKAGE BOM_Validate_Sub_Component AS
2 /* $Header: BOMLSBCS.pls 120.0 2005/05/25 05:49:50 appldev noship $ */
3 /*#
4 * This API contains the methods to validate BOM Sub Components.
5 * @rep:scope private
6 * @rep:product BOM
7 * @rep:displayname Validate BOM Sub Component Package
8 * @rep:lifecycle active
9 * @rep:category BUSINESS_ENTITY BOM_BILL_OF_MATERIAL
10 */
11 /*****************************************************************************
12 --
13 -- Copyright (c) 1996 Oracle Corporation, Redwood Shores, CA, USA
14 -- All rights reserved.
15 --
16 -- FILENAME
17 --
18 -- BOMLSBCS.pls
19 --
20 -- DESCRIPTION
21 --
22 -- Spec of package BOM_Validate_Sub_Component
23 --
24 -- NOTES
25 --
26 -- HISTORY
27 --
28 -- 17-JUL-1999 Rahul Chitko Initial Creation
29 --
30 *****************************************************************************/
31
32 /*#
33 * Log an error if one of the required columns is missing.This can be used with ECO
34 * @param x_return_status Indicating success or faliure
35 * @param p_sub_component_rec Substitute Component Record
36 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Component_Rec_Type }
37 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
38 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type
39 * @rep:scope private
40 * @rep:lifecycle active
41 * @rep:displayname Check Required
42 */
43
44 PROCEDURE CHECK_REQUIRED( x_return_status IN OUT NOCOPY VARCHAR2
45 , p_sub_component_rec IN
46 Bom_Bo_Pub.Sub_Component_Rec_Type
47 , x_Mesg_Token_tbl IN OUT NOCOPY
48 Error_Handler.Mesg_Token_Tbl_Type
49 );
50
51 -- Procedure Entity
52
53 /*#
54 * Check Entity method will validate the entity record by verfying the business logic for
55 * Substitute Components.This can be used with ECO
56 * @param x_return_status Indicating success or faliure
57 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
58 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
59 * @param p_sub_component_rec Substitute Component Record
60 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Component_Rec_Type }
61 * @param p_sub_comp_Unexp_Rec Substitute component Record of Unexposed Columns
62 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type }
63 * @param p_control_rec This is defaulted to BOM_BO_PUB.G_DEFAULT_CONTROL_REC
64 * @rep:paraminfo { @rep:innertype BOM_BO_PUB.Control_Rec_Type }
65 * @rep:scope private
66 * @rep:lifecycle active
67 * @rep:displayname Check Entity
68 */
69
70 PROCEDURE Check_Entity
71 ( x_return_status IN OUT NOCOPY VARCHAR2
72 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
73 , p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
74 , p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
75 , p_control_rec IN BOM_BO_PUB.Control_Rec_Type
76 := BOM_BO_PUB.G_DEFAULT_CONTROL_REC
77 );
78
79 -- Procedure Attributes
80
81 /*#
82 * Method Check Attributes will verify the validity of all exposed columns to check if the user has given
83 * values that the columns can actually hold.This can be used with ECO
84 * @param x_return_status Indicating success or faliure
85 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
86 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
87 * @param p_sub_component_rec Substitute Component Record
88 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Component_Rec_Type }
89 * @param p_sub_comp_Unexp_Rec Substitute component Record of Unexposed Columns
90 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type }
91 * @rep:scope private
92 * @rep:lifecycle active
93 * @rep:displayname Check Attributes
94 */
95
96 PROCEDURE Check_Attributes
97 ( x_return_status IN OUT NOCOPY VARCHAR2
98 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
99 , p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
100 , p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
101 );
102
103 -- Procedure Entity_Delete
104
105 /*#
106 * Entity_Delete method will verify if the record can be delete without violating
107 * any dependency rules.This can be used with ECO
108 * @param x_return_status Indicating success or faliure
109 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
110 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
111 * @param p_sub_component_rec Substitute Component Record
112 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Component_Rec_Type }
113 * @param p_sub_comp_Unexp_Rec Substitute component Record of Unexposed Columns
114 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type }
115 * @rep:scope private
116 * @rep:lifecycle active
117 * @rep:displayname Check Entity Delete
118 */
119
120
121 PROCEDURE Check_Entity_Delete
122 ( x_return_status IN OUT NOCOPY VARCHAR2
123 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
124 , p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
125 , p_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
126 );
127
128 /*#
129 * This method will verify if the user given record exists when the operation is Update/Delete
130 * and does not exist when the operation is Create. If the operation is Update/Delete
131 * the procedure will query the existing record and return them as old records
132 * This can be used with ECO
133 * @param p_sub_component_rec Substitute Component Record
134 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Component_Rec_Type }
135 * @param p_sub_comp_Unexp_Rec Substitute component Record of Unexposed Columns
136 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type }
137 * @param x_old_sub_component_rec Old sub component exposed column record
138 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Component_Rec_Type }
139 * @param x_old_sub_comp_unexp_rec Old sub component unexposed column record
140 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type }
141 * @param x_return_status Indicating success or faliure
142 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
143 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
144 * @rep:scope private
145 * @rep:lifecycle active
146 * @rep:displayname Check Existence
147 */
148
149 PROCEDURE Check_Existence
150 ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
151 , p_sub_comp_unexp_rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
152 , x_old_sub_component_rec IN OUT NOCOPY Bom_Bo_Pub.Sub_Component_Rec_Type
153 , x_old_sub_comp_unexp_rec IN OUT NOCOPY Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
154 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
155 , x_Return_Status IN OUT NOCOPY VARCHAR2
156 );
157
158 /*#
159 * This method will verify that the parent-child relationship hold good in the production tables
160 * based on the data that the user has given.This can be used with ECO
161 * @param p_sub_component_rec Substitute Component Record
162 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Component_Rec_Type }
163 * @param p_sub_comp_Unexp_Rec Substitute component Record of Unexposed Columns
164 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type }
165 * @param x_return_status Indicating success or faliure
166 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
167 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
168 * @rep:scope private
169 * @rep:lifecycle active
170 * @rep:displayname Check Lineage
171 */
172
173 PROCEDURE Check_Lineage
174 ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
175 , p_sub_comp_unexp_rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
176 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
177 , x_Return_Status IN OUT NOCOPY VARCHAR2
178 );
179
180
181 /*#
182 * If the System Information record values are not already filled the process will query the
183 * appropriate profile values and verify that the user has access to the Revised Item, the
184 * parent component item and the item type of the substitute Component. It will also verify that
185 * the revised item is not already implemented or canceled.This can be used with ECO
186 * @param p_sub_component_rec Substitute Component Record
187 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Component_Rec_Type }
188 * @param p_sub_comp_Unexp_Rec Substitute component Record of Unexposed Columns
189 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type }
190 * @param x_return_status Indicating success or faliure
191 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
192 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
193 * @rep:scope private
194 * @rep:lifecycle active
195 * @rep:displayname Check Access
196 */
197
198 PROCEDURE Check_Access
199 ( p_sub_component_rec IN Bom_Bo_Pub.Sub_Component_Rec_Type
200 , p_sub_comp_unexp_rec IN Bom_Bo_Pub.Sub_Comp_Unexposed_Rec_Type
201 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
202 , x_Return_Status IN OUT NOCOPY VARCHAR2
203 );
204
205 /*
206 ** Procedures for BOM Business Object
207 */
208
209 /*#
210 * Log an error if one of the required columns is missing
211 * @param x_return_status Indicating success or faliure
212 * @param p_bom_sub_component_rec Bom Substitute Component Record
213 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Component_Rec_Type }
214 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
215 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type
216 * @rep:scope private
217 * @rep:lifecycle active
218 * @rep:displayname Check Required
219 */
220
221 PROCEDURE Check_Required
222 ( x_return_status IN OUT NOCOPY VARCHAR2
223 , p_bom_sub_component_rec IN Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
224 , x_Mesg_Token_tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
225 );
226
227 -- Procedure Entity
228
229 /*#
230 * Check Entity method will validate the entity record by verfying the business logic for Bom
231 * Substitute Components
232 * @param x_return_status Indicating success or faliure
233 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
234 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
235 * @param p_bom_sub_component_rec Bom Substitute Component Record
236 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Component_Rec_Type }
237 * @param p_bom_sub_comp_Unexp_Rec Bom Substitute component Record of Unexposed Columns
238 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Comp_Unexposed_Rec_Type }
239 * @rep:scope private
240 * @rep:lifecycle active
241 * @rep:displayname Check Entity
242 */
243
244 PROCEDURE Check_Entity
245 ( x_return_status IN OUT NOCOPY VARCHAR2
246 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
247 , p_bom_sub_component_rec IN Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
248 , p_bom_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Bom_Sub_Comp_Unexp_Rec_Type
249 );
250
251 -- Procedure Attributes
252
253 /*#
254 * Method Check Attributes will verify the validity of all exposed columns to check if the user has given
255 * values that the columns can actually hold
256 * @param x_return_status Indicating success or faliure
257 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
258 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
259 * @param p_bom_sub_component_rec Bom Substitute Component Record
260 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Component_Rec_Type }
261 * @param p_bom_sub_comp_Unexp_Rec Bom Substitute component Record of Unexposed Columns
262 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Comp_Unexposed_Rec_Type }
263 * @rep:scope private
264 * @rep:lifecycle active
265 * @rep:displayname Check Attributes
266 */
267
268
269 PROCEDURE Check_Attributes
270 ( x_return_status IN OUT NOCOPY VARCHAR2
271 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
272 , p_bom_sub_component_rec IN Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
273 , p_bom_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Bom_Sub_Comp_Unexp_Rec_Type
274 );
275
276 -- Procedure Entity_Delete
277
278 /*#
279 * Entity_Delete method will verify if the record can be delete without violating
280 * any dependency rules
281 * @param x_return_status Indicating success or faliure
282 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
283 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
284 * @param p_bom_sub_component_rec Bom Substitute Component Record
285 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Component_Rec_Type }
286 * @param p_bom_sub_comp_Unexp_Rec Bom Substitute component Record of Unexposed Columns
287 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Comp_Unexposed_Rec_Type }
288 * @rep:scope private
289 * @rep:lifecycle active
290 * @rep:displayname Check Entity Delete
291 */
292
293
294 PROCEDURE Check_Entity_Delete
295 ( x_return_status IN OUT NOCOPY VARCHAR2
296 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
297 , p_bom_sub_component_rec IN Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
298 , p_bom_Sub_Comp_Unexp_Rec IN Bom_Bo_Pub.Bom_Sub_Comp_Unexp_Rec_Type
299 );
300
301 /*#
302 * This method will verify if the user given record exists when the operation is Update/Delete
303 * and does not exist when the operation is Create. If the operation is Update/Delete
304 * the procedure will query the existing record and return them as old records
305 * @param p_bom_sub_component_rec Bom Substitute Component Record
306 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Component_Rec_Type }
307 * @param p_bom_sub_comp_Unexp_Rec Bom Substitute component Record of Unexposed Columns
308 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Comp_Unexposed_Rec_Type }
309 * @param x_old_bom_sub_component_rec Old Bom sub component exposed column record
310 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Component_Rec_Type }
311 * @param x_old_bom_sub_comp_unexp_rec Old Bom sub component unexposed column record
312 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Comp_Unexposed_Rec_Type }
313 * @param x_return_status Indicating success or faliure
314 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
315 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
316 * @rep:scope private
317 * @rep:lifecycle active
318 * @rep:displayname Check Existence
319 */
320
321 PROCEDURE Check_Existence
322 ( p_bom_sub_component_rec IN Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
323 , p_bom_sub_comp_unexp_rec IN Bom_Bo_Pub.Bom_Sub_Comp_Unexp_Rec_Type
324 , x_old_bom_sub_component_rec IN OUT NOCOPY Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
325 , x_old_bom_sub_comp_unexp_rec IN OUT NOCOPY Bom_Bo_Pub.Bom_Sub_Comp_Unexp_Rec_Type
326 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
327 , x_Return_Status IN OUT NOCOPY VARCHAR2
328 );
329
330 /*#
331 * This method will verify that the parent-child relationship hold good in the production tables
332 * based on the data that the user has given
333 * @param p_bom_sub_component_rec Bom Substitute Component Record
334 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Component_Rec_Type }
335 * @param p_bom_sub_comp_Unexp_Rec Bom Substitute component Record of Unexposed Columns
336 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Comp_Unexposed_Rec_Type }
337 * @param x_return_status Indicating success or faliure
338 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
339 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
340 * @rep:scope private
341 * @rep:lifecycle active
342 * @rep:displayname Check Lineage
343 */
344
345 PROCEDURE Check_Lineage
346 ( p_bom_sub_component_rec IN Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
347 , p_bom_sub_comp_unexp_rec IN Bom_Bo_Pub.Bom_Sub_Comp_Unexp_Rec_Type
348 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
349 , x_Return_Status IN OUT NOCOPY VARCHAR2
350 );
351
352 /*#
353 * If the System Information record values are not already filled the process will query the
354 * appropriate profile values and verify that the user has access to the Revised Item, the
355 * parent component item and the item type of the substitute Component. It will also verify that
356 * the revised item is not already implemented or canceled.
357 * @param p_bom_sub_component_rec Bom Substitute Component Record
358 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Component_Rec_Type }
359 * @param p_bom_sub_comp_Unexp_Rec Bom Substitute component Record of Unexposed Columns
360 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Sub_Comp_Unexposed_Rec_Type }
361 * @param x_return_status Indicating success or faliure
362 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
363 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
364 * @rep:scope private
365 * @rep:lifecycle active
366 * @rep:displayname Check Access
367 */
368
369 PROCEDURE Check_Access
370 ( p_bom_sub_component_rec IN Bom_Bo_Pub.Bom_Sub_Component_Rec_Type
371 , p_bom_sub_comp_unexp_rec IN Bom_Bo_Pub.Bom_Sub_Comp_Unexp_Rec_Type
372 , x_Mesg_Token_Tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
373 , x_Return_Status IN OUT NOCOPY VARCHAR2
374 );
375
376 END BOM_Validate_Sub_Component;