DBA Data[Home] [Help]

PACKAGE: APPS.PAY_PAP_BUS

Source


1 Package pay_pap_bus as
2 /* $Header: pypaprhi.pkh 120.0 2005/05/29 07:14:36 appldev noship $ */
3 --
4 --
5 --
6 -- ----------------------------------------------------------------------------
7 -- |------------------------< set_security_group_id >-------------------------|
8 -- ----------------------------------------------------------------------------
9 -- {Start Of Comments}
10 --
11 -- Description:
12 --   Sets the security_group_id in CLIENT_INFO for the person's business
13 --   group context.
14 --
15 -- Prerequisites:
16 --   None,
17 --
18 -- In Parameters:
19 --   Name                           Reqd Type     Description
20 --   p_person_id                    Yes  Number   Person to use for
21 --                                                deriving the security group
22 --                                                context.
23 --
24 -- Post Success:
25 --   The security_group_id will be set in CLIENT_INFO.
26 --
27 -- Post Failure:
28 --   An error is raised if the person does not exist.
29 --
30 -- Access Status:
31 --   Internal Development Use Only.
32 --
33 -- {End Of Comments}
34 --
35 --procedure set_security_group_id
36 --(p_accrual_plan_id       in     pay_accrual_plans.accrual_plan_id%TYPE
37 --);
38 --
39 --  ---------------------------------------------------------------------------
40 --  |---------------------< return_legislation_code >-------------------------|
41 --  ---------------------------------------------------------------------------
42 --
43 --  Description:
44 --    Return the legislation code for a specific primary key value
45 --
46 --  Prerequisites:
47 --    The primary key identified by p_accrual_plan_id already exists.
48 --
49 --  In Arguments:
50 --    p_accrual_plan_id
51 --
52 --  Post Success:
53 --    If the value is found this function will return the values business
54 --    group legislation code.
55 --
56 --  Post Failure:
57 --    An error is raised if the value does not exist.
58 --
59 --  Access Status:
60 --    Internal Development Use Only.
61 --
62 function return_legislation_code
63   (p_accrual_plan_id in number) return varchar2;
64 --
65 --  ---------------------------------------------------------------------------
66 --  |---------------------< return_ff_name >----------------------------------|
67 --  ---------------------------------------------------------------------------
68 --
69 --  Description:
70 --    Returns the name of a Fast Formula given an ID.  The ID is also validated
71 --    against the business group / legislation and given formula type.
72 --
73 --  Prerequisites:
74 --    None.
75 --
76 --  In Arguments:
77 --    p_effective_date
78 --    p_business_group_id
79 --    p_formula_id
80 --    p_formula_type_name
81 --
82 --  Post Success:
83 --    The Fast Formula name is returned.
84 --
85 --  Post Failure:
86 --    The Fast Formula name is returned as null.  No error is raised.
87 --
88 --  Access Status:
89 --    Internal Development Use Only.
90 --
91 FUNCTION return_ff_name
92   (p_effective_date           IN DATE
93   ,p_business_group_id        IN NUMBER
94   ,p_formula_id               IN NUMBER
95   ,p_formula_type_name        IN VARCHAR2) RETURN VARCHAR2;
96 --
97 --  ---------------------------------------------------------------------------
98 --  |---------------------< chk_accrual_plan_name >---------------------------|
99 --  ---------------------------------------------------------------------------
100 --
101 --  Description:
102 --    Validates the plan name.  The name must not be duplicated within
103 --    the accrual plans table; the name must not cause any clashes
104 --    with the element type names that the plan will create
105 --
106 --  Prerequisites:
107 --    None.
108 --
109 --  In Arguments:
110 --    p_accrual_plan_id
111 --    p_accrual_plan_name
112 --    p_business_group_id
113 --
114 --  Post Success:
115 --    If no clashing plan name is found, processing continues.
116 --
117 --  Post Failure:
118 --    An error is raised if a clashing plan name is found.
119 --
120 --  Access Status:
121 --    Internal Development Use Only.
122 --
123 PROCEDURE chk_accrual_plan_name
124   (p_accrual_plan_id       IN NUMBER
125   ,p_accrual_plan_name     IN VARCHAR2
126   ,p_business_group_id     IN NUMBER);
127 --
128 --  ---------------------------------------------------------------------------
129 --  |---------------------< chk_accrual_category >----------------------------|
130 --  ---------------------------------------------------------------------------
131 --
132 --  Description:
133 --    Validates the accrual category exists in the lookup and that it is
134 --    effective as of the session date.
135 --
136 --  Prerequisites:
137 --    None.
138 --
139 --  In Arguments:
140 --    p_effective_date
141 --    p_accrual_plan_id
142 --    p_object_version_number
143 --    p_accrual_category
144 --
145 --  Post Success:
146 --    If the lookup exists and is valid, processing continues.
147 --
148 --  Post Failure:
149 --    An error is raised and processing stops.
150 --
151 --  Access Status:
152 --    Internal Development Use Only.
153 --
154 PROCEDURE chk_accrual_category
155   (p_effective_date           IN DATE
156   ,p_accrual_plan_id          IN NUMBER
157   ,p_object_version_number    IN NUMBER
158   ,p_accrual_category         IN VARCHAR2);
159 --
160 --  ---------------------------------------------------------------------------
161 --  |---------------------< chk_accrual_start >-------------------------------|
162 --  ---------------------------------------------------------------------------
163 --
164 --  Description:
165 --    Validates the accrual start exists in the lookup and that it is
166 --    effective as of the session date.
167 --
168 --  Prerequisites:
169 --    None.
170 --
171 --  In Arguments:
172 --    p_effective_date
173 --    p_accrual_plan_id
174 --    p_object_version_number
175 --    p_accrual_start
176 --
177 --  Post Success:
178 --    If the lookup exists and is valid, processing continues.
179 --
180 --  Post Failure:
181 --    An error is raised and processing stops.
182 --
183 --  Access Status:
184 --    Internal Development Use Only.
185 --
186 PROCEDURE chk_accrual_start
187   (p_effective_date           IN DATE
188   ,p_accrual_plan_id          IN NUMBER
189   ,p_object_version_number    IN NUMBER
190   ,p_accrual_start            IN VARCHAR2);
191 --
192 --  ---------------------------------------------------------------------------
193 --  |---------------------< chk_accrual_units_of_measure >--------------------|
194 --  ---------------------------------------------------------------------------
195 --
196 --  Description:
197 --    Validates the accrual UOM exists in the lookup and that it is
198 --    effective as of the session date.
199 --
200 --  Prerequisites:
201 --    None.
202 --
203 --  In Arguments:
204 --    p_effective_date
205 --    p_accrual_plan_id
206 --    p_object_version_number
207 --    p_accrual_units_of_measure
208 --
209 --  Post Success:
210 --    If the lookup exists and is valid, processing continues.
211 --
212 --  Post Failure:
213 --    An error is raised and processing stops.
214 --
215 --  Access Status:
216 --    Internal Development Use Only.
217 --
218 PROCEDURE chk_accrual_units_of_measure
219   (p_effective_date           IN DATE
220   ,p_accrual_plan_id          IN NUMBER
221   ,p_object_version_number    IN NUMBER
222   ,p_accrual_units_of_measure IN VARCHAR2);
223 --
224 --  ---------------------------------------------------------------------------
225 --  |---------------------< chk_accrual_formula_id >--------------------------|
226 --  ---------------------------------------------------------------------------
227 --
228 --  Description:
229 --    Validates that the formula exists in FF formulas, that it is set to
230 --    the correct formula type and that it is effective at the session date.
231 --
232 --  Prerequisites:
233 --    None.
234 --
235 --  In Arguments:
236 --    p_effective_date
237 --    p_accrual_plan_id
238 --    p_object_version_number
239 --    p_business_group_id
240 --    p_accrual_formula_id
241 --
242 --  Post Success:
243 --    If the formula is vald, processing continues.
244 --
245 --  Post Failure:
246 --    An error is raised and processing no longer continues.
247 --
248 --  Access Status:
249 --    Internal Development Use Only.
250 --
251 PROCEDURE chk_accrual_formula_id
252   (p_effective_date           IN DATE
253   ,p_accrual_plan_id          IN NUMBER
254   ,p_object_version_number    IN NUMBER
255   ,p_business_group_id        IN NUMBER
256   ,p_accrual_formula_id       IN NUMBER);
257 --
258 --  ---------------------------------------------------------------------------
259 --  |---------------------< chk_co_formula_id >-------------------------------|
260 --  ---------------------------------------------------------------------------
261 --
262 --  Description:
263 --    Validates that the formula exists in FF formulas, that it is set to
264 --    the correct formula type and that it is effective at the session date.
265 --    If a seeded formula is used, it is also validated for compatibility
266 --    against the accrual formula.
267 --
268 --  Prerequisites:
269 --    p_accrual_formula_id has already been validated.
270 --
271 --  In Arguments:
272 --    p_effective_date
273 --    p_accrual_plan_id
274 --    p_object_version_number
275 --    p_business_group_id
276 --    p_accrual_formula_id
277 --    p_co_formula_id
278 --
279 --  Post Success:
280 --    If the formula is vald, processing continues.
281 --
282 --  Post Failure:
283 --    An error is raised and processing no longer continues.
284 --
285 --  Access Status:
286 --    Internal Development Use Only.
287 --
288 PROCEDURE chk_co_formula_id
289   (p_effective_date           IN DATE
290   ,p_accrual_plan_id          IN NUMBER
291   ,p_object_version_number    IN NUMBER
292   ,p_business_group_id        IN NUMBER
293   ,p_accrual_formula_id       IN NUMBER
294   ,p_co_formula_id            IN NUMBER);
295 --
296 --  ---------------------------------------------------------------------------
297 --  |---------------------< chk_pto_input_value_id >--------------------------|
298 --  ---------------------------------------------------------------------------
299 --
300 --  Description:
301 --    Validates that the nominated absence element is a valid input value
302 --    and has a corresponding absence type.
303 --
304 --  Prerequisites:
305 --    p_accrual_units_of_measure has been validated successfully.
306 --
307 --  In Arguments:
308 --    p_accrual_plan_id
309 --    p_object_version_number
310 --    p_pto_input_value_id
311 --    p_business_group_id
312 --    p_accrual_units_of_measure
313 --
314 --  Post Success:
315 --    If no error is found, processing continues.
316 --
317 --  Post Failure:
318 --    An error is raised and processing no longer continues.
319 --
320 --  Access Status:
321 --    Internal Development Use Only.
322 --
323 PROCEDURE chk_pto_input_value_id
324   (p_accrual_plan_id          IN NUMBER
325   ,p_object_version_number    IN NUMBER
326   ,p_pto_input_value_id       IN NUMBER
327   ,p_business_group_id        IN NUMBER
328   ,p_accrual_units_of_measure IN VARCHAR2);
329 --
330 --  ---------------------------------------------------------------------------
331 --  |---------------------< chk_defined_balance_id >--------------------------|
332 --  ---------------------------------------------------------------------------
333 --
334 --  Description:
335 --    Validates that the defined balance is valid and that it is compatible
336 --    with the Accrual formula.
337 --
338 --  Prerequisites:
339 --    p_accrual_formula_id has already been successfully validated.
340 --
341 --  In Arguments:
342 --    p_effective_date
343 --    p_accrual_plan_id
344 --    p_object_version_number
345 --    p_business_group_id
346 --    p_accrual_formula_id
347 --    p_defined_balance_id
348 --
349 --  Out Arguments:
350 --    p_check_accrual_ff
351 --
352 --  Post Success:
353 --    If no error is found, processing continues.  p_check_accrual_ff is set
354 --    when a non-core accrual FF is being used and the defined balance is
355 --    being set for the first time.  This warns about the importance of
356 --    using a balance compatible accrual FF.
357 --
358 --  Post Failure:
359 --    An error is raised and processing stops.
360 --
361 --  Access Status:
362 --    Internal Development Use Only.
363 --
364 PROCEDURE chk_defined_balance_id
365   (p_effective_date           IN  DATE
366   ,p_accrual_plan_id          IN  NUMBER
367   ,p_object_version_number    IN  NUMBER
368   ,p_business_group_id        IN  NUMBER
369   ,p_accrual_formula_id       IN  NUMBER
370   ,p_defined_balance_id       IN  NUMBER
371   ,p_check_accrual_ff         OUT NOCOPY BOOLEAN);
372 --
373 --  ---------------------------------------------------------------------------
374 --  |---------------------< chk_ineligible_period_type >----------------------|
375 --  ---------------------------------------------------------------------------
376 --
377 --  Description:
378 --    Validates the ineligible period type exists in the lookup and that it is
379 --    effective as of the session date.
380 --
381 --  Prerequisites:
382 --    None.
383 --
384 --  In Arguments:
385 --    p_effective_date
386 --    p_accrual_plan_id
387 --    p_object_version_number
388 --    p_ineligible_period_type
389 --
390 --  Post Success:
391 --    If the lookup exists and is valid, processing continues.
392 --
393 --  Post Failure:
394 --    An error is raised and processing stops.
395 --
396 --  Access Status:
397 --    Internal Development Use Only.
398 --
399 PROCEDURE chk_ineligible_period_type
400   (p_effective_date           IN DATE
401   ,p_accrual_plan_id          IN NUMBER
402   ,p_object_version_number    IN NUMBER
403   ,p_ineligible_period_type   IN VARCHAR2);
404 --
405 --  ---------------------------------------------------------------------------
406 --  |---------------------< chk_ineligibility_formula_id >--------------------|
407 --  ---------------------------------------------------------------------------
408 --
409 --  Description:
410 --    Validates that the formula exists in FF formulas, that it is set to
411 --    the correct formula type and that it is effective at the session date.
412 --
413 --  Prerequisites:
414 --    None.
415 --
416 --  In Arguments:
417 --    p_effective_date
418 --    p_accrual_plan_id
419 --    p_object_version_number
420 --    p_business_group_id
421 --    p_ineligibility_formula_id
422 --
423 --  Post Success:
424 --    If the formula is vald, processing continues.
425 --
426 --  Post Failure:
427 --    An error is raised and processing no longer continues.
428 --
429 --  Access Status:
430 --    Internal Development Use Only.
431 --
432 PROCEDURE chk_ineligibility_formula_id
433   (p_effective_date           IN DATE
434   ,p_accrual_plan_id          IN NUMBER
435   ,p_object_version_number    IN NUMBER
436   ,p_business_group_id        IN NUMBER
437   ,p_ineligibility_formula_id IN NUMBER);
438 --
439 -- ----------------------------------------------------------------------------
440 -- |---------------------------< insert_validate >----------------------------|
441 -- ----------------------------------------------------------------------------
442 -- {Start Of Comments}
443 --
444 -- Description:
445 --   This procedure controls the execution of all insert business rules
446 --   validation.
447 --
448 -- Prerequisites:
449 --   This private procedure is called from ins procedure.
450 --
451 -- In Parameters:
452 --   p_effective_date.
453 --   A Pl/Sql record structure.
454 --
455 -- Post Success:
456 --   Processing continues.
457 --
458 -- Post Failure:
459 --   If a business rules fails the error will not be handled by this procedure
460 --   unless explicity coded.
461 --
462 -- Developer Implementation Notes:
463 --   For insert, your business rules should be executed from this procedure and
464 --   should ideally (unless really necessary) just be straight procedure or
465 --   function calls. Try and avoid using conditional branching logic.
466 --
467 -- Access Status:
468 --   Internal Row Handler Use Only.
469 --
470 -- {End Of Comments}
471 -- ----------------------------------------------------------------------------
472 PROCEDURE insert_validate
473   (p_effective_date   IN  DATE
474   ,p_rec              IN  pay_pap_shd.g_rec_type
475   ,p_check_accrual_ff OUT NOCOPY BOOLEAN);
476 --
477 -- ----------------------------------------------------------------------------
478 -- |---------------------------< update_validate >----------------------------|
479 -- ----------------------------------------------------------------------------
480 -- {Start Of Comments}
481 --
482 -- Description:
483 --   This procedure controls the execution of all update business rules
484 --   validation.
485 --
486 -- Prerequisites:
487 --   This private procedure is called from upd procedure.
488 --
489 -- In Parameters:
490 --   p_effective_date
491 --   A Pl/Sql record structre.
492 --
493 -- Post Success:
494 --   Processing continues.
495 --
496 -- Post Failure:
497 --   If a business rules fails the error will not be handled by this procedure
498 --   unless explicity coded.
499 --
500 -- Developer Implementation Notes:
501 --   For update, your business rules should be executed from this procedure and
502 --   should ideally (unless really necessary) just be straight procedure or
503 --   function calls. Try and avoid using conditional branching logic.
504 --
505 -- Access Status:
506 --   Internal Row Handler Use Only.
507 --
508 -- {End Of Comments}
509 -- ----------------------------------------------------------------------------
510 PROCEDURE update_validate
511   (p_effective_date   IN  DATE
512   ,p_rec              IN  pay_pap_shd.g_rec_type
513   ,p_check_accrual_ff OUT NOCOPY BOOLEAN);
514 --
515 -- ----------------------------------------------------------------------------
516 -- |---------------------------< delete_validate >----------------------------|
517 -- ----------------------------------------------------------------------------
518 -- {Start Of Comments}
519 --
520 -- Description:
521 --   This procedure controls the execution of all delete business rules
522 --   validation.
523 --
524 -- Prerequisites:
525 --   This private procedure is called from del procedure.
526 --
527 -- In Parameters:
528 --   A Pl/Sql record structre.
529 --
530 -- Post Success:
531 --   Processing continues.
532 --
533 -- Post Failure:
534 --   If a business rules fails the error will not be handled by this procedure
535 --   unless explicity coded.
536 --
537 -- Developer Implementation Notes:
538 --   For delete, your business rules should be executed from this procedure and
539 --   should ideally (unless really necessary) just be straight procedure or
540 --   function calls. Try and avoid using conditional branching logic.
541 --
542 -- Access Status:
543 --   Internal Row Handler Use Only.
544 --
545 -- {End Of Comments}
546 -- ----------------------------------------------------------------------------
547 Procedure delete_validate(p_rec in pay_pap_shd.g_rec_type);
548 --
549 end pay_pap_bus;