DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQP_VRE_SHD

Source


1 PACKAGE BODY pqp_vre_shd AS
2 /* $Header: pqvrerhi.pkb 120.0.12010000.2 2008/08/08 07:23:09 ubhat ship $ */
3 
4 --
5 -- ----------------------------------------------------------------------------
6 -- |                     Private Global Definitions                           |
7 -- ----------------------------------------------------------------------------
8 --
9 g_package  VARCHAR2(33) := '  pqp_vre_shd.';  -- Global package name
10 --
11 -- ----------------------------------------------------------------------------
12 -- |---------------------------< constraint_error >---------------------------|
13 -- ----------------------------------------------------------------------------
14 PROCEDURE constraint_error
15   (p_constraint_name in all_constraints.constraint_name%TYPE
16   )IS
17 --
18   l_proc        VARCHAR2(72) := g_package||'constraint_error';
19 --
20 BEGIN
21   --
22   IF (p_constraint_name = 'PQP_VEHICLE_REPOSITORY_F_PK') THEN
23     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
24     fnd_message.set_token('PROCEDURE', l_proc);
25     fnd_message.set_token('STEP','5');
26     fnd_message.raise_error;
27   ELSE
28     fnd_message.set_name('PAY', 'HR_7877_API_INVALID_CONSTRAINT');
29     fnd_message.set_token('PROCEDURE', l_proc);
30     fnd_message.set_token('CONSTRAINT_NAME', p_constraint_name);
31     fnd_message.raise_error;
32   END IF;
33   --
34 END constraint_error;
35 --
36 -- ----------------------------------------------------------------------------
37 -- |-----------------------------< api_updating >-----------------------------|
38 -- ----------------------------------------------------------------------------
39 FUNCTION api_updating
40   (p_effective_date                   IN date
41   ,p_vehicle_repository_id            IN number
42   ,p_object_version_number            IN number
43   ) RETURN BOOLEAN IS
44   --
45   -- Cursor selects the 'current' row from the HR Schema
46   --
47   CURSOR C_Sel1 IS
48     SELECT
49        vehicle_repository_id
50       ,effective_start_date
51       ,effective_end_date
52       ,registration_number
53       ,vehicle_type
54       ,vehicle_id_number
55       ,business_group_id
56       ,make
57       ,model
58       ,initial_registration
59       ,last_registration_renew_date
60       ,engine_capacity_in_cc
61       ,fuel_type
62       ,currency_code
63       ,list_price
64       ,accessory_value_at_startdate
65       ,accessory_value_added_later
66       ,market_value_classic_car
67       ,fiscal_ratings
68       ,fiscal_ratings_uom
69       ,vehicle_provider
70       ,vehicle_ownership
71       ,shared_vehicle
72       ,vehicle_status
73       ,vehicle_inactivity_reason
74       ,asset_number
75       ,lease_contract_number
76       ,lease_contract_expiry_date
77       ,taxation_method
78       ,fleet_info
79       ,fleet_transfer_date
80       ,object_version_number
81       ,color
82       ,seating_capacity
83       ,weight
84       ,weight_uom
85       ,model_year
86       ,insurance_number
87       ,insurance_expiry_date
88       ,comments
89       ,vre_attribute_category
90       ,vre_attribute1
91       ,vre_attribute2
92       ,vre_attribute3
93       ,vre_attribute4
94       ,vre_attribute5
95       ,vre_attribute6
96       ,vre_attribute7
97       ,vre_attribute8
98       ,vre_attribute9
99       ,vre_attribute10
100       ,vre_attribute11
101       ,vre_attribute12
102       ,vre_attribute13
103       ,vre_attribute14
104       ,vre_attribute15
105       ,vre_attribute16
106       ,vre_attribute17
107       ,vre_attribute18
108       ,vre_attribute19
109       ,vre_attribute20
110       ,vre_information_category
111       ,vre_information1
112       ,vre_information2
113       ,vre_information3
114       ,vre_information4
115       ,vre_information5
116       ,vre_information6
117       ,vre_information7
118       ,vre_information8
119       ,vre_information9
120       ,vre_information10
121       ,vre_information11
122       ,vre_information12
123       ,vre_information13
124       ,vre_information14
125       ,vre_information15
126       ,vre_information16
127       ,vre_information17
128       ,vre_information18
129       ,vre_information19
130       ,vre_information20
131    FROM    pqp_vehicle_repository_f
132    WHERE   vehicle_repository_id = p_vehicle_repository_id
133    AND     p_effective_date
134    BETWEEN effective_start_date and effective_end_date;
135 --
136   l_fct_ret     BOOLEAN;
137 --
138 BEGIN
139   IF (p_effective_date        IS NULL OR
140       p_vehicle_repository_id IS NULL OR
141       p_object_version_number IS NULL) THEN
142     --
143     -- One of the primary key arguments is null therefore we must
144     -- set the returning function value to false
145     --
146     l_fct_ret := false;
147   ELSE
148     IF (p_vehicle_repository_id =
149         pqp_vre_shd.g_old_rec.vehicle_repository_id and
150         p_object_version_number =
151         pqp_vre_shd.g_old_rec.object_version_number ) THEN
152       --
153       -- The g_old_rec is current therefore we must
154       -- set the returning function to true
155       --
156       l_fct_ret := true;
157     ELSE
158       --
159       -- Select the current row
160       --
161       OPEN  C_Sel1;
162       FETCH C_Sel1 Into pqp_vre_shd.g_old_rec;
163       IF C_Sel1%notfound THEN
164          CLOSE C_Sel1;
165         --
166         -- The primary key is invalid therefore we must error
167         --
168         fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
169         fnd_message.raise_error;
170       END IF;
171       CLOSE C_Sel1;
172       IF (p_object_version_number
173           <> pqp_vre_shd.g_old_rec.object_version_number) THEN
174         fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
175         fnd_message.raise_error;
176       END IF;
177       l_fct_ret := true;
178     END IF;
179   END IF;
180   RETURN (l_fct_ret);
181 --
182 END api_updating;
183 --
184 -- ----------------------------------------------------------------------------
185 -- |---------------------------< find_dt_upd_modes >--------------------------|
186 -- ----------------------------------------------------------------------------
187 PROCEDURE find_dt_upd_modes
188   (p_effective_date         IN  DATE
189   ,p_base_key_value         IN  NUMBER
190   ,p_correction             OUT NOCOPY BOOLEAN
191   ,p_update                 OUT NOCOPY BOOLEAN
192   ,p_update_override        OUT NOCOPY BOOLEAN
193   ,p_update_change_insert   OUT NOCOPY BOOLEAN
194   ) IS
195 --
196   l_proc        varchar2(72) := g_package||'find_dt_upd_modes';
197 --
198 BEGIN
199   hr_utility.set_location('Entering:'||l_proc, 5);
200   --
201   -- Call the corresponding datetrack api
202   --
203   dt_api.find_dt_upd_modes
204     (p_effective_date        => p_effective_date
205     ,p_base_table_name       =>'pqp_vehicle_repository_f'
206     ,p_base_key_column       =>'vehicle_repository_id'
207     ,p_base_key_value        => p_base_key_value
208     ,p_correction            => p_correction
209     ,p_update                => p_update
210     ,p_update_override       => p_update_override
211     ,p_update_change_insert  => p_update_change_insert
212     );
213   --
214   hr_utility.set_location(' Leaving:'||l_proc, 10);
215 END find_dt_upd_modes;
216 --
217 -- ----------------------------------------------------------------------------
218 -- |---------------------------< find_dt_del_modes >--------------------------|
219 -- ----------------------------------------------------------------------------
220 PROCEDURE find_dt_del_modes
221   (p_effective_date        IN DATE
222   ,p_base_key_value        IN NUMBER
223   ,p_zap                   OUT NOCOPY BOOLEAN
224   ,p_delete                OUT NOCOPY BOOLEAN
225   ,p_future_change         OUT NOCOPY BOOLEAN
226   ,p_delete_next_change    OUT NOCOPY BOOLEAN
227   ) IS
228   --
229   l_proc                varchar2(72)    := g_package||'find_dt_del_modes';
230   --
231   --
232 BEGIN
233   hr_utility.set_location('Entering:'||l_proc, 5);
234   --
235   -- Call the corresponding datetrack api
236   --
237   dt_api.find_dt_del_modes
238    (p_effective_date                => p_effective_date
239    ,p_base_table_name               =>'pqp_vehicle_repository_f'
240    ,p_base_key_column               =>'vehicle_repository_id'
241    ,p_base_key_value                => p_base_key_value
242    ,p_zap                           => p_zap
243    ,p_delete                        => p_delete
244    ,p_future_change                 => p_future_change
245    ,p_delete_next_change            => p_delete_next_change
246    );
247   --
248   hr_utility.set_location(' Leaving:'||l_proc, 10);
249 END find_dt_del_modes;
250 --
251 -- ----------------------------------------------------------------------------
252 -- |-----------------------< upd_effective_end_date >-------------------------|
253 -- ----------------------------------------------------------------------------
254 PROCEDURE upd_effective_end_date
255   (p_effective_date                   IN  DATE
256   ,p_base_key_value                   IN  NUMBER
257   ,p_new_effective_end_date           IN  DATE
258   ,p_validation_start_date            IN  DATE
259   ,p_validation_end_date              IN  DATE
260   ,p_object_version_number            OUT NOCOPY NUMBER
261   ) IS
262 --
263   l_proc                  VARCHAR2(72) := g_package||'upd_effective_end_date';
264   l_object_version_number NUMBER;
265 --
266 BEGIN
267   hr_utility.set_location('Entering:'||l_proc, 5);
268   --
269   -- Because we are updating a row we must get the next object
270   -- version number.
271   --
272   l_object_version_number :=
273     dt_api.get_object_version_number
274       (p_base_table_name    =>'pqp_vehicle_repository_f'
275       ,p_base_key_column    =>'vehicle_repository_id'
276       ,p_base_key_value     => p_base_key_value
277       );
278   --
279   hr_utility.set_location(l_proc, 10);
280   --
281   --
282   -- Update the specified datetrack row setting the effective
283   -- end date to the specified new effective end date.
284   --
285   UPDATE  pqp_vehicle_repository_f t
286      SET  t.effective_end_date    = p_new_effective_end_date,
287           t.object_version_number = l_object_version_number
288    WHERE  t.vehicle_repository_id = p_base_key_value
289      AND  p_effective_date
290  BETWEEN  t.effective_start_date and t.effective_end_date;
291   --
292   --
293   p_object_version_number := l_object_version_number;
294   hr_utility.set_location(' Leaving:'||l_proc, 15);
295 --
296 End upd_effective_end_date;
297 --
298 -- ----------------------------------------------------------------------------
299 -- |---------------------------------< lck >----------------------------------|
300 -- ----------------------------------------------------------------------------
301 PROCEDURE lck
302   (p_effective_date                   IN  DATE
303   ,p_datetrack_mode                   IN  VARCHAR2
304   ,p_vehicle_repository_id            IN  NUMBER
305   ,p_object_version_number            IN  NUMBER
306   ,p_validation_start_date            OUT NOCOPY DATE
307   ,p_validation_end_date              OUT NOCOPY DATE
308   ) IS
309 --
310   l_proc                  VARCHAR2(72) := g_package||'lck';
311   l_validation_start_date DATE;
312   l_validation_end_date   DATE;
313   l_argument              VARCHAR2(30);
314   --
315   -- Cursor C_Sel1 selects the current locked row as of session date
316   -- ensuring that the object version numbers match.
317   --
318   CURSOR  C_Sel1 IS
319    SELECT
320        vehicle_repository_id
321       ,effective_start_date
322       ,effective_end_date
323       ,registration_number
324       ,vehicle_type
325       ,vehicle_id_number
326       ,business_group_id
327       ,make
328       ,model
329       ,initial_registration
330       ,last_registration_renew_date
331       ,engine_capacity_in_cc
332       ,fuel_type
333       ,currency_code
334       ,list_price
335       ,accessory_value_at_startdate
336       ,accessory_value_added_later
337       ,market_value_classic_car
338       ,fiscal_ratings
339       ,fiscal_ratings_uom
340       ,vehicle_provider
341       ,vehicle_ownership
342       ,shared_vehicle
343       ,vehicle_status
344       ,vehicle_inactivity_reason
345       ,asset_number
346       ,lease_contract_number
347       ,lease_contract_expiry_date
348       ,taxation_method
349       ,fleet_info
350       ,fleet_transfer_date
351       ,object_version_number
352       ,color
353       ,seating_capacity
354       ,weight
355       ,weight_uom
356       ,model_year
357       ,insurance_number
358       ,insurance_expiry_date
359       ,comments
360       ,vre_attribute_category
361       ,vre_attribute1
362       ,vre_attribute2
363       ,vre_attribute3
364       ,vre_attribute4
365       ,vre_attribute5
366       ,vre_attribute6
367       ,vre_attribute7
368       ,vre_attribute8
369       ,vre_attribute9
370       ,vre_attribute10
371       ,vre_attribute11
372       ,vre_attribute12
373       ,vre_attribute13
374       ,vre_attribute14
375       ,vre_attribute15
376       ,vre_attribute16
377       ,vre_attribute17
378       ,vre_attribute18
379       ,vre_attribute19
380       ,vre_attribute20
381       ,vre_information_category
382       ,vre_information1
383       ,vre_information2
384       ,vre_information3
385       ,vre_information4
386       ,vre_information5
387       ,vre_information6
388       ,vre_information7
389       ,vre_information8
390       ,vre_information9
391       ,vre_information10
392       ,vre_information11
393       ,vre_information12
394       ,vre_information13
395       ,vre_information14
396       ,vre_information15
397       ,vre_information16
398       ,vre_information17
399       ,vre_information18
400       ,vre_information19
401       ,vre_information20
402     FROM    pqp_vehicle_repository_f
403     WHERE   vehicle_repository_id = p_vehicle_repository_id
404     AND     p_effective_date
405     BETWEEN effective_start_date and effective_end_date
406     FOR UPDATE NOWAIT;
407   --
408   --
409   --
410 BEGIN
411   hr_utility.set_location('Entering:'||l_proc, 5);
412   --
413   -- Ensure that all the mandatory arguments are not null
414   --
415   hr_api.mandatory_arg_error(p_api_name       => l_proc
416                             ,p_argument       =>'effective_date'
417                             ,p_argument_value => p_effective_date
418                             );
419   --
420   hr_api.mandatory_arg_error(p_api_name       => l_proc
421                             ,p_argument       =>'datetrack_mode'
422                             ,p_argument_value => p_datetrack_mode
423                             );
424   --
425   hr_api.mandatory_arg_error(p_api_name       => l_proc
426                             ,p_argument       =>'vehicle_repository_id'
427                             ,p_argument_value => p_vehicle_repository_id
428                             );
429   --
430     hr_api.mandatory_arg_error(p_api_name       => l_proc
431                             ,p_argument         =>'object_version_number'
432                             ,p_argument_value   => p_object_version_number
433                             );
434   --
435   -- Check to ensure the datetrack mode is not INSERT.
436   --
437   IF (p_datetrack_mode <> hr_api.g_insert) THEN
438     --
439     -- We must select and lock the current row.
440     --
441     OPEN  C_Sel1;
442     FETCH C_Sel1 Into pqp_vre_shd.g_old_rec;
443     IF C_Sel1%notfound THEN
444       CLOSE C_Sel1;
445       --
446       -- The primary key is invalid therefore we must error
447       --
448       fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
449       fnd_message.raise_error;
450     END IF;
451     CLOSE C_Sel1;
452     IF (p_object_version_number
453           <> pqp_vre_shd.g_old_rec.object_version_number) THEN
454         fnd_message.set_name('PAY', 'HR_7155_OBJECT_INVALID');
455         fnd_message.raise_error;
456     END IF;
457     --
458     --
459     -- Validate the datetrack mode mode getting the validation start
460     -- and end dates for the specified datetrack operation.
461     --
462     dt_api.validate_dt_mode
463       (p_effective_date          => p_effective_date
464       ,p_datetrack_mode          => p_datetrack_mode
465       ,p_base_table_name         => 'pqp_vehicle_repository_f'
466       ,p_base_key_column         => 'vehicle_repository_id'
467       ,p_base_key_value          => p_vehicle_repository_id
468       ,p_enforce_foreign_locking => true
469       ,p_validation_start_date   => l_validation_start_date
470       ,p_validation_end_date     => l_validation_end_date
471       );
472   ELSE
473     --
474     -- We are doing a datetrack 'INSERT' which is illegal within this
475     -- procedure therefore we must error (note: to lck on insert the
476     -- private procedure ins_lck should be called).
477     --
478     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
479     fnd_message.set_token('PROCEDURE', l_proc);
480     fnd_message.set_token('STEP','20');
481     fnd_message.raise_error;
482   END IF;
483   --
484   -- Set the validation start and end date OUT arguments
485   --
486   p_validation_start_date := l_validation_start_date;
487   p_validation_end_date   := l_validation_end_date;
488   --
489   hr_utility.set_location(' Leaving:'||l_proc, 30);
490 --
491 -- We need to trap the ORA LOCK exception
492 --
493 EXCEPTION
494   WHEN HR_Api.Object_Locked THEN
495     --
496     -- The object is locked therefore we need to supply a meaningful
497     -- error message.
498     --
499     fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');
500     fnd_message.set_token('TABLE_NAME', 'pqp_vehicle_repository_f');
501     fnd_message.raise_error;
502 END lck;
503 --
504 -- ----------------------------------------------------------------------------
505 -- |-----------------------------< convert_args >-----------------------------|
506 -- ----------------------------------------------------------------------------
507 Function convert_args
508   (p_vehicle_repository_id          IN NUMBER
512   ,p_vehicle_type                   IN VARCHAR2
509   ,p_effective_start_date           IN DATE
510   ,p_effective_end_date             IN DATE
511   ,p_registration_number            IN VARCHAR2
513   ,p_vehicle_id_number              IN VARCHAR2
514   ,p_business_group_id              IN NUMBER
515   ,p_make                           IN VARCHAR2
516   ,p_model                          IN VARCHAR2
517   ,p_initial_registration           IN DATE
518   ,p_last_registration_renew_date   IN DATE
519   ,p_engine_capacity_in_cc          IN NUMBER
520   ,p_fuel_type                      IN VARCHAR2
521   ,p_currency_code                  IN VARCHAR2
522   ,p_list_price                     IN NUMBER
523   ,p_accessory_value_at_startdate   IN NUMBER
524   ,p_accessory_value_added_later    IN NUMBER
525   ,p_market_value_classic_car       IN NUMBER
526   ,p_fiscal_ratings                 IN NUMBER
527   ,p_fiscal_ratings_uom             IN VARCHAR2
528   ,p_vehicle_provider               IN VARCHAR2
529   ,p_vehicle_ownership              IN VARCHAR2
530   ,p_shared_vehicle                 IN VARCHAR2
531   ,p_vehicle_status                 IN VARCHAR2
532   ,p_vehicle_inactivity_reason      IN VARCHAR2
533   ,p_asset_number                   IN VARCHAR2
534   ,p_lease_contract_number          IN VARCHAR2
535   ,p_lease_contract_expiry_date     IN DATE
536   ,p_taxation_method                IN VARCHAR2
537   ,p_fleet_info                     IN VARCHAR2
538   ,p_fleet_transfer_date            IN DATE
539   ,p_object_version_number          IN NUMBER
540   ,p_color                          IN VARCHAR2
541   ,p_seating_capacity               IN NUMBER
542   ,p_weight                         IN NUMBER
543   ,p_weight_uom                     IN VARCHAR2
544   ,p_model_year                     IN NUMBER
545   ,p_insurance_number               IN VARCHAR2
546   ,p_insurance_expiry_date          IN DATE
547   ,p_comments                       IN VARCHAR2
548   ,p_vre_attribute_category         IN VARCHAR2
549   ,p_vre_attribute1                 IN VARCHAR2
550   ,p_vre_attribute2                 IN VARCHAR2
551   ,p_vre_attribute3                 IN VARCHAR2
552   ,p_vre_attribute4                 IN VARCHAR2
553   ,p_vre_attribute5                 IN VARCHAR2
554   ,p_vre_attribute6                 IN VARCHAR2
555   ,p_vre_attribute7                 IN VARCHAR2
556   ,p_vre_attribute8                 IN VARCHAR2
557   ,p_vre_attribute9                 IN VARCHAR2
558   ,p_vre_attribute10                IN VARCHAR2
559   ,p_vre_attribute11                IN VARCHAR2
560   ,p_vre_attribute12                IN VARCHAR2
561   ,p_vre_attribute13                IN VARCHAR2
562   ,p_vre_attribute14                IN VARCHAR2
563   ,p_vre_attribute15                IN VARCHAR2
564   ,p_vre_attribute16                IN VARCHAR2
565   ,p_vre_attribute17                IN VARCHAR2
566   ,p_vre_attribute18                IN VARCHAR2
567   ,p_vre_attribute19                IN VARCHAR2
568   ,p_vre_attribute20                IN VARCHAR2
569   ,p_vre_information_category       IN VARCHAR2
570   ,p_vre_information1               IN VARCHAR2
571   ,p_vre_information2               IN VARCHAR2
572   ,p_vre_information3               IN VARCHAR2
573   ,p_vre_information4               IN VARCHAR2
574   ,p_vre_information5               IN VARCHAR2
575   ,p_vre_information6               IN VARCHAR2
576   ,p_vre_information7               IN VARCHAR2
577   ,p_vre_information8               IN VARCHAR2
578   ,p_vre_information9               IN VARCHAR2
579   ,p_vre_information10              IN VARCHAR2
580   ,p_vre_information11              IN VARCHAR2
581   ,p_vre_information12              IN VARCHAR2
582   ,p_vre_information13              IN VARCHAR2
583   ,p_vre_information14              IN VARCHAR2
584   ,p_vre_information15              IN VARCHAR2
585   ,p_vre_information16              IN VARCHAR2
586   ,p_vre_information17              IN VARCHAR2
587   ,p_vre_information18              IN VARCHAR2
588   ,p_vre_information19              IN VARCHAR2
589   ,p_vre_information20              IN VARCHAR2
590   )
591   RETURN g_rec_type IS
592 --
593   l_rec   g_rec_type;
594 --
595 BEGIN
596   --
597   -- Convert arguments into local l_rec structure.
598   --
599   l_rec.vehicle_repository_id            := p_vehicle_repository_id;
600   l_rec.effective_start_date             := p_effective_start_date;
601   l_rec.effective_end_date               := p_effective_end_date;
602   l_rec.registration_number              := p_registration_number;
603   l_rec.vehicle_type                     := p_vehicle_type;
604   l_rec.vehicle_id_number                := p_vehicle_id_number;
605   l_rec.business_group_id                := p_business_group_id;
606   l_rec.make                             := p_make;
607   l_rec.model                            := p_model;
608   l_rec.initial_registration             := p_initial_registration;
609   l_rec.last_registration_renew_date     := p_last_registration_renew_date;
610   l_rec.engine_capacity_in_cc            := p_engine_capacity_in_cc;
611   l_rec.fuel_type                        := p_fuel_type;
612   l_rec.currency_code                    := p_currency_code;
613   l_rec.list_price                       := p_list_price;
614   l_rec.accessory_value_at_startdate     := p_accessory_value_at_startdate;
615   l_rec.accessory_value_added_later      := p_accessory_value_added_later;
616   l_rec.market_value_classic_car         := p_market_value_classic_car;
617   l_rec.fiscal_ratings                   := p_fiscal_ratings;
618   l_rec.fiscal_ratings_uom               := p_fiscal_ratings_uom;
619   l_rec.vehicle_provider                 := p_vehicle_provider;
620   l_rec.vehicle_ownership                := p_vehicle_ownership;
621   l_rec.shared_vehicle                   := p_shared_vehicle;
622   l_rec.vehicle_status                   := p_vehicle_status;
623   l_rec.vehicle_inactivity_reason        := p_vehicle_inactivity_reason;
624   l_rec.asset_number                     := p_asset_number;
625   l_rec.lease_contract_number            := p_lease_contract_number;
626   l_rec.lease_contract_expiry_date       := p_lease_contract_expiry_date;
627   l_rec.taxation_method                  := p_taxation_method;
628   l_rec.fleet_info                       := p_fleet_info;
629   l_rec.fleet_transfer_date              := p_fleet_transfer_date;
630   l_rec.object_version_number            := p_object_version_number;
631   l_rec.color                            := p_color;
632   l_rec.seating_capacity                 := p_seating_capacity;
633   l_rec.weight                           := p_weight;
634   l_rec.weight_uom                       := p_weight_uom;
635   l_rec.model_year                       := p_model_year;
636   l_rec.insurance_number                 := p_insurance_number;
637   l_rec.insurance_expiry_date            := p_insurance_expiry_date;
638   l_rec.comments                         := p_comments;
639   l_rec.vre_attribute_category           := p_vre_attribute_category;
640   l_rec.vre_attribute1                   := p_vre_attribute1;
641   l_rec.vre_attribute2                   := p_vre_attribute2;
642   l_rec.vre_attribute3                   := p_vre_attribute3;
643   l_rec.vre_attribute4                   := p_vre_attribute4;
644   l_rec.vre_attribute5                   := p_vre_attribute5;
645   l_rec.vre_attribute6                   := p_vre_attribute6;
646   l_rec.vre_attribute7                   := p_vre_attribute7;
647   l_rec.vre_attribute8                   := p_vre_attribute8;
648   l_rec.vre_attribute9                   := p_vre_attribute9;
649   l_rec.vre_attribute10                  := p_vre_attribute10;
650   l_rec.vre_attribute11                  := p_vre_attribute11;
651   l_rec.vre_attribute12                  := p_vre_attribute12;
652   l_rec.vre_attribute13                  := p_vre_attribute13;
653   l_rec.vre_attribute14                  := p_vre_attribute14;
654   l_rec.vre_attribute15                  := p_vre_attribute15;
655   l_rec.vre_attribute16                  := p_vre_attribute16;
656   l_rec.vre_attribute17                  := p_vre_attribute17;
657   l_rec.vre_attribute18                  := p_vre_attribute18;
658   l_rec.vre_attribute19                  := p_vre_attribute19;
659   l_rec.vre_attribute20                  := p_vre_attribute20;
660   l_rec.vre_information_category         := p_vre_information_category;
661   l_rec.vre_information1                 := p_vre_information1;
662   l_rec.vre_information2                 := p_vre_information2;
663   l_rec.vre_information3                 := p_vre_information3;
664   l_rec.vre_information4                 := p_vre_information4;
665   l_rec.vre_information5                 := p_vre_information5;
666   l_rec.vre_information6                 := p_vre_information6;
667   l_rec.vre_information7                 := p_vre_information7;
668   l_rec.vre_information8                 := p_vre_information8;
669   l_rec.vre_information9                 := p_vre_information9;
670   l_rec.vre_information10                := p_vre_information10;
671   l_rec.vre_information11                := p_vre_information11;
672   l_rec.vre_information12                := p_vre_information12;
673   l_rec.vre_information13                := p_vre_information13;
674   l_rec.vre_information14                := p_vre_information14;
675   l_rec.vre_information15                := p_vre_information15;
676   l_rec.vre_information16                := p_vre_information16;
677   l_rec.vre_information17                := p_vre_information17;
678   l_rec.vre_information18                := p_vre_information18;
679   l_rec.vre_information19                := p_vre_information19;
680   l_rec.vre_information20                := p_vre_information20;
681   --
682   -- Return the plsql record structure.
683   --
684   RETURN(l_rec);
685 --
686 End convert_args;
687 --
688 END pqp_vre_shd;