66: BEGIN
67: --
68: -- Added for GSI Bug 5472781
69: --
70: IF hr_utility.chk_product_install('Oracle Human Resources', 'ES') THEN
71: --
72: l_proc := 'PER_ES_UPDATE_PERSON.UPDATE_ES_PERSON';
73: OPEN csr_person_type;
74: FETCH csr_person_type into l_chk;
104: l_identifier_value IS NULL THEN
105: OPEN get_lookup_type(l_identifier_type);
106: FETCH get_lookup_type into l_identifier_type;
107: IF get_lookup_type%NOTFOUND THEN
108: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
109: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_FORM_LABELS','IDENTIFIER_TYPE'));
110: hr_utility.raise_error;
111: END IF;
112: CLOSE get_lookup_type;
105: OPEN get_lookup_type(l_identifier_type);
106: FETCH get_lookup_type into l_identifier_type;
107: IF get_lookup_type%NOTFOUND THEN
108: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
109: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_FORM_LABELS','IDENTIFIER_TYPE'));
110: hr_utility.raise_error;
111: END IF;
112: CLOSE get_lookup_type;
113:
106: FETCH get_lookup_type into l_identifier_type;
107: IF get_lookup_type%NOTFOUND THEN
108: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
109: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_FORM_LABELS','IDENTIFIER_TYPE'));
110: hr_utility.raise_error;
111: END IF;
112: CLOSE get_lookup_type;
113:
114: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
110: hr_utility.raise_error;
111: END IF;
112: CLOSE get_lookup_type;
113:
114: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
115: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_IDENTIFIER_TYPE',l_identifier_type));
116: hr_utility.raise_error;
117: END IF;
118: --
111: END IF;
112: CLOSE get_lookup_type;
113:
114: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
115: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_IDENTIFIER_TYPE',l_identifier_type));
116: hr_utility.raise_error;
117: END IF;
118: --
119: IF l_identifier_type IS NULL AND
112: CLOSE get_lookup_type;
113:
114: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
115: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_IDENTIFIER_TYPE',l_identifier_type));
116: hr_utility.raise_error;
117: END IF;
118: --
119: IF l_identifier_type IS NULL AND
120: l_identifier_value IS NOT NULL THEN
117: END IF;
118: --
119: IF l_identifier_type IS NULL AND
120: l_identifier_value IS NOT NULL THEN
121: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
122: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_FORM_LABELS','IDENTIFIER_TYPE'));
123: hr_utility.raise_error;
124: END IF;
125: --
118: --
119: IF l_identifier_type IS NULL AND
120: l_identifier_value IS NOT NULL THEN
121: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
122: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_FORM_LABELS','IDENTIFIER_TYPE'));
123: hr_utility.raise_error;
124: END IF;
125: --
126: IF FND_PROFILE.VALUE('PER_NATIONAL_IDENTIFIER_VALIDATION') <> 'NONE' AND ---Bug No 4718049
119: IF l_identifier_type IS NULL AND
120: l_identifier_value IS NOT NULL THEN
121: hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
122: hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_FORM_LABELS','IDENTIFIER_TYPE'));
123: hr_utility.raise_error;
124: END IF;
125: --
126: IF FND_PROFILE.VALUE('PER_NATIONAL_IDENTIFIER_VALIDATION') <> 'NONE' AND ---Bug No 4718049
127: l_identifier_type IS NOT NULL AND l_identifier_value IS NOT NULL THEN
146: END IF;
147: IF l_chk = 'Y' THEN
148: IF FND_PROFILE.VALUE('PER_NATIONAL_IDENTIFIER_VALIDATION') <> 'NONE' AND --- Bug No 4718049
149: l_national_identifier IS NULL AND l_identifier_value IS NULL THEN
150: hr_utility.set_message(800, 'HR_ES_REQ_NIF_IDT_MISSING');
151: hr_utility.raise_error;
152: END IF;
153: END IF;
154: /*IF p_national_identifier is not null THEN
147: IF l_chk = 'Y' THEN
148: IF FND_PROFILE.VALUE('PER_NATIONAL_IDENTIFIER_VALIDATION') <> 'NONE' AND --- Bug No 4718049
149: l_national_identifier IS NULL AND l_identifier_value IS NULL THEN
150: hr_utility.set_message(800, 'HR_ES_REQ_NIF_IDT_MISSING');
151: hr_utility.raise_error;
152: END IF;
153: END IF;
154: /*IF p_national_identifier is not null THEN
155: l_national_identifier := hr_es_utility.check_NIF(p_national_identifier);
157: IF l_national_identifier IS NOT NULL AND l_identifier_value IS NOT NULL THEN
158: IF FND_PROFILE.VALUE('PER_NATIONAL_IDENTIFIER_VALIDATION') <> 'NONE' AND --- Bug No 4718049
159: substr(l_national_identifier,1,8) <> l_identifier_value AND
160: l_identifier_type = 'DNI' THEN
161: hr_utility.set_message(800,'HR_ES_INVALID_DNI_NIF');
162: hr_utility.raise_error;
163: END IF;
164: END IF;
165: END IF;
158: IF FND_PROFILE.VALUE('PER_NATIONAL_IDENTIFIER_VALIDATION') <> 'NONE' AND --- Bug No 4718049
159: substr(l_national_identifier,1,8) <> l_identifier_value AND
160: l_identifier_type = 'DNI' THEN
161: hr_utility.set_message(800,'HR_ES_INVALID_DNI_NIF');
162: hr_utility.raise_error;
163: END IF;
164: END IF;
165: END IF;
166: --
170: p_argument_value => p_last_name
171: );
172: --
173: IF length(p_last_name)>40 THEN
174: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
175: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_1'));
176: hr_utility.set_message_token('COLUMN_VALUE',p_last_name);
177: hr_utility.set_message_token('MAX_LENGTH','40');
178: hr_utility.raise_error;
171: );
172: --
173: IF length(p_last_name)>40 THEN
174: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
175: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_1'));
176: hr_utility.set_message_token('COLUMN_VALUE',p_last_name);
177: hr_utility.set_message_token('MAX_LENGTH','40');
178: hr_utility.raise_error;
179: END IF;
172: --
173: IF length(p_last_name)>40 THEN
174: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
175: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_1'));
176: hr_utility.set_message_token('COLUMN_VALUE',p_last_name);
177: hr_utility.set_message_token('MAX_LENGTH','40');
178: hr_utility.raise_error;
179: END IF;
180: --
173: IF length(p_last_name)>40 THEN
174: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
175: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_1'));
176: hr_utility.set_message_token('COLUMN_VALUE',p_last_name);
177: hr_utility.set_message_token('MAX_LENGTH','40');
178: hr_utility.raise_error;
179: END IF;
180: --
181: --
174: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
175: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_1'));
176: hr_utility.set_message_token('COLUMN_VALUE',p_last_name);
177: hr_utility.set_message_token('MAX_LENGTH','40');
178: hr_utility.raise_error;
179: END IF;
180: --
181: --
182: IF p_per_information1 is not null THEN
180: --
181: --
182: IF p_per_information1 is not null THEN
183: IF length(p_per_information1)>40 THEN
184: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
185: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_2'));
186: hr_utility.set_message_token('COLUMN_VALUE',p_per_information1);
187: hr_utility.set_message_token('MAX_LENGTH','40');
188: hr_utility.raise_error;
181: --
182: IF p_per_information1 is not null THEN
183: IF length(p_per_information1)>40 THEN
184: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
185: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_2'));
186: hr_utility.set_message_token('COLUMN_VALUE',p_per_information1);
187: hr_utility.set_message_token('MAX_LENGTH','40');
188: hr_utility.raise_error;
189: END IF;
182: IF p_per_information1 is not null THEN
183: IF length(p_per_information1)>40 THEN
184: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
185: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_2'));
186: hr_utility.set_message_token('COLUMN_VALUE',p_per_information1);
187: hr_utility.set_message_token('MAX_LENGTH','40');
188: hr_utility.raise_error;
189: END IF;
190: END IF;
183: IF length(p_per_information1)>40 THEN
184: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
185: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_2'));
186: hr_utility.set_message_token('COLUMN_VALUE',p_per_information1);
187: hr_utility.set_message_token('MAX_LENGTH','40');
188: hr_utility.raise_error;
189: END IF;
190: END IF;
191: --
184: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
185: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','LAST_NAME_2'));
186: hr_utility.set_message_token('COLUMN_VALUE',p_per_information1);
187: hr_utility.set_message_token('MAX_LENGTH','40');
188: hr_utility.raise_error;
189: END IF;
190: END IF;
191: --
192: IF p_first_name is not null THEN
190: END IF;
191: --
192: IF p_first_name is not null THEN
193: IF length(p_first_name)>40 THEN
194: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
195: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','NAME'));
196: hr_utility.set_message_token('COLUMN_VALUE',p_first_name);
197: hr_utility.set_message_token('MAX_LENGTH','40');
198: hr_utility.raise_error;
191: --
192: IF p_first_name is not null THEN
193: IF length(p_first_name)>40 THEN
194: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
195: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','NAME'));
196: hr_utility.set_message_token('COLUMN_VALUE',p_first_name);
197: hr_utility.set_message_token('MAX_LENGTH','40');
198: hr_utility.raise_error;
199: END IF;
192: IF p_first_name is not null THEN
193: IF length(p_first_name)>40 THEN
194: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
195: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','NAME'));
196: hr_utility.set_message_token('COLUMN_VALUE',p_first_name);
197: hr_utility.set_message_token('MAX_LENGTH','40');
198: hr_utility.raise_error;
199: END IF;
200: END IF;
193: IF length(p_first_name)>40 THEN
194: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
195: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','NAME'));
196: hr_utility.set_message_token('COLUMN_VALUE',p_first_name);
197: hr_utility.set_message_token('MAX_LENGTH','40');
198: hr_utility.raise_error;
199: END IF;
200: END IF;
201: END IF;
194: hr_utility.set_message(800, 'HR_289712_UTF8_LENGTH_EXCEEDED');
195: hr_utility.set_message_token('COLUMN_NAME',hr_general.decode_lookup('ES_FORM_LABELS','NAME'));
196: hr_utility.set_message_token('COLUMN_VALUE',p_first_name);
197: hr_utility.set_message_token('MAX_LENGTH','40');
198: hr_utility.raise_error;
199: END IF;
200: END IF;
201: END IF;
202: END update_es_person;