47: end check_parameters;
48: --
49: begin
50: --
51: hr_utility.set_location ('Entering '||l_proc,1);
52: --
53: check_parameters;
54: --
55: l_api_updating := hr_cau_shd.api_updating (
67: if csr_calendar%notfound then
68: --
69: -- There was no calendar identified by the ID
70: --
71: hr_utility.set_message(801, 'HR_51068_CAU_CAL_FK');
72: hr_utility.raise_error;
73: --
74: elsif l_calendar_start_time > p_start_date then
75: --
68: --
69: -- There was no calendar identified by the ID
70: --
71: hr_utility.set_message(801, 'HR_51068_CAU_CAL_FK');
72: hr_utility.raise_error;
73: --
74: elsif l_calendar_start_time > p_start_date then
75: --
76: -- The usage starts before its calendar
74: elsif l_calendar_start_time > p_start_date then
75: --
76: -- The usage starts before its calendar
77: --
78: hr_utility.set_message (801,'HR_51038_CAU_INVALID_START');
79: hr_utility.set_message_token ('CALENDAR_START_DATE',
80: to_char (l_calendar_start_time,
81: 'DD-MON-YYYY HH24:MI'));
82: hr_utility.raise_error;
75: --
76: -- The usage starts before its calendar
77: --
78: hr_utility.set_message (801,'HR_51038_CAU_INVALID_START');
79: hr_utility.set_message_token ('CALENDAR_START_DATE',
80: to_char (l_calendar_start_time,
81: 'DD-MON-YYYY HH24:MI'));
82: hr_utility.raise_error;
83: --
78: hr_utility.set_message (801,'HR_51038_CAU_INVALID_START');
79: hr_utility.set_message_token ('CALENDAR_START_DATE',
80: to_char (l_calendar_start_time,
81: 'DD-MON-YYYY HH24:MI'));
82: hr_utility.raise_error;
83: --
84: end if;
85: --
86: end if;
84: end if;
85: --
86: end if;
87: --
88: hr_utility.set_location ('Leaving '||l_proc, 10);
89: --
90: end chk_start_date;
91: -- ----------------------------------------------------------------------------
92: -- |---------------------------< chk_entity_purpose >-------------------------|
142: end check_parameters;
143: --
144: begin
145: --
146: hr_utility.set_location ('Entering '||l_proc,1);
147: --
148: check_parameters;
149: --
150: open csr_overlap;
152: --
153: if csr_overlap%found then
154: --
155: close csr_overlap;
156: hr_utility.set_message (801, 'HR_51072_CAU_USAGE_OVERLAP');
157: hr_utility.raise_error;
158: --
159: else
160: close csr_overlap;
153: if csr_overlap%found then
154: --
155: close csr_overlap;
156: hr_utility.set_message (801, 'HR_51072_CAU_USAGE_OVERLAP');
157: hr_utility.raise_error;
158: --
159: else
160: close csr_overlap;
161: end if;
159: else
160: close csr_overlap;
161: end if;
162: --
163: hr_utility.set_location ('Leaving '||l_proc,1);
164: --
165: end chk_entity_purpose;
166: -- ----------------------------------------------------------------------------
167: -- |---------------------------< chk_purpose_usage_id >-----------------------|
216: end check_parameters;
217: --
218: begin
219: --
220: hr_utility.set_location ('Entering '||l_proc,1);
221: --
222: check_parameters;
223: --
224: open csr_purpose;
237: if csr_pattern_construction%found then
238: --
239: -- A pattern construction row was found which is not appropriate for SSP
240: --
241: hr_utility.set_message (801,'HR_51071_CAU_SSP_AVAILABILITY');
242: hr_utility.raise_error;
243: --
244: end if;
245: --
238: --
239: -- A pattern construction row was found which is not appropriate for SSP
240: --
241: hr_utility.set_message (801,'HR_51071_CAU_SSP_AVAILABILITY');
242: hr_utility.raise_error;
243: --
244: end if;
245: --
246: end if;
244: end if;
245: --
246: end if;
247: --
248: hr_utility.set_location ('Leaving '||l_proc,10);
249: --
250: end chk_purpose_usage_id;
251: -- ----------------------------------------------------------------------------
252: -- |---------------------------< chk_calendar_id >----------------------------|
307: end check_parameters;
308: --
309: begin
310: --
311: hr_utility.set_location ('Entering '||l_proc,1);
312: --
313: check_parameters;
314: --
315: if p_calendar_id is null then
343: --
344: -- If the calendar_id is still null at this point then no valid default
345: -- existed for the date specified, but we can leave the error to the constraint.
346: --
347: hr_utility.set_location ('Leaving '||l_proc,10);
348: --
349: end chk_calendar_id;
350: -- ----------------------------------------------------------------------------
351: -- |---------------------------< chk_primary_key_value >----------------------|
453: end check_parameters;
454: --
455: begin
456: --
457: hr_utility.set_location ('Entering '||l_proc, 1);
458: --
459: check_parameters;
460: --
461: open csr_entity_name;
512: else
513: --
514: -- An unexpected error occurred; the entity name is invalid.
515: --
516: hr_utility.set_message (801,' HR_6153_ALL_PROCEDURE_FAIL');
517: hr_utility.set_message_token ('PROCEDURE',l_proc);
518: hr_utility.set_message_token ('STEP','1');
519: hr_utility.raise_error;
520: --
513: --
514: -- An unexpected error occurred; the entity name is invalid.
515: --
516: hr_utility.set_message (801,' HR_6153_ALL_PROCEDURE_FAIL');
517: hr_utility.set_message_token ('PROCEDURE',l_proc);
518: hr_utility.set_message_token ('STEP','1');
519: hr_utility.raise_error;
520: --
521: end if;
514: -- An unexpected error occurred; the entity name is invalid.
515: --
516: hr_utility.set_message (801,' HR_6153_ALL_PROCEDURE_FAIL');
517: hr_utility.set_message_token ('PROCEDURE',l_proc);
518: hr_utility.set_message_token ('STEP','1');
519: hr_utility.raise_error;
520: --
521: end if;
522: --
515: --
516: hr_utility.set_message (801,' HR_6153_ALL_PROCEDURE_FAIL');
517: hr_utility.set_message_token ('PROCEDURE',l_proc);
518: hr_utility.set_message_token ('STEP','1');
519: hr_utility.raise_error;
520: --
521: end if;
522: --
523: if l_dummy is null then
523: if l_dummy is null then
524: --
525: -- The primary key did not exist on its table.
526: --
527: hr_utility.set_message (801,'HR_51067_CAU_PRIMARY_KEY_VALUE');
528: hr_utility.set_message_token ('ENTITY_NAME',l_entity_name);
529: hr_utility.set_message_token ('START_DATE',to_char (p_start_date));
530: hr_utility.raise_error;
531: --
524: --
525: -- The primary key did not exist on its table.
526: --
527: hr_utility.set_message (801,'HR_51067_CAU_PRIMARY_KEY_VALUE');
528: hr_utility.set_message_token ('ENTITY_NAME',l_entity_name);
529: hr_utility.set_message_token ('START_DATE',to_char (p_start_date));
530: hr_utility.raise_error;
531: --
532: end if;
525: -- The primary key did not exist on its table.
526: --
527: hr_utility.set_message (801,'HR_51067_CAU_PRIMARY_KEY_VALUE');
528: hr_utility.set_message_token ('ENTITY_NAME',l_entity_name);
529: hr_utility.set_message_token ('START_DATE',to_char (p_start_date));
530: hr_utility.raise_error;
531: --
532: end if;
533: --
526: --
527: hr_utility.set_message (801,'HR_51067_CAU_PRIMARY_KEY_VALUE');
528: hr_utility.set_message_token ('ENTITY_NAME',l_entity_name);
529: hr_utility.set_message_token ('START_DATE',to_char (p_start_date));
530: hr_utility.raise_error;
531: --
532: end if;
533: --
534: end chk_primary_key_value;
539: --
540: l_proc varchar2(72) := g_package||'insert_validate';
541: --
542: Begin
543: hr_utility.set_location('Entering:'||l_proc, 5);
544: --
545: -- Call all supporting business operations
546: --
547: chk_start_date ( p_start_date => p_rec.start_date,
563: p_primary_key_value=> p_rec.primary_key_value,
564: p_start_date=> p_rec.start_date,
565: p_end_date=> p_rec.end_date);
566: --
567: hr_utility.set_location(' Leaving:'||l_proc, 10);
568: End insert_validate;
569: --
570: -- ----------------------------------------------------------------------------
571: -- |---------------------------< update_validate >----------------------------|
574: --
575: l_proc varchar2(72) := g_package||'update_validate';
576: --
577: Begin
578: hr_utility.set_location('Entering:'||l_proc, 5);
579: --
580: -- Call all supporting business operations
581: --
582: chk_start_date ( p_start_date => p_rec.start_date,
589: p_primary_key_value=> p_rec.primary_key_value,
590: p_start_date=> p_rec.start_date,
591: p_end_date=> p_rec.end_date);
592: --
593: hr_utility.set_location(' Leaving:'||l_proc, 10);
594: End update_validate;
595: --
596: -- ----------------------------------------------------------------------------
597: -- |---------------------------< delete_validate >----------------------------|
600: --
601: l_proc varchar2(72) := g_package||'delete_validate';
602: --
603: Begin
604: hr_utility.set_location('Entering:'||l_proc, 5);
605: --
606: -- Call all supporting business operations
607: --
608: hr_utility.set_location(' Leaving:'||l_proc, 10);
604: hr_utility.set_location('Entering:'||l_proc, 5);
605: --
606: -- Call all supporting business operations
607: --
608: hr_utility.set_location(' Leaving:'||l_proc, 10);
609: End delete_validate;
610: --
611: end hr_cau_bus;