DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_PYKRSSEL_XMLP_PKG

Source


1 PACKAGE BODY PAY_PYKRSSEL_XMLP_PKG AS
2 /* $Header: PYKRSSELB.pls 120.0 2007/12/13 12:21:53 amakrish noship $ */
3 
4 function BeforeReport return boolean is
5 begin
6   /*srw.user_exit('FND SRWINIT');*/null;
7 
8  if p_selection_criteria = 'COST_CENTER' then
9   p_parameter_name:= 'Cost Center';
10   p_parameter_value := 'Cost_Center';
11  elsif p_selection_criteria ='ESTABLISHMENT_ID' then
12 p_parameter_name:= 'Organization';
13 p_parameter_value := 'Establishment_name';
14 elsif p_selection_criteria ='GRADE' then
15 p_parameter_name:= 'Grade';
16 p_parameter_value := 'Grade_Name';
17 end if;
18 
19 
20   return (TRUE);
21 end;
22 
23 function AfterReport return boolean is
24 begin
25   /*srw.user_exit('FND SRWEXIT');*/null;
26 
27   return (TRUE);
28 end;
29 
30 function CF_business_groupFormula return VARCHAR2 is
31   v_business_group  hr_all_organization_units.name%type;
32 
33 begin
34   v_business_group := hr_reports.get_business_group(p_business_group_id);
35 
36   return v_business_group;
37 end;
38 
39 function CF_legislation_codeFormula return VARCHAR2 is
40 
41   v_legislation_code    hr_organization_information.org_information9%type := null;
42 
43   cursor legislation_code
44     (c_business_group_id hr_organization_information.organization_id%type) is
45 
46   select org_information9
47   from   hr_organization_information
48   where  organization_id  = c_business_group_id
49   and    org_information9 is not null
50   and    org_information_context = 'Business Group Information';
51 begin
52   open legislation_code (p_business_group_id);
53   fetch legislation_code into v_legislation_code;
54   close legislation_code;
55 
56   return v_legislation_code;
57 end;
58 
59 function cf_currency_format_maskformula(cf_legislation_code in varchar2) return varchar2 is
60 
61   v_currency_code    fnd_currencies.currency_code%type;
62   v_format_mask      varchar2(100) := null;
63   v_field_length     number(3)    := 14;
64 
65   cursor currency_format_mask
66     (c_territory_code in fnd_currencies.issuing_territory_code%type) is
67   select currency_code, name
68   from   fnd_currencies_vl
69   where  issuing_territory_code = c_territory_code;
70 
71 begin
72   open currency_format_mask (cf_legislation_code);
73   fetch currency_format_mask into v_currency_code,cp_unit;
74   close currency_format_mask;
75 
76   v_format_mask := fnd_currency.get_format_mask(v_currency_code, v_field_length);
77 
78   return v_format_mask;
79 end;
80 
81 PROCEDURE set_currency_format_mask IS
82 BEGIN
83 
84   /*SRW.SET_FORMAT_MASK(CF_currency_format_mask);*/null;
85 
86 
87 END;
88 
89 function cf_average_sep_payformula(cs_sep_pay in number, cs_no_of_emp in number) return number is
90 l_avg_sep_pay number;
91 begin
92 
93 IF (cs_no_of_emp<>0) THEN
94   l_avg_sep_pay := cs_sep_pay / cs_no_of_emp;
95   return l_avg_sep_pay ;
96 ELSE
97 return (0);
98 END IF;
99 end;
100 
101 function cf_average_working_periodformu(cs_work_period in number, cs_no_of_emp in number) return number is
102 l_avg_working_period number;
103 begin
104 IF (cs_no_of_emp<>0) THEN
105  l_avg_working_period := cs_work_period / cs_no_of_emp;
106 return l_avg_working_period;
107 ELSE
108 return(0);
109 END IF;
110 end;
111 
112 function cf_end_of_reportformula(cs_average_Salary in number) return char is
113 begin
114   if cs_average_Salary >0 then
115    return 'End Of Report';
116   end if;
117 
118  return 'No Data Found';
119 end;
120 
121 function cf_average_payment_daysformula(cs_pay_days in number, cs_no_of_emp in number) return number is
122 l_avg_payment_days number;
123 begin
124 IF (cs_no_of_emp<>0) THEN
125  l_avg_payment_days := cs_pay_days / cs_no_of_emp;
126 return l_avg_payment_days;
127 ELSE
128 return(0);
129 END IF;
130 
131 end;
132 
133 function AfterPForm return boolean is
134 
135 begin
136 
137   return (TRUE);
138 end;
139 
140 function CF_PERIOD_NAMEFormula return Char is
141 begin
142    select period_name
143    into p_period_name
144   from per_time_periods
145   where time_period_id=p_selection_date;
146 return p_period_name;
147 
148 end;
149 
150 --Functions to refer Oracle report placeholders--
151 
152  Function CP_unit_p return varchar2 is
153 	Begin
154 	 return CP_unit;
155 	 END;
156 END PAY_PYKRSSEL_XMLP_PKG ;