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 = 'BEN_ABR_EXTRA_INFO_FK1') Then
22: hr_utility.set_message(801, 'HR_INV_INFO_TYPE');
23: hr_utility.raise_error;
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'BEN_ABR_EXTRA_INFO_FK1') Then
22: hr_utility.set_message(801, 'HR_INV_INFO_TYPE');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_FK2') Then
25: hr_utility.set_message(801, 'HR_INV_pl_ID');
26: hr_utility.raise_error;
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'BEN_ABR_EXTRA_INFO_FK1') Then
22: hr_utility.set_message(801, 'HR_INV_INFO_TYPE');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_FK2') Then
25: hr_utility.set_message(801, 'HR_INV_pl_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_PK') Then
21: If (p_constraint_name = 'BEN_ABR_EXTRA_INFO_FK1') Then
22: hr_utility.set_message(801, 'HR_INV_INFO_TYPE');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_FK2') Then
25: hr_utility.set_message(801, 'HR_INV_pl_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
22: hr_utility.set_message(801, 'HR_INV_INFO_TYPE');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_FK2') Then
25: hr_utility.set_message(801, 'HR_INV_pl_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
24: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_FK2') Then
25: hr_utility.set_message(801, 'HR_INV_pl_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
25: hr_utility.set_message(801, 'HR_INV_pl_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
27: ElsIf (p_constraint_name = 'BEN_ABR_EXTRA_INFO_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
40: End constraint_error;
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
40: End constraint_error;
41: --
42: -- ----------------------------------------------------------------------------
43: -- |-----------------------------< api_updating >-----------------------------|
120: l_proc varchar2(72) := g_package||'api_updating';
121: l_fct_ret boolean;
122: --
123: Begin
124: hr_utility.set_location('Entering:'||l_proc, 5);
125: --
126: If (
127: p_abr_extra_info_id is null and
128: p_object_version_number is null
136: If (
137: p_abr_extra_info_id = g_old_rec.abr_extra_info_id and
138: p_object_version_number = g_old_rec.object_version_number
139: ) Then
140: hr_utility.set_location(l_proc, 10);
141: --
142: -- The g_old_rec is current therefore we must
143: -- set the returning function to true
144: --
153: Close C_Sel1;
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
170: Return (l_fct_ret);
171: --
172: End api_updating;
173: --
249: --
250: l_proc varchar2(72) := g_package||'lck';
251: --
252: Begin
253: hr_utility.set_location('Entering:'||l_proc, 5);
254: --
255: -- Add any mandatory argument checking here:
256: -- Example:
257: -- hr_api.mandatory_arg_error
265: Close C_Sel1;
266: --
267: -- The primary key is invalid therefore we must error
268: --
269: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
270: hr_utility.raise_error;
271: End If;
272: Close C_Sel1;
273: If (p_object_version_number <> g_old_rec.object_version_number) Then
266: --
267: -- The primary key is invalid therefore we must error
268: --
269: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
270: hr_utility.raise_error;
271: End If;
272: Close C_Sel1;
273: If (p_object_version_number <> g_old_rec.object_version_number) Then
274: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
270: hr_utility.raise_error;
271: End If;
272: Close C_Sel1;
273: If (p_object_version_number <> g_old_rec.object_version_number) Then
274: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
275: hr_utility.raise_error;
276: End If;
277: --
278: hr_utility.set_location(' Leaving:'||l_proc, 10);
271: End If;
272: Close C_Sel1;
273: If (p_object_version_number <> g_old_rec.object_version_number) Then
274: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
275: hr_utility.raise_error;
276: End If;
277: --
278: hr_utility.set_location(' Leaving:'||l_proc, 10);
279: --
274: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
275: hr_utility.raise_error;
276: End If;
277: --
278: hr_utility.set_location(' Leaving:'||l_proc, 10);
279: --
280: -- We need to trap the ORA LOCK exception
281: --
282: Exception
284: --
285: -- The object is locked therefore we need to supply a meaningful
286: -- error message.
287: --
288: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
289: hr_utility.set_message_token('TABLE_NAME', 'BEN_ABR_EXTRA_INFO');
290: hr_utility.raise_error;
291: End lck;
292: --
285: -- The object is locked therefore we need to supply a meaningful
286: -- error message.
287: --
288: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
289: hr_utility.set_message_token('TABLE_NAME', 'BEN_ABR_EXTRA_INFO');
290: hr_utility.raise_error;
291: End lck;
292: --
293: -- ----------------------------------------------------------------------------
286: -- error message.
287: --
288: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
289: hr_utility.set_message_token('TABLE_NAME', 'BEN_ABR_EXTRA_INFO');
290: hr_utility.raise_error;
291: End lck;
292: --
293: -- ----------------------------------------------------------------------------
294: -- |-----------------------------< convert_args >-----------------------------|
362: l_proc varchar2(72) := g_package||'convert_args';
363: --
364: Begin
365: --
366: hr_utility.set_location('Entering:'||l_proc, 5);
367: --
368: -- Convert arguments into local l_rec structure.
369: --
370: l_rec.abr_extra_info_id := p_abr_extra_info_id;
429: l_rec.object_version_number := p_object_version_number;
430: --
431: -- Return the abrsql record structure.
432: --
433: hr_utility.set_location(' Leaving:'||l_proc, 10);
434: Return(l_rec);
435: --
436: End convert_args;
437: --