DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_REI_BUS

Source


1 Package Body per_rei_bus as
2 /* $Header: pereirhi.pkb 115.6 2003/10/07 19:01:25 ttagawa noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  per_rei_bus.';  -- Global package name
9 --
10 -- The following two global variables are only to be
11 -- used by the return_legislation_code function.
12 --
13 g_legislation_code            varchar2(150)  default null;
14 g_contact_extra_info_id       number         default null;
15 --
16 --  ---------------------------------------------------------------------------
17 --  |----------------------< set_security_group_id >--------------------------|
18 --  ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21   (p_contact_relationship_id	in number
22   ,p_associated_column1                   in varchar2 default null
23   ) is
24   --
25   -- Declare cursor
26   --
27   cursor csr_sec_grp is
28     select pbg.security_group_id
29       from per_business_groups pbg
30          , per_contact_relationships pcr
31      where pcr.contact_relationship_id = p_contact_relationship_id
32    AND pbg.business_group_id = pcr.business_group_id;
33   --
34   -- Declare local variables
35   --
36   l_security_group_id number;
37   l_proc              varchar2(72)  :=  g_package||'set_security_group_id';
38   --
39 begin
40   --
41   hr_utility.set_location('Entering:'|| l_proc, 10);
42   --
43   -- Ensure that all the mandatory parameter are not null
44   --
45   hr_api.mandatory_arg_error
46     (p_api_name           => l_proc
47     ,p_argument           => 'contact_relationship_id'
48     ,p_argument_value     => p_contact_relationship_id
49     );
50   --
51   open csr_sec_grp;
52   fetch csr_sec_grp into l_security_group_id;
53   --
54   if csr_sec_grp%notfound then
55      --
56      close csr_sec_grp;
57      --
58      -- The primary key is invalid therefore we must error
59      --
60      fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
61      hr_multi_message.add
62        (p_associated_column1
63          => nvl(p_associated_column1,'CONTACT_EXTRA_INFO_ID')
64        );
65      --
66   else
67     close csr_sec_grp;
68     --
69     -- Set the security_group_id in CLIENT_INFO
70     --
71     hr_api.set_security_group_id
72       (p_security_group_id => l_security_group_id
73       );
74   end if;
75   --
76   hr_utility.set_location(' Leaving:'|| l_proc, 20);
77   --
78 end set_security_group_id;
79 --
80 --  ---------------------------------------------------------------------------
81 --  |---------------------< return_legislation_code >-------------------------|
82 --  ---------------------------------------------------------------------------
83 --
84 Function return_legislation_code
85   (p_contact_extra_info_id                in     number
86   )
87   Return Varchar2 Is
88   --
89   -- Declare cursor
90   --
91   -- EDIT_HERE  In the following cursor statement add join(s) between
92   -- per_contact_extra_info_f and PER_BUSINESS_GROUPS
93   -- so that the legislation_code for
94   -- the current business group context can be derived.
95   -- Remove this comment when the edit has been completed.
96   cursor csr_leg_code is
97     select pbg.legislation_code
98       from per_business_groups_perf  pbg
102      and   ctr.contact_relationship_id = cei.contact_relationship_id
99          , per_contact_relationships ctr
100          , per_contact_extra_info_f  cei
101      where cei.contact_extra_info_id = p_contact_extra_info_id
103      and   pbg.business_group_id = ctr.business_group_id;
104   --
105   -- Declare local variables
106   --
107   l_legislation_code  varchar2(150);
108   l_proc              varchar2(72)  :=  g_package||'return_legislation_code';
109   --
110 Begin
111   --
112   hr_utility.set_location('Entering:'|| l_proc, 10);
113   --
114   -- Ensure that all the mandatory parameter are not null
115   --
116   hr_api.mandatory_arg_error
117     (p_api_name           => l_proc
118     ,p_argument           => 'contact_extra_info_id'
119     ,p_argument_value     => p_contact_extra_info_id
120     );
121   --
122   if ( nvl(per_rei_bus.g_contact_extra_info_id, hr_api.g_number)
123        = p_contact_extra_info_id) then
124     --
125     -- The legislation code has already been found with a previous
126     -- call to this function. Just return the value in the global
127     -- variable.
128     --
129     l_legislation_code := per_rei_bus.g_legislation_code;
130     hr_utility.set_location(l_proc, 20);
131   else
132     --
133     -- The ID is different to the last call to this function
134     -- or this is the first call to this function.
135     --
136     open csr_leg_code;
137     fetch csr_leg_code into l_legislation_code;
138     --
139     if csr_leg_code%notfound then
140       --
141       -- The primary key is invalid therefore we must error
142       --
143       close csr_leg_code;
144       fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
145       fnd_message.raise_error;
146     end if;
147     hr_utility.set_location(l_proc,30);
148     --
149     -- Set the global variables so the values are
150     -- available for the next call to this function.
151     --
152     close csr_leg_code;
153     per_rei_bus.g_contact_extra_info_id := p_contact_extra_info_id;
154     per_rei_bus.g_legislation_code  := l_legislation_code;
155   end if;
156   --
157   hr_utility.set_location(' Leaving:'|| l_proc, 40);
158   return l_legislation_code;
159 end return_legislation_code;
160 --
161 -- ----------------------------------------------------------------------------
162 -- |---------------------< chk_contact_relationship_id >----------------------|
163 -- ----------------------------------------------------------------------------
164 -- {Start Of Comments}
165 --
166 -- Description:
167 --   Verify that the value in p_contact_relationship_id is in the
168 --   per_contact_relationships table.
169 --
170 -- Pre Conditions:
171 --   None.
172 --
173 -- In Parameters:
174 --   Name                      Reqd Type	Description
175 --   p_contact_relationship_id Yes  NUMBER	Contact Releationship ID.
176 --
177 -- Post Success:
178 --   Processing continues.
179 --
180 -- Post Failure:
181 --   An application error will be raised and processing is terminated.
182 --
183 -- Developer Implementation Notes:
184 --   None.
185 --
186 -- Access Status:
187 --   Internal Table Handler Use Only.
188 --
189 -- {End Of Comments}
190 -- ----------------------------------------------------------------------------
191 PROCEDURE chk_contact_relationship_id(
192   p_contact_relationship_id	IN	per_contact_extra_info_f.contact_relationship_id%TYPE) IS
193 --
194   l_proc	VARCHAR2(72) := g_package || 'chk_contact_relationship_id';
195   l_dummy	VARCHAR2(1);
196 --
197   CURSOR c_valid_rel IS
198   SELECT 'x'
199   FROM   per_contact_relationships con
200   WHERE  con.contact_relationship_id = p_contact_relationship_id;
201 --
202 BEGIN
203   hr_utility.set_location('Entering:' || l_proc, 1);
204   --
205   -- Check mandatory parameters have been set
206   --
207   hr_api.mandatory_arg_error(
208    p_api_name       => l_proc,
209    p_argument       => 'contact_relationship_id',
210    p_argument_value => p_contact_relationship_id);
211   --
212   hr_utility.set_location(l_proc, 2);
213   --
214   -- Check that the contact_relationship_id is in the per_contact_relationships table.
215   --
216   OPEN c_valid_rel;
217   FETCH c_valid_rel INTO l_dummy;
218   IF c_valid_rel%NOTFOUND THEN
219     CLOSE c_valid_rel;
220     fnd_message.set_name('PER', 'HR_INV_REL_ID');
221     fnd_message.raise_error;
222   END IF;
223   CLOSE c_valid_rel;
224   --
225   hr_utility.set_location(' Leaving:' || l_proc, 3);
226 END chk_contact_relationship_id;
227 --
228 -- ----------------------------------------------------------------------------
229 -- |-------------------------< chk_information_type >-------------------------|
230 -- ----------------------------------------------------------------------------
231 -- {Start Of Comments}
232 --
233 -- Description:
234 --   Validates that the contact information type exists in table
235 --   per_contact_info_types where active_inactive_flag is 'Y'.
236 --
237 -- Pre Conditions:
238 --   Data must be existed in table per_contact_info_types.
239 --
240 -- In Parameters:
241 --   Name               Reqd    Type            Description
242 --   p_information_type Yes     VARCHAR2	Contact Information Type
243 --
244 -- Post Success:
245 --   Processing continues.
246 --
247 -- Post Failure:
248 --   An application error will be raised and processing is terminated.
249 --
250 -- Developer Implementation Notes:
254 --   Internal Table Handler Use Only.
251 --   None.
252 --
253 -- Access Status:
255 --
256 -- {End Of Comments}
257 -- ----------------------------------------------------------------------------
258 procedure chk_information_type(
259 	p_information_type		in varchar2,
260 	p_datetrack_mode		in varchar2,
261 	p_contact_relationship_id	in number,
262 	p_contact_extra_info_id		in number,
263 	p_validation_start_date		in date,
264 	p_validation_end_date		in out nocopy date)
265 is
266 	l_proc		VARCHAR2(72) := g_package || 'chk_information_type';
267 	l_dummy		varchar2(1);
268 	cursor csr_information_type is
269 		select	legislation_code,
270 			active_inactive_flag,
271 			multiple_occurences_flag
272 		from	per_contact_info_types
273 		where	information_type = p_information_type;
274 	l_rec		csr_information_type%rowtype;
275 	l_min_esd	date;
276 begin
277 	hr_utility.set_location('Entering:' || l_proc, 1);
278 	--
279 	-- Check mandatory parameters have been set
280 	--
281 	hr_api.mandatory_arg_error(
282 		p_api_name		=> l_proc,
283 		p_argument		=> 'information_type',
284 		p_argument_value	=> p_information_type);
285 	--
286 	-- "Multiple Occurences Flag" needs to be checked in the following datetrack modes.
287 	-- 1) INSERT
288 	-- 2) FUTURE_CHANGE (possibly extend effective_end_date)
289 	-- 3) DELETE_NEXT_CHANGE (possibly extend effective_end_date)
290 	--
291 	if p_datetrack_mode in (hr_api.g_insert, hr_api.g_future_change, hr_api.g_delete_next_change) then
292 		open csr_information_type;
293 		fetch csr_information_type into l_rec;
294 		if csr_information_type%notfound then
295 			close csr_information_type;
296 			fnd_message.set_name('PER', 'HR_INV_INFO_TYPE');
297 			fnd_message.raise_error;
298 		end if;
299 		close csr_information_type;
300 		--
301 		-- The following validation is only done when INSERTING
302 		--
303 		if p_datetrack_mode = hr_api.g_insert then
304 			--
305 			-- Check the information_type is available in current legislation.
306 			--
307 			if (l_rec.legislation_code is not null and
308 			    l_rec.legislation_code <> per_ctr_bus.return_legislation_code(p_contact_relationship_id)) then
309 				fnd_message.set_name('PER', 'HR_INV_INFO_TYPE');
310 				fnd_message.raise_error;
311 			end if;
312 			--
313 			-- Raise an error when specified information type is inactive.
314 			--
315 			if l_rec.active_inactive_flag = 'N' then
316 				fnd_message.set_name('PER', 'HR_INACTIVE_INFO_TYPE');
317 				fnd_message.raise_error;
318 			end if;
319 		end if;
320 		--
321 		-- Check the information_type is unique on arbitrary date
322 		-- when multiple_occurences_flag = 'N'.
323 		--
324 		if l_rec.multiple_occurences_flag = 'N' then
325 			hr_utility.trace('validation_start_date   : ' || p_validation_start_date);
326 			hr_utility.trace('validation_end_date     : ' || p_validation_end_date);
327 			--
328 			-- Lock parent contact_relationship_id to guarantee uniqueness.
329 			-- This is to prevent other db sessions to modify the information_type
330 			-- with the same contact_relationship_id.
331 			--
332 			select	'Y'
333 			into	l_dummy
334 			from	per_contact_relationships
335 			where	contact_relationship_id = p_contact_relationship_id
336 			for update nowait;
337 			--
338 			-- Derive the min(ESD) with the same information_type
339 			-- which overlaps between VSD and VED.
340 			-- Note p_contact_extra_info_id for INSERTING is null.
341 			--
342 			select	min(effective_start_date)
343 			into	l_min_esd
344 			from	per_contact_extra_info_f
345 			where	contact_relationship_id = p_contact_relationship_id
346 			and	information_type = p_information_type
347 			and	contact_extra_info_id <> nvl(p_contact_extra_info_id, -1)
348 			and	effective_end_date >= p_validation_start_date
349 			and	effective_start_date <= p_validation_end_date;
350 			--
351 			hr_utility.trace('min_esd                 : ' || l_min_esd);
352 			--
353 			if l_min_esd is not null then
354 				if l_min_esd <= p_validation_start_date then
355 					fnd_message.set_name('PER', 'HR_MORE_THAN_1_EXTRA_INFO');
356 					fnd_message.raise_error;
357 				end if;
358 				--
359 				p_validation_end_date := l_min_esd - 1;
360 				--
361 				hr_utility.trace('validation_end_date_new : ' || p_validation_end_date);
362 			end if;
363 		end if;
364 	end if;
365 	--
366 	hr_utility.set_location(' Leaving:' || l_proc, 4);
367 end chk_information_type;
368 --
369 -- ----------------------------------------------------------------------------
370 -- |-----------------------------< chk_ddf >----------------------------------|
371 -- ----------------------------------------------------------------------------
372 --
373 -- Description:
374 --   Validates all the Developer Descriptive Flexfield values.
375 --
376 -- Prerequisites:
377 --   All other columns have been validated.  Must be called as the
378 --   last step from insert_validate and update_validate.
379 --
380 -- In Arguments:
381 --   p_rec
382 --
383 -- Post Success:
384 --   If the Developer Descriptive Flexfield structure column and data values
385 --   are all valid this procedure will end normally and processing will
386 --   continue.
387 --
388 -- Post Failure:
389 --   If the Developer Descriptive Flexfield structure column value or any of
390 --   the data values are invalid then an application error is raised as
391 --   a PL/SQL exception.
392 --
393 -- Access Status:
394 --   Internal Row Handler Use Only.
395 --
399   ) is
396 -- ----------------------------------------------------------------------------
397 procedure chk_ddf
398   (p_rec in per_rei_shd.g_rec_type
400 --
401   l_proc   varchar2(72) := g_package || 'chk_ddf';
402 --
403 begin
404   hr_utility.set_location('Entering:'||l_proc,10);
405   --
406   -- Descriptive Flexfield reference field check
407   -- Reference field check is not done automatically, so must be done manually.
408   -- Note information_type is checked "not null" by chk_information_type
409   -- and cei_information_category is checked "not null" by df routine(context_required_flag = 'Y').
410   -- The cost of this checking is very low, so the validation is done
411   -- whenever this procedure is called.
412   --
413   if p_rec.information_type <> p_rec.cei_information_category then
414     fnd_message.set_name('PER', 'HR_7438_FLEX_INV_REF_FIELD_VAL');
415     fnd_message.raise_error;
416   end if;
417   --
418   if ((p_rec.contact_extra_info_id is not null)  and (
419     nvl(per_rei_shd.g_old_rec.information_type, hr_api.g_varchar2) <>
420     nvl(p_rec.information_type, hr_api.g_varchar2)  or
421     nvl(per_rei_shd.g_old_rec.cei_information_category, hr_api.g_varchar2) <>
422     nvl(p_rec.cei_information_category, hr_api.g_varchar2)  or
423     nvl(per_rei_shd.g_old_rec.cei_information1, hr_api.g_varchar2) <>
424     nvl(p_rec.cei_information1, hr_api.g_varchar2)  or
425     nvl(per_rei_shd.g_old_rec.cei_information2, hr_api.g_varchar2) <>
426     nvl(p_rec.cei_information2, hr_api.g_varchar2)  or
427     nvl(per_rei_shd.g_old_rec.cei_information3, hr_api.g_varchar2) <>
428     nvl(p_rec.cei_information3, hr_api.g_varchar2)  or
429     nvl(per_rei_shd.g_old_rec.cei_information4, hr_api.g_varchar2) <>
430     nvl(p_rec.cei_information4, hr_api.g_varchar2)  or
431     nvl(per_rei_shd.g_old_rec.cei_information5, hr_api.g_varchar2) <>
432     nvl(p_rec.cei_information5, hr_api.g_varchar2)  or
433     nvl(per_rei_shd.g_old_rec.cei_information6, hr_api.g_varchar2) <>
434     nvl(p_rec.cei_information6, hr_api.g_varchar2)  or
435     nvl(per_rei_shd.g_old_rec.cei_information7, hr_api.g_varchar2) <>
436     nvl(p_rec.cei_information7, hr_api.g_varchar2)  or
437     nvl(per_rei_shd.g_old_rec.cei_information8, hr_api.g_varchar2) <>
438     nvl(p_rec.cei_information8, hr_api.g_varchar2)  or
439     nvl(per_rei_shd.g_old_rec.cei_information9, hr_api.g_varchar2) <>
440     nvl(p_rec.cei_information9, hr_api.g_varchar2)  or
441     nvl(per_rei_shd.g_old_rec.cei_information10, hr_api.g_varchar2) <>
442     nvl(p_rec.cei_information10, hr_api.g_varchar2)  or
443     nvl(per_rei_shd.g_old_rec.cei_information11, hr_api.g_varchar2) <>
444     nvl(p_rec.cei_information11, hr_api.g_varchar2)  or
445     nvl(per_rei_shd.g_old_rec.cei_information12, hr_api.g_varchar2) <>
446     nvl(p_rec.cei_information12, hr_api.g_varchar2)  or
447     nvl(per_rei_shd.g_old_rec.cei_information13, hr_api.g_varchar2) <>
448     nvl(p_rec.cei_information13, hr_api.g_varchar2)  or
449     nvl(per_rei_shd.g_old_rec.cei_information14, hr_api.g_varchar2) <>
450     nvl(p_rec.cei_information14, hr_api.g_varchar2)  or
451     nvl(per_rei_shd.g_old_rec.cei_information15, hr_api.g_varchar2) <>
452     nvl(p_rec.cei_information15, hr_api.g_varchar2)  or
453     nvl(per_rei_shd.g_old_rec.cei_information16, hr_api.g_varchar2) <>
454     nvl(p_rec.cei_information16, hr_api.g_varchar2)  or
455     nvl(per_rei_shd.g_old_rec.cei_information17, hr_api.g_varchar2) <>
456     nvl(p_rec.cei_information17, hr_api.g_varchar2)  or
457     nvl(per_rei_shd.g_old_rec.cei_information18, hr_api.g_varchar2) <>
458     nvl(p_rec.cei_information18, hr_api.g_varchar2)  or
459     nvl(per_rei_shd.g_old_rec.cei_information19, hr_api.g_varchar2) <>
460     nvl(p_rec.cei_information19, hr_api.g_varchar2)  or
461     nvl(per_rei_shd.g_old_rec.cei_information20, hr_api.g_varchar2) <>
462     nvl(p_rec.cei_information20, hr_api.g_varchar2)  or
463     nvl(per_rei_shd.g_old_rec.cei_information21, hr_api.g_varchar2) <>
464     nvl(p_rec.cei_information21, hr_api.g_varchar2)  or
465     nvl(per_rei_shd.g_old_rec.cei_information22, hr_api.g_varchar2) <>
466     nvl(p_rec.cei_information22, hr_api.g_varchar2)  or
467     nvl(per_rei_shd.g_old_rec.cei_information23, hr_api.g_varchar2) <>
468     nvl(p_rec.cei_information23, hr_api.g_varchar2)  or
469     nvl(per_rei_shd.g_old_rec.cei_information24, hr_api.g_varchar2) <>
470     nvl(p_rec.cei_information24, hr_api.g_varchar2)  or
471     nvl(per_rei_shd.g_old_rec.cei_information25, hr_api.g_varchar2) <>
472     nvl(p_rec.cei_information25, hr_api.g_varchar2)  or
473     nvl(per_rei_shd.g_old_rec.cei_information26, hr_api.g_varchar2) <>
474     nvl(p_rec.cei_information26, hr_api.g_varchar2)  or
475     nvl(per_rei_shd.g_old_rec.cei_information27, hr_api.g_varchar2) <>
476     nvl(p_rec.cei_information27, hr_api.g_varchar2)  or
477     nvl(per_rei_shd.g_old_rec.cei_information28, hr_api.g_varchar2) <>
478     nvl(p_rec.cei_information28, hr_api.g_varchar2)  or
479     nvl(per_rei_shd.g_old_rec.cei_information29, hr_api.g_varchar2) <>
480     nvl(p_rec.cei_information29, hr_api.g_varchar2)  or
481     nvl(per_rei_shd.g_old_rec.cei_information30, hr_api.g_varchar2) <>
482     nvl(p_rec.cei_information30, hr_api.g_varchar2) ))
483     or (p_rec.contact_extra_info_id is null)  then
484     --
485     -- Only execute the validation if absolutely necessary:
486     -- a) During update, the structure column value or any
487     --    of the attribute values have actually changed.
488     -- b) During insert.
489     --
490     hr_dflex_utility.ins_or_upd_descflex_attribs
491       (p_appl_short_name                 => 'PER'
492       ,p_descflex_name                   => 'Extra Contact Info DDF'
493 -- Bug.2770089
494 --      ,p_attribute_category              => 'CEI_INFORMATION_CATEGORY'
495       ,p_attribute_category              => p_rec.cei_information_category
496       ,p_attribute1_name                 => 'CEI_INFORMATION1'
500       ,p_attribute3_name                 => 'CEI_INFORMATION3'
497       ,p_attribute1_value                => p_rec.cei_information1
498       ,p_attribute2_name                 => 'CEI_INFORMATION2'
499       ,p_attribute2_value                => p_rec.cei_information2
501       ,p_attribute3_value                => p_rec.cei_information3
502       ,p_attribute4_name                 => 'CEI_INFORMATION4'
503       ,p_attribute4_value                => p_rec.cei_information4
504       ,p_attribute5_name                 => 'CEI_INFORMATION5'
505       ,p_attribute5_value                => p_rec.cei_information5
506       ,p_attribute6_name                 => 'CEI_INFORMATION6'
507       ,p_attribute6_value                => p_rec.cei_information6
508       ,p_attribute7_name                 => 'CEI_INFORMATION7'
509       ,p_attribute7_value                => p_rec.cei_information7
510       ,p_attribute8_name                 => 'CEI_INFORMATION8'
511       ,p_attribute8_value                => p_rec.cei_information8
512       ,p_attribute9_name                 => 'CEI_INFORMATION9'
513       ,p_attribute9_value                => p_rec.cei_information9
514       ,p_attribute10_name                => 'CEI_INFORMATION10'
515       ,p_attribute10_value               => p_rec.cei_information10
516       ,p_attribute11_name                => 'CEI_INFORMATION11'
517       ,p_attribute11_value               => p_rec.cei_information11
518       ,p_attribute12_name                => 'CEI_INFORMATION12'
519       ,p_attribute12_value               => p_rec.cei_information12
520       ,p_attribute13_name                => 'CEI_INFORMATION13'
521       ,p_attribute13_value               => p_rec.cei_information13
522       ,p_attribute14_name                => 'CEI_INFORMATION14'
523       ,p_attribute14_value               => p_rec.cei_information14
524       ,p_attribute15_name                => 'CEI_INFORMATION15'
525       ,p_attribute15_value               => p_rec.cei_information15
526       ,p_attribute16_name                => 'CEI_INFORMATION16'
527       ,p_attribute16_value               => p_rec.cei_information16
528       ,p_attribute17_name                => 'CEI_INFORMATION17'
529       ,p_attribute17_value               => p_rec.cei_information17
530       ,p_attribute18_name                => 'CEI_INFORMATION18'
531       ,p_attribute18_value               => p_rec.cei_information18
532       ,p_attribute19_name                => 'CEI_INFORMATION19'
533       ,p_attribute19_value               => p_rec.cei_information19
534       ,p_attribute20_name                => 'CEI_INFORMATION20'
535       ,p_attribute20_value               => p_rec.cei_information20
536       ,p_attribute21_name                => 'CEI_INFORMATION21'
537       ,p_attribute21_value               => p_rec.cei_information21
538       ,p_attribute22_name                => 'CEI_INFORMATION22'
539       ,p_attribute22_value               => p_rec.cei_information22
540       ,p_attribute23_name                => 'CEI_INFORMATION23'
541       ,p_attribute23_value               => p_rec.cei_information23
542       ,p_attribute24_name                => 'CEI_INFORMATION24'
543       ,p_attribute24_value               => p_rec.cei_information24
544       ,p_attribute25_name                => 'CEI_INFORMATION25'
545       ,p_attribute25_value               => p_rec.cei_information25
546       ,p_attribute26_name                => 'CEI_INFORMATION26'
547       ,p_attribute26_value               => p_rec.cei_information26
548       ,p_attribute27_name                => 'CEI_INFORMATION27'
549       ,p_attribute27_value               => p_rec.cei_information27
550       ,p_attribute28_name                => 'CEI_INFORMATION28'
551       ,p_attribute28_value               => p_rec.cei_information28
552       ,p_attribute29_name                => 'CEI_INFORMATION29'
553       ,p_attribute29_value               => p_rec.cei_information29
554       ,p_attribute30_name                => 'CEI_INFORMATION30'
555       ,p_attribute30_value               => p_rec.cei_information30
556       );
557   end if;
558   --
559   hr_utility.set_location(' Leaving:'||l_proc,20);
560 end chk_ddf;
561 --
562 -- ----------------------------------------------------------------------------
563 -- |------------------------------< chk_df >----------------------------------|
564 -- ----------------------------------------------------------------------------
565 --
566 -- Description:
567 --   Validates all the Descriptive Flexfield values.
568 --
569 -- Prerequisites:
570 --   All other columns have been validated.  Must be called as the
571 --   last step from insert_validate and update_validate.
572 --
573 -- In Arguments:
574 --   p_rec
575 --
576 -- Post Success:
577 --   If the Descriptive Flexfield structure column and data values are
578 --   all valid this procedure will end normally and processing will
579 --   continue.
580 --
581 -- Post Failure:
582 --   If the Descriptive Flexfield structure column value or any of
583 --   the data values are invalid then an application error is raised as
584 --   a PL/SQL exception.
585 --
586 -- Access Status:
587 --   Internal Row Handler Use Only.
588 --
589 -- ----------------------------------------------------------------------------
590 procedure chk_df
591   (p_rec in per_rei_shd.g_rec_type
592   ) is
593 --
594   l_proc   varchar2(72) := g_package || 'chk_df';
595 --
596 begin
597   hr_utility.set_location('Entering:'||l_proc,10);
598   --
599   if ((p_rec.contact_extra_info_id is not null)  and (
600     nvl(per_rei_shd.g_old_rec.cei_attribute_category, hr_api.g_varchar2) <>
601     nvl(p_rec.cei_attribute_category, hr_api.g_varchar2)  or
602     nvl(per_rei_shd.g_old_rec.cei_attribute1, hr_api.g_varchar2) <>
603     nvl(p_rec.cei_attribute1, hr_api.g_varchar2)  or
607     nvl(p_rec.cei_attribute3, hr_api.g_varchar2)  or
604     nvl(per_rei_shd.g_old_rec.cei_attribute2, hr_api.g_varchar2) <>
605     nvl(p_rec.cei_attribute2, hr_api.g_varchar2)  or
606     nvl(per_rei_shd.g_old_rec.cei_attribute3, hr_api.g_varchar2) <>
608     nvl(per_rei_shd.g_old_rec.cei_attribute4, hr_api.g_varchar2) <>
609     nvl(p_rec.cei_attribute4, hr_api.g_varchar2)  or
610     nvl(per_rei_shd.g_old_rec.cei_attribute5, hr_api.g_varchar2) <>
611     nvl(p_rec.cei_attribute5, hr_api.g_varchar2)  or
612     nvl(per_rei_shd.g_old_rec.cei_attribute6, hr_api.g_varchar2) <>
613     nvl(p_rec.cei_attribute6, hr_api.g_varchar2)  or
614     nvl(per_rei_shd.g_old_rec.cei_attribute7, hr_api.g_varchar2) <>
615     nvl(p_rec.cei_attribute7, hr_api.g_varchar2)  or
616     nvl(per_rei_shd.g_old_rec.cei_attribute8, hr_api.g_varchar2) <>
617     nvl(p_rec.cei_attribute8, hr_api.g_varchar2)  or
618     nvl(per_rei_shd.g_old_rec.cei_attribute9, hr_api.g_varchar2) <>
619     nvl(p_rec.cei_attribute9, hr_api.g_varchar2)  or
620     nvl(per_rei_shd.g_old_rec.cei_attribute10, hr_api.g_varchar2) <>
621     nvl(p_rec.cei_attribute10, hr_api.g_varchar2)  or
622     nvl(per_rei_shd.g_old_rec.cei_attribute11, hr_api.g_varchar2) <>
623     nvl(p_rec.cei_attribute11, hr_api.g_varchar2)  or
624     nvl(per_rei_shd.g_old_rec.cei_attribute12, hr_api.g_varchar2) <>
625     nvl(p_rec.cei_attribute12, hr_api.g_varchar2)  or
626     nvl(per_rei_shd.g_old_rec.cei_attribute13, hr_api.g_varchar2) <>
627     nvl(p_rec.cei_attribute13, hr_api.g_varchar2)  or
628     nvl(per_rei_shd.g_old_rec.cei_attribute14, hr_api.g_varchar2) <>
629     nvl(p_rec.cei_attribute14, hr_api.g_varchar2)  or
630     nvl(per_rei_shd.g_old_rec.cei_attribute15, hr_api.g_varchar2) <>
631     nvl(p_rec.cei_attribute15, hr_api.g_varchar2)  or
632     nvl(per_rei_shd.g_old_rec.cei_attribute16, hr_api.g_varchar2) <>
633     nvl(p_rec.cei_attribute16, hr_api.g_varchar2)  or
634     nvl(per_rei_shd.g_old_rec.cei_attribute17, hr_api.g_varchar2) <>
635     nvl(p_rec.cei_attribute17, hr_api.g_varchar2)  or
636     nvl(per_rei_shd.g_old_rec.cei_attribute18, hr_api.g_varchar2) <>
637     nvl(p_rec.cei_attribute18, hr_api.g_varchar2)  or
638     nvl(per_rei_shd.g_old_rec.cei_attribute19, hr_api.g_varchar2) <>
639     nvl(p_rec.cei_attribute19, hr_api.g_varchar2)  or
640     nvl(per_rei_shd.g_old_rec.cei_attribute20, hr_api.g_varchar2) <>
641     nvl(p_rec.cei_attribute20, hr_api.g_varchar2) ))
642     or (p_rec.contact_extra_info_id is null)  then
643     --
644     -- Only execute the validation if absolutely necessary:
645     -- a) During update, the structure column value or any
646     --    of the attribute values have actually changed.
647     -- b) During insert.
648     --
649     hr_dflex_utility.ins_or_upd_descflex_attribs
650       (p_appl_short_name                 => 'PER'
651       ,p_descflex_name                   => 'PER_CONTACT_EXTRA_INFO'
652 -- Bug.2770089
653 --      ,p_attribute_category              => 'CEI_ATTRIBUTE_CATEGORY'
654       ,p_attribute_category              => p_rec.cei_attribute_category
655       ,p_attribute1_name                 => 'CEI_ATTRIBUTE1'
656       ,p_attribute1_value                => p_rec.cei_attribute1
657       ,p_attribute2_name                 => 'CEI_ATTRIBUTE2'
658       ,p_attribute2_value                => p_rec.cei_attribute2
659       ,p_attribute3_name                 => 'CEI_ATTRIBUTE3'
660       ,p_attribute3_value                => p_rec.cei_attribute3
661       ,p_attribute4_name                 => 'CEI_ATTRIBUTE4'
662       ,p_attribute4_value                => p_rec.cei_attribute4
663       ,p_attribute5_name                 => 'CEI_ATTRIBUTE5'
664       ,p_attribute5_value                => p_rec.cei_attribute5
665       ,p_attribute6_name                 => 'CEI_ATTRIBUTE6'
666       ,p_attribute6_value                => p_rec.cei_attribute6
667       ,p_attribute7_name                 => 'CEI_ATTRIBUTE7'
668       ,p_attribute7_value                => p_rec.cei_attribute7
669       ,p_attribute8_name                 => 'CEI_ATTRIBUTE8'
670       ,p_attribute8_value                => p_rec.cei_attribute8
671       ,p_attribute9_name                 => 'CEI_ATTRIBUTE9'
672       ,p_attribute9_value                => p_rec.cei_attribute9
673       ,p_attribute10_name                => 'CEI_ATTRIBUTE10'
674       ,p_attribute10_value               => p_rec.cei_attribute10
675       ,p_attribute11_name                => 'CEI_ATTRIBUTE11'
676       ,p_attribute11_value               => p_rec.cei_attribute11
677       ,p_attribute12_name                => 'CEI_ATTRIBUTE12'
678       ,p_attribute12_value               => p_rec.cei_attribute12
679       ,p_attribute13_name                => 'CEI_ATTRIBUTE13'
680       ,p_attribute13_value               => p_rec.cei_attribute13
681       ,p_attribute14_name                => 'CEI_ATTRIBUTE14'
682       ,p_attribute14_value               => p_rec.cei_attribute14
683       ,p_attribute15_name                => 'CEI_ATTRIBUTE15'
684       ,p_attribute15_value               => p_rec.cei_attribute15
685       ,p_attribute16_name                => 'CEI_ATTRIBUTE16'
686       ,p_attribute16_value               => p_rec.cei_attribute16
687       ,p_attribute17_name                => 'CEI_ATTRIBUTE17'
688       ,p_attribute17_value               => p_rec.cei_attribute17
689       ,p_attribute18_name                => 'CEI_ATTRIBUTE18'
690       ,p_attribute18_value               => p_rec.cei_attribute18
691       ,p_attribute19_name                => 'CEI_ATTRIBUTE19'
692       ,p_attribute19_value               => p_rec.cei_attribute19
693       ,p_attribute20_name                => 'CEI_ATTRIBUTE20'
694       ,p_attribute20_value               => p_rec.cei_attribute20
695       );
696   end if;
697   --
698   hr_utility.set_location(' Leaving:'||l_proc,20);
699 end chk_df;
700 --
701 -- ----------------------------------------------------------------------------
705 --
702 -- |-----------------------< chk_non_updateable_args >------------------------|
703 -- ----------------------------------------------------------------------------
704 -- {Start Of Comments}
706 -- Description:
707 --   This procedure is used to ensure that non updateable attributes have
708 --   not been updated. If an attribute has been updated an error is generated.
709 --
710 -- Pre Conditions:
711 --   g_old_rec has been populated with details of the values currently in
712 --   the database.
713 --
714 -- In Arguments:
715 --   p_rec has been populated with the updated values the user would like the
716 --   record set to.
717 --
718 -- Post Success:
719 --   Processing continues if all the non updateable attributes have not
720 --   changed.
721 --
722 -- Post Failure:
723 --   An application error is raised if any of the non updatable attributes
724 --   have been altered.
725 --
726 -- {End Of Comments}
727 -- ----------------------------------------------------------------------------
728 Procedure chk_non_updateable_args
729   (p_effective_date  in date
730   ,p_rec             in per_rei_shd.g_rec_type
731   ) IS
732 --
733   l_argument	VARCHAR2(30);
734   l_error	EXCEPTION;
735   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
736 --
737 Begin
738   hr_utility.set_location('Entering:' || l_proc, 10);
739   --
740   -- Only proceed with the validation if a row exists for the current
741   -- record in the HR Schema.
742   --
743   IF NOT per_rei_shd.api_updating
744       (p_contact_extra_info_id            => p_rec.contact_extra_info_id
745       ,p_effective_date                   => p_effective_date
746       ,p_object_version_number            => p_rec.object_version_number
747       ) THEN
748      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
749      fnd_message.set_token('PROCEDURE ', l_proc);
750      fnd_message.set_token('STEP ', '5');
751      fnd_message.raise_error;
752   END IF;
753   --
754   -- Check if contact_relationship_id is updated.
755   -- Raise an error when contact_relationship_id is updated.
756   --
757   hr_utility.set_location(l_proc, 20);
758   IF NVL(p_rec.contact_relationship_id, hr_api.g_number) <>
759      NVL(per_rei_shd.g_old_rec.contact_relationship_id, hr_api.g_number) THEN
760     --
761     l_argument := 'contact_relationship_id';
762     RAISE l_error;
763   END IF;
764   --
765   -- Check if information_type is updated.
766   -- Raise an error when information_type is updated.
767   --
768   hr_utility.set_location(l_proc, 30);
769   IF NVL(p_rec.information_type, hr_api.g_varchar2) <>
770      NVL(per_rei_shd.g_old_rec.information_type, hr_api.g_varchar2) THEN
771     --
772     l_argument := 'information_type';
773     RAISE l_error;
774   END IF;
775   --
776   -- Check if cei_information_category is updated.
777   -- Raise an error when information_type is updated.
778   --
779   hr_utility.set_location(l_proc, 40);
780   IF NVL(p_rec.cei_information_category, hr_api.g_varchar2) <>
781      NVL(per_rei_shd.g_old_rec.cei_information_category, hr_api.g_varchar2) THEN
782     --
783     l_argument := 'cei_information_category';
784     RAISE l_error;
785   END IF;
786   --
787   hr_utility.set_location(' Leaving:' || l_proc, 50);
788 EXCEPTION
789   WHEN l_error THEN
790     hr_utility.set_location(l_proc, 60);
791     --
792     hr_api.argument_changed_error(
793      p_api_name => l_proc,
794      p_argument => l_argument);
795   WHEN OTHERS THEN
796     hr_utility.set_location(l_proc, 70);
797     --
798     RAISE;
799 End chk_non_updateable_args;
800 --
801 -- ----------------------------------------------------------------------------
802 -- |--------------------------< dt_update_validate >--------------------------|
803 -- ----------------------------------------------------------------------------
804 -- {Start Of Comments}
805 --
806 -- Description:
807 --   This procedure is used for referential integrity of datetracked
808 --   parent entities when a datetrack update operation is taking place
809 --   and where there is no cascading of update defined for this entity.
810 --
811 -- Prerequisites:
812 --   This procedure is called from the update_validate.
813 --
814 -- In Parameters:
815 --
816 -- Post Success:
817 --   Processing continues.
818 --
819 -- Post Failure:
820 --
821 -- Developer Implementation Notes:
822 --   This procedure should not need maintenance unless the HR Schema model
823 --   changes.
824 --
825 -- Access Status:
826 --   Internal Row Handler Use Only.
827 --
828 -- {End Of Comments}
829 -- ----------------------------------------------------------------------------
830 Procedure dt_update_validate
831   (p_datetrack_mode                in varchar2
832   ,p_validation_start_date         in date
833   ,p_validation_end_date           in date
834   ) Is
835 --
836   l_proc  varchar2(72) := g_package||'dt_update_validate';
837 --
838 Begin
839   --
840   -- Ensure that the p_datetrack_mode argument is not null
841   --
842   hr_api.mandatory_arg_error
843     (p_api_name       => l_proc
844     ,p_argument       => 'datetrack_mode'
845     ,p_argument_value => p_datetrack_mode
846     );
847   --
848   -- Mode will be valid, as this is checked at the start of the upd.
849   --
850   -- Ensure the arguments are not null
851   --
852   hr_api.mandatory_arg_error
856     );
853     (p_api_name       => l_proc
854     ,p_argument       => 'validation_start_date'
855     ,p_argument_value => p_validation_start_date
857   --
858   hr_api.mandatory_arg_error
859     (p_api_name       => l_proc
860     ,p_argument       => 'validation_end_date'
861     ,p_argument_value => p_validation_end_date
862     );
863   --
864   --
865   --
866 Exception
867   When Others Then
868     --
869     -- An unhandled or unexpected error has occurred which
870     -- we must report
871     --
872     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
873     fnd_message.set_token('PROCEDURE', l_proc);
874     fnd_message.set_token('STEP','15');
875     fnd_message.raise_error;
876 End dt_update_validate;
877 --
878 -- ----------------------------------------------------------------------------
879 -- |--------------------------< dt_delete_validate >--------------------------|
880 -- ----------------------------------------------------------------------------
881 -- {Start Of Comments}
882 --
883 -- Description:
884 --   This procedure is used for referential integrity of datetracked
885 --   child entities when either a datetrack DELETE or ZAP is in operation
886 --   and where there is no cascading of delete defined for this entity.
887 --   For the datetrack mode of DELETE or ZAP we must ensure that no
888 --   datetracked child rows exist between the validation start and end
889 --   dates.
890 --
891 -- Prerequisites:
892 --   This procedure is called from the delete_validate.
893 --
894 -- In Parameters:
895 --
896 -- Post Success:
897 --   Processing continues.
898 --
899 -- Post Failure:
900 --   If a row exists by determining the returning Boolean value from the
901 --   generic dt_api.rows_exist function then we must supply an error via
902 --   the use of the local exception handler l_rows_exist.
903 --
904 -- Developer Implementation Notes:
905 --   This procedure should not need maintenance unless the HR Schema model
906 --   changes.
907 --
908 -- Access Status:
909 --   Internal Row Handler Use Only.
910 --
911 -- {End Of Comments}
912 -- ----------------------------------------------------------------------------
913 Procedure dt_delete_validate
914   (p_contact_extra_info_id            in number
915   ,p_datetrack_mode                   in varchar2
916   ,p_validation_start_date            in date
917   ,p_validation_end_date              in date
918   ) Is
919 --
920   l_proc        varchar2(72)    := g_package||'dt_delete_validate';
921 --
922 Begin
923   --
924   -- Ensure that the p_datetrack_mode argument is not null
925   --
926   hr_api.mandatory_arg_error
927     (p_api_name       => l_proc
928     ,p_argument       => 'datetrack_mode'
929     ,p_argument_value => p_datetrack_mode
930     );
931   --
932   -- Only perform the validation if the datetrack mode is either
933   -- DELETE or ZAP
934   --
935   If (p_datetrack_mode = hr_api.g_delete or
936       p_datetrack_mode = hr_api.g_zap) then
937     --
938     --
939     -- Ensure the arguments are not null
940     --
941     hr_api.mandatory_arg_error
942       (p_api_name       => l_proc
943       ,p_argument       => 'validation_start_date'
944       ,p_argument_value => p_validation_start_date
945       );
946     --
947     hr_api.mandatory_arg_error
948       (p_api_name       => l_proc
949       ,p_argument       => 'validation_end_date'
950       ,p_argument_value => p_validation_end_date
951       );
952     --
953     hr_api.mandatory_arg_error
954       (p_api_name       => l_proc
955       ,p_argument       => 'contact_extra_info_id'
956       ,p_argument_value => p_contact_extra_info_id
957       );
958     --
959     --
960     --
961   End If;
962   --
963 Exception
964   When Others Then
965     --
966     -- An unhandled or unexpected error has occurred which
967     -- we must report
968     --
969     fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
970     fnd_message.set_token('PROCEDURE', l_proc);
971     fnd_message.set_token('STEP','15');
972     fnd_message.raise_error;
973   --
974 End dt_delete_validate;
975 --
976 -- ----------------------------------------------------------------------------
977 -- |---------------------------< insert_validate >----------------------------|
978 -- ----------------------------------------------------------------------------
979 Procedure insert_validate
980   (p_rec                   in per_rei_shd.g_rec_type
981   ,p_effective_date        in date
982   ,p_datetrack_mode        in varchar2
983   ,p_validation_start_date in date
984   ,p_validation_end_date   in out nocopy date
985   ) is
986 --
987   l_proc        varchar2(72) := g_package||'insert_validate';
988 --
989 Begin
990   hr_utility.set_location('Entering:'||l_proc, 5);
991   --
992   -- Call all supporting business operations
993   --
994   --
995   -- Set security_group_id in CLIENT_INFO
996   --
997   per_rei_bus.set_security_group_id(
998    p_contact_relationship_id => p_rec.contact_relationship_id);
999   --
1000   -- Validate Contact Relationship ID
1001   -- This needs to be validated before information_type.
1002   --
1003   per_rei_bus.chk_contact_relationship_id(
1004    p_contact_relationship_id => p_rec.contact_relationship_id);
1005   --
1009    p_information_type		=> p_rec.information_type,
1006   -- Validate Contact Info Type
1007   --
1008   per_rei_bus.chk_information_type(
1010    p_datetrack_mode		=> p_datetrack_mode,
1011    p_contact_relationship_id	=> p_rec.contact_relationship_id,
1012    p_contact_extra_info_id	=> p_rec.contact_extra_info_id,
1013    p_validation_start_date	=> p_validation_start_date,
1014    p_validation_end_date	=> p_validation_end_date);
1015   --
1016   -- Skip descriptive flexfield validation when the API is called from form.
1017   --
1018   IF per_rei_shd.g_called_from_form = FALSE THEN
1019     hr_utility.set_location(l_proc, 10);
1020     --
1021     -- Bug.2770089
1022     -- Support dynamic profile option "PER_CONTACT_RELATIONSHIP_ID"
1023     -- which is available in df value set.
1024     -- If you want to reference contact_relationship_id in value set,
1025     -- use ":$PROFILES$.PER_CONTACT_RELATIONSHIP_ID".
1026     -- Note that we do not have to create this profile option
1027     -- in FND_PROFILE_OPTIONS, this profile option is created dynamically
1028     -- in memory by the following code.
1029     -- Remember to populate PER_CONTACT_RELATIONSHIP_ID to not only forms PERWSREI.fmb
1030     -- but also any selfservice modules which reference PER_CONTACT_EXTRA_INFO_F df.
1031     --
1032     fnd_profile.put('PER_CONTACT_RELATIONSHIP_ID', to_char(p_rec.contact_relationship_id));
1033     --
1034     per_rei_bus.chk_ddf(p_rec);
1035     --
1036     per_rei_bus.chk_df(p_rec);
1037   END IF;
1038   -- =
1039   hr_utility.set_location(' Leaving:'||l_proc, 10);
1040 End insert_validate;
1041 --
1042 -- ----------------------------------------------------------------------------
1043 -- |---------------------------< update_validate >----------------------------|
1044 -- ----------------------------------------------------------------------------
1045 Procedure update_validate
1046   (p_rec                     in per_rei_shd.g_rec_type
1047   ,p_effective_date          in date
1048   ,p_datetrack_mode          in varchar2
1049   ,p_validation_start_date   in date
1050   ,p_validation_end_date     in date
1051   ) is
1052 --
1053   l_proc        varchar2(72) := g_package||'update_validate';
1054 --
1055 Begin
1056   hr_utility.set_location('Entering:'||l_proc, 5);
1057   --
1058   -- Call all supporting business operations
1059   --
1060   --
1061   -- Set security_group_id in CLIENT_INFO
1062   --
1063   per_rei_bus.set_security_group_id(
1064    p_contact_relationship_id => p_rec.contact_relationship_id);
1065   --
1066   -- Validate Dependent Attributes
1067   --
1068   -- Call the datetrack update integrity operation
1069   --
1070   dt_update_validate
1071     (p_datetrack_mode                 => p_datetrack_mode
1072     ,p_validation_start_date          => p_validation_start_date
1073     ,p_validation_end_date            => p_validation_end_date
1074     );
1075   --
1076   chk_non_updateable_args
1077     (p_effective_date  => p_effective_date
1078     ,p_rec             => p_rec
1079     );
1080   --
1081   -- Skip descriptive flexfield validation when the API is called from form.
1082   --
1083   IF per_rei_shd.g_called_from_form = FALSE THEN
1084     hr_utility.set_location(l_proc, 7);
1085     --
1086     -- Bug.2770089
1087     -- Support dynamic profile option "PER_CONTACT_RELATIONSHIP_ID"
1088     -- which is available in df value set.
1089     -- If you want to reference contact_relationship_id in value set,
1090     -- use ":$PROFILES$.PER_CONTACT_RELATIONSHIP_ID".
1091     -- Note that we do not have to create this profile option
1092     -- in FND_PROFILE_OPTIONS, this profile option is created dynamically
1093     -- in memory by the following code.
1094     -- Remember to populate PER_CONTACT_RELATIONSHIP_ID to not only forms PERWSREI.fmb
1095     -- but also any selfservice modules which reference PER_CONTACT_EXTRA_INFO_F df.
1096     --
1097     fnd_profile.put('PER_CONTACT_RELATIONSHIP_ID', to_char(p_rec.contact_relationship_id));
1098     --
1099     per_rei_bus.chk_ddf(p_rec);
1100     --
1101     per_rei_bus.chk_df(p_rec);
1102   END IF;
1103   --
1104   hr_utility.set_location(' Leaving:'||l_proc, 10);
1105 End update_validate;
1106 --
1107 -- ----------------------------------------------------------------------------
1108 -- |---------------------------< delete_validate >----------------------------|
1109 -- ----------------------------------------------------------------------------
1110 Procedure delete_validate
1111   (p_rec                    in per_rei_shd.g_rec_type
1112   ,p_effective_date         in date
1113   ,p_datetrack_mode         in varchar2
1114   ,p_validation_start_date  in date
1115   ,p_validation_end_date    in out nocopy date
1116   ) is
1117 --
1118   l_proc        varchar2(72) := g_package||'delete_validate';
1119 --
1120 Begin
1121   hr_utility.set_location('Entering:'||l_proc, 5);
1122   --
1123   -- Call all supporting business operations
1124   --
1125   dt_delete_validate
1126     (p_datetrack_mode                   => p_datetrack_mode
1127     ,p_validation_start_date            => p_validation_start_date
1128     ,p_validation_end_date              => p_validation_end_date
1129     ,p_contact_extra_info_id            => p_rec.contact_extra_info_id
1130     );
1131   --
1132   -- Validate Contact Info Type
1133   -- This is non-updatable argument, but needs to validate
1134   -- whether this information is unique when information_type is multiple entries not allowed.
1135   --
1136   per_rei_bus.chk_information_type(
1137    p_information_type		=> per_rei_shd.g_old_rec.information_type,
1138    p_datetrack_mode		=> p_datetrack_mode,
1142    p_validation_end_date	=> p_validation_end_date);
1139    p_contact_relationship_id	=> per_rei_shd.g_old_rec.contact_relationship_id,
1140    p_contact_extra_info_id	=> p_rec.contact_extra_info_id,
1141    p_validation_start_date	=> p_validation_start_date,
1143   --
1144   hr_utility.set_location(' Leaving:'||l_proc, 10);
1145 End delete_validate;
1146 --
1147 end per_rei_bus;