DBA Data[Home] [Help]

PACKAGE: APPS.QA_SPECS_PUB

Source


1 PACKAGE qa_specs_pub AS
2 /* $Header: qltpspcb.pls 120.1.12010000.2 2008/09/24 11:27:21 pdube ship $ */
3 /*#
4  * This package is the public interface for Quality Specifications setup.
5  * It allows for the creation of new specifications. A new specification
6  * can be created as a copy of an existing specification, or with addition
7  * of individual specification elements. This package also supports deleting an
8  * existing specification.
9  * @rep:scope public
10  * @rep:product QA
11  * @rep:displayname Specifications Definition
12  * @rep:lifecycle active
13  * @rep:category BUSINESS_ENTITY QA_SPEC
14  */
15 --
16 -- Seeded Specification Assignment Types
17 --
18 
19     g_spec_type_item     CONSTANT NUMBER := 1;
20     g_spec_type_supplier CONSTANT NUMBER := 2;
21     g_spec_type_customer CONSTANT NUMBER := 3;
22 
23 --
24 -- API name        : create_specification
25 -- Type            : Public
26 -- Pre-reqs        : None
27 --
28 -- API to create a new Specification in Oracle Quality.
29 -- Version 1.0
30 --
31 -- This API creates a header of a Specification.  After calling
32 -- this procedure, the user should call add_spec_element consecutively
33 -- to add as many specification elements as needed.  Afterwards, call
34 -- complete_spec_processing to finish the specification creation.
35 --
36 -- Commit is never performed.
37 --
38 -- Parameters:
39 --
40 --  p_api_version                                           NUMBER
41 --     Should be 1.0
42 --
43 --  p_init_msg_list                                         VARCHAR2
44 --     Standard api parameter.  Indicates whether to
45 --     re-initialize the message list.
46 --     Default is fnd_api.g_false.
47 --
48 --  p_validation_level                                      NUMBER
49 --     Standard api parameter.  Indicates validation level.
50 --     Use the default fnd_api.g_valid_level_full.
51 --
52 --  p_user_name                                             VARCHAR2(100)
53 --     The user's name, as defined in fnd_user table.
54 --     This is used to record audit info in the WHO columns.
55 --     If the user accepts the default, then the API will
56 --     use fnd_global.user_id.
57 --
58 --  p_spec_name                                             VARCHAR2(30)
59 --     Specification name.  Mixed case allowed.
60 --
61 --  p_organization_code                                     VARCHAR2
62 --     Organization code.
63 --
64 --  p_effective_from                                        DATE
65 --     Effective From date.  Default is SYSDATE.
66 --
67 --  p_effective_to                                          DATE
68 --     Effective To date.  Default is SYSDATE.
69 --
70 --  p_assignment_type                                       NUMBER
71 --     Each specification has an assignment type.  This
72 --     indicates the association of a specification to
73 --     either an item, a customer or a supplier.  The
74 --     following values are allowed:
75 --
76 --     1 = Item Spec     (qa_specs_pub.g_spec_type_item)
77 --     2 = Supplier Spec (qa_specs_pub.g_spec_type_supplier)
78 --     3 = Customer Spec (qa_specs_pub.g_spec_type_customer)
79 --
80 --     Default is qa_specs_pub.g_spec_type_item.
81 --
82 --  p_category_set_name                                     VARCHAR2
83 --     A specification can also be associated with a
84 --     category and category set.  This specifies the
85 --     category set.  This should be NULL if p_item_name
86 --     is specified.
87 --     Default is NULL.
88 --
89 --  p_category_name                                         VARCHAR2
90 --     A specification can also be associated with a
91 --     category and category set.  This specifies the
92 --     category.  This should be NULL if p_item_name
93 --     is specified.
94 --     Default is NULL.
95 --
96 --  p_item_name                                             VARCHAR2
97 --     The item name associated with this specification.
98 --     This should be NULL if p_category_set_name and
99 --     p_category_name are specified.
100 --     Default is NULL.
101 --
102 --  p_item_revision                                         VARCHAR2
103 --     The item revision associated with this specification.
104 --     This should be NULL if p_category_set_name and
105 --     p_category_name are specified.
106 --     Default is NULL.
107 --
108 --  p_supplier_name                                         VARCHAR2
109 --     The supplier associated with this specification.
110 --     Default is NULL.
111 --
112 --  p_customer_name                                         VARCHAR2
113 --     The customer associated with this specification.
114 --     Default is NULL.
115 --
116 --  p_sub_type_element                                      VARCHAR2
117 --     A specification can be tagged by a collection
118 --     element and value pair.  This indicates the
119 --     element name.
120 --     Default is NULL.
121 --
122 --  p_sub_type_element_value                                VARCHAR2
123 --     A specification can be tagged by a collection
124 --     element and value pair.  This indicates the
125 --     element value.
126 --     Default is NULL.
127 --
128 --  x_spec_id                                               OUT NUMBER
129 --     The specification ID created.
130 --
131 --  x_msg_count                                             OUT NUMBER
132 --     Standard api parameter.  Indicates no. of messages
133 --     put into the message stack.
134 --
135 --  x_msg_data                                              OUT VARCHAR2
136 --     Standard api parameter.  Messages returned.
137 --
138 --  x_return_status                                         OUT VARCHAR2
139 --     Standard api return status parameter.
140 --     Values: fnd_api.g_ret_sts_success,
141 --             fnd_api.g_ret_sts_error,
142 --             fnd_api.g_ret_sts_unexp_error.
143 --
144 /*#
145  * Creates a header of a specification.
146  * After calling this procedure, the user should call add_spec_element consecutively
147  * to add as many specification elements as needed.  Afterwards, call
148  * complete_spec_processing to finish the specification creation.
149  * @param p_api_version Should be 1.0
150  * @param p_init_msg_list Indicates whether to re-initialize the message list
151  * @param p_validation_level Indicates validation level
152  * @param p_user_name The user's name, as defined in fnd_user table
153  * @param p_spec_name Specification Name
154  * @param p_organization_code Organization code
155  * @param p_reference_spec Referenced Specification Name
156  * @param p_effective_from Effective From Date
157  * @param p_effective_to Effective To Date
158  * @param p_assignment_type specify Item or Supplier or Customer specification
159  * @param p_category_set_name Category Set Name
160  * @param p_category_name Category Name
161  * @param p_item_name Item Name
162  * @param p_item_revision Item Revision
163  * @param p_supplier_name Supplier associated with this specification
164  * @param p_customer_name Customer associated with this specification
165  * @param p_sub_type_element Collection Element Name, optional
166  * @param p_sub_type_element_value Collection Element Value, optional
167  * @param x_spec_id Specification ID that gets created automatically
168  * @param x_msg_count Count of messages in message stack
169  * @param x_msg_data Messages returned
170  * @param x_return_status API Return Status
171  * @rep:displayname Create Specification
172  */
173 PROCEDURE create_specification(
174     p_api_version               IN  NUMBER,
175     p_init_msg_list             IN  VARCHAR2  := fnd_api.g_false,
176     p_validation_level          IN  NUMBER    := fnd_api.g_valid_level_full,
177     p_user_name                 IN  VARCHAR2  := NULL,
178     p_spec_name                 IN  VARCHAR2,
179     p_organization_code         IN  VARCHAR2,
180     p_reference_spec            IN  VARCHAR2  := NULL,
181     p_effective_from            IN  DATE      := SYSDATE,
182     p_effective_to              IN  DATE      := NULL,
183     p_assignment_type           IN  NUMBER    := qa_specs_pub.g_spec_type_item,
184     p_category_set_name         IN  VARCHAR2  := NULL,
185     p_category_name             IN  VARCHAR2  := NULL,
186     p_item_name                 IN  VARCHAR2  := NULL,
187     p_item_revision             IN  VARCHAR2  := NULL,
188     p_supplier_name             IN  VARCHAR2  := NULL,
189     p_customer_name             IN  VARCHAR2  := NULL,
190     p_sub_type_element          IN  VARCHAR2  := NULL,
191     p_sub_type_element_value    IN  VARCHAR2  := NULL,
192     x_spec_id                   OUT NOCOPY NUMBER,
193     x_msg_count                 OUT NOCOPY NUMBER,
194     x_msg_data                  OUT NOCOPY VARCHAR2,
195     x_return_status             OUT NOCOPY VARCHAR2,
196     -- Bug 7430441.FP for Bug 6877858.
197     -- Added the attribute parameters in order to populate the DFF
198     -- fields too into the qa_specs table
199     -- pdube Wed Sep 24 03:17:03 PDT 2008
200     p_attribute_category        IN VARCHAR2 := NULL,
201     p_attribute1                IN VARCHAR2 := NULL,
202     p_attribute2                IN VARCHAR2 := NULL,
203     p_attribute3                IN VARCHAR2 := NULL,
204     p_attribute4                IN VARCHAR2 := NULL,
205     p_attribute5                IN VARCHAR2 := NULL,
206     p_attribute6                IN VARCHAR2 := NULL,
207     p_attribute7                IN VARCHAR2 := NULL,
208     p_attribute8                IN VARCHAR2 := NULL,
209     p_attribute9                IN VARCHAR2 := NULL,
210     p_attribute10               IN VARCHAR2 := NULL,
211     p_attribute11               IN VARCHAR2 := NULL,
212     p_attribute12               IN VARCHAR2 := NULL,
213     p_attribute13               IN VARCHAR2 := NULL,
214     p_attribute14               IN VARCHAR2 := NULL,
215     p_attribute15               IN VARCHAR2 := NULL );
216 
217 
218 --
219 -- API name        : add_spec_element
220 -- Type            : Public
221 -- Pre-reqs        : create_specification
222 --
223 -- API to add a specification element to a Specification.
224 -- Version 1.0
225 --
226 -- This API adds a specification element to an existing Specification
227 -- (most often created by a call to create_specification).  The user
228 -- may call this function consecutively to add as many specification
229 -- elements as needed.  Afterwards, call complete_spec_processing to
230 -- finish the specification creation.
231 --
232 -- Commit is never performed.
233 --
234 -- Parameters:
235 --
236 --  p_api_version                                           NUMBER
237 --     Should be 1.0
238 --
239 --  p_init_msg_list                                         VARCHAR2
240 --     Standard api parameter.  Indicates whether to
241 --     re-initialize the message list.
242 --     Default is fnd_api.g_false.
243 --
244 --  p_validation_level                                      NUMBER
245 --     Standard api parameter.  Indicates validation level.
246 --     Use the default fnd_api.g_valid_level_full.
247 --
248 --  p_user_name                                             VARCHAR2(100)
249 --     The user's name, as defined in fnd_user table.
250 --     This is used to record audit info in the WHO columns.
251 --     If the user accepts the default, then the API will
252 --     use fnd_global.user_id.
253 --
254 --  p_spec_name                                             VARCHAR2
255 --     Specification name.  Mixed case allowed.
256 --
257 --  p_organization_code                                     VARCHAR2
258 --     Organization code.
259 --
260 --  p_element_name                                          VARCHAR2
261 --     Name of the new specification element.  Must be
262 --     an existing collection element.
263 --
264 --  p_uom_code                                              VARCHAR2
265 --     The UOM code chosen for this spec element
266 --     Default is NULL.
267 --
268 --  p_enabled_flag                                          VARCHAR2
269 --     Indicates whether this element is enabled.
270 --     Values: fnd_api.g_true or fnd_api.g_false.
271 --     Default is fnd_api.g_true.
272 --
273 --  p_target_value                                          VARCHAR2
274 --     Target value.
275 --     Default is NULL.
276 --
277 --  p_upper_spec_limit                                      VARCHAR2
278 --     Upper Specification Limit.
279 --     Default is NULL.
280 --
281 --  p_lower_spec_limit                                      VARCHAR2
282 --     Lower Specification Limit.
283 --     Default is NULL.
284 --
285 --  p_upper_reasonable_limit                                VARCHAR2
286 --     Upper Reasonable Limit.
287 --     Default is NULL.
288 --
289 --  p_lower_reasonable_limit                                VARCHAR2
290 --     Lower Reasonable Limit.
291 --     Default is NULL.
292 --
293 --  p_upper_user_defined_limit                              VARCHAR2
294 --     Upper User-defined Limit.
295 --     Default is NULL.
296 --
297 --  p_lower_user_defined_limit                              VARCHAR2
298 --     Lower User-defined Limit.
299 --     Default is NULL.
300 --
301 --  x_msg_count                                             OUT NUMBER
302 --     Standard api parameter.  Indicates no. of messages
303 --     put into the message stack.
304 --
305 --  x_msg_data                                              OUT VARCHAR2
306 --     Standard api parameter.  Messages returned.
307 --
308 --  x_return_status                                         OUT VARCHAR2
309 --     Standard api return status parameter.
310 --     Values: fnd_api.g_ret_sts_success,
311 --             fnd_api.g_ret_sts_error,
312 --             fnd_api.g_ret_sts_unexp_error.
313 --
314 /*#
315  * Add specification element to an existing specification
316  * @param p_api_version Should be 1.0
317  * @param p_init_msg_list Indicates whether to re-initialize the message list
318  * @param p_validation_level Indicates validation level
319  * @param p_user_name The user's name, as defined in fnd_user table
320  * @param p_spec_name Specification Name
321  * @param p_organization_code Organization code
322  * @param p_element_name Name of specification element
323  * @param p_uom_code Unit of Measure code for this element
324  * @param p_enabled_flag indicate whether this spec element is enabled
325  * @param p_target_value Target Value
326  * @param p_upper_spec_limit Upper Specification Limit
327  * @param p_lower_spec_limit Lower Specification Limit
328  * @param p_upper_reasonable_limit Upper Reasonable Limit
329  * @param p_lower_reasonable_limit Lower Reasonable Limit
330  * @param p_upper_user_defined_limit Upper User-defined Limit
331  * @param p_lower_user_defined_limit Lower User-defined Limit
332  * @param x_msg_count Count of messages in message stack
333  * @param x_msg_data Messages returned
334  * @param x_return_status API Return Status
335  * @rep:displayname Add specification element
336  */
337 PROCEDURE add_spec_element(
338     p_api_version               IN      NUMBER,
339     p_init_msg_list             IN      VARCHAR2 := fnd_api.g_false,
340     p_validation_level          IN      NUMBER   := fnd_api.g_valid_level_full,
341     p_user_name                 IN      VARCHAR2 := NULL,
342     p_spec_name                 IN      VARCHAR2,
343     p_organization_code         IN      VARCHAR2,
344     p_element_name              IN      VARCHAR2,
345     p_uom_code                  IN      VARCHAR2 := NULL,
346     p_enabled_flag              IN      VARCHAR2 := fnd_api.g_true,
347     p_target_value              IN      VARCHAR2 := NULL,
348     p_upper_spec_limit          IN      VARCHAR2 := NULL,
349     p_lower_spec_limit          IN      VARCHAR2 := NULL,
350     p_upper_reasonable_limit    IN      VARCHAR2 := NULL,
351     p_lower_reasonable_limit    IN      VARCHAR2 := NULL,
352     p_upper_user_defined_limit  IN      VARCHAR2 := NULL,
353     p_lower_user_defined_limit  IN      VARCHAR2 := NULL,
354     x_msg_count                 OUT     NOCOPY NUMBER,
358     -- Added the attribute parameters in order to populate the DFF
355     x_msg_data                  OUT     NOCOPY VARCHAR2,
356     x_return_status             OUT     NOCOPY VARCHAR2,
357     -- 7430441.FP for Bug 7046198
359     -- fields too into the qa_spec_chars table
360     -- pdube Wed Sep 24 03:17:03 PDT 2008
361     p_attribute_category        IN VARCHAR2 := NULL,
362     p_attribute1                IN VARCHAR2 := NULL,
363     p_attribute2                IN VARCHAR2 := NULL,
364     p_attribute3                IN VARCHAR2 := NULL,
365     p_attribute4                IN VARCHAR2 := NULL,
366     p_attribute5                IN VARCHAR2 := NULL,
367     p_attribute6                IN VARCHAR2 := NULL,
368     p_attribute7                IN VARCHAR2 := NULL,
369     p_attribute8                IN VARCHAR2 := NULL,
370     p_attribute9                IN VARCHAR2 := NULL,
371     p_attribute10               IN VARCHAR2 := NULL,
372     p_attribute11               IN VARCHAR2 := NULL,
373     p_attribute12               IN VARCHAR2 := NULL,
374     p_attribute13               IN VARCHAR2 := NULL,
375     p_attribute14               IN VARCHAR2 := NULL,
376     p_attribute15               IN VARCHAR2 := NULL );
377 
378 
379 --
380 -- API name        : complete_spec_processing
381 -- Type            : Public
382 -- Pre-reqs        : create_specification, add_spec_elements
383 --
384 -- API to complete the Specification creation.
385 -- Version 1.0
386 --
387 -- This API completes the definition of a specification.
388 --
389 -- Parameters:
390 --
391 --  p_api_version                                           NUMBER
392 --     Should be 1.0
393 --
394 --  p_init_msg_list                                         VARCHAR2
395 --     Standard api parameter.  Indicates whether to
396 --     re-initialize the message list.
397 --     Default is fnd_api.g_false.
398 --
399 --  p_user_name                                             VARCHAR2(100)
400 --     The user's name, as defined in fnd_user table.
401 --     This is used to record audit info in the WHO columns.
402 --     If the user accepts the default, then the API will
403 --     use fnd_global.user_id.
404 --
405 --  p_spec_name                                             VARCHAR2
406 --     Specification name.  Mixed case allowed.
407 --
408 --  p_organization_code                                     VARCHAR2
409 --     Organization code.
410 --
411 --  p_commit                                                VARCHAR2
412 --     Indicates whether the API shall perform a
413 --     database commit.  Specify fnd_api.g_true or
414 --     fnd_api.g_false.
415 --     Default is fnd_api.g_false.
416 --
417 --  x_msg_count                                             OUT NUMBER
418 --     Standard api parameter.  Indicates no. of messages
419 --     put into the message stack.
420 --
421 --  x_msg_data                                              OUT VARCHAR2
422 --     Standard api parameter.  Messages returned.
423 --
424 --  x_return_status                                         OUT VARCHAR2
425 --     Standard api return status parameter.
426 --     Values: fnd_api.g_ret_sts_success,
427 --             fnd_api.g_ret_sts_error,
428 --             fnd_api.g_ret_sts_unexp_error.
429 --
430 /*#
431  * Complete definition of a new specification
432  * @param p_api_version Should be 1.0
433  * @param p_init_msg_list Indicates whether to re-initialize the message list
434  * @param p_user_name The user's name, as defined in fnd_user table
435  * @param p_spec_name Specification name
436  * @param p_organization_code Organization code
437  * @param p_commit Indicate if database commit should be performed
438  * @param x_msg_count Count of messages in message stack
439  * @param x_msg_data Messages returned
440  * @param x_return_status API Return Status
441  * @rep:displayname Complete specification processing
442  */
443 PROCEDURE complete_spec_processing(
444     p_api_version               IN      NUMBER,
445     p_init_msg_list             IN      VARCHAR2 := fnd_api.g_false,
446     p_user_name                 IN      VARCHAR2 := NULL,
447     p_spec_name                 IN      VARCHAR2,
448     p_organization_code         IN      VARCHAR2,
449     p_commit                    IN      VARCHAR2 := fnd_api.g_false,
450     x_msg_count                 OUT     NOCOPY NUMBER,
451     x_msg_data                  OUT     NOCOPY VARCHAR2,
452     x_return_status             OUT     NOCOPY VARCHAR2);
453 
454 
455 --
456 -- API name        : delete_specification
457 -- Type            : Public
458 -- Pre-reqs        : None.
459 --
460 -- API to delete a Specification.
461 -- Version 1.0
462 --
463 -- This API deletes a specification.  All spec elements will be
464 -- deleted in cascade fashion.
465 --
466 -- Parameters:
467 --
468 --  p_api_version                                           NUMBER
469 --     Should be 1.0
470 --
471 --  p_init_msg_list                                         VARCHAR2
472 --     Standard api parameter.  Indicates whether to
473 --     re-initialize the message list.
474 --     Default is fnd_api.g_false.
475 --
476 --  p_user_name                                             VARCHAR2(100)
477 --     The user's name, as defined in fnd_user table.
478 --     This is used to record audit info in the WHO columns.
482 --  p_spec_name                                             VARCHAR2
479 --     If the user accepts the default, then the API will
480 --     use fnd_global.user_id.
481 --
483 --     Specification name.  Mixed case allowed.
484 --
485 --  p_organization_code                                     VARCHAR2
486 --     Organization code.
487 --
488 --  p_commit                                                VARCHAR2
489 --     Indicates whether the API shall perform a
490 --     database commit.  Specify fnd_api.g_true or
491 --     fnd_api.g_false.
492 --     Default is fnd_api.g_false.
493 --
494 --  x_msg_count                                             OUT NUMBER
495 --     Standard api parameter.  Indicates no. of messages
496 --     put into the message stack.
497 --
498 --  x_msg_data                                              OUT VARCHAR2
499 --     Standard api parameter.  Messages returned.
500 --
501 --  x_return_status                                         OUT VARCHAR2
502 --     Standard api return status parameter.
503 --     Values: fnd_api.g_ret_sts_success,
504 --             fnd_api.g_ret_sts_error,
505 --             fnd_api.g_ret_sts_unexp_error.
506 --
507 /*#
508  * Delete an existing specification
509  * @param p_api_version Should be 1.0
510  * @param p_init_msg_list Indicates whether to re-initialize the message list
511  * @param p_user_name The user's name, as defined in fnd_user table
512  * @param p_spec_name Specification name
513  * @param p_organization_code Organization code
514  * @param p_commit Indicate if database commit should be performed
515  * @param x_msg_count Count of messages in message stack
516  * @param x_msg_data Messages returned
517  * @param x_return_status API Return Status
518  * @rep:displayname Delete Specification
519  */
520 PROCEDURE delete_specification(
521     p_api_version               IN      NUMBER,
522     p_init_msg_list             IN      VARCHAR2 := fnd_api.g_false,
523     p_user_name                 IN      VARCHAR2 := NULL,
524     p_spec_name                 IN      VARCHAR2,
525     p_organization_code         IN      VARCHAR2,
526     p_commit                    IN      VARCHAR2 := fnd_api.g_false,
527     x_msg_count                 OUT     NOCOPY NUMBER,
528     x_msg_data                  OUT     NOCOPY VARCHAR2,
529     x_return_status             OUT     NOCOPY VARCHAR2);
530 
531 
532 --
533 -- API name        : delete_spec_element
534 -- Type            : Public
535 -- Pre-reqs        : None.
536 --
537 -- API to delete a specification element.
538 -- Version 1.0
539 --
540 -- This API deletes a specification element from an existing
541 -- Specification.
542 --
543 -- Parameters:
544 --
545 --  p_api_version                                           NUMBER
546 --     Should be 1.0
547 --
548 --  p_init_msg_list                                         VARCHAR2
549 --     Standard api parameter.  Indicates whether to
550 --     re-initialize the message list.
551 --     Default is fnd_api.g_false.
552 --
553 --  p_user_name                                             VARCHAR2(100)
554 --     The user's name, as defined in fnd_user table.
555 --     This is used to record audit info in the WHO columns.
556 --     If the user accepts the default, then the API will
557 --     use fnd_global.user_id.
558 --
559 --  p_spec_name                                             VARCHAR2
560 --     Specification name.  Mixed case allowed.
561 --
562 --  p_organization_code                                     VARCHAR2
563 --     Organization code.
564 --
565 --  p_element_name                                          VARCHAR2
566 --     The specification element name to be deleted.
567 --
568 --  p_commit                                                VARCHAR2
569 --     Indicates whether the API shall perform a
570 --     database commit.  Specify fnd_api.g_true or
571 --     fnd_api.g_false.
572 --     Default is fnd_api.g_false.
573 --
574 --  x_msg_count                                             OUT NUMBER
575 --     Standard api parameter.  Indicates no. of messages
576 --     put into the message stack.
577 --
578 --  x_msg_data                                              OUT VARCHAR2
579 --     Standard api parameter.  Messages returned.
580 --
581 --  x_return_status                                         OUT VARCHAR2
582 --     Standard api return status parameter.
583 --     Values: fnd_api.g_ret_sts_success,
584 --             fnd_api.g_ret_sts_error,
585 --             fnd_api.g_ret_sts_unexp_error.
586 --
587 /*#
588  * Delete an element from a specification
589  * @param p_api_version Should be 1.0
590  * @param p_init_msg_list Indicates whether to re-initialize the message list
591  * @param p_user_name The user's name, as defined in fnd_user table
592  * @param p_spec_name Specification name
593  * @param p_element_name Name of specification element to be deleted
594  * @param p_organization_code Organization code
595  * @param p_commit Indicate if database commit should be performed
596  * @param x_msg_count Count of messages in message stack
597  * @param x_msg_data Messages returned
598  * @param x_return_status API Return Status
599  * @rep:displayname Delete specification element
600  */
601 PROCEDURE delete_spec_element(
602     p_api_version               IN      NUMBER,
603     p_init_msg_list             IN      VARCHAR2 := fnd_api.g_false,
604     p_user_name                 IN      VARCHAR2 := NULL,
605     p_spec_name                 IN      VARCHAR2,
606     p_organization_code         IN      VARCHAR2,
607     p_element_name              IN      VARCHAR2,
608     p_commit                    IN      VARCHAR2 := fnd_api.g_false,
609     x_msg_count                 OUT     NOCOPY NUMBER,
610     x_msg_data                  OUT     NOCOPY VARCHAR2,
611     x_return_status             OUT     NOCOPY VARCHAR2);
612 
613 
614 --
615 -- API name        : copy_specification
616 -- Type            : Public
617 -- Pre-reqs        : None.
618 --
619 -- API to copy a specification.
620 -- Version 1.0
621 --
622 -- This API duplicates a specification, together with its elements.
623 -- The user specifies an existing specification name of an organization
624 -- and a new specification name, a new item/revision combination and
625 -- a new (or same) organization.  A new specification will be created
626 -- for that item.
627 --
628 -- Parameters:
629 --
630 --  p_api_version                                           NUMBER
631 --     Should be 1.0
632 --
633 --  p_init_msg_list                                         VARCHAR2
634 --     Standard api parameter.  Indicates whether to
635 --     re-initialize the message list.
636 --     Default is fnd_api.g_false.
637 --
638 --  p_user_name                                             VARCHAR2(100)
639 --     The user's name, as defined in fnd_user table.
640 --     This is used to record audit info in the WHO columns.
641 --     If the user accepts the default, then the API will
642 --     use fnd_global.user_id.
643 --
644 --  p_spec_name                                             VARCHAR2
645 --     Original Specification name.
646 --
647 --  p_organization_code                                     VARCHAR2
648 --     Organization code.
649 --
650 --  p_to_spec_name                                          VARCHAR2
651 --     Target Specification name.
652 --
653 --  p_to_organization_code                                  VARCHAR2
654 --     Target Organization code.
655 --
656 --  p_to_item_name                                          VARCHAR2
657 --     The new item to be associated with the new
658 --     specification.
659 --
660 --  p_to_item_revision                                      VARCHAR2
661 --     The new item revision.  Null allowed.
662 --     Default is NULL.
663 --
664 --  p_commit                                                VARCHAR2
665 --     Indicates whether the API shall perform a
666 --     database commit.  Specify fnd_api.g_true or
667 --     fnd_api.g_false.
668 --     Default is fnd_api.g_false.
669 --
670 --  x_spec_id                                               OUT NUMBER
671 --     Specification ID of the created specification.
672 --
673 --  x_msg_count                                             OUT NUMBER
674 --     Standard api parameter.  Indicates no. of messages
675 --     put into the message stack.
676 --
677 --  x_msg_data                                              OUT VARCHAR2
678 --     Standard api parameter.  Messages returned.
679 --
680 --  x_return_status                                         OUT VARCHAR2
681 --     Standard api return status parameter.
682 --     Values: fnd_api.g_ret_sts_success,
683 --             fnd_api.g_ret_sts_error,
684 --             fnd_api.g_ret_sts_unexp_error.
685 --
686 /*#
687  * Create a new specification by copying definition of an existing specification
688  * @param p_api_version Should be 1.0
689  * @param p_init_msg_list Indicates whether to re-initialize the message list
690  * @param p_user_name The user's name, as defined in fnd_user table
691  * @param p_spec_name Specification name
692  * @param p_organization_code Organization code
693  * @param p_to_spec_name Destination specification name
694  * @param p_to_organization_code Destination organization code
695  * @param p_to_item_name New item to be associated with specification
696  * @param p_to_item_revision New item revision to be associated with specification
697  * @param p_commit Indicate if database commit should be performed
698  * @param x_spec_id New Specification ID that gets created automatically
699  * @param x_msg_count Count of messages in message stack
700  * @param x_msg_data Messages returned
701  * @param x_return_status API Return Status
702  * @rep:displayname Copy Specification
703  */
704 PROCEDURE copy_specification(
705     p_api_version               IN      NUMBER,
706     p_init_msg_list             IN      VARCHAR2 := fnd_api.g_false,
707     p_user_name                 IN      VARCHAR2 := NULL,
708     p_spec_name                 IN      VARCHAR2,
709     p_organization_code         IN      VARCHAR2,
710     p_to_spec_name              IN      VARCHAR2,
711     p_to_organization_code      IN      VARCHAR2,
712     p_to_item_name              IN      VARCHAR2,
713     p_to_item_revision          IN      VARCHAR2 := NULL,
714     p_commit                    IN      VARCHAR2 := fnd_api.g_false,
715     x_spec_id                   OUT     NOCOPY NUMBER,
716     x_msg_count                 OUT     NOCOPY NUMBER,
717     x_msg_data                  OUT     NOCOPY VARCHAR2,
718     x_return_status             OUT     NOCOPY VARCHAR2);
719 
720 END qa_specs_pub;