1 PACKAGE BOM_Default_Op_Res AS
2 /* $Header: BOMDRESS.pls 120.1.12010000.2 2008/11/14 16:16:29 snandana ship $ */
3 /*#
4 * This API contains methods that will try to copy over values from OLD record for all NULL columns found in
5 * business object Operation Resource record.It will also default in values either by retrieving
6 * them from the database, or by having the program assign values.
7 * @rep:scope private
8 * @rep:product BOM
9 * @rep:lifecycle active
10 * @rep:compatibility S
11 * @rep:displayname Operation Resource Defaulting
12 */
13 /****************************************************************************
14 --
15 -- Copyright (c) 1996 Oracle Corporation, Redwood Shores, CA, USA
16 -- All rights reserved.
17 --
18 -- FILENAME
19 --
20 -- BOMDRESS.pls
21 --
22 -- DESCRIPTION
23 --
24 -- Spec of package BOM_Default_Op_Res
25 --
26 -- NOTES
27 --
28 -- HISTORY
29 -- 18-AUG-2000 Masanori Kimizuka Initial Creation
30 --
31 ****************************************************************************/
32
33
34 /****************************************************************************
35 * ATTRIBUTE DEFAULTING
36 *****************************************************************************/
37 /*#
38 * This method as used by routing BO will try to default in values,for all NULL columns found in business object Operation Resource
39 * record of type Bom_Rtg_Pub.Op_Resource_Rec_Type either by retrieving them from the database, or by having the program
40 * assign values.For CREATEs, there is no OLD record. So the program must default
41 * in individual attribute values,independently of each other. This
42 * feature enables the user to enter minimal information for the
43 * operation to go through
44 * @param p_op_resource_rec IN Operation Resource Exposed Column Record
45 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
46 * @param p_op_res_unexp_rec IN Operation Resource Unexposed Column Record
47 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type}
48 * @param x_op_resource_rec IN OUT NOCOPY processed Operation Resource Exposed Column Record
49 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
50 * @param x_op_res_unexp_rec IN OUT NOCOPY processed Operation Resource Unexposed Column Record
51 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type}
52 * @param x_Mesg_Token_Tbl IN OUT NOCOPY Message Token Table
53 * @paraminfo {@rep:innertype Error_Handler.Mesg_Token_Tbl_Type}
54 * @param x_return_status IN OUT NOCOPY Return Status
55 * @rep:scope private
56 * @rep:displayname Operation Resource-Attribute Defaulting
57 * @rep:category BUSINESS_ENTITY BOM_MFG_ROUTING
58 * @rep:lifecycle active
59 */
60 --
61 -- Attribute Defualting for Rtg Operation Resource Record
62 -- used by Rtg BO
63 --
64 PROCEDURE Attribute_Defaulting
65 ( p_op_resource_rec IN Bom_Rtg_Pub.Op_Resource_Rec_Type
66 , p_op_res_unexp_rec IN Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type
67 , x_op_resource_rec IN OUT NOCOPY Bom_Rtg_Pub.Op_Resource_Rec_Type
68 , x_op_res_unexp_rec IN OUT NOCOPY Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type
69 , x_mesg_token_tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
70 , x_return_status IN OUT NOCOPY VARCHAR2
71 ) ;
72
73
74 --
75 -- Attribute Defaulting for Reviesed Operation Resource Record
76 -- used by Eco BO
77 --
78 /*#
79 * This method as used by ECO BO will try to default in values,for all NULL columns found in business object Operation Resource
80 * record of type Bom_Rtg_Pub.Op_Resource_Rec_Type either by retrieving them from the database, or by having the program
81 * assign values.For CREATEs, there is no OLD record. So the program must default
82 * in individual attribute values,independently of each other. This
83 * feature enables the user to enter minimal information for the
84 * operation to go through
85 * @param p_rev_op_resource_rec IN Operation Resource Exposed Column Record
86 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type}
87 * @param p_rev_op_res_unexp_rec IN Operation Resource Unexposed Column Record
88 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type}
89 * @param p_control_Rec IN Control Record
90 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Control_Rec_Type}
91 * @param x_rev_op_resource_rec IN OUT NOCOPY processed Operation Resource Exposed Column Record
92 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type}
93 * @param x_rev_op_res_unexp_rec IN OUT NOCOPY processed Operation Resource Unexposed Column Record
94 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type}
95 * @param x_Mesg_Token_Tbl IN OUT NOCOPY Message Token Table
96 * @paraminfo {@rep:innertype Error_Handler.Mesg_Token_Tbl_Type}
97 * @param x_return_status IN OUT NOCOPY Return Status
98 * @rep:scope private
99 * @rep:displayname Operation Resource-Attribute Defaulting
100 * @rep:category BUSINESS_ENTITY BOM_MFG_ROUTING
101 * @rep:lifecycle active
102 */
103
104 PROCEDURE Attribute_Defaulting
105 ( p_rev_op_resource_rec IN Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type
106 , p_rev_op_res_unexp_rec IN Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type
107 , p_control_Rec IN Bom_Rtg_Pub.Control_Rec_Type
108 , x_rev_op_resource_rec IN OUT NOCOPY Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type
109 , x_rev_op_res_unexp_rec IN OUT NOCOPY Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type
110 , x_mesg_token_tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
111 , x_return_status IN OUT NOCOPY VARCHAR2
112 ) ;
113
114
115 /****************************************************************************
116 * POPULATE NULL COLUMNS
117 *****************************************************************************/
118 --
119 -- Populate NULL Columns for Rtg Operation Resource Record
120 -- used by Rtg BO
121 --
122 /*#
123 * This method as used by routing BO will copy over values from OLD record for all NULL columns found in
124 * business object Operation Resource record of type Bom_Bo_Pub.Op_Resource_Rec_Type.
125 * The user may send in a record with
126 * certain values set to NULL. Values for all such columns are copied over
127 * from the OLD record. This feature enables the user to enter minimal
128 * information for the operation.
129 * @param p_op_resource_rec IN Operation Resource Exposed Column Record
130 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
131 * @param p_old_op_resource_rec IN Operation Resource Old Record Exposed Column Record
132 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
133 * @param p_op_res_unexp_rec IN Operation Resource Unexposed Column Record
134 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Typee}
135 * @param p_old_op_res_unexp_rec IN Operation Resource Old Record Unexposed Column Record
136 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Typee}
137 * @param x_op_resource_rec IN OUT NOCOPY processed Operation Resource Exposed Column Record
138 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
139 * @param x_op_res_unexp_rec IN OUT NOCOPY processed Operation Resource Column Record
140 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type}
141 * @rep:scope private
142 * @rep:compatibility S
143 * @rep:displayname Opeartion Resource-Populate NULL Columns
144 * @rep:category BUSINESS_ENTITY BOM_MFG_ROUTING
145 * @rep:lifecycle active
146 */
147 PROCEDURE Populate_Null_Columns
148 ( p_op_resource_rec IN Bom_Rtg_Pub.Op_Resource_Rec_Type
149 , p_op_res_unexp_rec IN Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type
150 , p_old_op_resource_rec IN Bom_Rtg_Pub.Op_Resource_Rec_Type
151 , p_old_op_res_unexp_rec IN Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type
152 , x_op_resource_rec IN OUT NOCOPY Bom_Rtg_Pub.Op_Resource_Rec_Type
153 , x_op_res_unexp_rec IN OUT NOCOPY Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type
154 ) ;
155
156 --
157 -- Populate NULL columns for Reviesed Operation Resource Record
158 -- used by Eco BO
159 --
160
161 /*#
162 * This method as used by ECO BO will copy over values from OLD record for all NULL columns found in
163 * business object Operation Resource record of type Bom_Bo_Pub.Op_Resource_Rec_Type.
164 * The user may send in a record with
165 * certain values set to NULL. Values for all such columns are copied over
166 * from the OLD record. This feature enables the user to enter minimal
167 * information for the operation.
168 * @param p_rev_op_resource_rec IN Operation Resource Exposed Column Record
169 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type}
170 * @param p_old_rev_op_resource_rec IN Operation Resource Old Record Exposed Column Record
171 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type}
172 * @param p_rev_op_res_unexp_rec IN Operation Resource Unexposed Column Record
173 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Typee}
174 * @param p_old_rev_op_res_unexp_rec IN Operation Resource Old Record Unexposed Column Record
175 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Typee}
176 * @param x_rev_op_resource_rec IN OUT NOCOPY processed Operation Resource Exposed Column Record
177 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type}
178 * @param x_rev_op_res_unexp_rec IN OUT NOCOPY processed Operation Resource Column Record
179 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type}
180 * @rep:scope private
181 * @rep:compatibility S
182 * @rep:displayname Opeartion Resource-Populate NULL Columns
183 * @rep:category BUSINESS_ENTITY BOM_MFG_ROUTING
184 * @rep:lifecycle active
185 */
186
187 PROCEDURE Populate_Null_Columns
188 ( p_rev_op_resource_rec IN Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type
189 , p_rev_op_res_unexp_rec IN Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type
190 , p_old_rev_op_resource_rec IN Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type
191 , p_old_rev_op_res_unexp_rec IN Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type
192 , x_rev_op_resource_rec IN OUT NOCOPY Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type
193 , x_rev_op_res_unexp_rec IN OUT NOCOPY Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type
194 ) ;
195
196 /*#
197 * This method as used by routing BO will perform checks against Opearion Resource record in the order
198 * Non-updateable columns (UPDATEs) Certain columns must not be changed by the user when updating the record.
199 * Cross-attribute checking: The validity of attributes may be checked, based on factors external to it.
200 * Business logic: The record must comply with business logic rules.
201 * @param p_op_resource_rec IN Opearion Resource Exposed Column Record
202 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
203 * @param p_op_res_unexp_rec IN Opearion Resource Unexposed Column Record
204 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type}
205 * @param x_op_resource_rec IN OUT NOCOPY processed Opearion Resource Exposed Column Record
206 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
207 * @param x_op_res_unexp_rec IN OUT NOCOPY processed Opearion Resource Unexposed Column Record
208 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type}
209 * @param x_Mesg_Token_Tbl IN OUT NOCOPY Message Token Table
210 * @paraminfo {@rep:innertype Error_Handler.Mesg_Token_Tbl_Type}
211 * @param x_return_status IN OUT NOCOPY Return Status
212 * @rep:scope private
213 * @rep:compatibility S
214 * @rep:displayname Opearion Resource-Entity Defaulting
215 * @rep:category BUSINESS_ENTITY BOM_MFG_ROUTING
216 * @rep:lifecycle active
217 */
218
219 /****************************************************************************
220 * ENTITY LEVEL DEFAULTING
221 *****************************************************************************/
222 --
223 -- Entity Level Defaulting Rtg Operation Resource Record
224 -- used by Rtg BO
225 --
226 PROCEDURE Entity_Defaulting
227 ( p_op_resource_rec IN Bom_Rtg_Pub.Op_Resource_Rec_Type
228 , p_op_res_unexp_rec IN Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type
229 , x_op_resource_rec IN OUT NOCOPY Bom_Rtg_Pub.Op_Resource_Rec_Type
230 , x_op_res_unexp_rec IN OUT NOCOPY Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type
231 , x_mesg_token_tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
235
232 , x_return_status IN OUT NOCOPY VARCHAR2
233 ) ;
234
236 --
237 -- Entity Level Defaulting for Reviesed Operation Resource Record
238 -- used by Eco BO
239 --
240
241 /*#
242 * This method as used by ECO BO will perform checks against Opearion Resource record in the order
243 * Non-updateable columns (UPDATEs) Certain columns must not be changed by the user when updating the record.
244 * Cross-attribute checking: The validity of attributes may be checked, based on factors external to it.
245 * Business logic: The record must comply with business logic rules.
246 * @param p_rev_op_resource_rec IN Opearion Resource Exposed Column Record
247 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
248 * @param p_rev_op_res_unexp_rec IN Opearion Resource Unexposed Column Record
249 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type}
250 * @param p_control_Rec IN Control Record
251 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Control_Rec_Type}
252 * @param x_rev_op_resource_rec IN OUT NOCOPY processed Opearion Resource Exposed Column Record
253 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Resource_Rec_Type}
254 * @param x_rev_op_res_unexp_rec IN OUT NOCOPY processed Opearion Resource Unexposed Column Record
255 * @paraminfo {@rep:innertype Bom_Rtg_Pub.Op_Res_Unexposed_Rec_Type}
256 * @param x_Mesg_Token_Tbl IN OUT NOCOPY Message Token Table
257 * @paraminfo {@rep:innertype Error_Handler.Mesg_Token_Tbl_Type}
258 * @param x_return_status IN OUT NOCOPY Return Status
259 * @rep:scope private
260 * @rep:compatibility S
261 * @rep:displayname Opearion Resource-Entity Defaulting
262 * @rep:category BUSINESS_ENTITY BOM_MFG_ROUTING
263 * @rep:lifecycle active
264 */
265
266 PROCEDURE Entity_Defaulting
267 ( p_rev_op_resource_rec IN Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type
268 , p_rev_op_res_unexp_rec IN Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type
269 , p_control_Rec IN Bom_Rtg_Pub.Control_Rec_Type
270 , x_rev_op_resource_rec IN OUT NOCOPY Bom_Rtg_Pub.Rev_Op_Resource_Rec_Type
271 , x_rev_op_res_unexp_rec IN OUT NOCOPY Bom_Rtg_Pub.Rev_Op_Res_Unexposed_Rec_Type
272 , x_mesg_token_tbl IN OUT NOCOPY Error_Handler.Mesg_Token_Tbl_Type
273 , x_return_status IN OUT NOCOPY VARCHAR2
274 ) ;
275
276 /****************************************************************************
277 * OTHERS
278 *****************************************************************************/
279
280 FUNCTION Get_Assigned_Units
281 RETURN NUMBER ;
282
283 FUNCTION Get_Schedule_Flag
284 RETURN NUMBER ;
285
286
287 FUNCTION Get_Available_24hs_flag ( p_resource_id IN NUMBER
288 , p_op_seq_id IN NUMBER)
289 RETURN NUMBER ;
290
291
292
293 -- Get Usage Rate or Amount
294 PROCEDURE Get_Usage_Rate_Or_Amount
295 ( p_usage_rate_or_amount IN NUMBER
296 , p_usage_rate_or_amount_inverse IN NUMBER
297 , x_usage_rate_or_amount IN OUT NOCOPY NUMBER
298 , x_usage_rate_or_amount_inverse IN OUT NOCOPY NUMBER
299 ) ;
300
301 -- Get Resource Attributes
302 PROCEDURE Get_Res_Attributes
303 ( p_operation_sequence_id IN NUMBER
304 , p_resource_id IN NUMBER
305 , p_activity_id IN NUMBER
306 , p_autocharge_type IN NUMBER
307 , p_basis_type IN NUMBER
308 , p_standard_rate_flag IN NUMBER
309 , p_org_id IN NUMBER
310 , x_activity_id IN OUT NOCOPY NUMBER
311 , x_autocharge_type IN OUT NOCOPY NUMBER
312 , x_basis_type IN OUT NOCOPY NUMBER
313 , x_standard_rate_flag IN OUT NOCOPY NUMBER
314 ) ;
315 G_round_off_val number :=NVL(FND_PROFILE.VALUE('BOM:ROUND_OFF_VALUE'),6); /* Bug 7322996 */
316
317 END BOM_Default_Op_Res ;