[Home] [Help]
PACKAGE BODY: APPS.PER_PERRPFP1_XMLP_PKG
Source
1 PACKAGE BODY PER_PERRPFP1_XMLP_PKG AS
2 /* $Header: PERRPFP1B.pls 120.1 2007/12/06 11:28:20 amakrish noship $ */
3 function BeforeReport return boolean is
4 begin
5 P_SESSION_DATE1:=TO_CHAR(P_SESSION_DATE,'DD-MON-YYYY');
6 c_end_of_time := '4712-12-31';
7 declare
8 v_name varchar2(350);
9 v_title varchar2(400);
10 v_label_expr varchar2(32000);
11 v_column_expr varchar2(32000);
12 v_legislation_code varchar2(30);
13 begin
14
15
16 --hr_standard.event('BEFORE REPORT');
17
18 /*srw.message('001','Start of Before Report Trigger');*/null;
19
20
21 c_business_group_name :=
22 hr_reports.get_business_group(p_business_group_id);
23
24 /*srw.message('002','Business Group = '||c_business_group_name);*/null;
25
26
27 select peo.first_name ||
28 decode(peo.first_name,null,null,' ') ||
29 peo.last_name
30 into v_name
31 from per_all_people_f peo
32 where peo.person_id = p_person_id
33 and p_session_date between peo.effective_start_date
34 and peo.effective_end_date;
35 c_header_name := v_name;
36
37 /*srw.message('003','Person = '||c_header_name);*/null;
38
39
40
41 hr_reports.get_desc_flex_context('PER','PER_PEOPLE',
42 'peo',v_title,v_label_expr,v_column_expr);
43 if v_column_expr is not null
44 then
45 c_emp_df_details := v_column_expr;
46 c_emp_df_label := v_label_expr;
47 else
48 c_emp_df_details := 'peo.attribute1';
49 c_emp_df_label := 'rpad('' '',1,'' '')';
50 end if;
51
52 /*srw.message('004','HR_REPORTS = PEO');*/null;
53
54
55
56 hr_reports.get_desc_flex_context('PER','PER_CONTACTS',
57 'con',v_title,v_label_expr,v_column_expr);
58 if v_column_expr is not null then
59 c_cont_df_details := v_column_expr;
60 c_cont_df_label := v_label_expr;
61 else
62 c_cont_df_details := 'con.cont_attribute1';
63 end if;
64
65 /*srw.message('005','HR_REPORTS = CON');*/null;
66
67
68 hr_reports.get_desc_flex_context('PER','PER_ADDRESSES',
69 'addr',v_title,v_label_expr,v_column_expr);
70 if v_column_expr is not null then
71 c_add_df_details := v_column_expr;
72 c_add_df_label := v_label_expr;
73 else
74 c_add_df_details := 'addr.addr_attribute1';
75 end if;
76
77 /*srw.message('006','HR_REPORTS = ADDR');*/null;
78
79
80
81 hr_reports.get_desc_flex_context('PER','Assignment Developer DF',
82 'f',v_title,v_label_expr,v_column_expr);
83 if v_column_expr is not null then
84 c_fur_info_df_details := v_column_expr;
85 c_fur_info_df_label := v_label_expr;
86 else
87 c_fur_info_df_details := 'f.aei_attribute1';
88 end if;
89
90 /*srw.message('007','HR_REPORTS = F');*/null;
91
92
93
94
95 select PBG.LEGISLATION_CODE
96 into v_legislation_code
97 from PER_BUSINESS_GROUPS PBG
98 where PBG.BUSINESS_GROUP_ID = p_business_group_id;
99
100 declare
101 v_id_flex_num number;
102 begin
103 select PBG.COST_ALLOCATION_STRUCTURE
104 into v_id_flex_num
105 from PER_BUSINESS_GROUPS PBG
106 where PBG.BUSINESS_GROUP_ID = p_business_group_id;
107 if v_id_flex_num is not null then
108 c_cost_id_flex_num := v_id_flex_num;
109
110 null;
111 end if;
112 exception
113 when others then null;
114 end;
115 declare
116 v_id_flex_num number;
117 begin
118 select rule_mode
119 into v_id_flex_num
120 from pay_legislation_rules
121 where legislation_code = v_legislation_code
122 and rule_type = 'S'
123 and exists
124 (select null
125 from FND_SEGMENT_ATTRIBUTE_VALUES
126 where ID_FLEX_NUM = rule_mode
127 and APPLICATION_ID = 800
128 and ID_FLEX_CODE = 'SCL'
129 and SEGMENT_ATTRIBUTE_TYPE = 'ASSIGNMENT'
130 and ATTRIBUTE_VALUE = 'Y');
131
132 c_scl_id_flex_num := v_id_flex_num;
133
134 exception
135 when others then null;
136 end;
137
138 begin
139
140 select rule_type into p_town_of_birth
141 from pay_legislative_field_info
142 where field_name = 'TOWN_OF_BIRTH'
143 and legislation_code = v_legislation_code;
144
145 exception
146 when no_data_found then
147 null;
148 end;
149
150
151 begin
152
153 select rule_type into p_region_of_birth
154 from pay_legislative_field_info
155 where field_name = 'REGION_OF_BIRTH'
156 and legislation_code = v_legislation_code;
157
158 exception
159 when no_data_found then
160 null;
161 end;
162
163
164 end;
165
166 /*srw.message('010','End of Before Report Trigger');*/null;
167
168
169 return (TRUE);
170 end;
171
172 function c_get_flexformula(style in varchar2) return number is
173 begin
174
175 declare
176 v_title varchar2(900);
177 v_label_expr varchar2(2000);
178 v_column_expr varchar2(2000);
179 begin
180 hr_reports.get_dvlpr_desc_flex('PER','Address Structure',style,
181 'ADD1',v_title,v_label_expr,v_column_expr);
182 c_details := v_column_expr;
183 return('');
184 end;
185
186 RETURN NULL; end;
187
188 function c_address_copyformula(conc_address in varchar2) return varchar2 is
189 begin
190
191 return conc_address;
192 end;
193
194 function c_split_flexformula(c_address_copy in varchar2) return number is
195 begin
196
197 declare
198 v_segments_used NUMBER;
199 v_value1 VARCHAR2(240);
200 v_value2 VARCHAR2(240);
201 v_value3 VARCHAR2(240);
202 v_value4 VARCHAR2(240);
203 v_value5 VARCHAR2(240);
204 v_value6 VARCHAR2(240);
205 v_value7 VARCHAR2(240);
206 v_value8 VARCHAR2(240);
207 v_value9 VARCHAR2(240);
208 v_value10 VARCHAR2(240);
209 v_value11 VARCHAR2(240);
210 v_value12 VARCHAR2(240);
211 v_value13 VARCHAR2(240);
212 v_value14 VARCHAR2(240);
213 v_value15 VARCHAR2(240);
214 v_value16 VARCHAR2(240);
215 v_value17 VARCHAR2(240);
216 v_value18 VARCHAR2(240);
217 v_value19 VARCHAR2(240);
218 v_value20 VARCHAR2(240);
219 v_value21 VARCHAR2(240);
220 v_value22 VARCHAR2(240);
221 v_value23 VARCHAR2(240);
222 v_value24 VARCHAR2(240);
223 v_value25 VARCHAR2(240);
224 v_value26 VARCHAR2(240);
225 v_value27 VARCHAR2(240);
226 v_value28 VARCHAR2(240);
227 v_value29 VARCHAR2(240);
228 v_value30 VARCHAR2(240);
229 begin
230 hr_reports.get_attributes(
231 c_address_copy,
232 'Address Structure',
233 v_segments_used,
234 v_value1,
235 v_value2,
236 v_value3,
237 v_value4,
238 v_value5,
239 v_value6,
240 v_value7,
241 v_value8,
242 v_value9,
243 v_value10,
244 v_value11,
245 v_value12,
246 v_value13,
247 v_value14,
248 v_value15,
249 v_value16,
250 v_value17,
251 v_value18,
252 v_value19,
253 v_value20,
254 v_value21,
255 v_value22,
256 v_value23,
257 v_value24,
258 v_value25,
259 v_value26,
260 v_value27,
261 v_value28,
262 v_value29,
263 v_value30);
264
265 c_address1 := v_value1;
266 c_address2 := v_value2;
267 c_address3 := v_value3;
268 c_address4 := v_value4;
269 c_address5 := v_value5;
270 c_address6 := v_value6;
271 c_address7 := v_value7;
272 c_address8 := v_value8;
273 c_address9 := v_value9;
274 c_address10 := v_value10;
275 c_address11 := v_value11;
276 c_address12 := v_value12;
277 c_address13 := v_value13;
278 c_address14 := v_value14;
279 c_address15 := v_value15;
280 c_address16 := v_value16;
281 c_address17 := v_value17;
282 c_address18 := v_value18;
283 c_address19 := v_value19;
284 c_address20 := v_value20;
285 return('');
286 end;
287
288
289
290 RETURN NULL; end;
291
292 function c_get_emp_leg_dfformula(per_information_category in varchar2) return number is
293 begin
294
295 declare
296 v_title varchar2(240);
297 v_label_expr varchar2(2000);
298 v_column_expr varchar2(2000);
299 begin
300 /*srw.message('903','C_get_emp_leg_dfFormula');*/null;
301
302
303 /*srw.message('901','per_information_category = '||per_information_category);*/null;
304
305
306 if per_information_category is not null then
307 hr_reports.get_dvlpr_desc_flex('PER','Person Developer DF',
308 per_information_category,'pp',v_title,v_label_expr,v_column_expr);
309
310 c_emp_leg_df_details := v_column_expr;
311 c_emp_leg_df_label := v_label_expr;
312
313 return('');
314 end if;
315 end;
316
317 RETURN NULL; end;
318
319 function AfterReport return boolean is
320 begin
321
322 --hr_standard.event('AFTER REPORT');
323
324
325
326
327
328 return (TRUE);
329 end;
330
331 --Functions to refer Oracle report placeholders--
332
333 Function C_address1_p return varchar2 is
334 Begin
335 return C_address1;
336 END;
337 Function C_address2_p return varchar2 is
338 Begin
339 return C_address2;
340 END;
341 Function C_address3_p return varchar2 is
342 Begin
343 return C_address3;
344 END;
345 Function C_address4_p return varchar2 is
346 Begin
347 return C_address4;
348 END;
349 Function C_address5_p return varchar2 is
350 Begin
351 return C_address5;
352 END;
353 Function C_address6_p return varchar2 is
354 Begin
355 return C_address6;
356 END;
357 Function C_address7_p return varchar2 is
358 Begin
359 return C_address7;
360 END;
361 Function C_address8_p return varchar2 is
362 Begin
363 return C_address8;
364 END;
365 Function C_address9_p return varchar2 is
366 Begin
367 return C_address9;
368 END;
369 Function C_address10_p return varchar2 is
370 Begin
371 return C_address10;
372 END;
373 Function C_address11_p return varchar2 is
374 Begin
375 return C_address11;
376 END;
377 Function C_address12_p return varchar2 is
378 Begin
379 return C_address12;
380 END;
381 Function C_address13_p return varchar2 is
382 Begin
383 return C_address13;
384 END;
385 Function C_address14_p return varchar2 is
386 Begin
387 return C_address14;
388 END;
389 Function C_address15_p return varchar2 is
390 Begin
391 return C_address15;
392 END;
393 Function C_address16_p return varchar2 is
394 Begin
395 return C_address16;
396 END;
397 Function C_address17_p return varchar2 is
398 Begin
399 return C_address17;
400 END;
401 Function C_address18_p return varchar2 is
402 Begin
403 return C_address18;
404 END;
405 Function C_address19_p return varchar2 is
406 Begin
407 return C_address19;
408 END;
409 Function C_address20_p return varchar2 is
410 Begin
411 return C_address20;
412 END;
413 Function C_BUSINESS_GROUP_NAME_p return varchar2 is
414 Begin
415 return C_BUSINESS_GROUP_NAME;
416 END;
417 Function C_details_p return varchar2 is
418 Begin
419 return C_details;
420 END;
421 Function C_cont_details_p return varchar2 is
422 Begin
423 return C_cont_details;
424 END;
425 Function C_requirement_desc_p return varchar2 is
426 Begin
427 return C_requirement_desc;
428 END;
429 Function C_requirement_value_p return varchar2 is
430 Begin
431 return C_requirement_value;
432 END;
433 Function C_header_name_p return varchar2 is
434 Begin
435 return C_header_name;
436 END;
437 Function C_pay_meth_count_p return number is
438 Begin
439 return C_pay_meth_count;
440 END;
441 Function C_emp_df_details_p return varchar2 is
442 Begin
443 return C_emp_df_details;
444 END;
445 Function C_emp_leg_df_details_p return varchar2 is
446 Begin
447 return C_emp_leg_df_details;
448 END;
449 Function C_add_df_details_p return varchar2 is
450 Begin
451 return C_add_df_details;
452 END;
453 Function C_cont_df_details_p return varchar2 is
454 Begin
455 return C_cont_df_details;
456 END;
457 Function C_app_df_details_p return varchar2 is
458 Begin
459 return C_app_df_details;
460 END;
461 Function c_app_ass_df_details_p return varchar2 is
462 Begin
463 return c_app_ass_df_details;
464 END;
465 Function C_sec_ass_df_details_p return varchar2 is
466 Begin
467 return C_sec_ass_df_details;
468 END;
469 Function C_per_serv_df_details_p return varchar2 is
470 Begin
471 return C_per_serv_df_details;
472 END;
473 Function C_temp_p return varchar2 is
474 Begin
475 return C_temp;
476 END;
477 Function C_add_df_label_p return varchar2 is
478 Begin
479 return C_add_df_label;
480 END;
481 Function C_emp_df_label_p return varchar2 is
482 Begin
483 return C_emp_df_label;
484 END;
485 Function C_emp_leg_df_label_p return varchar2 is
486 Begin
487 return C_emp_leg_df_label;
488 END;
489 Function C_cont_df_label_p return varchar2 is
490 Begin
491 return C_cont_df_label;
492 END;
493 Function C_app_df_label_p return varchar2 is
494 Begin
495 return C_app_df_label;
496 END;
497 Function C_app_ass_df_label_p return varchar2 is
498 Begin
499 return C_app_ass_df_label;
500 END;
501 Function C_app_sec_status_details_p return varchar2 is
502 Begin
503 return C_app_sec_status_details;
504 END;
505 Function C_app_sec_status_label_p return varchar2 is
506 Begin
507 return C_app_sec_status_label;
508 END;
509 Function C_inter_df_details_p return varchar2 is
510 Begin
511 return C_inter_df_details;
512 END;
513 Function C_inter_df_label_p return varchar2 is
514 Begin
515 return C_inter_df_label;
516 END;
517 Function C_sec_ass_df_label_p return varchar2 is
518 Begin
519 return C_sec_ass_df_label;
520 END;
521 Function C_ass_df_details_p return varchar2 is
522 Begin
523 return C_ass_df_details;
524 END;
525 Function C_ass_df_label_p return varchar2 is
526 Begin
527 return C_ass_df_label;
528 END;
529 Function C_fur_info_df_details_p return varchar2 is
530 Begin
531 return C_fur_info_df_details;
532 END;
533 Function C_fur_info_df_label_p return varchar2 is
534 Begin
535 return C_fur_info_df_label;
536 END;
537 Function C_fur_info_ddf_details_p return varchar2 is
538 Begin
539 return C_fur_info_ddf_details;
540 END;
541 Function C_fur_info_ddf_label_p return varchar2 is
542 Begin
543 return C_fur_info_ddf_label;
544 END;
545 Function C_cost_id_flex_num_p return number is
546 Begin
547 return C_cost_id_flex_num;
548 END;
549 Function C_scl_id_flex_num_p return number is
550 Begin
551 return C_scl_id_flex_num;
552 END;
553 Function C_scl_desc_p return varchar2 is
554 Begin
555 return C_scl_desc;
556 END;
557 Function C_scl_value_p return varchar2 is
558 Begin
559 return C_scl_value;
560 END;
561 Function C_cost_desc_p return varchar2 is
562 Begin
563 return C_cost_desc;
564 END;
565 Function C_cost_values_p return varchar2 is
566 Begin
567 return C_cost_values;
568 END;
569 Function C_ppm_df_details_p return varchar2 is
570 Begin
571 return C_ppm_df_details;
572 END;
573 Function C_ppm_df_label_p return varchar2 is
574 Begin
575 return C_ppm_df_label;
576 END;
577 Function C_ext_act_desc_p return varchar2 is
578 Begin
579 return C_ext_act_desc;
580 END;
581 Function C_ext_act_values_p return varchar2 is
582 Begin
583 return C_ext_act_values;
584 END;
585 Function C_ele_df_details_p return varchar2 is
586 Begin
587 return C_ele_df_details;
588 END;
589 Function C_ele_df_label_p return varchar2 is
590 Begin
591 return C_ele_df_label;
592 END;
593 Function C_ele_cost_desc_p return varchar2 is
594 Begin
595 return C_ele_cost_desc;
596 END;
597 Function C_ele_cost_values_p return varchar2 is
598 Begin
599 return C_ele_cost_values;
600 END;
601 Function C_event_df_details_p return varchar2 is
602 Begin
603 return C_event_df_details;
604 END;
605 Function C_event_df_label_p return varchar2 is
606 Begin
607 return C_event_df_label;
608 END;
609 Function C_book_df_details_p return varchar2 is
610 Begin
611 return C_book_df_details;
612 END;
613 Function C_book_df_label_p return varchar2 is
614 Begin
615 return C_book_df_label;
616 END;
617 Function C_special_df_details_p return varchar2 is
618 Begin
619 return C_special_df_details;
620 END;
621 Function C_special_df_label_p return varchar2 is
622 Begin
623 return C_special_df_label;
624 END;
625 Function C_per_serv_df_label_p return varchar2 is
626 Begin
627 return C_per_serv_df_label;
628 END;
629 Function C_absence_df_details_p return varchar2 is
630 Begin
631 return C_absence_df_details;
632 END;
633 Function C_absence_df_label_p return varchar2 is
634 Begin
635 return C_absence_df_label;
636 END;
637 Function C_SUBTITLE_p return varchar2 is
638 Begin
639 return C_SUBTITLE;
640 END;
641 Function C_details10_p return varchar2 is
642 Begin
643 return C_details10;
644 END;
645 Function C_END_OF_TIME_p return varchar2 is
646 Begin
647 return C_END_OF_TIME;
648 END;
649
650
651 END PER_PERRPFP1_XMLP_PKG;