59: l_template_data_group_id_to number;
60: l_language_code fnd_languages.language_code%TYPE;
61:
62: begin
63: hr_utility.set_location('Entering:'|| l_proc, 10);
64: --
65: -- Issue a savepoint
66: --
67: savepoint copy_template_data_group;
76: --
77: l_language_code := p_language_code;
78: hr_api.validate_language_code(p_language_code => l_language_code);
79: --
80: hr_utility.set_location(l_proc, 20);
81: --
82: --
83: -- Call Before Process User Hook
84: --
98: end;
99: --
100: -- Validation in addition to Row Handlers
101: --
102: hr_utility.set_location('At:'|| l_proc, 15);
103:
104: OPEN cur_api_val;
105: FETCH cur_api_val INTO l_temp;
106: IF (cur_api_val%NOTFOUND AND
116: --
117: --
118: -- Process Logic
119: --
120: hr_utility.set_location('At:'|| l_proc, 20);
121:
122: OPEN cur_data_group;
123: FETCH cur_data_group INTO l_form_data_group_id;
124: CLOSE cur_data_group;
122: OPEN cur_data_group;
123: FETCH cur_data_group INTO l_form_data_group_id;
124: CLOSE cur_data_group;
125:
126: hr_utility.set_location('At:'|| l_proc, 25);
127:
128: hr_tdg_ins.ins(p_form_template_id => p_form_template_id
129: ,p_form_data_group_id => l_form_data_group_id
130: ,p_template_data_group_id => l_template_data_group_id_to
129: ,p_form_data_group_id => l_form_data_group_id
130: ,p_template_data_group_id => l_template_data_group_id_to
131: ,p_object_version_number => l_object_version_number);
132:
133: hr_utility.set_location('At:'|| l_proc, 30);
134:
135: FOR cur_rec in cur_tmplt_item LOOP
136: hr_template_items_api.copy_template_item(
137: p_effective_date => TRUNC(p_effective_date)
144: END LOOP;
145: --
146: -- Call After Process User Hook
147: --
148: hr_utility.set_location('At:'|| l_proc, 35);
149:
150: begin
151: hr_template_data_groups_bk1.copy_template_data_group_a
152: (p_effective_date => TRUNC(p_effective_date)
165: end;
166: --
167: -- When in validation only mode raise the Validate_Enabled exception
168: --
169: hr_utility.set_location('At:'|| l_proc, 40);
170:
171: if p_validate then
172: raise hr_api.validate_enabled;
173: end if;
176: --
177: p_template_data_group_id_to := l_template_data_group_id_to;
178: p_object_version_number := l_object_version_number;
179: --
180: hr_utility.set_location(' Leaving:'||l_proc, 70);
181: exception
182: when hr_api.validate_enabled then
183: --
184: -- As the Validate_Enabled exception has been raised
191: -- when validation only mode is being used.)
192: --
193: p_template_data_group_id_to := null;
194: p_object_version_number := null;
195: hr_utility.set_location(' Leaving:'||l_proc, 80);
196: when others then
197: --
198: -- A validation or unexpected error has occured
199: --
200: p_template_data_group_id_to := null;
201: p_object_version_number := null;
202:
203: rollback to copy_template_data_group;
204: hr_utility.set_location(' Leaving:'||l_proc, 90);
205: raise;
206: end copy_template_data_group;
207: --
208: -- ----------------------------------------------------------------------------
247: l_template_item_id number;
248: l_ovn number;
249: l_override_value_warning boolean;
250: begin
251: hr_utility.set_location('Entering:'|| l_proc, 10);
252: --
253: -- Issue a savepoint
254: --
255: savepoint create_template_data_group;
276: --
277: -- Validation in addition to Row Handlers
278: --
279:
280: hr_utility.set_location('At:'|| l_proc, 15);
281:
282: OPEN cur_api_val;
283: FETCH cur_api_val INTO l_temp;
284: IF (cur_api_val%NOTFOUND AND
294: --
295: --
296: -- Process Logic
297: --
298: hr_utility.set_location('At:'|| l_proc, 20);
299:
300: hr_tdg_ins.ins(p_form_template_id => p_form_template_id
301: ,p_form_data_group_id => p_form_data_group_id
302: ,p_template_data_group_id => l_template_data_group_id
301: ,p_form_data_group_id => p_form_data_group_id
302: ,p_template_data_group_id => l_template_data_group_id
303: ,p_object_version_number => l_object_version_number);
304:
305: hr_utility.set_location('At:'|| l_proc, 25);
306:
307: FOR cur_rec in cur_form_item LOOP
308: hr_template_items_api.create_template_item(
309: p_effective_date => TRUNC(p_effective_date)
313: ,p_object_version_number => l_ovn
314: ,p_override_value_warning => l_override_value_warning);
315: END LOOP;
316:
317: hr_utility.set_location('At:'|| l_proc, 30);
318:
319: --
320: -- Call After Process User Hook
321: --
336: end;
337: --
338: -- When in validation only mode raise the Validate_Enabled exception
339: --
340: hr_utility.set_location('At:'|| l_proc, 35);
341:
342: if p_validate then
343: raise hr_api.validate_enabled;
344: end if;
347: --
348: p_template_data_group_id := l_template_data_group_id;
349: p_object_version_number := l_object_version_number;
350: --
351: hr_utility.set_location(' Leaving:'||l_proc, 70);
352: exception
353: when hr_api.validate_enabled then
354: --
355: -- As the Validate_Enabled exception has been raised
362: -- when validation only mode is being used.)
363: --
364: p_template_data_group_id := null;
365: p_object_version_number := null;
366: hr_utility.set_location(' Leaving:'||l_proc, 80);
367: when others then
368: --
369: -- A validation or unexpected error has occured
370: --
371: p_template_data_group_id := null;
372: p_object_version_number := null;
373:
374: rollback to create_template_data_group;
375: hr_utility.set_location(' Leaving:'||l_proc, 90);
376: raise;
377: end create_template_data_group;
378: --
379: -- ----------------------------------------------------------------------------
425: AND tdg.template_data_group_id = p_template_data_group_id;
426:
427: l_proc varchar2(72) := g_package||'delete_template_data_group';
428: begin
429: hr_utility.set_location('Entering:'|| l_proc, 10);
430: --
431: -- Issue a savepoint
432: --
433: savepoint delete_template_data_group;
447: end;
448: --
449: -- Validation in addition to Row Handlers
450: --
451: hr_utility.set_location('At:'|| l_proc, 15);
452:
453: OPEN cur_api_val;
454: FETCH cur_api_val INTO l_temp;
455: IF (cur_api_val%NOTFOUND AND
465: --
466: --
467: -- Process Logic
468: --
469: hr_utility.set_location('At:'|| l_proc, 20);
470:
471: hr_tdg_shd.lck( p_template_data_group_id => p_template_data_group_id
472: ,p_object_version_number => p_object_version_number);
473:
470:
471: hr_tdg_shd.lck( p_template_data_group_id => p_template_data_group_id
472: ,p_object_version_number => p_object_version_number);
473:
474: hr_utility.set_location('At:'|| l_proc, 25);
475:
476: FOR cur_rec in cur_tmplt_item LOOP
477: hr_template_items_api.delete_template_item(
478: p_template_item_id => cur_rec.template_item_id
478: p_template_item_id => cur_rec.template_item_id
479: ,p_object_version_number => cur_rec.object_version_number);
480: END LOOP;
481:
482: hr_utility.set_location('At:'|| l_proc, 30);
483:
484: hr_tdg_del.del( p_template_data_group_id => p_template_data_group_id
485: ,p_object_version_number => p_object_version_number);
486:
483:
484: hr_tdg_del.del( p_template_data_group_id => p_template_data_group_id
485: ,p_object_version_number => p_object_version_number);
486:
487: hr_utility.set_location('At:'|| l_proc, 35);
488:
489: --
490: -- Call After Process User Hook
491: --
502: end;
503: --
504: -- When in validation only mode raise the Validate_Enabled exception
505: --
506: hr_utility.set_location('At:'|| l_proc, 40);
507:
508: if p_validate then
509: raise hr_api.validate_enabled;
510: end if;
508: if p_validate then
509: raise hr_api.validate_enabled;
510: end if;
511: --
512: hr_utility.set_location(' Leaving:'||l_proc, 70);
513: exception
514: when hr_api.validate_enabled then
515: --
516: -- As the Validate_Enabled exception has been raised
521: -- Only set output warning arguments
522: -- (Any key or derived arguments must be set to null
523: -- when validation only mode is being used.)
524: --
525: hr_utility.set_location(' Leaving:'||l_proc, 80);
526: when others then
527: --
528: -- A validation or unexpected error has occured
529: --
527: --
528: -- A validation or unexpected error has occured
529: --
530: rollback to delete_template_data_group;
531: hr_utility.set_location(' Leaving:'||l_proc, 90);
532: raise;
533: end delete_template_data_group;
534: --
535: end hr_template_data_groups_api;