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 = 'OTA_ACTIVITY_VERSIONS_FK1') Then
37: fnd_message.set_name('OTA', 'OTA_13292_TAV_NO_TAD');
38: fnd_message.raise_error;
68: ElsIf (p_constraint_name = 'OTA_TAV_VERS_START_END_ORDER') Then
69: fnd_message.set_name('OTA', 'OTA_13312_GEN_DATE_ORDER');
70: fnd_message.raise_error;
71: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_PK') Then
72: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
73: hr_utility.set_message_token('PROCEDURE', l_proc);
74: hr_utility.set_message_token('STEP','5');
75: hr_utility.raise_error;
76: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK2') Then
69: fnd_message.set_name('OTA', 'OTA_13312_GEN_DATE_ORDER');
70: fnd_message.raise_error;
71: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_PK') Then
72: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
73: hr_utility.set_message_token('PROCEDURE', l_proc);
74: hr_utility.set_message_token('STEP','5');
75: hr_utility.raise_error;
76: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK2') Then
77: fnd_message.set_name('OTA', 'OTA_13301_TAV_DUPLICATE');
70: fnd_message.raise_error;
71: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_PK') Then
72: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
73: hr_utility.set_message_token('PROCEDURE', l_proc);
74: hr_utility.set_message_token('STEP','5');
75: hr_utility.raise_error;
76: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK2') Then
77: fnd_message.set_name('OTA', 'OTA_13301_TAV_DUPLICATE');
78: fnd_message.raise_error;
71: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_PK') Then
72: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
73: hr_utility.set_message_token('PROCEDURE', l_proc);
74: hr_utility.set_message_token('STEP','5');
75: hr_utility.raise_error;
76: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK2') Then
77: fnd_message.set_name('OTA', 'OTA_13301_TAV_DUPLICATE');
78: fnd_message.raise_error;
79: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK4') Then
87: fnd_message.set_token('CONSTRAINT',p_constraint_name);
88: fnd_message.raise_error;
89: End If;
90: --
91: hr_utility.set_location(' Leaving:'||l_proc, 10);
92: End constraint_error;
93: --
94: -- ----------------------------------------------------------------------------
95: -- |-----------------------------< api_updating >-----------------------------|
169: l_proc varchar2(72) := g_package||'api_updating';
170: l_fct_ret boolean;
171: --
172: Begin
173: hr_utility.set_location('Entering:'||l_proc, 5);
174: --
175: If (
176: p_activity_version_id is null and
177: p_object_version_number is null
185: If (
186: p_activity_version_id = g_old_rec.activity_version_id and
187: p_object_version_number = g_old_rec.object_version_number
188: ) Then
189: hr_utility.set_location(l_proc, 10);
190: --
191: -- The g_old_rec is current therefore we must
192: -- set the returning function to true
193: --
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: hr_utility.set_location(l_proc, 15);
215: l_fct_ret := true;
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: hr_utility.set_location(l_proc, 15);
215: l_fct_ret := true;
216: End If;
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: hr_utility.set_location(l_proc, 15);
215: l_fct_ret := true;
216: End If;
217: End If;
218: hr_utility.set_location(' Leaving:'||l_proc, 20);
214: hr_utility.set_location(l_proc, 15);
215: l_fct_ret := true;
216: End If;
217: End If;
218: hr_utility.set_location(' Leaving:'||l_proc, 20);
219: Return (l_fct_ret);
220: --
221: End api_updating;
222: --
296: --
297: l_proc varchar2(72) := g_package||'lck';
298: --
299: Begin
300: hr_utility.set_location('Entering:'||l_proc, 5);
301: --
302: -- Add any mandatory argument checking here:
303: -- Example:
304: -- hr_api.mandatory_arg_error
312: Close C_Sel1;
313: --
314: -- The primary key is invalid therefore we must error
315: --
316: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
317: hr_utility.raise_error;
318: End If;
319: Close C_Sel1;
320: If (p_object_version_number <> g_old_rec.object_version_number) Then
313: --
314: -- The primary key is invalid therefore we must error
315: --
316: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
317: hr_utility.raise_error;
318: End If;
319: Close C_Sel1;
320: If (p_object_version_number <> g_old_rec.object_version_number) Then
321: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
317: hr_utility.raise_error;
318: End If;
319: Close C_Sel1;
320: If (p_object_version_number <> g_old_rec.object_version_number) Then
321: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
322: hr_utility.raise_error;
323: End If;
324: --
325: hr_utility.set_location(' Leaving:'||l_proc, 10);
318: End If;
319: Close C_Sel1;
320: If (p_object_version_number <> g_old_rec.object_version_number) Then
321: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
322: hr_utility.raise_error;
323: End If;
324: --
325: hr_utility.set_location(' Leaving:'||l_proc, 10);
326: --
321: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
322: hr_utility.raise_error;
323: End If;
324: --
325: hr_utility.set_location(' Leaving:'||l_proc, 10);
326: --
327: -- We need to trap the ORA LOCK exception
328: --
329: Exception
331: --
332: -- The object is locked therefore we need to supply a meaningful
333: -- error message.
334: --
335: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
336: hr_utility.set_message_token('TABLE_NAME', 'ota_activity_versions');
337: hr_utility.raise_error;
338: End lck;
339: --
332: -- The object is locked therefore we need to supply a meaningful
333: -- error message.
334: --
335: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
336: hr_utility.set_message_token('TABLE_NAME', 'ota_activity_versions');
337: hr_utility.raise_error;
338: End lck;
339: --
340: -- ----------------------------------------------------------------------------
333: -- error message.
334: --
335: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
336: hr_utility.set_message_token('TABLE_NAME', 'ota_activity_versions');
337: hr_utility.raise_error;
338: End lck;
339: --
340: -- ----------------------------------------------------------------------------
341: -- |-----------------------------< convert_args >-----------------------------|
407: l_proc varchar2(72) := g_package||'convert_args';
408: --
409: Begin
410: --
411: hr_utility.set_location('Entering:'||l_proc, 5);
412: --
413: -- Convert arguments into local l_rec structure.
414: --
415: l_rec.activity_version_id := p_activity_version_id;
472:
473: --
474: -- Return the plsql record structure.
475: --
476: hr_utility.set_location(' Leaving:'||l_proc, 10);
477: Return(l_rec);
478: --
479: End convert_args;
480: --