[Home] [Help]
PACKAGE BODY: APPS.PER_EMPDIR_LEG_OVERRIDE
Source
1 PACKAGE BODY PER_EMPDIR_LEG_OVERRIDE AS
2 /* $Header: peredlor.pkb 115.2 2003/08/23 03:07 smallina noship $ */
3
4 -- ---------------------------------------------------------------------------
5 -- ---------------------------- < isOverrideEnabled > ------------------------
6 -- ---------------------------------------------------------------------------
7
8 FUNCTION isOverrideEnabled(
9 p_entity VARCHAR2
10 ) RETURN BOOLEAN IS
11 BEGIN
12 IF p_entity = 'PEOPLE' THEN
13 RETURN (g_people_override_flg
14 OR per_empdir_people_override.isOverrideEnabled);
15 ELSIF p_entity = 'ASSIGNMENTS' THEN
16 RETURN (g_asg_override_flg
17 OR per_empdir_asg_override.isOverrideEnabled);
18 ELSIF p_entity = 'JOBS' THEN
19 RETURN (g_jobs_override_flg
20 OR per_empdir_jobs_override.isOverrideEnabled);
21 ELSIF p_entity = 'ORGANIZATIONS' THEN
22 RETURN (g_orgs_override_flg
23 OR per_empdir_orgs_override.isOverrideEnabled);
24 ELSIF p_entity = 'LOCATIONS' THEN
25 RETURN (g_locations_override_flg
26 OR per_empdir_locations_override.isOverrideEnabled);
27 ELSIF p_entity = 'POSITIONS' THEN
28 RETURN (g_positions_override_flg
29 OR per_empdir_positions_override.isOverrideEnabled);
30 ELSE
31 RETURN FALSE;
32 END IF;
33 EXCEPTION WHEN OTHERS THEN
34 RETURN FALSE;
35 END isOverrideEnabled;
36
37 -- ---------------------------------------------------------------------------
38 -- ---------------------------- < positions > --------------------------------
39 -- ---------------------------------------------------------------------------
40
41 PROCEDURE positions(
42 errbuf OUT NOCOPY VARCHAR2
43 ,retcode OUT NOCOPY VARCHAR2
44 ,p_eff_date IN DATE
45 ,p_cnt IN NUMBER
46 ,p_srcSystem IN VARCHAR2) IS
47 l_flg BOOLEAN:= FALSE;
48
49 BEGIN
50
51 l_flg := per_empdir_positions_override.isOverrideEnabled;
52 FOR I IN 1 .. p_cnt LOOP
53
54 -- Begin Legislation specific overried code
55
56 -- End Legislation specific overried code
57
58 IF l_flg THEN
59
60 -- Invoking customer override call
61
62 per_empdir_positions_override.before_dml(
63 errbuf
64 ,retcode
65 ,p_eff_date
66 ,p_cnt
67 ,I
68 ,p_srcSystem);
69
70 END IF;
71 END LOOP;
72
73 EXCEPTION WHEN OTHERS THEN
74 errbuf := errbuf||SQLERRM;
75 retcode := '1';
76 per_empdir_ss.write_log(1,
77 'Error in pkg: '||g_package||' proc: positions: '||SQLCODE);
78 per_empdir_ss.write_log(1,
79 'Error Msg: '||substr(SQLERRM,1,700));
80 END positions;
81
82 -- ---------------------------------------------------------------------------
83 -- ---------------------------- < orgs > -------------------------------------
84 -- ---------------------------------------------------------------------------
85
86 PROCEDURE orgs(
87 errbuf OUT NOCOPY VARCHAR2
88 ,retcode OUT NOCOPY VARCHAR2
89 ,p_eff_date IN DATE
90 ,p_cnt IN NUMBER
91 ,p_srcSystem IN VARCHAR2) IS
92 l_flg BOOLEAN:= FALSE;
93
94 BEGIN
95
96 l_flg := per_empdir_orgs_override.isOverrideEnabled;
97 FOR I IN 1 .. p_cnt LOOP
98
99 -- Begin Legislation specific overried code
100
101 -- End Legislation specific overried code
102
103 IF l_flg THEN
104
105 -- Invoking customer override call
106
107 per_empdir_orgs_override.before_dml(
108 errbuf
109 ,retcode
110 ,p_eff_date
111 ,p_cnt
112 ,I
113 ,p_srcSystem);
114
115 END IF;
116 END LOOP;
117
118 EXCEPTION WHEN OTHERS THEN
119 errbuf := errbuf||SQLERRM;
120 retcode := '1';
121 per_empdir_ss.write_log(1,
122 'Error in pkg: '||g_package||' proc: orgs: '||SQLCODE);
123 per_empdir_ss.write_log(1,
124 'Error Msg: '||substr(SQLERRM,1,700));
125 END orgs;
126
127 -- ---------------------------------------------------------------------------
128 -- ---------------------------- < jobs > -------------------------------------
129 -- ---------------------------------------------------------------------------
130
131 PROCEDURE jobs(
132 errbuf OUT NOCOPY VARCHAR2
133 ,retcode OUT NOCOPY VARCHAR2
134 ,p_eff_date IN DATE
135 ,p_cnt IN NUMBER
136 ,p_srcSystem IN VARCHAR2) IS
137 l_flg BOOLEAN:= FALSE;
138
139 BEGIN
140
141 l_flg := per_empdir_jobs_override.isOverrideEnabled;
142 FOR I IN 1 .. p_cnt LOOP
143
144 -- Begin Legislation specific overried code
145
146 -- End Legislation specific overried code
147
148 IF l_flg THEN
149
150 -- Invoking customer override call
151
152 per_empdir_jobs_override.before_dml(
153 errbuf
154 ,retcode
155 ,p_eff_date
156 ,p_cnt
157 ,I
158 ,p_srcSystem);
159
160 END IF;
161 END LOOP;
162
163 EXCEPTION WHEN OTHERS THEN
164 errbuf := errbuf||SQLERRM;
165 retcode := '1';
166 per_empdir_ss.write_log(1,
167 'Error in pkg: '||g_package||' proc: jobs: '||SQLCODE);
168 per_empdir_ss.write_log(1,
169 'Error Msg: '||substr(SQLERRM,1,700));
170 END jobs;
171
172 -- ---------------------------------------------------------------------------
173 -- ---------------------------- < people > -----------------------------------
174 -- ---------------------------------------------------------------------------
175
176 PROCEDURE people(
177 errbuf OUT NOCOPY VARCHAR2
178 ,retcode OUT NOCOPY VARCHAR2
179 ,p_eff_date IN DATE
180 ,p_cnt IN NUMBER
181 ,p_srcSystem IN VARCHAR2) IS
182 l_flg BOOLEAN:= FALSE;
183
184 BEGIN
185
186 l_flg := per_empdir_people_override.isOverrideEnabled;
187 FOR I IN 1 .. p_cnt LOOP
188
189 -- Begin Legislation specific overried code
190
191 -- End Legislation specific overried code
192
193 IF l_flg THEN
194
195 -- Invoking customer override call
196
197 per_empdir_people_override.before_dml(
198 errbuf
199 ,retcode
200 ,p_eff_date
201 ,p_cnt
202 ,I
203 ,p_srcSystem);
204
205 END IF;
206 END LOOP;
207
208 EXCEPTION WHEN OTHERS THEN
209 errbuf := errbuf||SQLERRM;
210 retcode := '1';
211 per_empdir_ss.write_log(1,
212 'Error in pkg: '||g_package||' proc: people: '||SQLCODE);
213 per_empdir_ss.write_log(1,
214 'Error Msg: '||substr(SQLERRM,1,700));
215 END people;
216
217 -- ---------------------------------------------------------------------------
218 -- ---------------------------- < asg > --------------------------------------
219 -- ---------------------------------------------------------------------------
220
221 PROCEDURE asg(
222 errbuf OUT NOCOPY VARCHAR2
223 ,retcode OUT NOCOPY VARCHAR2
224 ,p_eff_date IN DATE
225 ,p_cnt IN NUMBER
226 ,p_srcSystem IN VARCHAR2) IS
227 l_flg BOOLEAN:= FALSE;
228
229 BEGIN
230
231 l_flg := per_empdir_asg_override.isOverrideEnabled;
232 FOR I IN 1 .. p_cnt LOOP
233
234 -- Begin Legislation specific overried code
235
236 -- End Legislation specific overried code
237
238 IF l_flg THEN
239
240 -- Invoking customer override call
241
242 per_empdir_asg_override.before_dml(
243 errbuf
244 ,retcode
245 ,p_eff_date
246 ,p_cnt
247 ,I
248 ,p_srcSystem);
249 END IF;
250 END LOOP;
251
252 EXCEPTION WHEN OTHERS THEN
253 errbuf := errbuf||SQLERRM;
254 retcode := '1';
255 per_empdir_ss.write_log(1,
256 'Error in pkg: '||g_package||' proc: asg: '||SQLCODE);
257 per_empdir_ss.write_log(1,
258 'Error Msg: '||substr(SQLERRM,1,700));
259 END asg;
260
261 -- ---------------------------------------------------------------------------
262 -- ---------------------------- < locations > --------------------------------
263 -- ---------------------------------------------------------------------------
264
265 PROCEDURE locations(
266 errbuf OUT NOCOPY VARCHAR2
267 ,retcode OUT NOCOPY VARCHAR2
268 ,p_eff_date IN DATE
269 ,p_cnt IN NUMBER
270 ,p_srcSystem IN VARCHAR2) IS
271
272 -- Local Variables
273 l_flg BOOLEAN:= FALSE;
274 l_address VARCHAR2(2000);
275 l_style VARCHAR2(30);
276
277 BEGIN
278
279 l_flg := per_empdir_locations_override.isOverrideEnabled;
280 FOR I IN 1 .. p_cnt LOOP
281
282 -- Begin Legislation specific overried code
283
284 IF p_srcSystem = 'PER' THEN
285
286 l_style := nvl(per_empdir_ss.locationTbl.country(I)
287 ,per_empdir_ss.locationTbl.style(I));
288
289 IF (l_style = 'JP') THEN
290 l_address := per_empdir_ss.locationTbl.postal_code(I)||
291 '<br>'||per_empdir_ss.locationTbl.address_line_1(I)||'<br>';
292 IF per_empdir_ss.locationTbl.address_line_2(I) IS NOT NULL THEN
293 l_address := l_address||per_empdir_ss.locationTbl.address_line_2(I)||'<br>';
294 END IF;
295 IF per_empdir_ss.locationTbl.address_line_3(I) IS NOT NULL THEN
296 l_address := l_address||per_empdir_ss.locationTbl.address_line_3(I)||'<br>';
297 END IF;
298 l_address := l_address||per_empdir_ss.locationTbl.town_or_city(I);
299
300 ELSE -- Applying gloabl address format.
301
302 l_address := per_empdir_ss.locationTbl.address_line_1(I)||'<br>';
303 IF per_empdir_ss.locationTbl.address_line_2(I) IS NOT NULL THEN
304 l_address := l_address||per_empdir_ss.locationTbl.address_line_2(I)||'<br>';
305 END IF;
306 l_address := l_address||per_empdir_ss.locationTbl.town_or_city(I)||
307 ', '||per_empdir_ss.locationTbl.region_2(I)||
308 ' '||per_empdir_ss.locationTbl.postal_code(I);
309 END IF;
310
311 -- End Legislation specific overried code
312
313 per_empdir_ss.locationTbl.address(I) := '<span class="OraDataText"> '||l_address||' </span>';
314
315 IF l_flg THEN
316
317 -- Invoking customer override call
318
319 per_empdir_locations_override.before_dml(
320 errbuf
321 ,retcode
322 ,p_eff_date
323 ,p_cnt
324 ,I
325 ,p_srcSystem);
326 END IF;
327
328 END IF;
329 END LOOP;
330
331 EXCEPTION WHEN OTHERS THEN
332 errbuf := errbuf||SQLERRM;
333 retcode := '1';
334 per_empdir_ss.write_log(1,
335 'Error in pkg: '||g_package||' proc: locations: '||SQLCODE);
336 per_empdir_ss.write_log(1,
337 'Error Msg: '||substr(SQLERRM,1,700));
338 END locations;
339
340 END PER_EMPDIR_LEG_OVERRIDE;