DBA Data[Home] [Help]
Skip to content

PACKAGE BODY: APPS.PAY_PPM_DEL

Source


1 Package Body pay_ppm_del as
2 /* $Header: pyppmrhi.pkb 120.3.12010000.5 2010/03/30 06:46:19 priupadh ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  pay_ppm_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 -- Pre Conditions:
29 --   This is an internal private procedure which must be called from the
30 --   delete_dml procedure.
31 --
32 -- In Arguments:
33 --   A Pl/Sql record structre.
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 Table Handler Use Only.
50 --
51 -- {End Of Comments}
52 -- ----------------------------------------------------------------------------
53 Procedure dt_delete_dml
54 	(p_rec 			 in out nocopy pay_ppm_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) is
59 --
60   l_proc	varchar2(72) := g_package||'dt_delete_dml';
61 --
62 Begin
63   hr_utility.set_location('Entering:'||l_proc, 5);
64   If (p_datetrack_mode = 'DELETE_NEXT_CHANGE') then
65     hr_utility.set_location(l_proc, 10);
66     pay_ppm_shd.g_api_dml := true;  -- Set the api dml status
67     --
68     -- Delete the where the effective start date is equal
69     -- to the validation end date.
70     --
71     delete from pay_personal_payment_methods_f
72     where       personal_payment_method_id = p_rec.personal_payment_method_id
73     and	  effective_start_date = p_validation_start_date;
74     --
75     pay_ppm_shd.g_api_dml := false;   -- Unset the api dml status
76   Else
77     hr_utility.set_location(l_proc, 15);
78     pay_ppm_shd.g_api_dml := true;  -- Set the api dml status
79     --
80     -- Delete the row(s) where the effective start date is greater than
81     -- or equal to the validation start date.
82     --
83     delete from pay_personal_payment_methods_f
84     where        personal_payment_method_id = p_rec.personal_payment_method_id
85     and	  effective_start_date >= p_validation_start_date;
86     --
87     pay_ppm_shd.g_api_dml := false;   -- Unset the api dml status
88   End If;
89   --
90   -- If we are doing a 'ZAP' then we must set the effective start and end
91   -- dates to null
92   --
93   hr_utility.set_location(' Leaving:'||l_proc, 20);
94 --
95 Exception
96   When Others Then
97     pay_ppm_shd.g_api_dml := false;   -- Unset the api dml status
98     Raise;
99 End dt_delete_dml;
100 --
101 -- ----------------------------------------------------------------------------
102 -- |------------------------------< delete_dml >------------------------------|
103 -- ----------------------------------------------------------------------------
104 Procedure delete_dml
105 	(p_rec 			 in out nocopy pay_ppm_shd.g_rec_type,
106 	 p_effective_date	 in	date,
107 	 p_datetrack_mode	 in	varchar2,
108 	 p_validation_start_date in	date,
109 	 p_validation_end_date	 in	date) is
110 --
111   l_proc	varchar2(72) := g_package||'delete_dml';
112 --
113 Begin
114   hr_utility.set_location('Entering:'||l_proc, 5);
115   --
116   dt_delete_dml(p_rec			=> p_rec,
117 		p_effective_date	=> p_effective_date,
118 		p_datetrack_mode	=> p_datetrack_mode,
119        		p_validation_start_date	=> p_validation_start_date,
123 End delete_dml;
120 		p_validation_end_date	=> p_validation_end_date);
121   --
122   hr_utility.set_location(' Leaving:'||l_proc, 10);
124 --
125 -- ----------------------------------------------------------------------------
126 -- |----------------------------< dt_pre_delete >-----------------------------|
127 -- ----------------------------------------------------------------------------
128 -- {Start Of Comments}
129 --
130 -- Description:
131 --   The dt_pre_delete process controls the execution of dml
132 --   for the datetrack modes: DELETE, FUTURE_CHANGE
133 --   and DELETE_NEXT_CHANGE only.
134 --
135 -- Pre Conditions:
136 --   This is an internal procedure which is called from the pre_delete
137 --   procedure.
138 --
139 -- In Arguments:
140 --   A Pl/Sql record structre.
141 --
142 -- Post Success:
143 --   Processing continues.
144 --
145 -- Post Failure:
146 --   If an error has occurred, an error message and exception will be raised
147 --   but not handled.
148 --
149 -- Developer Implementation Notes:
150 --   This is an internal procedure which is required by Datetrack. Don't
151 --   remove or modify.
152 --
153 -- Access Status:
154 --   Internal Table Handler Use Only.
155 --
156 -- {End Of Comments}
157 -- ----------------------------------------------------------------------------
158 Procedure dt_pre_delete
159 	(p_rec 			 in out nocopy pay_ppm_shd.g_rec_type,
160 	 p_effective_date	 in	date,
161 	 p_datetrack_mode	 in	varchar2,
162 	 p_validation_start_date in	date,
163 	 p_validation_end_date	 in	date) is
164 --
165   l_proc	varchar2(72) := g_package||'dt_pre_delete';
166 --
167 Begin
168   hr_utility.set_location('Entering:'||l_proc, 5);
169   --
170  If (p_datetrack_mode <> 'ZAP') then
171    --
172    p_rec.effective_start_date :=
173       pay_ppm_shd.g_old_rec.effective_start_date;
174    --
175    If (p_datetrack_mode = 'DELETE') then
176      p_rec.effective_end_date := p_validation_start_date - 1;
177    Else
178      p_rec.effective_end_date := p_validation_end_date;
179    End If;
180    --
181    -- Update the current effective end date record
182    --
183    pay_ppm_shd.upd_effective_end_date
184      (p_effective_date	        => p_effective_date,
185       p_base_key_value	        => p_rec.personal_payment_method_id,
186       p_new_effective_end_date  => p_rec.effective_end_date,
187       p_validation_start_date   => p_validation_start_date,
188       p_validation_end_date	=> p_validation_end_date,
189       p_object_version_number   => p_rec.object_version_number);
190   Else
191     p_rec.effective_start_date := null;
192     p_rec.effective_end_date := null;
193   End If;
194   hr_utility.set_location(' Leaving:'||l_proc, 10);
195 End dt_pre_delete;
196 --
197 -- ----------------------------------------------------------------------------
198 -- |------------------------------< pre_delete >------------------------------|
199 -- ----------------------------------------------------------------------------
200 -- {Start Of Comments}
201 --
202 -- Description:
203 --   This private procedure contains any processing which is required before
204 --   the delete dml.
205 --
206 -- Pre Conditions:
207 --   This is an internal procedure which is called from the del procedure.
208 --
209 -- In Arguments:
210 --   A Pl/Sql record structre.
211 --
212 -- Post Success:
213 --   Processing continues.
214 --
215 -- Post Failure:
216 --   If an error has occurred, an error message and exception will be raised
217 --   but not handled.
218 --
219 -- Developer Implementation Notes:
220 --   Any pre-processing required before the delete dml is issued should be
221 --   coded within this procedure. It is important to note that any 3rd party
222 --   maintenance should be reviewed before placing in this procedure. The call
223 --   to the dt_delete_dml procedure should NOT be removed.
224 --
225 -- Access Status:
226 --   Internal Table Handler Use Only.
227 --
228 -- {End Of Comments}
229 -- ----------------------------------------------------------------------------
230 Procedure pre_delete
231 	(p_rec 			 in out nocopy pay_ppm_shd.g_rec_type,
232 	 p_effective_date	 in	date,
233 	 p_datetrack_mode	 in	varchar2,
234 	 p_validation_start_date in	date,
235 	 p_validation_end_date	 in	date) is
236 --
237   l_proc	varchar2(72) := g_package||'pre_delete';
238 --
239   -- Cursor C_Sel1 select comments to be deleted
240   --
241   Cursor C_Sel1 is
242     /*Added DISTINCT as comment_id is not date-tracked in PAY_PERSONAL_PAYMENT_METHODS_F.
243       Absence of DISTINCT causing locking contention due to locking same row of
244       HR_COMMENTS for multiple times in case of ZAP operation.Bug#9358129.*/
245     select DISTINCT t1.comment_id
246     from   pay_personal_payment_methods_f t1
247     where  t1.comment_id is not null
248     and    t1.personal_payment_method_id = p_rec.personal_payment_method_id
249     and    t1.effective_start_date <= p_validation_end_date
250     and    t1.effective_end_date   >= p_validation_start_date
251     and    not exists
252            (select 1
253             from   pay_personal_payment_methods_f t2
254             where  t2.comment_id = t1.comment_id
255             and    t2.personal_payment_method_id = t1.personal_payment_method_id
256 
257             and   (t2.effective_start_date > p_validation_end_date
258              or    t2.effective_end_date   < p_validation_start_date));
259   --
260 --
261 Begin
262   hr_utility.set_location('Entering:'||l_proc, 5);
263   --
267   If p_datetrack_mode = 'ZAP' then
264   -- Bug 9358415-- Only delete comments when datetrack mode is ZAP
265   -- Delete any possible comments
266   --
268     For Comm_Del In C_Sel1 Loop
269       hr_comm_api.del(p_comment_id        => Comm_Del.comment_id);
270     End Loop;
271   End if;
272   --
273   dt_pre_delete
274     (p_rec 		     => p_rec,
275      p_effective_date	     => p_effective_date,
276      p_datetrack_mode	     => p_datetrack_mode,
277      p_validation_start_date => p_validation_start_date,
278      p_validation_end_date   => p_validation_end_date);
279   --
280   hr_utility.set_location(' Leaving:'||l_proc, 10);
281 End pre_delete;
282 --
283 -- ----------------------------------------------------------------------------
284 -- |-----------------------------< post_delete >------------------------------|
285 -- ----------------------------------------------------------------------------
286 -- {Start Of Comments}
287 --
288 -- Description:
289 --   This private procedure contains any processing which is required after the
290 --   delete dml.
291 --
292 -- Pre Conditions:
293 --   This is an internal procedure which is called from the del procedure.
294 --
295 -- In Arguments:
296 --   A Pl/Sql record structre.
297 --
298 -- Post Success:
299 --   Processing continues.
300 --
301 -- Post Failure:
302 --   If an error has occurred, an error message and exception will be raised
303 --   but not handled.
304 --
305 -- Developer Implementation Notes:
306 --   Any post-processing required after the delete dml is issued should be
307 --   coded within this procedure. It is important to note that any 3rd party
308 --   maintenance should be reviewed before placing in this procedure.
309 --
310 -- Access Status:
311 --   Internal Table Handler Use Only.
312 --
313 -- {End Of Comments}
314 -- ----------------------------------------------------------------------------
315 Procedure post_delete
316 	(p_rec 			 in pay_ppm_shd.g_rec_type,
317 	 p_effective_date	 in date,
318 	 p_datetrack_mode	 in varchar2,
319 	 p_validation_start_date in date,
320 	 p_validation_end_date	 in date) is
321 --
322   l_proc	varchar2(72) := g_package||'post_delete';
323 --
324 Begin
325   hr_utility.set_location('Entering:'||l_proc, 5);
326   --
327   -- Start of API User Hook for post_delete.
328   begin
329     pay_ppm_rkd.after_delete
330       (p_effective_date                 => p_effective_date
331       ,p_datetrack_mode                 => p_datetrack_mode
332       ,p_validation_start_date          => p_validation_start_date
333       ,p_validation_end_date            => p_validation_end_date
334       ,p_personal_payment_method_id     => p_rec.personal_payment_method_id
335       ,p_effective_start_date           => p_rec.effective_start_date
336       ,p_effective_end_date             => p_rec.effective_end_date
337       ,p_object_version_number          => p_rec.object_version_number
338       ,p_effective_start_date_o
339           => pay_ppm_shd.g_old_rec.effective_start_date
340       ,p_effective_end_date_o
341           => pay_ppm_shd.g_old_rec.effective_end_date
342       ,p_business_group_id_o
343           => pay_ppm_shd.g_old_rec.business_group_id
344       ,p_external_account_id_o
345           => pay_ppm_shd.g_old_rec.external_account_id
346       ,p_assignment_id_o
347           => pay_ppm_shd.g_old_rec.assignment_id
348       ,p_org_payment_method_id_o
349           => pay_ppm_shd.g_old_rec.org_payment_method_id
350       ,p_amount_o
351           => pay_ppm_shd.g_old_rec.amount
352       ,p_comment_id_o
353           => pay_ppm_shd.g_old_rec.comment_id
354       ,p_percentage_o
355           => pay_ppm_shd.g_old_rec.percentage
356       ,p_priority_o
357           => pay_ppm_shd.g_old_rec.priority
358       ,p_attribute_category_o
359           => pay_ppm_shd.g_old_rec.attribute_category
360       ,p_attribute1_o
361           => pay_ppm_shd.g_old_rec.attribute1
362       ,p_attribute2_o
363           => pay_ppm_shd.g_old_rec.attribute2
364       ,p_attribute3_o
365           => pay_ppm_shd.g_old_rec.attribute3
366       ,p_attribute4_o
367           => pay_ppm_shd.g_old_rec.attribute4
368       ,p_attribute5_o
369           => pay_ppm_shd.g_old_rec.attribute5
370       ,p_attribute6_o
371           => pay_ppm_shd.g_old_rec.attribute6
372       ,p_attribute7_o
373           => pay_ppm_shd.g_old_rec.attribute7
374       ,p_attribute8_o
375           => pay_ppm_shd.g_old_rec.attribute8
376       ,p_attribute9_o
377           => pay_ppm_shd.g_old_rec.attribute9
378       ,p_attribute10_o
379           => pay_ppm_shd.g_old_rec.attribute10
380       ,p_attribute11_o
381           => pay_ppm_shd.g_old_rec.attribute11
382       ,p_attribute12_o
383           => pay_ppm_shd.g_old_rec.attribute12
384       ,p_attribute13_o
385           => pay_ppm_shd.g_old_rec.attribute13
386       ,p_attribute14_o
387           => pay_ppm_shd.g_old_rec.attribute14
388       ,p_attribute15_o
389           => pay_ppm_shd.g_old_rec.attribute15
390       ,p_attribute16_o
391           => pay_ppm_shd.g_old_rec.attribute16
392       ,p_attribute17_o
393           => pay_ppm_shd.g_old_rec.attribute17
394       ,p_attribute18_o
395           => pay_ppm_shd.g_old_rec.attribute18
396       ,p_attribute19_o
397           => pay_ppm_shd.g_old_rec.attribute19
398       ,p_attribute20_o
399           => pay_ppm_shd.g_old_rec.attribute20
400       ,p_object_version_number_o
401           => pay_ppm_shd.g_old_rec.object_version_number
402       ,p_payee_type_o
403           => pay_ppm_shd.g_old_rec.payee_type
407           => pay_ppm_shd.g_old_rec.ppm_information_category
404       ,p_payee_id_o
405           => pay_ppm_shd.g_old_rec.payee_id
406       ,p_ppm_information_category_o
408       ,p_ppm_information1_o
409           => pay_ppm_shd.g_old_rec.ppm_information1
410       ,p_ppm_information2_o
411           => pay_ppm_shd.g_old_rec.ppm_information2
412       ,p_ppm_information3_o
413           => pay_ppm_shd.g_old_rec.ppm_information3
414       ,p_ppm_information4_o
415           => pay_ppm_shd.g_old_rec.ppm_information4
416       ,p_ppm_information5_o
417           => pay_ppm_shd.g_old_rec.ppm_information5
418       ,p_ppm_information6_o
419           => pay_ppm_shd.g_old_rec.ppm_information6
420       ,p_ppm_information7_o
421           => pay_ppm_shd.g_old_rec.ppm_information7
422       ,p_ppm_information8_o
423           => pay_ppm_shd.g_old_rec.ppm_information8
424       ,p_ppm_information9_o
425           => pay_ppm_shd.g_old_rec.ppm_information9
426       ,p_ppm_information10_o
427           => pay_ppm_shd.g_old_rec.ppm_information10
428       ,p_ppm_information11_o
429           => pay_ppm_shd.g_old_rec.ppm_information11
430       ,p_ppm_information12_o
431           => pay_ppm_shd.g_old_rec.ppm_information12
432       ,p_ppm_information13_o
433           => pay_ppm_shd.g_old_rec.ppm_information13
434       ,p_ppm_information14_o
435           => pay_ppm_shd.g_old_rec.ppm_information14
436       ,p_ppm_information15_o
437           => pay_ppm_shd.g_old_rec.ppm_information15
438       ,p_ppm_information16_o
439           => pay_ppm_shd.g_old_rec.ppm_information16
440       ,p_ppm_information17_o
441           => pay_ppm_shd.g_old_rec.ppm_information17
442       ,p_ppm_information18_o
443           => pay_ppm_shd.g_old_rec.ppm_information18
444       ,p_ppm_information19_o
445           => pay_ppm_shd.g_old_rec.ppm_information19
446       ,p_ppm_information20_o
447           => pay_ppm_shd.g_old_rec.ppm_information20
448       ,p_ppm_information21_o
449           => pay_ppm_shd.g_old_rec.ppm_information21
450       ,p_ppm_information22_o
451           => pay_ppm_shd.g_old_rec.ppm_information22
452       ,p_ppm_information23_o
453           => pay_ppm_shd.g_old_rec.ppm_information23
454       ,p_ppm_information24_o
455           => pay_ppm_shd.g_old_rec.ppm_information24
456       ,p_ppm_information25_o
457           => pay_ppm_shd.g_old_rec.ppm_information25
458       ,p_ppm_information26_o
459           => pay_ppm_shd.g_old_rec.ppm_information26
460       ,p_ppm_information27_o
461           => pay_ppm_shd.g_old_rec.ppm_information27
462       ,p_ppm_information28_o
463           => pay_ppm_shd.g_old_rec.ppm_information28
464       ,p_ppm_information29_o
465           => pay_ppm_shd.g_old_rec.ppm_information29
466       ,p_ppm_information30_o
467           => pay_ppm_shd.g_old_rec.ppm_information30
468       );
469   exception
470     when hr_api.cannot_find_prog_unit then
471       hr_api.cannot_find_prog_unit_error
472         (p_module_name => 'PAY_PERSONAL_PAYMENT_METHODS_F'
473         ,p_hook_type   => 'AD'
474         );
475   end;
476   -- End of API User Hook for post_delete.
477   --
478   hr_utility.set_location(' Leaving:'||l_proc, 10);
479 End post_delete;
480 --
481 -- ----------------------------------------------------------------------------
482 -- |---------------------------------< del >----------------------------------|
483 -- ----------------------------------------------------------------------------
484 Procedure del
485   (
486   p_rec			in out 	nocopy pay_ppm_shd.g_rec_type,
487   p_effective_date	in 	date,
488   p_datetrack_mode	in 	varchar2,
489   p_validate   		in 	boolean default false
490   ) is
491 --
492   l_proc			varchar2(72) := g_package||'del';
493   l_validation_start_date	date;
494   l_validation_end_date		date;
495 --
496 Begin
497   hr_utility.set_location('Entering:'||l_proc, 5);
498   --
499   -- Ensure that the DateTrack delete mode is valid
500   --
501   dt_api.validate_dt_del_mode(p_datetrack_mode => p_datetrack_mode);
502   --
503   -- Determine if the business process is to be validated.
504   --
505   If p_validate then
506     --
507     -- Issue the savepoint.
508     --
509     SAVEPOINT del_pay_ppm;
510   End If;
511   --
512   -- We must lock the row which we need to delete.
513   --
514   pay_ppm_shd.lck
515 	(p_effective_date	 => p_effective_date,
516       	 p_datetrack_mode	 => p_datetrack_mode,
517       	 p_personal_payment_method_id	 => p_rec.personal_payment_method_id,
518       	 p_object_version_number => p_rec.object_version_number,
519       	 p_validation_start_date => l_validation_start_date,
520       	 p_validation_end_date	 => l_validation_end_date);
521   --
522   -- Return the effective end date
523   --
524   l_validation_end_date := pay_ppm_bus.return_effective_end_date
525         (p_datetrack_mode              =>  p_datetrack_mode
526         ,p_effective_date              =>  p_effective_date
527         ,p_org_payment_method_id       =>
528 	   pay_ppm_shd.g_old_rec.org_payment_method_id
529         ,p_business_group_id           =>
530 	   pay_ppm_shd.g_old_rec.business_group_id
531         ,p_personal_payment_method_id  =>
532 	   pay_ppm_shd.g_old_rec.personal_payment_method_id
533         ,p_assignment_id               =>
534 	   pay_ppm_shd.g_old_rec.assignment_id
535         ,p_run_type_id               =>
536 	   pay_ppm_shd.g_old_rec.run_type_id
537         ,p_priority                    =>
538 	   pay_ppm_shd.g_old_rec.priority
539         ,p_validation_start_date       =>  l_validation_start_date
540         ,p_validation_end_date         =>  l_validation_end_date
541         );
542   --
543   -- Call the supporting delete validate operation
544   --
545   pay_ppm_bus.delete_validate
546 	(p_rec			 => p_rec,
547 	 p_effective_date	 => p_effective_date,
548 	 p_datetrack_mode	 => p_datetrack_mode,
549 	 p_validation_start_date => l_validation_start_date,
550 	 p_validation_end_date	 => l_validation_end_date);
551   --
552   -- Call the supporting pre-delete operation
553   --
554   pre_delete
555 	(p_rec			 => p_rec,
556 	 p_effective_date	 => p_effective_date,
557 	 p_datetrack_mode	 => p_datetrack_mode,
558 	 p_validation_start_date => l_validation_start_date,
559 	 p_validation_end_date	 => l_validation_end_date);
560   --
561   -- Delete the row.
562   --
563   delete_dml
564 	(p_rec			 => p_rec,
565 	 p_effective_date	 => p_effective_date,
566 	 p_datetrack_mode	 => p_datetrack_mode,
567 	 p_validation_start_date => l_validation_start_date,
568 	 p_validation_end_date	 => l_validation_end_date);
569   --
570   -- Call the supporting post-delete operation
571   --
572   post_delete
573 	(p_rec			 => p_rec,
574 	 p_effective_date	 => p_effective_date,
575 	 p_datetrack_mode	 => p_datetrack_mode,
576 	 p_validation_start_date => l_validation_start_date,
577 	 p_validation_end_date	 => l_validation_end_date);
578   --
579   -- If we are validating then raise the Validate_Enabled exception
580   --
581   If p_validate then
582     Raise HR_Api.Validate_Enabled;
583   End If;
584   --
585   hr_utility.set_location(' Leaving:'||l_proc, 10);
586 Exception
587   When HR_Api.Validate_Enabled Then
588     --
589     -- As the Validate_Enabled exception has been raised
590     -- we must rollback to the savepoint
591     --
592     ROLLBACK TO del_pay_ppm;
593 End del;
594 --
595 -- ----------------------------------------------------------------------------
596 -- |---------------------------------< del >----------------------------------|
597 -- ----------------------------------------------------------------------------
598 Procedure del
599   (
600   p_personal_payment_method_id	  in 	 number,
601   p_effective_start_date     out nocopy date,
602   p_effective_end_date	     out nocopy date,
603   p_object_version_number in out nocopy number,
604   p_effective_date	  in     date,
605   p_datetrack_mode  	  in     varchar2,
606   p_validate		  in     boolean default false
607   ) is
608 --
609   l_rec		pay_ppm_shd.g_rec_type;
610   l_proc	varchar2(72) := g_package||'del';
611 --
612 Begin
613   hr_utility.set_location('Entering:'||l_proc, 5);
614   --
615   -- As the delete procedure accepts a plsql record structure we do need to
616   -- convert the  arguments into the record structure.
617   -- We don't need to call the supplied conversion argument routine as we
618   -- only need a few attributes.
619   --
620   l_rec.personal_payment_method_id		:= p_personal_payment_method_id;
621   l_rec.object_version_number 	:= p_object_version_number;
622   --
623   -- Having converted the arguments into the pay_ppm_rec
624   -- plsql record structure we must call the corresponding entity
625   -- business process
626   --
627   del(l_rec, p_effective_date, p_datetrack_mode, p_validate);
628   --
629   -- Set the out arguments
630   --
631   p_object_version_number := l_rec.object_version_number;
632   p_effective_start_date  := l_rec.effective_start_date;
633   p_effective_end_date    := l_rec.effective_end_date;
634   --
635   hr_utility.set_location(' Leaving:'||l_proc, 10);
636 End del;
637 --
638 end pay_ppm_del;