DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_PAY_DEL

Source


4 -- ----------------------------------------------------------------------------
1 Package Body pay_pay_del as
2 /* $Header: pypayrhi.pkb 120.0.12000000.3 2007/03/08 09:23:27 mshingan noship $ */
3 --
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pay_pay_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 -- ----------------------------------------------------------------------------
56   ,p_datetrack_mode          in varchar2
53 Procedure dt_delete_dml
54   (p_rec                     in out nocopy pay_pay_shd.g_rec_type
55   ,p_effective_date          in date
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   l_status_of_dml boolean;
63 --
64 Begin
65   hr_utility.set_location('Entering:'||l_proc, 5);
66   If (p_datetrack_mode = hr_api.g_delete_next_change) then
67     pay_pay_shd.g_api_dml := true;  -- Set the api dml status
68     --
69     -- Delete the where the effective start date is equal
70     -- to the validation end date.
71     --
72     delete from pay_all_payrolls_f
73     where       payroll_id = p_rec.payroll_id
74     and   effective_start_date = p_validation_start_date;
75     --
76     pay_pay_shd.g_api_dml := false;   -- Unset the api dml status
77     --
78   Else
79     --
80     pay_pay_shd.g_api_dml := true;  -- Set the api dml status
81     --
82     -- Delete the row(s) where the effective start date is greater than
83     -- or equal to the validation start date.
84     --
85     delete from pay_all_payrolls_f
86     where        payroll_id = p_rec.payroll_id
87     and   effective_start_date >= p_validation_start_date;
88     --
89 
90     --Storing the result of the above DML operation.
91     l_status_of_dml:=SQL%NOTFOUND;
92     pay_pay_shd.g_api_dml := false;   -- Unset the api dml status
93 
94     --Checking the status of the above dml operation.
95     /*if (l_status_of_dml) then
96       hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
97       hr_utility.set_message_token('PROCEDURE',
98                                  'pay_payrolls_f_pkg.delete_row');
99       hr_utility.set_message_token('STEP','1');
100       hr_utility.raise_error;
101     End if;*/
102 
103   End If;
104   --
105   hr_utility.set_location(' Leaving:'||l_proc, 20);
106 --
107 Exception
108   When Others Then
109     pay_pay_shd.g_api_dml := false;   -- Unset the api dml status
110     Raise;
111 --
112 End dt_delete_dml;
113 --
114 -- ----------------------------------------------------------------------------
115 -- |------------------------------< delete_dml >------------------------------|
116 -- ----------------------------------------------------------------------------
117 Procedure delete_dml
118   (p_rec                     in out nocopy pay_pay_shd.g_rec_type
119   ,p_effective_date          in date
120   ,p_datetrack_mode          in varchar2
121   ,p_validation_start_date   in date
122   ,p_validation_end_date     in date
123   ) is
124 --
125   l_proc        varchar2(72) := g_package||'delete_dml';
126 --
127 Begin
128   --
129   hr_utility.set_location('Entering:'||l_proc, 5);
130   --
131   pay_pay_del.dt_delete_dml
132     (p_rec                   => p_rec
133     ,p_effective_date        => p_effective_date
134     ,p_datetrack_mode        => p_datetrack_mode
135     ,p_validation_start_date => p_validation_start_date
136     ,p_validation_end_date   => p_validation_end_date
137     );
138   --
139   hr_utility.set_location(' Leaving:'||l_proc, 10);
140   --
141 End delete_dml;
142 --
143 -- ----------------------------------------------------------------------------
144 -- |----------------------------< dt_pre_delete >-----------------------------|
145 -- ----------------------------------------------------------------------------
146 -- {Start Of Comments}
147 --
148 -- Description:
149 --   The dt_pre_delete process controls the execution of dml
150 --   for the datetrack modes: DELETE, FUTURE_CHANGE
151 --   and DELETE_NEXT_CHANGE only.
152 --
153 -- Prerequisites:
154 --   This is an internal procedure which is called from the pre_delete
155 --   procedure.
156 --
157 -- In Parameters:
158 --   A Pl/Sql record structure.
159 --
160 -- Post Success:
161 --   Processing continues.
162 --
163 -- Post Failure:
164 --   If an error has occurred, an error message and exception will be raised
165 --   but not handled.
166 --
167 -- Developer Implementation Notes:
168 --   This is an internal procedure which is required by Datetrack. Don't
172 --   Internal Row Handler Use Only.
169 --   remove or modify.
170 --
171 -- Access Status:
173 --
174 -- {End Of Comments}
175 -- ----------------------------------------------------------------------------
176 Procedure dt_pre_delete
177   (p_rec                     in out nocopy pay_pay_shd.g_rec_type
178   ,p_effective_date          in date
179   ,p_datetrack_mode          in varchar2
180   ,p_validation_start_date   in date
181   ,p_validation_end_date     in date
182   ) is
183 --
184   l_proc        varchar2(72) := g_package||'dt_pre_delete';
185 --
186 Begin
187   --
188   hr_utility.set_location('Entering:'||l_proc, 5);
189   --
190   If (p_datetrack_mode <> hr_api.g_zap) then
191     --
192     p_rec.effective_start_date
193       := pay_pay_shd.g_old_rec.effective_start_date;
194     --
195     If (p_datetrack_mode = hr_api.g_delete) then
196       --
197       p_rec.effective_end_date := p_validation_start_date - 1;
198       --
199     Else
200       --
201       p_rec.effective_end_date := p_validation_end_date;
202       --
203     End If;
204     --
205     -- Update the current effective end date record
206     --
207     pay_pay_shd.upd_effective_end_date
208       (p_effective_date         => p_effective_date
209       ,p_base_key_value         => p_rec.payroll_id
210       ,p_new_effective_end_date => p_rec.effective_end_date
211       ,p_validation_start_date  => p_validation_start_date
212       ,p_validation_end_date    => p_validation_end_date
213       ,p_object_version_number            => p_rec.object_version_number
214       );
215     --
216   Else
217     --
218     p_rec.effective_start_date := null;
219     p_rec.effective_end_date   := null;
220     --
221   End If;
222   --
223   hr_utility.set_location(' Leaving:'||l_proc, 10);
224   --
225 End dt_pre_delete;
226 --
227 -- ----------------------------------------------------------------------------
228 -- |------------------------------< pre_delete >------------------------------|
232 -- Description:
229 -- ----------------------------------------------------------------------------
230 -- {Start Of Comments}
231 --
233 --   This private procedure contains any processing which is required before
234 --   the delete dml.
235 --
236 -- Prerequisites:
237 --   This is an internal procedure which is called from the del procedure.
238 --
239 -- In Parameters:
240 --   A Pl/Sql record structure.
241 --
242 -- Post Success:
243 --   Processing continues.
244 --
245 -- Post Failure:
246 --   If an error has occurred, an error message and exception will be raised
247 --   but not handled.
248 --
249 -- Developer Implementation Notes:
250 --   Any pre-processing required before the delete dml is issued should be
251 --   coded within this procedure. It is important to note that any 3rd party
252 --   maintenance should be reviewed before placing in this procedure. The call
253 --   to the dt_delete_dml procedure should NOT be removed.
254 --
255 -- Access Status:
256 --   Internal Row Handler Use Only.
257 --
258 -- {End Of Comments}
259 -- ----------------------------------------------------------------------------
260 Procedure pre_delete
261   (p_rec                   in out nocopy pay_pay_shd.g_rec_type
262   ,p_effective_date        in date
263   ,p_datetrack_mode        in varchar2
264   ,p_validation_start_date in date
265   ,p_validation_end_date   in date
266   ) is
267 --
268   l_proc        varchar2(72) := g_package||'pre_delete';
269 --
270 -- Cursor C_Sel1 select comments to be deleted
271 --
272   Cursor C_Sel1 is
273     select t1.comment_id
274     from   pay_all_payrolls_f t1
275     where  t1.comment_id is not null
276     and    t1.payroll_id = p_rec.payroll_id
277     and    t1.effective_start_date <= p_validation_end_date
278     and    t1.effective_end_date   >= p_validation_start_date
279     and    not exists
280            (select 1
281             from   pay_all_payrolls_f t2
282             where  t2.comment_id = t1.comment_id
283             and    t2.payroll_id = t1.payroll_id
284             and   (t2.effective_start_date > p_validation_end_date
285             or    t2.effective_end_date   < p_validation_start_date));
286 --
287 --
288 Begin
289   hr_utility.set_location('Entering:'||l_proc, 5);
290   --
291   -- Delete any possible comments
292   --
293   For Comm_Del In C_Sel1 Loop
294     hr_comm_api.del(p_comment_id        => Comm_Del.comment_id);
295   End Loop;
296   --
297   --
298   pay_pay_del.dt_pre_delete
299     (p_rec                   => p_rec
300     ,p_effective_date        => p_effective_date
301     ,p_datetrack_mode        => p_datetrack_mode
302     ,p_validation_start_date => p_validation_start_date
303     ,p_validation_end_date   => p_validation_end_date
304     );
305   --
306   hr_utility.set_location(' Leaving:'||l_proc, 10);
307   --
308 End pre_delete;
309 --
310 -- ----------------------------------------------------------------------------
311 -- |----------------------------< post_delete >-------------------------------|
312 -- ----------------------------------------------------------------------------
313 -- {Start Of Comments}
314 --
315 -- Description:
316 --   This private procedure contains any processing which is required after
317 --   the delete dml.
318 --
319 -- Prerequisites:
320 --   This is an internal procedure which is called from the del procedure.
321 --
322 -- In Parameters:
323 --   A Pl/Sql record structure.
324 --
325 -- Post Success:
326 --   Processing continues.
327 --
328 -- Post Failure:
329 --   If an error has occurred, an error message and exception will be raised
330 --   but not handled.
331 --
332 -- Developer Implementation Notes:
333 --   Any post-processing required after the delete dml is issued should be
334 --   coded within this procedure. It is important to note that any 3rd party
335 --   maintenance should be reviewed before placing in this procedure.
336 --
337 -- Access Status:
338 --   Internal Row Handler Use Only.
339 --
340 -- {End Of Comments}
341 -- ----------------------------------------------------------------------------
342 Procedure post_delete
343   (p_rec                   in pay_pay_shd.g_rec_type
344   ,p_effective_date        in date
345   ,p_datetrack_mode        in varchar2
346   ,p_validation_start_date in date
347   ,p_validation_end_date   in date
348   ) is
352 Begin
349 --
350   l_proc        varchar2(72) := g_package||'post_delete';
351 --
353   --
354   hr_utility.set_location('Entering:'||l_proc, 5);
355    begin
356     --
360       (p_effective_date
357     -- Following call to a procedure Maintains payroll related tables on deletion of a payroll.
358     --
359     pay_pay_rkd.after_delete
361       => p_effective_date
362       ,p_datetrack_mode
363       => p_datetrack_mode
364       ,p_validation_start_date
365       => p_validation_start_date
366       ,p_validation_end_date
367       => p_validation_end_date
368       ,p_payroll_id
369       => p_rec.payroll_id
370       ,p_effective_start_date
371       => p_rec.effective_start_date
372       ,p_effective_end_date
373       => p_rec.effective_end_date
374       ,p_effective_start_date_o
375       => pay_pay_shd.g_old_rec.effective_start_date
376       ,p_effective_end_date_o
377       => pay_pay_shd.g_old_rec.effective_end_date
378       ,p_default_payment_method_id_o
379       => pay_pay_shd.g_old_rec.default_payment_method_id
380       ,p_business_group_id_o
381       => pay_pay_shd.g_old_rec.business_group_id
382       ,p_consolidation_set_id_o
383       => pay_pay_shd.g_old_rec.consolidation_set_id
384       ,p_cost_allocation_keyflex_id_o
385       => pay_pay_shd.g_old_rec.cost_allocation_keyflex_id
386       ,p_suspense_account_keyflex_i_o
387       => pay_pay_shd.g_old_rec.suspense_account_keyflex_id
388       ,p_gl_set_of_books_id_o
389       => pay_pay_shd.g_old_rec.gl_set_of_books_id
390       ,p_soft_coding_keyflex_id_o
391       => pay_pay_shd.g_old_rec.soft_coding_keyflex_id
392       ,p_period_type_o
393       => pay_pay_shd.g_old_rec.period_type
394       ,p_organization_id_o
395       => pay_pay_shd.g_old_rec.organization_id
396       ,p_cut_off_date_offset_o
397       => pay_pay_shd.g_old_rec.cut_off_date_offset
398       ,p_direct_deposit_date_offset_o
399       => pay_pay_shd.g_old_rec.direct_deposit_date_offset
400       ,p_first_period_end_date_o
401       => pay_pay_shd.g_old_rec.first_period_end_date
402       ,p_negative_pay_allowed_flag_o
403       => pay_pay_shd.g_old_rec.negative_pay_allowed_flag
404       ,p_number_of_years_o
405       => pay_pay_shd.g_old_rec.number_of_years
406       ,p_pay_advice_date_offset_o
407       => pay_pay_shd.g_old_rec.pay_advice_date_offset
408       ,p_pay_date_offset_o
409       => pay_pay_shd.g_old_rec.pay_date_offset
410       ,p_payroll_name_o
411       => pay_pay_shd.g_old_rec.payroll_name
412       ,p_workload_shifting_level_o
413       => pay_pay_shd.g_old_rec.workload_shifting_level
414       ,p_comment_id_o
415       => pay_pay_shd.g_old_rec.comment_id
416       ,p_comments_o
417       => pay_pay_shd.g_old_rec.comments
418       ,p_midpoint_offset_o
419       => pay_pay_shd.g_old_rec.midpoint_offset
420       ,p_attribute_category_o
421       => pay_pay_shd.g_old_rec.attribute_category
422       ,p_attribute1_o
423       => pay_pay_shd.g_old_rec.attribute1
424       ,p_attribute2_o
425       => pay_pay_shd.g_old_rec.attribute2
426       ,p_attribute3_o
427       => pay_pay_shd.g_old_rec.attribute3
428       ,p_attribute4_o
429       => pay_pay_shd.g_old_rec.attribute4
430       ,p_attribute5_o
431       => pay_pay_shd.g_old_rec.attribute5
432       ,p_attribute6_o
433       => pay_pay_shd.g_old_rec.attribute6
434       ,p_attribute7_o
435       => pay_pay_shd.g_old_rec.attribute7
436       ,p_attribute8_o
437       => pay_pay_shd.g_old_rec.attribute8
438       ,p_attribute9_o
439       => pay_pay_shd.g_old_rec.attribute9
440       ,p_attribute10_o
441       => pay_pay_shd.g_old_rec.attribute10
442       ,p_attribute11_o
443       => pay_pay_shd.g_old_rec.attribute11
444       ,p_attribute12_o
445       => pay_pay_shd.g_old_rec.attribute12
446       ,p_attribute13_o
447       => pay_pay_shd.g_old_rec.attribute13
448       ,p_attribute14_o
449       => pay_pay_shd.g_old_rec.attribute14
450       ,p_attribute15_o
451       => pay_pay_shd.g_old_rec.attribute15
452       ,p_attribute16_o
453       => pay_pay_shd.g_old_rec.attribute16
454       ,p_attribute17_o
455       => pay_pay_shd.g_old_rec.attribute17
456       ,p_attribute18_o
457       => pay_pay_shd.g_old_rec.attribute18
458       ,p_attribute19_o
459       => pay_pay_shd.g_old_rec.attribute19
460       ,p_attribute20_o
461       => pay_pay_shd.g_old_rec.attribute20
462       ,p_arrears_flag_o
463       => pay_pay_shd.g_old_rec.arrears_flag
464       ,p_payroll_type_o
465       => pay_pay_shd.g_old_rec.payroll_type
466       ,p_prl_information_category_o
467       => pay_pay_shd.g_old_rec.prl_information_category
468       ,p_prl_information1_o
469       => pay_pay_shd.g_old_rec.prl_information1
470       ,p_prl_information2_o
471       => pay_pay_shd.g_old_rec.prl_information2
472       ,p_prl_information3_o
473       => pay_pay_shd.g_old_rec.prl_information3
474       ,p_prl_information4_o
475       => pay_pay_shd.g_old_rec.prl_information4
476       ,p_prl_information5_o
477       => pay_pay_shd.g_old_rec.prl_information5
478       ,p_prl_information6_o
479       => pay_pay_shd.g_old_rec.prl_information6
480       ,p_prl_information7_o
481       => pay_pay_shd.g_old_rec.prl_information7
482       ,p_prl_information8_o
483       => pay_pay_shd.g_old_rec.prl_information8
484       ,p_prl_information9_o
485       => pay_pay_shd.g_old_rec.prl_information9
486       ,p_prl_information10_o
487       => pay_pay_shd.g_old_rec.prl_information10
488       ,p_prl_information11_o
489       => pay_pay_shd.g_old_rec.prl_information11
490       ,p_prl_information12_o
491       => pay_pay_shd.g_old_rec.prl_information12
492       ,p_prl_information13_o
493       => pay_pay_shd.g_old_rec.prl_information13
494       ,p_prl_information14_o
498       ,p_prl_information16_o
495       => pay_pay_shd.g_old_rec.prl_information14
496       ,p_prl_information15_o
497       => pay_pay_shd.g_old_rec.prl_information15
499       => pay_pay_shd.g_old_rec.prl_information16
500       ,p_prl_information17_o
501       => pay_pay_shd.g_old_rec.prl_information17
502       ,p_prl_information18_o
503       => pay_pay_shd.g_old_rec.prl_information18
504       ,p_prl_information19_o
505       => pay_pay_shd.g_old_rec.prl_information19
506       ,p_prl_information20_o
507       => pay_pay_shd.g_old_rec.prl_information20
508       ,p_prl_information21_o
509       => pay_pay_shd.g_old_rec.prl_information21
510       ,p_prl_information22_o
511       => pay_pay_shd.g_old_rec.prl_information22
512       ,p_prl_information23_o
516       ,p_prl_information25_o
513       => pay_pay_shd.g_old_rec.prl_information23
514       ,p_prl_information24_o
515       => pay_pay_shd.g_old_rec.prl_information24
517       => pay_pay_shd.g_old_rec.prl_information25
518       ,p_prl_information26_o
519       => pay_pay_shd.g_old_rec.prl_information26
520       ,p_prl_information27_o
521       => pay_pay_shd.g_old_rec.prl_information27
522       ,p_prl_information28_o
523       => pay_pay_shd.g_old_rec.prl_information28
524       ,p_prl_information29_o
525       => pay_pay_shd.g_old_rec.prl_information29
526       ,p_prl_information30_o
527       => pay_pay_shd.g_old_rec.prl_information30
528       ,p_multi_assignments_flag_o
529       => pay_pay_shd.g_old_rec.multi_assignments_flag
530       ,p_period_reset_years_o
531       => pay_pay_shd.g_old_rec.period_reset_years
532       ,p_object_version_number_o
533       => pay_pay_shd.g_old_rec.object_version_number
534       ,p_payslip_view_date_offset_o
535       => pay_pay_shd.g_old_rec.payslip_view_date_offset
536       );
537     --
538   exception
539     --
540     when hr_api.cannot_find_prog_unit then
541       --
542       hr_api.cannot_find_prog_unit_error
543         (p_module_name => 'PAY_ALL_PAYROLLS_F'
544         ,p_hook_type   => 'AD');
545       --
546   end;
547   --
548   hr_utility.set_location(' Leaving:'||l_proc, 10);
549   --
550 End post_delete;
551 --
552 -- ----------------------------------------------------------------------------
556   (p_effective_date in     date
553 -- |---------------------------------< del >----------------------------------|
554 -- ----------------------------------------------------------------------------
555 Procedure del
557   ,p_datetrack_mode in     varchar2
558   ,p_rec            in out nocopy pay_pay_shd.g_rec_type
559   ) is
560 --
561   l_proc                        varchar2(72) := g_package||'del';
562   l_validation_start_date       date;
563   l_validation_end_date         date;
564 --
565 Begin
566   --
567   hr_utility.set_location('Entering:'||l_proc, 5);
568   --
569   -- Ensure that the DateTrack delete mode is valid
570   --
571   dt_api.validate_dt_del_mode(p_datetrack_mode => p_datetrack_mode);
572   --
573   -- We must lock the row which we need to delete.
574   --
575   --
576   pay_pay_shd.lck
577     (p_effective_date                   => p_effective_date
578     ,p_datetrack_mode                   => p_datetrack_mode
579     ,p_payroll_id                       => p_rec.payroll_id
580     ,p_object_version_number            => p_rec.object_version_number
581     ,p_validation_start_date            => l_validation_start_date
582     ,p_validation_end_date              => l_validation_end_date
583     );
584   --
585   pay_pay_bus.delete_validate
586     (p_rec                              => p_rec
587     ,p_effective_date                   => p_effective_date
588     ,p_datetrack_mode                   => p_datetrack_mode
589     ,p_validation_start_date            => l_validation_start_date
590     ,p_validation_end_date              => l_validation_end_date
591     );
592   --
593   -- Call to raise any errors on multi-message list
594   hr_multi_message.end_validation_set;
595   --
596   -- Call the supporting pre-delete operation
597   --
598   pay_pay_del.pre_delete
599     (p_rec                              => p_rec
600     ,p_effective_date                   => p_effective_date
601     ,p_datetrack_mode                   => p_datetrack_mode
602     ,p_validation_start_date            => l_validation_start_date
603     ,p_validation_end_date              => l_validation_end_date
604     );
605   --
606   -- Delete the row.
607   --
608   pay_pay_del.delete_dml
609     (p_rec                              => p_rec
610     ,p_effective_date                   => p_effective_date
611     ,p_datetrack_mode                   => p_datetrack_mode
612     ,p_validation_start_date            => l_validation_start_date
613     ,p_validation_end_date              => l_validation_end_date
614     );
615   -- Call the supporting post-delete operation
616   --
617   pay_pay_del.post_delete
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   --
625   -- Call to raise any errors on multi-message list
626   hr_multi_message.end_validation_set;
627   --
628   hr_utility.set_location(' Leaving:'||l_proc, 5);
629 End del;
630 --
631 -- ----------------------------------------------------------------------------
632 -- |--------------------------------< del >-----------------------------------|
633 -- ----------------------------------------------------------------------------
634 Procedure del
635   (p_effective_date                   in     date
636   ,p_datetrack_mode                   in     varchar2
637   ,p_payroll_id                       in     number
638   ,p_object_version_number            in out nocopy number
639   ,p_effective_start_date                out nocopy date
640   ,p_effective_end_date                  out nocopy date
641   ) is
642 --
643   l_rec         pay_pay_shd.g_rec_type;
644   l_proc        varchar2(72) := g_package||'del';
645 --
646 Begin
647   hr_utility.set_location('Entering:'||l_proc, 5);
648   --
649   -- As the delete procedure accepts a plsql record structure we do need to
650   -- convert the  arguments into the record structure.
651   -- We don't need to call the supplied conversion argument routine as we
652   -- only need a few attributes.
653   --
654   l_rec.payroll_id          := p_payroll_id;
655   l_rec.object_version_number     := p_object_version_number;
656   --
657   -- Having converted the arguments into the pay_pay_rec
658   -- plsql record structure we must call the corresponding entity
659   -- business process
660   --
661   pay_pay_del.del
662      (p_effective_date
663      ,p_datetrack_mode
664      ,l_rec
665      );
666   --
667   -- Set the out arguments
668   --
669   p_object_version_number            := l_rec.object_version_number;
670   p_effective_start_date             := l_rec.effective_start_date;
671   p_effective_end_date               := l_rec.effective_end_date;
672   --
673   hr_utility.set_location(' Leaving:'||l_proc, 10);
674 End del;
675 --
676 end pay_pay_del;