1 PACKAGE qa_specs_pub AUTHID CURRENT_USER AS
2 /* $Header: qltpspcb.pls 120.3 2011/05/19 12:22:52 ntungare 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 -- bug 12538300
218 -- Added 2 new attributes to set the supplier and customer
219 -- uniquely using the ids, in case there are duplicate names
220 --
221 p_supplier_id IN NUMBER := NULL,
222 p_customer_id IN NUMBER := NULL);
223
224
225 --
226 -- API name : add_spec_element
227 -- Type : Public
228 -- Pre-reqs : create_specification
229 --
230 -- API to add a specification element to a Specification.
231 -- Version 1.0
232 --
233 -- This API adds a specification element to an existing Specification
234 -- (most often created by a call to create_specification). The user
235 -- may call this function consecutively to add as many specification
236 -- elements as needed. Afterwards, call complete_spec_processing to
237 -- finish the specification creation.
238 --
239 -- Commit is never performed.
240 --
241 -- Parameters:
242 --
243 -- p_api_version NUMBER
244 -- Should be 1.0
245 --
246 -- p_init_msg_list VARCHAR2
247 -- Standard api parameter. Indicates whether to
248 -- re-initialize the message list.
249 -- Default is fnd_api.g_false.
250 --
251 -- p_validation_level NUMBER
252 -- Standard api parameter. Indicates validation level.
253 -- Use the default fnd_api.g_valid_level_full.
254 --
255 -- p_user_name VARCHAR2(100)
256 -- The user's name, as defined in fnd_user table.
257 -- This is used to record audit info in the WHO columns.
258 -- If the user accepts the default, then the API will
259 -- use fnd_global.user_id.
260 --
261 -- p_spec_name VARCHAR2
262 -- Specification name. Mixed case allowed.
263 --
264 -- p_organization_code VARCHAR2
265 -- Organization code.
266 --
267 -- p_element_name VARCHAR2
268 -- Name of the new specification element. Must be
269 -- an existing collection element.
270 --
271 -- p_uom_code VARCHAR2
272 -- The UOM code chosen for this spec element
273 -- Default is NULL.
274 --
275 -- p_enabled_flag VARCHAR2
276 -- Indicates whether this element is enabled.
277 -- Values: fnd_api.g_true or fnd_api.g_false.
278 -- Default is fnd_api.g_true.
279 --
280 -- p_target_value VARCHAR2
281 -- Target value.
282 -- Default is NULL.
283 --
284 -- p_upper_spec_limit VARCHAR2
285 -- Upper Specification Limit.
286 -- Default is NULL.
287 --
288 -- p_lower_spec_limit VARCHAR2
289 -- Lower Specification Limit.
290 -- Default is NULL.
291 --
292 -- p_upper_reasonable_limit VARCHAR2
293 -- Upper Reasonable Limit.
294 -- Default is NULL.
295 --
296 -- p_lower_reasonable_limit VARCHAR2
297 -- Lower Reasonable Limit.
298 -- Default is NULL.
299 --
300 -- p_upper_user_defined_limit VARCHAR2
301 -- Upper User-defined Limit.
302 -- Default is NULL.
303 --
304 -- p_lower_user_defined_limit VARCHAR2
305 -- Lower User-defined Limit.
306 -- Default is NULL.
307 --
308 -- x_msg_count OUT NUMBER
309 -- Standard api parameter. Indicates no. of messages
310 -- put into the message stack.
311 --
312 -- x_msg_data OUT VARCHAR2
313 -- Standard api parameter. Messages returned.
314 --
315 -- x_return_status OUT VARCHAR2
316 -- Standard api return status parameter.
317 -- Values: fnd_api.g_ret_sts_success,
318 -- fnd_api.g_ret_sts_error,
319 -- fnd_api.g_ret_sts_unexp_error.
320 --
321 /*#
322 * Add specification element to an existing specification
323 * @param p_api_version Should be 1.0
324 * @param p_init_msg_list Indicates whether to re-initialize the message list
325 * @param p_validation_level Indicates validation level
326 * @param p_user_name The user's name, as defined in fnd_user table
327 * @param p_spec_name Specification Name
328 * @param p_organization_code Organization code
329 * @param p_element_name Name of specification element
330 * @param p_uom_code Unit of Measure code for this element
331 * @param p_enabled_flag indicate whether this spec element is enabled
332 * @param p_target_value Target Value
333 * @param p_upper_spec_limit Upper Specification Limit
334 * @param p_lower_spec_limit Lower Specification Limit
335 * @param p_upper_reasonable_limit Upper Reasonable Limit
336 * @param p_lower_reasonable_limit Lower Reasonable Limit
337 * @param p_upper_user_defined_limit Upper User-defined Limit
338 * @param p_lower_user_defined_limit Lower User-defined Limit
339 * @param x_msg_count Count of messages in message stack
340 * @param x_msg_data Messages returned
341 * @param x_return_status API Return Status
345 p_api_version IN NUMBER,
342 * @rep:displayname Add specification element
343 */
344 PROCEDURE add_spec_element(
346 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
347 p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
348 p_user_name IN VARCHAR2 := NULL,
349 p_spec_name IN VARCHAR2,
350 p_organization_code IN VARCHAR2,
351 p_element_name IN VARCHAR2,
352 p_uom_code IN VARCHAR2 := NULL,
353 p_enabled_flag IN VARCHAR2 := fnd_api.g_true,
354 p_target_value IN VARCHAR2 := NULL,
355 p_upper_spec_limit IN VARCHAR2 := NULL,
356 p_lower_spec_limit IN VARCHAR2 := NULL,
357 p_upper_reasonable_limit IN VARCHAR2 := NULL,
358 p_lower_reasonable_limit IN VARCHAR2 := NULL,
359 p_upper_user_defined_limit IN VARCHAR2 := NULL,
360 p_lower_user_defined_limit IN VARCHAR2 := NULL,
361 x_msg_count OUT NOCOPY NUMBER,
362 x_msg_data OUT NOCOPY VARCHAR2,
363 x_return_status OUT NOCOPY VARCHAR2,
364 -- 7430441.FP for Bug 7046198
365 -- Added the attribute parameters in order to populate the DFF
366 -- fields too into the qa_spec_chars table
367 -- pdube Wed Sep 24 03:17:03 PDT 2008
368 p_attribute_category IN VARCHAR2 := NULL,
369 p_attribute1 IN VARCHAR2 := NULL,
370 p_attribute2 IN VARCHAR2 := NULL,
371 p_attribute3 IN VARCHAR2 := NULL,
372 p_attribute4 IN VARCHAR2 := NULL,
373 p_attribute5 IN VARCHAR2 := NULL,
374 p_attribute6 IN VARCHAR2 := NULL,
375 p_attribute7 IN VARCHAR2 := NULL,
376 p_attribute8 IN VARCHAR2 := NULL,
377 p_attribute9 IN VARCHAR2 := NULL,
378 p_attribute10 IN VARCHAR2 := NULL,
379 p_attribute11 IN VARCHAR2 := NULL,
380 p_attribute12 IN VARCHAR2 := NULL,
381 p_attribute13 IN VARCHAR2 := NULL,
382 p_attribute14 IN VARCHAR2 := NULL,
383 p_attribute15 IN VARCHAR2 := NULL );
384
385
386 --
387 -- API name : complete_spec_processing
388 -- Type : Public
389 -- Pre-reqs : create_specification, add_spec_elements
390 --
391 -- API to complete the Specification creation.
392 -- Version 1.0
393 --
394 -- This API completes the definition of a specification.
395 --
396 -- Parameters:
397 --
398 -- p_api_version NUMBER
399 -- Should be 1.0
400 --
401 -- p_init_msg_list VARCHAR2
402 -- Standard api parameter. Indicates whether to
403 -- re-initialize the message list.
404 -- Default is fnd_api.g_false.
405 --
406 -- p_user_name VARCHAR2(100)
407 -- The user's name, as defined in fnd_user table.
408 -- This is used to record audit info in the WHO columns.
409 -- If the user accepts the default, then the API will
410 -- use fnd_global.user_id.
411 --
412 -- p_spec_name VARCHAR2
413 -- Specification name. Mixed case allowed.
414 --
415 -- p_organization_code VARCHAR2
416 -- Organization code.
417 --
418 -- p_commit VARCHAR2
419 -- Indicates whether the API shall perform a
420 -- database commit. Specify fnd_api.g_true or
421 -- fnd_api.g_false.
422 -- Default is fnd_api.g_false.
423 --
424 -- x_msg_count OUT NUMBER
425 -- Standard api parameter. Indicates no. of messages
426 -- put into the message stack.
427 --
428 -- x_msg_data OUT VARCHAR2
429 -- Standard api parameter. Messages returned.
430 --
431 -- x_return_status OUT VARCHAR2
432 -- Standard api return status parameter.
433 -- Values: fnd_api.g_ret_sts_success,
434 -- fnd_api.g_ret_sts_error,
435 -- fnd_api.g_ret_sts_unexp_error.
436 --
437 /*#
438 * Complete definition of a new specification
439 * @param p_api_version Should be 1.0
440 * @param p_init_msg_list Indicates whether to re-initialize the message list
441 * @param p_user_name The user's name, as defined in fnd_user table
442 * @param p_spec_name Specification name
443 * @param p_organization_code Organization code
444 * @param p_commit Indicate if database commit should be performed
445 * @param x_msg_count Count of messages in message stack
446 * @param x_msg_data Messages returned
447 * @param x_return_status API Return Status
448 * @rep:displayname Complete specification processing
449 */
450 PROCEDURE complete_spec_processing(
451 p_api_version IN NUMBER,
452 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
453 p_user_name IN VARCHAR2 := NULL,
457 x_msg_count OUT NOCOPY NUMBER,
454 p_spec_name IN VARCHAR2,
455 p_organization_code IN VARCHAR2,
456 p_commit IN VARCHAR2 := fnd_api.g_false,
458 x_msg_data OUT NOCOPY VARCHAR2,
459 x_return_status OUT NOCOPY VARCHAR2);
460
461
462 --
463 -- API name : delete_specification
464 -- Type : Public
465 -- Pre-reqs : None.
466 --
467 -- API to delete a Specification.
468 -- Version 1.0
469 --
470 -- This API deletes a specification. All spec elements will be
471 -- deleted in cascade fashion.
472 --
473 -- Parameters:
474 --
475 -- p_api_version NUMBER
476 -- Should be 1.0
477 --
478 -- p_init_msg_list VARCHAR2
479 -- Standard api parameter. Indicates whether to
480 -- re-initialize the message list.
481 -- Default is fnd_api.g_false.
482 --
483 -- p_user_name VARCHAR2(100)
484 -- The user's name, as defined in fnd_user table.
485 -- This is used to record audit info in the WHO columns.
486 -- If the user accepts the default, then the API will
487 -- use fnd_global.user_id.
488 --
489 -- p_spec_name VARCHAR2
490 -- Specification name. Mixed case allowed.
491 --
492 -- p_organization_code VARCHAR2
493 -- Organization code.
494 --
495 -- p_commit VARCHAR2
496 -- Indicates whether the API shall perform a
497 -- database commit. Specify fnd_api.g_true or
498 -- fnd_api.g_false.
499 -- Default is fnd_api.g_false.
500 --
501 -- x_msg_count OUT NUMBER
502 -- Standard api parameter. Indicates no. of messages
503 -- put into the message stack.
504 --
505 -- x_msg_data OUT VARCHAR2
506 -- Standard api parameter. Messages returned.
507 --
508 -- x_return_status OUT VARCHAR2
509 -- Standard api return status parameter.
510 -- Values: fnd_api.g_ret_sts_success,
511 -- fnd_api.g_ret_sts_error,
512 -- fnd_api.g_ret_sts_unexp_error.
513 --
514 /*#
515 * Delete an existing specification
516 * @param p_api_version Should be 1.0
517 * @param p_init_msg_list Indicates whether to re-initialize the message list
518 * @param p_user_name The user's name, as defined in fnd_user table
519 * @param p_spec_name Specification name
520 * @param p_organization_code Organization code
521 * @param p_commit Indicate if database commit should be performed
522 * @param x_msg_count Count of messages in message stack
523 * @param x_msg_data Messages returned
524 * @param x_return_status API Return Status
525 * @rep:displayname Delete Specification
526 */
527 PROCEDURE delete_specification(
528 p_api_version IN NUMBER,
529 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
530 p_user_name IN VARCHAR2 := NULL,
531 p_spec_name IN VARCHAR2,
532 p_organization_code IN VARCHAR2,
533 p_commit IN VARCHAR2 := fnd_api.g_false,
534 x_msg_count OUT NOCOPY NUMBER,
535 x_msg_data OUT NOCOPY VARCHAR2,
536 x_return_status OUT NOCOPY VARCHAR2);
537
538
539 --
540 -- API name : delete_spec_element
541 -- Type : Public
542 -- Pre-reqs : None.
543 --
544 -- API to delete a specification element.
545 -- Version 1.0
546 --
547 -- This API deletes a specification element from an existing
548 -- Specification.
549 --
550 -- Parameters:
551 --
552 -- p_api_version NUMBER
553 -- Should be 1.0
554 --
555 -- p_init_msg_list VARCHAR2
556 -- Standard api parameter. Indicates whether to
557 -- re-initialize the message list.
558 -- Default is fnd_api.g_false.
559 --
560 -- p_user_name VARCHAR2(100)
561 -- The user's name, as defined in fnd_user table.
562 -- This is used to record audit info in the WHO columns.
563 -- If the user accepts the default, then the API will
564 -- use fnd_global.user_id.
565 --
566 -- p_spec_name VARCHAR2
567 -- Specification name. Mixed case allowed.
568 --
569 -- p_organization_code VARCHAR2
570 -- Organization code.
571 --
572 -- p_element_name VARCHAR2
573 -- The specification element name to be deleted.
574 --
575 -- p_commit VARCHAR2
579 -- Default is fnd_api.g_false.
576 -- Indicates whether the API shall perform a
577 -- database commit. Specify fnd_api.g_true or
578 -- fnd_api.g_false.
580 --
581 -- x_msg_count OUT NUMBER
582 -- Standard api parameter. Indicates no. of messages
583 -- put into the message stack.
584 --
585 -- x_msg_data OUT VARCHAR2
586 -- Standard api parameter. Messages returned.
587 --
588 -- x_return_status OUT VARCHAR2
589 -- Standard api return status parameter.
590 -- Values: fnd_api.g_ret_sts_success,
591 -- fnd_api.g_ret_sts_error,
592 -- fnd_api.g_ret_sts_unexp_error.
593 --
594 /*#
595 * Delete an element from a specification
596 * @param p_api_version Should be 1.0
597 * @param p_init_msg_list Indicates whether to re-initialize the message list
598 * @param p_user_name The user's name, as defined in fnd_user table
599 * @param p_spec_name Specification name
600 * @param p_element_name Name of specification element to be deleted
601 * @param p_organization_code Organization code
602 * @param p_commit Indicate if database commit should be performed
603 * @param x_msg_count Count of messages in message stack
604 * @param x_msg_data Messages returned
605 * @param x_return_status API Return Status
606 * @rep:displayname Delete specification element
607 */
608 PROCEDURE delete_spec_element(
609 p_api_version IN NUMBER,
610 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
611 p_user_name IN VARCHAR2 := NULL,
612 p_spec_name IN VARCHAR2,
613 p_organization_code IN VARCHAR2,
614 p_element_name IN VARCHAR2,
615 p_commit IN VARCHAR2 := fnd_api.g_false,
616 x_msg_count OUT NOCOPY NUMBER,
617 x_msg_data OUT NOCOPY VARCHAR2,
618 x_return_status OUT NOCOPY VARCHAR2);
619
620
621 --
622 -- API name : copy_specification
623 -- Type : Public
624 -- Pre-reqs : None.
625 --
626 -- API to copy a specification.
627 -- Version 1.0
628 --
629 -- This API duplicates a specification, together with its elements.
630 -- The user specifies an existing specification name of an organization
631 -- and a new specification name, a new item/revision combination and
632 -- a new (or same) organization. A new specification will be created
633 -- for that item.
634 --
635 -- Parameters:
636 --
637 -- p_api_version NUMBER
638 -- Should be 1.0
639 --
640 -- p_init_msg_list VARCHAR2
641 -- Standard api parameter. Indicates whether to
642 -- re-initialize the message list.
643 -- Default is fnd_api.g_false.
644 --
645 -- p_user_name VARCHAR2(100)
646 -- The user's name, as defined in fnd_user table.
647 -- This is used to record audit info in the WHO columns.
648 -- If the user accepts the default, then the API will
649 -- use fnd_global.user_id.
650 --
651 -- p_spec_name VARCHAR2
652 -- Original Specification name.
653 --
654 -- p_organization_code VARCHAR2
655 -- Organization code.
656 --
657 -- p_to_spec_name VARCHAR2
658 -- Target Specification name.
659 --
660 -- p_to_organization_code VARCHAR2
661 -- Target Organization code.
662 --
663 -- p_to_item_name VARCHAR2
664 -- The new item to be associated with the new
665 -- specification.
666 --
667 -- p_to_item_revision VARCHAR2
668 -- The new item revision. Null allowed.
669 -- Default is NULL.
670 --
671 -- p_commit VARCHAR2
672 -- Indicates whether the API shall perform a
673 -- database commit. Specify fnd_api.g_true or
674 -- fnd_api.g_false.
675 -- Default is fnd_api.g_false.
676 --
677 -- x_spec_id OUT NUMBER
678 -- Specification ID of the created specification.
679 --
680 -- x_msg_count OUT NUMBER
681 -- Standard api parameter. Indicates no. of messages
682 -- put into the message stack.
683 --
684 -- x_msg_data OUT VARCHAR2
685 -- Standard api parameter. Messages returned.
686 --
687 -- x_return_status OUT VARCHAR2
688 -- Standard api return status parameter.
689 -- Values: fnd_api.g_ret_sts_success,
690 -- fnd_api.g_ret_sts_error,
691 -- fnd_api.g_ret_sts_unexp_error.
692 --
693 /*#
694 * Create a new specification by copying definition of an existing specification
695 * @param p_api_version Should be 1.0
696 * @param p_init_msg_list Indicates whether to re-initialize the message list
697 * @param p_user_name The user's name, as defined in fnd_user table
698 * @param p_spec_name Specification name
699 * @param p_organization_code Organization code
700 * @param p_to_spec_name Destination specification name
701 * @param p_to_organization_code Destination organization code
702 * @param p_to_item_name New item to be associated with specification
703 * @param p_to_item_revision New item revision to be associated with specification
704 * @param p_commit Indicate if database commit should be performed
705 * @param x_spec_id New Specification ID that gets created automatically
706 * @param x_msg_count Count of messages in message stack
707 * @param x_msg_data Messages returned
708 * @param x_return_status API Return Status
709 * @rep:displayname Copy Specification
710 */
711 PROCEDURE copy_specification(
712 p_api_version IN NUMBER,
713 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
714 p_user_name IN VARCHAR2 := NULL,
715 p_spec_name IN VARCHAR2,
716 p_organization_code IN VARCHAR2,
717 p_to_spec_name IN VARCHAR2,
718 p_to_organization_code IN VARCHAR2,
719 p_to_item_name IN VARCHAR2,
720 p_to_item_revision IN VARCHAR2 := NULL,
721 p_commit IN VARCHAR2 := fnd_api.g_false,
722 x_spec_id OUT NOCOPY NUMBER,
723 x_msg_count OUT NOCOPY NUMBER,
724 x_msg_data OUT NOCOPY VARCHAR2,
725 x_return_status OUT NOCOPY VARCHAR2);
726
727 END qa_specs_pub;