88: fetch csr_disallow_update into l_disallow;
89: if csr_disallow_update%found then
90: hr_utility.set_location(l_proc, 25);
91: close csr_disallow_update;
92: fnd_message.set_name('PAY', 'PAY_50113_SBT_CORE_ROW_EXISTS');
93: fnd_message.raise_error;
94: end if;
95: close csr_disallow_update;
96: --
89: if csr_disallow_update%found then
90: hr_utility.set_location(l_proc, 25);
91: close csr_disallow_update;
92: fnd_message.set_name('PAY', 'PAY_50113_SBT_CORE_ROW_EXISTS');
93: fnd_message.raise_error;
94: end if;
95: close csr_disallow_update;
96: --
97: -- Check the otherwise non-updateable arguments.
177: fetch csr_template_id_valid into l_valid;
178: if csr_template_id_valid%notfound then
179: hr_utility.set_location(' Leaving:'||l_proc, 10);
180: close csr_template_id_valid;
181: fnd_message.set_name('PAY', 'PAY_50114_ETM_INVALID_TEMPLATE');
182: fnd_message.raise_error;
183: end if;
184: close csr_template_id_valid;
185: hr_utility.set_location(' Leaving:'||l_proc, 15);
178: if csr_template_id_valid%notfound then
179: hr_utility.set_location(' Leaving:'||l_proc, 10);
180: close csr_template_id_valid;
181: fnd_message.set_name('PAY', 'PAY_50114_ETM_INVALID_TEMPLATE');
182: fnd_message.raise_error;
183: end if;
184: close csr_template_id_valid;
185: hr_utility.set_location(' Leaving:'||l_proc, 15);
186: End chk_template_id;
276: fetch csr_T_balance_name_exists into l_exists;
277: if csr_T_balance_name_exists%found then
278: close csr_T_balance_name_exists;
279: hr_utility.set_location(' Leaving:'||l_proc, 10);
280: fnd_message.set_name('PAY', 'PAY_50115_SBT_BALANCE_EXISTS');
281: fnd_message.set_token('BALANCE_NAME', p_balance_name);
282: fnd_message.raise_error;
283: end if;
284: close csr_T_balance_name_exists;
277: if csr_T_balance_name_exists%found then
278: close csr_T_balance_name_exists;
279: hr_utility.set_location(' Leaving:'||l_proc, 10);
280: fnd_message.set_name('PAY', 'PAY_50115_SBT_BALANCE_EXISTS');
281: fnd_message.set_token('BALANCE_NAME', p_balance_name);
282: fnd_message.raise_error;
283: end if;
284: close csr_T_balance_name_exists;
285: elsif p_template_type = 'U' then
278: close csr_T_balance_name_exists;
279: hr_utility.set_location(' Leaving:'||l_proc, 10);
280: fnd_message.set_name('PAY', 'PAY_50115_SBT_BALANCE_EXISTS');
281: fnd_message.set_token('BALANCE_NAME', p_balance_name);
282: fnd_message.raise_error;
283: end if;
284: close csr_T_balance_name_exists;
285: elsif p_template_type = 'U' then
286: --
290: fetch csr_U_balance_name_exists into l_exists;
291: if csr_U_balance_name_exists%found then
292: close csr_U_balance_name_exists;
293: hr_utility.set_location(' Leaving:'||l_proc, 15);
294: fnd_message.set_name('PAY', 'PAY_50115_SBT_BALANCE_EXISTS');
295: fnd_message.set_token('BALANCE_NAME', p_balance_name);
296: fnd_message.raise_error;
297: end if;
298: close csr_U_balance_name_exists;
291: if csr_U_balance_name_exists%found then
292: close csr_U_balance_name_exists;
293: hr_utility.set_location(' Leaving:'||l_proc, 15);
294: fnd_message.set_name('PAY', 'PAY_50115_SBT_BALANCE_EXISTS');
295: fnd_message.set_token('BALANCE_NAME', p_balance_name);
296: fnd_message.raise_error;
297: end if;
298: close csr_U_balance_name_exists;
299: end if;
292: close csr_U_balance_name_exists;
293: hr_utility.set_location(' Leaving:'||l_proc, 15);
294: fnd_message.set_name('PAY', 'PAY_50115_SBT_BALANCE_EXISTS');
295: fnd_message.set_token('BALANCE_NAME', p_balance_name);
296: fnd_message.raise_error;
297: end if;
298: close csr_U_balance_name_exists;
299: end if;
300: end if;
342: ,p_lookup_code => p_assignment_remuneration_flag
343: )
344: then
345: hr_utility.set_location(' Leaving:'||l_proc, 10);
346: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
347: fnd_message.set_token('LOOKUP_TYPE', 'YES_NO');
348: fnd_message.set_token('COLUMN', 'ASSIGNMENT_REMUNERATION_FLAG');
349: fnd_message.raise_error;
350: end if;
343: )
344: then
345: hr_utility.set_location(' Leaving:'||l_proc, 10);
346: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
347: fnd_message.set_token('LOOKUP_TYPE', 'YES_NO');
348: fnd_message.set_token('COLUMN', 'ASSIGNMENT_REMUNERATION_FLAG');
349: fnd_message.raise_error;
350: end if;
351: end if;
344: then
345: hr_utility.set_location(' Leaving:'||l_proc, 10);
346: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
347: fnd_message.set_token('LOOKUP_TYPE', 'YES_NO');
348: fnd_message.set_token('COLUMN', 'ASSIGNMENT_REMUNERATION_FLAG');
349: fnd_message.raise_error;
350: end if;
351: end if;
352: hr_utility.set_location(' Leaving:'||l_proc, 20);
345: hr_utility.set_location(' Leaving:'||l_proc, 10);
346: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
347: fnd_message.set_token('LOOKUP_TYPE', 'YES_NO');
348: fnd_message.set_token('COLUMN', 'ASSIGNMENT_REMUNERATION_FLAG');
349: fnd_message.raise_error;
350: end if;
351: end if;
352: hr_utility.set_location(' Leaving:'||l_proc, 20);
353: End chk_asg_remuneration_flag;
401: ,p_lookup_code => p_balance_uom
402: )
403: then
404: hr_utility.set_location(' Leaving:'||l_proc, 10);
405: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
406: fnd_message.set_token('LOOKUP_TYPE', 'UNITS');
407: fnd_message.set_token('COLUMN', 'BALANCE_UOM');
408: fnd_message.raise_error;
409: end if;
402: )
403: then
404: hr_utility.set_location(' Leaving:'||l_proc, 10);
405: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
406: fnd_message.set_token('LOOKUP_TYPE', 'UNITS');
407: fnd_message.set_token('COLUMN', 'BALANCE_UOM');
408: fnd_message.raise_error;
409: end if;
410: end if;
403: then
404: hr_utility.set_location(' Leaving:'||l_proc, 10);
405: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
406: fnd_message.set_token('LOOKUP_TYPE', 'UNITS');
407: fnd_message.set_token('COLUMN', 'BALANCE_UOM');
408: fnd_message.raise_error;
409: end if;
410: end if;
411: --
404: hr_utility.set_location(' Leaving:'||l_proc, 10);
405: fnd_message.set_name('PAY', 'HR_52966_INVALID_LOOKUP');
406: fnd_message.set_token('LOOKUP_TYPE', 'UNITS');
407: fnd_message.set_token('COLUMN', 'BALANCE_UOM');
408: fnd_message.raise_error;
409: end if;
410: end if;
411: --
412: if (l_api_updating and nvl(p_balance_uom, hr_api.g_varchar2) <>
419: fetch csr_chk_uom into l_exists;
420: if csr_chk_uom%notfound then
421: hr_utility.set_location(' Leaving:'||l_proc, 10);
422: close csr_chk_uom;
423: fnd_message.set_name('PAY', 'PAY_51522_SBT_UOM_MISMATCH');
424: fnd_message.raise_error;
425: end if;
426: close csr_chk_uom;
427: end if;
420: if csr_chk_uom%notfound then
421: hr_utility.set_location(' Leaving:'||l_proc, 10);
422: close csr_chk_uom;
423: fnd_message.set_name('PAY', 'PAY_51522_SBT_UOM_MISMATCH');
424: fnd_message.raise_error;
425: end if;
426: close csr_chk_uom;
427: end if;
428: --
465: fetch csr_valid_currency_code into l_valid;
466: if csr_valid_currency_code%notfound then
467: hr_utility.set_location(' Leaving:'||l_proc, 10);
468: close csr_valid_currency_code;
469: fnd_message.set_name('PAY', 'HR_51855_QUA_CCY_INV');
470: fnd_message.raise_error;
471: end if;
472: close csr_valid_currency_code;
473: end if;
466: if csr_valid_currency_code%notfound then
467: hr_utility.set_location(' Leaving:'||l_proc, 10);
468: close csr_valid_currency_code;
469: fnd_message.set_name('PAY', 'HR_51855_QUA_CCY_INV');
470: fnd_message.raise_error;
471: end if;
472: close csr_valid_currency_code;
473: end if;
474: hr_utility.set_location(' Leaving:'||l_proc, 15);
511: fetch csr_exclusion_rule_id_valid into l_valid;
512: if csr_exclusion_rule_id_valid%notfound then
513: hr_utility.set_location('Leaving:'||l_proc, 10);
514: close csr_exclusion_rule_id_valid;
515: fnd_message.set_name('PAY', 'PAY_50100_ETM_INVALID_EXC_RULE');
516: fnd_message.raise_error;
517: end if;
518: close csr_exclusion_rule_id_valid;
519: end if;
512: if csr_exclusion_rule_id_valid%notfound then
513: hr_utility.set_location('Leaving:'||l_proc, 10);
514: close csr_exclusion_rule_id_valid;
515: fnd_message.set_name('PAY', 'PAY_50100_ETM_INVALID_EXC_RULE');
516: fnd_message.raise_error;
517: end if;
518: close csr_exclusion_rule_id_valid;
519: end if;
520: end if;
563: -- Only one of the base_balance_name and base_balance_type_id may be
564: -- not null.
565: --
566: if (p_base_balance_type_id is not null and p_base_balance_name is not null) then
567: fnd_message.set_name('PAY', 'PAY_51523_SBT_ID_TYPE_NOT_NULL');
568: fnd_message.raise_error;
569: end if;
570: --
571: if p_base_balance_type_id is not null then
564: -- not null.
565: --
566: if (p_base_balance_type_id is not null and p_base_balance_name is not null) then
567: fnd_message.set_name('PAY', 'PAY_51523_SBT_ID_TYPE_NOT_NULL');
568: fnd_message.raise_error;
569: end if;
570: --
571: if p_base_balance_type_id is not null then
572: --
577: fetch csr_chk_template into l_exists;
578: if csr_chk_template%notfound then
579: hr_utility.set_location(' Leaving:'||l_proc, 20);
580: close csr_chk_template;
581: fnd_message.set_name('PAY', 'PAY_51524_SBT_INVALID_BASENAME');
582: fnd_message.raise_error;
583: end if;
584: close csr_chk_template;
585: --
578: if csr_chk_template%notfound then
579: hr_utility.set_location(' Leaving:'||l_proc, 20);
580: close csr_chk_template;
581: fnd_message.set_name('PAY', 'PAY_51524_SBT_INVALID_BASENAME');
582: fnd_message.raise_error;
583: end if;
584: close csr_chk_template;
585: --
586: -- Look for circular references in base balance. This is only
594: --
595: if l_api_updating then
596: for crec in csr_base_balances loop
597: if crec.base_balance_type_id = p_balance_type_id then
598: fnd_message.set_name('PAY', 'PAY_50212_SBT_CIRCULAR_BAL_REF');
599: fnd_message.raise_error;
600: end if;
601: end loop;
602: end if;
595: if l_api_updating then
596: for crec in csr_base_balances loop
597: if crec.base_balance_type_id = p_balance_type_id then
598: fnd_message.set_name('PAY', 'PAY_50212_SBT_CIRCULAR_BAL_REF');
599: fnd_message.raise_error;
600: end if;
601: end loop;
602: end if;
603: end if;
644: fetch csr_input_value_exists into l_exists;
645: if csr_input_value_exists%notfound then
646: hr_utility.set_location(' Leaving:'||l_proc, 10);
647: close csr_input_value_exists;
648: fnd_message.set_name('PAY', 'PAY_50098_ETM_INVALID_INP_VAL');
649: fnd_message.raise_error;
650: end if;
651: close csr_input_value_exists;
652: --
645: if csr_input_value_exists%notfound then
646: hr_utility.set_location(' Leaving:'||l_proc, 10);
647: close csr_input_value_exists;
648: fnd_message.set_name('PAY', 'PAY_50098_ETM_INVALID_INP_VAL');
649: fnd_message.raise_error;
650: end if;
651: close csr_input_value_exists;
652: --
653: -- Check that the UOMs are compatible
656: fetch csr_chk_uom into l_exists;
657: if csr_chk_uom%notfound then
658: hr_utility.set_location(' Leaving:'||l_proc, 10);
659: close csr_chk_uom;
660: fnd_message.set_name('PAY', 'PAY_51522_SBT_UOM_MISMATCH');
661: fnd_message.raise_error;
662: end if;
663: close csr_chk_uom;
664: end if;
657: if csr_chk_uom%notfound then
658: hr_utility.set_location(' Leaving:'||l_proc, 10);
659: close csr_chk_uom;
660: fnd_message.set_name('PAY', 'PAY_51522_SBT_UOM_MISMATCH');
661: fnd_message.raise_error;
662: end if;
663: close csr_chk_uom;
664: end if;
665: --
767: close csr_balance_types;
768: hr_utility.set_location(' Leaving:'||l_proc, 100);
769: exception
770: when l_error then
771: fnd_message.set_name('PAY', 'PAY_50117_SBT_INVALID_DELETE');
772: fnd_message.raise_error;
773: when others then
774: hr_utility.set_location(' Leaving:'||l_proc, 110);
775: raise;
768: hr_utility.set_location(' Leaving:'||l_proc, 100);
769: exception
770: when l_error then
771: fnd_message.set_name('PAY', 'PAY_50117_SBT_INVALID_DELETE');
772: fnd_message.raise_error;
773: when others then
774: hr_utility.set_location(' Leaving:'||l_proc, 110);
775: raise;
776: End chk_delete;