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 = 'PER_SHARED_TYPES_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 = 'PER_SHARED_TYPES_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: ElsIf (p_constraint_name = 'PER_SHARED_TYPE_UK1') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PER_SHARED_TYPES_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: ElsIf (p_constraint_name = 'PER_SHARED_TYPE_UK1') Then
27: hr_utility.set_message(801, 'PER_9999_DUP_USR_TYP_CODE_COMB');
20: --
21: If (p_constraint_name = 'PER_SHARED_TYPES_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: ElsIf (p_constraint_name = 'PER_SHARED_TYPE_UK1') Then
27: hr_utility.set_message(801, 'PER_9999_DUP_USR_TYP_CODE_COMB');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'PER_SHARED_TYPES_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: ElsIf (p_constraint_name = 'PER_SHARED_TYPE_UK1') Then
27: hr_utility.set_message(801, 'PER_9999_DUP_USR_TYP_CODE_COMB');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SHARED_TYPE_UK1') Then
27: hr_utility.set_message(801, 'PER_9999_DUP_USR_TYP_CODE_COMB');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: Else
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SHARED_TYPE_UK1') Then
27: hr_utility.set_message(801, 'PER_9999_DUP_USR_TYP_CODE_COMB');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: Else
32: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SHARED_TYPE_UK1') Then
27: hr_utility.set_message(801, 'PER_9999_DUP_USR_TYP_CODE_COMB');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: Else
32: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
26: ElsIf (p_constraint_name = 'PER_SHARED_TYPE_UK1') Then
27: hr_utility.set_message(801, 'PER_9999_DUP_USR_TYP_CODE_COMB');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: Else
32: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: Else
32: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
35: hr_utility.raise_error;
36: End If;
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: Else
32: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
35: hr_utility.raise_error;
36: End If;
37: --
30: hr_utility.raise_error;
31: Else
32: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
35: hr_utility.raise_error;
36: End If;
37: --
38: hr_utility.set_location(' Leaving:'||l_proc, 10);
31: Else
32: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
35: hr_utility.raise_error;
36: End If;
37: --
38: hr_utility.set_location(' Leaving:'||l_proc, 10);
39: End constraint_error;
34: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
35: hr_utility.raise_error;
36: End If;
37: --
38: hr_utility.set_location(' Leaving:'||l_proc, 10);
39: End constraint_error;
40: --
41: -- ----------------------------------------------------------------------------
42: -- |-----------------------------< api_updating >-----------------------------|
96: l_proc varchar2(72) := g_package||'api_updating';
97: l_fct_ret boolean;
98: --
99: Begin
100: hr_utility.set_location('Entering:'||l_proc, 5);
101: --
102: If (
103: p_shared_type_id is null and
104: p_object_version_number is null
112: If (
113: p_shared_type_id = g_old_rec.shared_type_id and
114: p_object_version_number = g_old_rec.object_version_number
115: ) Then
116: hr_utility.set_location(l_proc, 10);
117: --
118: -- The g_old_rec is current therefore we must
119: -- set the returning function to true
120: --
129: Close C_Sel1;
130: --
131: -- The primary key is invalid therefore we must error
132: --
133: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
134: hr_utility.raise_error;
135: End If;
136: Close C_Sel1;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
130: --
131: -- The primary key is invalid therefore we must error
132: --
133: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
134: hr_utility.raise_error;
135: End If;
136: Close C_Sel1;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
138: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
134: hr_utility.raise_error;
135: End If;
136: Close C_Sel1;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
138: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
139: hr_utility.raise_error;
140: End If;
141: hr_utility.set_location(l_proc, 15);
142: l_fct_ret := true;
135: End If;
136: Close C_Sel1;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
138: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
139: hr_utility.raise_error;
140: End If;
141: hr_utility.set_location(l_proc, 15);
142: l_fct_ret := true;
143: End If;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
138: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
139: hr_utility.raise_error;
140: End If;
141: hr_utility.set_location(l_proc, 15);
142: l_fct_ret := true;
143: End If;
144: End If;
145: hr_utility.set_location(' Leaving:'||l_proc, 20);
141: hr_utility.set_location(l_proc, 15);
142: l_fct_ret := true;
143: End If;
144: End If;
145: hr_utility.set_location(' Leaving:'||l_proc, 20);
146: Return (l_fct_ret);
147: --
148: End api_updating;
149: --
203: --
204: l_proc varchar2(72) := g_package||'lck';
205: --
206: Begin
207: hr_utility.set_location('Entering:'||l_proc, 5);
208: --
209: -- Add any mandatory argument checking here:
210: -- Example:
211: -- hr_api.mandatory_arg_error
219: Close C_Sel1;
220: --
221: -- The primary key is invalid therefore we must error
222: --
223: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
224: hr_utility.raise_error;
225: End If;
226: Close C_Sel1;
227: If (p_object_version_number <> g_old_rec.object_version_number) Then
220: --
221: -- The primary key is invalid therefore we must error
222: --
223: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
224: hr_utility.raise_error;
225: End If;
226: Close C_Sel1;
227: If (p_object_version_number <> g_old_rec.object_version_number) Then
228: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
224: hr_utility.raise_error;
225: End If;
226: Close C_Sel1;
227: If (p_object_version_number <> g_old_rec.object_version_number) Then
228: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
229: hr_utility.raise_error;
230: End If;
231: --
232: hr_utility.set_location(' Leaving:'||l_proc, 10);
225: End If;
226: Close C_Sel1;
227: If (p_object_version_number <> g_old_rec.object_version_number) Then
228: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
229: hr_utility.raise_error;
230: End If;
231: --
232: hr_utility.set_location(' Leaving:'||l_proc, 10);
233: --
228: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
229: hr_utility.raise_error;
230: End If;
231: --
232: hr_utility.set_location(' Leaving:'||l_proc, 10);
233: --
234: -- We need to trap the ORA LOCK exception
235: --
236: Exception
238: --
239: -- The object is locked therefore we need to supply a meaningful
240: -- error message.
241: --
242: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
243: hr_utility.set_message_token('TABLE_NAME', 'per_shared_types');
244: hr_utility.raise_error;
245: End lck;
246: --
239: -- The object is locked therefore we need to supply a meaningful
240: -- error message.
241: --
242: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
243: hr_utility.set_message_token('TABLE_NAME', 'per_shared_types');
244: hr_utility.raise_error;
245: End lck;
246: --
247: -- ----------------------------------------------------------------------------
240: -- error message.
241: --
242: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
243: hr_utility.set_message_token('TABLE_NAME', 'per_shared_types');
244: hr_utility.raise_error;
245: End lck;
246: --
247: -- ----------------------------------------------------------------------------
248: -- |-----------------------------< convert_args >-----------------------------|
294: l_proc varchar2(72) := g_package||'convert_args';
295: --
296: Begin
297: --
298: hr_utility.set_location('Entering:'||l_proc, 5);
299: --
300: -- Convert arguments into local l_rec structure.
301: --
302: l_rec.shared_type_id := p_shared_type_id;
339: l_rec.lookup_type := p_lookup_type;
340: --
341: -- Return the plsql record structure.
342: --
343: hr_utility.set_location(' Leaving:'||l_proc, 10);
344: Return(l_rec);
345: --
346: End convert_args;
347: --