DBA Data[Home] [Help]

PACKAGE BODY: APPS.PO_ATTR_VALUES_DRAFT_PKG

Source


4 d_pkg_name CONSTANT varchar2(50) :=
1 PACKAGE BODY PO_ATTR_VALUES_DRAFT_PKG AS
2 /* $Header: PO_ATTR_VALUES_DRAFT_PKG.plb 120.9 2006/09/28 22:58:19 bao noship $ */
3 
5   PO_LOG.get_package_base('PO_ATTR_VALUES_DRAFT_PKG');
6 
7 -----------------------------------------------------------------------
8 --Start of Comments
9 --Name: delete_rows
10 --Pre-reqs: None
11 --Modifies:
12 --Locks:
13 --  None
14 --Function:
15 --  Deletes drafts for attribute values based on the information given
16 --  If only draft_id is provided, then all attribute values for the draft
17 --  will be deleted
18 --  If attribute_values_id is also provided, then the one record that has such
19 --  primary key will be deleted
20 --Parameters:
21 --IN:
22 --p_draft_id
23 --  draft unique identifier
24 --p_attribute_values_id
25 --  po attribute values unique identifier
26 --IN OUT:
27 --OUT:
28 --Returns:
29 --Notes:
30 --Testing:
31 --End of Comments
32 ------------------------------------------------------------------------
33 PROCEDURE delete_rows
34 ( p_draft_id IN NUMBER,
35   p_attribute_values_id IN NUMBER
36 ) IS
37 
38 d_api_name CONSTANT VARCHAR2(30) := 'delete_rows';
39 d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
40 d_position NUMBER;
41 
42 BEGIN
43   d_position := 0;
44   IF (PO_LOG.d_proc) THEN
45     PO_LOG.proc_begin(d_module);
46   END IF;
47 
48   DELETE FROM po_attribute_values_draft
49   WHERE draft_id = p_draft_id
50   AND attribute_values_id = NVL(p_attribute_values_id, attribute_values_id);
51 
52   d_position := 10;
53 EXCEPTION
54   WHEN OTHERS THEN
55     PO_MESSAGE_S.add_exc_msg
56     ( p_pkg_name => d_pkg_name,
57       p_procedure_name => d_api_name || '.' || d_position
58     );
59     RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
60 END delete_rows;
61 
62 -----------------------------------------------------------------------
63 --Start of Comments
64 --Name: sync_draft_from_txn
65 --Pre-reqs: None
66 --Modifies:
67 --Locks:
68 --  None
69 --Function:
70 --  Copy data from transaction table to draft table, if the corresponding
71 --  record in draft table does not exist. It also sets the delete flag of
72 --  the draft record according to the parameter.
73 --Parameters:
74 --IN:
75 --p_attribute_values_id_tbl
76 --  table of po attribute_values unique identifier
77 --p_draft_id_tbl
78 --  table of draft ids this sync up will be done for
79 --p_delete_flag_tbl
80 --  table fo flags to indicate whether the draft record should be maked as
81 --  "to be deleted"
82 --IN OUT:
83 --OUT:
84 --x_record_already_exist_tbl
85 --  Returns whether the record was already in draft table or not
86 --Returns:
87 --Notes:
88 --Testing:
89 --End of Comments
90 ------------------------------------------------------------------------
91 PROCEDURE sync_draft_from_txn
92 ( p_attribute_values_id_tbl  IN PO_TBL_NUMBER,
93   p_draft_id_tbl             IN PO_TBL_NUMBER,
94   p_delete_flag_tbl          IN PO_TBL_VARCHAR1,
95   x_record_already_exist_tbl OUT NOCOPY PO_TBL_VARCHAR1
96 ) IS
97 
98 d_api_name CONSTANT VARCHAR2(30) := 'sync_draft_from_txn';
99 d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
100 d_position NUMBER;
101 
102 l_distinct_id_list DBMS_SQL.NUMBER_TABLE;
103 l_duplicate_flag_tbl PO_TBL_VARCHAR1 := PO_TBL_VARCHAR1();
104 
105 BEGIN
106   d_position := 0;
107   IF (PO_LOG.d_proc) THEN
108     PO_LOG.proc_begin(d_module);
109   END IF;
110 
111   x_record_already_exist_tbl :=
112     PO_ATTR_VALUES_DRAFT_PVT.draft_changes_exist
113     ( p_draft_id_tbl => p_draft_id_tbl,
114       p_attribute_values_id_tbl => p_attribute_values_id_tbl
115     );
116 
117   -- bug5471513 START
118   -- If there're duplicate entries in the id table,
119   -- we do not want to insert multiple entries
120   -- Created an associative array to store what id has appeared.
121   l_duplicate_flag_tbl.EXTEND(p_attribute_values_id_tbl.COUNT);
122 
123   FOR i IN 1..p_attribute_values_id_tbl.COUNT LOOP
124     IF (x_record_already_exist_tbl(i) = FND_API.G_FALSE) THEN
125 
126       IF (l_distinct_id_list.EXISTS(p_attribute_values_id_tbl(i))) THEN
127 
128         l_duplicate_flag_tbl(i) := FND_API.G_TRUE;
129       ELSE
130         l_duplicate_flag_tbl(i) := FND_API.G_FALSE;
131 
132         l_distinct_id_list(p_attribute_values_id_tbl(i)) := 1;
133       END IF;
134 
135     ELSE
136 
137       l_duplicate_flag_tbl(i) := NULL;
138 
139     END IF;
140   END LOOP;
141   -- bug5471513 END
142 
143   d_position := 10;
144   IF (PO_LOG.d_stmt) THEN
145     PO_LOG.stmt(d_module, d_position, 'transfer records from txn to dft');
146   END IF;
147 
148   FORALL i IN 1..p_attribute_values_id_tbl.COUNT
149     INSERT INTO po_attribute_values_draft
150     ( draft_id,
154       po_line_id,
151       delete_flag,
152       change_accepted_flag,
153       attribute_values_id,
155       req_template_name,
156       req_template_line_num,
157       ip_category_id,
158       inventory_item_id,
159       org_id,
160       manufacturer_part_num,
161       picture,
162       thumbnail_image,
163       supplier_url,
164       manufacturer_url,
165       attachment_url,
166       unspsc,
167       availability,
168       lead_time,
169       text_base_attribute1,
170       text_base_attribute2,
171       text_base_attribute3,
172       text_base_attribute4,
173       text_base_attribute5,
174       text_base_attribute6,
175       text_base_attribute7,
176       text_base_attribute8,
177       text_base_attribute9,
178       text_base_attribute10,
179       text_base_attribute11,
180       text_base_attribute12,
181       text_base_attribute13,
182       text_base_attribute14,
183       text_base_attribute15,
184       text_base_attribute16,
185       text_base_attribute17,
186       text_base_attribute18,
187       text_base_attribute19,
188       text_base_attribute20,
189       text_base_attribute21,
190       text_base_attribute22,
191       text_base_attribute23,
192       text_base_attribute24,
193       text_base_attribute25,
194       text_base_attribute26,
195       text_base_attribute27,
196       text_base_attribute28,
197       text_base_attribute29,
198       text_base_attribute30,
199       text_base_attribute31,
200       text_base_attribute32,
201       text_base_attribute33,
202       text_base_attribute34,
203       text_base_attribute35,
204       text_base_attribute36,
205       text_base_attribute37,
206       text_base_attribute38,
207       text_base_attribute39,
208       text_base_attribute40,
209       text_base_attribute41,
210       text_base_attribute42,
211       text_base_attribute43,
212       text_base_attribute44,
213       text_base_attribute45,
214       text_base_attribute46,
215       text_base_attribute47,
216       text_base_attribute48,
217       text_base_attribute49,
218       text_base_attribute50,
219       text_base_attribute51,
220       text_base_attribute52,
221       text_base_attribute53,
222       text_base_attribute54,
223       text_base_attribute55,
224       text_base_attribute56,
225       text_base_attribute57,
226       text_base_attribute58,
227       text_base_attribute59,
228       text_base_attribute60,
229       text_base_attribute61,
230       text_base_attribute62,
231       text_base_attribute63,
232       text_base_attribute64,
233       text_base_attribute65,
234       text_base_attribute66,
235       text_base_attribute67,
236       text_base_attribute68,
237       text_base_attribute69,
238       text_base_attribute70,
239       text_base_attribute71,
240       text_base_attribute72,
241       text_base_attribute73,
242       text_base_attribute74,
243       text_base_attribute75,
244       text_base_attribute76,
245       text_base_attribute77,
246       text_base_attribute78,
247       text_base_attribute79,
248       text_base_attribute80,
249       text_base_attribute81,
250       text_base_attribute82,
251       text_base_attribute83,
252       text_base_attribute84,
253       text_base_attribute85,
254       text_base_attribute86,
255       text_base_attribute87,
256       text_base_attribute88,
257       text_base_attribute89,
258       text_base_attribute90,
259       text_base_attribute91,
260       text_base_attribute92,
261       text_base_attribute93,
262       text_base_attribute94,
263       text_base_attribute95,
264       text_base_attribute96,
265       text_base_attribute97,
266       text_base_attribute98,
267       text_base_attribute99,
268       text_base_attribute100,
269       num_base_attribute1,
270       num_base_attribute2,
271       num_base_attribute3,
272       num_base_attribute4,
273       num_base_attribute5,
274       num_base_attribute6,
275       num_base_attribute7,
276       num_base_attribute8,
277       num_base_attribute9,
278       num_base_attribute10,
279       num_base_attribute11,
280       num_base_attribute12,
281       num_base_attribute13,
282       num_base_attribute14,
283       num_base_attribute15,
284       num_base_attribute16,
285       num_base_attribute17,
286       num_base_attribute18,
287       num_base_attribute19,
288       num_base_attribute20,
289       num_base_attribute21,
290       num_base_attribute22,
291       num_base_attribute23,
292       num_base_attribute24,
293       num_base_attribute25,
294       num_base_attribute26,
295       num_base_attribute27,
296       num_base_attribute28,
297       num_base_attribute29,
298       num_base_attribute30,
299       num_base_attribute31,
300       num_base_attribute32,
301       num_base_attribute33,
302       num_base_attribute34,
303       num_base_attribute35,
304       num_base_attribute36,
305       num_base_attribute37,
306       num_base_attribute38,
307       num_base_attribute39,
308       num_base_attribute40,
309       num_base_attribute41,
310       num_base_attribute42,
311       num_base_attribute43,
312       num_base_attribute44,
313       num_base_attribute45,
314       num_base_attribute46,
315       num_base_attribute47,
316       num_base_attribute48,
320       num_base_attribute52,
317       num_base_attribute49,
318       num_base_attribute50,
319       num_base_attribute51,
321       num_base_attribute53,
322       num_base_attribute54,
323       num_base_attribute55,
324       num_base_attribute56,
325       num_base_attribute57,
326       num_base_attribute58,
327       num_base_attribute59,
328       num_base_attribute60,
329       num_base_attribute61,
330       num_base_attribute62,
331       num_base_attribute63,
332       num_base_attribute64,
333       num_base_attribute65,
334       num_base_attribute66,
335       num_base_attribute67,
336       num_base_attribute68,
337       num_base_attribute69,
338       num_base_attribute70,
339       num_base_attribute71,
340       num_base_attribute72,
341       num_base_attribute73,
342       num_base_attribute74,
343       num_base_attribute75,
344       num_base_attribute76,
345       num_base_attribute77,
346       num_base_attribute78,
347       num_base_attribute79,
348       num_base_attribute80,
349       num_base_attribute81,
350       num_base_attribute82,
351       num_base_attribute83,
352       num_base_attribute84,
353       num_base_attribute85,
354       num_base_attribute86,
355       num_base_attribute87,
356       num_base_attribute88,
357       num_base_attribute89,
358       num_base_attribute90,
359       num_base_attribute91,
360       num_base_attribute92,
361       num_base_attribute93,
362       num_base_attribute94,
363       num_base_attribute95,
364       num_base_attribute96,
365       num_base_attribute97,
366       num_base_attribute98,
367       num_base_attribute99,
368       num_base_attribute100,
369       text_cat_attribute1,
370       text_cat_attribute2,
371       text_cat_attribute3,
372       text_cat_attribute4,
373       text_cat_attribute5,
374       text_cat_attribute6,
375       text_cat_attribute7,
376       text_cat_attribute8,
377       text_cat_attribute9,
378       text_cat_attribute10,
379       text_cat_attribute11,
380       text_cat_attribute12,
381       text_cat_attribute13,
382       text_cat_attribute14,
383       text_cat_attribute15,
384       text_cat_attribute16,
385       text_cat_attribute17,
386       text_cat_attribute18,
387       text_cat_attribute19,
388       text_cat_attribute20,
389       text_cat_attribute21,
390       text_cat_attribute22,
391       text_cat_attribute23,
392       text_cat_attribute24,
393       text_cat_attribute25,
394       text_cat_attribute26,
395       text_cat_attribute27,
396       text_cat_attribute28,
397       text_cat_attribute29,
398       text_cat_attribute30,
399       text_cat_attribute31,
400       text_cat_attribute32,
401       text_cat_attribute33,
402       text_cat_attribute34,
403       text_cat_attribute35,
404       text_cat_attribute36,
405       text_cat_attribute37,
406       text_cat_attribute38,
407       text_cat_attribute39,
408       text_cat_attribute40,
409       text_cat_attribute41,
410       text_cat_attribute42,
411       text_cat_attribute43,
412       text_cat_attribute44,
413       text_cat_attribute45,
414       text_cat_attribute46,
415       text_cat_attribute47,
416       text_cat_attribute48,
417       text_cat_attribute49,
418       text_cat_attribute50,
419       num_cat_attribute1,
420       num_cat_attribute2,
421       num_cat_attribute3,
422       num_cat_attribute4,
423       num_cat_attribute5,
424       num_cat_attribute6,
425       num_cat_attribute7,
426       num_cat_attribute8,
427       num_cat_attribute9,
428       num_cat_attribute10,
429       num_cat_attribute11,
430       num_cat_attribute12,
431       num_cat_attribute13,
432       num_cat_attribute14,
433       num_cat_attribute15,
434       num_cat_attribute16,
435       num_cat_attribute17,
436       num_cat_attribute18,
437       num_cat_attribute19,
438       num_cat_attribute20,
439       num_cat_attribute21,
440       num_cat_attribute22,
441       num_cat_attribute23,
442       num_cat_attribute24,
443       num_cat_attribute25,
444       num_cat_attribute26,
445       num_cat_attribute27,
446       num_cat_attribute28,
447       num_cat_attribute29,
448       num_cat_attribute30,
449       num_cat_attribute31,
450       num_cat_attribute32,
451       num_cat_attribute33,
452       num_cat_attribute34,
453       num_cat_attribute35,
454       num_cat_attribute36,
455       num_cat_attribute37,
456       num_cat_attribute38,
457       num_cat_attribute39,
458       num_cat_attribute40,
459       num_cat_attribute41,
460       num_cat_attribute42,
461       num_cat_attribute43,
462       num_cat_attribute44,
463       num_cat_attribute45,
464       num_cat_attribute46,
465       num_cat_attribute47,
466       num_cat_attribute48,
467       num_cat_attribute49,
468       num_cat_attribute50,
469       last_update_login,
470       last_updated_by,
471       last_update_date,
472       created_by,
473       creation_date,
474       request_id,
475       program_application_id,
476       program_id,
477       program_update_date
478     )
479     SELECT
480       p_draft_id_tbl(i),
481       p_delete_flag_tbl(i),
482       NULL,
483       attribute_values_id,
484       po_line_id,
485       req_template_name,
486       req_template_line_num,
490       manufacturer_part_num,
487       ip_category_id,
488       inventory_item_id,
489       org_id,
491       picture,
492       thumbnail_image,
493       supplier_url,
494       manufacturer_url,
495       attachment_url,
496       unspsc,
497       availability,
498       lead_time,
499       text_base_attribute1,
500       text_base_attribute2,
501       text_base_attribute3,
502       text_base_attribute4,
503       text_base_attribute5,
504       text_base_attribute6,
505       text_base_attribute7,
506       text_base_attribute8,
507       text_base_attribute9,
508       text_base_attribute10,
509       text_base_attribute11,
510       text_base_attribute12,
511       text_base_attribute13,
512       text_base_attribute14,
513       text_base_attribute15,
514       text_base_attribute16,
515       text_base_attribute17,
516       text_base_attribute18,
517       text_base_attribute19,
518       text_base_attribute20,
519       text_base_attribute21,
520       text_base_attribute22,
521       text_base_attribute23,
522       text_base_attribute24,
523       text_base_attribute25,
524       text_base_attribute26,
525       text_base_attribute27,
526       text_base_attribute28,
527       text_base_attribute29,
528       text_base_attribute30,
529       text_base_attribute31,
530       text_base_attribute32,
531       text_base_attribute33,
532       text_base_attribute34,
533       text_base_attribute35,
534       text_base_attribute36,
535       text_base_attribute37,
536       text_base_attribute38,
537       text_base_attribute39,
538       text_base_attribute40,
539       text_base_attribute41,
540       text_base_attribute42,
541       text_base_attribute43,
542       text_base_attribute44,
543       text_base_attribute45,
544       text_base_attribute46,
545       text_base_attribute47,
546       text_base_attribute48,
547       text_base_attribute49,
548       text_base_attribute50,
549       text_base_attribute51,
550       text_base_attribute52,
551       text_base_attribute53,
552       text_base_attribute54,
553       text_base_attribute55,
554       text_base_attribute56,
555       text_base_attribute57,
556       text_base_attribute58,
557       text_base_attribute59,
558       text_base_attribute60,
559       text_base_attribute61,
560       text_base_attribute62,
561       text_base_attribute63,
562       text_base_attribute64,
563       text_base_attribute65,
564       text_base_attribute66,
565       text_base_attribute67,
566       text_base_attribute68,
567       text_base_attribute69,
568       text_base_attribute70,
569       text_base_attribute71,
570       text_base_attribute72,
571       text_base_attribute73,
572       text_base_attribute74,
573       text_base_attribute75,
574       text_base_attribute76,
575       text_base_attribute77,
576       text_base_attribute78,
577       text_base_attribute79,
578       text_base_attribute80,
579       text_base_attribute81,
580       text_base_attribute82,
581       text_base_attribute83,
582       text_base_attribute84,
583       text_base_attribute85,
584       text_base_attribute86,
585       text_base_attribute87,
586       text_base_attribute88,
587       text_base_attribute89,
588       text_base_attribute90,
589       text_base_attribute91,
590       text_base_attribute92,
591       text_base_attribute93,
592       text_base_attribute94,
593       text_base_attribute95,
594       text_base_attribute96,
595       text_base_attribute97,
596       text_base_attribute98,
597       text_base_attribute99,
598       text_base_attribute100,
599       num_base_attribute1,
600       num_base_attribute2,
601       num_base_attribute3,
602       num_base_attribute4,
603       num_base_attribute5,
604       num_base_attribute6,
605       num_base_attribute7,
606       num_base_attribute8,
607       num_base_attribute9,
608       num_base_attribute10,
609       num_base_attribute11,
610       num_base_attribute12,
611       num_base_attribute13,
612       num_base_attribute14,
613       num_base_attribute15,
614       num_base_attribute16,
615       num_base_attribute17,
616       num_base_attribute18,
617       num_base_attribute19,
618       num_base_attribute20,
619       num_base_attribute21,
620       num_base_attribute22,
621       num_base_attribute23,
622       num_base_attribute24,
623       num_base_attribute25,
624       num_base_attribute26,
625       num_base_attribute27,
626       num_base_attribute28,
627       num_base_attribute29,
628       num_base_attribute30,
629       num_base_attribute31,
630       num_base_attribute32,
631       num_base_attribute33,
632       num_base_attribute34,
633       num_base_attribute35,
634       num_base_attribute36,
635       num_base_attribute37,
636       num_base_attribute38,
637       num_base_attribute39,
638       num_base_attribute40,
639       num_base_attribute41,
640       num_base_attribute42,
641       num_base_attribute43,
642       num_base_attribute44,
643       num_base_attribute45,
644       num_base_attribute46,
645       num_base_attribute47,
646       num_base_attribute48,
647       num_base_attribute49,
648       num_base_attribute50,
649       num_base_attribute51,
650       num_base_attribute52,
651       num_base_attribute53,
655       num_base_attribute57,
652       num_base_attribute54,
653       num_base_attribute55,
654       num_base_attribute56,
656       num_base_attribute58,
657       num_base_attribute59,
658       num_base_attribute60,
659       num_base_attribute61,
660       num_base_attribute62,
661       num_base_attribute63,
662       num_base_attribute64,
663       num_base_attribute65,
664       num_base_attribute66,
665       num_base_attribute67,
666       num_base_attribute68,
667       num_base_attribute69,
668       num_base_attribute70,
669       num_base_attribute71,
670       num_base_attribute72,
671       num_base_attribute73,
672       num_base_attribute74,
673       num_base_attribute75,
674       num_base_attribute76,
675       num_base_attribute77,
676       num_base_attribute78,
677       num_base_attribute79,
678       num_base_attribute80,
679       num_base_attribute81,
680       num_base_attribute82,
681       num_base_attribute83,
682       num_base_attribute84,
683       num_base_attribute85,
684       num_base_attribute86,
685       num_base_attribute87,
686       num_base_attribute88,
687       num_base_attribute89,
688       num_base_attribute90,
689       num_base_attribute91,
690       num_base_attribute92,
691       num_base_attribute93,
692       num_base_attribute94,
693       num_base_attribute95,
694       num_base_attribute96,
695       num_base_attribute97,
696       num_base_attribute98,
697       num_base_attribute99,
698       num_base_attribute100,
699       text_cat_attribute1,
700       text_cat_attribute2,
701       text_cat_attribute3,
702       text_cat_attribute4,
703       text_cat_attribute5,
704       text_cat_attribute6,
705       text_cat_attribute7,
706       text_cat_attribute8,
707       text_cat_attribute9,
708       text_cat_attribute10,
709       text_cat_attribute11,
710       text_cat_attribute12,
711       text_cat_attribute13,
712       text_cat_attribute14,
713       text_cat_attribute15,
714       text_cat_attribute16,
715       text_cat_attribute17,
716       text_cat_attribute18,
717       text_cat_attribute19,
718       text_cat_attribute20,
719       text_cat_attribute21,
720       text_cat_attribute22,
721       text_cat_attribute23,
722       text_cat_attribute24,
723       text_cat_attribute25,
724       text_cat_attribute26,
725       text_cat_attribute27,
726       text_cat_attribute28,
727       text_cat_attribute29,
728       text_cat_attribute30,
729       text_cat_attribute31,
730       text_cat_attribute32,
731       text_cat_attribute33,
732       text_cat_attribute34,
733       text_cat_attribute35,
734       text_cat_attribute36,
735       text_cat_attribute37,
736       text_cat_attribute38,
737       text_cat_attribute39,
738       text_cat_attribute40,
739       text_cat_attribute41,
740       text_cat_attribute42,
741       text_cat_attribute43,
742       text_cat_attribute44,
743       text_cat_attribute45,
744       text_cat_attribute46,
745       text_cat_attribute47,
746       text_cat_attribute48,
747       text_cat_attribute49,
748       text_cat_attribute50,
749       num_cat_attribute1,
750       num_cat_attribute2,
751       num_cat_attribute3,
752       num_cat_attribute4,
753       num_cat_attribute5,
754       num_cat_attribute6,
755       num_cat_attribute7,
756       num_cat_attribute8,
757       num_cat_attribute9,
758       num_cat_attribute10,
759       num_cat_attribute11,
760       num_cat_attribute12,
761       num_cat_attribute13,
762       num_cat_attribute14,
763       num_cat_attribute15,
764       num_cat_attribute16,
765       num_cat_attribute17,
766       num_cat_attribute18,
767       num_cat_attribute19,
768       num_cat_attribute20,
769       num_cat_attribute21,
770       num_cat_attribute22,
771       num_cat_attribute23,
772       num_cat_attribute24,
773       num_cat_attribute25,
774       num_cat_attribute26,
775       num_cat_attribute27,
776       num_cat_attribute28,
777       num_cat_attribute29,
778       num_cat_attribute30,
779       num_cat_attribute31,
780       num_cat_attribute32,
781       num_cat_attribute33,
782       num_cat_attribute34,
783       num_cat_attribute35,
784       num_cat_attribute36,
785       num_cat_attribute37,
786       num_cat_attribute38,
787       num_cat_attribute39,
788       num_cat_attribute40,
789       num_cat_attribute41,
790       num_cat_attribute42,
791       num_cat_attribute43,
792       num_cat_attribute44,
793       num_cat_attribute45,
794       num_cat_attribute46,
795       num_cat_attribute47,
796       num_cat_attribute48,
797       num_cat_attribute49,
798       num_cat_attribute50,
799       last_update_login,
800       last_updated_by,
801       last_update_date,
802       created_by,
803       creation_date,
804       request_id,
805       program_application_id,
806       program_id,
807       program_update_date
808     FROM po_attribute_values
809     WHERE attribute_values_id = p_attribute_values_id_tbl(i)
810     AND x_record_already_exist_tbl(i) = FND_API.G_FALSE
811     AND l_duplicate_flag_tbl(i) = FND_API.G_FALSE;
812 
813   d_position := 20;
814   IF (PO_LOG.d_stmt) THEN
818   FORALL i IN 1..p_attribute_values_id_tbl.COUNT
815     PO_LOG.stmt(d_module, d_position, 'transfer count = ' || SQL%ROWCOUNT);
816   END IF;
817 
819     UPDATE po_attribute_values_draft
820     SET    delete_flag = p_delete_flag_tbl(i)
821     WHERE  attribute_values_id = p_attribute_values_id_tbl(i)
822     AND    draft_id = p_draft_id_tbl(i)
823     AND    NVL(delete_flag, 'N') <> 'Y'  -- bug5570989
824     AND    x_record_already_exist_tbl(i) = FND_API.G_TRUE;
825 
826   d_position := 30;
827 
828   IF (PO_LOG.d_stmt) THEN
829     PO_LOG.stmt(d_module, d_position, 'update draft records that are already' ||
830                 ' in draft table. Count = ' || SQL%ROWCOUNT);
831   END IF;
832 
833   d_position := 40;
834 
835   IF (PO_LOG.d_proc) THEN
836     PO_LOG.proc_end(d_module);
837   END IF;
838 
839 EXCEPTION
840   WHEN OTHERS THEN
841     PO_MESSAGE_S.add_exc_msg
842     ( p_pkg_name => d_pkg_name,
843       p_procedure_name => d_api_name || '.' || d_position
844     );
845     RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
846 END sync_draft_from_txn;
847 
848 -----------------------------------------------------------------------
849 --Start of Comments
850 --Name: sync_draft_from_txn
851 --Pre-reqs: None
852 --Modifies:
853 --Locks:
854 --  None
855 --Function:
856 --  Same functionality as the bulk version of this procedure
857 --Parameters:
858 --IN:
859 --p_attribute_values_id
860 --  attribute values unique identifier
861 --p_draft_id
862 --  the draft this sync up will be done for
863 --p_delete_flag
864 --  flag to indicate whether the draft record should be maked as "to be
865 --  deleted"
866 --IN OUT:
867 --OUT:
868 --x_record_already_exist
869 --  Returns whether the record was already in draft table or not
870 --Returns:
871 --Notes:
872 --Testing:
873 --End of Comments
874 ------------------------------------------------------------------------
875 PROCEDURE sync_draft_from_txn
876 ( p_attribute_values_id IN NUMBER,
877   p_draft_id IN NUMBER,
878   p_delete_flag IN VARCHAR2,
879   x_record_already_exist OUT NOCOPY VARCHAR2
880 ) IS
881 
882 d_api_name CONSTANT VARCHAR2(30) := 'sync_draft_from_txn';
883 d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
884 d_position NUMBER;
885 
886 l_record_already_exist_tbl PO_TBL_VARCHAR1;
887 
888 BEGIN
889   d_position := 0;
890   IF (PO_LOG.d_proc) THEN
891     PO_LOG.proc_begin(d_module);
892     PO_LOG.proc_begin(d_module, 'p_attribute_values_id', p_attribute_values_id);
893   END IF;
894 
895   sync_draft_from_txn
896   ( p_attribute_values_id_tbl  => PO_TBL_NUMBER(p_attribute_values_id),
897     p_draft_id_tbl             => PO_TBL_NUMBER(p_draft_id),
898     p_delete_flag_tbl          => PO_TBL_VARCHAR1(p_delete_flag),
899     x_record_already_exist_tbl => l_record_already_exist_tbl
900   );
901 
902   x_record_already_exist := l_record_already_exist_tbl(1);
903 
904   d_position := 10;
905   IF (PO_LOG.d_proc) THEN
906     PO_LOG.proc_end(d_module);
907     PO_LOG.proc_end(d_module, 'x_record_already_exist', x_record_already_exist);
908   END IF;
909 
910 EXCEPTION
911   WHEN OTHERS THEN
912     PO_MESSAGE_S.add_exc_msg
913     ( p_pkg_name => d_pkg_name,
914       p_procedure_name => d_api_name || '.' || d_position
915     );
916     RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
917 END sync_draft_from_txn;
918 
919 -----------------------------------------------------------------------
920 --Start of Comments
921 --Name: merge_changes
922 --Pre-reqs: None
923 --Modifies:
924 --Locks:
925 --  None
926 --Function:
927 --  Merge the records in draft table to transaction table
928 --  Either insert, update or delete will be performed on top of transaction
929 --  table, depending on the delete_flag on the draft record and whether the
930 --  record already exists in transaction table
931 --
932 --Parameters:
933 --IN:
934 --p_draft_id
935 --  draft unique identifier
936 --IN OUT:
937 --OUT:
938 --Returns:
939 --Notes:
940 --Testing:
941 --End of Comments
942 ------------------------------------------------------------------------
943 PROCEDURE merge_changes
944 ( p_draft_id IN NUMBER
945 ) IS
946 
947 d_api_name CONSTANT VARCHAR2(30) := 'merge_changes';
948 d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
949 d_position NUMBER;
950 
951 BEGIN
952 
953   d_position := 0;
954   IF (PO_LOG.d_proc) THEN
955     PO_LOG.proc_begin(d_module);
956   END IF;
957 
958   -- Since putting DELETE within MERGE statement is causing database
959   -- to thrown internal error, for now we just separate the DELETE statement.
960   -- Once this is fixed we'll move the delete statement back to the merge
961   -- statement
962 
963   -- bug5187544
964   -- Delete only records that have not been rejected
965 
966   DELETE FROM po_attribute_values PAV
967   WHERE PAV.attribute_values_id IN
968          ( SELECT PAVD.attribute_values_id
969            FROM   po_attribute_values_draft PAVD
970            WHERE  PAVD.draft_id = p_draft_id
971            AND    PAVD.delete_flag = 'Y'
972            AND    NVL(PAVD.change_accepted_flag, 'Y') = 'Y');
973 
974   -- During Update case, the following attributes will be skipped:
978   MERGE INTO po_attribute_values PAV
975   --  PAV.attribute_values_id = PAVDV.attribute_values_id,
976   --  PAV.created_by = PAVDV.created_by,
977   --  PAV.creation_date = PAVDV.creation_date,
979   USING (
980     SELECT
981       PAVD.draft_id,
982       PAVD.change_accepted_flag,
983       PAVD.delete_flag,
984       PAVD.attribute_values_id,
985       PAVD.po_line_id,
986       PAVD.req_template_name,
987       PAVD.req_template_line_num,
988       PAVD.ip_category_id,
989       PAVD.inventory_item_id,
990       PAVD.org_id,
991       PAVD.manufacturer_part_num,
992       PAVD.picture,
993       PAVD.thumbnail_image,
994       PAVD.supplier_url,
995       PAVD.manufacturer_url,
996       PAVD.attachment_url,
997       PAVD.unspsc,
998       PAVD.availability,
999       PAVD.lead_time,
1000       PAVD.text_base_attribute1,
1001       PAVD.text_base_attribute2,
1002       PAVD.text_base_attribute3,
1003       PAVD.text_base_attribute4,
1004       PAVD.text_base_attribute5,
1005       PAVD.text_base_attribute6,
1006       PAVD.text_base_attribute7,
1007       PAVD.text_base_attribute8,
1008       PAVD.text_base_attribute9,
1009       PAVD.text_base_attribute10,
1010       PAVD.text_base_attribute11,
1011       PAVD.text_base_attribute12,
1012       PAVD.text_base_attribute13,
1013       PAVD.text_base_attribute14,
1014       PAVD.text_base_attribute15,
1015       PAVD.text_base_attribute16,
1016       PAVD.text_base_attribute17,
1017       PAVD.text_base_attribute18,
1018       PAVD.text_base_attribute19,
1019       PAVD.text_base_attribute20,
1020       PAVD.text_base_attribute21,
1021       PAVD.text_base_attribute22,
1022       PAVD.text_base_attribute23,
1023       PAVD.text_base_attribute24,
1024       PAVD.text_base_attribute25,
1025       PAVD.text_base_attribute26,
1026       PAVD.text_base_attribute27,
1027       PAVD.text_base_attribute28,
1028       PAVD.text_base_attribute29,
1029       PAVD.text_base_attribute30,
1030       PAVD.text_base_attribute31,
1031       PAVD.text_base_attribute32,
1032       PAVD.text_base_attribute33,
1033       PAVD.text_base_attribute34,
1034       PAVD.text_base_attribute35,
1035       PAVD.text_base_attribute36,
1036       PAVD.text_base_attribute37,
1037       PAVD.text_base_attribute38,
1038       PAVD.text_base_attribute39,
1039       PAVD.text_base_attribute40,
1040       PAVD.text_base_attribute41,
1041       PAVD.text_base_attribute42,
1042       PAVD.text_base_attribute43,
1043       PAVD.text_base_attribute44,
1044       PAVD.text_base_attribute45,
1045       PAVD.text_base_attribute46,
1046       PAVD.text_base_attribute47,
1047       PAVD.text_base_attribute48,
1048       PAVD.text_base_attribute49,
1049       PAVD.text_base_attribute50,
1050       PAVD.text_base_attribute51,
1051       PAVD.text_base_attribute52,
1052       PAVD.text_base_attribute53,
1053       PAVD.text_base_attribute54,
1054       PAVD.text_base_attribute55,
1055       PAVD.text_base_attribute56,
1056       PAVD.text_base_attribute57,
1057       PAVD.text_base_attribute58,
1058       PAVD.text_base_attribute59,
1059       PAVD.text_base_attribute60,
1060       PAVD.text_base_attribute61,
1061       PAVD.text_base_attribute62,
1062       PAVD.text_base_attribute63,
1063       PAVD.text_base_attribute64,
1064       PAVD.text_base_attribute65,
1065       PAVD.text_base_attribute66,
1066       PAVD.text_base_attribute67,
1067       PAVD.text_base_attribute68,
1068       PAVD.text_base_attribute69,
1069       PAVD.text_base_attribute70,
1070       PAVD.text_base_attribute71,
1071       PAVD.text_base_attribute72,
1072       PAVD.text_base_attribute73,
1073       PAVD.text_base_attribute74,
1074       PAVD.text_base_attribute75,
1075       PAVD.text_base_attribute76,
1076       PAVD.text_base_attribute77,
1077       PAVD.text_base_attribute78,
1078       PAVD.text_base_attribute79,
1079       PAVD.text_base_attribute80,
1080       PAVD.text_base_attribute81,
1081       PAVD.text_base_attribute82,
1082       PAVD.text_base_attribute83,
1083       PAVD.text_base_attribute84,
1084       PAVD.text_base_attribute85,
1085       PAVD.text_base_attribute86,
1086       PAVD.text_base_attribute87,
1087       PAVD.text_base_attribute88,
1088       PAVD.text_base_attribute89,
1089       PAVD.text_base_attribute90,
1090       PAVD.text_base_attribute91,
1091       PAVD.text_base_attribute92,
1092       PAVD.text_base_attribute93,
1093       PAVD.text_base_attribute94,
1094       PAVD.text_base_attribute95,
1095       PAVD.text_base_attribute96,
1096       PAVD.text_base_attribute97,
1097       PAVD.text_base_attribute98,
1098       PAVD.text_base_attribute99,
1099       PAVD.text_base_attribute100,
1100       PAVD.num_base_attribute1,
1101       PAVD.num_base_attribute2,
1102       PAVD.num_base_attribute3,
1103       PAVD.num_base_attribute4,
1104       PAVD.num_base_attribute5,
1105       PAVD.num_base_attribute6,
1106       PAVD.num_base_attribute7,
1107       PAVD.num_base_attribute8,
1108       PAVD.num_base_attribute9,
1109       PAVD.num_base_attribute10,
1110       PAVD.num_base_attribute11,
1111       PAVD.num_base_attribute12,
1112       PAVD.num_base_attribute13,
1113       PAVD.num_base_attribute14,
1114       PAVD.num_base_attribute15,
1115       PAVD.num_base_attribute16,
1116       PAVD.num_base_attribute17,
1117       PAVD.num_base_attribute18,
1118       PAVD.num_base_attribute19,
1119       PAVD.num_base_attribute20,
1120       PAVD.num_base_attribute21,
1121       PAVD.num_base_attribute22,
1122       PAVD.num_base_attribute23,
1123       PAVD.num_base_attribute24,
1127       PAVD.num_base_attribute28,
1124       PAVD.num_base_attribute25,
1125       PAVD.num_base_attribute26,
1126       PAVD.num_base_attribute27,
1128       PAVD.num_base_attribute29,
1129       PAVD.num_base_attribute30,
1130       PAVD.num_base_attribute31,
1131       PAVD.num_base_attribute32,
1132       PAVD.num_base_attribute33,
1133       PAVD.num_base_attribute34,
1134       PAVD.num_base_attribute35,
1135       PAVD.num_base_attribute36,
1136       PAVD.num_base_attribute37,
1137       PAVD.num_base_attribute38,
1138       PAVD.num_base_attribute39,
1139       PAVD.num_base_attribute40,
1140       PAVD.num_base_attribute41,
1141       PAVD.num_base_attribute42,
1142       PAVD.num_base_attribute43,
1143       PAVD.num_base_attribute44,
1144       PAVD.num_base_attribute45,
1145       PAVD.num_base_attribute46,
1146       PAVD.num_base_attribute47,
1147       PAVD.num_base_attribute48,
1148       PAVD.num_base_attribute49,
1149       PAVD.num_base_attribute50,
1150       PAVD.num_base_attribute51,
1151       PAVD.num_base_attribute52,
1152       PAVD.num_base_attribute53,
1153       PAVD.num_base_attribute54,
1154       PAVD.num_base_attribute55,
1155       PAVD.num_base_attribute56,
1156       PAVD.num_base_attribute57,
1157       PAVD.num_base_attribute58,
1158       PAVD.num_base_attribute59,
1159       PAVD.num_base_attribute60,
1160       PAVD.num_base_attribute61,
1161       PAVD.num_base_attribute62,
1162       PAVD.num_base_attribute63,
1163       PAVD.num_base_attribute64,
1164       PAVD.num_base_attribute65,
1165       PAVD.num_base_attribute66,
1166       PAVD.num_base_attribute67,
1167       PAVD.num_base_attribute68,
1168       PAVD.num_base_attribute69,
1169       PAVD.num_base_attribute70,
1170       PAVD.num_base_attribute71,
1171       PAVD.num_base_attribute72,
1172       PAVD.num_base_attribute73,
1173       PAVD.num_base_attribute74,
1174       PAVD.num_base_attribute75,
1175       PAVD.num_base_attribute76,
1176       PAVD.num_base_attribute77,
1177       PAVD.num_base_attribute78,
1178       PAVD.num_base_attribute79,
1179       PAVD.num_base_attribute80,
1180       PAVD.num_base_attribute81,
1181       PAVD.num_base_attribute82,
1182       PAVD.num_base_attribute83,
1183       PAVD.num_base_attribute84,
1184       PAVD.num_base_attribute85,
1185       PAVD.num_base_attribute86,
1186       PAVD.num_base_attribute87,
1187       PAVD.num_base_attribute88,
1188       PAVD.num_base_attribute89,
1189       PAVD.num_base_attribute90,
1190       PAVD.num_base_attribute91,
1191       PAVD.num_base_attribute92,
1192       PAVD.num_base_attribute93,
1193       PAVD.num_base_attribute94,
1194       PAVD.num_base_attribute95,
1195       PAVD.num_base_attribute96,
1196       PAVD.num_base_attribute97,
1197       PAVD.num_base_attribute98,
1198       PAVD.num_base_attribute99,
1199       PAVD.num_base_attribute100,
1200       PAVD.text_cat_attribute1,
1201       PAVD.text_cat_attribute2,
1202       PAVD.text_cat_attribute3,
1203       PAVD.text_cat_attribute4,
1204       PAVD.text_cat_attribute5,
1205       PAVD.text_cat_attribute6,
1206       PAVD.text_cat_attribute7,
1207       PAVD.text_cat_attribute8,
1208       PAVD.text_cat_attribute9,
1209       PAVD.text_cat_attribute10,
1210       PAVD.text_cat_attribute11,
1211       PAVD.text_cat_attribute12,
1212       PAVD.text_cat_attribute13,
1213       PAVD.text_cat_attribute14,
1214       PAVD.text_cat_attribute15,
1215       PAVD.text_cat_attribute16,
1216       PAVD.text_cat_attribute17,
1217       PAVD.text_cat_attribute18,
1218       PAVD.text_cat_attribute19,
1219       PAVD.text_cat_attribute20,
1220       PAVD.text_cat_attribute21,
1221       PAVD.text_cat_attribute22,
1222       PAVD.text_cat_attribute23,
1223       PAVD.text_cat_attribute24,
1224       PAVD.text_cat_attribute25,
1225       PAVD.text_cat_attribute26,
1226       PAVD.text_cat_attribute27,
1227       PAVD.text_cat_attribute28,
1228       PAVD.text_cat_attribute29,
1229       PAVD.text_cat_attribute30,
1230       PAVD.text_cat_attribute31,
1231       PAVD.text_cat_attribute32,
1232       PAVD.text_cat_attribute33,
1233       PAVD.text_cat_attribute34,
1234       PAVD.text_cat_attribute35,
1235       PAVD.text_cat_attribute36,
1236       PAVD.text_cat_attribute37,
1237       PAVD.text_cat_attribute38,
1238       PAVD.text_cat_attribute39,
1239       PAVD.text_cat_attribute40,
1240       PAVD.text_cat_attribute41,
1241       PAVD.text_cat_attribute42,
1242       PAVD.text_cat_attribute43,
1243       PAVD.text_cat_attribute44,
1244       PAVD.text_cat_attribute45,
1245       PAVD.text_cat_attribute46,
1246       PAVD.text_cat_attribute47,
1247       PAVD.text_cat_attribute48,
1248       PAVD.text_cat_attribute49,
1249       PAVD.text_cat_attribute50,
1250       PAVD.num_cat_attribute1,
1251       PAVD.num_cat_attribute2,
1252       PAVD.num_cat_attribute3,
1253       PAVD.num_cat_attribute4,
1254       PAVD.num_cat_attribute5,
1255       PAVD.num_cat_attribute6,
1256       PAVD.num_cat_attribute7,
1257       PAVD.num_cat_attribute8,
1258       PAVD.num_cat_attribute9,
1259       PAVD.num_cat_attribute10,
1260       PAVD.num_cat_attribute11,
1261       PAVD.num_cat_attribute12,
1262       PAVD.num_cat_attribute13,
1263       PAVD.num_cat_attribute14,
1264       PAVD.num_cat_attribute15,
1265       PAVD.num_cat_attribute16,
1266       PAVD.num_cat_attribute17,
1267       PAVD.num_cat_attribute18,
1268       PAVD.num_cat_attribute19,
1269       PAVD.num_cat_attribute20,
1270       PAVD.num_cat_attribute21,
1271       PAVD.num_cat_attribute22,
1272       PAVD.num_cat_attribute23,
1276       PAVD.num_cat_attribute27,
1273       PAVD.num_cat_attribute24,
1274       PAVD.num_cat_attribute25,
1275       PAVD.num_cat_attribute26,
1277       PAVD.num_cat_attribute28,
1278       PAVD.num_cat_attribute29,
1279       PAVD.num_cat_attribute30,
1280       PAVD.num_cat_attribute31,
1281       PAVD.num_cat_attribute32,
1282       PAVD.num_cat_attribute33,
1283       PAVD.num_cat_attribute34,
1284       PAVD.num_cat_attribute35,
1285       PAVD.num_cat_attribute36,
1286       PAVD.num_cat_attribute37,
1287       PAVD.num_cat_attribute38,
1288       PAVD.num_cat_attribute39,
1289       PAVD.num_cat_attribute40,
1290       PAVD.num_cat_attribute41,
1291       PAVD.num_cat_attribute42,
1292       PAVD.num_cat_attribute43,
1293       PAVD.num_cat_attribute44,
1294       PAVD.num_cat_attribute45,
1295       PAVD.num_cat_attribute46,
1296       PAVD.num_cat_attribute47,
1297       PAVD.num_cat_attribute48,
1298       PAVD.num_cat_attribute49,
1299       PAVD.num_cat_attribute50,
1300       PAVD.last_update_login,
1301       PAVD.last_updated_by,
1302       PAVD.last_update_date,
1303       PAVD.created_by,
1304       PAVD.creation_date,
1305       PAVD.request_id,
1306       PAVD.program_application_id,
1307       PAVD.program_id,
1308       PAVD.program_update_date
1309     FROM po_attribute_values_draft PAVD
1310     WHERE PAVD.draft_id = p_draft_id
1311     AND NVL(PAVD.change_accepted_flag, 'Y') = 'Y') PAVDV
1312   ON (PAV.attribute_values_id = PAVDV.attribute_values_id)
1313   WHEN MATCHED THEN
1314     UPDATE
1315     SET
1316       PAV.po_line_id = PAVDV.po_line_id,
1317       PAV.req_template_name = PAVDV.req_template_name,
1318       PAV.req_template_line_num = PAVDV.req_template_line_num,
1319       PAV.ip_category_id = PAVDV.ip_category_id,
1320       PAV.inventory_item_id = PAVDV.inventory_item_id,
1321       PAV.org_id = PAVDV.org_id,
1322       PAV.manufacturer_part_num = PAVDV.manufacturer_part_num,
1323       PAV.picture = PAVDV.picture,
1324       PAV.thumbnail_image = PAVDV.thumbnail_image,
1325       PAV.supplier_url = PAVDV.supplier_url,
1326       PAV.manufacturer_url = PAVDV.manufacturer_url,
1327       PAV.attachment_url = PAVDV.attachment_url,
1328       PAV.unspsc = PAVDV.unspsc,
1329       PAV.availability = PAVDV.availability,
1330       PAV.lead_time = PAVDV.lead_time,
1331       PAV.text_base_attribute1 = PAVDV.text_base_attribute1,
1332       PAV.text_base_attribute2 = PAVDV.text_base_attribute2,
1333       PAV.text_base_attribute3 = PAVDV.text_base_attribute3,
1334       PAV.text_base_attribute4 = PAVDV.text_base_attribute4,
1335       PAV.text_base_attribute5 = PAVDV.text_base_attribute5,
1336       PAV.text_base_attribute6 = PAVDV.text_base_attribute6,
1337       PAV.text_base_attribute7 = PAVDV.text_base_attribute7,
1338       PAV.text_base_attribute8 = PAVDV.text_base_attribute8,
1339       PAV.text_base_attribute9 = PAVDV.text_base_attribute9,
1340       PAV.text_base_attribute10 = PAVDV.text_base_attribute10,
1341       PAV.text_base_attribute11 = PAVDV.text_base_attribute11,
1342       PAV.text_base_attribute12 = PAVDV.text_base_attribute12,
1343       PAV.text_base_attribute13 = PAVDV.text_base_attribute13,
1344       PAV.text_base_attribute14 = PAVDV.text_base_attribute14,
1345       PAV.text_base_attribute15 = PAVDV.text_base_attribute15,
1346       PAV.text_base_attribute16 = PAVDV.text_base_attribute16,
1347       PAV.text_base_attribute17 = PAVDV.text_base_attribute17,
1348       PAV.text_base_attribute18 = PAVDV.text_base_attribute18,
1349       PAV.text_base_attribute19 = PAVDV.text_base_attribute19,
1350       PAV.text_base_attribute20 = PAVDV.text_base_attribute20,
1351       PAV.text_base_attribute21 = PAVDV.text_base_attribute21,
1352       PAV.text_base_attribute22 = PAVDV.text_base_attribute22,
1353       PAV.text_base_attribute23 = PAVDV.text_base_attribute23,
1354       PAV.text_base_attribute24 = PAVDV.text_base_attribute24,
1355       PAV.text_base_attribute25 = PAVDV.text_base_attribute25,
1356       PAV.text_base_attribute26 = PAVDV.text_base_attribute26,
1357       PAV.text_base_attribute27 = PAVDV.text_base_attribute27,
1358       PAV.text_base_attribute28 = PAVDV.text_base_attribute28,
1359       PAV.text_base_attribute29 = PAVDV.text_base_attribute29,
1360       PAV.text_base_attribute30 = PAVDV.text_base_attribute30,
1361       PAV.text_base_attribute31 = PAVDV.text_base_attribute31,
1362       PAV.text_base_attribute32 = PAVDV.text_base_attribute32,
1363       PAV.text_base_attribute33 = PAVDV.text_base_attribute33,
1364       PAV.text_base_attribute34 = PAVDV.text_base_attribute34,
1365       PAV.text_base_attribute35 = PAVDV.text_base_attribute35,
1366       PAV.text_base_attribute36 = PAVDV.text_base_attribute36,
1367       PAV.text_base_attribute37 = PAVDV.text_base_attribute37,
1368       PAV.text_base_attribute38 = PAVDV.text_base_attribute38,
1369       PAV.text_base_attribute39 = PAVDV.text_base_attribute39,
1370       PAV.text_base_attribute40 = PAVDV.text_base_attribute40,
1371       PAV.text_base_attribute41 = PAVDV.text_base_attribute41,
1372       PAV.text_base_attribute42 = PAVDV.text_base_attribute42,
1373       PAV.text_base_attribute43 = PAVDV.text_base_attribute43,
1374       PAV.text_base_attribute44 = PAVDV.text_base_attribute44,
1375       PAV.text_base_attribute45 = PAVDV.text_base_attribute45,
1376       PAV.text_base_attribute46 = PAVDV.text_base_attribute46,
1377       PAV.text_base_attribute47 = PAVDV.text_base_attribute47,
1378       PAV.text_base_attribute48 = PAVDV.text_base_attribute48,
1379       PAV.text_base_attribute49 = PAVDV.text_base_attribute49,
1380       PAV.text_base_attribute50 = PAVDV.text_base_attribute50,
1381       PAV.text_base_attribute51 = PAVDV.text_base_attribute51,
1382       PAV.text_base_attribute52 = PAVDV.text_base_attribute52,
1383       PAV.text_base_attribute53 = PAVDV.text_base_attribute53,
1384       PAV.text_base_attribute54 = PAVDV.text_base_attribute54,
1388       PAV.text_base_attribute58 = PAVDV.text_base_attribute58,
1385       PAV.text_base_attribute55 = PAVDV.text_base_attribute55,
1386       PAV.text_base_attribute56 = PAVDV.text_base_attribute56,
1387       PAV.text_base_attribute57 = PAVDV.text_base_attribute57,
1389       PAV.text_base_attribute59 = PAVDV.text_base_attribute59,
1390       PAV.text_base_attribute60 = PAVDV.text_base_attribute60,
1391       PAV.text_base_attribute61 = PAVDV.text_base_attribute61,
1392       PAV.text_base_attribute62 = PAVDV.text_base_attribute62,
1393       PAV.text_base_attribute63 = PAVDV.text_base_attribute63,
1394       PAV.text_base_attribute64 = PAVDV.text_base_attribute64,
1395       PAV.text_base_attribute65 = PAVDV.text_base_attribute65,
1396       PAV.text_base_attribute66 = PAVDV.text_base_attribute66,
1397       PAV.text_base_attribute67 = PAVDV.text_base_attribute67,
1398       PAV.text_base_attribute68 = PAVDV.text_base_attribute68,
1399       PAV.text_base_attribute69 = PAVDV.text_base_attribute69,
1400       PAV.text_base_attribute70 = PAVDV.text_base_attribute70,
1401       PAV.text_base_attribute71 = PAVDV.text_base_attribute71,
1402       PAV.text_base_attribute72 = PAVDV.text_base_attribute72,
1403       PAV.text_base_attribute73 = PAVDV.text_base_attribute73,
1404       PAV.text_base_attribute74 = PAVDV.text_base_attribute74,
1405       PAV.text_base_attribute75 = PAVDV.text_base_attribute75,
1406       PAV.text_base_attribute76 = PAVDV.text_base_attribute76,
1407       PAV.text_base_attribute77 = PAVDV.text_base_attribute77,
1408       PAV.text_base_attribute78 = PAVDV.text_base_attribute78,
1409       PAV.text_base_attribute79 = PAVDV.text_base_attribute79,
1410       PAV.text_base_attribute80 = PAVDV.text_base_attribute80,
1411       PAV.text_base_attribute81 = PAVDV.text_base_attribute81,
1412       PAV.text_base_attribute82 = PAVDV.text_base_attribute82,
1413       PAV.text_base_attribute83 = PAVDV.text_base_attribute83,
1414       PAV.text_base_attribute84 = PAVDV.text_base_attribute84,
1415       PAV.text_base_attribute85 = PAVDV.text_base_attribute85,
1416       PAV.text_base_attribute86 = PAVDV.text_base_attribute86,
1417       PAV.text_base_attribute87 = PAVDV.text_base_attribute87,
1418       PAV.text_base_attribute88 = PAVDV.text_base_attribute88,
1419       PAV.text_base_attribute89 = PAVDV.text_base_attribute89,
1420       PAV.text_base_attribute90 = PAVDV.text_base_attribute90,
1421       PAV.text_base_attribute91 = PAVDV.text_base_attribute91,
1422       PAV.text_base_attribute92 = PAVDV.text_base_attribute92,
1423       PAV.text_base_attribute93 = PAVDV.text_base_attribute93,
1424       PAV.text_base_attribute94 = PAVDV.text_base_attribute94,
1425       PAV.text_base_attribute95 = PAVDV.text_base_attribute95,
1426       PAV.text_base_attribute96 = PAVDV.text_base_attribute96,
1427       PAV.text_base_attribute97 = PAVDV.text_base_attribute97,
1428       PAV.text_base_attribute98 = PAVDV.text_base_attribute98,
1429       PAV.text_base_attribute99 = PAVDV.text_base_attribute99,
1430       PAV.text_base_attribute100 = PAVDV.text_base_attribute100,
1431       PAV.num_base_attribute1 = PAVDV.num_base_attribute1,
1432       PAV.num_base_attribute2 = PAVDV.num_base_attribute2,
1433       PAV.num_base_attribute3 = PAVDV.num_base_attribute3,
1434       PAV.num_base_attribute4 = PAVDV.num_base_attribute4,
1435       PAV.num_base_attribute5 = PAVDV.num_base_attribute5,
1436       PAV.num_base_attribute6 = PAVDV.num_base_attribute6,
1437       PAV.num_base_attribute7 = PAVDV.num_base_attribute7,
1438       PAV.num_base_attribute8 = PAVDV.num_base_attribute8,
1439       PAV.num_base_attribute9 = PAVDV.num_base_attribute9,
1440       PAV.num_base_attribute10 = PAVDV.num_base_attribute10,
1441       PAV.num_base_attribute11 = PAVDV.num_base_attribute11,
1442       PAV.num_base_attribute12 = PAVDV.num_base_attribute12,
1443       PAV.num_base_attribute13 = PAVDV.num_base_attribute13,
1444       PAV.num_base_attribute14 = PAVDV.num_base_attribute14,
1445       PAV.num_base_attribute15 = PAVDV.num_base_attribute15,
1446       PAV.num_base_attribute16 = PAVDV.num_base_attribute16,
1447       PAV.num_base_attribute17 = PAVDV.num_base_attribute17,
1448       PAV.num_base_attribute18 = PAVDV.num_base_attribute18,
1449       PAV.num_base_attribute19 = PAVDV.num_base_attribute19,
1450       PAV.num_base_attribute20 = PAVDV.num_base_attribute20,
1451       PAV.num_base_attribute21 = PAVDV.num_base_attribute21,
1452       PAV.num_base_attribute22 = PAVDV.num_base_attribute22,
1453       PAV.num_base_attribute23 = PAVDV.num_base_attribute23,
1454       PAV.num_base_attribute24 = PAVDV.num_base_attribute24,
1455       PAV.num_base_attribute25 = PAVDV.num_base_attribute25,
1456       PAV.num_base_attribute26 = PAVDV.num_base_attribute26,
1457       PAV.num_base_attribute27 = PAVDV.num_base_attribute27,
1458       PAV.num_base_attribute28 = PAVDV.num_base_attribute28,
1459       PAV.num_base_attribute29 = PAVDV.num_base_attribute29,
1460       PAV.num_base_attribute30 = PAVDV.num_base_attribute30,
1461       PAV.num_base_attribute31 = PAVDV.num_base_attribute31,
1462       PAV.num_base_attribute32 = PAVDV.num_base_attribute32,
1463       PAV.num_base_attribute33 = PAVDV.num_base_attribute33,
1464       PAV.num_base_attribute34 = PAVDV.num_base_attribute34,
1465       PAV.num_base_attribute35 = PAVDV.num_base_attribute35,
1466       PAV.num_base_attribute36 = PAVDV.num_base_attribute36,
1467       PAV.num_base_attribute37 = PAVDV.num_base_attribute37,
1468       PAV.num_base_attribute38 = PAVDV.num_base_attribute38,
1469       PAV.num_base_attribute39 = PAVDV.num_base_attribute39,
1470       PAV.num_base_attribute40 = PAVDV.num_base_attribute40,
1471       PAV.num_base_attribute41 = PAVDV.num_base_attribute41,
1472       PAV.num_base_attribute42 = PAVDV.num_base_attribute42,
1473       PAV.num_base_attribute43 = PAVDV.num_base_attribute43,
1474       PAV.num_base_attribute44 = PAVDV.num_base_attribute44,
1475       PAV.num_base_attribute45 = PAVDV.num_base_attribute45,
1476       PAV.num_base_attribute46 = PAVDV.num_base_attribute46,
1477       PAV.num_base_attribute47 = PAVDV.num_base_attribute47,
1481       PAV.num_base_attribute51 = PAVDV.num_base_attribute51,
1478       PAV.num_base_attribute48 = PAVDV.num_base_attribute48,
1479       PAV.num_base_attribute49 = PAVDV.num_base_attribute49,
1480       PAV.num_base_attribute50 = PAVDV.num_base_attribute50,
1482       PAV.num_base_attribute52 = PAVDV.num_base_attribute52,
1483       PAV.num_base_attribute53 = PAVDV.num_base_attribute53,
1484       PAV.num_base_attribute54 = PAVDV.num_base_attribute54,
1485       PAV.num_base_attribute55 = PAVDV.num_base_attribute55,
1486       PAV.num_base_attribute56 = PAVDV.num_base_attribute56,
1487       PAV.num_base_attribute57 = PAVDV.num_base_attribute57,
1488       PAV.num_base_attribute58 = PAVDV.num_base_attribute58,
1489       PAV.num_base_attribute59 = PAVDV.num_base_attribute59,
1490       PAV.num_base_attribute60 = PAVDV.num_base_attribute60,
1491       PAV.num_base_attribute61 = PAVDV.num_base_attribute61,
1492       PAV.num_base_attribute62 = PAVDV.num_base_attribute62,
1493       PAV.num_base_attribute63 = PAVDV.num_base_attribute63,
1494       PAV.num_base_attribute64 = PAVDV.num_base_attribute64,
1495       PAV.num_base_attribute65 = PAVDV.num_base_attribute65,
1496       PAV.num_base_attribute66 = PAVDV.num_base_attribute66,
1497       PAV.num_base_attribute67 = PAVDV.num_base_attribute67,
1498       PAV.num_base_attribute68 = PAVDV.num_base_attribute68,
1499       PAV.num_base_attribute69 = PAVDV.num_base_attribute69,
1500       PAV.num_base_attribute70 = PAVDV.num_base_attribute70,
1501       PAV.num_base_attribute71 = PAVDV.num_base_attribute71,
1502       PAV.num_base_attribute72 = PAVDV.num_base_attribute72,
1503       PAV.num_base_attribute73 = PAVDV.num_base_attribute73,
1504       PAV.num_base_attribute74 = PAVDV.num_base_attribute74,
1505       PAV.num_base_attribute75 = PAVDV.num_base_attribute75,
1506       PAV.num_base_attribute76 = PAVDV.num_base_attribute76,
1507       PAV.num_base_attribute77 = PAVDV.num_base_attribute77,
1508       PAV.num_base_attribute78 = PAVDV.num_base_attribute78,
1509       PAV.num_base_attribute79 = PAVDV.num_base_attribute79,
1510       PAV.num_base_attribute80 = PAVDV.num_base_attribute80,
1511       PAV.num_base_attribute81 = PAVDV.num_base_attribute81,
1512       PAV.num_base_attribute82 = PAVDV.num_base_attribute82,
1513       PAV.num_base_attribute83 = PAVDV.num_base_attribute83,
1514       PAV.num_base_attribute84 = PAVDV.num_base_attribute84,
1515       PAV.num_base_attribute85 = PAVDV.num_base_attribute85,
1516       PAV.num_base_attribute86 = PAVDV.num_base_attribute86,
1517       PAV.num_base_attribute87 = PAVDV.num_base_attribute87,
1518       PAV.num_base_attribute88 = PAVDV.num_base_attribute88,
1519       PAV.num_base_attribute89 = PAVDV.num_base_attribute89,
1520       PAV.num_base_attribute90 = PAVDV.num_base_attribute90,
1521       PAV.num_base_attribute91 = PAVDV.num_base_attribute91,
1522       PAV.num_base_attribute92 = PAVDV.num_base_attribute92,
1523       PAV.num_base_attribute93 = PAVDV.num_base_attribute93,
1524       PAV.num_base_attribute94 = PAVDV.num_base_attribute94,
1525       PAV.num_base_attribute95 = PAVDV.num_base_attribute95,
1526       PAV.num_base_attribute96 = PAVDV.num_base_attribute96,
1527       PAV.num_base_attribute97 = PAVDV.num_base_attribute97,
1528       PAV.num_base_attribute98 = PAVDV.num_base_attribute98,
1529       PAV.num_base_attribute99 = PAVDV.num_base_attribute99,
1530       PAV.num_base_attribute100 = PAVDV.num_base_attribute100,
1531       PAV.text_cat_attribute1 = PAVDV.text_cat_attribute1,
1532       PAV.text_cat_attribute2 = PAVDV.text_cat_attribute2,
1533       PAV.text_cat_attribute3 = PAVDV.text_cat_attribute3,
1534       PAV.text_cat_attribute4 = PAVDV.text_cat_attribute4,
1535       PAV.text_cat_attribute5 = PAVDV.text_cat_attribute5,
1536       PAV.text_cat_attribute6 = PAVDV.text_cat_attribute6,
1537       PAV.text_cat_attribute7 = PAVDV.text_cat_attribute7,
1538       PAV.text_cat_attribute8 = PAVDV.text_cat_attribute8,
1539       PAV.text_cat_attribute9 = PAVDV.text_cat_attribute9,
1540       PAV.text_cat_attribute10 = PAVDV.text_cat_attribute10,
1541       PAV.text_cat_attribute11 = PAVDV.text_cat_attribute11,
1542       PAV.text_cat_attribute12 = PAVDV.text_cat_attribute12,
1543       PAV.text_cat_attribute13 = PAVDV.text_cat_attribute13,
1544       PAV.text_cat_attribute14 = PAVDV.text_cat_attribute14,
1545       PAV.text_cat_attribute15 = PAVDV.text_cat_attribute15,
1546       PAV.text_cat_attribute16 = PAVDV.text_cat_attribute16,
1547       PAV.text_cat_attribute17 = PAVDV.text_cat_attribute17,
1548       PAV.text_cat_attribute18 = PAVDV.text_cat_attribute18,
1549       PAV.text_cat_attribute19 = PAVDV.text_cat_attribute19,
1550       PAV.text_cat_attribute20 = PAVDV.text_cat_attribute20,
1551       PAV.text_cat_attribute21 = PAVDV.text_cat_attribute21,
1552       PAV.text_cat_attribute22 = PAVDV.text_cat_attribute22,
1553       PAV.text_cat_attribute23 = PAVDV.text_cat_attribute23,
1554       PAV.text_cat_attribute24 = PAVDV.text_cat_attribute24,
1555       PAV.text_cat_attribute25 = PAVDV.text_cat_attribute25,
1556       PAV.text_cat_attribute26 = PAVDV.text_cat_attribute26,
1557       PAV.text_cat_attribute27 = PAVDV.text_cat_attribute27,
1558       PAV.text_cat_attribute28 = PAVDV.text_cat_attribute28,
1559       PAV.text_cat_attribute29 = PAVDV.text_cat_attribute29,
1560       PAV.text_cat_attribute30 = PAVDV.text_cat_attribute30,
1561       PAV.text_cat_attribute31 = PAVDV.text_cat_attribute31,
1562       PAV.text_cat_attribute32 = PAVDV.text_cat_attribute32,
1563       PAV.text_cat_attribute33 = PAVDV.text_cat_attribute33,
1564       PAV.text_cat_attribute34 = PAVDV.text_cat_attribute34,
1565       PAV.text_cat_attribute35 = PAVDV.text_cat_attribute35,
1566       PAV.text_cat_attribute36 = PAVDV.text_cat_attribute36,
1567       PAV.text_cat_attribute37 = PAVDV.text_cat_attribute37,
1568       PAV.text_cat_attribute38 = PAVDV.text_cat_attribute38,
1569       PAV.text_cat_attribute39 = PAVDV.text_cat_attribute39,
1570       PAV.text_cat_attribute40 = PAVDV.text_cat_attribute40,
1571       PAV.text_cat_attribute41 = PAVDV.text_cat_attribute41,
1575       PAV.text_cat_attribute45 = PAVDV.text_cat_attribute45,
1572       PAV.text_cat_attribute42 = PAVDV.text_cat_attribute42,
1573       PAV.text_cat_attribute43 = PAVDV.text_cat_attribute43,
1574       PAV.text_cat_attribute44 = PAVDV.text_cat_attribute44,
1576       PAV.text_cat_attribute46 = PAVDV.text_cat_attribute46,
1577       PAV.text_cat_attribute47 = PAVDV.text_cat_attribute47,
1578       PAV.text_cat_attribute48 = PAVDV.text_cat_attribute48,
1579       PAV.text_cat_attribute49 = PAVDV.text_cat_attribute49,
1580       PAV.text_cat_attribute50 = PAVDV.text_cat_attribute50,
1581       PAV.num_cat_attribute1 = PAVDV.num_cat_attribute1,
1582       PAV.num_cat_attribute2 = PAVDV.num_cat_attribute2,
1583       PAV.num_cat_attribute3 = PAVDV.num_cat_attribute3,
1584       PAV.num_cat_attribute4 = PAVDV.num_cat_attribute4,
1585       PAV.num_cat_attribute5 = PAVDV.num_cat_attribute5,
1586       PAV.num_cat_attribute6 = PAVDV.num_cat_attribute6,
1587       PAV.num_cat_attribute7 = PAVDV.num_cat_attribute7,
1588       PAV.num_cat_attribute8 = PAVDV.num_cat_attribute8,
1589       PAV.num_cat_attribute9 = PAVDV.num_cat_attribute9,
1590       PAV.num_cat_attribute10 = PAVDV.num_cat_attribute10,
1591       PAV.num_cat_attribute11 = PAVDV.num_cat_attribute11,
1592       PAV.num_cat_attribute12 = PAVDV.num_cat_attribute12,
1593       PAV.num_cat_attribute13 = PAVDV.num_cat_attribute13,
1594       PAV.num_cat_attribute14 = PAVDV.num_cat_attribute14,
1595       PAV.num_cat_attribute15 = PAVDV.num_cat_attribute15,
1596       PAV.num_cat_attribute16 = PAVDV.num_cat_attribute16,
1597       PAV.num_cat_attribute17 = PAVDV.num_cat_attribute17,
1598       PAV.num_cat_attribute18 = PAVDV.num_cat_attribute18,
1599       PAV.num_cat_attribute19 = PAVDV.num_cat_attribute19,
1600       PAV.num_cat_attribute20 = PAVDV.num_cat_attribute20,
1601       PAV.num_cat_attribute21 = PAVDV.num_cat_attribute21,
1602       PAV.num_cat_attribute22 = PAVDV.num_cat_attribute22,
1603       PAV.num_cat_attribute23 = PAVDV.num_cat_attribute23,
1604       PAV.num_cat_attribute24 = PAVDV.num_cat_attribute24,
1605       PAV.num_cat_attribute25 = PAVDV.num_cat_attribute25,
1606       PAV.num_cat_attribute26 = PAVDV.num_cat_attribute26,
1607       PAV.num_cat_attribute27 = PAVDV.num_cat_attribute27,
1608       PAV.num_cat_attribute28 = PAVDV.num_cat_attribute28,
1609       PAV.num_cat_attribute29 = PAVDV.num_cat_attribute29,
1610       PAV.num_cat_attribute30 = PAVDV.num_cat_attribute30,
1611       PAV.num_cat_attribute31 = PAVDV.num_cat_attribute31,
1612       PAV.num_cat_attribute32 = PAVDV.num_cat_attribute32,
1613       PAV.num_cat_attribute33 = PAVDV.num_cat_attribute33,
1614       PAV.num_cat_attribute34 = PAVDV.num_cat_attribute34,
1615       PAV.num_cat_attribute35 = PAVDV.num_cat_attribute35,
1616       PAV.num_cat_attribute36 = PAVDV.num_cat_attribute36,
1617       PAV.num_cat_attribute37 = PAVDV.num_cat_attribute37,
1618       PAV.num_cat_attribute38 = PAVDV.num_cat_attribute38,
1619       PAV.num_cat_attribute39 = PAVDV.num_cat_attribute39,
1620       PAV.num_cat_attribute40 = PAVDV.num_cat_attribute40,
1621       PAV.num_cat_attribute41 = PAVDV.num_cat_attribute41,
1622       PAV.num_cat_attribute42 = PAVDV.num_cat_attribute42,
1623       PAV.num_cat_attribute43 = PAVDV.num_cat_attribute43,
1624       PAV.num_cat_attribute44 = PAVDV.num_cat_attribute44,
1625       PAV.num_cat_attribute45 = PAVDV.num_cat_attribute45,
1626       PAV.num_cat_attribute46 = PAVDV.num_cat_attribute46,
1627       PAV.num_cat_attribute47 = PAVDV.num_cat_attribute47,
1628       PAV.num_cat_attribute48 = PAVDV.num_cat_attribute48,
1629       PAV.num_cat_attribute49 = PAVDV.num_cat_attribute49,
1630       PAV.num_cat_attribute50 = PAVDV.num_cat_attribute50,
1631       PAV.last_update_login = PAVDV.last_update_login,
1632       PAV.last_updated_by = PAVDV.last_updated_by,
1633       PAV.last_update_date = PAVDV.last_update_date,
1634       PAV.request_id = PAVDV.request_id,
1635       PAV.program_application_id = PAVDV.program_application_id,
1636       PAV.program_id = PAVDV.program_id,
1637       PAV.program_update_date = PAVDV.program_update_date,
1638       PAV.rebuild_search_index_flag = 'Y'  -- rebuild index
1639   --  DELETE WHERE PAVDV.delete_flag = 'Y'
1640   WHEN NOT MATCHED THEN
1641     INSERT
1642     (
1643       PAV.attribute_values_id,
1644       PAV.po_line_id,
1645       PAV.req_template_name,
1646       PAV.req_template_line_num,
1647       PAV.ip_category_id,
1648       PAV.inventory_item_id,
1649       PAV.org_id,
1650       PAV.manufacturer_part_num,
1651       PAV.picture,
1652       PAV.thumbnail_image,
1653       PAV.supplier_url,
1654       PAV.manufacturer_url,
1655       PAV.attachment_url,
1656       PAV.unspsc,
1657       PAV.availability,
1658       PAV.lead_time,
1659       PAV.text_base_attribute1,
1660       PAV.text_base_attribute2,
1661       PAV.text_base_attribute3,
1662       PAV.text_base_attribute4,
1663       PAV.text_base_attribute5,
1664       PAV.text_base_attribute6,
1665       PAV.text_base_attribute7,
1666       PAV.text_base_attribute8,
1667       PAV.text_base_attribute9,
1668       PAV.text_base_attribute10,
1669       PAV.text_base_attribute11,
1670       PAV.text_base_attribute12,
1671       PAV.text_base_attribute13,
1672       PAV.text_base_attribute14,
1673       PAV.text_base_attribute15,
1674       PAV.text_base_attribute16,
1675       PAV.text_base_attribute17,
1676       PAV.text_base_attribute18,
1677       PAV.text_base_attribute19,
1678       PAV.text_base_attribute20,
1679       PAV.text_base_attribute21,
1680       PAV.text_base_attribute22,
1681       PAV.text_base_attribute23,
1682       PAV.text_base_attribute24,
1683       PAV.text_base_attribute25,
1684       PAV.text_base_attribute26,
1685       PAV.text_base_attribute27,
1686       PAV.text_base_attribute28,
1687       PAV.text_base_attribute29,
1688       PAV.text_base_attribute30,
1692       PAV.text_base_attribute34,
1689       PAV.text_base_attribute31,
1690       PAV.text_base_attribute32,
1691       PAV.text_base_attribute33,
1693       PAV.text_base_attribute35,
1694       PAV.text_base_attribute36,
1695       PAV.text_base_attribute37,
1696       PAV.text_base_attribute38,
1697       PAV.text_base_attribute39,
1698       PAV.text_base_attribute40,
1699       PAV.text_base_attribute41,
1700       PAV.text_base_attribute42,
1701       PAV.text_base_attribute43,
1702       PAV.text_base_attribute44,
1703       PAV.text_base_attribute45,
1704       PAV.text_base_attribute46,
1705       PAV.text_base_attribute47,
1706       PAV.text_base_attribute48,
1707       PAV.text_base_attribute49,
1708       PAV.text_base_attribute50,
1709       PAV.text_base_attribute51,
1710       PAV.text_base_attribute52,
1711       PAV.text_base_attribute53,
1712       PAV.text_base_attribute54,
1713       PAV.text_base_attribute55,
1714       PAV.text_base_attribute56,
1715       PAV.text_base_attribute57,
1716       PAV.text_base_attribute58,
1717       PAV.text_base_attribute59,
1718       PAV.text_base_attribute60,
1719       PAV.text_base_attribute61,
1720       PAV.text_base_attribute62,
1721       PAV.text_base_attribute63,
1722       PAV.text_base_attribute64,
1723       PAV.text_base_attribute65,
1724       PAV.text_base_attribute66,
1725       PAV.text_base_attribute67,
1726       PAV.text_base_attribute68,
1727       PAV.text_base_attribute69,
1728       PAV.text_base_attribute70,
1729       PAV.text_base_attribute71,
1730       PAV.text_base_attribute72,
1731       PAV.text_base_attribute73,
1732       PAV.text_base_attribute74,
1733       PAV.text_base_attribute75,
1734       PAV.text_base_attribute76,
1735       PAV.text_base_attribute77,
1736       PAV.text_base_attribute78,
1737       PAV.text_base_attribute79,
1738       PAV.text_base_attribute80,
1739       PAV.text_base_attribute81,
1740       PAV.text_base_attribute82,
1741       PAV.text_base_attribute83,
1742       PAV.text_base_attribute84,
1743       PAV.text_base_attribute85,
1744       PAV.text_base_attribute86,
1745       PAV.text_base_attribute87,
1746       PAV.text_base_attribute88,
1747       PAV.text_base_attribute89,
1748       PAV.text_base_attribute90,
1749       PAV.text_base_attribute91,
1750       PAV.text_base_attribute92,
1751       PAV.text_base_attribute93,
1752       PAV.text_base_attribute94,
1753       PAV.text_base_attribute95,
1754       PAV.text_base_attribute96,
1755       PAV.text_base_attribute97,
1756       PAV.text_base_attribute98,
1757       PAV.text_base_attribute99,
1758       PAV.text_base_attribute100,
1759       PAV.num_base_attribute1,
1760       PAV.num_base_attribute2,
1761       PAV.num_base_attribute3,
1762       PAV.num_base_attribute4,
1763       PAV.num_base_attribute5,
1764       PAV.num_base_attribute6,
1765       PAV.num_base_attribute7,
1766       PAV.num_base_attribute8,
1767       PAV.num_base_attribute9,
1768       PAV.num_base_attribute10,
1769       PAV.num_base_attribute11,
1770       PAV.num_base_attribute12,
1771       PAV.num_base_attribute13,
1772       PAV.num_base_attribute14,
1773       PAV.num_base_attribute15,
1774       PAV.num_base_attribute16,
1775       PAV.num_base_attribute17,
1776       PAV.num_base_attribute18,
1777       PAV.num_base_attribute19,
1778       PAV.num_base_attribute20,
1779       PAV.num_base_attribute21,
1780       PAV.num_base_attribute22,
1781       PAV.num_base_attribute23,
1782       PAV.num_base_attribute24,
1783       PAV.num_base_attribute25,
1784       PAV.num_base_attribute26,
1785       PAV.num_base_attribute27,
1786       PAV.num_base_attribute28,
1787       PAV.num_base_attribute29,
1788       PAV.num_base_attribute30,
1789       PAV.num_base_attribute31,
1790       PAV.num_base_attribute32,
1791       PAV.num_base_attribute33,
1792       PAV.num_base_attribute34,
1793       PAV.num_base_attribute35,
1794       PAV.num_base_attribute36,
1795       PAV.num_base_attribute37,
1796       PAV.num_base_attribute38,
1797       PAV.num_base_attribute39,
1798       PAV.num_base_attribute40,
1799       PAV.num_base_attribute41,
1800       PAV.num_base_attribute42,
1801       PAV.num_base_attribute43,
1802       PAV.num_base_attribute44,
1803       PAV.num_base_attribute45,
1804       PAV.num_base_attribute46,
1805       PAV.num_base_attribute47,
1806       PAV.num_base_attribute48,
1807       PAV.num_base_attribute49,
1808       PAV.num_base_attribute50,
1809       PAV.num_base_attribute51,
1810       PAV.num_base_attribute52,
1811       PAV.num_base_attribute53,
1812       PAV.num_base_attribute54,
1813       PAV.num_base_attribute55,
1814       PAV.num_base_attribute56,
1815       PAV.num_base_attribute57,
1816       PAV.num_base_attribute58,
1817       PAV.num_base_attribute59,
1818       PAV.num_base_attribute60,
1819       PAV.num_base_attribute61,
1820       PAV.num_base_attribute62,
1821       PAV.num_base_attribute63,
1822       PAV.num_base_attribute64,
1823       PAV.num_base_attribute65,
1824       PAV.num_base_attribute66,
1825       PAV.num_base_attribute67,
1826       PAV.num_base_attribute68,
1827       PAV.num_base_attribute69,
1828       PAV.num_base_attribute70,
1829       PAV.num_base_attribute71,
1830       PAV.num_base_attribute72,
1831       PAV.num_base_attribute73,
1832       PAV.num_base_attribute74,
1833       PAV.num_base_attribute75,
1834       PAV.num_base_attribute76,
1838       PAV.num_base_attribute80,
1835       PAV.num_base_attribute77,
1836       PAV.num_base_attribute78,
1837       PAV.num_base_attribute79,
1839       PAV.num_base_attribute81,
1840       PAV.num_base_attribute82,
1841       PAV.num_base_attribute83,
1842       PAV.num_base_attribute84,
1843       PAV.num_base_attribute85,
1844       PAV.num_base_attribute86,
1845       PAV.num_base_attribute87,
1846       PAV.num_base_attribute88,
1847       PAV.num_base_attribute89,
1848       PAV.num_base_attribute90,
1849       PAV.num_base_attribute91,
1850       PAV.num_base_attribute92,
1851       PAV.num_base_attribute93,
1852       PAV.num_base_attribute94,
1853       PAV.num_base_attribute95,
1854       PAV.num_base_attribute96,
1855       PAV.num_base_attribute97,
1856       PAV.num_base_attribute98,
1857       PAV.num_base_attribute99,
1858       PAV.num_base_attribute100,
1859       PAV.text_cat_attribute1,
1860       PAV.text_cat_attribute2,
1861       PAV.text_cat_attribute3,
1862       PAV.text_cat_attribute4,
1863       PAV.text_cat_attribute5,
1864       PAV.text_cat_attribute6,
1865       PAV.text_cat_attribute7,
1866       PAV.text_cat_attribute8,
1867       PAV.text_cat_attribute9,
1868       PAV.text_cat_attribute10,
1869       PAV.text_cat_attribute11,
1870       PAV.text_cat_attribute12,
1871       PAV.text_cat_attribute13,
1872       PAV.text_cat_attribute14,
1873       PAV.text_cat_attribute15,
1874       PAV.text_cat_attribute16,
1875       PAV.text_cat_attribute17,
1876       PAV.text_cat_attribute18,
1877       PAV.text_cat_attribute19,
1878       PAV.text_cat_attribute20,
1879       PAV.text_cat_attribute21,
1880       PAV.text_cat_attribute22,
1881       PAV.text_cat_attribute23,
1882       PAV.text_cat_attribute24,
1883       PAV.text_cat_attribute25,
1884       PAV.text_cat_attribute26,
1885       PAV.text_cat_attribute27,
1886       PAV.text_cat_attribute28,
1887       PAV.text_cat_attribute29,
1888       PAV.text_cat_attribute30,
1889       PAV.text_cat_attribute31,
1890       PAV.text_cat_attribute32,
1891       PAV.text_cat_attribute33,
1892       PAV.text_cat_attribute34,
1893       PAV.text_cat_attribute35,
1894       PAV.text_cat_attribute36,
1895       PAV.text_cat_attribute37,
1896       PAV.text_cat_attribute38,
1897       PAV.text_cat_attribute39,
1898       PAV.text_cat_attribute40,
1899       PAV.text_cat_attribute41,
1900       PAV.text_cat_attribute42,
1901       PAV.text_cat_attribute43,
1902       PAV.text_cat_attribute44,
1903       PAV.text_cat_attribute45,
1904       PAV.text_cat_attribute46,
1905       PAV.text_cat_attribute47,
1906       PAV.text_cat_attribute48,
1907       PAV.text_cat_attribute49,
1908       PAV.text_cat_attribute50,
1909       PAV.num_cat_attribute1,
1910       PAV.num_cat_attribute2,
1911       PAV.num_cat_attribute3,
1912       PAV.num_cat_attribute4,
1913       PAV.num_cat_attribute5,
1914       PAV.num_cat_attribute6,
1915       PAV.num_cat_attribute7,
1916       PAV.num_cat_attribute8,
1917       PAV.num_cat_attribute9,
1918       PAV.num_cat_attribute10,
1919       PAV.num_cat_attribute11,
1920       PAV.num_cat_attribute12,
1921       PAV.num_cat_attribute13,
1922       PAV.num_cat_attribute14,
1923       PAV.num_cat_attribute15,
1924       PAV.num_cat_attribute16,
1925       PAV.num_cat_attribute17,
1926       PAV.num_cat_attribute18,
1927       PAV.num_cat_attribute19,
1928       PAV.num_cat_attribute20,
1929       PAV.num_cat_attribute21,
1930       PAV.num_cat_attribute22,
1931       PAV.num_cat_attribute23,
1932       PAV.num_cat_attribute24,
1933       PAV.num_cat_attribute25,
1934       PAV.num_cat_attribute26,
1935       PAV.num_cat_attribute27,
1936       PAV.num_cat_attribute28,
1937       PAV.num_cat_attribute29,
1938       PAV.num_cat_attribute30,
1939       PAV.num_cat_attribute31,
1940       PAV.num_cat_attribute32,
1941       PAV.num_cat_attribute33,
1942       PAV.num_cat_attribute34,
1943       PAV.num_cat_attribute35,
1944       PAV.num_cat_attribute36,
1945       PAV.num_cat_attribute37,
1946       PAV.num_cat_attribute38,
1947       PAV.num_cat_attribute39,
1948       PAV.num_cat_attribute40,
1949       PAV.num_cat_attribute41,
1950       PAV.num_cat_attribute42,
1951       PAV.num_cat_attribute43,
1952       PAV.num_cat_attribute44,
1953       PAV.num_cat_attribute45,
1954       PAV.num_cat_attribute46,
1955       PAV.num_cat_attribute47,
1956       PAV.num_cat_attribute48,
1957       PAV.num_cat_attribute49,
1958       PAV.num_cat_attribute50,
1959       PAV.last_update_login,
1960       PAV.last_updated_by,
1961       PAV.last_update_date,
1962       PAV.created_by,
1963       PAV.creation_date,
1964       PAV.request_id,
1965       PAV.program_application_id,
1966       PAV.program_id,
1967       PAV.program_update_date,
1968       PAV.rebuild_search_index_flag
1969     )
1970     VALUES
1971     (
1972       PAVDV.attribute_values_id,
1973       PAVDV.po_line_id,
1974       PAVDV.req_template_name,
1975       PAVDV.req_template_line_num,
1976       PAVDV.ip_category_id,
1977       PAVDV.inventory_item_id,
1978       PAVDV.org_id,
1979       PAVDV.manufacturer_part_num,
1980       PAVDV.picture,
1981       PAVDV.thumbnail_image,
1982       PAVDV.supplier_url,
1983       PAVDV.manufacturer_url,
1984       PAVDV.attachment_url,
1985       PAVDV.unspsc,
1986       PAVDV.availability,
1987       PAVDV.lead_time,
1988       PAVDV.text_base_attribute1,
1989       PAVDV.text_base_attribute2,
1990       PAVDV.text_base_attribute3,
1991       PAVDV.text_base_attribute4,
1995       PAVDV.text_base_attribute8,
1992       PAVDV.text_base_attribute5,
1993       PAVDV.text_base_attribute6,
1994       PAVDV.text_base_attribute7,
1996       PAVDV.text_base_attribute9,
1997       PAVDV.text_base_attribute10,
1998       PAVDV.text_base_attribute11,
1999       PAVDV.text_base_attribute12,
2000       PAVDV.text_base_attribute13,
2001       PAVDV.text_base_attribute14,
2002       PAVDV.text_base_attribute15,
2003       PAVDV.text_base_attribute16,
2004       PAVDV.text_base_attribute17,
2005       PAVDV.text_base_attribute18,
2006       PAVDV.text_base_attribute19,
2007       PAVDV.text_base_attribute20,
2008       PAVDV.text_base_attribute21,
2009       PAVDV.text_base_attribute22,
2010       PAVDV.text_base_attribute23,
2011       PAVDV.text_base_attribute24,
2012       PAVDV.text_base_attribute25,
2013       PAVDV.text_base_attribute26,
2014       PAVDV.text_base_attribute27,
2015       PAVDV.text_base_attribute28,
2016       PAVDV.text_base_attribute29,
2017       PAVDV.text_base_attribute30,
2018       PAVDV.text_base_attribute31,
2019       PAVDV.text_base_attribute32,
2020       PAVDV.text_base_attribute33,
2021       PAVDV.text_base_attribute34,
2022       PAVDV.text_base_attribute35,
2023       PAVDV.text_base_attribute36,
2024       PAVDV.text_base_attribute37,
2025       PAVDV.text_base_attribute38,
2026       PAVDV.text_base_attribute39,
2027       PAVDV.text_base_attribute40,
2028       PAVDV.text_base_attribute41,
2029       PAVDV.text_base_attribute42,
2030       PAVDV.text_base_attribute43,
2031       PAVDV.text_base_attribute44,
2032       PAVDV.text_base_attribute45,
2033       PAVDV.text_base_attribute46,
2034       PAVDV.text_base_attribute47,
2035       PAVDV.text_base_attribute48,
2036       PAVDV.text_base_attribute49,
2037       PAVDV.text_base_attribute50,
2038       PAVDV.text_base_attribute51,
2039       PAVDV.text_base_attribute52,
2040       PAVDV.text_base_attribute53,
2041       PAVDV.text_base_attribute54,
2042       PAVDV.text_base_attribute55,
2043       PAVDV.text_base_attribute56,
2044       PAVDV.text_base_attribute57,
2045       PAVDV.text_base_attribute58,
2046       PAVDV.text_base_attribute59,
2047       PAVDV.text_base_attribute60,
2048       PAVDV.text_base_attribute61,
2049       PAVDV.text_base_attribute62,
2050       PAVDV.text_base_attribute63,
2051       PAVDV.text_base_attribute64,
2052       PAVDV.text_base_attribute65,
2053       PAVDV.text_base_attribute66,
2054       PAVDV.text_base_attribute67,
2055       PAVDV.text_base_attribute68,
2056       PAVDV.text_base_attribute69,
2057       PAVDV.text_base_attribute70,
2058       PAVDV.text_base_attribute71,
2059       PAVDV.text_base_attribute72,
2060       PAVDV.text_base_attribute73,
2061       PAVDV.text_base_attribute74,
2062       PAVDV.text_base_attribute75,
2063       PAVDV.text_base_attribute76,
2064       PAVDV.text_base_attribute77,
2065       PAVDV.text_base_attribute78,
2066       PAVDV.text_base_attribute79,
2067       PAVDV.text_base_attribute80,
2068       PAVDV.text_base_attribute81,
2069       PAVDV.text_base_attribute82,
2070       PAVDV.text_base_attribute83,
2071       PAVDV.text_base_attribute84,
2072       PAVDV.text_base_attribute85,
2073       PAVDV.text_base_attribute86,
2074       PAVDV.text_base_attribute87,
2075       PAVDV.text_base_attribute88,
2076       PAVDV.text_base_attribute89,
2077       PAVDV.text_base_attribute90,
2078       PAVDV.text_base_attribute91,
2079       PAVDV.text_base_attribute92,
2080       PAVDV.text_base_attribute93,
2081       PAVDV.text_base_attribute94,
2082       PAVDV.text_base_attribute95,
2083       PAVDV.text_base_attribute96,
2084       PAVDV.text_base_attribute97,
2085       PAVDV.text_base_attribute98,
2086       PAVDV.text_base_attribute99,
2087       PAVDV.text_base_attribute100,
2088       PAVDV.num_base_attribute1,
2089       PAVDV.num_base_attribute2,
2090       PAVDV.num_base_attribute3,
2091       PAVDV.num_base_attribute4,
2092       PAVDV.num_base_attribute5,
2093       PAVDV.num_base_attribute6,
2094       PAVDV.num_base_attribute7,
2095       PAVDV.num_base_attribute8,
2096       PAVDV.num_base_attribute9,
2097       PAVDV.num_base_attribute10,
2098       PAVDV.num_base_attribute11,
2099       PAVDV.num_base_attribute12,
2100       PAVDV.num_base_attribute13,
2101       PAVDV.num_base_attribute14,
2102       PAVDV.num_base_attribute15,
2103       PAVDV.num_base_attribute16,
2104       PAVDV.num_base_attribute17,
2105       PAVDV.num_base_attribute18,
2106       PAVDV.num_base_attribute19,
2107       PAVDV.num_base_attribute20,
2108       PAVDV.num_base_attribute21,
2109       PAVDV.num_base_attribute22,
2110       PAVDV.num_base_attribute23,
2111       PAVDV.num_base_attribute24,
2112       PAVDV.num_base_attribute25,
2113       PAVDV.num_base_attribute26,
2114       PAVDV.num_base_attribute27,
2115       PAVDV.num_base_attribute28,
2116       PAVDV.num_base_attribute29,
2117       PAVDV.num_base_attribute30,
2118       PAVDV.num_base_attribute31,
2119       PAVDV.num_base_attribute32,
2120       PAVDV.num_base_attribute33,
2121       PAVDV.num_base_attribute34,
2122       PAVDV.num_base_attribute35,
2123       PAVDV.num_base_attribute36,
2124       PAVDV.num_base_attribute37,
2125       PAVDV.num_base_attribute38,
2126       PAVDV.num_base_attribute39,
2127       PAVDV.num_base_attribute40,
2128       PAVDV.num_base_attribute41,
2129       PAVDV.num_base_attribute42,
2130       PAVDV.num_base_attribute43,
2131       PAVDV.num_base_attribute44,
2132       PAVDV.num_base_attribute45,
2133       PAVDV.num_base_attribute46,
2134       PAVDV.num_base_attribute47,
2135       PAVDV.num_base_attribute48,
2139       PAVDV.num_base_attribute52,
2136       PAVDV.num_base_attribute49,
2137       PAVDV.num_base_attribute50,
2138       PAVDV.num_base_attribute51,
2140       PAVDV.num_base_attribute53,
2141       PAVDV.num_base_attribute54,
2142       PAVDV.num_base_attribute55,
2143       PAVDV.num_base_attribute56,
2144       PAVDV.num_base_attribute57,
2145       PAVDV.num_base_attribute58,
2146       PAVDV.num_base_attribute59,
2147       PAVDV.num_base_attribute60,
2148       PAVDV.num_base_attribute61,
2149       PAVDV.num_base_attribute62,
2150       PAVDV.num_base_attribute63,
2151       PAVDV.num_base_attribute64,
2152       PAVDV.num_base_attribute65,
2153       PAVDV.num_base_attribute66,
2154       PAVDV.num_base_attribute67,
2155       PAVDV.num_base_attribute68,
2156       PAVDV.num_base_attribute69,
2157       PAVDV.num_base_attribute70,
2158       PAVDV.num_base_attribute71,
2159       PAVDV.num_base_attribute72,
2160       PAVDV.num_base_attribute73,
2161       PAVDV.num_base_attribute74,
2162       PAVDV.num_base_attribute75,
2163       PAVDV.num_base_attribute76,
2164       PAVDV.num_base_attribute77,
2165       PAVDV.num_base_attribute78,
2166       PAVDV.num_base_attribute79,
2167       PAVDV.num_base_attribute80,
2168       PAVDV.num_base_attribute81,
2169       PAVDV.num_base_attribute82,
2170       PAVDV.num_base_attribute83,
2171       PAVDV.num_base_attribute84,
2172       PAVDV.num_base_attribute85,
2173       PAVDV.num_base_attribute86,
2174       PAVDV.num_base_attribute87,
2175       PAVDV.num_base_attribute88,
2176       PAVDV.num_base_attribute89,
2177       PAVDV.num_base_attribute90,
2178       PAVDV.num_base_attribute91,
2179       PAVDV.num_base_attribute92,
2180       PAVDV.num_base_attribute93,
2181       PAVDV.num_base_attribute94,
2182       PAVDV.num_base_attribute95,
2183       PAVDV.num_base_attribute96,
2184       PAVDV.num_base_attribute97,
2185       PAVDV.num_base_attribute98,
2186       PAVDV.num_base_attribute99,
2187       PAVDV.num_base_attribute100,
2188       PAVDV.text_cat_attribute1,
2189       PAVDV.text_cat_attribute2,
2190       PAVDV.text_cat_attribute3,
2191       PAVDV.text_cat_attribute4,
2192       PAVDV.text_cat_attribute5,
2193       PAVDV.text_cat_attribute6,
2194       PAVDV.text_cat_attribute7,
2195       PAVDV.text_cat_attribute8,
2196       PAVDV.text_cat_attribute9,
2197       PAVDV.text_cat_attribute10,
2198       PAVDV.text_cat_attribute11,
2199       PAVDV.text_cat_attribute12,
2200       PAVDV.text_cat_attribute13,
2201       PAVDV.text_cat_attribute14,
2202       PAVDV.text_cat_attribute15,
2203       PAVDV.text_cat_attribute16,
2204       PAVDV.text_cat_attribute17,
2205       PAVDV.text_cat_attribute18,
2206       PAVDV.text_cat_attribute19,
2207       PAVDV.text_cat_attribute20,
2208       PAVDV.text_cat_attribute21,
2209       PAVDV.text_cat_attribute22,
2210       PAVDV.text_cat_attribute23,
2211       PAVDV.text_cat_attribute24,
2212       PAVDV.text_cat_attribute25,
2213       PAVDV.text_cat_attribute26,
2214       PAVDV.text_cat_attribute27,
2215       PAVDV.text_cat_attribute28,
2216       PAVDV.text_cat_attribute29,
2217       PAVDV.text_cat_attribute30,
2218       PAVDV.text_cat_attribute31,
2219       PAVDV.text_cat_attribute32,
2220       PAVDV.text_cat_attribute33,
2221       PAVDV.text_cat_attribute34,
2222       PAVDV.text_cat_attribute35,
2223       PAVDV.text_cat_attribute36,
2224       PAVDV.text_cat_attribute37,
2225       PAVDV.text_cat_attribute38,
2226       PAVDV.text_cat_attribute39,
2227       PAVDV.text_cat_attribute40,
2228       PAVDV.text_cat_attribute41,
2229       PAVDV.text_cat_attribute42,
2230       PAVDV.text_cat_attribute43,
2231       PAVDV.text_cat_attribute44,
2232       PAVDV.text_cat_attribute45,
2233       PAVDV.text_cat_attribute46,
2234       PAVDV.text_cat_attribute47,
2235       PAVDV.text_cat_attribute48,
2236       PAVDV.text_cat_attribute49,
2237       PAVDV.text_cat_attribute50,
2238       PAVDV.num_cat_attribute1,
2239       PAVDV.num_cat_attribute2,
2240       PAVDV.num_cat_attribute3,
2241       PAVDV.num_cat_attribute4,
2242       PAVDV.num_cat_attribute5,
2243       PAVDV.num_cat_attribute6,
2244       PAVDV.num_cat_attribute7,
2245       PAVDV.num_cat_attribute8,
2246       PAVDV.num_cat_attribute9,
2247       PAVDV.num_cat_attribute10,
2248       PAVDV.num_cat_attribute11,
2249       PAVDV.num_cat_attribute12,
2250       PAVDV.num_cat_attribute13,
2251       PAVDV.num_cat_attribute14,
2252       PAVDV.num_cat_attribute15,
2253       PAVDV.num_cat_attribute16,
2254       PAVDV.num_cat_attribute17,
2255       PAVDV.num_cat_attribute18,
2256       PAVDV.num_cat_attribute19,
2257       PAVDV.num_cat_attribute20,
2258       PAVDV.num_cat_attribute21,
2259       PAVDV.num_cat_attribute22,
2260       PAVDV.num_cat_attribute23,
2261       PAVDV.num_cat_attribute24,
2262       PAVDV.num_cat_attribute25,
2263       PAVDV.num_cat_attribute26,
2264       PAVDV.num_cat_attribute27,
2265       PAVDV.num_cat_attribute28,
2266       PAVDV.num_cat_attribute29,
2267       PAVDV.num_cat_attribute30,
2268       PAVDV.num_cat_attribute31,
2269       PAVDV.num_cat_attribute32,
2270       PAVDV.num_cat_attribute33,
2271       PAVDV.num_cat_attribute34,
2272       PAVDV.num_cat_attribute35,
2273       PAVDV.num_cat_attribute36,
2274       PAVDV.num_cat_attribute37,
2275       PAVDV.num_cat_attribute38,
2276       PAVDV.num_cat_attribute39,
2277       PAVDV.num_cat_attribute40,
2278       PAVDV.num_cat_attribute41,
2279       PAVDV.num_cat_attribute42,
2280       PAVDV.num_cat_attribute43,
2281       PAVDV.num_cat_attribute44,
2282       PAVDV.num_cat_attribute45,
2286       PAVDV.num_cat_attribute49,
2283       PAVDV.num_cat_attribute46,
2284       PAVDV.num_cat_attribute47,
2285       PAVDV.num_cat_attribute48,
2287       PAVDV.num_cat_attribute50,
2288       PAVDV.last_update_login,
2289       PAVDV.last_updated_by,
2290       PAVDV.last_update_date,
2291       PAVDV.created_by,
2292       PAVDV.creation_date,
2293       PAVDV.request_id,
2294       PAVDV.program_application_id,
2295       PAVDV.program_id,
2296       PAVDV.program_update_date,
2297       'Y'   -- rebuild index
2298     ) WHERE NVL(PAVDV.delete_flag, 'N') <> 'Y';
2299 
2300 
2301   d_position := 10;
2302 EXCEPTION
2303   WHEN OTHERS THEN
2304     PO_MESSAGE_S.add_exc_msg
2305     ( p_pkg_name => d_pkg_name,
2306       p_procedure_name => d_api_name || '.' || d_position
2307     );
2308     RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2309 END merge_changes;
2310 
2311 -----------------------------------------------------------------------
2312 --Start of Comments
2313 --Name: lock_draft_record
2314 --Function:
2315 --  Obtain database lock for the record in draft table
2316 --Parameters:
2317 --IN:
2318 --p_attribute_values_id
2319 --  id for po attribute values record
2320 --p_draft_id
2321 --  draft unique identifier
2322 --RETURN:
2323 --End of Comments
2324 ------------------------------------------------------------------------
2325 PROCEDURE lock_draft_record
2326 ( p_attribute_values_id IN NUMBER,
2327   p_draft_id        IN NUMBER
2328 ) IS
2329 
2330 d_api_name CONSTANT VARCHAR2(30) := 'lock_draft_record';
2331 d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
2332 d_position NUMBER;
2333 
2334 l_dummy NUMBER;
2335 
2336 BEGIN
2337   d_position := 0;
2338   IF (PO_LOG.d_proc) THEN
2339     PO_LOG.proc_begin(d_module);
2340   END IF;
2341 
2342   SELECT 1
2343   INTO l_dummy
2344   FROM po_attribute_values_draft
2345   WHERE attribute_values_id = p_attribute_values_id
2346   AND draft_id = p_draft_id
2347   FOR UPDATE NOWAIT;
2348 
2349   IF (PO_LOG.d_proc) THEN
2350     PO_LOG.proc_end(d_module);
2351   END IF;
2352 
2353 EXCEPTION
2354 WHEN NO_DATA_FOUND THEN
2355   NULL;
2356 END lock_draft_record;
2357 
2358 -----------------------------------------------------------------------
2359 --Start of Comments
2360 --Name: lock_transaction_record
2361 --Function:
2362 --  Obtain database lock for the record in transaction table
2363 --Parameters:
2364 --IN:
2365 --p_attribute_values_id
2366 --  id for attribute values record
2367 --RETURN:
2368 --End of Comments
2369 ------------------------------------------------------------------------
2370 PROCEDURE lock_transaction_record
2371 ( p_attribute_values_id IN NUMBER
2372 ) IS
2373 
2374 d_api_name CONSTANT VARCHAR2(30) := 'lock_transaction_record';
2375 d_module CONSTANT VARCHAR2(2000) := d_pkg_name || d_api_name || '.';
2376 d_position NUMBER;
2377 
2378 l_dummy NUMBER;
2379 
2380 BEGIN
2381   d_position := 0;
2382   IF (PO_LOG.d_proc) THEN
2383     PO_LOG.proc_begin(d_module);
2384   END IF;
2385 
2386   SELECT 1
2387   INTO l_dummy
2388   FROM po_attribute_values
2389   WHERE attribute_values_id = p_attribute_values_id
2390   FOR UPDATE NOWAIT;
2391 
2392   IF (PO_LOG.d_proc) THEN
2393     PO_LOG.proc_end(d_module);
2394   END IF;
2395 
2396 EXCEPTION
2397 WHEN NO_DATA_FOUND THEN
2398   NULL;
2399 END lock_transaction_record;
2400 
2401 END PO_ATTR_VALUES_DRAFT_PKG;