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_REPORTING_FK1') 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_REPORTING_FK1') 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_REPORTING_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_REPORTING_FK1') 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_REPORTING_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_REPORTING_FK1') 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_REPORTING_PK') 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_REPORTING_FK1') 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_REPORTING_PK') 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','10');
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_REPORTING_PK') 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','10');
45: hr_utility.raise_error;
46: Else
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_REPORTING_PK') 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','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_REPORTING_PK') 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','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
41: ElsIf (p_constraint_name = 'BEN_REPORTING_PK') 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','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: End constraint_error;
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: End constraint_error;
55: --
56: -- ----------------------------------------------------------------------------
57: -- |-----------------------------< api_updating >-----------------------------|
95: l_proc varchar2(72) := g_package||'api_updating';
96: l_fct_ret boolean;
97: --
98: Begin
99: hr_utility.set_location('Entering:'||l_proc, 5);
100: --
101: If (
102: p_reporting_id is null and
103: p_object_version_number is null
111: If (
112: p_reporting_id = g_old_rec.reporting_id and
113: p_object_version_number = g_old_rec.object_version_number
114: ) Then
115: hr_utility.set_location(l_proc, 10);
116: --
117: -- The g_old_rec is current therefore we must
118: -- set the returning function to true
119: --
128: Close C_Sel1;
129: --
130: -- The primary key is invalid therefore we must error
131: --
132: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
133: hr_utility.raise_error;
134: End If;
135: Close C_Sel1;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
129: --
130: -- The primary key is invalid therefore we must error
131: --
132: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
133: hr_utility.raise_error;
134: End If;
135: Close C_Sel1;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
137: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
133: hr_utility.raise_error;
134: End If;
135: Close C_Sel1;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
137: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
138: hr_utility.raise_error;
139: End If;
140: hr_utility.set_location(l_proc, 15);
141: l_fct_ret := true;
134: End If;
135: Close C_Sel1;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
137: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
138: hr_utility.raise_error;
139: End If;
140: hr_utility.set_location(l_proc, 15);
141: l_fct_ret := true;
142: End If;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
137: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
138: hr_utility.raise_error;
139: End If;
140: hr_utility.set_location(l_proc, 15);
141: l_fct_ret := true;
142: End If;
143: End If;
144: hr_utility.set_location(' Leaving:'||l_proc, 20);
140: hr_utility.set_location(l_proc, 15);
141: l_fct_ret := true;
142: End If;
143: End If;
144: hr_utility.set_location(' Leaving:'||l_proc, 20);
145: Return (l_fct_ret);
146: --
147: End api_updating;
148: --
186: --
187: l_proc varchar2(72) := g_package||'lck';
188: --
189: Begin
190: hr_utility.set_location('Entering:'||l_proc, 5);
191: --
192: -- Add any mandatory argument checking here:
193: -- Example:
194: -- hr_api.mandatory_arg_error
202: Close C_Sel1;
203: --
204: -- The primary key is invalid therefore we must error
205: --
206: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
207: hr_utility.raise_error;
208: End If;
209: Close C_Sel1;
210: If (p_object_version_number <> g_old_rec.object_version_number) Then
203: --
204: -- The primary key is invalid therefore we must error
205: --
206: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
207: hr_utility.raise_error;
208: End If;
209: Close C_Sel1;
210: If (p_object_version_number <> g_old_rec.object_version_number) Then
211: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
207: hr_utility.raise_error;
208: End If;
209: Close C_Sel1;
210: If (p_object_version_number <> g_old_rec.object_version_number) Then
211: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
212: hr_utility.raise_error;
213: End If;
214: --
215: hr_utility.set_location(' Leaving:'||l_proc, 10);
208: End If;
209: Close C_Sel1;
210: If (p_object_version_number <> g_old_rec.object_version_number) Then
211: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
212: hr_utility.raise_error;
213: End If;
214: --
215: hr_utility.set_location(' Leaving:'||l_proc, 10);
216: --
211: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
212: hr_utility.raise_error;
213: End If;
214: --
215: hr_utility.set_location(' Leaving:'||l_proc, 10);
216: --
217: -- We need to trap the ORA LOCK exception
218: --
219: Exception
221: --
222: -- The object is locked therefore we need to supply a meaningful
223: -- error message.
224: --
225: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
226: hr_utility.set_message_token('TABLE_NAME', 'ben_reporting');
227: hr_utility.raise_error;
228: End lck;
229: --
222: -- The object is locked therefore we need to supply a meaningful
223: -- error message.
224: --
225: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
226: hr_utility.set_message_token('TABLE_NAME', 'ben_reporting');
227: hr_utility.raise_error;
228: End lck;
229: --
230: -- ----------------------------------------------------------------------------
223: -- error message.
224: --
225: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
226: hr_utility.set_message_token('TABLE_NAME', 'ben_reporting');
227: hr_utility.raise_error;
228: End lck;
229: --
230: -- ----------------------------------------------------------------------------
231: -- |-----------------------------< convert_args >-----------------------------|
261: l_proc varchar2(72) := g_package||'convert_args';
262: --
263: Begin
264: --
265: hr_utility.set_location('Entering:'||l_proc, 5);
266: --
267: -- Convert arguments into local l_rec structure.
268: --
269: l_rec.reporting_id := p_reporting_id;
290: l_rec.object_version_number := p_object_version_number;
291: --
292: -- Return the plsql record structure.
293: --
294: hr_utility.set_location(' Leaving:'||l_proc, 10);
295: Return(l_rec);
296: --
297: End convert_args;
298: --