DBA Data[Home] [Help]

PACKAGE: APPS.PQH_PSF_BUS

Source


1 package PQH_PSF_BUS AUTHID CURRENT_USER as
2 /* $Header: pqpsfbus.pkh 120.3 2011/04/18 07:10:48 sidsaxen ship $ */
3 --
4 --  ---------------------------------------------------------------------------
5 --  |-----------------<   POSITION_CONTROL_ENABLED    >---------------------|
6 --  ---------------------------------------------------------------------------
7 --
8 function POSITION_CONTROL_ENABLED(P_ORGANIZATION_ID NUMBER default null,
9                                   p_effective_date in date default sysdate,
10                                   p_assignment_id number default null) RETURN VARCHAR2;
11 --
12 --  ---------------------------------------------------------------------------
13 --  |-----------------<   hr_psf_bus_insert_validate    >---------------------|
14 --  ---------------------------------------------------------------------------
15 --
16 procedure hr_psf_bus_insert_validate(p_rec 			 in hr_psf_shd.g_rec_type
17 	 ,p_effective_date	       in date
18 --     ,p_datetrack_mode	       in varchar2
19     );
20 --
21 --  ---------------------------------------------------------------------------
22 --  |-----------------<   hr_psf_bus_update_validate    >---------------------|
23 --  ---------------------------------------------------------------------------
24 --
25 procedure hr_psf_bus_update_validate(p_rec in hr_psf_shd.g_rec_type
26       ,p_effective_date	       in date
27       ,p_validation_start_date in date
28       ,p_validation_end_date    in date
29       ,p_datetrack_mode	       in varchar2
30       );
31 --
32 --  ---------------------------------------------------------------------------
33 --  |-----------------<   per_asg_bus_insert_validate    >--------------------|
34 --  ---------------------------------------------------------------------------
35 --
36 PROCEDURE per_asg_bus_insert_validate(p_rec 	per_asg_shd.g_rec_type, p_effective_date date );
37 --
38 --  ---------------------------------------------------------------------------
39 --  |-----------------<   per_asg_bus_update_validate    >--------------------|
40 --  ---------------------------------------------------------------------------
41 --
42 PROCEDURE per_asg_bus_update_validate(p_rec 	per_asg_shd.g_rec_type
43       ,p_effective_date	       in date
44       ,p_validation_start_date in date
45       ,p_validation_end_date    in date
46       ,p_datetrack_mode	       in varchar2
47       );
48 --
49 --  ---------------------------------------------------------------------------
50 --  |-----------------<   per_asg_bus_delete_validate    >--------------------|
51 --  ---------------------------------------------------------------------------
52 --
53 PROCEDURE per_asg_bus_delete_validate(p_rec     per_asg_shd.g_rec_type
54       ,p_effective_date        in date
55       ,p_validation_start_date in date
56       ,p_validation_end_date    in date
57       ,p_datetrack_mode        in varchar2 );
58 --
59 --  ---------------------------------------------------------------------------
60 --  |----------------------<   per_abv_insert_validate    >-------------------|
61 --  ---------------------------------------------------------------------------
62 --
63 PROCEDURE per_abv_insert_validate(
64 		p_assignment_id number,
65 		p_value number,
66 		p_unit varchar2,
67 		p_effective_date date);
68 --
69 --  ---------------------------------------------------------------------------
70 --  |----------------------<   per_abv_update_validate    >-------------------|
71 --  ---------------------------------------------------------------------------
72 --
73 PROCEDURE per_abv_update_validate(
74 		p_abv_id number,
75 		p_assignment_id number,
76 		p_value number,
77 		p_unit varchar2,
78 		p_effective_date date,
79 		p_validation_start_date date,
80 		p_validation_end_date  date,
81 		p_datetrack_mode    varchar2);
82 --
83 --  ---------------------------------------------------------------------------
84 --  |----------------------<   funded_status    >-----------------------------|
85 --  ---------------------------------------------------------------------------
86 --  Description:
87 --    Retrieves the funded_status of the position.
88 --
89 function funded_status
90          (p_position_id       in number) return varchar2;
91 --
92 --
93 --  ---------------------------------------------------------------------------
94 --  |----------------------<   sum_assignment_fte    >------------------------|
95 --  ---------------------------------------------------------------------------
96 --  Description:
97 --    Retrieves the funded_status of the position.
98 --
99 function sum_assignment_fte
100          (p_position_id       in number, p_effective_date  in date) return number;
101 --
102 --
103 --  ---------------------------------------------------------------------------
104 --  |----------------------<   sum_assignment_fte    >------------------------|
105 --  ---------------------------------------------------------------------------
106 --  Description:
107 --    Retrieves the funded_status of the position.
108 --
109 function sum_assignment_fte
110          (p_position_id       in number, p_effective_date  in date, p_assignment_id in number) return number;
111 --
112 --
113 --  ---------------------------------------------------------------------------
114 --  |--------------------<   default_assignment_fte    >----------------------|
115 --  ---------------------------------------------------------------------------
116 --  Description:
117 --    Retrieves the sum_assignment_fte of the position.
118 --
119 function default_assignment_fte
120          (p_organization_id       in number) return number;
121 --
122 --
123 --  ---------------------------------------------------------------------------
124 --  |----------------------<   assignment_fte    >----------------------------|
125 --  ---------------------------------------------------------------------------
126 --  Description:
127 --    Retrieves the funded_status of the position.
128 --
129 function assignment_fte
130          (p_assignment_id       in number) return number;
131 --
132 --
133 --  ---------------------------------------------------------------------------
134 --  |------------------------<   future approved actions    >-----------------|
135 --  ---------------------------------------------------------------------------
136 --  Description:
137 --    Retrieves the future approved actions of the position.
138 --
139 function future_approved_actions
140          (p_position_id       in number) return varchar2;
141 --
142 --
143 --  ---------------------------------------------------------------------------
144 --  |------------------------<   open_status    >-----------------------------|
145 --  ---------------------------------------------------------------------------
146 --  Description:
147 --    Retrieves the funded_status of the position.
148 --
149 function open_status
150          (p_position_id       in number, p_effective_date  in date) return varchar2;
151 --
152 --  ---------------------------------------------------------------------------
153 --  |-----------------------<  overlap_period   >-----------------------------|
154 --  ---------------------------------------------------------------------------
155 --  Description:
156 --    Retrieves the overlap_period of the position.
157 --
158 procedure overlap_period
159          (p_position_id       in number, p_overlap_period out nocopy number,
160                 p_start_date out nocopy date, p_end_date out nocopy date);
161 --
162 --
163 --  ---------------------------------------------------------------------------
164 --  |----------------------<  reserved_status   >-----------------------------|
165 --  ---------------------------------------------------------------------------
166 --  Description:
167 --    Retrieves the reserved_status of the position.
168 --
169 procedure reserved_status
170          (p_position_id       in number, p_reserved_status out nocopy varchar2,
171                 p_start_date out nocopy date, p_end_date out nocopy date, p_person_id out nocopy number, p_fte_reserved out nocopy number);
172 --
173 --
174 --  ---------------------------------------------------------------------------
175 --  |----------------------<   review_status    >-----------------------------|
176 --  ---------------------------------------------------------------------------
177 --  Description:
178 --    Retrieves the funded_status of the position.
179 --
180 function review_status
181          (p_position_id       in number) return varchar2;
182 --
183 --
184 --  ---------------------------------------------------------------------------
185 --  |----------------------<   vacancy_status    >----------------------------|
186 --  ---------------------------------------------------------------------------
187 --  Description:
188 --    Retrieves the funded_status of the position.
189 --
190 function vacancy_status
191          (p_position_id       in number, p_effective_date in date) return varchar2;
192 --
193 function permit_extended_pay(p_position_id varchar2) return boolean;
194 --
195 function permit_extended_pay_poi(p_rec in pe_poi_shd.g_rec_type) return boolean;
196 --
197 function chk_seasonal_dates( p_position_id number,  p_seasonal_flag varchar2, p_assignment_start_date date)
198 return boolean;
199 --
200 function chk_seasonal(p_position_id number) return boolean;
201 --
202 function chk_seasonal_poi(p_position_id number) return boolean;
203 --
204 function chk_overlap_poi(p_position_id number) return boolean;
205 --
206 function pos_assignments_exists(p_position_id number) return boolean;
207 --
208 function chk_overlap(p_position_id number) return boolean;
209 --
210 function chk_amendment_info(
211 amendment_date date,
212 amendment_recommendation varchar2,
213 amendment_ref_number varchar2) return boolean;
214 --
215 --
216 function no_assignments(p_position_id number) return number;
217 --
218 function no_assignments(p_position_id number, p_effective_date date) return number;
219 --
220 function max_persons(p_position_id number) return number;
221 --
222 function proposed_date_for_layoff(p_position_id number) return date;
223 --
224 function fte_capacity(p_position_id number) return number;
225 --
226 function position_type(p_position_id number) return varchar2;
227 --
228 function grade(p_position_id number) return number;
229 --
230 function work_period_type_cd(p_position_id number) return varchar2;
231 --
232 function chk_work_pay_term_dates(p_work_period_type_cd    hr_all_positions_f.work_period_type_cd%type
233                                 ,p_work_term_end_day_cd   hr_all_positions_f.work_term_end_day_cd%type
234                                 ,p_work_term_end_month_cd hr_all_positions_f.work_term_end_month_cd%type
235                                 ,p_pay_term_end_day_cd    hr_all_positions_f.pay_term_end_day_cd%type
236                                 ,p_pay_term_end_month_cd  hr_all_positions_f.pay_term_end_month_cd%type
237                                 ,p_term_start_day_cd      hr_all_positions_f.term_start_day_cd%type
238                                 ,p_term_start_month_cd    hr_all_positions_f.term_start_month_cd%type
239                                 ) return boolean;
240 --
241 function chk_position_job_grade(p_position_grade_id number, p_job_id number) return boolean;
242 --
243 function chk_overlap_dates
244          (p_position_id  in number, p_overlap_period  number, p_assignment_start_date date) return boolean;
245 
246 -- Start changes for bug 10220040
247 function chk_overlap_dates
248          (p_position_id  in number, p_overlap_period  number, p_assignment_start_date date, p_assignment_end_date date, p_assignment_id number) return boolean;
249 -- End changes for bug 10220040
250 --
251 function chk_reserved(p_position_id number) return boolean;
252 --
253 function position_min_asg_dt(p_position_id  number) return date;
254 --
255 function position_max_asg_dt(p_position_id  number) return date;
256 --
257 function chk_earliest_hire_date(p_position_id  number, p_earliest_hire_date date)
258 return boolean;
259 --
260 function chk_prop_date_for_layoff(p_position_id  number, p_proposed_date_for_layoff date)
261 return boolean;
262 --
263 function GET_SYSTEM_SHARED_TYPE(p_availability_status_id number)
264 return varchar2;
265 --
266 function budgeted_fte (p_position_id in number,
267                               p_effective_date in date) return number;
268 
269 function get_budgeted_fte( p_position_id 	 in number default null
270 		          ,p_job_id         	 in number default null
271 		          ,p_grade_id    	 in number default null
272 		          ,p_organization_id     in number default null
273 		          ,p_budget_entity       in varchar2
274 		          ,p_start_date          in date default sysdate
275 		          ,p_end_date            in date default sysdate
276 	   	          ,p_unit_of_measure     in varchar2
277 	   	          ,p_business_group_id   in number
278 	   	          ,p_budgeted_fte_date   out nocopy date
279 		         ) return number;
280 
281 function budgeted_fte( p_position_id 	     in number default null
282 		      ,p_job_id      	     in number default null
283 		      ,p_grade_id    	     in number default null
284 		      ,p_organization_id     in number default null
285 		      ,p_budget_entity       in varchar2
286 		      ,p_effective_date      in date default sysdate
287 	   	      ,p_unit_of_measure     in varchar2
288 	   	      ,p_business_group_id   in number
289 		      ) return number;
290 --
291 function person_fte
292          (p_person_id in number,
293           p_position_id  in number,
294           p_effective_date  in date,
295           p_ex_assignment_id number) return number;
296 --
297 function assignment_fte(
298           p_assignment_id number,
299           p_effective_date date) return number;
300 --
301 function available_fte(
302           p_person_id number,
303           p_position_id number,
304           p_effective_date date) return number;
305 --
306 --
307 --
308 function budgeted_money (
309           p_position_id in number,
310           p_effective_date in date) return number;
311 --
312 --
313 --
314 function get_pos_actuals_commitment(
315                       p_position_id                  in number,
316                       p_effective_date              in date,
317                       p_ex_assignment_id            in number default -1
318                       ) return number;
319 --
320 --
321 function get_asg_actuals_commitment(
322                       p_assignment_id              in number,
323                       p_effective_date             in date) return number;
324 --
325 function chk_pos_budget(
326                       p_position_id  in number,
327                       p_effective_date in date) return boolean;
328 --
329 function chk_pos_budget(
330                       p_position_id  in number,
331                       p_effective_date in date,
332                       p_ex_assignment_id number) return boolean;
333 --
334 --
335 --
336 function nonreserved_asg_fte(
337                       p_position_id number,
338                       p_effective_date date,
339                       p_ex_position_extra_info_id number  default -1,
340                       p_ex_person_id number  default -1 ) return number;
341 --
342 function pos_reserved_fte(
343                       p_position_id number,
344                       p_effective_date date,
345                       p_ex_position_extra_info_id number default -1)
346                       return number;
347 --
348 function poei_reserved_fte(
349                       p_position_extra_info_id number) return number;
350 --
351 function person_asg_fte(
352                       p_person_id in number,
353                       p_position_id  in number,
354                       p_effective_date  in date,
355                       p_ex_assignment_id number default -1) return number;
356 --
357 procedure pqh_poei_validate(
358                       p_position_id number,
359                       p_position_extra_info_id number,
360                       p_person_id number,
361                       p_start_date date,
362                       p_end_date date,
363                       p_poei_fte number);
364 --
365 function position_fte(
366                       p_position_id number,
367                       p_effective_date date) return number;
368 --
369 function chk_reserved_fte(
370                       p_assignment_id number,
371                       p_person_id number,
372                       p_position_id number,
373                       p_position_type varchar2,
374                       p_effective_date date,
375                       p_default_asg_fte number default null)
376 return boolean;
377 --
378 
379 -- Start changes for bug 10220040
380 --
381 function chk_reserved_fte(
382                       p_assignment_id number,
383                       p_person_id number,
384                       p_position_id number,
385                       p_position_type varchar2,
386                       p_effective_date date,
387 		      p_effective_end_date date,
388                       p_default_asg_fte number default null)
389 return boolean;
390 --
391 -- End changes for bug 10220040
392 
393 function chk_future_reserved_fte(
394     p_assignment_id number,
395     p_person_id number,
396     p_position_id number,
397     p_position_type varchar2,
398     p_validation_start_date date,
399     p_validation_end_date date,
400     p_default_asg_fte number default null)
401 return date;
402 --
403 procedure chk_pos_fte_sum_asg_fte(
404    p_assignment_id number,
405    p_position_id number,
406    p_effective_date date,
407    p_default_asg_fte number default null,
408    p_position_type out nocopy varchar2,
409    p_organization_id out nocopy number,
410    p_budgeted_fte out nocopy number,
411    p_realloc_fte out nocopy number,
412    p_position_fte out nocopy number,
413    p_total_asg_fte out nocopy number);
414 --
415 
416 -- Start changes for bug 10220040
417 --
418 procedure chk_pos_fte_sum_asg_fte(
419    p_assignment_id number,
420    p_position_id number,
421    p_effective_date date,
422    p_effective_end_date date,
423    p_default_asg_fte number default null,
424    p_position_type out nocopy varchar2,
425    p_organization_id out nocopy number,
426    p_budgeted_fte out nocopy number,
427    p_realloc_fte out nocopy number,
428    p_position_fte out nocopy number,
429    p_total_asg_fte out nocopy number);
430 --
431 -- End changes for bug 10220040
432 
433 procedure chk_future_pos_asg_fte(
434     p_assignment_id number,
435     p_position_id number,
436     p_validation_start_date date,
437     p_validation_end_date date,
438     p_default_asg_fte number default null);
439 --
440 --
441 procedure CHK_ABV_FTE_GT_POS_BGT_FTE
442 (p_assignment_id number,
443  p_position_id number,
444  p_effective_date date,
445  p_default_asg_fte number default null,
446  p_bgt_lt_abv_fte out nocopy boolean
447 );
448 --
449 function get_position_fte(p_position_id number, p_effective_date date)
450          return number;
451 --
452 procedure reserved_error(p_assignment_id number, p_person_id number,
453                          p_position_id number, p_effective_start_date date,
454                          p_organization_id number,
455                          p_default_asg_fte number default 0);
456 --
457 function get_pc_topnode (p_business_group_id in number default null,
458                          p_effective_date    in date default null) return number ;
459 --
460 function get_pc_str_version (p_business_group_id in number default null,
461                              p_effective_date    in date default null) return number ;
462 --
463 procedure chk_position_budget(
464 p_assignment_id    in number,
465 p_element_type_id  in number default null,
466 p_input_value_id   in number default null,
467 p_effective_date   in date,
468 p_called_from      in varchar2, /* valid values 'ASG' or 'SAL' */
469 p_old_position_id  in number default null,
470 p_new_position_id  in number default null
471 );
472 --
473 end	PQH_PSF_BUS;