1 Package Body hr_source_form_templates_bsi as
2 /* $Header: hrsftbsi.pkb 115.2 2003/09/24 02:01:28 bsubrama noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' hr_source_form_templates_bsi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |--------------------------< create_source_form_template >-----------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_source_form_template
13 (p_validate in boolean default false
14 ,p_effective_date in date
15 ,p_form_template_id_from in number
16 ,p_form_template_id_to in number
17 ,p_source_form_template_id out nocopy number
18 ,p_object_version_number out nocopy number
19 ) is
20 --
21 -- Declare cursors and local variables
22 --
23
24 l_source_form_template_id number;
25 l_object_version_number number;
26 l_proc varchar2(72) := g_package||'create_source_form_template';
27 begin
28 hr_utility.set_location('Entering:'|| l_proc, 10);
29 --
30 -- Issue a savepoint
31 --
32 savepoint create_source_form_template;
33
34 --
35 -- Process Logic
36 --
37 hr_sft_ins.ins(p_form_template_id_to => p_form_template_id_to
38 ,p_form_template_id_from => p_form_template_id_from
39 ,p_source_form_template_id => l_source_form_template_id
40 ,p_object_version_number => l_object_version_number);
41
42 --
43 -- When in validation only mode raise the Validate_Enabled exception
44 --
45 if p_validate then
46 raise hr_api.validate_enabled;
47 end if;
48 --
49 -- Set all output arguments
50 --
51 p_source_form_template_id := l_source_form_template_id;
52 p_object_version_number := l_object_version_number;
53 --
54 hr_utility.set_location(' Leaving:'||l_proc, 70);
55 exception
56 when hr_api.validate_enabled then
57 --
58 -- As the Validate_Enabled exception has been raised
59 -- we must rollback to the savepoint
60 --
61 rollback to create_source_form_template;
62 --
63 -- Only set output warning arguments
64 -- (Any key or derived arguments must be set to null
65 -- when validation only mode is being used.)
66 --
67 p_source_form_template_id := null;
68 hr_utility.set_location(' Leaving:'||l_proc, 80);
69 when others then
70 --
71 -- A validation or unexpected error has occured
72 --
73 rollback to create_source_form_template;
74 hr_utility.set_location(' Leaving:'||l_proc, 90);
75 raise;
76 end create_source_form_template;
77 --
78 -- ----------------------------------------------------------------------------
79 -- |--------------------------< delete_source_form_template >-----------------|
80 -- ----------------------------------------------------------------------------
81 --
82 procedure delete_source_form_template
83 (p_validate in boolean default false
84 ,p_source_form_template_id in number
85 ,p_object_version_number in number
86 ) is
87 --
88 -- Declare cursors and local variables
89 --
90
91 l_proc varchar2(72) := g_package||'delete_source_form_template';
92 begin
93 hr_utility.set_location('Entering:'|| l_proc, 10);
94 --
95 -- Issue a savepoint
96 --
97 savepoint delete_source_form_template;
98 --
99 -- Process Logic
100 --
101
102 hr_sft_del.del( p_source_form_template_id => p_source_form_template_id
103 ,p_object_version_number => p_object_version_number);
104
105 --
106 -- When in validation only mode raise the Validate_Enabled exception
107 --
108 if p_validate then
109 raise hr_api.validate_enabled;
110 end if;
111 --
112 hr_utility.set_location(' Leaving:'||l_proc, 70);
113 exception
114 when hr_api.validate_enabled then
115 --
116 -- As the Validate_Enabled exception has been raised
117 -- we must rollback to the savepoint
118 --
119 rollback to delete_source_form_template;
120 --
121 -- Only set output warning arguments
122 -- (Any key or derived arguments must be set to null
123 -- when validation only mode is being used.)
124 --
125 hr_utility.set_location(' Leaving:'||l_proc, 80);
126 when others then
127 --
128 -- A validation or unexpected error has occured
129 --
130 rollback to delete_source_form_template;
131 hr_utility.set_location(' Leaving:'||l_proc, 90);
132 raise;
133 end delete_source_form_template;
134 --
135 end hr_source_form_templates_bsi;