DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQP_PTY_DEL

Source


1 Package Body pqp_pty_del as
2 /* $Header: pqptyrhi.pkb 120.0.12000000.1 2007/01/16 04:29:01 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pqp_pty_del.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_delete_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the actual dml delete logic for the datetrack
17 --   delete modes: ZAP, DELETE, FUTURE_CHANGE and DELETE_NEXT_CHANGE. The
18 --   execution is as follows:
19 --   1) To set and unset the g_api_dml status as required (as we are about to
20 --      perform dml).
21 --   2) If the delete mode is DELETE_NEXT_CHANGE then delete where the
22 --      effective start date is equal to the validation start date.
23 --   3) If the delete mode is not DELETE_NEXT_CHANGE then delete
24 --      all rows for the entity where the effective start date is greater
25 --      than or equal to the validation start date.
26 --   4) To raise any errors.
27 --
28 -- Prerequisites:
29 --   This is an internal private procedure which must be called from the
30 --   delete_dml procedure.
31 --
32 -- In Parameters:
33 --   A Pl/Sql record structure.
34 --
35 -- Post Success:
36 --   The specified row will be delete from the schema.
37 --
38 -- Post Failure:
39 --   On the delete dml failure it is important to note that we always reset the
40 --   g_api_dml status to false.
41 --   If any other error is reported, the error will be raised after the
42 --   g_api_dml status is reset.
43 --
44 -- Developer Implementation Notes:
45 --   This is an internal private procedure which must be called from the
46 --   delete_dml procedure.
47 --
48 -- Access Status:
49 --   Internal Row Handler Use Only.
50 --
51 -- {End Of Comments}
52 -- ----------------------------------------------------------------------------
53 Procedure dt_delete_dml
54   (p_rec                     in out nocopy pqp_pty_shd.g_rec_type
55   ,p_effective_date          in date
56   ,p_datetrack_mode          in varchar2
57   ,p_validation_start_date   in date
58   ,p_validation_end_date     in date
59   ) is
60 --
61   l_proc        varchar2(72) := g_package||'dt_delete_dml';
62 --
63 Begin
64   hr_utility.set_location('Entering:'||l_proc, 5);
65   If (p_datetrack_mode = hr_api.g_delete_next_change) then
66     --
67     --
68     -- Delete the where the effective start date is equal
69     -- to the validation end date.
70     --
71     delete from pqp_pension_types_f
72     where       pension_type_id = p_rec.pension_type_id
73     and   effective_start_date = p_validation_start_date;
74     --
75     --
76   Else
77     --
78     --
79     -- Delete the row(s) where the effective start date is greater than
80     -- or equal to the validation start date.
81     --
82     delete from pqp_pension_types_f
83     where        pension_type_id = p_rec.pension_type_id
84     and   effective_start_date >= p_validation_start_date;
85     --
86     --
87   End If;
88   --
89   hr_utility.set_location(' Leaving:'||l_proc, 20);
90 --
91 End dt_delete_dml;
92 --
93 -- ----------------------------------------------------------------------------
94 -- ----------------------< delete_app_ownerships >----------------------------|
95 -- ----------------------------------------------------------------------------
96 --
97 -- Description:
98 --   Deletes row(s) from hr_application_ownerships depending on the mode that
99 --   the row handler has been called in.
100 --
101 -- ----------------------------------------------------------------------------
102 PROCEDURE delete_app_ownerships(p_pk_column  IN  varchar2
103                                ,p_pk_value   IN  varchar2
104                                ,p_datetrack_mode IN varchar2) IS
105 --
106 BEGIN
107   --
108   IF ((hr_startup_data_api_support.return_startup_mode
109                            IN ('STARTUP','GENERIC')) AND
110       p_datetrack_mode = 'ZAP') THEN
111      --
112      DELETE FROM hr_application_ownerships
113       WHERE key_name = p_pk_column
114         AND key_value = p_pk_value;
115      --
116   END IF;
117 END delete_app_ownerships;
118 --
119 -- ----------------------------------------------------------------------------
120 -- ----------------------< delete_app_ownerships >----------------------------|
121 -- ----------------------------------------------------------------------------
122 PROCEDURE delete_app_ownerships(p_pk_column IN varchar2
123                                ,p_pk_value  IN number
124                                ,p_datetrack_mode IN varchar2) IS
125 --
126 BEGIN
127   delete_app_ownerships(p_pk_column,
128                         to_char(p_pk_value),
129                         p_datetrack_mode
130                        );
131 END delete_app_ownerships;
132 --
133 -- ----------------------------------------------------------------------------
134 -- |------------------------------< delete_dml >------------------------------|
135 -- ----------------------------------------------------------------------------
136 Procedure delete_dml
137   (p_rec                     in out nocopy pqp_pty_shd.g_rec_type
138   ,p_effective_date          in date
139   ,p_datetrack_mode          in varchar2
140   ,p_validation_start_date   in date
141   ,p_validation_end_date     in date
142   ) is
143 --
144   l_proc        varchar2(72) := g_package||'delete_dml';
145 --
146 Begin
147   hr_utility.set_location('Entering:'||l_proc, 5);
148   --
149   pqp_pty_del.dt_delete_dml
150     (p_rec                   => p_rec
151     ,p_effective_date        => p_effective_date
152     ,p_datetrack_mode        => p_datetrack_mode
153     ,p_validation_start_date => p_validation_start_date
154     ,p_validation_end_date   => p_validation_end_date
155     );
156   --
157   hr_utility.set_location(' Leaving:'||l_proc, 10);
158 End delete_dml;
159 --
160 -- ----------------------------------------------------------------------------
161 -- |----------------------------< dt_pre_delete >-----------------------------|
162 -- ----------------------------------------------------------------------------
163 -- {Start Of Comments}
164 --
165 -- Description:
166 --   The dt_pre_delete process controls the execution of dml
167 --   for the datetrack modes: DELETE, FUTURE_CHANGE
168 --   and DELETE_NEXT_CHANGE only.
169 --
170 -- Prerequisites:
171 --   This is an internal procedure which is called from the pre_delete
172 --   procedure.
173 --
174 -- In Parameters:
175 --   A Pl/Sql record structure.
176 --
177 -- Post Success:
178 --   Processing continues.
179 --
180 -- Post Failure:
181 --   If an error has occurred, an error message and exception will be raised
182 --   but not handled.
183 --
184 -- Developer Implementation Notes:
185 --   This is an internal procedure which is required by Datetrack. Don't
186 --   remove or modify.
187 --
188 -- Access Status:
189 --   Internal Row Handler Use Only.
190 --
191 -- {End Of Comments}
192 -- ----------------------------------------------------------------------------
193 Procedure dt_pre_delete
194   (p_rec                     in out nocopy pqp_pty_shd.g_rec_type
195   ,p_effective_date          in date
196   ,p_datetrack_mode          in varchar2
197   ,p_validation_start_date   in date
198   ,p_validation_end_date     in date
199   ) is
200 --
201   l_proc        varchar2(72) := g_package||'dt_pre_delete';
202 --
203 Begin
204   hr_utility.set_location('Entering:'||l_proc, 5);
205   --
206   If (p_datetrack_mode <> hr_api.g_zap) then
207     --
208     p_rec.effective_start_date
209       := pqp_pty_shd.g_old_rec.effective_start_date;
210     --
211     If (p_datetrack_mode = hr_api.g_delete) then
212       p_rec.effective_end_date := p_validation_start_date - 1;
213     Else
214       p_rec.effective_end_date := p_validation_end_date;
215     End If;
216     --
217     -- Update the current effective end date record
218     --
219     pqp_pty_shd.upd_effective_end_date
220       (p_effective_date         => p_effective_date
221       ,p_base_key_value         => p_rec.pension_type_id
222       ,p_new_effective_end_date => p_rec.effective_end_date
223       ,p_validation_start_date  => p_validation_start_date
224       ,p_validation_end_date    => p_validation_end_date
225       ,p_object_version_number            => p_rec.object_version_number
226       );
227   Else
228     p_rec.effective_start_date := null;
229     p_rec.effective_end_date   := null;
230   End If;
231   hr_utility.set_location(' Leaving:'||l_proc, 10);
232 End dt_pre_delete;
233 --
234 -- ----------------------------------------------------------------------------
235 -- |------------------------------< pre_delete >------------------------------|
236 -- ----------------------------------------------------------------------------
237 -- {Start Of Comments}
238 --
239 -- Description:
240 --   This private procedure contains any processing which is required before
241 --   the delete dml.
242 --
243 -- Prerequisites:
244 --   This is an internal procedure which is called from the del procedure.
245 --
246 -- In Parameters:
247 --   A Pl/Sql record structure.
248 --
249 -- Post Success:
250 --   Processing continues.
251 --
252 -- Post Failure:
253 --   If an error has occurred, an error message and exception will be raised
254 --   but not handled.
255 --
256 -- Developer Implementation Notes:
257 --   Any pre-processing required before the delete dml is issued should be
258 --   coded within this procedure. It is important to note that any 3rd party
259 --   maintenance should be reviewed before placing in this procedure. The call
260 --   to the dt_delete_dml procedure should NOT be removed.
261 --
262 -- Access Status:
263 --   Internal Row Handler Use Only.
264 --
265 -- {End Of Comments}
266 -- ----------------------------------------------------------------------------
267 Procedure pre_delete
268   (p_rec                   in out nocopy pqp_pty_shd.g_rec_type
269   ,p_effective_date        in date
270   ,p_datetrack_mode        in varchar2
271   ,p_validation_start_date in date
272   ,p_validation_end_date   in date
273   ) is
274 --
275   l_proc        varchar2(72) := g_package||'pre_delete';
276 --
277   --
278 --
279 Begin
280   hr_utility.set_location('Entering:'||l_proc, 5);
281   --
282 --
283   --
284   pqp_pty_del.dt_pre_delete
285     (p_rec                   => p_rec
286     ,p_effective_date        => p_effective_date
287     ,p_datetrack_mode        => p_datetrack_mode
288     ,p_validation_start_date => p_validation_start_date
289     ,p_validation_end_date   => p_validation_end_date
290     );
291   --
292   hr_utility.set_location(' Leaving:'||l_proc, 10);
293 End pre_delete;
294 --
295 -- ----------------------------------------------------------------------------
296 -- |----------------------------< post_delete >-------------------------------|
297 -- ----------------------------------------------------------------------------
298 -- {Start Of Comments}
299 --
300 -- Description:
301 --   This private procedure contains any processing which is required after
302 --   the delete dml.
303 --
304 -- Prerequisites:
305 --   This is an internal procedure which is called from the del procedure.
306 --
307 -- In Parameters:
308 --   A Pl/Sql record structure.
309 --
310 -- Post Success:
311 --   Processing continues.
312 --
313 -- Post Failure:
314 --   If an error has occurred, an error message and exception will be raised
315 --   but not handled.
316 --
317 -- Developer Implementation Notes:
318 --   Any post-processing required after the delete dml is issued should be
319 --   coded within this procedure. It is important to note that any 3rd party
320 --   maintenance should be reviewed before placing in this procedure.
321 --
322 -- Access Status:
323 --   Internal Row Handler Use Only.
324 --
325 -- {End Of Comments}
326 -- ----------------------------------------------------------------------------
327 Procedure post_delete
328   (p_rec                   in pqp_pty_shd.g_rec_type
329   ,p_effective_date        in date
330   ,p_datetrack_mode        in varchar2
331   ,p_validation_start_date in date
332   ,p_validation_end_date   in date
333   ) is
334 --
335   l_proc        varchar2(72) := g_package||'post_delete';
336 --
337 Begin
338   hr_utility.set_location('Entering:'||l_proc, 5);
339    begin
340       --
341     -- Delete ownerships if applicable
342     delete_app_ownerships
343       ('PENSION_TYPE_ID', p_rec.pension_type_id
344       ,p_datetrack_mode
345       );
346     --
347     pqp_pty_rkd.after_delete
348       (p_effective_date
349       => p_effective_date
350       ,p_datetrack_mode
351       => p_datetrack_mode
352       ,p_validation_start_date
353       => p_validation_start_date
354       ,p_validation_end_date
355       => p_validation_end_date
356       ,p_pension_type_id
357       => p_rec.pension_type_id
358       ,p_effective_start_date
359       => p_rec.effective_start_date
360       ,p_effective_end_date
361       => p_rec.effective_end_date
362       ,p_effective_start_date_o
363       => pqp_pty_shd.g_old_rec.effective_start_date
364       ,p_effective_end_date_o
365       => pqp_pty_shd.g_old_rec.effective_end_date
366       ,p_pension_type_name_o
367       => pqp_pty_shd.g_old_rec.pension_type_name
368       ,p_pension_category_o
369       => pqp_pty_shd.g_old_rec.pension_category
370       ,p_pension_provider_type_o
371       => pqp_pty_shd.g_old_rec.pension_provider_type
372       ,p_salary_calculation_method_o
373       => pqp_pty_shd.g_old_rec.salary_calculation_method
374       ,p_threshold_conversion_rule_o
375       => pqp_pty_shd.g_old_rec.threshold_conversion_rule
376       ,p_contribution_conversion_ru_o
377       => pqp_pty_shd.g_old_rec.contribution_conversion_rule
378       ,p_er_annual_limit_o
379       => pqp_pty_shd.g_old_rec.er_annual_limit
380       ,p_ee_annual_limit_o
381       => pqp_pty_shd.g_old_rec.ee_annual_limit
382       ,p_er_annual_salary_threshold_o
383       => pqp_pty_shd.g_old_rec.er_annual_salary_threshold
384       ,p_ee_annual_salary_threshold_o
385       => pqp_pty_shd.g_old_rec.ee_annual_salary_threshold
386       ,p_object_version_number_o
387       => pqp_pty_shd.g_old_rec.object_version_number
388       ,p_business_group_id_o
389       => pqp_pty_shd.g_old_rec.business_group_id
390       ,p_legislation_code_o
391       => pqp_pty_shd.g_old_rec.legislation_code
392       ,p_description_o
393       => pqp_pty_shd.g_old_rec.description
394       ,p_minimum_age_o
395       => pqp_pty_shd.g_old_rec.minimum_age
396       ,p_ee_contribution_percent_o
397       => pqp_pty_shd.g_old_rec.ee_contribution_percent
398       ,p_maximum_age_o
399       => pqp_pty_shd.g_old_rec.maximum_age
400       ,p_er_contribution_percent_o
401       => pqp_pty_shd.g_old_rec.er_contribution_percent
402       ,p_ee_annual_contribution_o
403       => pqp_pty_shd.g_old_rec.ee_annual_contribution
404       ,p_er_annual_contribution_o
405       => pqp_pty_shd.g_old_rec.er_annual_contribution
406       ,p_annual_premium_amount_o
407       => pqp_pty_shd.g_old_rec.annual_premium_amount
408       ,p_ee_contribution_bal_type_i_o
412       ,p_balance_init_element_type__o
409       => pqp_pty_shd.g_old_rec.ee_contribution_bal_type_id
410       ,p_er_contribution_bal_type_i_o
411       => pqp_pty_shd.g_old_rec.er_contribution_bal_type_id
413       => pqp_pty_shd.g_old_rec.balance_init_element_type_id
414      ,p_ee_contribution_fixed_rate_o  => pqp_pty_shd.g_old_rec.ee_contribution_fixed_rate
415      ,p_er_contribution_fixed_rate_o  => pqp_pty_shd.g_old_rec.ee_contribution_fixed_rate
416       ,p_pty_attribute_category_o
417       => pqp_pty_shd.g_old_rec.pty_attribute_category
418       ,p_pty_attribute1_o
419       => pqp_pty_shd.g_old_rec.pty_attribute1
420       ,p_pty_attribute2_o
421       => pqp_pty_shd.g_old_rec.pty_attribute2
422       ,p_pty_attribute3_o
423       => pqp_pty_shd.g_old_rec.pty_attribute3
424       ,p_pty_attribute4_o
425       => pqp_pty_shd.g_old_rec.pty_attribute4
426       ,p_pty_attribute5_o
427       => pqp_pty_shd.g_old_rec.pty_attribute5
428       ,p_pty_attribute6_o
429       => pqp_pty_shd.g_old_rec.pty_attribute6
430       ,p_pty_attribute7_o
431       => pqp_pty_shd.g_old_rec.pty_attribute7
432       ,p_pty_attribute8_o
433       => pqp_pty_shd.g_old_rec.pty_attribute8
434       ,p_pty_attribute9_o
435       => pqp_pty_shd.g_old_rec.pty_attribute9
436       ,p_pty_attribute10_o
437       => pqp_pty_shd.g_old_rec.pty_attribute10
438       ,p_pty_attribute11_o
439       => pqp_pty_shd.g_old_rec.pty_attribute11
440       ,p_pty_attribute12_o
441       => pqp_pty_shd.g_old_rec.pty_attribute12
442       ,p_pty_attribute13_o
443       => pqp_pty_shd.g_old_rec.pty_attribute13
444       ,p_pty_attribute14_o
445       => pqp_pty_shd.g_old_rec.pty_attribute14
446       ,p_pty_attribute15_o
447       => pqp_pty_shd.g_old_rec.pty_attribute15
448       ,p_pty_attribute16_o
449       => pqp_pty_shd.g_old_rec.pty_attribute16
450       ,p_pty_attribute17_o
451       => pqp_pty_shd.g_old_rec.pty_attribute17
452       ,p_pty_attribute18_o
453       => pqp_pty_shd.g_old_rec.pty_attribute18
454       ,p_pty_attribute19_o
455       => pqp_pty_shd.g_old_rec.pty_attribute19
456       ,p_pty_attribute20_o
457       => pqp_pty_shd.g_old_rec.pty_attribute20
458       ,p_pty_information_category_o
459       => pqp_pty_shd.g_old_rec.pty_information_category
460       ,p_pty_information1_o
461       => pqp_pty_shd.g_old_rec.pty_information1
462       ,p_pty_information2_o
463       => pqp_pty_shd.g_old_rec.pty_information2
464       ,p_pty_information3_o
465       => pqp_pty_shd.g_old_rec.pty_information3
466       ,p_pty_information4_o
467       => pqp_pty_shd.g_old_rec.pty_information4
468       ,p_pty_information5_o
469       => pqp_pty_shd.g_old_rec.pty_information5
470       ,p_pty_information6_o
471       => pqp_pty_shd.g_old_rec.pty_information6
472       ,p_pty_information7_o
473       => pqp_pty_shd.g_old_rec.pty_information7
474       ,p_pty_information8_o
475       => pqp_pty_shd.g_old_rec.pty_information8
476       ,p_pty_information9_o
477       => pqp_pty_shd.g_old_rec.pty_information9
478       ,p_pty_information10_o
479       => pqp_pty_shd.g_old_rec.pty_information10
480       ,p_pty_information11_o
481       => pqp_pty_shd.g_old_rec.pty_information11
482       ,p_pty_information12_o
483       => pqp_pty_shd.g_old_rec.pty_information12
484       ,p_pty_information13_o
485       => pqp_pty_shd.g_old_rec.pty_information13
486       ,p_pty_information14_o
487       => pqp_pty_shd.g_old_rec.pty_information14
488       ,p_pty_information15_o
489       => pqp_pty_shd.g_old_rec.pty_information15
490       ,p_pty_information16_o
491       => pqp_pty_shd.g_old_rec.pty_information16
492       ,p_pty_information17_o
493       => pqp_pty_shd.g_old_rec.pty_information17
494       ,p_pty_information18_o
495       => pqp_pty_shd.g_old_rec.pty_information18
496       ,p_pty_information19_o
497       => pqp_pty_shd.g_old_rec.pty_information19
498       ,p_pty_information20_o
499       => pqp_pty_shd.g_old_rec.pty_information20
500       ,p_special_pension_type_code_o
501       => pqp_pty_shd.g_old_rec.special_pension_type_code
502       ,p_pension_sub_category_o
503       => pqp_pty_shd.g_old_rec.pension_sub_category
504       ,p_pension_basis_calc_method_o
505       => pqp_pty_shd.g_old_rec.pension_basis_calc_method
506       ,p_pension_salary_balance_o
507       => pqp_pty_shd.g_old_rec.pension_salary_balance
508       ,p_recurring_bonus_percent_o
509       => pqp_pty_shd.g_old_rec.recurring_bonus_percent
510       ,p_non_recur_bonus_percent_o
511       => pqp_pty_shd.g_old_rec.non_recurring_bonus_percent
512       ,p_recurring_bonus_balance_o
513       => pqp_pty_shd.g_old_rec.recurring_bonus_balance
514       ,p_non_recur_bonus_balance_o
515       => pqp_pty_shd.g_old_rec.non_recurring_bonus_balance
516       ,p_std_tax_reduction_o
517       => pqp_pty_shd.g_old_rec.std_tax_reduction
518       ,p_spl_tax_reduction_o
519       => pqp_pty_shd.g_old_rec.spl_tax_reduction
520       ,p_sig_sal_spl_tax_reduction_o
521       => pqp_pty_shd.g_old_rec.sig_sal_spl_tax_reduction
522       ,p_sig_sal_non_tax_reduction_o
523       => pqp_pty_shd.g_old_rec.sig_sal_non_tax_reduction
524       ,p_sig_sal_std_tax_reduction_o
525       => pqp_pty_shd.g_old_rec.sig_sal_std_tax_reduction
526       ,p_sii_std_tax_reduction_o
527       => pqp_pty_shd.g_old_rec.sii_std_tax_reduction
528       ,p_sii_spl_tax_reduction_o
532       ,p_prev_year_bonus_include_o
529       => pqp_pty_shd.g_old_rec.sii_spl_tax_reduction
530       ,p_sii_non_tax_reduction_o
531       => pqp_pty_shd.g_old_rec.sii_non_tax_reduction
533       => pqp_pty_shd.g_old_rec.previous_year_bonus_included
534       ,p_recurring_bonus_period_o
535       => pqp_pty_shd.g_old_rec.recurring_bonus_period
536       ,p_non_recurring_bonus_period_o
537       => pqp_pty_shd.g_old_rec.non_recurring_bonus_period
538       ,p_ee_age_threshold_o
539       => pqp_pty_shd.g_old_rec.ee_age_threshold
540       ,p_er_age_threshold_o
541       => pqp_pty_shd.g_old_rec.er_age_threshold
542       ,p_ee_age_contribution_o
543       => pqp_pty_shd.g_old_rec.ee_age_contribution
544       ,p_er_age_contribution_o
545       => pqp_pty_shd.g_old_rec.er_age_contribution
546       );
547     --
548   exception
549     --
550     when hr_api.cannot_find_prog_unit then
551       --
552       hr_api.cannot_find_prog_unit_error
553         (p_module_name => 'PQP_PENSION_TYPES_F'
554         ,p_hook_type   => 'AD');
555       --
556   end;
557   --
558   hr_utility.set_location(' Leaving:'||l_proc, 10);
559 End post_delete;
560 --
561 -- ----------------------------------------------------------------------------
562 -- |---------------------------------< del >----------------------------------|
563 -- ----------------------------------------------------------------------------
564 Procedure del
565   (p_effective_date in     date
566   ,p_datetrack_mode in     varchar2
567   ,p_rec            in out nocopy pqp_pty_shd.g_rec_type
568   ) is
569 --
570   l_proc                        varchar2(72) := g_package||'del';
571   l_validation_start_date       date;
572   l_validation_end_date         date;
573 --
574 Begin
575   hr_utility.set_location('Entering:'||l_proc, 5);
576   --
577   -- Ensure that the DateTrack delete mode is valid
578   --
579   dt_api.validate_dt_del_mode(p_datetrack_mode => p_datetrack_mode);
580   --
581   -- We must lock the row which we need to delete.
582   --
583   pqp_pty_shd.lck
584     (p_effective_date                   => p_effective_date
585     ,p_datetrack_mode                   => p_datetrack_mode
586     ,p_pension_type_id                  => p_rec.pension_type_id
587     ,p_object_version_number            => p_rec.object_version_number
588     ,p_validation_start_date            => l_validation_start_date
589     ,p_validation_end_date              => l_validation_end_date
590     );
591   --
592   -- Call the supporting delete validate operation
593   --
594   pqp_pty_bus.delete_validate
595     (p_rec                              => p_rec
596     ,p_effective_date                   => p_effective_date
597     ,p_datetrack_mode                   => p_datetrack_mode
598     ,p_validation_start_date            => l_validation_start_date
599     ,p_validation_end_date              => l_validation_end_date
600     );
601   --
602   -- Call to raise any errors on multi-message list
603   hr_multi_message.end_validation_set;
604   --
605   -- Call the supporting pre-delete operation
606   --
607   pqp_pty_del.pre_delete
608     (p_rec                              => p_rec
609     ,p_effective_date                   => p_effective_date
610     ,p_datetrack_mode                   => p_datetrack_mode
611     ,p_validation_start_date            => l_validation_start_date
612     ,p_validation_end_date              => l_validation_end_date
613     );
614   --
615   -- Delete the row.
616   --
617   pqp_pty_del.delete_dml
618     (p_rec                              => p_rec
619     ,p_effective_date                   => p_effective_date
620     ,p_datetrack_mode                   => p_datetrack_mode
621     ,p_validation_start_date            => l_validation_start_date
622     ,p_validation_end_date              => l_validation_end_date
623     );
624   -- Call the supporting post-delete operation
625   --
626   pqp_pty_del.post_delete
627     (p_rec                              => p_rec
628     ,p_effective_date                   => p_effective_date
629     ,p_datetrack_mode                   => p_datetrack_mode
630     ,p_validation_start_date            => l_validation_start_date
631     ,p_validation_end_date              => l_validation_end_date
632     );
633   --
634   -- Call to raise any errors on multi-message list
635   hr_multi_message.end_validation_set;
636   --
637   hr_utility.set_location(' Leaving:'||l_proc, 5);
638 End del;
639 --
640 -- ----------------------------------------------------------------------------
641 -- |--------------------------------< del >-----------------------------------|
642 -- ----------------------------------------------------------------------------
643 Procedure del
644   (p_effective_date                   in     date
645   ,p_datetrack_mode                   in     varchar2
646   ,p_pension_type_id                  in     number
647   ,p_object_version_number            in out nocopy number
648   ,p_effective_start_date                out nocopy date
649   ,p_effective_end_date                  out nocopy date
650   ) is
651 
652     Cursor csr_data_pension_types_f
653     (
654     c_pension_type_id in pqp_pension_types_f.pension_type_id%TYPE
655     ) Is
656     select
657     business_group_id,
658     pension_type_id
659     from pqp_pension_types_f
660     where
661     pension_type_id =  c_pension_type_id;
662 --
663   l_rec         pqp_pty_shd.g_rec_type;
664   l_proc        varchar2(72) := g_package||'del';
665   l_business_group_id pqp_pension_types_f.business_group_id%TYPE;
666   l_pension_type_id pqp_pension_types_f.pension_type_id%TYPE;
667 --
668 Begin
669   hr_utility.set_location('Entering:'||l_proc, 5);
670   --
671   -- As the delete procedure accepts a plsql record structure we do need to
672   -- convert the  arguments into the record structure.
673   -- We don't need to call the supplied conversion argument routine as we
674   -- only need a few attributes.
675   --
676 
677       open csr_data_pension_types_f
678       (
679         c_pension_type_id => p_pension_type_id
680       );
681 
682       fetch csr_data_pension_types_f
683       Into
684       l_business_group_id,
685       l_pension_type_id;
686 
687       l_rec.pension_type_id          := p_pension_type_id;
688       l_rec.object_version_number     := p_object_version_number;
689       l_rec.business_group_id := l_business_group_id;
690 
691 
692   --
693   -- Having converted the arguments into the pqp_pty_rec
694   -- plsql record structure we must call the corresponding entity
695   -- business process
696   --
697   pqp_pty_del.del
698      (p_effective_date
699      ,p_datetrack_mode
700      ,l_rec
701      );
702   --
703   --
704   -- Set the out arguments
705   --
706   p_object_version_number            := l_rec.object_version_number;
707   p_effective_start_date             := l_rec.effective_start_date;
708   p_effective_end_date               := l_rec.effective_end_date;
709   --
710   hr_utility.set_location(' Leaving:'||l_proc, 10);
711 End del;
712 --
713 end pqp_pty_del;
714