DBA Data[Home] [Help]

PACKAGE: APPS.WSMPPCPD

Source


1 PACKAGE WSMPPCPD AS
2 /* $Header: WSMPCPDS.pls 120.1 2005/06/29 04:27:01 abgangul noship $ */
3 
4 /*===========================================================================
5   PROCEDURE NAME:       insert_bill
6 
7   DESCRIPTION:          This routine is used to populate the
8                         bom_bill_of_mtls_interface.
9 
10                         x_error_code is set to zero on success.
11 
12   PARAMETERS:     x_rec          IN  OUT NOCOPY bom_bill_of_mtls_interface%ROWTYPE
13                   x_assembly_item_name         IN VARCHAR2
14                   x_organization_code          IN VARCHAR2
15                   x_error_code   IN  OUT NOCOPY NUMBER
16                   x_error_msg    IN  OUT NOCOPY VARCHAR2
17 
18   DESIGN REFERENCES:
19 
20   ALGORITHM:
21 
22   NOTES:
23 
24   OPEN ISSUES:
25 
26   CLOSED ISSUES:
27 
28   CHANGE HISTORY:       Ramana Mulpury        06/16/97   Created
29 ===========================================================================*/
30 -- g_iteration_count number := 0;
31 
32 PROCEDURE insert_bill (x_rec        IN OUT NOCOPY  bom_bill_of_mtls_interface%ROWTYPE,
33                        x_assembly_item_name IN VARCHAR2 DEFAULT NULL,
34                        x_organization_code IN VARCHAR2 DEFAULT NULL,
35                        x_error_code IN OUT NOCOPY  NUMBER,
36                        x_error_msg  IN OUT NOCOPY  VARCHAR2);
37 
38 
39 /*===========================================================================
40   PROCEDURE NAME:       insert_component
41 
42   DESCRIPTION:          This routine is used to populate the
43                         bom_inventory_comps_interface.
44 
45                         x_error_code is set to zero on success.
46 
47   PARAMETERS:     x_rec          IN  OUT NOCOPY bom_inventory_comps_interface%ROWTYPE
48                   x_component_name             IN VARCHAR2
49                   x_organization_code          IN VARCHAR2
50                   x_assembly_item_name         IN VARCHAR2
51                   x_supply_locator             IN VARCHAR2
52                   x_error_code   IN  OUT NOCOPY NUMBER
53                   x_error_msg    IN  OUT NOCOPY VARCHAR2
54 
55   DESIGN REFERENCES:
56 
57   ALGORITHM:
58 
59   NOTES:
60 
61   OPEN ISSUES:
62 
63   CLOSED ISSUES:
64 
65   CHANGE HISTORY:       Ramana Mulpury        06/16/97   Created
66 ===========================================================================*/
67 PROCEDURE insert_component (x_rec        IN OUT NOCOPY  bom_inventory_comps_interface%ROWTYPE,
68                             x_component_name IN VARCHAR2 DEFAULT NULL,
69                             x_organization_code IN VARCHAR2 DEFAULT NULL,
70                             x_assembly_item_name IN VARCHAR2 DEFAULT NULL,
71                             x_supply_locator IN VARCHAR2 DEFAULT NULL,
72                             x_error_code IN OUT NOCOPY  NUMBER,
73                             x_error_msg  IN OUT NOCOPY  VARCHAR2);
74 
75 
76 /*===========================================================================
77   PROCEDURE NAME:       insert_substitute_component
78 
79   DESCRIPTION:          This routine is used to populate the
80                         bom_sub_comps_interface.
81 
82                         x_error_code is set to zero on success.
83 
84   PARAMETERS:     x_rec          IN  OUT NOCOPY bom_sub_comps_interface%ROWTYPE
85                   x_error_code   IN  OUT NOCOPY NUMBER
86                   x_error_msg    IN  OUT NOCOPY VARCHAR2
87 
88   DESIGN REFERENCES:
89 
90   ALGORITHM:
91 
92   NOTES:
93 
94   OPEN ISSUES:
95 
96   CLOSED ISSUES:
97 
98   CHANGE HISTORY:       Ramana Mulpury        01/22/98   Created
99 ===========================================================================*/
100 PROCEDURE insert_substitute_component (
101 		x_rec        		IN OUT NOCOPY  bom_sub_comps_interface%ROWTYPE,
102                 x_co_product_name       IN  VARCHAR2,
103                 x_alternate_designator  IN  VARCHAR2,
104                 x_component_name        IN  VARCHAR2,
105                 x_comp_start_eff_date   IN  DATE,
106                 x_org_code        	IN  VARCHAR2,
107                 x_error_code 		IN OUT NOCOPY  NUMBER,
108                 x_error_msg  		IN OUT NOCOPY  VARCHAR2);
109 
110 /*===========================================================================
111   PROCEDURE NAME:       insert_sub_comps
112 
113   DESCRIPTION:          This routine is used to populate the
114                         bom_sub_comps_interface table with all
115                         the substitutes for a co-product component.
116 
117                         x_error_code is set to zero on success.
118 
119   PARAMETERS:     x_co_product_group_id     IN NUMBER
120                   x_component_sequence_id   IN NUMBER
121                   x_qty_multiplier          IN NUMBER
122                   x_error_code              IN  OUT NOCOPY NUMBER
123                   x_error_msg               IN  OUT NOCOPY VARCHAR2
124 
125   DESIGN REFERENCES:
126 
127   ALGORITHM:
128 
129   NOTES:
130 
131   OPEN ISSUES:
132 
133   CLOSED ISSUES:
134 
135   CHANGE HISTORY:       Ramana Mulpury        01/23/98   Created
136 ===========================================================================*/
137 PROCEDURE insert_sub_comps (x_co_product_group_id   IN  NUMBER,
138                             x_co_product_name 	    IN  VARCHAR2,
139                             x_alternate_designator  IN  VARCHAR2,
140                             x_component_name        IN  VARCHAR2,
141                             x_comp_start_eff_date   IN  DATE,
142                             x_org_code        	    IN  VARCHAR2,
143                             x_component_sequence_id IN  NUMBER,
144                             x_qty_multiplier        IN  NUMBER,
145                             x_error_code            IN OUT NOCOPY  NUMBER,
146                             x_error_msg             IN OUT NOCOPY  VARCHAR2);
147 
148 /*===========================================================================
149   PROCEDURE NAME:       process_bom_sub_comp
150 
151   DESCRIPTION:          This routine is used to handle the inserts,
152                         updates and deletes that are performed
153                         in the bom_co_prod_comp_substitutes zone
154                         of the Co-Products form.
155 
156                         x_error_code is set to zero on success.
157 
158                         x_process_code: 1 - Insert
159                                         2 - Update
160                                         3 - Delete
161 
162   PARAMETERS:                   x_co_product_group_id       IN     NUMBER,
163                                 x_substitute_component_id   IN     NUMBER,
164                                 x_substitute_comp_id_old    IN     NUMBER,
165                                 x_process_code              IN     NUMBER,
166                                 x_org_id                    IN     NUMBER,
167                                 x_rowid                     IN OUT NOCOPY VARCHAR2,
168                                 x_last_update_login              NUMBER,
169                                 x_last_updated_by                NUMBER,
170                                 x_last_update_date               DATE,
171                                 x_creation_date                  DATE,
172                                 x_created_by                     NUMBER,
173                                 x_substitute_item_quantity       NUMBER,
174                                 x_attribute_category             VARCHAR2,
175                                 x_attribute1                     VARCHAR2,
176                                 x_attribute2                     VARCHAR2,
177                                 x_attribute3                     VARCHAR2,
178                                 x_attribute4                     VARCHAR2,
179                                 x_attribute5                     VARCHAR2,
180                                 x_attribute6                     VARCHAR2,
181                                 x_attribute7                     VARCHAR2,
182                                 x_attribute8                     VARCHAR2,
183                                 x_attribute9                     VARCHAR2,
184                                 x_attribute10                    VARCHAR2,
185                                 x_attribute11                    VARCHAR2,
186                                 x_attribute12                    VARCHAR2,
187                                 x_attribute13                    VARCHAR2,
188                                 x_attribute14                    VARCHAR2,
189                                 x_attribute15                    VARCHAR2,
190                                 x_error_code                IN OUT NOCOPY NUMBER,
191                                 x_error_msg                 IN OUT NOCOPY VARCHAR2
192 
193 
194   DESIGN REFERENCES:
195 
196   ALGORITHM:
197 
198   NOTES:
199 
200   OPEN ISSUES:
201 
202   CLOSED ISSUES:
203 
204   CHANGE HISTORY:       Ramana Mulpury        01/23/98   Created
205 ===========================================================================*/
206 
207 PROCEDURE process_bom_sub_comp (x_co_product_group_id       IN     NUMBER,
208                                 x_substitute_component_id   IN     NUMBER,
209                                 x_substitute_comp_id_old    IN     NUMBER,
210                                 x_process_code              IN     NUMBER,
211                                 x_org_id                    IN     NUMBER,
212                                 x_rowid                     IN OUT NOCOPY VARCHAR2,
213                                 x_last_update_login              NUMBER,
214                                 x_last_updated_by                NUMBER,
215                                 x_last_update_date               DATE,
216                                 x_creation_date                  DATE,
217                                 x_created_by                     NUMBER,
218                                 x_substitute_item_quantity       NUMBER,
219                                 x_attribute_category             VARCHAR2,
220                                 x_attribute1                     VARCHAR2,
221                                 x_attribute2                     VARCHAR2,
222                                 x_attribute3                     VARCHAR2,
223                                 x_attribute4                     VARCHAR2,
224                                 x_attribute5                     VARCHAR2,
225                                 x_attribute6                     VARCHAR2,
226                                 x_attribute7                     VARCHAR2,
227                                 x_attribute8                     VARCHAR2,
228                                 x_attribute9                     VARCHAR2,
229                                 x_attribute10                    VARCHAR2,
230                                 x_attribute11                    VARCHAR2,
231                                 x_attribute12                    VARCHAR2,
232                                 x_attribute13                    VARCHAR2,
233                                 x_attribute14                    VARCHAR2,
234                                 x_attribute15                    VARCHAR2,
235                                 x_basis_type                     NUMBER,    --LBM enh
236                                 x_error_code                IN OUT NOCOPY NUMBER,
237                                 x_error_msg                 IN OUT NOCOPY VARCHAR2);
238 
239 /*===========================================================================
240   PROCEDURE NAME:       val_co_product_details
241 
242   DESCRIPTION:          Bug# 1418668. Split the validation portion from
243                         procedure process_co_product so that co_product form
244                         can call this procedure to validate before actually
245                         inserting into the tables.
246 
247   CHANGE HISTORY:       Pons Ponnambalam     12/13/2000   Created
248 ===========================================================================*/
249 PROCEDURE val_co_product_details(
250                              x_process_code     IN     NUMBER,
251                              x_rowid            IN     VARCHAR2 DEFAULT NULL,
252                              x_co_product_group_id IN  NUMBER   DEFAULT NULL,
253                              x_usage            IN     NUMBER   DEFAULT NULL,
254                              x_co_product_id    IN     NUMBER   DEFAULT NULL,
255                              x_org_id           IN     NUMBER   DEFAULT NULL,
256                              x_primary_flag     IN     VARCHAR2 DEFAULT NULL,
257                              x_alternate_designator IN OUT NOCOPY VARCHAR2,
258                              x_bill_sequence_id IN  OUT NOCOPY NUMBER,
259                              x_effectivity_date IN      DATE     DEFAULT NULL,
260                              x_disable_date     IN      DATE     DEFAULT NULL,
261                              x_bill_insert      IN OUT NOCOPY  BOOLEAN,
262                              x_p_bill_insert    IN OUT NOCOPY  BOOLEAN,
263                              x_comp_insert      IN OUT NOCOPY  BOOLEAN,
264                              x_p_comp_insert    IN OUT NOCOPY  BOOLEAN,
265                              x_error_code       IN OUT NOCOPY  NUMBER,
266                              x_error_msg        IN OUT NOCOPY  VARCHAR2);
267 
268 /*===========================================================================
269   PROCEDURE NAME:       process_co_product
270 
271   DESCRIPTION:          Cover routine which is used to validate
272                         as well as interface co-products with
273                         Bill of Materials.
274 
275   PARAMETERS:                x_process_code     IN     NUMBER
276                              x_rowid            IN     VARCHAR2
277                              x_co_product_group_id IN  NUMBER
278                              x_usage            IN     NUMBER
279                              x_duality_flag     IN     VARCHAR2
280                              x_planning_factor  IN     NUMBER
281                              x_component_yield_factor IN NUMBER
282                              x_include_in_cost_rollup IN NUMBER
283                              x_wip_supply_type  IN     NUMBER
284                              x_supply_subinventory IN  VARCHAR2
285                              x_supply_locator_id IN    NUMBER
286                              x_component_remarks  IN    VARCHAR2
287                              x_split            IN     NUMBER
288                              x_created_by       IN     NUMBER
289                              x_login_id         IN     NUMBER
290                              x_co_product_id    IN     NUMBER
291                              x_co_product_name  IN     VARCHAR2
292                              x_revision         IN     VARCHAR2
293                              x_org_id           IN     NUMBER
294                              x_org_code         IN     VARCHAR2
295                              x_primary_flag     IN     VARCHAR2
296                              x_alternate_designator IN VARCHAR2
297                              x_component_id     IN     NUMBER
298                              x_component_name   IN     VARCHAR2
299                              x_bill_sequence_id IN OUT NOCOPY NUMBER
300                              x_component_sequence_id IN OUT NOCOPY NUMBER
301                              x_effectivity_date IN     DATE
302                              x_disable_date     IN     DATE
303                              x_coprod_attribute_category VARCHAR2
304                              x_coprod_attribute1         VARCHAR2
305                              x_coprod_attribute2         VARCHAR2
306                              x_coprod_attribute3         VARCHAR2
307                              x_coprod_attribute4         VARCHAR2
308                              x_coprod_attribute5         VARCHAR2
309                              x_coprod_attribute6         VARCHAR2
310                              x_coprod_attribute7         VARCHAR2
311                              x_coprod_attribute8         VARCHAR2
312                              x_coprod_attribute9         VARCHAR2
313                              x_coprod_attribute10        VARCHAR2
314                              x_coprod_attribute11        VARCHAR2
315                              x_coprod_attribute12        VARCHAR2
319                              x_comp_attribute_category   VARCHAR2
316                              x_coprod_attribute13        VARCHAR2
317                              x_coprod_attribute14        VARCHAR2
318                              x_coprod_attribute15        VARCHAR2
320                              x_comp_attribute1           VARCHAR2
321                              x_comp_attribute2           VARCHAR2
322                              x_comp_attribute3           VARCHAR2
323                              x_comp_attribute4           VARCHAR2
324                              x_comp_attribute5           VARCHAR2
325                              x_comp_attribute6           VARCHAR2
326                              x_comp_attribute7           VARCHAR2
327                              x_comp_attribute8           VARCHAR2
328                              x_comp_attribute9           VARCHAR2
329                              x_comp_attribute10          VARCHAR2
330                              x_comp_attribute11          VARCHAR2
331                              x_comp_attribute12          VARCHAR2
332                              x_comp_attribute13          VARCHAR2
333                              x_comp_attribute14          VARCHAR2
334                              x_comp_attribute15          VARCHAR2
335                              x_error_code       IN OUT NOCOPY NUMBER
336                              x_error_msg        IN OUT NOCOPY VARCHAR2
337 
338                         x_process_code: 1 - Insert validation.
339                                         2 - Update validation.
340                                         3 - Delete validation.
341 
342                         x_error_code :  0 - Success
343                                         Other Values - Failure.
344 
345   DESIGN REFERENCES:
346 
347   ALGORITHM:
348 
349   NOTES:
350 
351   OPEN ISSUES:
352 
353   CLOSED ISSUES:
354 
355   CHANGE HISTORY:       Ramana Mulpury        06/19/97   Created
356 
357 ===========================================================================*/
358 PROCEDURE process_co_product(x_process_code     IN     NUMBER,
359                              x_rowid            IN     VARCHAR2 DEFAULT NULL,
360                              x_co_product_group_id IN  NUMBER   DEFAULT NULL,
361                              x_usage            IN     NUMBER   DEFAULT NULL,
362                              x_duality_flag     IN     VARCHAR2 DEFAULT NULL,
363                              x_planning_factor  IN     NUMBER   DEFAULT NULL,
364                              x_component_yield_factor IN NUMBER DEFAULT NULL,
365                              x_include_in_cost_rollup IN NUMBER DEFAULT NULL,
366                              x_wip_supply_type  IN     NUMBER   DEFAULT NULL,
367                              x_supply_subinventory IN  VARCHAR2 DEFAULT NULL,
368                              x_supply_locator_id IN    NUMBER   DEFAULT NULL,
369                              x_supply_locator    IN    VARCHAR2 DEFAULT NULL,
370                              x_component_remarks IN    VARCHAR2 DEFAULT NULL,
371                              x_split            IN     NUMBER   DEFAULT NULL,
372                              x_created_by       IN     NUMBER   DEFAULT NULL,
373                              x_login_id         IN     NUMBER   DEFAULT NULL,
374                              x_co_product_id    IN     NUMBER   DEFAULT NULL,
375                              x_co_product_name  IN     VARCHAR2 DEFAULT NULL,
376                              x_revision         IN     VARCHAR2 DEFAULT NULL,
377                              x_org_id           IN     NUMBER   DEFAULT NULL,
378                              x_org_code         IN     VARCHAR2 DEFAULT NULL,
379                              x_primary_flag     IN     VARCHAR2 DEFAULT NULL,
380                              x_alternate_designator IN OUT NOCOPY VARCHAR2,
381                              x_component_id     IN     NUMBER   DEFAULT NULL,
382                              x_component_name   IN     VARCHAR2 DEFAULT NULL,
383                              x_bill_sequence_id IN OUT NOCOPY NUMBER,
384                              x_component_sequence_id IN OUT NOCOPY NUMBER,
385                              x_effectivity_date IN     DATE     DEFAULT NULL,
386                              x_disable_date     IN     DATE     DEFAULT NULL,
387             /* Bug# 1418668. Added the following 4 parameters */
388                              x_bill_insert      IN    BOOLEAN DEFAULT FALSE,
389                              x_p_bill_insert    IN    BOOLEAN DEFAULT FALSE,
390                              x_comp_insert      IN    BOOLEAN DEFAULT FALSE,
391                              x_p_comp_insert    IN    BOOLEAN DEFAULT FALSE,
392                              X_basis_type       IN       NUMBER   DEFAULT 1,   --LBM enh, default type = Item
393                              x_coprod_attribute_category VARCHAR2 DEFAULT NULL,
394                              x_coprod_attribute1         VARCHAR2 DEFAULT NULL,
395                              x_coprod_attribute2         VARCHAR2 DEFAULT NULL,
396                              x_coprod_attribute3         VARCHAR2 DEFAULT NULL,
397                              x_coprod_attribute4         VARCHAR2 DEFAULT NULL,
398                              x_coprod_attribute5         VARCHAR2 DEFAULT NULL,
399                              x_coprod_attribute6         VARCHAR2 DEFAULT NULL,
400                              x_coprod_attribute7         VARCHAR2 DEFAULT NULL,
401                              x_coprod_attribute8         VARCHAR2 DEFAULT NULL,
402                              x_coprod_attribute9         VARCHAR2 DEFAULT NULL,
403                              x_coprod_attribute10        VARCHAR2 DEFAULT NULL,
407                              x_coprod_attribute14        VARCHAR2 DEFAULT NULL,
404                              x_coprod_attribute11        VARCHAR2 DEFAULT NULL,
405                              x_coprod_attribute12        VARCHAR2 DEFAULT NULL,
406                              x_coprod_attribute13        VARCHAR2 DEFAULT NULL,
408                              x_coprod_attribute15        VARCHAR2 DEFAULT NULL,
409                              x_comp_attribute_category   VARCHAR2 DEFAULT NULL,
410                              x_comp_attribute1           VARCHAR2 DEFAULT NULL,
411                              x_comp_attribute2           VARCHAR2 DEFAULT NULL,
412                              x_comp_attribute3           VARCHAR2 DEFAULT NULL,
413                              x_comp_attribute4           VARCHAR2 DEFAULT NULL,
414                              x_comp_attribute5           VARCHAR2 DEFAULT NULL,
415                              x_comp_attribute6           VARCHAR2 DEFAULT NULL,
416                              x_comp_attribute7           VARCHAR2 DEFAULT NULL,
417                              x_comp_attribute8           VARCHAR2 DEFAULT NULL,
418                              x_comp_attribute9           VARCHAR2 DEFAULT NULL,
419                              x_comp_attribute10          VARCHAR2 DEFAULT NULL,
420                              x_comp_attribute11          VARCHAR2 DEFAULT NULL,
421                              x_comp_attribute12          VARCHAR2 DEFAULT NULL,
422                              x_comp_attribute13          VARCHAR2 DEFAULT NULL,
423                              x_comp_attribute14          VARCHAR2 DEFAULT NULL,
424                              x_comp_attribute15          VARCHAR2 DEFAULT NULL,
425                              x_error_code       IN OUT NOCOPY NUMBER,
426                              x_error_msg        IN OUT NOCOPY VARCHAR2);
427 
428 
429 /*===========================================================================
430   PROCEDURE NAME:       set_common_bill
431 
432   DESCRIPTION:          This routine performs the updates required
433                         for BOM Co-Products to bom_bill_of_materials table.
434                         The primary co-product's bill is used as the
435                         common bill by the other co-products in a specific
436                         co-product relationship.
437 
438   PARAMETERS:           x_co_product_group_id        IN     NUMBER,
439                         x_org_id                     IN     NUMBER,
440                         x_co_product_id              IN     NUMBER,
441                         x_bill_sequence_id           IN     NUMBER,
442                         x_component_sequence_id      IN     NUMBER,
443                         x_primary_flag               IN     VARCHAR2,
444                         x_error_code                 IN OUT NOCOPY NUMBER,
445                         x_error_msg                  IN OUT NOCOPY VARCHAR2
446 
447                         x_error_code :  0 - Success
448                                         2 - Validation failure.
449                                         Other Values - Failure.
450 
451   DESIGN REFERENCES:
452 
453   ALGORITHM:
454 
455   NOTES:
456 
457   OPEN ISSUES:
458 
459   CLOSED ISSUES:
460 
461   CHANGE HISTORY:       Ramana Mulpury        06/8/97   Created
462 ===========================================================================*/
463 PROCEDURE set_common_bill ( x_co_product_group_id        IN     NUMBER,
464                             x_org_id                     IN     NUMBER,
465                             x_co_product_id              IN     NUMBER,
466                             x_bill_sequence_id           IN     NUMBER,
467                             x_component_sequence_id      IN     NUMBER,
468                             x_primary_flag               IN     VARCHAR2,
469                             x_error_code                 IN OUT NOCOPY NUMBER,
470                             x_error_msg                  IN OUT NOCOPY VARCHAR2);
471 
472 /*===========================================================================
473   PROCEDURE NAME:       delete_component
474 
475   DESCRIPTION:          This routine performs the processing
476                         required to delete a component. It processes
477                         the co-products associated with the
478                         component.
479 
480   PARAMETERS:           x_co_product_group_id IN     NUMBER,
481                         x_rowid               IN     VARCHAR2,
482                         x_error_code          IN OUT NOCOPY NUMBER,
483                         x_error_msg           IN OUT NOCOPY VARCHAR2
484 
485                         x_error_code :  0 - Successful.
486                          Other values:    - SQL Error.
487 
488   DESIGN REFERENCES:
489 
490   ALGORITHM:
491 
492   NOTES:
493 
494   OPEN ISSUES:
495 
496   CLOSED ISSUES:
497 
498   CHANGE HISTORY:       Ramana Mulpury        06/20/97   Created
499 ===========================================================================*/
500 PROCEDURE delete_component(x_co_product_group_id IN     NUMBER,
501                            x_rowid               IN     VARCHAR2,
502                            x_error_code          IN OUT NOCOPY NUMBER,
503                            x_error_msg           IN OUT NOCOPY VARCHAR2);
504 
505 
506 /*===========================================================================
507   PROCEDURE NAME:       delete_co_product
508 
509   DESCRIPTION:          This routine performs the processing
510                         required to delete a specific co_product.
514   PARAMETERS:           x_co_product_group_id IN     NUMBER,
511                         It updates the disable date on the corresponding
512                         bill to reflect the change.
513 
515                         x_co_product_id       IN     NUMBER,
516                         x_error_code          IN OUT NOCOPY NUMBER,
517                         x_error_msg           IN OUT NOCOPY VARCHAR2
518 
519                         x_error_code :  0 - Successful.
520                          Other values:    - SQL Error.
521 
522   DESIGN REFERENCES:
523 
524   ALGORITHM:
525 
526   NOTES:
527 
528   OPEN ISSUES:
529 
530   CLOSED ISSUES:
531 
532   CHANGE HISTORY:       Ramana Mulpury        06/20/97   Created
533 ===========================================================================*/
534 PROCEDURE delete_co_product(x_co_product_group_id IN     NUMBER,
535                            x_co_product_id        IN     NUMBER,
536                            x_error_code          IN OUT NOCOPY NUMBER,
537                            x_error_msg           IN OUT NOCOPY VARCHAR2);
538 
539 
540 /*===========================================================================
541   PROCEDURE NAME:       update_co_prod_details
542 
543   DESCRIPTION:          This routine performs the processing
544                         required to update co-products associated
545                         with a component.
546 
547   PARAMETERS:           x_co_product_group_id IN     NUMBER,
548                         x_effectivity_date    IN     DATE,
549                         x_disable_date        IN     DATE,
550                         x_usage_rate          IN     NUMBER,
551                         x_inv_usage           IN     NUMBER,
552                         x_duality_flag        IN     VARCHAR2,
553                         x_comp_attribute_category  IN     VARCHAR2,
554                         x_comp_attribute1          IN     VARCHAR2,
555                         x_comp_attribute2          IN     VARCHAR2,
556                         x_comp_attribute3          IN     VARCHAR2,
557                         x_comp_attribute4          IN     VARCHAR2,
558                         x_comp_attribute5          IN     VARCHAR2,
559                         x_comp_attribute6          IN     VARCHAR2,
560                         x_comp_attribute7          IN     VARCHAR2,
561                         x_comp_attribute8          IN     VARCHAR2,
562                         x_comp_attribute9          IN     VARCHAR2,
563                         x_comp_attribute10         IN     VARCHAR2,
564                         x_comp_attribute11         IN     VARCHAR2,
565                         x_comp_attribute12         IN     VARCHAR2,
566                         x_comp_attribute13         IN     VARCHAR2,
567                         x_comp_attribute14         IN     VARCHAR2,
568                         x_comp_attribute15         IN     VARCHAR2,
569                         x_error_code          IN OUT NOCOPY NUMBER,
570                         x_error_msg           IN OUT NOCOPY VARCHAR2
571 
572                         x_error_code :  0 - Successful.
573                          Other values:    - SQL Error.
574 
575   DESIGN REFERENCES:
576 
577   ALGORITHM:
578 
579   NOTES:
580 
581   OPEN ISSUES:
582 
583   CLOSED ISSUES:
584 
585   CHANGE HISTORY:       Ramana Mulpury        06/20/97   Created
586 ===========================================================================*/
587 PROCEDURE update_co_prod_details(x_co_product_group_id IN     NUMBER,
588                                  x_effectivity_date    IN     DATE,
589                                  x_disable_date        IN     DATE,
590                                  x_usage_rate          IN     NUMBER,
591                                  x_inv_usage           IN     NUMBER,
592                                  x_duality_flag        IN     VARCHAR2,
593                                  x_basis_type          IN     NUMBER,        --LBM enh
594                                  x_comp_attribute_category  IN     VARCHAR2,
595                                  x_comp_attribute1          IN     VARCHAR2,
596                                  x_comp_attribute2          IN     VARCHAR2,
597                                  x_comp_attribute3          IN     VARCHAR2,
598                                  x_comp_attribute4          IN     VARCHAR2,
599                                  x_comp_attribute5          IN     VARCHAR2,
600                                  x_comp_attribute6          IN     VARCHAR2,
601                                  x_comp_attribute7          IN     VARCHAR2,
602                                  x_comp_attribute8          IN     VARCHAR2,
603                                  x_comp_attribute9          IN     VARCHAR2,
604                                  x_comp_attribute10         IN     VARCHAR2,
605                                  x_comp_attribute11         IN     VARCHAR2,
606                                  x_comp_attribute12         IN     VARCHAR2,
607                                  x_comp_attribute13         IN     VARCHAR2,
608                                  x_comp_attribute14         IN     VARCHAR2,
609                                  x_comp_attribute15         IN     VARCHAR2,
610                                  x_error_code          IN OUT NOCOPY NUMBER,
611                                  x_error_msg           IN OUT NOCOPY VARCHAR2);
612 
613 /*===========================================================================
614   FUNCTION NAME:	get_alternate_designator
615 
616   DESCRIPTION:		This function gets the alternate designator
620   PARAMETERS:		X_co_product_group_id	NUMBER
617                         used to create the bills associated with the co-products
618                         belonging to a specific co-product relationship.
619 
621 
622 
623   DESIGN REFERENCES:
624 
625   ALGORITHM:
626 
627   NOTES:
628 
629   OPEN ISSUES:
630 
631   CLOSED ISSUES:
632 
633   CHANGE HISTORY:	RMULPURY	7/7	Created
634 ===========================================================================*/
635 /*===========================================================================
636   PROCEDURE NAME:       lock_bill
637 
638   DESCRIPTION:          This routine is used to lock the assembly
639                         record prior to updating from the co-products
640                         form.
641 
642                         x_error_code is set to zero on success.
643 
644   PARAMETERS:     x_bill_sequence_id IN  NUMBER
645                   x_error_code   IN  OUT NOCOPY NUMBER
646                   x_error_msg    IN  OUT NOCOPY VARCHAR2
647 
648   DESIGN REFERENCES:
649 
650   ALGORITHM:
651 
652   NOTES:
653 
654   OPEN ISSUES:
655 
656   CLOSED ISSUES:
657 
658   CHANGE HISTORY:       Ramana Mulpury        02/08/98   Created
659 ===========================================================================*/
660  PROCEDURE lock_bill (x_bill_sequence_id       IN       NUMBER,
661                       x_error_code             IN OUT NOCOPY   NUMBER,
662                       x_error_msg              IN OUT NOCOPY   VARCHAR2);
663 
664 
665 /*===========================================================================
666   PROCEDURE NAME:       lock_component
667 
668   DESCRIPTION:          This routine is used to lock the component
669                         record prior to updating from the co-products
670                         form.
671 
672                         x_error_code is set to zero on success.
673 
674   PARAMETERS:     x_component_sequence_id   IN  NUMBER
675                   x_error_code              IN  OUT NOCOPY NUMBER
676                   x_error_msg               IN  OUT NOCOPY VARCHAR2
677 
678   DESIGN REFERENCES:
679 
680   ALGORITHM:
681 
682   NOTES:
683 
684   OPEN ISSUES:
685 
686   CLOSED ISSUES:
687 
688   CHANGE HISTORY:       Ramana Mulpury        02/08/98   Created
689 ===========================================================================*/
690  PROCEDURE lock_component (x_component_sequence_id  IN       NUMBER,
691                            x_error_code             IN OUT NOCOPY   NUMBER,
692                            x_error_msg              IN OUT NOCOPY   VARCHAR2);
693 
694 /*===========================================================================
695   PROCEDURE NAME:       call_bom_bo_api
696 
697   DESCRIPTION:          This routine calls the Bom Business Object API
698                         and does required error handling.
699 
700                         x_error_code is set to zero on success.
701 
702   PARAMETERS:
703 	p_bom_header_rec    IN  Bom_Bo_Pub.Bom_Head_Rec_Type
704 	p_component_tbl	    IN  Bom_Bo_Pub.Bom_Comps_Tbl_Type
705 	p_subs_comp_tbl     IN  Bom_Bo_Pub.Bom_Sub_Component_Tbl_Type
706         x_error_code        IN  OUT NOCOPY NUMBER
707         x_error_msg         IN  OUT NOCOPY VARCHAR2
708 
709   DESIGN REFERENCES:    BOM Business Object API Specs and Documentation
710 
711   ALGORITHM:
712 
713   NOTES:
714 
715   OPEN ISSUES:
716 
717   CLOSED ISSUES:
718 
719   CHANGE HISTORY:       Raghu Manjunath        04/26/00   Created
720 ===========================================================================*/
721 PROCEDURE call_bom_bo_api (
722    p_bom_header_rec    IN  Bom_Bo_Pub.Bom_Head_Rec_Type :=
723 				Bom_Bo_Pub.G_MISS_BOM_HEADER_REC,
724    p_component_tbl     IN  Bom_Bo_Pub.Bom_Comps_Tbl_Type :=
725 				Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL,
726    p_subs_comp_tbl     IN  Bom_Bo_Pub.Bom_Sub_Component_Tbl_Type :=
727 				Bom_Bo_Pub.G_MISS_BOM_SUB_COMPONENT_TBL,
728    x_error_code        IN OUT NOCOPY   NUMBER,
729    x_error_msg         IN OUT NOCOPY   VARCHAR2);
730 
731 /*===========================================================================
732 
733   PROCEDURE NAME:       set_common_bill_new
734 
735 ===========================================================================*/
736 
737 PROCEDURE set_common_bill_new (
738         p_co_product_group_id   IN  NUMBER,
739         p_organization_id       IN  NUMBER,
740         p_organization_code     IN  VARCHAR2,
741         p_alternate_designator  IN  VARCHAR2,
742         x_error_code            OUT NOCOPY  NUMBER,
743         x_error_msg             OUT NOCOPY  VARCHAR2);
744 
745 -- Declare some global variables for use by the BOM BO API
746 g_bom_header_rec Bom_Bo_Pub.Bom_Head_Rec_Type :=
747 				Bom_Bo_Pub.G_MISS_BOM_HEADER_REC;
748 g_component_tbl  Bom_Bo_Pub.Bom_Comps_Tbl_Type :=
749                                 Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL;
750 g_subs_comp_tbl  Bom_Bo_Pub.Bom_Sub_Component_Tbl_Type :=
751                                 Bom_Bo_Pub.G_MISS_BOM_SUB_COMPONENT_TBL;
752 g_subs_component_count NUMBER := 0;
753 
754 --for debug only
755 --g_iteration_count	NUMBER := 0;
757 END;
756