[Home] [Help]
PACKAGE BODY: APPS.HR_EEO_REPORTS
Source
1 package body hr_eeo_reports as
2 /* $Header: pereeosr.pkb 120.2.12000000.1 2007/01/22 03:04:31 appldev noship $ */
3 --------------------------------------------------------------------------------
4 /*
5 +==============================================================================+
6 | Copyright (c) 1997 Oracle Corporation |
7 | Redwood Shores, California, USA |
8 | All rights reserved. |
9 +==============================================================================+
10
11 Name
12 Batch Reporting
13 Purpose
14 This package is used to perform reporting for batch processes.
15 History
16 Date Who Version What?
17 ---- --- ------- -----
18 06/05/2001 vshukhat 115.0 Created
19 06/10/2001 vshukhat 115.1 Added exception report
20 06/25/2001 vshukhat 115.2 Removed audit dates from
21 Exception Report.
22 06/12/2002 eumenyio 115.3 Added nocopy, dbdrv and whenever
23 oserror
24 26/08/2003 vbanner 115.4 Changed to reflect new parameters
25 removed audit start and end dates
26 added report mode Draft or Final.
27 Bug 2677421.
28 27/06/2005 ynegoro 115.5 Added p_audit_report parameter
29 BUG4461644
30 05/19/2006 ssouresr 115.6 Added templates
31 */
32 -----------------------------------------------------------------------
33 procedure submit
34 (errbuf out nocopy varchar2,
35 retcode out nocopy number,
36 p_business_group_id in number,
37 p_hierarchy_id in number,
38 p_hierarchy_version_id in number,
39 p_date_start in varchar2,
40 p_date_end in varchar2,
41 p_report_mode in varchar2,
42 p_no_employees in number,
43 p_audit_report in varchar2) is
44 --
45 l_request_id number;
46 l_set_template boolean;
47 --
48 begin
49 --
50 -- Fire off all the eeo reports
51 --
52 -- EEO-1 Individual Establishment Report
53 --
54 l_set_template :=
55 fnd_request.add_layout ('PER',
56 'PERRPEO1',
57 'US',
58 'US',
59 'PDF');
60
61 l_request_id := fnd_request.submit_request
62 (application => 'PER',
63 program => 'PERRPEO1',
64 description => NULL,
65 sub_request => FALSE,
66 argument1 => p_business_group_id,
67 argument2 => p_date_start,
68 argument3 => p_date_end,
69 argument4 => p_hierarchy_id,
70 argument5 => p_hierarchy_version_id,
71 argument6 => p_report_mode,
72 argument7 => p_audit_report);
73 --
74 if l_request_id = 0 then
75 --
76 fnd_message.set_name('PER','PER_52995_CANNOT_SUBMIT_REPORT');
77 fnd_message.raise_error;
78 --
79 end if;
80 --
81 commit;
82 --
83 -- EEO-1 Consolidated Report
84 --
85 l_set_template :=
86 fnd_request.add_layout ('PER',
87 'PERRPEOC',
88 'US',
89 'US',
90 'PDF');
91
92 l_request_id := fnd_request.submit_request
93 (application => 'PER',
94 program => 'PERRPEOC',
95 description => NULL,
96 sub_request => FALSE,
97 argument1 => p_business_group_id,
98 argument2 => p_date_start,
99 argument3 => p_date_end,
100 argument4 => p_hierarchy_id,
101 argument5 => p_hierarchy_version_id,
102 argument6 => p_report_mode,
103 argument7 => p_audit_report);
104 --
105 if l_request_id = 0 then
106 --
107 fnd_message.set_name('PER','PER_52996_CANNOT_SUBMIT_REPORT');
108 fnd_message.raise_error;
109 --
110 end if;
111 --
112 commit;
113 --
114 -- EEO-1 Employment Listing
115 --
116 l_set_template :=
117 fnd_request.add_layout ('PER',
118 'PERRPE1L',
119 'US',
120 'US',
121 'PDF');
122
123 l_request_id := fnd_request.submit_request
124 (application => 'PER',
125 program => 'PERRPE1L',
126 description => NULL,
127 sub_request => FALSE,
128 argument1 => p_business_group_id,
129 argument2 => p_date_start,
130 argument3 => p_date_end,
131 argument4 => p_hierarchy_id,
132 argument5 => p_hierarchy_version_id,
133 argument6 => p_no_employees,
134 argument7 => p_audit_report);
135 --
136 if l_request_id = 0 then
137 --
138 fnd_message.set_name('PER','PER_52997_CANNOT_SUBMIT_REPORT');
139 fnd_message.raise_error;
140 --
141 end if;
142 --
143 commit;
144 --
145 -- EEO-1 Exception Report
146 --
147 l_set_template :=
148 fnd_request.add_layout ('PER',
149 'PERUSEOX',
150 'US',
151 'US',
152 'PDF');
153
154 l_request_id := fnd_request.submit_request
155 (application => 'PER',
156 program => 'PERUSEOX',
157 description => 'EEO-1 Exception Report',
158 sub_request => FALSE,
159 argument1 => p_business_group_id,
160 argument2 => p_date_start,
161 argument3 => p_date_end,
162 argument4 => p_hierarchy_id,
163 argument5 => p_hierarchy_version_id,
164 argument6 => p_audit_report);
165 --
166 if l_request_id = 0 then
167 --
168 fnd_message.set_name('PER','PER_52998_CANNOT_SUBMIT_REPORT');
169 fnd_message.raise_error;
170 --
171 end if;
172 --
173 commit;
174 end submit;
175 -----------------------------------------------------------------------
176 end hr_eeo_reports;