1 Package hr_person_absence_api AUTHID CURRENT_USER as
2 /* $Header: peabsapi.pkh 120.17 2011/12/22 09:36:26 sidsaxen ship $ */
3 /*#
4 * This package contains APIs to create update and delete absences for a
5 * person.
6 * @rep:scope public
7 * @rep:product per
8 * @rep:displayname Person Absence
9 */
10 --
11 -- ----------------------------------------------------------------------------
12 -- |--------------------------< create_person_absence >-----------------------|
13 -- ----------------------------------------------------------------------------
14 --
15 -- {Start Of Comments}
16 /*#
17 * This API records the details of an absence for a person.
18 *
19 * Use this API to record dates and times a person was, or will be, absent. You
20 * can also record the type of absence, projected and actual dates and times,
21 * the person who authorized the absence, and the person who replaces the
22 * absent person. This API also creates an element entry when you enter the
23 * actual absence details and associate the absence type with an element.
24 *
25 * <p><b>Licensing</b><br>
26 * This API is licensed for use with Human Resources.
27 *
28 * <p><b>Prerequisites</b><br>
29 * The person for whom an absence is being recorded must already exist within
30 * the business group. At least one absence type must have been set up.
31 *
32 * <p><b>Post Success</b><br>
33 * The absence record for the person will have been created.
34 *
35 * <p><b>Post Failure</b><br>
36 * The absence record will not be created and an error will be raised.
37 * @param p_validate If true, then validation alone will be performed and the
38 * database will remain unchanged. If false and all validation checks pass,
39 * then the database will be modified.
40 * @param p_effective_date Reference date for validating lookup values are
41 * applicable during the start to end active date range. This date does not
42 * determine when the changes take effect.
43 * @param p_person_id Uniquely identifies the person for whom you create the
44 * absence.
45 * @param p_business_group_id The business group under which you record the
46 * absence. This is usually the same business group that the person belongs to.
47 * @param p_absence_attendance_type_id Uniquely identifies the type of absence.
48 * @param p_abs_attendance_reason_id Uniquely identifies the reason for this
49 * absence.
50 * @param p_comments Comment text.
51 * @param p_date_notification The date when the organization was first notified
52 * about the absence.
53 * @param p_date_projected_start The projected start date of the absence.
54 * @param p_time_projected_start The projected start time of the absence. This
55 * can only be set when the absence type is associated with an hours-based
56 * absence element, or when the absence type has no associated element.
60 * element, or when the absence type has no associated element.
57 * @param p_date_projected_end The projected end date of the absence.
58 * @param p_time_projected_end The projected end time of the absence. This can
59 * only be set when the absence type is associated with an hours-based absence
61 * @param p_date_start The actual start date of the absence.
62 * @param p_time_start The actual start time of the absence. This can only be
63 * set when the absence type is associated with an hours-based absence element,
64 * or when the absence type has no associated element.
65 * @param p_date_end The actual end date of the absence.
66 * @param p_time_end The actual end time of the absence. This can only be set
67 * when the absence type is associated with an hours-based absence element, or
68 * when the absence type has no associated element.
69 * @param p_absence_days The duration of the absence in days. This can only be
70 * set when the absence type is associated with an hours-based absence element,
71 * or when the absence type has no associated element.
72 * @param p_absence_hours The duration of the absence in hours. This can only
73 * be set when the absence type is associated with an hours-based absence
74 * element, or when the absence type has no associated element.
75 * @param p_authorising_person_id Uniquely identifies the person who authorized
76 * this absence.
77 * @param p_replacement_person_id Uniquely identifies the person who replaces
78 * the absent person.
79 * @param p_attribute_category This context value determines which flexfield
80 * structure to use with the descriptive flexfield segments.
81 * @param p_attribute1 Descriptive flexfield segment.
82 * @param p_attribute2 Descriptive flexfield segment.
83 * @param p_attribute3 Descriptive flexfield segment.
84 * @param p_attribute4 Descriptive flexfield segment.
85 * @param p_attribute5 Descriptive flexfield segment.
86 * @param p_attribute6 Descriptive flexfield segment.
87 * @param p_attribute7 Descriptive flexfield segment.
88 * @param p_attribute8 Descriptive flexfield segment.
89 * @param p_attribute9 Descriptive flexfield segment.
90 * @param p_attribute10 Descriptive flexfield segment.
91 * @param p_attribute11 Descriptive flexfield segment.
92 * @param p_attribute12 Descriptive flexfield segment.
93 * @param p_attribute13 Descriptive flexfield segment.
94 * @param p_attribute14 Descriptive flexfield segment.
95 * @param p_attribute15 Descriptive flexfield segment.
96 * @param p_attribute16 Descriptive flexfield segment.
97 * @param p_attribute17 Descriptive flexfield segment.
98 * @param p_attribute18 Descriptive flexfield segment.
99 * @param p_attribute19 Descriptive flexfield segment.
100 * @param p_attribute20 Descriptive flexfield segment.
101 * @param p_period_of_incapacity_id Uniquely identifies the period of
102 * incapacity.
103 * @param p_ssp1_issued Set this to 'Y' if an SSP1 has been issued, otherwise
104 * set this to 'N'.
105 * @param p_maternity_id Uniquely identifies the maternity record, which is
106 * required when the absence is for SMP, SAP or SPP.
107 * @param p_sickness_start_date The date the sickness started.
108 * @param p_sickness_end_date The date the sickness ended.
109 * @param p_pregnancy_related_illness Set this to 'Y' if the illness is related
110 * to maternity leave, otherwise set this to 'N'.
111 * @param p_reason_for_notification_dela The reason for late notification,
112 * defined as free-format text.
113 * @param p_accept_late_notification_fla Set this to 'Y' if late notification
114 * was accepted, otherwise set this to 'N'.
115 * @param p_linked_absence_id Uniquely identifies the absence record that is
116 * the first absence in the PIW.
117 * @param p_batch_id Uniquely identifies the Batch Element Entry (BEE) run that
118 * automatically created this absence record. This is used to roll back BEE
119 * runs, and is for Oracle internal use only.
120 * @param p_create_element_entry When set to True (the default), the absence
121 * element is created automatically. When set to False, the absence element is
122 * not created. This is for Oracle internal use only.
123 * @param p_abs_information_category This context value determines which
124 * Flexfield Structure to use with the Developer Descriptive flexfield
125 * segments.
126 * @param p_abs_information1 Developer Descriptive flexfield segment.
127 * @param p_abs_information2 Developer Descriptive flexfield segment.
128 * @param p_abs_information3 Developer Descriptive flexfield segment.
129 * @param p_abs_information4 Developer Descriptive flexfield segment.
130 * @param p_abs_information5 Developer Descriptive flexfield segment.
131 * @param p_abs_information6 Developer Descriptive flexfield segment.
132 * @param p_abs_information7 Developer Descriptive flexfield segment.
133 * @param p_abs_information8 Developer Descriptive flexfield segment.
134 * @param p_abs_information9 Developer Descriptive flexfield segment.
135 * @param p_abs_information10 Developer Descriptive flexfield segment.
136 * @param p_abs_information11 Developer Descriptive flexfield segment.
137 * @param p_abs_information12 Developer Descriptive flexfield segment.
138 * @param p_abs_information13 Developer Descriptive flexfield segment.
139 * @param p_abs_information14 Developer Descriptive flexfield segment.
140 * @param p_abs_information15 Developer Descriptive flexfield segment.
141 * @param p_abs_information16 Developer Descriptive flexfield segment.
142 * @param p_abs_information17 Developer Descriptive flexfield segment.
143 * @param p_abs_information18 Developer Descriptive flexfield segment.
144 * @param p_abs_information19 Developer Descriptive flexfield segment.
145 * @param p_abs_information20 Developer Descriptive flexfield segment.
146 * @param p_abs_information21 Developer Descriptive flexfield segment.
147 * @param p_abs_information22 Developer Descriptive flexfield segment.
148 * @param p_abs_information23 Developer Descriptive flexfield segment.
149 * @param p_abs_information24 Developer Descriptive flexfield segment.
150 * @param p_abs_information25 Developer Descriptive flexfield segment.
154 * @param p_abs_information29 Developer Descriptive flexfield segment.
151 * @param p_abs_information26 Developer Descriptive flexfield segment.
152 * @param p_abs_information27 Developer Descriptive flexfield segment.
153 * @param p_abs_information28 Developer Descriptive flexfield segment.
155 * @param p_abs_information30 Developer Descriptive flexfield segment.
156 * @param p_absence_case_id Absence case id.
157 * @param p_program_application_id will be defaulted to 800
158 * @param p_called_from will defaulted to 800 to perform some validations this value is used
159 * @param p_absence_attendance_id If p_validate is false, then this uniquely
160 * identifies the absence record created. If p_validate is true, then this is
161 * set to null.
162 * @param p_object_version_number If p_validate is false, then set to the
163 * version number of the created absence record. If p_validate is true, then
164 * the value will be null.
165 * @param p_occurrence A numerical sequence that denotes the number of absences
166 * this person has taken for this type of absence.
167 * @param p_dur_dys_less_warning If set to true, this serves as a warning that
168 * the specified absence duration in days is different from what the system has
169 * calculated. The application uses the BG_ABSENCE_DURATION Fast Formula for
170 * this calculation if it exists.
171 * @param p_dur_hrs_less_warning If set to true, this serves as a warning that
172 * the specified absence duration in hours is different from what the system has
173 * calculated. The application uses the BG_ABSENCE_DURATION Fast Formula for
174 * this calculation if it exists.
175 * @param p_exceeds_pto_entit_warning If set to true, this serves as a warning
176 * that the net entitlement of at least one of this person's accrual plans will
177 * be below zero when you apply this absence.
178 * @param p_exceeds_run_total_warning If set to true, this serves as a warning
179 * that the absence's type is using a decreasing balance and that the running
180 * total will be below zero when you apply this absence.
181 * @param p_abs_overlap_warning If set to true, this serves as a warning that
182 * this absence overlaps an existing absence for this person.
183 * @param p_abs_day_after_warning If set to true, this serves as a warning that
184 * this absence starts the day after an existing sickness absence. A sickness
185 * absence in this case is one that has an absence category starting with 'S'.
186 * @param p_dur_overwritten_warning If set to true, this serves as a warning
187 * that the HR: Absence Duration Auto Overwrite profile option is set to 'Yes'
188 * and that the the system-calculated duration has automatically overwritten
189 * the absence duration.
190 * @rep:displayname Create Person Absence
191 * @rep:category BUSINESS_ENTITY PER_EMPLOYEE_ABSENCE
192 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
193 * @rep:scope public
194 * @rep:lifecycle active
195 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
196 */
197 --
198 -- {End Of Comments}
199 --
200
201 procedure create_person_absence
202 (p_validate in boolean default false
203 ,p_effective_date in date
204 ,p_person_id in number
205 ,p_business_group_id in number
206 ,p_absence_attendance_type_id in number
207 ,p_abs_attendance_reason_id in number default null
208 ,p_comments in clob default null -- Bug#13362792
209 ,p_date_notification in date default null
210 ,p_date_projected_start in date default null
211 ,p_time_projected_start in varchar2 default null
212 ,p_date_projected_end in date default null
213 ,p_time_projected_end in varchar2 default null
214 ,p_date_start in date default null
215 ,p_time_start in varchar2 default null
216 ,p_date_end in date default null
217 ,p_time_end in varchar2 default null
218 ,p_absence_days in out nocopy number
219 ,p_absence_hours in out nocopy number
220 ,p_authorising_person_id in number default null
221 ,p_replacement_person_id in number default null
222 ,p_attribute_category in varchar2 default null
223 ,p_attribute1 in varchar2 default null
224 ,p_attribute2 in varchar2 default null
225 ,p_attribute3 in varchar2 default null
226 ,p_attribute4 in varchar2 default null
227 ,p_attribute5 in varchar2 default null
228 ,p_attribute6 in varchar2 default null
229 ,p_attribute7 in varchar2 default null
230 ,p_attribute8 in varchar2 default null
231 ,p_attribute9 in varchar2 default null
232 ,p_attribute10 in varchar2 default null
233 ,p_attribute11 in varchar2 default null
234 ,p_attribute12 in varchar2 default null
235 ,p_attribute13 in varchar2 default null
236 ,p_attribute14 in varchar2 default null
237 ,p_attribute15 in varchar2 default null
238 ,p_attribute16 in varchar2 default null
239 ,p_attribute17 in varchar2 default null
240 ,p_attribute18 in varchar2 default null
241 ,p_attribute19 in varchar2 default null
242 ,p_attribute20 in varchar2 default null
243 ,p_period_of_incapacity_id in number default null
244 ,p_ssp1_issued in varchar2 default 'N'
245 ,p_maternity_id in number default null
246 ,p_sickness_start_date in date default null
247 ,p_sickness_end_date in date default null
251 ,p_linked_absence_id in number default null
248 ,p_pregnancy_related_illness in varchar2 default 'N'
249 ,p_reason_for_notification_dela in varchar2 default null
250 ,p_accept_late_notification_fla in varchar2 default 'N'
252 ,p_batch_id in number default null
253 ,p_create_element_entry in boolean default true
254 ,p_abs_information_category in varchar2 default null
255 ,p_abs_information1 in varchar2 default null
256 ,p_abs_information2 in varchar2 default null
257 ,p_abs_information3 in varchar2 default null
258 ,p_abs_information4 in varchar2 default null
259 ,p_abs_information5 in varchar2 default null
260 ,p_abs_information6 in varchar2 default null
261 ,p_abs_information7 in varchar2 default null
262 ,p_abs_information8 in varchar2 default null
263 ,p_abs_information9 in varchar2 default null
264 ,p_abs_information10 in varchar2 default null
265 ,p_abs_information11 in varchar2 default null
266 ,p_abs_information12 in varchar2 default null
267 ,p_abs_information13 in varchar2 default null
268 ,p_abs_information14 in varchar2 default null
269 ,p_abs_information15 in varchar2 default null
270 ,p_abs_information16 in varchar2 default null
271 ,p_abs_information17 in varchar2 default null
272 ,p_abs_information18 in varchar2 default null
273 ,p_abs_information19 in varchar2 default null
274 ,p_abs_information20 in varchar2 default null
275 ,p_abs_information21 in varchar2 default null
276 ,p_abs_information22 in varchar2 default null
277 ,p_abs_information23 in varchar2 default null
278 ,p_abs_information24 in varchar2 default null
279 ,p_abs_information25 in varchar2 default null
280 ,p_abs_information26 in varchar2 default null
281 ,p_abs_information27 in varchar2 default null
282 ,p_abs_information28 in varchar2 default null
283 ,p_abs_information29 in varchar2 default null
284 ,p_abs_information30 in varchar2 default null
285 ,p_absence_case_id in number default null
286 ,p_program_application_id in number default 800
287 ,p_called_from in number default 800
288 ,p_absence_attendance_id out nocopy number
289 ,p_object_version_number out nocopy number
290 ,p_occurrence out nocopy number
291 ,p_dur_dys_less_warning out nocopy boolean
292 ,p_dur_hrs_less_warning out nocopy boolean
293 ,p_exceeds_pto_entit_warning out nocopy boolean
294 ,p_exceeds_run_total_warning out nocopy boolean
295 ,p_abs_overlap_warning out nocopy boolean
296 ,p_abs_day_after_warning out nocopy boolean
297 ,p_dur_overwritten_warning out nocopy boolean
298 );
299 --
300 -- ----------------------------------------------------------------------------
301 -- |--------------------------< update_person_absence >-----------------------|
302 -- ----------------------------------------------------------------------------
303 --
304 -- {Start Of Comments}
305 /*#
306 * This API updates the details of an absence for a person.
307 *
308 * Use this API to update projected and actual dates and times a person is
309 * absent, the person who authorized the absence, and the person who replaces
310 * the absent person. The API also updates the absence element entry when you
311 * change the actual absence details and the absence type is associated with an
312 * element.
313 *
314 * <p><b>Licensing</b><br>
315 * This API is licensed for use with Human Resources.
316 *
317 * <p><b>Prerequisites</b><br>
318 * The absence record being updated must already exist.
319 *
320 * <p><b>Post Success</b><br>
321 * The absence record for the person will have been updated.
322 *
323 * <p><b>Post Failure</b><br>
324 * The absence record will not be updated and an error will be raised.
325 * @param p_validate If true, then validation alone will be performed and the
326 * database will remain unchanged. If false and all validation checks pass,
327 * then the database will be modified.
328 * @param p_effective_date Reference date for validating lookup values are
329 * applicable during the start to end active date range. This date does not
330 * determine when the changes take effect.
331 * @param p_absence_attendance_id Uniquely identifies the absence record that
332 * is being updated.
333 * @param p_abs_attendance_reason_id Uniquely identifies the reason for this
334 * absence.
335 * @param p_comments Comment text.
336 * @param p_date_notification The date when the organization was first notified
337 * about the absence.
338 * @param p_date_projected_start The projected start date of the absence.
339 * @param p_time_projected_start The projected start time of the absence. This
340 * can only be set when the absence type is associated with an hours-based
341 * absence element, or when the absence type has no associated element.
342 * @param p_date_projected_end The projected end date of the absence.
343 * @param p_time_projected_end The projected end time of the absence. This can
344 * only be set when the absence type is associated with an hours-based absence
345 * element, or when the absence type has no associated element.
346 * @param p_date_start The actual start date of the absence.
347 * @param p_time_start The actual start time of the absence. This can only be
348 * set when the absence type is associated with an hours-based absence element,
349 * or when the absence type has no associated element.
353 * when the absence type has no associated element.
350 * @param p_date_end The actual end date of the absence.
351 * @param p_time_end The actual end time of the absence. This can only be set
352 * when the absence type is associated with an hours-based absence element, or
354 * @param p_absence_days The duration of the absence in days. This can only be
355 * set when the absence type is associated with an hours-based absence element,
356 * or when the absence type has no associated element.
357 * @param p_absence_hours The duration of the absence in hours. This can only
358 * be set when the absence type is associated with an hours-based absence
359 * element, or when the absence type has no associated element.
360 * @param p_authorising_person_id Uniquely identifies the person who authorised
361 * this absence.
362 * @param p_replacement_person_id Uniquely identifies the person who replaces
363 * the absent person.
364 * @param p_attribute_category This context value determines which flexfield
365 * structure to use with the descriptive flexfield segments.
366 * @param p_attribute1 Descriptive flexfield segment.
367 * @param p_attribute2 Descriptive flexfield segment.
368 * @param p_attribute3 Descriptive flexfield segment.
369 * @param p_attribute4 Descriptive flexfield segment.
370 * @param p_attribute5 Descriptive flexfield segment.
371 * @param p_attribute6 Descriptive flexfield segment.
372 * @param p_attribute7 Descriptive flexfield segment.
373 * @param p_attribute8 Descriptive flexfield segment.
374 * @param p_attribute9 Descriptive flexfield segment.
375 * @param p_attribute10 Descriptive flexfield segment.
376 * @param p_attribute11 Descriptive flexfield segment.
377 * @param p_attribute12 Descriptive flexfield segment.
378 * @param p_attribute13 Descriptive flexfield segment.
379 * @param p_attribute14 Descriptive flexfield segment.
380 * @param p_attribute15 Descriptive flexfield segment.
381 * @param p_attribute16 Descriptive flexfield segment.
382 * @param p_attribute17 Descriptive flexfield segment.
383 * @param p_attribute18 Descriptive flexfield segment.
384 * @param p_attribute19 Descriptive flexfield segment.
385 * @param p_attribute20 Descriptive flexfield segment.
386 * @param p_period_of_incapacity_id Uniquely identifies the period of
387 * incapacity.
388 * @param p_ssp1_issued Set this to 'Y' if an SSP1 has been issued, otherwise
389 * set this to 'N'.
390 * @param p_maternity_id Uniquely identifies the maternity record, which is
391 * required when the absence is for SMP, SAP or SPP.
392 * @param p_sickness_start_date The date the sickness started.
393 * @param p_sickness_end_date The date the sickness ended.
394 * @param p_pregnancy_related_illness Set this to 'Y' if the illness is related
395 * to maternity leave, otherwise set this to 'N'.
396 * @param p_reason_for_notification_dela The reason for late notification,
397 * defined as free-format text.
398 * @param p_accept_late_notification_fla Set this to 'Y' if late notification
399 * was accepted, otherwise set this to 'N'.
400 * @param p_linked_absence_id Uniquely identifies the absence record that is
401 * the first absence in the PIW.
402 * @param p_batch_id Uniquely identifies the Batch Element Entry (BEE) run that
403 * automatically created this absence record. This is used to roll back BEE
404 * runs, and is for Oracle internal use only.
405 * @param p_abs_information_category This context value determines which
406 * Flexfield Structure to use with the Developer Descriptive flexfield
407 * segments.
408 * @param p_abs_information1 Developer Descriptive flexfield segment.
409 * @param p_abs_information2 Developer Descriptive flexfield segment.
410 * @param p_abs_information3 Developer Descriptive flexfield segment.
411 * @param p_abs_information4 Developer Descriptive flexfield segment.
412 * @param p_abs_information5 Developer Descriptive flexfield segment.
413 * @param p_abs_information6 Developer Descriptive flexfield segment.
414 * @param p_abs_information7 Developer Descriptive flexfield segment.
415 * @param p_abs_information8 Developer Descriptive flexfield segment.
416 * @param p_abs_information9 Developer Descriptive flexfield segment.
417 * @param p_abs_information10 Developer Descriptive flexfield segment.
418 * @param p_abs_information11 Developer Descriptive flexfield segment.
419 * @param p_abs_information12 Developer Descriptive flexfield segment.
420 * @param p_abs_information13 Developer Descriptive flexfield segment.
421 * @param p_abs_information14 Developer Descriptive flexfield segment.
422 * @param p_abs_information15 Developer Descriptive flexfield segment.
423 * @param p_abs_information16 Developer Descriptive flexfield segment.
424 * @param p_abs_information17 Developer Descriptive flexfield segment.
425 * @param p_abs_information18 Developer Descriptive flexfield segment.
426 * @param p_abs_information19 Developer Descriptive flexfield segment.
427 * @param p_abs_information20 Developer Descriptive flexfield segment.
428 * @param p_abs_information21 Developer Descriptive flexfield segment.
429 * @param p_abs_information22 Developer Descriptive flexfield segment.
430 * @param p_abs_information23 Developer Descriptive flexfield segment.
431 * @param p_abs_information24 Developer Descriptive flexfield segment.
432 * @param p_abs_information25 Developer Descriptive flexfield segment.
433 * @param p_abs_information26 Developer Descriptive flexfield segment.
434 * @param p_abs_information27 Developer Descriptive flexfield segment.
435 * @param p_abs_information28 Developer Descriptive flexfield segment.
436 * @param p_abs_information29 Developer Descriptive flexfield segment.
437 * @param p_abs_information30 Developer Descriptive flexfield segment.
438 * @param p_absence_case_id Absence case id.
439 * @param p_program_application_id will be defaulted to 800
440 * @param p_called_from will defaulted to 800 to perform some validations this value is used
441 * @param p_object_version_number Pass in the current version number of the
442 * Absence to be updated. When the API completes if p_validate is false, will
446 * the specified absence duration in days is different from what the system has
443 * be set to the new version number of the updated Absence. If p_validate is
444 * true will be set to the same value which was passed in.
445 * @param p_dur_dys_less_warning If set to true, this serves as a warning that
447 * calculated. The application uses the BG_ABSENCE_DURATION Fast Formula for
448 * this calculation if it exists.
449 * @param p_dur_hrs_less_warning If set to true, this serves as a warning that
450 * the specified absence duration in hours is different from what the system has
451 * calculated. The application uses the BG_ABSENCE_DURATION Fast Formula for
452 * this calculation if it exists.
453 * @param p_exceeds_pto_entit_warning If set to true, this serves as a warning
454 * that the net entitlement of at least one of this person's accrual plans will
455 * be below zero when you apply this absence.
456 * @param p_exceeds_run_total_warning If set to true, this serves as a warning
457 * that the absence's type is using a decreasing balance and that the running
458 * total will be below zero when you apply this absence.
459 * @param p_abs_overlap_warning If set to true, this serves as a warning that
460 * this absence overlaps an existing absence for this person.
461 * @param p_abs_day_after_warning If set to true, this serves as a warning that
462 * this absence starts the day after an existing sickness absence. A sickness
463 * absence in this case is one that has an absence category starting with 'S'.
464 * @param p_dur_overwritten_warning If set to true, this serves as a warning
465 * that the HR: Absence Duration Auto Overwrite profile option is set to 'Yes'
466 * and that the the system-calculated duration has automatically overwritten
467 * the absence duration.
468 * @param p_del_element_entry_warning If set to true, this serves as a warning
469 * that the associated absence element entry will be deleted.
470 * @rep:displayname Update Person Absence
471 * @rep:category BUSINESS_ENTITY PER_EMPLOYEE_ABSENCE
472 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
473 * @rep:scope public
474 * @rep:lifecycle active
475 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
476 */
477 --
478 -- {End Of Comments}
479 --
480 procedure update_person_absence
481 (p_validate in boolean default false
482 ,p_effective_date in date
483 ,p_absence_attendance_id in number
484 ,p_abs_attendance_reason_id in number default hr_api.g_number
485 ,p_comments in clob default hr_api.g_varchar2 -- Bug#13362792
486 ,p_date_notification in date default hr_api.g_date
487 ,p_date_projected_start in date default hr_api.g_date
488 ,p_time_projected_start in varchar2 default hr_api.g_varchar2
489 ,p_date_projected_end in date default hr_api.g_date
490 ,p_time_projected_end in varchar2 default hr_api.g_varchar2
491 ,p_date_start in date default hr_api.g_date
492 ,p_time_start in varchar2 default hr_api.g_varchar2
493 ,p_date_end in date default hr_api.g_date
494 ,p_time_end in varchar2 default hr_api.g_varchar2
495 ,p_absence_days in out nocopy number
496 ,p_absence_hours in out nocopy number
497 ,p_authorising_person_id in number default hr_api.g_number
498 ,p_replacement_person_id in number default hr_api.g_number
499 ,p_attribute_category in varchar2 default hr_api.g_varchar2
500 ,p_attribute1 in varchar2 default hr_api.g_varchar2
501 ,p_attribute2 in varchar2 default hr_api.g_varchar2
502 ,p_attribute3 in varchar2 default hr_api.g_varchar2
503 ,p_attribute4 in varchar2 default hr_api.g_varchar2
504 ,p_attribute5 in varchar2 default hr_api.g_varchar2
505 ,p_attribute6 in varchar2 default hr_api.g_varchar2
506 ,p_attribute7 in varchar2 default hr_api.g_varchar2
507 ,p_attribute8 in varchar2 default hr_api.g_varchar2
508 ,p_attribute9 in varchar2 default hr_api.g_varchar2
509 ,p_attribute10 in varchar2 default hr_api.g_varchar2
510 ,p_attribute11 in varchar2 default hr_api.g_varchar2
511 ,p_attribute12 in varchar2 default hr_api.g_varchar2
512 ,p_attribute13 in varchar2 default hr_api.g_varchar2
513 ,p_attribute14 in varchar2 default hr_api.g_varchar2
514 ,p_attribute15 in varchar2 default hr_api.g_varchar2
515 ,p_attribute16 in varchar2 default hr_api.g_varchar2
516 ,p_attribute17 in varchar2 default hr_api.g_varchar2
517 ,p_attribute18 in varchar2 default hr_api.g_varchar2
518 ,p_attribute19 in varchar2 default hr_api.g_varchar2
519 ,p_attribute20 in varchar2 default hr_api.g_varchar2
520 ,p_period_of_incapacity_id in number default hr_api.g_number
521 ,p_ssp1_issued in varchar2 default hr_api.g_varchar2
522 ,p_maternity_id in number default hr_api.g_number
523 ,p_sickness_start_date in date default hr_api.g_date
524 ,p_sickness_end_date in date default hr_api.g_date
525 ,p_pregnancy_related_illness in varchar2 default hr_api.g_varchar2
526 ,p_reason_for_notification_dela in varchar2 default hr_api.g_varchar2
527 ,p_accept_late_notification_fla in varchar2 default hr_api.g_varchar2
528 ,p_linked_absence_id in number default hr_api.g_number
529 ,p_batch_id in number default hr_api.g_number
530 ,p_abs_information_category in varchar2 default hr_api.g_varchar2
534 ,p_abs_information4 in varchar2 default hr_api.g_varchar2
531 ,p_abs_information1 in varchar2 default hr_api.g_varchar2
532 ,p_abs_information2 in varchar2 default hr_api.g_varchar2
533 ,p_abs_information3 in varchar2 default hr_api.g_varchar2
535 ,p_abs_information5 in varchar2 default hr_api.g_varchar2
536 ,p_abs_information6 in varchar2 default hr_api.g_varchar2
537 ,p_abs_information7 in varchar2 default hr_api.g_varchar2
538 ,p_abs_information8 in varchar2 default hr_api.g_varchar2
539 ,p_abs_information9 in varchar2 default hr_api.g_varchar2
540 ,p_abs_information10 in varchar2 default hr_api.g_varchar2
541 ,p_abs_information11 in varchar2 default hr_api.g_varchar2
542 ,p_abs_information12 in varchar2 default hr_api.g_varchar2
543 ,p_abs_information13 in varchar2 default hr_api.g_varchar2
544 ,p_abs_information14 in varchar2 default hr_api.g_varchar2
545 ,p_abs_information15 in varchar2 default hr_api.g_varchar2
546 ,p_abs_information16 in varchar2 default hr_api.g_varchar2
547 ,p_abs_information17 in varchar2 default hr_api.g_varchar2
548 ,p_abs_information18 in varchar2 default hr_api.g_varchar2
549 ,p_abs_information19 in varchar2 default hr_api.g_varchar2
550 ,p_abs_information20 in varchar2 default hr_api.g_varchar2
551 ,p_abs_information21 in varchar2 default hr_api.g_varchar2
552 ,p_abs_information22 in varchar2 default hr_api.g_varchar2
553 ,p_abs_information23 in varchar2 default hr_api.g_varchar2
554 ,p_abs_information24 in varchar2 default hr_api.g_varchar2
555 ,p_abs_information25 in varchar2 default hr_api.g_varchar2
556 ,p_abs_information26 in varchar2 default hr_api.g_varchar2
557 ,p_abs_information27 in varchar2 default hr_api.g_varchar2
558 ,p_abs_information28 in varchar2 default hr_api.g_varchar2
559 ,p_abs_information29 in varchar2 default hr_api.g_varchar2
560 ,p_abs_information30 in varchar2 default hr_api.g_varchar2
561 ,p_absence_case_id in number default hr_api.g_number
562 ,p_program_application_id in number default 800
563 ,p_called_from in number default 800
564 ,p_object_version_number in out nocopy number
565 ,p_dur_dys_less_warning out nocopy boolean
566 ,p_dur_hrs_less_warning out nocopy boolean
567 ,p_exceeds_pto_entit_warning out nocopy boolean
568 ,p_exceeds_run_total_warning out nocopy boolean
569 ,p_abs_overlap_warning out nocopy boolean
570 ,p_abs_day_after_warning out nocopy boolean
571 ,p_dur_overwritten_warning out nocopy boolean
572 ,p_del_element_entry_warning out nocopy boolean
573 );
574 --
575 -- ----------------------------------------------------------------------------
576 -- |--------------------------< delete_person_absence >-----------------------|
577 -- ----------------------------------------------------------------------------
578 --
579 -- {Start Of Comments}
580 /*#
581 * This API deletes an absence that was recorded for a person.
582 *
583 * Use this API to delete an absence for a person and, if it exists, the
584 * associated element entry that was previously recorded but is no longer
585 * needed.
586 *
587 * <p><b>Licensing</b><br>
588 * This API is licensed for use with Human Resources.
589 *
590 * <p><b>Prerequisites</b><br>
591 * The absence record being Deleted must already exist.
592 *
593 * <p><b>Post Success</b><br>
594 * The absence record for the person will have been deleted.
595 *
596 * <p><b>Post Failure</b><br>
597 * The absence record will not be deleted and an error will be raised.
598 * @param p_validate If true, then validation alone will be performed and the
599 * database will remain unchanged. If false and all validation checks pass,
600 * then the database will be modified.
601 * @param p_absence_attendance_id Uniquely identifies the absence record that
602 * is being deleted.
603 * @param p_object_version_number Current version number of the Absence to be
604 * deleted.
605 * @param p_called_from will defaulted to 800 used for validation
606 * @rep:displayname Delete Person Absence
607 * @rep:category BUSINESS_ENTITY PER_EMPLOYEE_ABSENCE
608 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
609 * @rep:scope public
610 * @rep:lifecycle active
611 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
612 */
613 --
614 -- {End Of Comments}
615 --
616 procedure delete_person_absence
617 (p_validate in boolean default false
618 ,p_absence_attendance_id in number
619 ,p_object_version_number in number
620 ,p_called_from in number default 800
621 );
622
623 --
624 -- ----------------------------------------------------------------------------
625 -- |----------------------< get_primary_assignment >--------------------------|
626 -- ----------------------------------------------------------------------------
627 --
628 function get_primary_assignment
629 (p_person_id in number,
630 p_effective_date in date) return number;
631
632 --
633 -- ----------------------------------------------------------------------------
634 -- |----------------------< linked_to_element >-------------------------------|
635 -- ----------------------------------------------------------------------------
636 --
637 function linked_to_element
638 (p_absence_attendance_id in number) return boolean;
639
640 --
641 -- ----------------------------------------------------------------------------
642 -- |----------------------< get_absence_element >-----------------------------|
643 -- ----------------------------------------------------------------------------
644 --
645 procedure get_absence_element
646 (p_absence_attendance_id in number
647 ,p_element_entry_id out nocopy number
648 ,p_effective_start_date out nocopy date
649 ,p_effective_end_date out nocopy date);
650
651 --
652 -- ----------------------------------------------------------------------------
653 -- |----------------------< get_processing_type >-----------------------------|
654 -- ----------------------------------------------------------------------------
655 --
656 function get_processing_type
657 (p_absence_attendance_type_id in number) return varchar2;
658
659 --
660 -- ----------------------------------------------------------------------------
661 -- |----------------------< get_element_details >-----------------------------|
662 -- ----------------------------------------------------------------------------
663 --
664 procedure get_element_details
665 (p_absence_attendance_id in number
666 ,p_element_type_id out nocopy number
667 ,p_input_value_id out nocopy number
668 ,p_entry_value out nocopy number
669 );
670
671 --
672 -- ----------------------------------------------------------------------------
673 -- |----------------------< insert_absence_element >--------------------------|
674 -- ----------------------------------------------------------------------------
675 --
676 procedure insert_absence_element
677 (p_date_start in date
678 ,p_assignment_id in number
679 ,p_absence_attendance_id in number
680 ,p_element_entry_id out nocopy number
681 );
682
683 --
684 -- ----------------------------------------------------------------------------
685 -- |----------------------< update_absence_element >--------------------------|
686 -- ----------------------------------------------------------------------------
687 --
688 procedure update_absence_element
689 (p_dt_update_mode in varchar2
690 ,p_session_date in date
691 ,p_element_entry_id in number
692 ,p_absence_attendance_id in number
693 );
694
695 --
696 -- ----------------------------------------------------------------------------
697 -- |----------------------< delete_absence_element >--------------------------|
698 -- ----------------------------------------------------------------------------
699 --
700 procedure delete_absence_element
701 (p_dt_delete_mode in varchar2
702 ,p_session_date in date
703 ,p_element_entry_id in number
704 );
705 --
706
707 -- ----------------------------------------------------------------------------
708 -- |----------------------< otl_hr_check >-------------------------|
709 -- ----------------------------------------------------------------------------
710 --
711
712 /*
713 * This procedure provides information regarding if cac is installed
714 * based on the parameters passed while calling it.
715 * When called with all the input parameters procedure will determine
716 * if an INSERT?DELETE/UPDATE is allowed based on the return value from
717 * OTL api.
718 */
719
720 procedure otl_hr_check
721 (
722 p_person_id number default null,
723 p_date_start date default null,
724 p_date_end date default null,
725 p_scope varchar2 default null,
726 p_ret_value out nocopy varchar2
727 );
728 --
729
730 type abs_details is record ( absence_type_id number(10),
731 element_type_ID NUMBER (10),
732 absence_attendance_id number(10),
733 abs_startdate varchar2(20),
734 abs_enddate varchar2(20),
735 PROGRAM_APPLICATION_ID number(15),
736 transactionid number,
737 modetype varchar2(20),
738 rec_start_date date,
739 rec_end_date date,
740 rec_duration number(9,4),
741 days_or_hours varchar2(2),
742 confirmed_flag VARCHAR2(2));
743
744 type abs_data is table of abs_details INDEX BY binary_integer;
745
746 type abs_details_inv is record ( transactionid number,
747 abs_startdate varchar2(20),
748 abs_enddate varchar2(20));
749
750 type abs_data_inv is table of abs_details_inv INDEX BY binary_integer;
751
752 -- ----------------------------------------------------------------------------
753 -- |----------------------< get_absence_data >-------------------------|
754 -- ----------------------------------------------------------------------------
755 --
756 /*
757 * This procedure provide information regarding the absences for a given Person and in the given date
758 * range.
759 */
760
761
762 procedure get_absence_data(p_person_id in number,
763 p_start_date in date,
764 p_end_date in date,
765 absence_records out nocopy abs_data,
766 absence_records_inv out nocopy abs_data_inv ) ;
767 --
768 end hr_person_absence_api;