DBA Data[Home] [Help]

PACKAGE: APPS.BOM_VALIDATE_REF_DESIGNATOR

Source


1 PACKAGE BOM_Validate_Ref_Designator AS
2 /* $Header: BOMLRFDS.pls 120.0 2005/05/25 07:05:01 appldev noship $ */
3 /*#
4 * This API contains the methods to validate BOM reference designators.
5 * @rep:scope private
6 * @rep:product BOM
7 * @rep:displayname Validate BOM Reference Designator 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 --      BOMLRFDS.pls
19 --
20 --  DESCRIPTION
21 --
22 --      Spec of package BOM_Validate_Ref_Designator
23 --
24 --  NOTES
25 --
26 --  HISTORY
27 --
28 --  19-JUL-1999	Rahul Chitko	Initial Creation
29 --  05-JUL-2004 Hari Gelli    Added Check_Quantity procedure
30 *****************************************************************************/
31 
32 --  Procedure Entity
33 
34 /*#
35 * Check Entity will execute the business validations for the
36 * referenced designator entity .Any errors are loaded in the x_Mesg_Token_Tbl
37 * and a return status value is set.This can be used with ECO
38 * @param x_return_status Indicating success or faliure
39 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
40 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
41 * @param p_ref_designator_rec Reference Designator Record as given by the User
42 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Designator_Rec_Type }
43 * @param p_Ref_Desg_Unexp_Rec Reference Designator Unexposed Record
44 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type }
45 * @rep:scope private
46 * @rep:lifecycle active
47 * @rep:displayname Check Entity
48 */
49 
50 PROCEDURE Check_Entity
51 (   x_return_status		IN OUT NOCOPY VARCHAR2
52 ,   x_Mesg_Token_Tbl		IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
53 ,   p_ref_designator_rec	IN  Bom_Bo_Pub.Ref_Designator_Rec_Type
54 ,   p_Ref_Desg_Unexp_Rec	IN  Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type
55 );
56 
57 --  Procedure Attributes
58 
59 /*#
60 * Check Attributes will validate individual attributes .Any errors will be populated in the
61 * x_Mesg_Token_Tbl and returned with a x_return_status.This can be used with ECO
62 * @param x_return_status Indicating success or faliure
63 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
64 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
65 * @param p_ref_designator_rec Reference Designator Record as given by the User
66 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Designator_Rec_Type }
67 * @rep:scope private
68 * @rep:lifecycle active
69 * @rep:displayname Check Attributes
70 */
71 
72 PROCEDURE Check_Attributes
73 (   x_return_status		IN OUT NOCOPY VARCHAR2
74 ,   x_Mesg_Token_Tbl		IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
75 ,   p_ref_designator_rec	IN  Bom_Bo_Pub.Ref_Designator_Rec_Type
76 );
77 
78 --  Procedure Entity_Delete
79 /*#
80 * Entity Delete method will verify if the entity can be
81 * deleted without violating any business rules.In case of errors the x_Mesg_token_Tbl is populated
82 * and process return with a status other than 'S' Warning will not prevent the entity from being
83 * deleted.This can be used with ECO
84 * @param x_return_status Indicating success or failure
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_ref_designator_rec Reference Designator Record as given by the User
88 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Designator_Rec_Type }
89 * @param p_Ref_Desg_Unexp_Rec Bom Reference Designator Unexposed Record
90 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type }
91 * @rep:scope private
92 * @rep:lifecycle active
93 * @rep:displayname Check Entity Delete
94 */
95 
96 PROCEDURE Check_Entity_Delete
97 (   x_return_status		IN OUT NOCOPY VARCHAR2
98 ,   x_Mesg_Token_Tbl		IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
99 ,   p_ref_designator_rec        IN  Bom_Bo_Pub.Ref_Designator_Rec_Type
100 ,   p_Ref_Desg_Unexp_Rec	IN  Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type
101 );
102 
103 /*#
104 * Check_Existence will perform a query using the primary key information and will return
105 * success if the operation is CREATE and the record EXISTS or will return an error if the operation
106 * is UPDATE and the record DOES NOT EXIST.In case of UPDATE if the record exists then the procedure
107 * will return the old record in the old entity parameters with a success status.This can be used with
108 * ECO
109 * @param p_ref_designator_rec Reference Designator Record as given by the User
110 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Designator_Rec_Type }
111 * @param p_Ref_Desg_Unexp_Rec Reference Designator Unexposed Record
112 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type }
113 * @param x_old_ref_designator_rec Old Reference Designator exposed column record
114 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Designator_Rec_Type }
115 * @param x_old_ref_desg_unexp_rec Old Reference Designator unexposed column record
116 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type }
117 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
118 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
119 * @param x_return_status Indicating success or faliure
120 * @rep:scope private
121 * @rep:lifecycle active
122 * @rep:displayname Check Existence
123 */
124 
125 
126 PROCEDURE Check_Existence
127 (  p_ref_designator_rec		IN  Bom_Bo_Pub.Ref_Designator_Rec_Type
128  , p_ref_desg_unexp_rec		IN  Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type
129  , x_old_ref_designator_rec	IN OUT NOCOPY Bom_Bo_Pub.Ref_Designator_Rec_Type
130  , x_old_ref_desg_unexp_rec	IN OUT NOCOPY Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type
131  , x_Mesg_Token_Tbl		IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
132  , x_Return_Status		IN OUT NOCOPY VARCHAR2
133 );
134 
135 /*#
136 * Performs lineage checks for entity records that do not belong to the top-most entity in the hierarchy
137 * This can be used with ECO
138 * @param  p_ref_designator_rec Reference Designator Record as given by the User
139 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Designator_Rec_Type }
140 * @param  p_Ref_Desg_Unexp_Rec Reference Designator Unexposed Record
141 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type }
142 * @param  x_Mesg_Token_Tbl Filled with any errors or warnings
143 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
144 * @param  x_return_status Indicating success or faliure
145 * @rep:scope private
146 * @rep:lifecycle active
147 * @rep:displayname Check Lineage
148 */
149 
150 PROCEDURE Check_Lineage
151 (  p_ref_designator_rec		IN  Bom_Bo_Pub.Ref_Designator_Rec_Type
152  , p_ref_desg_unexp_rec		IN  Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type
153  , x_Mesg_Token_Tbl		IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
154  , x_Return_Status		IN OUT NOCOPY VARCHAR2
155 );
156 
157 /*#
158 * Checks access constraints.This can be used with ECO
159 * @param  p_ref_designator_rec Reference Designator Record as given by the User
160 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Designator_Rec_Type }
161 * @param  p_Ref_Desg_Unexp_Rec Reference Designator Unexposed Record
162 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type }
163 * @param  x_Mesg_Token_Tbl Filled with any errors or warnings
164 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
165 * @param  x_return_status Indicating success or faliure
166 * @rep:scope private
167 * @rep:lifecycle active
168 * @rep:displayname Check Access
169 */
170 
171 PROCEDURE CHECK_ACCESS
172 (  p_ref_designator_rec IN  Bom_Bo_Pub.Ref_Designator_Rec_Type
173  , p_ref_desg_unexp_rec IN  Bom_Bo_Pub.Ref_Desg_Unexposed_Rec_Type
174  , x_Mesg_Token_Tbl     IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
175  , x_Return_Status      IN OUT NOCOPY VARCHAR2
176 );
177 
178 /*#
179 * This method will take the component_sequence_id and checks if the quantity related is
180 * set to yes for the component and if it is yes then calculates the number of designators
181 * by calling another method (Calculate_both_totals) and validates the totals and
182 * send back the error status or success
183 * @param  x_return_status Indicating success or faliure
184 * @param  x_Mesg_Token_Tbl Filled with any errors or warnings
185 * @param  p_component_sequence_id component sequence id
186 * @param  p_component_item_name component item name
187 * @rep:scope private
188 * @rep:lifecycle active
189 * @rep:displayname Check Quantity
190 */
191 
192 
193 PROCEDURE Check_Quantity
194 (   x_return_status		IN OUT NOCOPY VARCHAR2
195 ,   x_Mesg_Token_Tbl		IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
196 ,   p_component_sequence_id	IN  NUMBER
197 ,   p_component_item_name	IN  VARCHAR2
198 );
199 
200 /*
201 ** BOm Business Object Definitions
202 */
203 
204 /*#
205 * Check Entity will convert the BOM Record to ECO and execute the business validations for the
206 * referenced designator entity .Any errors are loaded in the x_Mesg_Token_Tbl
207 * and a return status value is set
208 * @param  x_return_status Indicating success or faliure
209 * @param  x_Mesg_Token_Tbl Filled with any errors or warnings
210 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
211 * @param  p_bom_ref_designator_rec BomReference Designator Record as given by the User
212 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type }
213 * @param  p_bom_Ref_Desg_Unexp_Rec Bom Reference Designator Unexposed Record
214 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Desg_Unexposed_Rec_Type }
215 * @rep:scope private
216 * @rep:lifecycle active
217 * @rep:displayname Check Entity
218 */
219 PROCEDURE Check_Entity
220 (   x_return_status             IN OUT NOCOPY VARCHAR2
221 ,   x_Mesg_Token_Tbl            IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
222 ,   p_bom_ref_designator_rec        IN  Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type
223 ,   p_bom_Ref_Desg_Unexp_Rec        IN  Bom_Bo_Pub.Bom_Ref_Desg_Unexp_Rec_Type
224 );
225 
226 --  Procedure Attributes
227 
228 /*#
229 * Check Attributes convert the BOM Record to ECO and will validate individual
230 * attributes .Any errors will be populated in the x_Mesg_Token_Tbl and returned with a x_return_status
231 * @param x_return_status Indicating success or faliure
232 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
233 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
234 * @param p_bom_ref_designator_rec Bom Reference Designator Record as given by the User
235 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type }
236 * @rep:scope private
237 * @rep:lifecycle active
238 * @rep:displayname Check Attributes
239 */
240 
241 PROCEDURE Check_Attributes
242 (   x_return_status             IN OUT NOCOPY VARCHAR2
243 ,   x_Mesg_Token_Tbl            IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
244 ,   p_Bom_ref_designator_rec        IN  Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type
245 );
246 
247 --  Procedure Entity_Delete
248 /*#
249 * Entity Delete method will convert the BOM Record to ECO and verify if the entity can be
250 * deleted without violating any business rules.In case of errors the x_Mesg_token_Tbl is populated
251 * and process return with a status other than 'S' Warning will not prevent the entity from being
252 * deleted
253 * @param x_return_status Indicating success or failure
254 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
255 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
256 * @param p_bom_ref_designator_rec Bom Reference Designator Record as given by the User
257 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type }
258 * @param p_bom_Ref_Desg_Unexp_Rec Bom Reference Designator Unexposed Record
259 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Desg_Unexposed_Rec_Type }
260 * @rep:scope private
261 * @rep:lifecycle active
262 * @rep:displayname Check Entity Delete
263 */
264 
265 PROCEDURE Check_Entity_Delete
266 (   x_return_status             IN OUT NOCOPY VARCHAR2
267 ,   x_Mesg_Token_Tbl            IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
268 ,   p_bom_ref_designator_rec        IN  Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type
269 ,   p_bom_Ref_Desg_Unexp_Rec        IN  Bom_Bo_Pub.Bom_Ref_Desg_Unexp_Rec_Type
270 );
271 
272 /*#
273 * Check_Existence will convert the BOM Record to ECO and perform a query using the primary key information and will return
274 * success if the operation is CREATE and the record EXISTS or will return an error if the operation
275 * is UPDATE and the record DOES NOT EXIST.In case of UPDATE if the record exists then the procedure
276 * will return the old record in the old entity parameters with a success status.
277 * @param p_bom_ref_designator_rec Bom Reference Designator Record as given by the User
278 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type }
279 * @param p_bom_Ref_Desg_Unexp_Rec Bom Reference Designator Unexposed Record
280 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Desg_Unexposed_Rec_Type }
281 * @param x_old_bom_ref_designator_rec Old Bom Reference Designator exposed column record
282 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type }
283 * @param x_old_bom_ref_desg_unexp_rec Old Bom Reference Designator unexposed column record
284 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.Bom_Ref_Desg_Unexposed_Rec_Type }
285 * @param x_Mesg_Token_Tbl Filled with any errors or warnings
286 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
287 * @param x_return_status Indicating success or faliure
288 * @rep:scope private
289 * @rep:lifecycle active
290 * @rep:displayname Check Existence
291 */
292 
293 PROCEDURE Check_Existence
294 (  p_bom_ref_designator_rec         IN  Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type
295  , p_bom_ref_desg_unexp_rec         IN  Bom_Bo_Pub.Bom_Ref_Desg_Unexp_Rec_Type
296  , x_old_bom_ref_designator_rec     IN OUT NOCOPY Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type
297  , x_old_bom_ref_desg_unexp_rec     IN OUT NOCOPY Bom_Bo_Pub.Bom_Ref_Desg_Unexp_Rec_Type
298  , x_Mesg_Token_Tbl             IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
299  , x_Return_Status              IN OUT NOCOPY VARCHAR2
300 );
301 
302 /*#
303 * Converts the BOM Record to ECO and Performs lineage checks for entity records that do not
304 * belong to the top-most entity in the hierarchy
305 * @param  p_bom_ref_designator_rec Bom Reference Designator Record as given by the User
306 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.bom_Ref_Designator_Rec_Type }
307 * @param  p_bom_Ref_Desg_Unexp_Rec Bom Reference Designator Unexposed Record
308 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.bom_Ref_Desg_Unexposed_Rec_Type }
309 * @param  x_Mesg_Token_Tbl Filled with any errors or warnings
310 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
311 * @param  x_return_status Indicating success or faliure
312 * @rep:scope private
313 * @rep:lifecycle active
314 * @rep:displayname Check Lineage
315 */
316 
317 PROCEDURE Check_Lineage
318 (  p_bom_ref_designator_rec         IN  Bom_Bo_Pub.bom_Ref_Designator_Rec_Type
319  , p_bom_ref_desg_unexp_rec         IN  Bom_Bo_Pub.bom_Ref_Desg_Unexp_Rec_Type
320  , x_Mesg_Token_Tbl             IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
321  , x_Return_Status              IN OUT NOCOPY VARCHAR2
322 );
323 
324 /*#
325 * Check Access converts the BOM Record to ECO and checks access constraints
326 * @param  p_bom_ref_designator_rec Bom Reference Designator Record as given by the User
327 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.bom_Ref_Designator_Rec_Type }
328 * @param  p_bom_Ref_Desg_Unexp_Rec Bom Reference Designator Unexposed Record
329 * @rep:paraminfo { @rep:innertype Bom_Bo_Pub.bom_Ref_Desg_Unexposed_Rec_Type }
330 * @param  x_Mesg_Token_Tbl Filled with any errors or warnings
331 * @rep:paraminfo { @rep:innertype Error_Handler.Mesg_Token_Tbl_Type }
332 * @param  x_return_status Indicating success or faliure
333 * @rep:scope private
334 * @rep:lifecycle active
335 * @rep:displayname Check Access
336 */
337 
338 PROCEDURE CHECK_ACCESS
339 (  p_bom_ref_designator_rec IN  Bom_Bo_Pub.Bom_Ref_Designator_Rec_Type
340  , p_bom_ref_desg_unexp_rec IN  Bom_Bo_Pub.Bom_Ref_Desg_Unexp_Rec_Type
341  , x_Mesg_Token_Tbl     IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
342  , x_Return_Status      IN OUT NOCOPY VARCHAR2
343 );
344 
345 END BOM_Validate_Ref_Designator;