151: or (jbd.segment30 is null
152: and p_segment30 is null));
153: --
154: begin
155: hr_utility.set_location('Entering:'||l_proc, 5);
156: --
157: -- Determine if all the segments are null
158: --
159: if (p_segment1 is null and
189: --
190: -- as the segments are null set the p_id_flex_num
191: -- explicitly to null.
192: --
193: hr_utility.set_location(l_proc, 10);
194: p_id_flex_num := null;
195: p_name := null;
196: p_job_definition_id := null;
197: else
202: hr_api.mandatory_arg_error(
203: p_api_name => l_proc,
204: p_argument => 'business_group_id',
205: p_argument_value => p_business_group_id);
206: hr_utility.set_location(l_proc, 15);
207: --
208: -- Now get the id_flex_num (and validate the business_group_id specified
209: -- is valid.
210: --
214: close idsel;
215: --
216: -- The business group does not exist.
217: --
218: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
219: hr_utility.raise_error;
220: end if;
221: close idsel;
222: --
215: --
216: -- The business group does not exist.
217: --
218: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
219: hr_utility.raise_error;
220: end if;
221: close idsel;
222: --
223: -- Check the id_flex_num is not-null
222: --
223: -- Check the id_flex_num is not-null
224: --
225: if l_id_flex_num is null then
226: hr_utility.set_message(800, 'HR_52151_FLEX_JBD_INVALID_ID');
227: hr_utility.raise_error;
228: end if;
229: --
230: hr_utility.set_location(l_proc, 20);
223: -- Check the id_flex_num is not-null
224: --
225: if l_id_flex_num is null then
226: hr_utility.set_message(800, 'HR_52151_FLEX_JBD_INVALID_ID');
227: hr_utility.raise_error;
228: end if;
229: --
230: hr_utility.set_location(l_proc, 20);
231: p_id_flex_num := l_id_flex_num;
226: hr_utility.set_message(800, 'HR_52151_FLEX_JBD_INVALID_ID');
227: hr_utility.raise_error;
228: end if;
229: --
230: hr_utility.set_location(l_proc, 20);
231: p_id_flex_num := l_id_flex_num;
232: --
233: -- open and execute the partial segment cursor. if no rows are returned
234: -- then p_job_definition_id must be set to -1 (indicating a
233: -- open and execute the partial segment cursor. if no rows are returned
234: -- then p_job_definition_id must be set to -1 (indicating a
235: -- new combination needs to be inserted.
236: --
237: hr_utility.set_location(l_proc, 25);
238: open pgsel;
239: fetch pgsel into p_job_definition_id;
240: if pgsel%notfound then
241: hr_utility.set_location(l_proc, 30);
237: hr_utility.set_location(l_proc, 25);
238: open pgsel;
239: fetch pgsel into p_job_definition_id;
240: if pgsel%notfound then
241: hr_utility.set_location(l_proc, 30);
242: p_job_definition_id := -1;
243: end if;
244: close pgsel;
245: --
282: p_id_flex_code => 'JOB');
283:
284: end if;
285: --
286: hr_utility.set_location(' Leaving:'||l_proc, 30);
287: end segment_combination_check;
288: --
289: -- ----------------------------------------------------------------------------
290: -- |------------------------< return_api_dml_status >-------------------------|
293: --
294: l_proc varchar2(72) := g_package||'return_api_dml_status';
295: --
296: Begin
297: hr_utility.set_location('Entering:'||l_proc, 5);
298: --
299: Return (nvl(g_api_dml, false));
300: --
301: hr_utility.set_location(' Leaving:'||l_proc, 10);
297: hr_utility.set_location('Entering:'||l_proc, 5);
298: --
299: Return (nvl(g_api_dml, false));
300: --
301: hr_utility.set_location(' Leaving:'||l_proc, 10);
302: End return_api_dml_status;
303: --
304: -- ----------------------------------------------------------------------------
305: -- |---------------------------< constraint_error >---------------------------|
309: --
310: l_proc varchar2(72) := g_package||'constraint_error';
311: --
312: Begin
313: hr_utility.set_location('Entering:'||l_proc, 5);
314: --
315: If (p_constraint_name = 'PER_JOB_DEFINITIONS_PK') Then
316: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
317: hr_utility.raise_error;
312: Begin
313: hr_utility.set_location('Entering:'||l_proc, 5);
314: --
315: If (p_constraint_name = 'PER_JOB_DEFINITIONS_PK') Then
316: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
317: hr_utility.raise_error;
318: Else
319: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
320: hr_utility.set_message_token('PROCEDURE', l_proc);
313: hr_utility.set_location('Entering:'||l_proc, 5);
314: --
315: If (p_constraint_name = 'PER_JOB_DEFINITIONS_PK') Then
316: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
317: hr_utility.raise_error;
318: Else
319: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
320: hr_utility.set_message_token('PROCEDURE', l_proc);
321: hr_utility.set_message_token('CONSTRAINT_NAME',p_constraint_name);
315: If (p_constraint_name = 'PER_JOB_DEFINITIONS_PK') Then
316: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
317: hr_utility.raise_error;
318: Else
319: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
320: hr_utility.set_message_token('PROCEDURE', l_proc);
321: hr_utility.set_message_token('CONSTRAINT_NAME',p_constraint_name);
322: hr_utility.raise_error;
323: End If;
316: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
317: hr_utility.raise_error;
318: Else
319: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
320: hr_utility.set_message_token('PROCEDURE', l_proc);
321: hr_utility.set_message_token('CONSTRAINT_NAME',p_constraint_name);
322: hr_utility.raise_error;
323: End If;
324: --
317: hr_utility.raise_error;
318: Else
319: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
320: hr_utility.set_message_token('PROCEDURE', l_proc);
321: hr_utility.set_message_token('CONSTRAINT_NAME',p_constraint_name);
322: hr_utility.raise_error;
323: End If;
324: --
325: hr_utility.set_location(' Leaving:'||l_proc, 10);
318: Else
319: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
320: hr_utility.set_message_token('PROCEDURE', l_proc);
321: hr_utility.set_message_token('CONSTRAINT_NAME',p_constraint_name);
322: hr_utility.raise_error;
323: End If;
324: --
325: hr_utility.set_location(' Leaving:'||l_proc, 10);
326: End constraint_error;
321: hr_utility.set_message_token('CONSTRAINT_NAME',p_constraint_name);
322: hr_utility.raise_error;
323: End If;
324: --
325: hr_utility.set_location(' Leaving:'||l_proc, 10);
326: End constraint_error;
327: --
328: -- ----------------------------------------------------------------------------
329: -- |-----------------------------< api_updating >-----------------------------|
374: l_proc varchar2(72) := g_package||'api_updating';
375: l_fct_ret boolean;
376: --
377: Begin
378: hr_utility.set_location('Entering:'||l_proc, 5);
379: --
380: If (p_job_definition_id is null) Then
381: --
382: -- One of the primary key arguments is null therefore we must
384: --
385: l_fct_ret := false;
386: Else
387: If (p_job_definition_id = g_old_rec.job_definition_id) Then
388: hr_utility.set_location(l_proc, 10);
389: --
390: -- The g_old_rec is current therefore we must
391: -- set the returning function to true
392: --
401: Close C_Sel1;
402: --
403: -- The primary key is invalid therefore we must error
404: --
405: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
406: hr_utility.raise_error;
407: End If;
408: Close C_Sel1;
409: hr_utility.set_location(l_proc, 15);
402: --
403: -- The primary key is invalid therefore we must error
404: --
405: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
406: hr_utility.raise_error;
407: End If;
408: Close C_Sel1;
409: hr_utility.set_location(l_proc, 15);
410: l_fct_ret := true;
405: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
406: hr_utility.raise_error;
407: End If;
408: Close C_Sel1;
409: hr_utility.set_location(l_proc, 15);
410: l_fct_ret := true;
411: End If;
412: End If;
413: hr_utility.set_location(' Leaving:'||l_proc, 20);
409: hr_utility.set_location(l_proc, 15);
410: l_fct_ret := true;
411: End If;
412: End If;
413: hr_utility.set_location(' Leaving:'||l_proc, 20);
414: Return (l_fct_ret);
415: --
416: End api_updating;
417: --
460: l_proc varchar2(72) := g_package||'convert_args';
461: --
462: Begin
463: --
464: hr_utility.set_location('Entering:'||l_proc, 5);
465: --
466: -- Convert arguments into local l_rec structure.
467: --
468: l_rec.job_definition_id := p_job_definition_id;
500: l_rec.segment30 := p_segment30;
501: --
502: -- Return the plsql record structure.
503: --
504: hr_utility.set_location(' Leaving:'||l_proc, 10);
505: Return(l_rec);
506: --
507: End convert_args;
508: --