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_PERSON_ACTIONS_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_PERSON_ACTIONS_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_PERSON_ACTIONS_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PERSON_ACTIONS_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_PERSON_ACTIONS_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_PERSON_ACTIONS_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_PERSON_ACTIONS_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_PERSON_ACTIONS_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_PERSON_ACTIONS_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_PERSON_ACTIONS_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_PERSON_ACTIONS_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_PERSON_ACTIONS_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_PERSON_ACTIONS_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 >-----------------------------|
80: l_proc varchar2(72) := g_package||'api_updating';
81: l_fct_ret boolean;
82: --
83: Begin
84: hr_utility.set_location('Entering:'||l_proc, 5);
85: --
86: If (
87: p_person_action_id is null and
88: p_object_version_number is null
96: If (
97: p_person_action_id = g_old_rec.person_action_id and
98: p_object_version_number = g_old_rec.object_version_number
99: ) Then
100: hr_utility.set_location(l_proc, 10);
101: --
102: -- The g_old_rec is current therefore we must
103: -- set the returning function to true
104: --
113: Close C_Sel1;
114: --
115: -- The primary key is invalid therefore we must error
116: --
117: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
118: hr_utility.raise_error;
119: End If;
120: Close C_Sel1;
121: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: --
115: -- The primary key is invalid therefore we must error
116: --
117: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
118: hr_utility.raise_error;
119: End If;
120: Close C_Sel1;
121: If (p_object_version_number <> g_old_rec.object_version_number) Then
122: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: Close C_Sel1;
121: If (p_object_version_number <> g_old_rec.object_version_number) Then
122: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
123: hr_utility.raise_error;
124: End If;
125: hr_utility.set_location(l_proc, 15);
126: l_fct_ret := true;
119: End If;
120: Close C_Sel1;
121: If (p_object_version_number <> g_old_rec.object_version_number) Then
122: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
123: hr_utility.raise_error;
124: End If;
125: hr_utility.set_location(l_proc, 15);
126: l_fct_ret := true;
127: End If;
121: If (p_object_version_number <> g_old_rec.object_version_number) Then
122: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
123: hr_utility.raise_error;
124: End If;
125: hr_utility.set_location(l_proc, 15);
126: l_fct_ret := true;
127: End If;
128: End If;
129: hr_utility.set_location(' Leaving:'||l_proc, 20);
125: hr_utility.set_location(l_proc, 15);
126: l_fct_ret := true;
127: End If;
128: End If;
129: hr_utility.set_location(' Leaving:'||l_proc, 20);
130: Return (l_fct_ret);
131: --
132: End api_updating;
133: --
156: --
157: l_proc varchar2(72) := g_package||'lck';
158: --
159: Begin
160: hr_utility.set_location('Entering:'||l_proc, 5);
161: --
162: -- Add any mandatory argument checking here:
163: -- Example:
164: -- hr_api.mandatory_arg_error
172: Close C_Sel1;
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
186: --
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
186: --
187: -- We need to trap the ORA LOCK exception
188: --
189: Exception
191: --
192: -- The object is locked therefore we need to supply a meaningful
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'ben_person_actions');
197: hr_utility.raise_error;
198: End lck;
199: --
192: -- The object is locked therefore we need to supply a meaningful
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'ben_person_actions');
197: hr_utility.raise_error;
198: End lck;
199: --
200: -- ----------------------------------------------------------------------------
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'ben_person_actions');
197: hr_utility.raise_error;
198: End lck;
199: --
200: -- ----------------------------------------------------------------------------
201: -- |-----------------------------< convert_args >-----------------------------|
216: l_proc varchar2(72) := g_package||'convert_args';
217: --
218: Begin
219: --
220: hr_utility.set_location('Entering:'||l_proc, 5);
221: --
222: -- Convert arguments into local l_rec structure.
223: --
224: l_rec.person_action_id := p_person_action_id;
230: l_rec.object_version_number := p_object_version_number;
231: --
232: -- Return the plsql record structure.
233: --
234: hr_utility.set_location(' Leaving:'||l_proc, 10);
235: Return(l_rec);
236: --
237: End convert_args;
238: --