14: --
15: l_proc varchar2(72) := g_package||'return_api_dml_status';
16: --
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
23: End return_api_dml_status;
24: --
25: -- ----------------------------------------------------------------------------
26: -- |---------------------------< constraint_error >---------------------------|
30: --
31: l_proc varchar2(72) := g_package||'constraint_error';
32: --
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK1') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK1') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK1') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: If (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK1') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','5');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK1') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','5');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK3') Then
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK1') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','5');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK3') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK1') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','5');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK3') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
41: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK1') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','5');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK3') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','10');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','5');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK3') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','10');
50: hr_utility.raise_error;
51: Else
44: hr_utility.set_message_token('STEP','5');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK3') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','10');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK3') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','10');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
46: ElsIf (p_constraint_name = 'BEN_PTNL_LER_FOR_PER_FK3') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','10');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','10');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
49: hr_utility.set_message_token('STEP','10');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
60: --
61: -- ----------------------------------------------------------------------------
62: -- |-----------------------------< api_updating >-----------------------------|
100: l_proc varchar2(72) := g_package||'api_updating';
101: l_fct_ret boolean;
102: --
103: Begin
104: hr_utility.set_location('Entering:'||l_proc, 5);
105: --
106: If (
107: p_ptnl_ler_for_per_id is null and
108: p_object_version_number is null
116: If (
117: p_ptnl_ler_for_per_id = g_old_rec.ptnl_ler_for_per_id and
118: p_object_version_number = g_old_rec.object_version_number
119: ) Then
120: hr_utility.set_location(l_proc, 10);
121: --
122: -- The g_old_rec is current therefore we must
123: -- set the returning function to true
124: --
133: Close C_Sel1;
134: --
135: -- The primary key is invalid therefore we must error
136: --
137: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
138: hr_utility.raise_error;
139: End If;
140: Close C_Sel1;
141: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: --
135: -- The primary key is invalid therefore we must error
136: --
137: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
138: hr_utility.raise_error;
139: End If;
140: Close C_Sel1;
141: If (p_object_version_number <> g_old_rec.object_version_number) Then
142: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
138: hr_utility.raise_error;
139: End If;
140: Close C_Sel1;
141: If (p_object_version_number <> g_old_rec.object_version_number) Then
142: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
143: hr_utility.raise_error;
144: End If;
145: hr_utility.set_location(l_proc, 15);
146: l_fct_ret := true;
139: End If;
140: Close C_Sel1;
141: If (p_object_version_number <> g_old_rec.object_version_number) Then
142: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
143: hr_utility.raise_error;
144: End If;
145: hr_utility.set_location(l_proc, 15);
146: l_fct_ret := true;
147: End If;
141: If (p_object_version_number <> g_old_rec.object_version_number) Then
142: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
143: hr_utility.raise_error;
144: End If;
145: hr_utility.set_location(l_proc, 15);
146: l_fct_ret := true;
147: End If;
148: End If;
149: hr_utility.set_location(' Leaving:'||l_proc, 20);
145: hr_utility.set_location(l_proc, 15);
146: l_fct_ret := true;
147: End If;
148: End If;
149: hr_utility.set_location(' Leaving:'||l_proc, 20);
150: Return (l_fct_ret);
151: --
152: End api_updating;
153: --
191: --
192: l_proc varchar2(72) := g_package||'lck';
193: --
194: Begin
195: hr_utility.set_location('Entering:'||l_proc, 5);
196: --
197: -- Add any mandatory argument checking here:
198: -- Example:
199: -- hr_api.mandatory_arg_error
207: Close C_Sel1;
208: --
209: -- The primary key is invalid therefore we must error
210: --
211: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
208: --
209: -- The primary key is invalid therefore we must error
210: --
211: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219: --
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219: --
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
221: --
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219: --
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
221: --
222: -- We need to trap the ORA LOCK exception
223: --
224: Exception
226: --
227: -- The object is locked therefore we need to supply a meaningful
228: -- error message.
229: --
230: -- hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: -- hr_utility.set_message_token('TABLE_NAME', 'ben_ptnl_ler_for_per');
232: hr_utility.set_message(805, 'BEN_93651_PPL_OBJECT_LOCKED'); -- Bug 3140549
233: hr_utility.raise_error;
234: End lck;
227: -- The object is locked therefore we need to supply a meaningful
228: -- error message.
229: --
230: -- hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: -- hr_utility.set_message_token('TABLE_NAME', 'ben_ptnl_ler_for_per');
232: hr_utility.set_message(805, 'BEN_93651_PPL_OBJECT_LOCKED'); -- Bug 3140549
233: hr_utility.raise_error;
234: End lck;
235: --
228: -- error message.
229: --
230: -- hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: -- hr_utility.set_message_token('TABLE_NAME', 'ben_ptnl_ler_for_per');
232: hr_utility.set_message(805, 'BEN_93651_PPL_OBJECT_LOCKED'); -- Bug 3140549
233: hr_utility.raise_error;
234: End lck;
235: --
236: -- ----------------------------------------------------------------------------
229: --
230: -- hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: -- hr_utility.set_message_token('TABLE_NAME', 'ben_ptnl_ler_for_per');
232: hr_utility.set_message(805, 'BEN_93651_PPL_OBJECT_LOCKED'); -- Bug 3140549
233: hr_utility.raise_error;
234: End lck;
235: --
236: -- ----------------------------------------------------------------------------
237: -- |-----------------------------< convert_args >-----------------------------|
267: l_proc varchar2(72) := g_package||'convert_args';
268: --
269: Begin
270: --
271: hr_utility.set_location('Entering:'||l_proc, 5);
272: --
273: -- Convert arguments into local l_rec structure.
274: --
275: l_rec.ptnl_ler_for_per_id := p_ptnl_ler_for_per_id;
296: l_rec.object_version_number := p_object_version_number;
297: --
298: -- Return the plsql record structure.
299: --
300: hr_utility.set_location(' Leaving:'||l_proc, 10);
301: Return(l_rec);
302: --
303: End convert_args;
304: --