1 PACKAGE per_organization_structure_api AS
2 /* $Header: peorsapi.pkh 120.2 2005/10/22 01:24:14 aroussel noship $ */
3 /*#
4 * This package contains APIs that create and maintain organization
5 * hierarchies.
6 * @rep:scope public
7 * @rep:product per
8 * @rep:displayname Organization Hierarchy
9 */
10 g_package VARCHAR2(33) := ' per_organization_structure_api.';
11 --
12 -------------------------------------------------------------------------------
13 g_dummy number(1); -- Dummy for cursor returns which are not needed
14 g_business_group_id number(15); -- For validating translation;
15 g_legislation_code varchar2(150); -- For validating translation;
16 -------------------------------------------------------------------------------
17 --
18 -- ----------------------------------------------------------------------------
19 -- |----------------------< create_org_struct_and_def_ver >-------------------|
20 -- ----------------------------------------------------------------------------
21 --
22 -- {Start Of Comments}
23 /*#
24 * This procedure creates an organization hierarchy and organization hierarchy
25 * version.
26 *
27 * An organization structure show reporting lines or other relationships. You
28 * can use hierarchies for reporting and for controlling access to Oracle HRMS
29 * information.
30 *
31 * <p><b>Licensing</b><br>
32 * This API is licensed for use with Human Resources.
33 *
34 * <p><b>Prerequisites</b><br>
35 * None
36 *
37 * <p><b>Post Success</b><br>
38 * Organization hierarchy and version will be created.
39 *
40 * <p><b>Post Failure</b><br>
41 * Organization hierarchy and version will not be created and an error will
42 * raised.
43 * @param p_validate If true, then validation alone will be performed and the
44 * database will remain unchanged. If false and all validation checks pass,
45 * then the database will be modified.
46 * @param p_effective_date Reference date for validating lookup values are
47 * applicable during the start to end active date range. This date does not
48 * determine when the changes take effect.
49 * @param p_name The name of the organization hierarchy the process creates.
50 * @param p_business_group_id Uniquely identifies the business group associated
51 * with the organization hierarchy.
52 * @param p_comments Comment Text
53 * @param p_primary_structure_flag Flag specifying if the created organization
54 * hierarchy is the primary organization hierarchy for the business group.
55 * Valid values are "Y" and 'N'.
56 * @param p_request_id When the API is executed from a concurrent program set
57 * to the concurrent request identifier.
58 * @param p_program_application_id When the API is executed from a concurrent
59 * program set to the program's Application.
60 * @param p_program_id When the API is executed from a concurrent program set
61 * to the program's identifier.
62 * @param p_program_update_date When the API is executed from a concurrent
63 * program set to when the program was ran.
64 * @param p_attribute_category This context value determines which flexfield
65 * structure to use with the descriptive flexfield segments.
66 * @param p_attribute1 Descriptive flexfield segment.
67 * @param p_attribute2 Descriptive flexfield segment.
68 * @param p_attribute3 Descriptive flexfield segment.
69 * @param p_attribute4 Descriptive flexfield segment.
70 * @param p_attribute5 Descriptive flexfield segment.
71 * @param p_attribute6 Descriptive flexfield segment.
72 * @param p_attribute7 Descriptive flexfield segment.
73 * @param p_attribute8 Descriptive flexfield segment.
74 * @param p_attribute9 Descriptive flexfield segment.
75 * @param p_attribute10 Descriptive flexfield segment.
76 * @param p_attribute11 Descriptive flexfield segment.
77 * @param p_attribute12 Descriptive flexfield segment.
78 * @param p_attribute13 Descriptive flexfield segment.
79 * @param p_attribute14 Descriptive flexfield segment.
80 * @param p_attribute15 Descriptive flexfield segment.
81 * @param p_attribute16 Descriptive flexfield segment.
82 * @param p_attribute17 Descriptive flexfield segment.
83 * @param p_attribute18 Descriptive flexfield segment.
84 * @param p_attribute19 Descriptive flexfield segment.
85 * @param p_attribute20 Descriptive flexfield segment.
86 * @param p_position_control_structure_f Position control structure flag
87 * @param p_organization_structure_id If p_validate is false, then this
88 * uniquely identifies the organization hierarchy record created. If p_validate
89 * is true, then set to null.
90 * @param p_object_version_number If p_validate is false, then set to the
91 * version number of the created Organization Hierarchy. If p_validate is true,
92 * then the value will be null.
93 * @rep:displayname Create Organizatiion Hierarchy and Version
94 * @rep:category BUSINESS_ENTITY PER_ORGANIZATION_HIERARCHY
95 * @rep:scope public
96 * @rep:lifecycle active
97 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
98 */
99 --
100 -- {End Of Comments}
101 --
102 PROCEDURE create_org_struct_and_def_ver
103 (p_validate IN BOOLEAN DEFAULT false
104 ,p_effective_date in date
105 ,p_name in varchar2
106 ,p_business_group_id in number default null
107 ,p_comments in varchar2 default null
108 ,p_primary_structure_flag in varchar2 default 'N'
109 ,p_request_id in number default null
110 ,p_program_application_id in number default null
111 ,p_program_id in number default null
112 ,p_program_update_date in date default null
113 ,p_attribute_category in varchar2 default null
114 ,p_attribute1 in varchar2 default null
115 ,p_attribute2 in varchar2 default null
116 ,p_attribute3 in varchar2 default null
117 ,p_attribute4 in varchar2 default null
118 ,p_attribute5 in varchar2 default null
119 ,p_attribute6 in varchar2 default null
120 ,p_attribute7 in varchar2 default null
121 ,p_attribute8 in varchar2 default null
122 ,p_attribute9 in varchar2 default null
123 ,p_attribute10 in varchar2 default null
124 ,p_attribute11 in varchar2 default null
125 ,p_attribute12 in varchar2 default null
126 ,p_attribute13 in varchar2 default null
127 ,p_attribute14 in varchar2 default null
128 ,p_attribute15 in varchar2 default null
129 ,p_attribute16 in varchar2 default null
130 ,p_attribute17 in varchar2 default null
131 ,p_attribute18 in varchar2 default null
132 ,p_attribute19 in varchar2 default null
133 ,p_attribute20 in varchar2 default null
134 ,p_position_control_structure_f in varchar2 default 'N'
135 ,p_organization_structure_id out nocopy number
136 ,p_object_version_number out nocopy number
137 );
138 --
139 -- ----------------------------------------------------------------------------
140 -- |----------------------< create_organization_structure >-------------------|
141 -- ----------------------------------------------------------------------------
142 --
143 -- {Start Of Comments}
144 /*#
145 * This API creates an Organization Hierarchy.
146 *
147 * An organization structure show reporting lines or other relationships. You
148 * can use hierarchies for reporting and for controlling access to Oracle HRMS
149 * information.
150 *
151 * <p><b>Licensing</b><br>
152 * This API is licensed for use with Human Resources.
153 *
154 * <p><b>Prerequisites</b><br>
155 * None
156 *
157 * <p><b>Post Success</b><br>
158 * Organization hierarchy will be created.
159 *
160 * <p><b>Post Failure</b><br>
161 * Organization hierarchy will not be created and an error will raised.
162 * @param p_validate If true, then validation alone will be performed and the
163 * database will remain unchanged. If false and all validation checks pass,
164 * then the database will be modified.
165 * @param p_effective_date Reference date for validating lookup values are
166 * applicable during the start to end active date range. This date does not
167 * determine when the changes take effect.
168 * @param p_name The name of the organization hierarchy.
169 * @param p_business_group_id Uniquely identifies the business group associated
170 * with the created organization hierarchy.
171 * @param p_comments Comment text.
172 * @param p_primary_structure_flag Flag specifying if the created organization
173 * hierarchy is the primary organization hierarchy for the business group.
174 * Valid values are "Y" and 'N'.
175 * @param p_request_id When the API is executed from a concurrent program set
176 * to the concurrent request identifier.
177 * @param p_program_application_id When the API is executed from a concurrent
178 * program set to the program's Application.
179 * @param p_program_id When the API is executed from a concurrent program set
180 * to the program's identifier.
181 * @param p_program_update_date When the API is executed from a concurrent
182 * program set to when the program was ran.
183 * @param p_attribute_category This context value determines which flexfield
184 * structure to use with the descriptive flexfield segments.
185 * @param p_attribute1 Descriptive flexfield segment.
186 * @param p_attribute2 Descriptive flexfield segment.
187 * @param p_attribute3 Descriptive flexfield segment.
188 * @param p_attribute4 Descriptive flexfield segment.
189 * @param p_attribute5 Descriptive flexfield segment.
190 * @param p_attribute6 Descriptive flexfield segment.
191 * @param p_attribute7 Descriptive flexfield segment.
192 * @param p_attribute8 Descriptive flexfield segment.
193 * @param p_attribute9 Descriptive flexfield segment.
194 * @param p_attribute10 Descriptive flexfield segment.
195 * @param p_attribute11 Descriptive flexfield segment.
196 * @param p_attribute12 Descriptive flexfield segment.
197 * @param p_attribute13 Descriptive flexfield segment.
198 * @param p_attribute14 Descriptive flexfield segment.
199 * @param p_attribute15 Descriptive flexfield segment.
200 * @param p_attribute16 Descriptive flexfield segment.
201 * @param p_attribute17 Descriptive flexfield segment.
202 * @param p_attribute18 Descriptive flexfield segment.
203 * @param p_attribute19 Descriptive flexfield segment.
204 * @param p_attribute20 Descriptive flexfield segment.
205 * @param p_position_control_structure_f Position control structure flag
206 * @param p_organization_structure_id If p_validate is false, then this
207 * uniquely identifies the organization hierarchy record created. If p_validate
208 * is true, then set to null.
209 * @param p_object_version_number If p_validate is false, then set to the
210 * version number of the created Organization Hierarchy. If p_validate is true,
211 * then the value will be null.
212 * @rep:displayname Create Organization Hierarchy
213 * @rep:category BUSINESS_ENTITY PER_ORGANIZATION_HIERARCHY
214 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
215 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
216 * @rep:scope public
217 * @rep:lifecycle active
218 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
219 */
220 --
221 -- {End Of Comments}
222 --
223 PROCEDURE create_organization_structure
224 (p_validate IN BOOLEAN default false
225 ,p_effective_date in date
226 ,p_name in varchar2
227 ,p_business_group_id in number default null
228 ,p_comments in varchar2 default null
229 ,p_primary_structure_flag in varchar2 default 'N'
230 ,p_request_id in number default null
231 ,p_program_application_id in number default null
232 ,p_program_id in number default null
233 ,p_program_update_date in date default null
234 ,p_attribute_category in varchar2 default null
235 ,p_attribute1 in varchar2 default null
236 ,p_attribute2 in varchar2 default null
237 ,p_attribute3 in varchar2 default null
238 ,p_attribute4 in varchar2 default null
239 ,p_attribute5 in varchar2 default null
240 ,p_attribute6 in varchar2 default null
241 ,p_attribute7 in varchar2 default null
242 ,p_attribute8 in varchar2 default null
243 ,p_attribute9 in varchar2 default null
244 ,p_attribute10 in varchar2 default null
245 ,p_attribute11 in varchar2 default null
246 ,p_attribute12 in varchar2 default null
247 ,p_attribute13 in varchar2 default null
248 ,p_attribute14 in varchar2 default null
249 ,p_attribute15 in varchar2 default null
250 ,p_attribute16 in varchar2 default null
251 ,p_attribute17 in varchar2 default null
252 ,p_attribute18 in varchar2 default null
253 ,p_attribute19 in varchar2 default null
254 ,p_attribute20 in varchar2 default null
255 ,p_position_control_structure_f in varchar2 default 'N'
256 ,p_organization_structure_id out nocopy number
257 ,p_object_version_number out nocopy number
258 );
259 --
260 -- ----------------------------------------------------------------------------
261 -- |----------------------< update_organization_structure >-------------------|
262 -- ----------------------------------------------------------------------------
263 --
264 -- {Start Of Comments}
265 /*#
266 * This API updates an organization hierarchy.
267 *
268 * An organization structure show reporting lines or other relationships. You
269 * can use hierarchies for reporting and for controlling access to Oracle HRMS
270 * information.
271 *
272 * <p><b>Licensing</b><br>
273 * This API is licensed for use with Human Resources.
274 *
275 * <p><b>Prerequisites</b><br>
276 * A valid organization hierarchy must exist.
277 *
278 * <p><b>Post Success</b><br>
279 * Organization hierarchy is updated.
280 *
281 * <p><b>Post Failure</b><br>
282 * Organization hierarchy will not be updated and an error will raised.
283 * @param p_validate If true, then validation alone will be performed and the
284 * database will remain unchanged. If false and all validation checks pass,
285 * then the database will be modified.
286 * @param p_effective_date Reference date for validating lookup values are
287 * applicable during the start to end active date range. This date does not
288 * determine when the changes take effect.
292 * @param p_comments Comment text.
289 * @param p_organization_structure_id Identifies the organization hierarchy
290 * record to modify.
291 * @param p_name Name of organization hierarchy
293 * @param p_primary_structure_flag Flag specifying if the created organization
294 * hierarchy is the primary organization hierarchy for the business group.
295 * Valid values are "Y" and 'N'.
296 * @param p_request_id When the API is executed from a concurrent program set
297 * to the concurrent request identifier.
298 * @param p_program_application_id When the API is executed from a concurrent
299 * program set to the program's Application.
300 * @param p_program_id When the API is executed from a concurrent program set
301 * to the program's identifier.
302 * @param p_program_update_date When the API is executed from a concurrent
303 * program set to when the program was ran.
304 * @param p_attribute_category This context value determines which flexfield
305 * structure to use with the descriptive flexfield segments.
306 * @param p_attribute1 Descriptive flexfield segment.
307 * @param p_attribute2 Descriptive flexfield segment.
308 * @param p_attribute3 Descriptive flexfield segment.
309 * @param p_attribute4 Descriptive flexfield segment.
310 * @param p_attribute5 Descriptive flexfield segment.
311 * @param p_attribute6 Descriptive flexfield segment.
312 * @param p_attribute7 Descriptive flexfield segment.
313 * @param p_attribute8 Descriptive flexfield segment.
314 * @param p_attribute9 Descriptive flexfield segment.
315 * @param p_attribute10 Descriptive flexfield segment.
316 * @param p_attribute11 Descriptive flexfield segment.
317 * @param p_attribute12 Descriptive flexfield segment.
318 * @param p_attribute13 Descriptive flexfield segment.
319 * @param p_attribute14 Descriptive flexfield segment.
320 * @param p_attribute15 Descriptive flexfield segment.
321 * @param p_attribute16 Descriptive flexfield segment.
322 * @param p_attribute17 Descriptive flexfield segment.
323 * @param p_attribute18 Descriptive flexfield segment.
324 * @param p_attribute19 Descriptive flexfield segment.
325 * @param p_attribute20 Descriptive flexfield segment.
326 * @param p_position_control_structure_f Position control structure flag
327 * @param p_object_version_number Pass in the current version number of the
328 * organization hierarchy to be updated. When the API completes if p_validate
329 * is false, will be set to the new version number of the updated organization
333 * @rep:category BUSINESS_ENTITY PER_ORGANIZATION_HIERARCHY
330 * hierarchy. If p_validate is true will be set to the same value which was
331 * passed in.
332 * @rep:displayname Update Organization Hierarchy
334 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
335 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
336 * @rep:scope public
337 * @rep:lifecycle active
338 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
339 */
340 --
341 -- {End Of Comments}
342 --
343 PROCEDURE update_organization_structure
344 (p_validate in boolean default false
345 ,p_effective_date in date
346 ,p_organization_structure_id in number
347 ,p_name in varchar2 default hr_api.g_varchar2
348 ,p_comments in varchar2 default hr_api.g_varchar2
349 ,p_primary_structure_flag in varchar2 default hr_api.g_varchar2
350 ,p_request_id in number default hr_api.g_number
351 ,p_program_application_id in number default hr_api.g_number
352 ,p_program_id in number default hr_api.g_number
353 ,p_program_update_date in date default hr_api.g_date
354 ,p_attribute_category in varchar2 default hr_api.g_varchar2
355 ,p_attribute1 in varchar2 default hr_api.g_varchar2
356 ,p_attribute2 in varchar2 default hr_api.g_varchar2
357 ,p_attribute3 in varchar2 default hr_api.g_varchar2
358 ,p_attribute4 in varchar2 default hr_api.g_varchar2
359 ,p_attribute5 in varchar2 default hr_api.g_varchar2
360 ,p_attribute6 in varchar2 default hr_api.g_varchar2
361 ,p_attribute7 in varchar2 default hr_api.g_varchar2
362 ,p_attribute8 in varchar2 default hr_api.g_varchar2
363 ,p_attribute9 in varchar2 default hr_api.g_varchar2
364 ,p_attribute10 in varchar2 default hr_api.g_varchar2
365 ,p_attribute11 in varchar2 default hr_api.g_varchar2
366 ,p_attribute12 in varchar2 default hr_api.g_varchar2
367 ,p_attribute13 in varchar2 default hr_api.g_varchar2
368 ,p_attribute14 in varchar2 default hr_api.g_varchar2
369 ,p_attribute15 in varchar2 default hr_api.g_varchar2
370 ,p_attribute16 in varchar2 default hr_api.g_varchar2
371 ,p_attribute17 in varchar2 default hr_api.g_varchar2
372 ,p_attribute18 in varchar2 default hr_api.g_varchar2
373 ,p_attribute19 in varchar2 default hr_api.g_varchar2
374 ,p_attribute20 in varchar2 default hr_api.g_varchar2
375 ,p_position_control_structure_f in varchar2 default hr_api.g_varchar2
376 ,p_object_version_number in out nocopy number
377 );
378 --
379 -- ----------------------------------------------------------------------------
380 -- |----------------------< delete_organization_structure >-------------------|
381 -- ----------------------------------------------------------------------------
382 --
383 -- {Start Of Comments}
384 /*#
385 * This API deletes a specified organization hierarchy.
386 *
387 * An organization structure show reporting lines or other relationships. You
388 * can use hierarchies for reporting and for controlling access to Oracle HRMS
389 * information.
390 *
391 * <p><b>Licensing</b><br>
392 * This API is licensed for use with Human Resources.
393 *
394 * <p><b>Prerequisites</b><br>
395 * A valid organization must exist.
396 *
397 * <p><b>Post Success</b><br>
398 * Organization hierarchy is deleted.
399 *
400 * <p><b>Post Failure</b><br>
401 * Organization hierarchy will not be deleted and an error will raised.
402 * @param p_validate If true, then validation alone will be performed and the
403 * database will remain unchanged. If false and all validation checks pass,
404 * then the database will be modified.
405 * @param p_organization_structure_id Identifies the organization hierarchy
406 * record to be deleted.
407 * @param p_object_version_number Current version number of the organization
408 * hierarchy to be deleted.
409 * @rep:displayname Delete Organization Hierarchy
410 * @rep:category BUSINESS_ENTITY PER_ORGANIZATION_HIERARCHY
411 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
412 * @rep:scope public
413 * @rep:lifecycle active
414 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
415 */
416 --
417 -- {End Of Comments}
418 --
419 PROCEDURE delete_organization_structure
420 ( p_validate IN BOOLEAN default false
421 ,p_organization_structure_id IN number
422 ,p_object_version_number IN number );
423 --
424 --
425 END per_organization_structure_api;