1: Package Body hr_api_module_internal as
2: /* $Header: peamdbsi.pkb 115.0 99/07/17 18:29:25 porting ship $ */
3: --
4: -- Package Variables
5: --
2: /* $Header: peamdbsi.pkb 115.0 99/07/17 18:29:25 porting ship $ */
3: --
4: -- Package Variables
5: --
6: g_package varchar2(33) := ' hr_api_module_internal.';
7: --
8: -- ------------------------------------------------------------------------
9: -- |--------------------------< create_api_module >----------------------------|
10: -- ------------------------------------------------------------------------
24: l_effective_date date;
25: --
26: -- Out variables
27: --
28: l_api_module_id hr_api_modules.api_module_id%TYPE;
29: --
30: l_proc varchar2(72) := g_package||'create_module';
31: --
32: -- Declare a cursor that will check whether the passed
32: -- Declare a cursor that will check whether the passed
33: -- in module type and module name form a unique combination
34: --
35: cursor csr_valid_combo is
36: select api_module_id from hr_api_modules ham
37: where ham.module_name = p_module_name
38: and ham.api_module_type = p_api_module_type;
39: --
40: begin
89: --
90: -- When in validation only mode raise the Validate_Enabled exception
91: --
92: if p_validate then
93: raise hr_api.validate_enabled;
94: end if;
95: --
96: -- Set all output arguments
97: --
98: p_api_module_id := l_api_module_id;
99: --
100: hr_utility.set_location(' Leaving:'||l_proc, 100);
101: exception
102: when hr_api.validate_enabled then
103: --
104: -- Only set output warning arguments
105: -- (Any key or derived arguments must be set to null
106: -- when validation only mode is being used.)
148: --
149: -- When in validation only mode raise the Validate_Enabled exception
150: --
151: if p_validate then
152: raise hr_api.validate_enabled;
153: end if;
154: --
155: hr_utility.set_location(' Leaving:'||l_proc, 100);
156: exception
153: end if;
154: --
155: hr_utility.set_location(' Leaving:'||l_proc, 100);
156: exception
157: when hr_api.validate_enabled then
158: --
159: -- As the Validate_Enabled exception has been raised
160: -- we must rollback to the savepoint
161: --
169: --
170: procedure update_api_module
171: (p_validate in boolean default false,
172: p_api_module_id in number,
173: p_module_name IN varchar2 default hr_api.g_varchar2,
174: p_module_package IN varchar2 default hr_api.g_varchar2,
175: p_data_within_business_group IN varchar2 default hr_api.g_varchar2,
176: p_effective_date IN date
177: ) is
170: procedure update_api_module
171: (p_validate in boolean default false,
172: p_api_module_id in number,
173: p_module_name IN varchar2 default hr_api.g_varchar2,
174: p_module_package IN varchar2 default hr_api.g_varchar2,
175: p_data_within_business_group IN varchar2 default hr_api.g_varchar2,
176: p_effective_date IN date
177: ) is
178: --
171: (p_validate in boolean default false,
172: p_api_module_id in number,
173: p_module_name IN varchar2 default hr_api.g_varchar2,
174: p_module_package IN varchar2 default hr_api.g_varchar2,
175: p_data_within_business_group IN varchar2 default hr_api.g_varchar2,
176: p_effective_date IN date
177: ) is
178: --
179: l_proc varchar2(72) := g_package||'update_api_module';
207: --
208: -- When in validation only mode raise the Validate_Enabled exception
209: --
210: if p_validate then
211: raise hr_api.validate_enabled;
212: end if;
213: --
214: hr_utility.set_location(' Leaving:'||l_proc, 100);
215: exception
212: end if;
213: --
214: hr_utility.set_location(' Leaving:'||l_proc, 100);
215: exception
216: when hr_api.validate_enabled then
217: --
218: -- As the Validate_Enabled exception has been raised
219: -- we must rollback to the savepoint
220: --
220: --
221: ROLLBACK TO update_api_module;
222: end update_api_module;
223: --
224: end hr_api_module_internal;