73: --
74: -- The primary key is invalid therefore we must error
75: --
76: close csr_leg_code;
77: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
78: fnd_message.raise_error;
79: end if;
80: if g_debug then
81: hr_utility.set_location(l_proc,30);
74: -- The primary key is invalid therefore we must error
75: --
76: close csr_leg_code;
77: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
78: fnd_message.raise_error;
79: end if;
80: if g_debug then
81: hr_utility.set_location(l_proc,30);
82: end if;
140: open csr_get_created_by(p_name_format_id);
141: fetch csr_get_created_by into l_created_by;
142: close csr_get_created_by;
143: if l_created_by is not null and l_created_by = 2 then
144: fnd_message.set_name('PER','HR_449576_SEED_NMF_DEL');
145: fnd_message.raise_error;
146: end if;
147: --
148: if g_debug then
141: fetch csr_get_created_by into l_created_by;
142: close csr_get_created_by;
143: if l_created_by is not null and l_created_by = 2 then
144: fnd_message.set_name('PER','HR_449576_SEED_NMF_DEL');
145: fnd_message.raise_error;
146: end if;
147: --
148: if g_debug then
149: hr_utility.set_location('Leaving:'||l_proc, 100);
198: IF NOT hr_nmf_shd.api_updating
199: (p_name_format_id => p_rec.name_format_id
200: ,p_object_version_number => p_rec.object_version_number
201: ) THEN
202: fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
203: fnd_message.set_token('PROCEDURE ', l_proc);
204: fnd_message.set_token('STEP ', '5');
205: fnd_message.raise_error;
206: END IF;
199: (p_name_format_id => p_rec.name_format_id
200: ,p_object_version_number => p_rec.object_version_number
201: ) THEN
202: fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
203: fnd_message.set_token('PROCEDURE ', l_proc);
204: fnd_message.set_token('STEP ', '5');
205: fnd_message.raise_error;
206: END IF;
207: --
200: ,p_object_version_number => p_rec.object_version_number
201: ) THEN
202: fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
203: fnd_message.set_token('PROCEDURE ', l_proc);
204: fnd_message.set_token('STEP ', '5');
205: fnd_message.raise_error;
206: END IF;
207: --
208: if nvl(p_rec.format_name,hr_api.g_varchar2) <> hr_nmf_shd.g_old_rec.format_name then
201: ) THEN
202: fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
203: fnd_message.set_token('PROCEDURE ', l_proc);
204: fnd_message.set_token('STEP ', '5');
205: fnd_message.raise_error;
206: END IF;
207: --
208: if nvl(p_rec.format_name,hr_api.g_varchar2) <> hr_nmf_shd.g_old_rec.format_name then
209: l_argument := 'format_name';
360: (p_effective_date => p_effective_date
361: ,p_lookup_type => 'PER_NAME_FORMATS'
362: ,p_lookup_code => p_format_name) then
363: --
364: fnd_message.set_name('PER', 'HR_449575_FORMAT_NAME_INV');
365: fnd_message.raise_error;
366: end if;
367: end if;
368: --
361: ,p_lookup_type => 'PER_NAME_FORMATS'
362: ,p_lookup_code => p_format_name) then
363: --
364: fnd_message.set_name('PER', 'HR_449575_FORMAT_NAME_INV');
365: fnd_message.raise_error;
366: end if;
367: end if;
368: --
369: if g_debug then
423: IF p_legislation_code IS NOT NULL THEN
424: l_value := hr_general.DECODE_TERRITORY(P_TERRITORY_CODE => p_legislation_code);
425:
426: IF l_value IS NULL then
427: fnd_message.set_name('PER','PER_449075_CAL_LEG_CODE');
428: fnd_message.raise_error;
429: END IF;
430: --
431: END IF;
424: l_value := hr_general.DECODE_TERRITORY(P_TERRITORY_CODE => p_legislation_code);
425:
426: IF l_value IS NULL then
427: fnd_message.set_name('PER','PER_449075_CAL_LEG_CODE');
428: fnd_message.raise_error;
429: END IF;
430: --
431: END IF;
432: --
523: (p_effective_date => p_effective_date
524: ,p_lookup_type => 'PER_NAME_FORMAT_CHOICE'
525: ,p_lookup_code => p_user_format_choice) then
526:
527: fnd_message.set_name('PER', 'HR_449571_FORMAT_CHOICE_INV');
528: fnd_message.raise_error;
529: elsif p_user_format_choice not in ('G','L') then
530: --
531: -- ensure it only uses 'G' or 'L'
524: ,p_lookup_type => 'PER_NAME_FORMAT_CHOICE'
525: ,p_lookup_code => p_user_format_choice) then
526:
527: fnd_message.set_name('PER', 'HR_449571_FORMAT_CHOICE_INV');
528: fnd_message.raise_error;
529: elsif p_user_format_choice not in ('G','L') then
530: --
531: -- ensure it only uses 'G' or 'L'
532: --
529: elsif p_user_format_choice not in ('G','L') then
530: --
531: -- ensure it only uses 'G' or 'L'
532: --
533: fnd_message.set_name('PER', 'HR_449571_FORMAT_CHOICE_INV');
534: fnd_message.raise_error;
535: end if;
536: end if;
537: --
530: --
531: -- ensure it only uses 'G' or 'L'
532: --
533: fnd_message.set_name('PER', 'HR_449571_FORMAT_CHOICE_INV');
534: fnd_message.raise_error;
535: end if;
536: end if;
537: --
538: if p_format_name = 'DISPLAY_NAME' OR p_format_name = 'LIST_NAME' then
547: --
548: if (p_format_name = 'FULL_NAME' OR p_format_name = 'ORDER_NAME')
549: AND (p_user_format_choice is not null and p_user_format_choice <> 'L') then
550: --
551: fnd_message.set_name('PER', 'HR_449572_FORMAT_CHOICE_INV');
552: fnd_message.raise_error;
553: end if;
554: --
555: if g_debug then
548: if (p_format_name = 'FULL_NAME' OR p_format_name = 'ORDER_NAME')
549: AND (p_user_format_choice is not null and p_user_format_choice <> 'L') then
550: --
551: fnd_message.set_name('PER', 'HR_449572_FORMAT_CHOICE_INV');
552: fnd_message.raise_error;
553: end if;
554: --
555: if g_debug then
556: hr_utility.set_location('Leaving:'||l_proc, 70);
627: );
628: --
629: l_format := p_format_mask;
630: if l_format is null then
631: fnd_message.set_name('PER','HR_449604_NMF_NULL_MASK');
632: fnd_message.raise_error;
633: end if;
634: --
635: -- Verify a token might exist
628: --
629: l_format := p_format_mask;
630: if l_format is null then
631: fnd_message.set_name('PER','HR_449604_NMF_NULL_MASK');
632: fnd_message.raise_error;
633: end if;
634: --
635: -- Verify a token might exist
636: -- Minimum required syntax: '|$token$|' where min(length(token)) = 1
636: -- Minimum required syntax: '|$token$|' where min(length(token)) = 1
637: --
638: l_token_start_pos := instr(l_format,'$');
639: if l_token_start_pos = 0 or length(l_format) < 5 then
640: fnd_message.set_name('PER','HR_449573_FORMAT_MASK_INV');
641: fnd_message.raise_error;
642: end if;
643: while l_format is not null loop
644: l_token_start_pos := instr(l_format,'$')+1;
637: --
638: l_token_start_pos := instr(l_format,'$');
639: if l_token_start_pos = 0 or length(l_format) < 5 then
640: fnd_message.set_name('PER','HR_449573_FORMAT_MASK_INV');
641: fnd_message.raise_error;
642: end if;
643: while l_format is not null loop
644: l_token_start_pos := instr(l_format,'$')+1;
645: --
652: l_token := substr(l_format,l_token_start_pos);
653: l_format := null;
654: end if;
655: if l_token is null then
656: fnd_message.set_name('PER','HR_449573_FORMAT_MASK_INV');
657: fnd_message.raise_error;
658: else
659: if hr_api.not_exists_in_hrstanlookups
660: (p_effective_date => p_effective_date
653: l_format := null;
654: end if;
655: if l_token is null then
656: fnd_message.set_name('PER','HR_449573_FORMAT_MASK_INV');
657: fnd_message.raise_error;
658: else
659: if hr_api.not_exists_in_hrstanlookups
660: (p_effective_date => p_effective_date
661: ,p_lookup_type => 'PER_FORMAT_MASK_TOKENS'
660: (p_effective_date => p_effective_date
661: ,p_lookup_type => 'PER_FORMAT_MASK_TOKENS'
662: ,p_lookup_code => l_token) then
663: --
664: fnd_message.set_name('PER','HR_449573_FORMAT_MASK_INV');
665: fnd_message.raise_error;
666: end if;
667: end if;
668: else
661: ,p_lookup_type => 'PER_FORMAT_MASK_TOKENS'
662: ,p_lookup_code => l_token) then
663: --
664: fnd_message.set_name('PER','HR_449573_FORMAT_MASK_INV');
665: fnd_message.raise_error;
666: end if;
667: end if;
668: else
669: l_format := null;
754: open csr_validate_combination(p_format_name,p_legislation_code,p_user_format_choice);
755: fetch csr_validate_combination into l_value_exists;
756: if csr_validate_combination%FOUND then
757: close csr_validate_combination;
758: fnd_message.set_name('PER','HR_449574_NAME_LEG_INV');
759: fnd_message.raise_error;
760: else
761: close csr_validate_combination;
762: end if;
755: fetch csr_validate_combination into l_value_exists;
756: if csr_validate_combination%FOUND then
757: close csr_validate_combination;
758: fnd_message.set_name('PER','HR_449574_NAME_LEG_INV');
759: fnd_message.raise_error;
760: else
761: close csr_validate_combination;
762: end if;
763: if g_debug then