15: --
16: l_proc varchar2(72) := g_package||'constraint_error';
17: --
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PAY_ELEMENT_TEMPLATES_PK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PAY_ELEMENT_TEMPLATES_PK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: Else
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PAY_ELEMENT_TEMPLATES_PK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: Else
27: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
20: --
21: If (p_constraint_name = 'PAY_ELEMENT_TEMPLATES_PK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: Else
27: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'PAY_ELEMENT_TEMPLATES_PK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: Else
27: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: Else
27: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
30: hr_utility.raise_error;
31: End If;
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: Else
27: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
30: hr_utility.raise_error;
31: End If;
32: --
25: hr_utility.raise_error;
26: Else
27: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
30: hr_utility.raise_error;
31: End If;
32: --
33: hr_utility.set_location(' Leaving:'||l_proc, 10);
26: Else
27: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
30: hr_utility.raise_error;
31: End If;
32: --
33: hr_utility.set_location(' Leaving:'||l_proc, 10);
34: End constraint_error;
29: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
30: hr_utility.raise_error;
31: End If;
32: --
33: hr_utility.set_location(' Leaving:'||l_proc, 10);
34: End constraint_error;
35: --
36: -- ----------------------------------------------------------------------------
37: -- |-----------------------------< api_updating >-----------------------------|
125: l_proc varchar2(72) := g_package||'api_updating';
126: l_fct_ret boolean;
127: --
128: Begin
129: hr_utility.set_location('Entering:'||l_proc, 5);
130: --
131: If (
132: p_template_id is null and
133: p_object_version_number is null
141: If (
142: p_template_id = g_old_rec.template_id and
143: p_object_version_number = g_old_rec.object_version_number
144: ) Then
145: hr_utility.set_location(l_proc, 10);
146: --
147: -- The g_old_rec is current therefore we must
148: -- set the returning function to true
149: --
158: Close C_Sel1;
159: --
160: -- The primary key is invalid therefore we must error
161: --
162: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
159: --
160: -- The primary key is invalid therefore we must error
161: --
162: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: hr_utility.set_location(l_proc, 15);
171: l_fct_ret := true;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: hr_utility.set_location(l_proc, 15);
171: l_fct_ret := true;
172: End If;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: hr_utility.set_location(l_proc, 15);
171: l_fct_ret := true;
172: End If;
173: End If;
174: hr_utility.set_location(' Leaving:'||l_proc, 20);
170: hr_utility.set_location(l_proc, 15);
171: l_fct_ret := true;
172: End If;
173: End If;
174: hr_utility.set_location(' Leaving:'||l_proc, 20);
175: Return (l_fct_ret);
176: --
177: End api_updating;
178: --
266: --
267: l_proc varchar2(72) := g_package||'lck';
268: --
269: Begin
270: hr_utility.set_location('Entering:'||l_proc, 5);
271: --
272: -- Check for mandatory arguments.
273: --
274: hr_api.mandatory_arg_error
288: Close C_Sel1;
289: --
290: -- The primary key is invalid therefore we must error
291: --
292: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
293: hr_utility.raise_error;
294: End If;
295: Close C_Sel1;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
289: --
290: -- The primary key is invalid therefore we must error
291: --
292: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
293: hr_utility.raise_error;
294: End If;
295: Close C_Sel1;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
297: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
293: hr_utility.raise_error;
294: End If;
295: Close C_Sel1;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
297: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
298: hr_utility.raise_error;
299: End If;
300: --
301: hr_utility.set_location(' Leaving:'||l_proc, 10);
294: End If;
295: Close C_Sel1;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
297: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
298: hr_utility.raise_error;
299: End If;
300: --
301: hr_utility.set_location(' Leaving:'||l_proc, 10);
302: --
297: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
298: hr_utility.raise_error;
299: End If;
300: --
301: hr_utility.set_location(' Leaving:'||l_proc, 10);
302: --
303: -- We need to trap the ORA LOCK exception
304: --
305: Exception
307: --
308: -- The object is locked therefore we need to supply a meaningful
309: -- error message.
310: --
311: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
312: hr_utility.set_message_token('TABLE_NAME', 'pay_element_templates');
313: hr_utility.raise_error;
314: End lck;
315: --
308: -- The object is locked therefore we need to supply a meaningful
309: -- error message.
310: --
311: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
312: hr_utility.set_message_token('TABLE_NAME', 'pay_element_templates');
313: hr_utility.raise_error;
314: End lck;
315: --
316: -- ----------------------------------------------------------------------------
309: -- error message.
310: --
311: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
312: hr_utility.set_message_token('TABLE_NAME', 'pay_element_templates');
313: hr_utility.raise_error;
314: End lck;
315: --
316: -- ----------------------------------------------------------------------------
317: -- |-----------------------------< convert_args >-----------------------------|
397: l_proc varchar2(72) := g_package||'convert_args';
398: --
399: Begin
400: --
401: hr_utility.set_location('Entering:'||l_proc, 5);
402: --
403: -- Convert arguments into local l_rec structure.
404: --
405: l_rec.template_id := p_template_id;
476: l_rec.object_version_number := p_object_version_number;
477: --
478: -- Return the plsql record structure.
479: --
480: hr_utility.set_location(' Leaving:'||l_proc, 10);
481: Return(l_rec);
482: --
483: End convert_args;
484: --