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(p_api_name => l_proc
66: hr_api.set_security_group_id
67: (p_security_group_id => l_security_group_id
68: );
69: --
70: hr_utility.set_location(' Leaving:'|| l_proc, 20);
71: --
72: end set_security_group_id;
73: --
74: -- ---------------------------------------------------------------------------
95: l_proc varchar2(72) := g_package||'return_legislation_code';
96: --
97: Begin
98: --
99: hr_utility.set_location('Entering:'|| l_proc, 10);
100: --
101: -- Ensure that all the mandatory parameter are not null
102: --
103: hr_api.mandatory_arg_error(p_api_name => l_proc
111: -- call to this function. Just return the value in the global
112: -- variable.
113: --
114: l_legislation_code := g_legislation_code;
115: hr_utility.set_location(l_proc, 20);
116: else
117: --
118: -- The ID is different to the last call to this function
119: -- or this is the first call to this function.
128: close csr_leg_code;
129: fnd_message.set_name('PER','HR_7220_INVALID_PRIMARY_KEY');
130: fnd_message.raise_error;
131: end if;
132: hr_utility.set_location(l_proc,30);
133: --
134: -- Set the global variables so the values are
135: -- available for the next call to this function.
136: --
137: close csr_leg_code;
138: g_balance_type_id := p_balance_type_id;
139: g_legislation_code := l_legislation_code;
140: end if;
141: hr_utility.set_location(' Leaving:'|| l_proc, 40);
142: return l_legislation_code;
143: end return_legislation_code;
144: --
145: -- ----------------------------------------------------------------------------
177: l_error EXCEPTION;
178: l_argument varchar2(30);
179: --
180: Begin
181: hr_utility.set_location('Entering:'||l_proc,5);
182: --
183: -- Only proceed with the validation if a row exists for the current
184: -- record in the HR Schema.
185: --
186: IF NOT per_bbt_shd.api_updating
187: (p_balance_type_id => p_rec.balance_type_id
188: ,p_object_version_number => p_rec.object_version_number
189: ) THEN
190: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
191: hr_utility.set_message_token('PROCEDURE ', l_proc);
192: hr_utility.set_message_token('STEP ', '5');
193: END IF;
194: --
187: (p_balance_type_id => p_rec.balance_type_id
188: ,p_object_version_number => p_rec.object_version_number
189: ) THEN
190: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
191: hr_utility.set_message_token('PROCEDURE ', l_proc);
192: hr_utility.set_message_token('STEP ', '5');
193: END IF;
194: --
195: hr_utility.set_location(l_proc,10);
188: ,p_object_version_number => p_rec.object_version_number
189: ) THEN
190: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
191: hr_utility.set_message_token('PROCEDURE ', l_proc);
192: hr_utility.set_message_token('STEP ', '5');
193: END IF;
194: --
195: hr_utility.set_location(l_proc,10);
196: --
191: hr_utility.set_message_token('PROCEDURE ', l_proc);
192: hr_utility.set_message_token('STEP ', '5');
193: END IF;
194: --
195: hr_utility.set_location(l_proc,10);
196: --
197: --
198: EXCEPTION
199: WHEN l_error THEN
201: (p_api_name => l_proc
202: ,p_argument => l_argument);
203: WHEN OTHERS THEN
204: RAISE;
205: hr_utility.set_location(' Leaving:'||l_proc,20);
206: End chk_non_updateable_args;
207: --
208: -- ----------------------------------------------------------------------------
209: -- |------------------------< chk_input_value_details >-----------------------|
293: --
294: -- The input_value_id that is being entered isn't in the table
295: -- PAY_INPUT_VALUES_F in the same bg so error.
296: --
297: hr_utility.set_message (800,'HR_52939_INVALID_INPUT_ID');
298: hr_utility.raise_error;
299: --
300: END IF;
301: --
294: -- The input_value_id that is being entered isn't in the table
295: -- PAY_INPUT_VALUES_F in the same bg so error.
296: --
297: hr_utility.set_message (800,'HR_52939_INVALID_INPUT_ID');
298: hr_utility.raise_error;
299: --
300: END IF;
301: --
302: IF (p_effective_date < l_effective_start_date
306: --
307: -- The input value does exist, but isn't valid for the
308: -- effective date that is being inserted.
309: --
310: hr_utility.set_message(800,'HR_52940_IV_OUTSIDE_DATES');
311: hr_utility.raise_error;
312: --
313: END IF;
314: --
307: -- The input value does exist, but isn't valid for the
308: -- effective date that is being inserted.
309: --
310: hr_utility.set_message(800,'HR_52940_IV_OUTSIDE_DATES');
311: hr_utility.raise_error;
312: --
313: END IF;
314: --
315: IF (p_uom IS NOT NULL AND p_uom <> l_uom) THEN
317: CLOSE csr_get_input_details;
318: --
319: -- The UOM exists and is different than the UOM on the input value.
320: --
321: hr_utility.set_message (800,'HR_52941_UOM_DIFFERENT');
322: hr_utility.raise_error;
323: --
324: END IF;
325: --
318: --
319: -- The UOM exists and is different than the UOM on the input value.
320: --
321: hr_utility.set_message (800,'HR_52941_UOM_DIFFERENT');
322: hr_utility.raise_error;
323: --
324: END IF;
325: --
326: IF (p_currency_code IS NOT NULL
329: CLOSE csr_get_input_details;
330: --
331: -- The currency exists but is different than the currency on the type.
332: --
333: hr_utility.set_message(800,'HR_52942_CURR_DIFFERENT');
334: hr_utility.raise_error;
335: --
336: END IF;
337: --
330: --
331: -- The currency exists but is different than the currency on the type.
332: --
333: hr_utility.set_message(800,'HR_52942_CURR_DIFFERENT');
334: hr_utility.raise_error;
335: --
336: END IF;
337: --
338: CLOSE csr_get_input_details;
384: --
385: l_api_updating BOOLEAN;
386: --
387: BEGIN
388: hr_utility.set_location ('Entering:'|| l_proc, 1);
389: --
390: l_api_updating := per_bbt_shd.api_updating
391: (p_balance_type_id => p_balance_type_id
392: ,p_object_version_number => p_object_version_number);
469: --
470: l_api_updating BOOLEAN;
471: --
472: BEGIN
473: hr_utility.set_location ('Entering:'|| l_proc, 1);
474: --
475: l_api_updating := per_bbt_shd.api_updating
476: (p_balance_type_id => p_balance_type_id
477: ,p_object_version_number => p_object_version_number);
571: --
572: -- The lookup code entered doesn't exist in hr_lookups
573: -- so error.
574: --
575: hr_utility.set_message(800, 'HR_52943_UOM_NOT_EXIST');
576: hr_utility.raise_error;
577: --
578: END IF;
579: --
572: -- The lookup code entered doesn't exist in hr_lookups
573: -- so error.
574: --
575: hr_utility.set_message(800, 'HR_52943_UOM_NOT_EXIST');
576: hr_utility.raise_error;
577: --
578: END IF;
579: --
580: IF l_enabled_flag = 'N' THEN
580: IF l_enabled_flag = 'N' THEN
581: --
582: -- The lookup exists, but isn't enabled
583: --
584: hr_utility.set_message(800,'HR_52609_UOM_LOOKUP_OFF');
585: hr_utility.raise_error;
586: --
587: END IF;
588: --
581: --
582: -- The lookup exists, but isn't enabled
583: --
584: hr_utility.set_message(800,'HR_52609_UOM_LOOKUP_OFF');
585: hr_utility.raise_error;
586: --
587: END IF;
588: --
589: IF p_effective_date not between NVL (l_start_date, hr_api.g_sot)
591: --
592: -- The lookup exists, but it isn't valid for the effective date
593: -- so error.
594: --
595: hr_utility.set_message(800,'HR_52944_UOM_NOT_VALID');
596: hr_utility.raise_error;
597: --
598: END IF;
599: --
592: -- The lookup exists, but it isn't valid for the effective date
593: -- so error.
594: --
595: hr_utility.set_message(800,'HR_52944_UOM_NOT_VALID');
596: hr_utility.raise_error;
597: --
598: END IF;
599: --
600: END IF;
665: IF l_uom IS NULL and l_input_value_id IS NULL THEN
666: --
667: -- If there is not input value, there should be a UOM.
668: --
669: hr_utility.set_message(800, 'HR_52612_UOM_INPUT_BAD');
670: hr_utility.raise_error;
671: END IF;
672: --
673: --
666: --
667: -- If there is not input value, there should be a UOM.
668: --
669: hr_utility.set_message(800, 'HR_52612_UOM_INPUT_BAD');
670: hr_utility.raise_error;
671: END IF;
672: --
673: --
674: IF (l_currency_code IS NULL and l_uom = 'M') THEN
672: --
673: --
674: IF (l_currency_code IS NULL and l_uom = 'M') THEN
675: -- This handles the case for both inserts and updates
676: hr_utility.set_message(800,'HR_52746_NEED_CURR_UOM');
677: hr_utility.raise_error;
678: END IF;
679: END CHK_UOM_INPUT;
680: -- ----------------------------------------------------------------------------
673: --
674: IF (l_currency_code IS NULL and l_uom = 'M') THEN
675: -- This handles the case for both inserts and updates
676: hr_utility.set_message(800,'HR_52746_NEED_CURR_UOM');
677: hr_utility.raise_error;
678: END IF;
679: END CHK_UOM_INPUT;
680: -- ----------------------------------------------------------------------------
681: -- |-------------------------------< chk_category >---------------------------|
742: --
743: -- The lookup code entered doesn't exist in hr_lookups
744: -- so error.
745: --
746: hr_utility.set_message(800, 'HR_52945_CAT_NOT_EXIST');
747: hr_utility.raise_error;
748: --
749: END IF;
750: --
743: -- The lookup code entered doesn't exist in hr_lookups
744: -- so error.
745: --
746: hr_utility.set_message(800, 'HR_52945_CAT_NOT_EXIST');
747: hr_utility.raise_error;
748: --
749: END IF;
750: --
751: IF l_enabled_flag = 'N' THEN
751: IF l_enabled_flag = 'N' THEN
752: --
753: -- The lookup exists, but isn't enabled
754: --
755: hr_utility.set_message(800,'HR_52610_CAT_LOOKUP_OFF');
756: hr_utility.raise_error;
757: --
758: END IF;
759: IF p_effective_date not between NVL (l_start_date, hr_api.g_sot)
752: --
753: -- The lookup exists, but isn't enabled
754: --
755: hr_utility.set_message(800,'HR_52610_CAT_LOOKUP_OFF');
756: hr_utility.raise_error;
757: --
758: END IF;
759: IF p_effective_date not between NVL (l_start_date, hr_api.g_sot)
760: and NVL (l_end_date, hr_api.g_eot) THEN
761: --
762: -- The lookup exists, but it isn't valid for the effective date
763: -- so error.
764: --
765: hr_utility.set_message(800,'HR_52946_CAT_NOT_VALID');
766: hr_utility.raise_error;
767: --
768: END IF;
769: END IF;
762: -- The lookup exists, but it isn't valid for the effective date
763: -- so error.
764: --
765: hr_utility.set_message(800,'HR_52946_CAT_NOT_VALID');
766: hr_utility.raise_error;
767: --
768: END IF;
769: END IF;
770: --
779: --
780: l_proc varchar2(72) := g_package||'insert_validate';
781: --
782: Begin
783: hr_utility.set_location('Entering:'||l_proc, 5);
784: --
785: -- Call all supporting business operations
786: --
787: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
827: ,p_object_version_number => p_rec.object_version_number
828: ,p_effective_date => p_effective_date
829: );
830: --
831: hr_utility.set_location(' Leaving:'||l_proc, 10);
832: End insert_validate;
833: --
834: -- ----------------------------------------------------------------------------
835: -- |---------------------------< update_validate >----------------------------|
841: --
842: l_proc varchar2(72) := g_package||'update_validate';
843: --
844: Begin
845: hr_utility.set_location('Entering:'||l_proc, 5);
846: --
847: -- Call all supporting business operations
848: --
849: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
889: ,p_object_version_number => p_rec.object_version_number
890: ,p_effective_date => p_effective_date
891: );
892: --
893: hr_utility.set_location(' Leaving:'||l_proc, 10);
894: End update_validate;
895: --
896: -- ----------------------------------------------------------------------------
897: -- |---------------------------< delete_validate >----------------------------|
902: --
903: l_proc varchar2(72) := g_package||'delete_validate';
904: --
905: Begin
906: hr_utility.set_location('Entering:'||l_proc, 5);
907: --
908: -- Call all supporting business operations
909: --
910: hr_utility.set_location(' Leaving:'||l_proc, 10);
906: hr_utility.set_location('Entering:'||l_proc, 5);
907: --
908: -- Call all supporting business operations
909: --
910: hr_utility.set_location(' Leaving:'||l_proc, 10);
911: End delete_validate;
912: --
913: end per_bbt_bus;