DBA Data[Home] [Help]

PACKAGE: APPS.QA_PLANS_PUB

Source


1 PACKAGE qa_plans_pub AUTHID CURRENT_USER AS
2 /* $Header: qltpplnb.pls 120.3.12010000.2 2010/04/30 10:15:18 ntungare ship $ */
3 /*#
4  * This package is the public interface for Quality Collection Plans setup.
5  * It allows for the creation of new collection plans. A new collection plan
6  * can be created as a copy of an existing collection plan, or with addition
7  * of individual collection elements. This package also supports deleting an
8  * existing collection plan.
9  * @rep:scope public
10  * @rep:product QA
11  * @rep:displayname Collection Plan Setup
12  * @rep:lifecycle active
13  * @rep:category BUSINESS_ENTITY QA_PLAN
14  */
15 
16 --
17 -- Global constants
18 --
19 
20 --
21 -- Seeded Plan Type Codes
22 --
23     g_plan_type_wip_inspection CONSTANT NUMBER := 1;
24     g_plan_type_rcv_inspection CONSTANT NUMBER := 2;
25     g_plan_type_fgi_inspection CONSTANT NUMBER := 3;
26     g_plan_type_field_returns  CONSTANT NUMBER := 4;
27 
28 --
29 -- Seeded Specification Assignment Types
30 --
31 
32     g_spec_type_item     CONSTANT NUMBER := 1;
33     g_spec_type_supplier CONSTANT NUMBER := 2;
34     g_spec_type_customer CONSTANT NUMBER := 3;
35     g_spec_type_none     CONSTANT NUMBER := 4;
36 
37 --
38 -- Frequently a plan element attribute can inherit the default
39 -- value defined for the element.  If we also allow the user to
40 -- override this default, then we have to face the problem of
41 -- ambiguity.  An example is, when the user specify NULL as
42 -- the plan element "Default Value", does he mean to inherit
43 -- the value from the element level?  or does he mean override
44 -- whatever value was at the element level, but use NULL as the
45 -- value?  So, we define a constant to mean inherit.
46 --
47     g_inherit  CONSTANT VARCHAR2(1) := chr(0);
48 
49 --
50 -- API name        : create_collection_plan
51 -- Type            : Public
52 -- Pre-reqs        : None
53 --
54 -- API to create a new Collection Plan in Oracle Quality.
55 -- Version 1.0
56 --
57 -- This API creates a header of a Collection Plan.  After calling
58 -- this procedure, the user should call add_plan_element consecutively
59 -- to add as many collection elements as needed.  Afterwards, call
60 -- complete_plan_processing to finish the plan creation.
61 --
62 -- Database commit is never performed.
63 --
64 -- Parameters:
65 --
66 --  p_api_version                                           NUMBER
67 --     Should be 1.0
68 --
69 --  p_init_msg_list                                         VARCHAR2
70 --     Standard api parameter.  Indicates whether to
71 --     re-initialize the message list.
72 --     Default is fnd_api.g_false.
73 --
74 --  p_validation_level                                      NUMBER
75 --     Standard api parameter.  Indicates validation level.
76 --     Use the default fnd_api.g_valid_level_full.
77 --
78 --  p_user_name                                             VARCHAR2(100)
79 --     The user's name, as defined in fnd_user table.
80 --     This is used to record audit info in the WHO columns.
81 --     If the user accepts the default, then the API will
82 --     use fnd_global.user_id.
83 --
84 --  p_plan_name                                             VARCHAR2(30)
85 --     Plan name.  Automatically converted to upper case.
86 --
87 --  p_organization_code                                     VARCHAR2
88 --     Organization code.
89 --
90 --  p_plan_type                                             VARCHAR2
91 --     Collection plan type as set up in the Setup
92 --     Collection Plan Type form. This is the descriptive name
93 --     instead of the plan type code.
94 --
95 --     These are the seeded plan type code and description.
96 --
97 --     1 = WIP Inspection        (qa_plans_pub.g_plan_type_wip_inspection)
98 --     2 = Receiving Inspection  (qa_plans_pub.g_plan_type_rcv_inspection)
99 --     3 = FGI Inspection        (qa_plans_pub.g_plan_type_fgi_inspection)
100 --     4 = Field Returns         (qa_plans_pub.g_plan_type_field_returns)
101 --
102 --  p_description                                           VARCHAR2(150)
103 --     Description of the plan.
104 --     Default is NULL.
105 --
106 --  p_effective_from                                        DATE
107 --     Start date.  Specify NULL if no start date limit.
108 --     Default is sysdate.
109 --
110 --  p_effective_to                                          DATE
111 --     End date.  Specify NULL if no end date limit.
112 --     Default is NULL.
113 --
114 --  p_spec_assignment_type                                  NUMBER
115 --     A plan can be associated with a specification type:
116 --
117 --     1 = Item Specification     (qa_plans_pub.g_spec_type_item)
118 --     2 = Supplier Specification (qa_plans_pub.g_spec_type_supplier)
119 --     3 = Customer Specification (qa_plans_pub.g_spec_type_customer)
120 --     4 = No Specification       (qa_plans_pub.g_spec_type_none)
121 --
122 --     Default is qa_plans_pub.g_spec_type_none.
123 --
124 --  x_plan_id                                               OUT NUMBER
125 --     The plan ID created.
126 --
127 --  x_msg_count                                             OUT NUMBER
128 --     Standard api parameter.  Indicates no. of messages
129 --     put into the message stack.
130 --
131 --  x_msg_data                                              OUT VARCHAR2
132 --     Standard api parameter.  Messages returned.
133 --
134 --  x_return_status                                         OUT VARCHAR2
135 --     Standard api return status parameter.
136 --     Values: fnd_api.g_ret_sts_success,
137 --             fnd_api.g_ret_sts_error,
138 --             fnd_api.g_ret_sts_unexp_error.
139 --
140 /*#
141  * Creates a header of a Collection Plan.
142  * After calling this procedure, the user should call add_plan_element consecutively
143  * to add as many collection elements as needed.  Afterwards, call
144  * complete_plan_processing to finish the plan creation.
145  * @param p_api_version Should be 1.0
146  * @param p_init_msg_list Indicates whether to re-initialize the message list
147  * @param p_validation_level Indicates validation level
148  * @param p_user_name The user's name, as defined in fnd_user table
149  * @param p_plan_name Plan name, Automatically converted to upper case
150  * @param p_organization_code Organization code
151  * @param p_plan_type Collection plan type
152  * @param p_description Plan Description
153  * @param p_effective_from Plan Effective From Date
154  * @param p_effective_to Plan Effective To Date
155  * @param p_spec_assignment_type Specification Type
156  * @param x_plan_id Plan ID that gets created
157  * @param x_msg_count Count of messages in message stack
158  * @param x_msg_data Messages returned
159  * @param x_return_status API Return Status
160  * @param p_attribute_category DFF attribute category
161  * @param p_attribute1 DFF attribute 1
162  * @param p_attribute2 DFF attribute 2
163  * @param p_attribute3 DFF attribute 3
164  * @param p_attribute4 DFF attribute 4
165  * @param p_attribute5 DFF attribute 5
166  * @param p_attribute6 DFF attribute 6
167  * @param p_attribute7 DFF attribute 7
168  * @param p_attribute8 DFF attribute 8
169  * @param p_attribute9 DFF attribute 9
170  * @param p_attribute10 DFF attribute 10
171  * @param p_attribute11 DFF attribute 11
172  * @param p_attribute12 DFF attribute 12
173  * @param p_attribute13 DFF attribute 13
174  * @param p_attribute14 DFF attribute 14
175  * @param p_attribute15 DFF attribute 15
176  * @rep:displayname Create a Collection Plan
177  */
178 PROCEDURE create_collection_plan(
179     p_api_version               IN  NUMBER,
180     p_init_msg_list             IN  VARCHAR2  := fnd_api.g_false,
181     p_validation_level          IN  NUMBER    := fnd_api.g_valid_level_full,
182     p_user_name                 IN  VARCHAR2  := NULL,
183     p_plan_name                 IN  VARCHAR2,
184     p_organization_code         IN  VARCHAR2,
185     p_plan_type       		IN  VARCHAR2,
186     p_description               IN  VARCHAR2  := NULL,
187     p_effective_from            IN  DATE      := sysdate,
188     p_effective_to              IN  DATE      := NULL,
189     p_spec_assignment_type      IN  NUMBER    := qa_plans_pub.g_spec_type_none,
190     p_multirow_flag             IN  NUMBER    := 2,
191     x_plan_id                   OUT NOCOPY NUMBER,
192     x_msg_count                 OUT NOCOPY NUMBER,
193     x_msg_data                  OUT NOCOPY VARCHAR2,
194     x_return_status             OUT NOCOPY VARCHAR2,
195     p_attribute_category        IN VARCHAR2   := NULL,
196     p_attribute1                IN VARCHAR2   := NULL,
197     p_attribute2                IN VARCHAR2   := NULL,
198     p_attribute3                IN VARCHAR2   := NULL,
199     p_attribute4                IN VARCHAR2   := NULL,
200     p_attribute5                IN VARCHAR2   := NULL,
201     p_attribute6                IN VARCHAR2   := NULL,
202     p_attribute7                IN VARCHAR2   := NULL,
203     p_attribute8                IN VARCHAR2   := NULL,
204     p_attribute9                IN VARCHAR2   := NULL,
205     p_attribute10               IN VARCHAR2   := NULL,
206     p_attribute11               IN VARCHAR2   := NULL,
207     p_attribute12               IN VARCHAR2   := NULL,
208     p_attribute13               IN VARCHAR2   := NULL,
209     p_attribute14               IN VARCHAR2   := NULL,
210     p_attribute15               IN VARCHAR2   := NULL);
211 
212 
213 --
214 -- API name        : add_plan_element
215 -- Type            : Public
216 -- Pre-reqs        : None
217 --
218 -- API to add a new element to an existing collection plan.
219 -- Version 1.0
220 --
221 -- This API adds a new element to an existing collection plan, most
222 -- probably, but not necessarily, created by create_collection_plan.
223 -- The user may call add_plan_element consecutively to add as many
224 -- collection elements as needed.  Afterwards, call
225 -- complete_plan_processing to finish the plan creation.
226 --
227 -- Database commit is never performed.
228 --
229 -- Parameters:
230 --
231 --  p_api_version                                           NUMBER
232 --     Should be 1.0
233 --
234 --  p_init_msg_list                                         VARCHAR2
235 --     Standard api parameter.  Indicates whether to
236 --     re-initialize the message list.
237 --     Default is fnd_api.g_false.
238 --
239 --  p_validation_level                                      NUMBER
240 --     Standard api parameter.  Indicates validation level.
241 --     Use the default fnd_api.g_valid_level_full.
242 --
243 --  p_user_name                                             VARCHAR2(100)
244 --     The user's name, as defined in fnd_user table.
245 --     This is used to record audit info in the WHO columns.
246 --     If the user accepts the default, then the API will
247 --     use fnd_global.user_id.
248 --
249 --  p_plan_name                                             VARCHAR2(30)
250 --     Plan name.  Automatically converted to upper case.
251 --
252 --  p_organization_code                                     VARCHAR2
253 --     Organization code.
254 --
255 --  p_element_name                                          VARCHAR2(30)
256 --     Name of the collection element to be added.
257 --     Mixed case.
258 --
259 --  p_prompt_sequence                                       NUMBER
260 --     The integer prompt sequence.
261 --     Default is NULL, which will auto-assign as the
262 --     last element.
263 --
264 --  p_prompt                                                VARCHAR2(30)
265 --     The prompt to appear as column heading.
266 --     Default is g_inherit, which will use the element's
267 --     prompt.
268 --
269 --  p_default_value                                         VARCHAR2(150)
270 --     Default value of the element.
271 --     Default is g_inherit, which will use the element's
272 --     default value.
273 --
274 --  p_enabled_flag                                          VARCHAR2
275 --     Enabled flag.
276 --     Valid values are fnd_api.g_true or fnd_api.g_false.
277 --     Default is fnd_api.g_true.
278 --
279 --  p_mandatory_flag                                        VARCHAR2
280 --     Mandatory flag.
281 --     Valid values are fnd_api.g_true or fnd_api.g_false
282 --     and g_inherit.
283 --     Default is g_inherit which will inherit the value
284 --     set up for the collection element.
285 --
286 --  p_displayed_flag                                        VARCHAR2
287 --     Display flag.  Specify whether this element will
288 --     be displayed during transaction entry form.
289 --     Valid values are fnd_api.g_true or fnd_api.g_false.
290 --     Default is fnd_api.g_true.
291 --
292 --  p_result_column_name                                    VARCHAR2
293 --     This parameter is intended for use by experienced
294 --     users who are familiar with the underlying QA data
295 --     model.  This parameter suggests a database column
296 --     in qa_results table for use as storage.  Most users
297 --     should simply accept the default value of NULL and
298 --     let the API selects a correct database column.
299 --
300 --  x_msg_count                                             OUT NUMBER
301 --     Standard api parameter.  Indicates no. of messages
302 --     put into the message stack.
303 --
304 --  x_msg_data                                              OUT VARCHAR2
305 --     Standard api parameter.  Messages returned.
306 --
307 --  x_return_status                                         OUT VARCHAR2
308 --     Standard api return status parameter.
309 --     Values: fnd_api.g_ret_sts_success,
310 --             fnd_api.g_ret_sts_error,
311 --             fnd_api.g_ret_sts_unexp_error.
312 --
313 --  Bug 3709284. Added three new flags for Read Only Plan elements
314 --  description given below.
315 -- saugupta Mon, 21 Jun 2004 02:22:47 -0700 PDT
316 --
317 -- p_read_only_flag
318 --     Read Only Flag. Specify whether this element will be
319 --     displayed as non editable and non updateable.
320 --     Valid values are fnd_api.g_true or fnd_api.g_false.
321 --     Default is NULL.
322 --
323 -- p_ss_poplist_flag
324 --     Display as poplist on Workbench. Displays the element
325 --     values as a poplist instead of default LOV for faster
326 --     working of wrokbench application.
327 --     Valid values are fnd_api.g_true or fnd_api.g_false.
328 --     Default is NULL.
329 --
330 -- p_information_flag
331 --    Information flag. Dispalys a information icon for the
332 --    element in workbench application.
333 --     Valid values are fnd_api.g_true or fnd_api.g_false.
334 --     Default is NULL.
335 --
336 -- saugupta Thu Aug 28 08:59:59 PDT 2003
337 --
338 /*#
339  * Add a new element to an existing collection plan
340  * @param p_api_version Should be 1.0
341  * @param p_init_msg_list Indicates whether to re-initialize the message list
342  * @param p_validation_level Indicates validation level
343  * @param p_user_name The user's name, as defined in fnd_user table
344  * @param p_plan_name Plan name, Automatically converted to upper case
345  * @param p_organization_code Organization code
349  * @param p_default_value Default value of the element
346  * @param p_element_name Name of collection element to be added
347  * @param p_prompt_sequence Integer display sequence
348  * @param p_prompt Prompt to appear as column heading
350  * @param p_enabled_flag Enabled Flag
351  * @param p_mandatory_flag Mandatory Flag
352  * @param p_displayed_flag Displayed Flag
353  * @param p_read_only_flag specifies whether this element is non updateable
354  * @param p_ss_poplist_flag displays element as poplist on Workbench
355  * @param p_information_flag displays element in Information column
356  * @param p_result_column_name Leave the default value of NULL as it is
357  * @param p_device_flag specifies whether there is a device attached to the element
358  * @param p_device_name is the device name as defined in Device Setup Page
359  * @param p_sensor_alias is the sensor alias as defined in Device Setup Page
360  * @param p_override_flag specifies whether the device enabled element is updatable
361  * @param x_msg_count Count of messages in message stack
362  * @param x_msg_data Messages returned
363  * @param x_return_status API Return Status
364  * @param p_attribute_category DFF attribute category
365  * @param p_attribute1 DFF attribute 1
366  * @param p_attribute2 DFF attribute 2
367  * @param p_attribute3 DFF attribute 3
368  * @param p_attribute4 DFF attribute 4
369  * @param p_attribute5 DFF attribute 5
370  * @param p_attribute6 DFF attribute 6
371  * @param p_attribute7 DFF attribute 7
372  * @param p_attribute8 DFF attribute 8
373  * @param p_attribute9 DFF attribute 9
374  * @param p_attribute10 DFF attribute 10
375  * @param p_attribute11 DFF attribute 11
376  * @param p_attribute12 DFF attribute 12
377  * @param p_attribute13 DFF attribute 13
378  * @param p_attribute14 DFF attribute 14
379  * @param p_attribute15 DFF attribute 15
380  * @rep:displayname Add collection element to a plan
381  */
382 PROCEDURE add_plan_element(
383     p_api_version               IN  NUMBER,
384     p_init_msg_list             IN  VARCHAR2    := fnd_api.g_false,
385     p_validation_level          IN  NUMBER      := fnd_api.g_valid_level_full,
386     p_user_name                 IN  VARCHAR2    := NULL,
387     p_plan_name                 IN  VARCHAR2,
388     p_organization_code         IN  VARCHAR2,
389     p_element_name              IN  VARCHAR2,
390     p_prompt_sequence           IN  NUMBER      := NULL,
391     p_prompt                    IN  VARCHAR2    := g_inherit,
392     p_default_value             IN  VARCHAR2    := g_inherit,
393     p_enabled_flag              IN  VARCHAR2    := fnd_api.g_true,
394     p_mandatory_flag            IN  VARCHAR2    := g_inherit,
395     p_displayed_flag            IN  VARCHAR2    := fnd_api.g_true,
396     p_read_only_flag            IN  VARCHAR2    := NULL,
397     p_ss_poplist_flag           IN  VARCHAR2    := NULL,
398     p_information_flag          IN  VARCHAR2    := NULL,
399     p_result_column_name        IN  VARCHAR2    := NULL,
400     -- 12.1 Device Integration Project
401     -- bhsankar Mon Nov 12 05:51:37 PST 2007
402     p_device_flag               IN  VARCHAR2    := NULL,
403     p_device_name               IN  VARCHAR2    := NULL,
404     p_sensor_alias              IN  VARCHAR2    := NULL,
405     p_override_flag             IN  VARCHAR2    := NULL,
406     -- 12.1 Device Integration Project End.
407     x_msg_count                 OUT NOCOPY NUMBER,
408     x_msg_data                  OUT NOCOPY VARCHAR2,
409     x_return_status             OUT NOCOPY VARCHAR2,
410     p_attribute_category        IN VARCHAR2    := NULL,
411     p_attribute1                IN VARCHAR2    := NULL,
412     p_attribute2                IN VARCHAR2    := NULL,
413     p_attribute3                IN VARCHAR2    := NULL,
414     p_attribute4                IN VARCHAR2    := NULL,
415     p_attribute5                IN VARCHAR2    := NULL,
416     p_attribute6                IN VARCHAR2    := NULL,
417     p_attribute7                IN VARCHAR2    := NULL,
418     p_attribute8                IN VARCHAR2    := NULL,
419     p_attribute9                IN VARCHAR2    := NULL,
420     p_attribute10               IN VARCHAR2    := NULL,
421     p_attribute11               IN VARCHAR2    := NULL,
422     p_attribute12               IN VARCHAR2    := NULL,
423     p_attribute13               IN VARCHAR2    := NULL,
424     p_attribute14               IN VARCHAR2    := NULL,
425     p_attribute15               IN VARCHAR2    := NULL);
426 
427 
428 --
429 -- API name        : complete_plan_processing
430 -- Type            : Public
431 -- Pre-reqs        : None
432 --
433 -- API to complete the plan processing.
434 -- Version 1.0
435 --
436 -- This API signals a completion of a collection plan definition.
437 -- This API is used generally after calling create_collection_plan
438 -- and a series of add_plan_element calls.
439 --
440 -- Parameters:
441 --
442 --  p_api_version                                           NUMBER
443 --     Should be 1.0
444 --
445 --  p_init_msg_list                                         VARCHAR2
446 --     Standard api parameter.  Indicates whether to
447 --     re-initialize the message list.
448 --     Default is fnd_api.g_false.
449 --
450 --  p_validation_level                                      NUMBER
451 --     Standard api parameter.  Indicates validation level.
452 --     Use the default fnd_api.g_valid_level_full.
453 --
454 --  p_user_name                                             VARCHAR2(100)
458 --     use fnd_global.user_id.
455 --     The user's name, as defined in fnd_user table.
456 --     This is used to record audit info in the WHO columns.
457 --     If the user accepts the default, then the API will
459 --
460 --  p_plan_name                                             VARCHAR2(30)
461 --     Plan name.  Automatically converted to upper case.
462 --
463 --  p_organization_code                                     VARCHAR2
464 --     Organization code.
465 --
466 --  p_commit                                                VARCHAR2
467 --     Indicates whether the API shall perform a
468 --     database commit.  Specify fnd_api.g_true or
469 --     fnd_api.g_false.
470 --     Default is fnd_api.g_false.
471 --
472 --     It is recommended a commit is performed (even
473 --     though the standard requires us to use g_false
474 --     as the default value.)  The dynamic plan views
475 --     generator can be executed only if the user commits.
476 --     Alternatively, you may launch the view generator
477 --     manually in the Setup Collection Plans form.
478 --
479 --  x_msg_count                                             OUT NUMBER
480 --     Standard api parameter.  Indicates no. of messages
481 --     put into the message stack.
482 --
483 --  x_msg_data                                              OUT VARCHAR2
484 --     Standard api parameter.  Messages returned.
485 --
486 --  x_return_status                                         OUT VARCHAR2
487 --     Standard api return status parameter.
488 --     Values: fnd_api.g_ret_sts_success,
489 --             fnd_api.g_ret_sts_error,
490 --             fnd_api.g_ret_sts_unexp_error.
491 --
492 /*#
493  * Complete processing of collection plan definition
494  * @param p_api_version Should be 1.0
495  * @param p_init_msg_list Indicates whether to re-initialize the message list
496  * @param p_validation_level Indicates validation level
497  * @param p_user_name The user's name, as defined in fnd_user table
498  * @param p_plan_name Plan name, Automatically converted to upper case
499  * @param p_organization_code Organization code
500  * @param p_commit Indicate if database commit should be performed
501  * @param x_msg_count Count of messages in message stack
502  * @param x_msg_data Messages returned
503  * @param x_return_status API Return Status
504  * @rep:displayname Complete the definition of collection plan
505  */
506 PROCEDURE complete_plan_processing(
507     p_api_version               IN  NUMBER,
508     p_init_msg_list             IN  VARCHAR2    := fnd_api.g_false,
509     p_validation_level          IN  NUMBER      := fnd_api.g_valid_level_full,
510     p_user_name                 IN  VARCHAR2    := NULL,
511     p_plan_name                 IN  VARCHAR2,
512     p_organization_code         IN  VARCHAR2,
513     p_commit                    IN  VARCHAR2    := fnd_api.g_false,
514     x_msg_count                 OUT NOCOPY NUMBER,
515     x_msg_data                  OUT NOCOPY VARCHAR2,
516     x_return_status             OUT NOCOPY VARCHAR2);
517 
518 
519 --
520 -- API name        : delete_collection_plan
521 -- Type            : Public
522 -- Pre-reqs        : None
523 --
524 -- API to delete an existing collection plan.
525 -- Version 1.0
526 --
527 -- This API deletes an existing collection plan and all its elements.
528 -- The user is prevented from deleting a plan if Quality results
529 -- have been collected.
530 --
531 -- Parameters:
532 --
533 --  p_api_version                                           NUMBER
534 --     Should be 1.0
535 --
536 --  p_init_msg_list                                         VARCHAR2
537 --     Standard api parameter.  Indicates whether to
538 --     re-initialize the message list.
539 --     Default is fnd_api.g_false.
540 --
541 --  p_validation_level                                      NUMBER
542 --     Standard api parameter.  Indicates validation level.
543 --     Use the default fnd_api.g_valid_level_full.
544 --
545 --  p_user_name                                             VARCHAR2(100)
546 --     The user's name, as defined in fnd_user table.
547 --     This is used to record audit info in the WHO columns.
548 --     If the user accepts the default, then the API will
549 --     use fnd_global.user_id.
550 --
551 --  p_plan_name                                             VARCHAR2(30)
552 --     Plan name.  Automatically converted to upper case.
553 --
554 --  p_organization_code                                     VARCHAR2
555 --     Organization code.
556 --
557 --  p_commit                                                VARCHAR2
558 --     Indicates whether the API shall perform a
559 --     database commit.  Specify fnd_api.g_true or
560 --     fnd_api.g_false.
561 --     Default is fnd_api.g_false.
562 --
563 --  x_msg_count                                             OUT NUMBER
564 --     Standard api parameter.  Indicates no. of messages
565 --     put into the message stack.
566 --
567 --  x_msg_data                                              OUT VARCHAR2
568 --     Standard api parameter.  Messages returned.
569 --
570 --  x_return_status                                         OUT VARCHAR2
571 --     Standard api return status parameter.
572 --     Values: fnd_api.g_ret_sts_success,
573 --             fnd_api.g_ret_sts_error,
574 --             fnd_api.g_ret_sts_unexp_error.
575 --
576 /*#
577  * Delete an existing collection plan
581  * @param p_user_name The user's name, as defined in fnd_user table
578  * @param p_api_version Should be 1.0
579  * @param p_init_msg_list Indicates whether to re-initialize the message list
580  * @param p_validation_level Indicates validation level
582  * @param p_plan_name Plan name, Automatically converted to upper case
583  * @param p_organization_code Organization code
584  * @param p_commit Indicate if database commit should be performed
585  * @param x_msg_count Count of messages in message stack
586  * @param x_msg_data Messages returned
587  * @param x_return_status API Return Status
588  * @rep:displayname Delete an existing collection plan
589  */
590 PROCEDURE delete_collection_plan(
591     p_api_version               IN  NUMBER,
592     p_init_msg_list             IN  VARCHAR2    := fnd_api.g_false,
593     p_validation_level          IN  NUMBER      := fnd_api.g_valid_level_full,
594     p_user_name                 IN  VARCHAR2    := NULL,
595     p_plan_name                 IN  VARCHAR2,
596     p_organization_code         IN  VARCHAR2,
597     p_commit                    IN  VARCHAR2    := fnd_api.g_false,
598     x_msg_count                 OUT NOCOPY NUMBER,
599     x_msg_data                  OUT NOCOPY VARCHAR2,
600     x_return_status             OUT NOCOPY VARCHAR2);
601 
602 
603 --
604 -- API name        : delete_plan_element
605 -- Type            : Public
606 -- Pre-reqs        : None
607 --
608 -- API to delete an element from an existing collection plan.
609 -- Version 1.0
610 --
611 -- This API deletes an element from a collection plan.  The user
612 -- is prevented to do this if Quality result has been collected
613 -- for that element.
614 --
615 -- Parameters:
616 --
617 --  p_api_version                                           NUMBER
618 --     Should be 1.0
619 --
620 --  p_init_msg_list                                         VARCHAR2
621 --     Standard api parameter.  Indicates whether to
622 --     re-initialize the message list.
623 --     Default is fnd_api.g_false.
624 --
625 --  p_validation_level                                      NUMBER
626 --     Standard api parameter.  Indicates validation level.
627 --     Use the default fnd_api.g_valid_level_full.
628 --
629 --  p_user_name                                             VARCHAR2(100)
630 --     The user's name, as defined in fnd_user table.
631 --     This is used to record audit info in the WHO columns.
632 --     If the user accepts the default, then the API will
633 --     use fnd_global.user_id.
634 --
635 --  p_plan_name                                             VARCHAR2(30)
636 --     Plan name.  Automatically converted to upper case.
637 --
638 --  p_organization_code                                     VARCHAR2
639 --     Organization code.
640 --
641 --  p_element_name                                          VARCHAR2(30)
642 --     The element to be deleted.  Mixed case.
643 --
644 --  p_commit                                                VARCHAR2
645 --     Indicates whether the API shall perform a
646 --     database commit.  Specify fnd_api.g_true or
647 --     fnd_api.g_false.
648 --     Default is fnd_api.g_false.
649 --
650 --  x_msg_count                                             OUT NUMBER
651 --     Standard api parameter.  Indicates no. of messages
652 --     put into the message stack.
653 --
654 --  x_msg_data                                              OUT VARCHAR2
655 --     Standard api parameter.  Messages returned.
656 --
657 --  x_return_status                                         OUT VARCHAR2
658 --     Standard api return status parameter.
659 --     Values: fnd_api.g_ret_sts_success,
660 --             fnd_api.g_ret_sts_error,
661 --             fnd_api.g_ret_sts_unexp_error.
662 --
663 /*#
664  * Delete an element from a collection plan
665  * @param p_api_version Should be 1.0
666  * @param p_init_msg_list Indicates whether to re-initialize the message list
667  * @param p_validation_level Indicates validation level
668  * @param p_user_name The user's name, as defined in fnd_user table
669  * @param p_plan_name Plan name, Automatically converted to upper case
670  * @param p_element_name Name of collection element to be deleted from plan
671  * @param p_organization_code Organization code
672  * @param p_commit Indicate if database commit should be performed
673  * @param x_msg_count Count of messages in message stack
674  * @param x_msg_data Messages returned
675  * @param x_return_status API Return Status
676  * @rep:displayname Delete an element from a collection plan
677  */
678 PROCEDURE delete_plan_element(
679     p_api_version               IN  NUMBER,
680     p_init_msg_list             IN  VARCHAR2    := fnd_api.g_false,
681     p_validation_level          IN  NUMBER      := fnd_api.g_valid_level_full,
682     p_user_name                 IN  VARCHAR2    := NULL,
683     p_plan_name                 IN  VARCHAR2,
684     p_organization_code         IN  VARCHAR2,
685     p_element_name              IN  VARCHAR2,
686     p_commit                    IN  VARCHAR2    := fnd_api.g_false,
687     x_msg_count                 OUT NOCOPY NUMBER,
688     x_msg_data                  OUT NOCOPY VARCHAR2,
689     x_return_status             OUT NOCOPY VARCHAR2);
690 
691 
692 --
693 -- API name        : copy_collection_plan
694 -- Type            : Public
695 -- Pre-reqs        : None
696 --
697 -- API to copy a collection plan.
701 -- definition of an existing collection plan or updates
698 -- Version 1.0
699 --
700 -- This API creates a new collection plan by copying the
702 -- an existing collection plan with additional elements
703 -- copied from a source plan.  Should there be conflict
704 -- in the latter case, the new elements from the source
705 -- plan will not overwrite the existing elements.  Afterwards,
706 -- call complete_plan_processing to finish the plan creation.
707 --
708 -- Database commit is never performed.
709 --
710 --
711 -- Parameters:
712 --
713 --  p_api_version                                           NUMBER
714 --     Should be 1.0
715 --
716 --  p_init_msg_list                                         VARCHAR2
717 --     Standard api parameter.  Indicates whether to
718 --     re-initialize the message list.
719 --     Default is fnd_api.g_false.
720 --
721 --  p_validation_level                                      NUMBER
722 --     Standard api parameter.  Indicates validation level.
723 --     Use the default fnd_api.g_valid_level_full.
724 --
725 --  p_user_name                                             VARCHAR2(100)
726 --     The user's name, as defined in fnd_user table.
727 --     This is used to record audit info in the WHO columns.
728 --     If the user accepts the default, then the API will
729 --     use fnd_global.user_id.
730 --
731 --  p_plan_name                                             VARCHAR2(30)
732 --     The source plan name.  Automatically converted
733 --     to upper case.
734 --
735 --  p_organization_code                                     VARCHAR2
736 --     Organization code.  Can be NULL for template plans.
737 --     Default is NULL.
738 --
739 --  p_to_plan_name                                          VARCHAR2(30)
740 --     The destination plan name.  Automatically converted
741 --     to upper case.
742 --
743 --  p_to_organization_code                                  VARCHAR2
744 --     The destination Organization code.
745 --
746 --  p_copy_actions_flag                                     VARCHAR2
747 --     Specifies whether to copy all actions associated
748 --     with each plan element.
749 --     Valid values are fnd_api.g_true or fnd_api.g_false.
750 --     Default is fnd_api.g_true.
751 --
752 --  p_copy_values_flag                                      VARCHAR2
753 --     Specifies whether to copy all lookup values
754 --     associated with each plan element.
755 --     Valid values are fnd_api.g_true or fnd_api.g_false.
756 --     Default is fnd_api.g_true.
757 --
758 --  p_copy_transactions_flag                                VARCHAR2
759 --     Specifies whether to copy all transactions and
760 --     collection triggers associated with each plan element.
761 --     Valid values are fnd_api.g_true or fnd_api.g_false.
762 --     Default is fnd_api.g_true.
763 --
764 --  p_commit                                                VARCHAR2
765 --     Indicates whether the API shall perform a
766 --     database commit.  Specify fnd_api.g_true or
767 --     fnd_api.g_false.
768 --     Default is fnd_api.g_false.
769 --
770 --  x_msg_count                                             OUT NUMBER
771 --     Standard api parameter.  Indicates no. of messages
772 --     put into the message stack.
773 --
774 --  x_msg_data                                              OUT VARCHAR2
775 --     Standard api parameter.  Messages returned.
776 --
777 --  x_return_status                                         OUT VARCHAR2
778 --     Standard api return status parameter.
779 --     Values: fnd_api.g_ret_sts_success,
780 --             fnd_api.g_ret_sts_error,
781 --             fnd_api.g_ret_sts_unexp_error.
782 --
783 /*#
784  * Create a new collection plan by copying definition of an existing collection plan
785  * @param p_api_version Should be 1.0
786  * @param p_init_msg_list Indicates whether to re-initialize the message list
787  * @param p_validation_level Indicates validation level
788  * @param p_user_name The user's name, as defined in fnd_user table
789  * @param p_plan_name Plan name, Automatically converted to upper case
790  * @param p_organization_code Organization code
791  * @param p_to_plan_name Destination plan name
792  * @param p_to_organization_code Destination organization code
793  * @param p_copy_actions_flag specifies whether to copy all plan element actions
794  * @param p_copy_values_flag specifies whether to copy all plan element lookup values
795  * @param p_copy_transactions_flag  specifies whether to copy all plan transactions
796  * @param p_commit Indicate if database commit should be performed
797  * @param x_to_plan_id New Plan ID that gets created automatically
798  * @param x_msg_count Count of messages in message stack
799  * @param x_msg_data Messages returned
800  * @param x_return_status API Return Status
801  * @rep:displayname Copy Collection Plan
802  */
803 PROCEDURE copy_collection_plan(
804     p_api_version               IN  NUMBER,
805     p_init_msg_list             IN  VARCHAR2    := fnd_api.g_false,
806     p_validation_level          IN  NUMBER      := fnd_api.g_valid_level_full,
807     p_user_name                 IN  VARCHAR2    := NULL,
808     p_plan_name                 IN  VARCHAR2,
809     p_organization_code         IN  VARCHAR2,
810     p_to_plan_name              IN  VARCHAR2,
811     p_to_organization_code      IN  VARCHAR2,
812     p_copy_actions_flag         IN  VARCHAR2    := fnd_api.g_true,
813     p_copy_values_flag          IN  VARCHAR2    := fnd_api.g_true,
814     p_copy_transactions_flag    IN  VARCHAR2    := fnd_api.g_true,
815     p_commit                    IN  VARCHAR2    := fnd_api.g_false,
816     x_to_plan_id                OUT NOCOPY NUMBER,
817     x_msg_count                 OUT NOCOPY NUMBER,
818     x_msg_data                  OUT NOCOPY VARCHAR2,
819     x_return_status             OUT NOCOPY VARCHAR2);
820 
821 
822 FUNCTION get_plan_type (p_lookup_code IN VARCHAR2) RETURN VARCHAR2;
823 
824 -- Function to get the Plan View name
825 FUNCTION get_plan_view_name(p_name VARCHAR2) RETURN VARCHAR2;
826 
827 -- Function to get the Import view name
828 FUNCTION get_import_view_name(p_name VARCHAR2) RETURN VARCHAR2;
829 
830 END qa_plans_pub;
831 
832 
833