DBA Data[Home] [Help]

PACKAGE BODY: APPS.SSP_SSPRPSSP_XMLP_PKG

Source


1 PACKAGE BODY SSP_SSPRPSSP_XMLP_PKG AS
2 /* $Header: SSPRPSSPB.pls 120.1 2007/12/24 14:07:37 amakrish noship $ */
3 
4 function BeforeReport return boolean is
5 begin
6 declare
7 
8 cursor payroll_name is
9 Select payroll_name
10   from pay_payrolls_f
11  where business_group_id = p_business_group_id
12    and payroll_id        = p_payroll_id
13    and effective_start_date <= p_date_to
14    and effective_end_date >= p_date_from
15 order by effective_start_date desc;
16 
17 cursor person_name is
18 Select full_name
19   from per_people_f
20  where person_id = p_person_id
21    and business_group_id = p_business_group_id
22    and effective_start_date <= p_date_to
23    and effective_end_date >= p_date_from
24 order by effective_start_date desc;
25 
26 begin
27    /*srw.user_exit('FND SRWINIT');*/null;
28 
29    insert into fnd_sessions
30       (session_id, effective_date)
31    select userenv('sessionid'),
32           trunc(sysdate)
33    from   sys.dual
34    where  not exists
35              (select 1
36               from   fnd_sessions fs
37               where  fs.session_id = userenv('sessionid'));
38 c_business_group_name :=
39                       hr_reports.get_business_group(p_business_group_id);
40 
41 if p_payroll_id is not null then
42 open payroll_name;
43 fetch payroll_name into C_payroll_name;
44 close payroll_name;
45 end if;
46 if P_person_id is not null then
47 open person_name;
48 fetch person_name into C_person_name;
49 close person_name;
50 end if;
51 fnd_date.initialize('YYYY/MM/DD',null);
52 exception
53    when NO_DATA_FOUND then
54       null;
55 end;
56   return (TRUE);
57 end;
58 
59 function e_processedformula(E_ELEMENT_ENTRY_ID in number) return varchar2 is
60 begin
61 
62 if (ssp_smp_support_pkg.entry_already_processed(E_ELEMENT_ENTRY_ID)) then
63    return('Yes');
64 else
65    return(NULL);
66 end if;
67 RETURN NULL; end;
68 
69 function e_ssp_weeks_processedformula(E_PROCESSED in varchar2, E_SSP_WEEKS in number) return number is
70 begin
71 
72 if (E_PROCESSED = 'Yes') then
73    return(E_SSP_WEEKS);
74 else
75    return(0);
76 end if;
77 RETURN NULL; end;
78 
79 function e_amount_processedformula(E_PROCESSED in varchar2, E_AMOUNT in number) return number is
80 begin
81 
82 if (E_PROCESSED = 'Yes') then
83    return(E_AMOUNT);
84 else
85    return(0);
86 end if;
87 RETURN NULL; end;
88 
89 function AfterReport return boolean is
90 begin
91   /*srw.user_exit('FND SRWEXIT');*/null;
92 
93   return (TRUE);
94 end;
95 
96 --Functions to refer Oracle report placeholders--
97 
98  Function C_BUSINESS_GROUP_NAME_p return varchar2 is
99 	Begin
100 	 return C_BUSINESS_GROUP_NAME;
101 	 END;
102  Function C_REPORT_SUBTITLE_p return varchar2 is
103 	Begin
104 	 return C_REPORT_SUBTITLE;
105 	 END;
106  Function C_PAYROLL_NAME_p return varchar2 is
107 	Begin
108 	 return C_PAYROLL_NAME;
109 	 END;
110  Function C_PERSON_NAME_p return varchar2 is
111 	Begin
112 	 return C_PERSON_NAME;
113 	 END;
114 END SSP_SSPRPSSP_XMLP_PKG ;