DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_ILP_BUS

Source


1 Package Body irc_ilp_bus as
2 /* $Header: irilprhi.pkb 120.2 2011/01/05 04:44:35 avarri noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := 'irc_ilp_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_location_pref_id            number         default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |-------------------------< chk_business_group_id >------------------------|
17 -- ----------------------------------------------------------------------------
18 -- {Start Of Comments}
19 --
20 -- Description:
21 --   This procedure ensures a valid Business Group Id is entered
22 -- Pre Conditions:
23 --   g_old_rec has been populated with details of the values currently in
24 --   the database.
25 --
26 -- In Arguments:
27 --   p_business_group_id
28 --
29 --
30 -- Post Success:
31 --   Processing continues if Business Group Id is valid
32 --
33 -- Post Failure:
34 --   An application error is raised if Business Group Id is not valid
35 --
36 -- {End Of Comments}
37 -- ----------------------------------------------------------------------------
38 Procedure chk_business_group_id
39   (p_business_group_id   in irc_location_preferences.business_group_id%TYPE
40   )
41   IS
42 --
43   l_proc               varchar2(72) := g_package || 'chk_business_group_id';
44   l_business_group_id  irc_location_preferences.business_group_id%TYPE;
45 --
46   cursor csr_chk_bg_id is
47     select 1
48       from per_business_groups
49      where business_group_id = p_business_group_id;
50 --
51 Begin
52   hr_utility.set_location('Entering:'||l_proc,10);
53   --
54   hr_api.mandatory_arg_error
55   (p_api_name       => l_proc
56   ,p_argument       => 'business_group_id'
57   ,p_argument_value => p_business_group_id
58   );
59   --
60   open csr_chk_bg_id;
61   fetch csr_chk_bg_id into l_business_group_id;
62   --
63   hr_utility.set_location(l_proc,15);
64   if (csr_chk_bg_id%notfound) then
65     close csr_chk_bg_id;
66     fnd_message.set_name('PER','IRC_412661_INV_BG_ID');
67     fnd_message.raise_error;
68   end if;
69   --
70   close csr_chk_bg_id;
71   --
72   hr_utility.set_location(' Leaving:'||l_proc,20);
73 exception
74   when app_exception.application_exception then
75     if hr_multi_message.exception_add
76        (p_associated_column1      => 'IRC_LOCATION_PREFERENCES.BUSINESS_GROUP_ID'
77         ) then
78       hr_utility.set_location(' Leaving:'|| l_proc, 25);
79       raise;
80     end if;
81     hr_utility.set_location(' Leaving:'|| l_proc, 30);
82 End chk_business_group_id;
83 --
84 -- ----------------------------------------------------------------------------
85 -- |-------------------------< chk_country_code >-----------------------------|
86 -- ----------------------------------------------------------------------------
87 -- {Start Of Comments}
88 --
89 -- Description:
90 --   This procedure ensures a valid country code is entered
91 -- Pre Conditions:
92 --   g_old_rec has been populated with details of the values currently in
93 --   the database.
94 --
95 -- In Arguments:
96 --   p_country_code
97 --
98 --
99 -- Post Success:
100 --   Processing continues if country code is valid
101 --
102 -- Post Failure:
103 --   An application error is raised if country code is not valid
104 --
105 -- {End Of Comments}
106 -- ----------------------------------------------------------------------------
107 Procedure chk_country_code
108   (p_country_code   in irc_location_preferences.country_code%TYPE
109   )
110   IS
111 --
112   l_proc               varchar2(72) := g_package || 'chk_country_code';
113   l_country_code  irc_location_preferences.country_code%TYPE;
114 --
115   cursor csr_chk_country_code is
116     select 1
117       from fnd_territories
118      where territory_code = p_country_code;
119 --
120 Begin
121   hr_utility.set_location('Entering:'||l_proc,10);
122   --
123   hr_api.mandatory_arg_error
124   (p_api_name       => l_proc
125   ,p_argument       => 'country_code'
126   ,p_argument_value => p_country_code
127   );
128   --
129   open csr_chk_country_code;
130   fetch csr_chk_country_code into l_country_code;
131   --
132   hr_utility.set_location(l_proc,15);
133   if (csr_chk_country_code%notfound) then
134     close csr_chk_country_code;
135     fnd_message.set_name('PER','IRC_412662_INV_COUNTRY_CODE');
136     fnd_message.raise_error;
137   end if;
138   --
139   close csr_chk_country_code;
140   --
141   hr_utility.set_location(' Leaving:'||l_proc,20);
142 exception
143   when app_exception.application_exception then
144     if hr_multi_message.exception_add
145        (p_associated_column1      => 'IRC_LOCATION_PREFERENCES.COUNTRY_CODE'
146         ) then
147       hr_utility.set_location(' Leaving:'|| l_proc, 25);
148       raise;
149     end if;
150     hr_utility.set_location(' Leaving:'|| l_proc, 30);
151 End chk_country_code;
152 --
153 -- ----------------------------------------------------------------------------
154 -- |-------------------------< chk_location_id >------------------------------|
155 -- ----------------------------------------------------------------------------
156 -- {Start Of Comments}
157 --
158 -- Description:
159 --   This procedure ensures a valid LocationId is entered
160 -- Pre Conditions:
161 --   g_old_rec has been populated with details of the values currently in
162 --   the database.
163 --
164 -- In Arguments:
165 --   p_location_id
166 --
167 --
168 -- Post Success:
169 --   Processing continues if LocationId is valid
170 --
171 -- Post Failure:
172 --   An application error is raised if LocationId is not valid
173 --
174 -- {End Of Comments}
175 -- ----------------------------------------------------------------------------
176 Procedure chk_location_id
177   (p_location_id   in irc_location_preferences.location_id%TYPE
178   )
179   IS
180 --
181   l_proc         varchar2(72) := g_package || 'chk_location_id';
182   l_location_id  irc_location_preferences.location_id%TYPE;
183 --
184   cursor csr_chk_loc_id is
185     select 1
186       from hr_locations_all
187      where location_id = p_location_id;
188 --
189 Begin
190   hr_utility.set_location('Entering:'||l_proc,10);
191   --
192   hr_api.mandatory_arg_error
193   (p_api_name       => l_proc
194   ,p_argument       => 'location_id'
195   ,p_argument_value => p_location_id
196   );
197   --
198   open csr_chk_loc_id;
199   fetch csr_chk_loc_id into l_location_id;
200   --
201   hr_utility.set_location(l_proc,15);
202   if (csr_chk_loc_id%notfound) then
203     close csr_chk_loc_id;
204     fnd_message.set_name('PER','IRC_412663_INV_LOCATION_ID');
205     fnd_message.raise_error;
206   end if;
207   --
208   close csr_chk_loc_id;
209   --
210   hr_utility.set_location(' Leaving:'||l_proc,20);
211 exception
212   when app_exception.application_exception then
213     if hr_multi_message.exception_add
214        (p_associated_column1      => 'IRC_LOCATION_PREFERENCES.LOCATION_ID'
215         ) then
216       hr_utility.set_location(' Leaving:'|| l_proc, 25);
217       raise;
218     end if;
219     hr_utility.set_location(' Leaving:'|| l_proc, 30);
220 End chk_location_id;
221 --
222 -- ----------------------------------------------------------------------------
223 -- |-------------------------< chk_duplicate_loc_pref >-----------------------|
224 -- ----------------------------------------------------------------------------
225 -- {Start Of Comments}
226 --
227 -- Description:
228 --   This procedure ensures unique location preference for an object is entered
229 -- Pre Conditions:
230 --   g_old_rec has been populated with details of the values currently in
231 --   the database.
232 --
233 -- In Arguments:
234 --   p_object_id
235 --   p_object_type
236 --   p_business_group_id
237 --   p_country_code
238 --   p_location_id
239 --
240 --
241 -- Post Success:
242 --   Processing continues if Hierarchy Version Id is valid
243 --
244 -- Post Failure:
245 --   An application error is raised if Hierarchy Version Id is not valid
246 --
247 -- {End Of Comments}
248 -- ----------------------------------------------------------------------------
249 Procedure chk_duplicate_loc_pref
250   (p_object_id             in irc_location_preferences.object_id%TYPE
251   ,p_object_type           in irc_location_preferences.object_type%TYPE
252   ,p_business_group_id     in irc_location_preferences.business_group_id%TYPE
253   ,p_country_code          in irc_location_preferences.country_code%TYPE
254   ,p_location_id           in irc_location_preferences.location_id%TYPE
255   )
256   IS
257 --
258   l_proc      varchar2(72) := g_package || 'chk_duplicate_loc_pref';
259   l_count     number;
260 --
261   cursor csr_chk_duplicate_loc_pref is
262     select 1
263       from irc_location_preferences
264      where object_id            = p_object_id
265        and object_type          = p_object_type
266        and business_group_id    = p_business_group_id
267        and country_code         = p_country_code
268        and location_id          = p_location_id;
269 --
270 Begin
271   hr_utility.set_location('Entering:'||l_proc,10);
272   --
273   open csr_chk_duplicate_loc_pref;
274   fetch csr_chk_duplicate_loc_pref into l_count;
275   --
276   hr_utility.set_location(l_proc,15);
277   if (csr_chk_duplicate_loc_pref%found) then
278     close csr_chk_duplicate_loc_pref;
279     fnd_message.set_name('PER','IRC_412664_DUP_LOC_PREFS');
280     fnd_message.raise_error;
281   end if;
282   --
283   close csr_chk_duplicate_loc_pref;
284   --
285   hr_utility.set_location(' Leaving:'||l_proc,20);
286 exception
287   when app_exception.application_exception then
288     if hr_multi_message.exception_add
289        (p_associated_column1      => 'IRC_LOCATION_PREFERENCES.OBJECT_ID'
290        ,p_associated_column2      => 'IRC_LOCATION_PREFERENCES.OBJECT_TYPE'
291         ) then
292       hr_utility.set_location(' Leaving:'|| l_proc, 25);
293       raise;
294     end if;
295     hr_utility.set_location(' Leaving:'|| l_proc, 30);
296 End chk_duplicate_loc_pref;
297 --
298 -- ----------------------------------------------------------------------------
299 -- |------------------------------< chk_df >----------------------------------|
300 -- ----------------------------------------------------------------------------
301 --
302 -- Description:
303 --   Validates all the Descriptive Flexfield values.
304 --
305 -- Prerequisites:
306 --   All other columns have been validated.  Must be called as the
307 --   last step from insert_validate and update_validate.
308 --
309 -- In Arguments:
310 --   p_rec
311 --
312 -- Post Success:
313 --   If the Descriptive Flexfield structure column and data values are
314 --   all valid this procedure will end normally and processing will
315 --   continue.
316 --
317 -- Post Failure:
318 --   If the Descriptive Flexfield structure column value or any of
319 --   the data values are invalid then an application error is raised as
320 --   a PL/SQL exception.
321 --
322 -- Access Status:
323 --   Internal Row Handler Use Only.
324 --
325 -- ----------------------------------------------------------------------------
326 procedure chk_df
327   (p_rec in irc_ilp_shd.g_rec_type
328   ) is
329 --
330   l_proc   varchar2(72) := g_package || 'chk_df';
331 --
332 begin
333   hr_utility.set_location('Entering:'||l_proc,10);
334   --
335   if ((p_rec.location_pref_id is not null)  and (
336     nvl(irc_ilp_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
337     nvl(p_rec.attribute_category, hr_api.g_varchar2)  or
338     nvl(irc_ilp_shd.g_old_rec.attribute1, hr_api.g_varchar2) <>
339     nvl(p_rec.attribute1, hr_api.g_varchar2)  or
340     nvl(irc_ilp_shd.g_old_rec.attribute2, hr_api.g_varchar2) <>
341     nvl(p_rec.attribute2, hr_api.g_varchar2)  or
342     nvl(irc_ilp_shd.g_old_rec.attribute3, hr_api.g_varchar2) <>
343     nvl(p_rec.attribute3, hr_api.g_varchar2)  or
344     nvl(irc_ilp_shd.g_old_rec.attribute4, hr_api.g_varchar2) <>
345     nvl(p_rec.attribute4, hr_api.g_varchar2)  or
346     nvl(irc_ilp_shd.g_old_rec.attribute5, hr_api.g_varchar2) <>
347     nvl(p_rec.attribute5, hr_api.g_varchar2)  or
348     nvl(irc_ilp_shd.g_old_rec.attribute6, hr_api.g_varchar2) <>
349     nvl(p_rec.attribute6, hr_api.g_varchar2)  or
350     nvl(irc_ilp_shd.g_old_rec.attribute7, hr_api.g_varchar2) <>
351     nvl(p_rec.attribute7, hr_api.g_varchar2)  or
352     nvl(irc_ilp_shd.g_old_rec.attribute8, hr_api.g_varchar2) <>
353     nvl(p_rec.attribute8, hr_api.g_varchar2)  or
354     nvl(irc_ilp_shd.g_old_rec.attribute9, hr_api.g_varchar2) <>
355     nvl(p_rec.attribute9, hr_api.g_varchar2)  or
356     nvl(irc_ilp_shd.g_old_rec.attribute10, hr_api.g_varchar2) <>
357     nvl(p_rec.attribute10, hr_api.g_varchar2)  or
358     nvl(irc_ilp_shd.g_old_rec.attribute11, hr_api.g_varchar2) <>
359     nvl(p_rec.attribute11, hr_api.g_varchar2)  or
360     nvl(irc_ilp_shd.g_old_rec.attribute12, hr_api.g_varchar2) <>
361     nvl(p_rec.attribute12, hr_api.g_varchar2)  or
362     nvl(irc_ilp_shd.g_old_rec.attribute13, hr_api.g_varchar2) <>
363     nvl(p_rec.attribute13, hr_api.g_varchar2)  or
364     nvl(irc_ilp_shd.g_old_rec.attribute14, hr_api.g_varchar2) <>
365     nvl(p_rec.attribute14, hr_api.g_varchar2)  or
366     nvl(irc_ilp_shd.g_old_rec.attribute15, hr_api.g_varchar2) <>
367     nvl(p_rec.attribute15, hr_api.g_varchar2)  or
368     nvl(irc_ilp_shd.g_old_rec.attribute16, hr_api.g_varchar2) <>
369     nvl(p_rec.attribute16, hr_api.g_varchar2)  or
370     nvl(irc_ilp_shd.g_old_rec.attribute17, hr_api.g_varchar2) <>
371     nvl(p_rec.attribute17, hr_api.g_varchar2)  or
372     nvl(irc_ilp_shd.g_old_rec.attribute18, hr_api.g_varchar2) <>
373     nvl(p_rec.attribute18, hr_api.g_varchar2)  or
374     nvl(irc_ilp_shd.g_old_rec.attribute19, hr_api.g_varchar2) <>
375     nvl(p_rec.attribute19, hr_api.g_varchar2)  or
376     nvl(irc_ilp_shd.g_old_rec.attribute20, hr_api.g_varchar2) <>
377     nvl(p_rec.attribute20, hr_api.g_varchar2)  or
378     nvl(irc_ilp_shd.g_old_rec.attribute21, hr_api.g_varchar2) <>
379     nvl(p_rec.attribute21, hr_api.g_varchar2)  or
380     nvl(irc_ilp_shd.g_old_rec.attribute22, hr_api.g_varchar2) <>
381     nvl(p_rec.attribute22, hr_api.g_varchar2)  or
382     nvl(irc_ilp_shd.g_old_rec.attribute23, hr_api.g_varchar2) <>
383     nvl(p_rec.attribute23, hr_api.g_varchar2)  or
384     nvl(irc_ilp_shd.g_old_rec.attribute24, hr_api.g_varchar2) <>
385     nvl(p_rec.attribute24, hr_api.g_varchar2)  or
386     nvl(irc_ilp_shd.g_old_rec.attribute25, hr_api.g_varchar2) <>
387     nvl(p_rec.attribute25, hr_api.g_varchar2)  or
388     nvl(irc_ilp_shd.g_old_rec.attribute26, hr_api.g_varchar2) <>
389     nvl(p_rec.attribute26, hr_api.g_varchar2)  or
390     nvl(irc_ilp_shd.g_old_rec.attribute27, hr_api.g_varchar2) <>
391     nvl(p_rec.attribute27, hr_api.g_varchar2)  or
392     nvl(irc_ilp_shd.g_old_rec.attribute28, hr_api.g_varchar2) <>
393     nvl(p_rec.attribute28, hr_api.g_varchar2)  or
394     nvl(irc_ilp_shd.g_old_rec.attribute29, hr_api.g_varchar2) <>
395     nvl(p_rec.attribute29, hr_api.g_varchar2)  or
396     nvl(irc_ilp_shd.g_old_rec.attribute30, hr_api.g_varchar2) <>
397     nvl(p_rec.attribute30, hr_api.g_varchar2) ))
398     or (p_rec.location_pref_id is null)  then
399     --
400     -- Only execute the validation if absolutely necessary:
401     -- a) During update, the structure column value or any
402     --    of the attribute values have actually changed.
403     -- b) During insert.
404     --
405     hr_dflex_utility.ins_or_upd_descflex_attribs
406       (p_appl_short_name                 => 'IRC'
407       ,p_descflex_name                   => 'EDIT_HERE: Enter descflex name'
408       ,p_attribute_category              => p_rec.attribute_category
409       ,p_attribute1_name                 => 'ATTRIBUTE1'
410       ,p_attribute1_value                => p_rec.attribute1
411       ,p_attribute2_name                 => 'ATTRIBUTE2'
412       ,p_attribute2_value                => p_rec.attribute2
413       ,p_attribute3_name                 => 'ATTRIBUTE3'
414       ,p_attribute3_value                => p_rec.attribute3
415       ,p_attribute4_name                 => 'ATTRIBUTE4'
416       ,p_attribute4_value                => p_rec.attribute4
417       ,p_attribute5_name                 => 'ATTRIBUTE5'
418       ,p_attribute5_value                => p_rec.attribute5
419       ,p_attribute6_name                 => 'ATTRIBUTE6'
420       ,p_attribute6_value                => p_rec.attribute6
421       ,p_attribute7_name                 => 'ATTRIBUTE7'
422       ,p_attribute7_value                => p_rec.attribute7
423       ,p_attribute8_name                 => 'ATTRIBUTE8'
424       ,p_attribute8_value                => p_rec.attribute8
425       ,p_attribute9_name                 => 'ATTRIBUTE9'
426       ,p_attribute9_value                => p_rec.attribute9
427       ,p_attribute10_name                => 'ATTRIBUTE10'
428       ,p_attribute10_value               => p_rec.attribute10
429       ,p_attribute11_name                => 'ATTRIBUTE11'
430       ,p_attribute11_value               => p_rec.attribute11
431       ,p_attribute12_name                => 'ATTRIBUTE12'
432       ,p_attribute12_value               => p_rec.attribute12
433       ,p_attribute13_name                => 'ATTRIBUTE13'
434       ,p_attribute13_value               => p_rec.attribute13
435       ,p_attribute14_name                => 'ATTRIBUTE14'
436       ,p_attribute14_value               => p_rec.attribute14
437       ,p_attribute15_name                => 'ATTRIBUTE15'
438       ,p_attribute15_value               => p_rec.attribute15
439       ,p_attribute16_name                => 'ATTRIBUTE16'
440       ,p_attribute16_value               => p_rec.attribute16
441       ,p_attribute17_name                => 'ATTRIBUTE17'
442       ,p_attribute17_value               => p_rec.attribute17
443       ,p_attribute18_name                => 'ATTRIBUTE18'
444       ,p_attribute18_value               => p_rec.attribute18
445       ,p_attribute19_name                => 'ATTRIBUTE19'
446       ,p_attribute19_value               => p_rec.attribute19
447       ,p_attribute20_name                => 'ATTRIBUTE20'
448       ,p_attribute20_value               => p_rec.attribute20
449       ,p_attribute21_name                => 'ATTRIBUTE21'
450       ,p_attribute21_value               => p_rec.attribute21
451       ,p_attribute22_name                => 'ATTRIBUTE22'
452       ,p_attribute22_value               => p_rec.attribute22
453       ,p_attribute23_name                => 'ATTRIBUTE23'
454       ,p_attribute23_value               => p_rec.attribute23
455       ,p_attribute24_name                => 'ATTRIBUTE24'
456       ,p_attribute24_value               => p_rec.attribute24
457       ,p_attribute25_name                => 'ATTRIBUTE25'
458       ,p_attribute25_value               => p_rec.attribute25
459       ,p_attribute26_name                => 'ATTRIBUTE26'
460       ,p_attribute26_value               => p_rec.attribute26
461       ,p_attribute27_name                => 'ATTRIBUTE27'
462       ,p_attribute27_value               => p_rec.attribute27
463       ,p_attribute28_name                => 'ATTRIBUTE28'
464       ,p_attribute28_value               => p_rec.attribute28
465       ,p_attribute29_name                => 'ATTRIBUTE29'
466       ,p_attribute29_value               => p_rec.attribute29
467       ,p_attribute30_name                => 'ATTRIBUTE30'
468       ,p_attribute30_value               => p_rec.attribute30
469       );
470   end if;
471   --
472   hr_utility.set_location(' Leaving:'||l_proc,20);
473 end chk_df;
474 --
475 -- ----------------------------------------------------------------------------
476 -- |-----------------------< chk_non_updateable_args >------------------------|
477 -- ----------------------------------------------------------------------------
478 -- {Start Of Comments}
479 --
480 -- Description:
481 --   This procedure is used to ensure that non updateable attributes have
482 --   not been updated. If an attribute has been updated an error is generated.
483 --
484 -- Pre Conditions:
485 --   g_old_rec has been populated with details of the values currently in
486 --   the database.
487 --
488 -- In Arguments:
489 --   p_rec has been populated with the updated values the user would like the
490 --   record set to.
491 --
492 -- Post Success:
493 --   Processing continues if all the non updateable attributes have not
494 --   changed.
495 --
496 -- Post Failure:
497 --   An application error is raised if any of the non updatable attributes
498 --   have been altered.
499 --
500 -- {End Of Comments}
501 -- ----------------------------------------------------------------------------
502 Procedure chk_non_updateable_args
503   (p_effective_date               in date
504   ,p_rec in irc_ilp_shd.g_rec_type
505   ) IS
506 --
507   l_proc     varchar2(72) := g_package || 'chk_non_updateable_args';
508 --
509 Begin
510   --
511   -- Only proceed with the validation if a row exists for the current
512   -- record in the HR Schema.
513   --
514   IF NOT irc_ilp_shd.api_updating
515       (p_location_pref_id                  => p_rec.location_pref_id
516       ,p_object_version_number             => p_rec.object_version_number
517       ) THEN
518      fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
519      fnd_message.set_token('PROCEDURE ', l_proc);
520      fnd_message.set_token('STEP ', '5');
521      fnd_message.raise_error;
522   END IF;
523   --
524   -- EDIT_HERE: Add checks to ensure non-updateable args have
525   --            not been updated.
526   --
527 End chk_non_updateable_args;
528 --
529 -- ----------------------------------------------------------------------------
530 -- |---------------------------< insert_validate >----------------------------|
531 -- ----------------------------------------------------------------------------
532 Procedure insert_validate
533   (p_effective_date               in date
534   ,p_rec                          in irc_ilp_shd.g_rec_type
535   ) is
536 --
537   l_proc  varchar2(72) := g_package||'insert_validate';
538 --
539 Begin
540   hr_utility.set_location('Entering:'||l_proc, 5);
541   --
542   -- Call all supporting business operations
543   --
544   -- EDIT_HERE: The following call to hr_api.validate_bus_grp_id
545   -- will only be valid when the business_group_id is not null.
546   -- As this column is defined as optional on the table then
547   -- different logic will be required to handle the null case.
548   -- If this is a start-up data entity then:
549   --    a) add code to stop null values being processed by this
550   --       row handler
551   -- If this is not a start-up data entity then either:
552   --    b) ignore the security_group_id value held in
553   --       client_info.  This includes performing lookup
554   --       validation against the HR_STANDARD_LOOKUPS view.
555   -- or c) (less likely) ensure the correct security_group_id
556   --       value is set in client_info.
557   -- Remove this comment when the edit has been completed.
558   -- Validate Important Attributes
559   --
560   hr_api.validate_bus_grp_id
561     (p_business_group_id => p_rec.business_group_id
562     ,p_associated_column1 => irc_ilp_shd.g_tab_nam
563                               || '.BUSINESS_GROUP_ID');
564   --
565   hr_utility.set_location('Entering:'||l_proc, 10);
566   --
567   --
568   -- After validating the set of important attributes,
569   -- if Multiple Message detection is enabled and at least
570   -- one error has been found then abort further validation.
571   --
572   hr_multi_message.end_validation_set;
573   --
574   -- Validate Dependent Attributes
575   --
576   hr_utility.set_location(l_proc, 15);
577   --
578   irc_ilp_bus.chk_business_group_id
579     (p_business_group_id   => p_rec.business_group_id
580     );
581   --
582   hr_utility.set_location(l_proc, 20);
583   --
584   irc_ilp_bus.chk_country_code
585     (p_country_code  => p_rec.country_code
586     );
587   --
588   hr_utility.set_location(l_proc, 25);
589   --
590   irc_ilp_bus.chk_location_id
591     (p_location_id   => p_rec.location_id
592     );
593   --
594   /*hr_utility.set_location(l_proc, 35);
595   --
596   irc_ilp_bus.chk_duplicate_loc_pref
597     (p_object_id            => p_rec.object_id
598     ,p_object_type          => p_rec.object_type
599     ,p_business_group_id    => p_rec.business_group_id
600     ,p_country_code         => p_rec.country_code
601     ,p_location_id          => p_rec.location_id
602     );
603   -- */
604   hr_utility.set_location(l_proc, 40);
605   --
606   --irc_ilp_bus.chk_df(p_rec);
607   --
608   hr_utility.set_location(l_proc, 45);
609   --
610   hr_utility.set_location(' Leaving:'||l_proc, 50);
611 End insert_validate;
612 --
613 -- ----------------------------------------------------------------------------
614 -- |---------------------------< update_validate >----------------------------|
615 -- ----------------------------------------------------------------------------
616 Procedure update_validate
617   (p_effective_date               in date
618   ,p_rec                          in irc_ilp_shd.g_rec_type
619   ) is
620 --
621   l_proc  varchar2(72) := g_package||'update_validate';
622 --
623 Begin
624   hr_utility.set_location('Entering:'||l_proc, 5);
625   --
626   -- Call all supporting business operations
627   --
628   -- EDIT_HERE: The following call to hr_api.validate_bus_grp_id
629   -- will only be valid when the business_group_id is not null.
630   -- As this column is defined as optional on the table then
631   -- different logic will be required to handle the null case.
632   -- If this is a start-up data entity then:
633   --    a) add code to stop null values being processed by this
634   --       row handler
635   -- If this is not a start-up data entity then either:
636   --    b) ignore the security_group_id value held in
637   --       client_info.  This includes performing lookup
638   --       validation against the HR_STANDARD_LOOKUPS view.
639   -- or c) (less likely) ensure the correct security_group_id
640   --       value is set in client_info.
641   -- Remove this comment when the edit has been completed.
642   -- Validate Important Attributes
643   hr_api.validate_bus_grp_id
644     (p_business_group_id => p_rec.business_group_id
645     ,p_associated_column1 => irc_ilp_shd.g_tab_nam
646                               || '.BUSINESS_GROUP_ID');
647   --
648   -- After validating the set of important attributes,
649   -- if Multiple Message detection is enabled and at least
650   -- one error has been found then abort further validation.
651   --
652   hr_multi_message.end_validation_set;
653   --
654   -- Validate Dependent Attributes
655   --
656   chk_non_updateable_args
657     (p_effective_date    => p_effective_date
658     ,p_rec               => p_rec
659     );
660   --
661   --
662   irc_ilp_bus.chk_df(p_rec);
663   --
664   hr_utility.set_location(' Leaving:'||l_proc, 10);
665 End update_validate;
666 --
667 -- ----------------------------------------------------------------------------
668 -- |---------------------------< delete_validate >----------------------------|
669 -- ----------------------------------------------------------------------------
670 Procedure delete_validate
671   (p_rec                          in irc_ilp_shd.g_rec_type
672   ) is
673 --
674   l_proc  varchar2(72) := g_package||'delete_validate';
675 --
676 Begin
677   hr_utility.set_location('Entering:'||l_proc, 5);
678   --
679   -- Call all supporting business operations
680   --
681   hr_utility.set_location(' Leaving:'||l_proc, 10);
682 End delete_validate;
683 --
684 end irc_ilp_bus;