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 = 'PER_CAGR_GRADES_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 = 'PER_CAGR_GRADES_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 = 'PER_CAGR_GRADES_UK1') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_CAGR_GRADES_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 = 'PER_CAGR_GRADES_UK1') Then
42: hr_utility.set_message(0, 'FORM_DUPLICATE_KEY_IN_INDEX');
35: --
36: If (p_constraint_name = 'PER_CAGR_GRADES_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 = 'PER_CAGR_GRADES_UK1') Then
42: hr_utility.set_message(0, 'FORM_DUPLICATE_KEY_IN_INDEX');
43: hr_utility.raise_error;
36: If (p_constraint_name = 'PER_CAGR_GRADES_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 = 'PER_CAGR_GRADES_UK1') Then
42: hr_utility.set_message(0, 'FORM_DUPLICATE_KEY_IN_INDEX');
43: hr_utility.raise_error;
44: Else
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 = 'PER_CAGR_GRADES_UK1') Then
42: hr_utility.set_message(0, 'FORM_DUPLICATE_KEY_IN_INDEX');
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: 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 = 'PER_CAGR_GRADES_UK1') Then
42: hr_utility.set_message(0, 'FORM_DUPLICATE_KEY_IN_INDEX');
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: ElsIf (p_constraint_name = 'PER_CAGR_GRADES_UK1') Then
42: hr_utility.set_message(0, 'FORM_DUPLICATE_KEY_IN_INDEX');
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
42: hr_utility.set_message(0, 'FORM_DUPLICATE_KEY_IN_INDEX');
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
52: End constraint_error;
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
52: End constraint_error;
53: --
54: -- ----------------------------------------------------------------------------
55: -- |-----------------------------< api_updating >-----------------------------|
76: l_proc varchar2(72) := g_package||'api_updating';
77: l_fct_ret boolean;
78: --
79: Begin
80: hr_utility.set_location('Entering:'||l_proc, 5);
81: --
82: If (
83: p_cagr_grade_id is null and
84: p_object_version_number is null
92: If (
93: p_cagr_grade_id = g_old_rec.cagr_grade_id and
94: p_object_version_number = g_old_rec.object_version_number
95: ) Then
96: hr_utility.set_location(l_proc, 10);
97: --
98: -- The g_old_rec is current therefore we must
99: -- set the returning function to true
100: --
109: Close C_Sel1;
110: --
111: -- The primary key is invalid therefore we must error
112: --
113: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
114: hr_utility.raise_error;
115: End If;
116: Close C_Sel1;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
110: --
111: -- The primary key is invalid therefore we must error
112: --
113: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
114: hr_utility.raise_error;
115: End If;
116: Close C_Sel1;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
114: hr_utility.raise_error;
115: End If;
116: Close C_Sel1;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
119: hr_utility.raise_error;
120: End If;
121: hr_utility.set_location(l_proc, 15);
122: l_fct_ret := true;
115: End If;
116: Close C_Sel1;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
119: hr_utility.raise_error;
120: End If;
121: hr_utility.set_location(l_proc, 15);
122: l_fct_ret := true;
123: End If;
117: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
119: hr_utility.raise_error;
120: End If;
121: hr_utility.set_location(l_proc, 15);
122: l_fct_ret := true;
123: End If;
124: End If;
125: hr_utility.set_location(' Leaving:'||l_proc, 20);
121: hr_utility.set_location(l_proc, 15);
122: l_fct_ret := true;
123: End If;
124: End If;
125: hr_utility.set_location(' Leaving:'||l_proc, 20);
126: Return (l_fct_ret);
127: --
128: End api_updating;
129: --
150: --
151: l_proc varchar2(72) := g_package||'lck';
152: --
153: Begin
154: hr_utility.set_location('Entering:'||l_proc, 5);
155: --
156: -- Add any mandatory argument checking here:
157: -- Example:
158: -- hr_api.mandatory_arg_error
164: (p_api_name => l_proc,
165: p_argument => 'cagr_grade_id',
166: p_argument_value => p_cagr_grade_id);
167: --
168: hr_utility.set_location(l_proc,10);
169: --
170: hr_api.mandatory_arg_error
171: (p_api_name => l_proc,
172: p_argument => 'object_version_number',
171: (p_api_name => l_proc,
172: p_argument => 'object_version_number',
173: p_argument_value => p_object_version_number);
174: --
175: hr_utility.set_location(l_proc,15);
176: --
177: Open C_Sel1;
178: Fetch C_Sel1 Into g_old_rec;
179: If C_Sel1%notfound then
180: Close C_Sel1;
181: --
182: -- The primary key is invalid therefore we must error
183: --
184: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
185: hr_utility.raise_error;
186: End If;
187: Close C_Sel1;
188: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: --
182: -- The primary key is invalid therefore we must error
183: --
184: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
185: hr_utility.raise_error;
186: End If;
187: Close C_Sel1;
188: If (p_object_version_number <> g_old_rec.object_version_number) Then
189: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: Close C_Sel1;
188: If (p_object_version_number <> g_old_rec.object_version_number) Then
189: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
190: hr_utility.raise_error;
191: End If;
192: --
193: hr_utility.set_location(' Leaving:'||l_proc, 20);
186: End If;
187: Close C_Sel1;
188: If (p_object_version_number <> g_old_rec.object_version_number) Then
189: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
190: hr_utility.raise_error;
191: End If;
192: --
193: hr_utility.set_location(' Leaving:'||l_proc, 20);
194: --
189: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
190: hr_utility.raise_error;
191: End If;
192: --
193: hr_utility.set_location(' Leaving:'||l_proc, 20);
194: --
195: -- We need to trap the ORA LOCK exception
196: --
197: Exception
199: --
200: -- The object is locked therefore we need to supply a meaningful
201: -- error message.
202: --
203: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
204: hr_utility.set_message_token('TABLE_NAME', 'per_cagr_grades');
205: hr_utility.raise_error;
206: End lck;
207: --
200: -- The object is locked therefore we need to supply a meaningful
201: -- error message.
202: --
203: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
204: hr_utility.set_message_token('TABLE_NAME', 'per_cagr_grades');
205: hr_utility.raise_error;
206: End lck;
207: --
208: -- ----------------------------------------------------------------------------
201: -- error message.
202: --
203: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
204: hr_utility.set_message_token('TABLE_NAME', 'per_cagr_grades');
205: hr_utility.raise_error;
206: End lck;
207: --
208: -- ----------------------------------------------------------------------------
209: -- |-----------------------------< convert_args >-----------------------------|
222: l_proc varchar2(72) := g_package||'convert_args';
223: --
224: Begin
225: --
226: hr_utility.set_location('Entering:'||l_proc, 5);
227: --
228: -- Convert arguments into local l_rec structure.
229: --
230: l_rec.cagr_grade_id := p_cagr_grade_id;
234: l_rec.object_version_number := p_object_version_number;
235: --
236: -- Return the plsql record structure.
237: --
238: hr_utility.set_location(' Leaving:'||l_proc, 10);
239: Return(l_rec);
240: --
241: End convert_args;
242: --