DBA Data[Home] [Help]

PACKAGE: APPS.AHL_UC_INSTANCE_PUB

Source


1 PACKAGE AHL_UC_INSTANCE_PUB AS
2 /* $Header: AHLPUCIS.pls 120.0.12010000.2 2008/11/20 11:37:53 sathapli ship $ */
3 /*#
4  * This package provides the APIs for processing the node instance in a Unit Configuration.
5  * @rep:scope public
6  * @rep:product AHL
7  * @rep:displayname Unit Configuration Node
8  * @rep:lifecycle active
9  * @rep:category BUSINESS_ENTITY AHL_UNIT_CONFIG
10  */
11 
12 
13 -- Start of Comments  --
14 -- Define Procedure unassociate_instance_pos
15 -- This API is used to to nullify a child instance's position reference but keep
16 -- the parent-child relationship in a UC tree structure (in other word, to make
17 -- the child instance as an extra node in the UC).
18 --
19 -- Procedure name: unassociate_instance
20 -- Type:           Private
21 -- Function:       To nullify a child instance's position reference but keep
22 --                 the parent-child relationship in a UC tree structure.
23 -- Pre-reqs:
24 --
25 -- unassociate_instance parameters:
26 -- p_uc_header_id    IN NUMBER  Required
27 -- p_instance_id     IN NUMBER  Required
28 -- p_csi_ii_ovn      IN NUMBER  Required, the origianl object_version_number of the record
29 --                   in table csi_ii_relationships where p_instance_id is the subject_id
30 -- p_prod_user_flag  IN VARCHAR2(1)  Required, to indicate whether the user who
31 --                    triggers this functionality is from Production.
32 -- Version: Initial Version   1.0
33 --
34 -- End of Comments  --
35 /*#
36  * This API is used to nullify a child instance's position reference,
37  * but keep the parent-child relationship in a UC tree structure.
38  * @param p_api_version Api Version Number
39  * @param p_init_msg_list Initialize the message stack, default value FND_API.G_TRUE
40  * @param p_commit to decide whether to commit the transaction or not, default value FND_API.G_FALSE
41  * @param p_validation_level validation level, default value FND_API.G_VALID_LEVEL_FULL
42  * @param x_return_status return status
43  * @param x_msg_count return message count
44  * @param x_msg_data return message data
45  * @param p_uc_header_id Unit Configuration Header ID
46  * @param p_uc_name Unit Configuration Name
47  * @param p_instance_id Instance ID
48  * @param p_instance_num Instance Number
49  * @param p_prod_user_flag Flag to identify whether the invoker is from Production
50  * @rep:scope public
51  * @rep:lifecycle active
52  * @rep:displayname Unassociate Instance Position Reference
53  */
54 PROCEDURE unassociate_instance(
55   p_api_version           IN  NUMBER := 1.0,
56   p_init_msg_list         IN  VARCHAR2 := FND_API.G_FALSE,
57   p_commit                IN  VARCHAR2 := FND_API.G_FALSE,
58   p_validation_level      IN  NUMBER := FND_API.G_VALID_LEVEL_FULL,
59   x_return_status         OUT NOCOPY VARCHAR2,
60   x_msg_count             OUT NOCOPY NUMBER,
61   x_msg_data              OUT NOCOPY VARCHAR2,
62   p_uc_header_id          IN  NUMBER := NULL,
63   p_uc_name               IN  VARCHAR2,
64   p_instance_id           IN  NUMBER := NULL,
65   p_instance_num          IN  VARCHAR2,
66   p_prod_user_flag        IN  VARCHAR2);
67 
68 -- Start of Comments  --
69 -- Define Procedure remove_instance
70 -- This API is used to to remove(uninstall) an instance (leaf, branch node or
71 -- sub-unit) from a UC node. After uninstallation, this instance is available to be
72 -- reinstalled in another appropriate position.
73 --
74 -- Procedure name: remove_instance
75 -- Type:           Public
76 -- Function:       To remove(uninstall) an instance (leaf, branch node or
77 --                 sub-unit) from a UC node..
78 -- Pre-reqs:
79 --
80 -- remove_instance parameters:
81 -- p_uc_header_id    IN NUMBER  Required
82 -- p_instance_id     In NUMBER  Required
83 -- p_prod_user_flag  IN VARCHAR2(1)  Required, to indicate whether the user who
84 --                   triggers this functionality is from Production.
85 -- Version: Initial Version   1.0
86 --
87 -- End of Comments  --
88 /*#
89  * This API is used to remove(uninstall) an instance from an Unit Config node.
90  * The instance can be leaf, branch node or sub-unit.
91  * After uninstallation this instance is available to be reinstalled in another
92  * appropriate position.
93  * @param p_api_version Api Version Number
94  * @param p_init_msg_list Initialize the message stack, default value FND_API.G_TRUE
95  * @param p_commit to decide whether to commit the transaction or not, default value FND_API.G_FALSE
96  * @param p_validation_level validation level, default value FND_API.G_VALID_LEVEL_FULL
97  * @param x_return_status return status
98  * @param x_msg_count return message count
99  * @param x_msg_data return message data
100  * @param p_uc_header_id Unit Configuration Header ID
101  * @param p_uc_name Unit Configuration Name
102  * @param p_instance_id Instance ID
103  * @param p_instance_num Instance Number
104  * @param p_prod_user_flag Flag to identify whether the invoker is from Production
105  * @rep:scope public
106  * @rep:lifecycle active
107  * @rep:displayname Remove Instance from UC Node
108  */
109 PROCEDURE remove_instance (
110   p_api_version           IN  NUMBER := 1.0,
111   p_init_msg_list         IN  VARCHAR2 := FND_API.G_FALSE,
112   p_commit                IN  VARCHAR2 := FND_API.G_FALSE,
113   p_validation_level      IN  NUMBER := FND_API.G_VALID_LEVEL_FULL,
114   x_return_status         OUT NOCOPY VARCHAR2,
115   x_msg_count             OUT NOCOPY NUMBER,
116   x_msg_data              OUT NOCOPY VARCHAR2,
117   p_uc_header_id          IN  NUMBER := NULL,
118   p_uc_name               IN  VARCHAR2,
119   p_instance_id           IN  NUMBER := NULL,
120   p_instance_num          IN  VARCHAR2,
121   p_prod_user_flag        IN  VARCHAR2);
122 
123 -- Start of Comments  --
124 -- Define Procedure update_instance
125 -- This API is used to update an instance's (top node or non top node) attributes
126 -- (serial Number, serial_number_tag, lot_number, revision, mfg_date and etc.)
127 --
128 -- Procedure name: update_instance
129 -- Type:           Public
130 -- Function:       To update some attributes of an instance (top or non-top node) installed
131 --                 in a Unit Configuration.
132 -- Pre-reqs:
133 --
134 -- update_instance parameters:
135 --   p_uc_header_id     IN NUMBER  Required
136 --   p_instance_id      In NUMBER  Required
137 --   p_prod_user_flag   IN VARCHAR2(1)  Required, to indicate whether the user who
138 --                      triggers this functionality is from Production.
139 --  Version: Initial Version   1.0
140 --
141 --  End of Comments  --
142 /*#
143  * This API is used to update attributes of an instance.
144  * The instance can be a top node or a non-top node.
145  * The attributes that can be updated are serial number,serial_number_tag,
146  * lot_number,revision,mfg_date etc
147  * @param p_api_version Api Version Number
148  * @param p_init_msg_list Initialize the message stack, default value FND_API.G_TRUE
149  * @param p_commit to decide whether to commit the transaction or not, default value FND_API.G_FALSE
150  * @param p_validation_level validation level, default value FND_API.G_VALID_LEVEL_FULL
151  * @param x_return_status return status
152  * @param x_msg_count return message count
153  * @param x_msg_data return message data
154  * @param p_uc_header_id Unit Configuration Header ID
155  * @param p_uc_name Unit Configuration Name
156  * @param p_uc_instance_rec Unit Config instance record of type ahl_uc_instance_pvt.uc_instance_rec_type
157  * @param p_prod_user_flag Flag to identify whether the invoker is from Production
158  * @rep:scope public
159  * @rep:lifecycle active
160  * @rep:displayname Update Instance Attributes
161  */
162 PROCEDURE update_instance(
163   p_api_version           IN  NUMBER := 1.0,
164   p_init_msg_list         IN  VARCHAR2 := FND_API.G_FALSE,
165   p_commit                IN  VARCHAR2 := FND_API.G_FALSE,
166   p_validation_level      IN  NUMBER := FND_API.G_VALID_LEVEL_FULL,
167   x_return_status         OUT NOCOPY VARCHAR2,
168   x_msg_count             OUT NOCOPY NUMBER,
169   x_msg_data              OUT NOCOPY VARCHAR2,
170   p_uc_header_id          IN  NUMBER := NULL,
171   p_uc_name               IN  VARCHAR2,
172   p_uc_instance_rec       IN  ahl_uc_instance_pvt.uc_instance_rec_type,
173   p_prod_user_flag        IN  VARCHAR2);
174 
175 -- Start of Comments  --
176 -- Define procedure create_install_instance
177 -- This API is used to create a new instance in csi_item_instances and assign it
178 -- to a UC node.
179 --
180 -- Procedure name: create_install_instance
181 -- Type:           Public
182 -- Function:       To create a new instance in csi_item_instances and assign it
183 --                 to a UC node.
184 -- Pre-reqs:
185 --
186 -- create_install_instance parameters:
187 --   p_uc_header_id       IN NUMBER, required
188 --   p_parent_instance_id IN NUMBER, required, indicates the parent instance_id
189 --   p_x_uc_instance_rec  In OUT uc_instance_rec_type, required, indicates the new
190 --                        instance to be created and installed.
191 --   p_x_sub_uc_rec       IN OUT uc_header_rec_type
192 --                        to store the sub UC header information if also creating a
193 --                        sub UC simultaneously
194 --   x_warning_msg_tbl    OUT ahl_uc_validation_pub.error_tbl_type
195 --                        to store the warning message after instance installation and
196 --                        calling validation API
197 --   p_prod_user_flag     IN VARCHAR2(1)  Required, to indicate whether the user who
198 --                        triggers this functionality is from Production.
199 --  Version: Initial Version   1.0
200 --
201 --  End of Comments  --
202 /*#
203  * This API is used to Create a new instance and assign it to a UC node.
204  * @param p_api_version Api Version Number
205  * @param p_init_msg_list Initialize the message stack, default value FND_API.G_TRUE
206  * @param p_commit to decide whether to commit the transaction or not, default value FND_API.G_FALSE
207  * @param p_validation_level validation level, default value FND_API.G_VALID_LEVEL_FULL
208  * @param x_return_status return status
209  * @param x_msg_count return message count
210  * @param x_msg_data return message data
211  * @param p_uc_header_id Unit Configuration Header ID
212  * @param p_uc_name Unit Configuration Name
213  * @param p_parent_instance_id indicates the parent instance_id
214  * @param p_parent_instance_num indicates the parent instance number
215  * @param p_prod_user_flag Flag to identify whether the invoker is from Production
216  * @param p_x_uc_instance_rec indicates the new instance to be created and installed of type uc_instance_rec_type
217  * @param p_x_sub_uc_rec to store the sub UC header information if also creating a sub UC simultaneously
218  * @param x_warning_msg_tbl to store the warning message after instance installation and calling validation API
219  * @rep:scope public
220  * @rep:lifecycle active
221  * @rep:displayname Create Install Instance
222  */
223 PROCEDURE create_install_instance(
224   p_api_version           IN  NUMBER := 1.0,
225   p_init_msg_list         IN  VARCHAR2 := FND_API.G_FALSE,
226   p_commit                IN  VARCHAR2 := FND_API.G_FALSE,
227   p_validation_level      IN  NUMBER := FND_API.G_VALID_LEVEL_FULL,
228   x_return_status         OUT NOCOPY VARCHAR2,
229   x_msg_count             OUT NOCOPY NUMBER,
230   x_msg_data              OUT NOCOPY VARCHAR2,
231   p_uc_header_id          IN  NUMBER := NULL,
232   p_uc_name               IN  VARCHAR2,
233   p_parent_instance_id    IN  NUMBER := NULL,
234   p_parent_instance_num   IN  VARCHAR2,
235   p_prod_user_flag        IN  VARCHAR2,
236   p_x_uc_instance_rec     IN OUT NOCOPY ahl_uc_instance_pvt.uc_instance_rec_type,
237   p_x_sub_uc_rec          IN OUT NOCOPY ahl_uc_instance_pvt.uc_header_rec_type,
238   x_warning_msg_tbl       OUT NOCOPY ahl_uc_validation_pub.error_tbl_type);
239 
240 -- Start of Comments  --
241 -- Define procedure install_instance
242 -- This API is used to assign an existing instance to a UC node.
243 --
244 -- Procedure name: install_instance
245 -- Type:           Public
246 -- Function:       To assign an existing instance in csi_item_instances to a UC node.
247 -- Pre-reqs:
248 --
249 -- install_instance parameters:
250 --   p_uc_header_id       IN NUMBER, required
251 --   p_parent_instance_id IN NUMBER, required, indicates the parent instance_id
252 --   p_instance_id        IN NUMBER, required, indicates the instance to be installed
253 --   p_instance_number    IN csi_item_instances.instance_number%TYPE := NULL,
254 --   p_relationship_id    IN NUMBER, required, indicates the position to be installed.
255 --   x_warning_msg_tbl    OUT ahl_uc_validation_pub.error_tbl_type
256 --                        to store the warning message after instance installation and
257 --                        calling validation API
258 --   p_prod_user_flag     IN VARCHAR2(1)  Required, to indicate whether the user who
259 --                        triggers this functionality is from Production.
260 -- Version: Initial Version   1.0
261 --
262 -- End of Comments  --
263 /*#
264  * This API is used to assign an existing instance to a UC node
265  * @param p_api_version Api Version Number
266  * @param p_init_msg_list Initialize the message stack, default value FND_API.G_TRUE
267  * @param p_commit to decide whether to commit the transaction or not, default value FND_API.G_FALSE
268  * @param p_validation_level validation level, default value FND_API.G_VALID_LEVEL_FULL
269  * @param x_return_status return status
270  * @param x_msg_count return message count
271  * @param x_msg_data return message data
272  * @param p_uc_header_id Unit Configuration Header ID
273  * @param p_uc_name Unit Configuration Name
274  * @param p_parent_instance_id indicates the parent instance_id
275  * @param p_parent_instance_num indicates the parent instance number
276  * @param p_instance_id indicates the instance to be installed
277  * @param p_instance_num csi_item_instances.instance_number%TYPE := NULL
278  * @param p_relationship_id indicates the position to be installed
279  * @param p_prod_user_flag indicate whether the user who triggers this functionality is from Production.
280  * @param x_warning_msg_tbl to store the warning message after instance installation and calling validation API
281  * @rep:scope public
282  * @rep:lifecycle active
283  * @rep:displayname Assign Instance To UC Node
284  */
285 PROCEDURE install_instance(
286   p_api_version           IN  NUMBER := 1.0,
287   p_init_msg_list         IN  VARCHAR2 := FND_API.G_FALSE,
288   p_commit                IN  VARCHAR2 := FND_API.G_FALSE,
289   p_validation_level      IN  NUMBER := FND_API.G_VALID_LEVEL_FULL,
290   x_return_status         OUT NOCOPY VARCHAR2,
291   x_msg_count             OUT NOCOPY NUMBER,
292   x_msg_data              OUT NOCOPY VARCHAR2,
293   p_uc_header_id          IN  NUMBER := NULL,
294   p_uc_name               IN  VARCHAR2,
295   p_parent_instance_id    IN  NUMBER := NULL,
296   p_parent_instance_num   IN  VARCHAR2,
297   p_instance_id           IN  NUMBER := NULL,
298   p_instance_num          IN  VARCHAR2,
299   p_relationship_id       IN  NUMBER,
300   p_prod_user_flag        IN  VARCHAR2,
301   x_warning_msg_tbl       OUT NOCOPY ahl_uc_validation_pub.error_tbl_type);
302 
303 -- Start of Comments  --
304 -- Define procedure swap_instances
305 -- This API is used by Production user to make parts change: replace an old instance
306 -- with a new one in a UC tree.
307 --
308 -- Procedure name: swap_instance
309 -- Type:           Private
310 -- Function:       To replace an old instance with a new one in a UC tree.
311 -- Pre-reqs:
312 --
313 -- swap_instances parameters:
314 --   p_uc_header_id        IN NUMBER, required, UC header identifier
315 --   p_parent_instance_id  IN NUMBER, required, parent instance_id of the instance to be replaced
316 --   p_old_instance_id     IN NUMBER, required, the instance to be replaced
317 --   p_new_instance_id     IN NUMBER, required, the new instance to replace the old instance
318 --   p_new_instance_number IN csi_item_instances.instance_number%TYPE := NULL,
319 --   p_relationship_id     IN NUMBER, required, indicates the position to be installed.
320 --   x_warning_msg_tbl     OUT ahl_uc_validation_pub.error_tbl_type
321 --                         to store the warning message after instance installation and
322 --                         calling validation API
323 --   p_prod_user_flag      IN VARCHAR2(1)  Required, to indicate whether the user who
324 --                         triggers this functionality is from Production.
325 -- Version: Initial Version   1.0
326 --
327 -- End of Comments  --
328 /*#
329  * This API is used by production user to replace an old instance with new one in a UC Tree.
330  * @param p_api_version Api Version Number
331  * @param p_init_msg_list Initialize the message stack, default value FND_API.G_TRUE
332  * @param p_commit to decide whether to commit the transaction or not, default value FND_API.G_FALSE
333  * @param p_validation_level validation level, default value FND_API.G_VALID_LEVEL_FULL
334  * @param x_return_status return status
335  * @param x_msg_count return message count
336  * @param x_msg_data return message data
337  * @param p_uc_header_id Unit Configuration Header ID
338  * @param p_uc_name Unit Configuration Name
339  * @param p_parent_instance_id parent instance_id of the instance to be replaced
340  * @param p_parent_instance_num indicates the parent instance number
341  * @param p_old_instance_id the instance to be replaced
342  * @param p_old_instance_num instance number of the old instance
343  * @param p_new_instance_id the new instance to replace the old instance
344  * @param p_new_instance_num instance number of the new instance
345  * @param p_relationship_id indicates the position to be installed
346  * @param p_prod_user_flag to indicate whether the user who triggers this functionality is from Production
347  * @param x_warning_msg_tbl to store the warning message after instance installation and  calling validation APIahl_uc_validation_pub.error_tbl_type
348  * @rep:scope public
349  * @rep:lifecycle active
350  * @rep:displayname Swap Instance in UC Tree
351  */
352 PROCEDURE swap_instance(
353   p_api_version           IN  NUMBER := 1.0,
354   p_init_msg_list         IN  VARCHAR2 := FND_API.G_FALSE,
355   p_commit                IN  VARCHAR2 := FND_API.G_FALSE,
356   p_validation_level      IN  NUMBER := FND_API.G_VALID_LEVEL_FULL,
357   x_return_status         OUT NOCOPY VARCHAR2,
358   x_msg_count             OUT NOCOPY NUMBER,
359   x_msg_data              OUT NOCOPY VARCHAR2,
360   p_uc_header_id          IN  NUMBER := NULL,
361   p_uc_name               IN  VARCHAR2,
362   p_parent_instance_id    IN  NUMBER := NULL,
363   p_parent_instance_num   IN  VARCHAR2,
364   p_old_instance_id       IN  NUMBER := NULL,
365   p_old_instance_num      IN  VARCHAR2,
366   p_new_instance_id       IN  NUMBER := NULL,
367   p_new_instance_num      IN  VARCHAR2,
368   p_relationship_id       IN  NUMBER,
369   p_prod_user_flag        IN  VARCHAR2,
370   x_warning_msg_tbl       OUT NOCOPY ahl_uc_validation_pub.error_tbl_type);
371 
372 -- Start of Comments  --
373 -- Define procedure create_unassigned_instance.
374 -- This API is used to create a new instance in csi_item_instances as an extra
375 -- instance attached to the root node.
376 --
377 -- Procedure name: create_unassigned_instance
378 -- Type:           Public
379 -- Function:       To create a new instance in csi_item_instances as an extra
380 --                 instance attached to the root node.
381 -- Pre-reqs:
382 --
383 -- create_unassigned_instance parameters:
384 --   p_uc_header_id       IN NUMBER, required
385 --   p_x_uc_instance_rec  In OUT uc_instance_rec_type, required, indicates the new
386 --                        instance to be created
387 --
388 --  Version: Initial Version   1.0
389 --
390 --  18-Nov-2008    SATHAPLI    FP ER 6504147 - Created procedure create_unassigned_instance.
391 --
392 --  End of Comments  --
393 /*#
394  * This API is used to Create a new instance as an extra instance attached to the root.
395  * @param p_api_version Api Version Number
396  * @param p_init_msg_list Initialize the message stack, default value FND_API.G_TRUE
397  * @param p_commit to decide whether to commit the transaction or not, default value FND_API.G_FALSE
398  * @param p_validation_level validation level, default value FND_API.G_VALID_LEVEL_FULL
399  * @param x_return_status return status
400  * @param x_msg_count return message count
401  * @param x_msg_data return message data
402  * @param p_uc_header_id Unit Configuration Header ID
403  * @param p_uc_name Unit Configuration Name
404  * @param p_x_uc_instance_rec indicates the new instance to be created
405  * @rep:scope public
406  * @rep:lifecycle active
407  * @rep:displayname Create Unassigned Instance
408  */
409 PROCEDURE create_unassigned_instance(
410     p_api_version           IN            NUMBER   := 1.0,
411     p_init_msg_list         IN            VARCHAR2 := FND_API.G_FALSE,
412     p_commit                IN            VARCHAR2 := FND_API.G_FALSE,
413     p_validation_level      IN            NUMBER   := FND_API.G_VALID_LEVEL_FULL,
414     x_return_status         OUT    NOCOPY VARCHAR2,
415     x_msg_count             OUT    NOCOPY NUMBER,
416     x_msg_data              OUT    NOCOPY VARCHAR2,
417     p_uc_header_id          IN            NUMBER,
418     p_uc_name               IN            VARCHAR2,
419     p_x_uc_instance_rec     IN OUT NOCOPY ahl_uc_instance_pvt.uc_instance_rec_type);
420 
421 END AHL_UC_INSTANCE_PUB; -- Package spec