[Home] [Help]
PACKAGE: APPS.PER_APPLICATIONS_PKG
Source
1 PACKAGE PER_APPLICATIONS_PKG AUTHID CURRENT_USER as
2 /* $Header: peapp01t.pkh 115.7 2004/03/31 05:29:14 jpthomas ship $ */
3 -----------------------------------------------------------------------------
4 -- Name --
5 -- get_prev_ass_type_id --
6 -- Purpose --
7 -- to populate a field in the F4 form PERWSTAP, needed for the procedure --
8 -- del_letter_term when terminating an applicant.
9 -- Notes --
10 -----------------------------------------------------------------------------
11 FUNCTION get_prev_ass_type_id(P_Business_Group_id NUMBER,
12 p_person_id NUMBER,
13 p_application_id NUMBER,
14 p_date_end DATE) return NUMBER;
15 -----------------------------------------------------------------------------
16 -- Name --
17 -- del_letter_term --
18 -- Purpose --
19 -- on termination of an applicant's application delete any letter request--
20 -- lines for the applicant's assignments if they exist for assigment status-
21 -- types other than TERM_APL.
22 -- Arguments --
23 -- See below. --
24 -- Notes --
25 -- NB. The applicant status TERM_APL is never held on the applicant's --
26 -- assignment record.
27 -----------------------------------------------------------------------------
28 PROCEDURE del_letter_term(p_person_id NUMBER,
29 p_business_group_id NUMBER,
30 p_date_end DATE,
31 p_application_id NUMBER,
32 P_dummy_asg_stat_id NUMBER);
33 -----------------------------------------------------------------------------
34 -- Name --
35 -- insert_letter_term --
36 -- Purpose --
37 -- to insert letter request if needs be and to insert letter request lines-
38 -- when the user specifies a termination status(otional) when doing an --
39 -- applicant termination.
40 -- Arguments --
41 -- See below. --
42 -- Notes --
43 -----------------------------------------------------------------------------
44 PROCEDURE insert_letter_term(P_business_group_id NUMBER,
45 p_application_id NUMBER,
46 p_person_id NUMBER,
47 p_session_date DATE,
48 p_last_updated_by NUMBER,
49 p_last_update_login NUMBER,
50 p_assignment_status_type_id NUMBER );
51 -----------------------------------------------------------------------------
52 -- Name --
53 -- del_letters_cancel --
54 -- Purpose --
55 -- to delete any letter request lines for the applicant that may exist --
56 -- that have an assignment status of TERM_APL.
57 -- Arguments --
58 -- See below. --
59 -- Notes --
60 -----------------------------------------------------------------------------
61 PROCEDURE del_letters_cancel(p_business_group_id NUMBER,
62 P_person_id NUMBER,
63 p_application_id NUMBER
64 );
65 -----------------------------------------------------------------------------
66 -- Name --
67 -- cancel_update_assigns --
68 -- Purpose --
69 -- on cancelling a termination open the applicant assignments to the end of
70 -- time.
71 -- If the applicant was entered through the Quick Entry screen with a --
72 -- status of TERM_APL i.e just for recording purposes then the applicant --
73 -- assignment must be re-opened with the status of ACTIVE_APL. --
74 -- Arguments --
75 -- See below. --
76 -- Notes --
77 -----------------------------------------------------------------------------
78 -- Name --
79 -- cancel_chk_current_emp --
80 -- Purpose --
81 -- to ensure that if the applicant has been hired as an employee that the -
82 -- user cannot canel a termination of the applicant's application
83 -- Arguments --
84 -- See below. --
85 -- Notes --
86 -- called from the client PERWSTAP pre-cancellation
87 -----------------------------------------------------------------------------
88 PROCEDURE cancel_chk_current_emp(p_person_id NUMBER,
89 p_business_group_id NUMBER,
90 p_date_end DATE); -- Bug 3380724
91 -----------------------------------------------------------------------------
92 PROCEDURE cancel_update_assigns(p_person_id NUMBER,
93 p_business_group_id NUMBER,
94 P_date_end DATE,
95 P_application_id NUMBER,
96 p_legislation_code VARCHAR2,
97 P_end_of_time DATE,
98 P_last_updated_by NUMBER,
99 p_last_update_login NUMBER) ;
100 -----------------------------------------------------------------------------
101 -- Name --
102 -- term_update_assignments --
103 -- Purpose --
104 -- when terminating an applicant close down all the applicant assignments
105 -- as of the termination date.
106 -- Arguments --
107 -- See below. --
108 -- Notes --
109 -----------------------------------------------------------------------------
110 PROCEDURE term_update_assignments(p_person_id NUMBER,
111 p_business_group_id NUMBER,
112 P_date_end DATE,
113 P_application_id NUMBER,
114 p_last_updated_by NUMBER,
115 p_last_update_login NUMBER);
116 -----------------------------------------------------------------------------
117 -- Name --
118 -- canc_chk_fut_person_changes --
119 -- Purpose --
120 -- Check that there are no person type changes after the termination
121 -- date
122 -- Arguments --
123 -- See below. --
124 -- Notes --
125 -----------------------------------------------------------------------------
126 PROCEDURE canc_chk_fut_per_changes(p_person_id NUMBER,
127 p_application_id NUMBER,
128 p_date_end DATE ) ;
129 -----------------------------------------------------------------------------
130 -- Name --
131 -- term_chk_fut_person_changes --
132 -- Purpose --
133 -- check that the applicant has no future person record changes after the
134 -- apparent termination date since this would prohibit a termination. --
135 -- Arguments --
136 -- See below. --
137 -- Notes --
138 -----------------------------------------------------------------------------
139 PROCEDURE term_chk_fut_per_changes(p_person_id NUMBER,
140 p_business_group_id NUMBER,
141 P_date_end DATE);
142 -----------------------------------------------------------------------------
143 -- Name --
144 -- term_chk_fut_assign_changes --
145 -- Purpose --
146 -- if future assignment changes of any sort exist for the person, then --
147 -- the user cannot terminate the application. --
148 -- Arguments --
149 -- See below. --
150 -- Notes --
151 -----------------------------------------------------------------------------
152 PROCEDURE term_chk_fut_assign_changes(p_person_id NUMBER,
153 p_business_group_id NUMBER,
154 P_date_end DATE);
155 -----------------------------------------------------------------------------
156 -- Name --
157 -- maint_security_cancel --
158 -- Purpose --
159 -- when an applicant's termination is cancelled delete the applicant and --
160 -- their security profile id from per_person_list_changes. --
161 -- Arguments --
162 -- See below. --
163 -- Notes --
164 -----------------------------------------------------------------------------
165 PROCEDURE maint_security_cancel(p_person_id NUMBER);
166 -----------------------------------------------------------------------------
167 -- Name --
168 -- maint_security_term --
169 -- Purpose --
170 -- when the applicant has been terminated ensure that
171 -- per_person_list_changes is maintained and that a row is inserted for
172 -- each security profile in which the applicant appears.
173 -- Arguments --
174 -- See below. --
175 -- Notes --
176 -----------------------------------------------------------------------------
177 PROCEDURE maint_security_term(p_person_id NUMBER);
178 -----------------------------------------------------------------------------
179 -- Name --
180 -- sec_statuses_cancel --
181 -- Purpose --
182 -- to nuliify any secondary assignment statuses end dates on the applicant's
183 -- assignments if they are currently the same as the termination date when
184 -- the applicant was terminated.
185 -- Arguments --
186 -- See below. --
187 -- Notes --
188 -----------------------------------------------------------------------------
189 PROCEDURE sec_statuses_cancel(p_end_date DATE,
190 p_application_id NUMBER,
191 p_business_group_id NUMBER,
192 p_last_updated_by NUMBER,
193 p_last_update_login NUMBER,
194 p_person_id NUMBER);
195 -----------------------------------------------------------------------------
196 -- Name --
197 -- sec_statuses_term --
198 -- Purpose --
199 -- to delete any future sec.statuses when terminating an applicant. Puts an
200 -- end date as of the applicant's termination date for any secondary
201 -- applicant assignment statuses that start before the termination date
202 -- and which don't have end dates before the termination end date. --
203 -- Arguments --
204 -- See below. --
205 -- Notes --
206 -----------------------------------------------------------------------------
207 PROCEDURE sec_statuses_term(p_end_date DATE,
208 p_application_id NUMBER,
209 p_business_group_id NUMBER,
210 p_last_updated_by NUMBER,
211 p_last_update_login NUMBER,
212 p_person_id NUMBER);
213 -----------------------------------------------------------------------------
214 -- Name --
215 -- del_interviews_term --
216 -- Purpose --
217 -- To delete any future interviews that an applicant may have when being --
218 -- terminated.
219 -- Arguments --
220 -- See below. --
221 -- Notes --
222 -----------------------------------------------------------------------------
223 PROCEDURE del_interviews_term(P_person_id NUMBER,
224 P_date_end DATE,
225 P_Business_group_id NUMBER,
226 P_application_id NUMBER);
227 -----------------------------------------------------------------------------
228 -- Name --
229 -- maintain_ppt_cancel --
230 -- Purpose --
231 -- On cancellation of a termination, delete the last record in PER_PEOPLE_F
232 -- and open out the previous recordto the end of time. --
233 -- Arguments --
234 -- See below. --
235 -- Notes --
236 -----------------------------------------------------------------------------
237 PROCEDURE maintain_ppt_cancel(P_person_id NUMBER,
238 P_Business_group_id NUMBER,
239 P_date_end DATE,
240 P_last_updated_by NUMBER,
241 P_last_update_login NUMBER,
242 P_end_of_time DATE);
243
244 -----------------------------------------------------------------------------
245 PROCEDURE chk_not_already_termed(P_Business_group_id NUMBER,
246 P_person_id NUMBER,
247 P_application_id NUMBER,
248 P_date_end DATE);
249 -----------------------------------------------------------------------------
250
251 PROCEDURE maintain_ppt_term(P_Business_group_id NUMBER,
252 P_person_id NUMBER,
253 P_date_end DATE,
254 P_end_of_time DATE,
255 P_last_updated_by NUMBER,
256 P_last_update_login NUMBER);
257
258 PROCEDURE Insert_Row(p_Rowid IN OUT NOCOPY VARCHAR2,
259 p_Application_Id IN OUT NOCOPY NUMBER,
260 p_Business_Group_Id NUMBER,
261 p_Person_Id NUMBER,
262 p_Date_Received DATE,
263 p_Comments VARCHAR2,
264 p_Current_Employer VARCHAR2,
265 p_Date_End DATE,
266 p_Projected_Hire_Date DATE,
267 p_Successful_Flag VARCHAR2,
268 p_Termination_Reason VARCHAR2,
269 p_Appl_Attribute_Category VARCHAR2,
270 p_Appl_Attribute1 VARCHAR2,
271 p_Appl_Attribute2 VARCHAR2,
272 p_Appl_Attribute3 VARCHAR2,
273 p_Appl_Attribute4 VARCHAR2,
274 p_Appl_Attribute5 VARCHAR2,
275 p_Appl_Attribute6 VARCHAR2,
279 p_Appl_Attribute10 VARCHAR2,
276 p_Appl_Attribute7 VARCHAR2,
277 p_Appl_Attribute8 VARCHAR2,
278 p_Appl_Attribute9 VARCHAR2,
280 p_Appl_Attribute11 VARCHAR2,
281 p_Appl_Attribute12 VARCHAR2,
282 p_Appl_Attribute13 VARCHAR2,
283 p_Appl_Attribute14 VARCHAR2,
284 p_Appl_Attribute15 VARCHAR2,
285 p_Appl_Attribute16 VARCHAR2,
286 p_Appl_Attribute17 VARCHAR2,
287 p_Appl_Attribute18 VARCHAR2,
288 p_Appl_Attribute19 VARCHAR2,
289 p_Appl_Attribute20 VARCHAR2,
290 p_Last_Update_Date DATE,
291 p_Last_Updated_By NUMBER,
292 p_Last_Update_Login NUMBER,
293 p_Created_By NUMBER,
294 p_Creation_Date DATE);
295
296 PROCEDURE Lock_Row(p_Rowid VARCHAR2,
297 p_Application_Id NUMBER,
298 p_Business_Group_Id NUMBER,
299 p_Person_Id NUMBER,
300 p_Date_Received DATE,
301 p_Comments VARCHAR2,
302 p_Current_Employer VARCHAR2,
303 p_Date_End DATE,
304 p_Projected_Hire_Date DATE,
305 p_Successful_Flag VARCHAR2,
306 p_Termination_Reason VARCHAR2,
307 p_Appl_Attribute_Category VARCHAR2,
308 p_Appl_Attribute1 VARCHAR2,
309 p_Appl_Attribute2 VARCHAR2,
310 p_Appl_Attribute3 VARCHAR2,
311 p_Appl_Attribute4 VARCHAR2,
312 p_Appl_Attribute5 VARCHAR2,
313 p_Appl_Attribute6 VARCHAR2,
314 p_Appl_Attribute7 VARCHAR2,
315 p_Appl_Attribute8 VARCHAR2,
316 p_Appl_Attribute9 VARCHAR2,
317 p_Appl_Attribute10 VARCHAR2,
318 p_Appl_Attribute11 VARCHAR2,
319 p_Appl_Attribute12 VARCHAR2,
320 p_Appl_Attribute13 VARCHAR2,
321 p_Appl_Attribute14 VARCHAR2,
322 p_Appl_Attribute15 VARCHAR2,
323 p_Appl_Attribute16 VARCHAR2,
324 p_Appl_Attribute17 VARCHAR2,
325 p_Appl_Attribute18 VARCHAR2,
326 p_Appl_Attribute19 VARCHAR2,
327 p_Appl_Attribute20 VARCHAR2);
328
329 PROCEDURE Update_Row(p_Rowid VARCHAR2,
330 p_Application_Id NUMBER,
331 p_Business_Group_Id NUMBER,
332 p_Person_Id NUMBER,
333 p_Person_Type_Id NUMBER,
334 p_Date_Received DATE,
335 p_Comments VARCHAR2,
336 p_Current_Employer VARCHAR2,
337 p_Date_End DATE,
338 p_Projected_Hire_Date DATE,
339 p_Successful_Flag VARCHAR2,
340 p_Termination_Reason VARCHAR2,
341 p_Cancellation_Flag VARCHAR2, -- parameter added for Bug 3053711
342 p_Appl_Attribute_Category VARCHAR2,
343 p_Appl_Attribute1 VARCHAR2,
344 p_Appl_Attribute2 VARCHAR2,
345 p_Appl_Attribute3 VARCHAR2,
346 p_Appl_Attribute4 VARCHAR2,
347 p_Appl_Attribute5 VARCHAR2,
348 p_Appl_Attribute6 VARCHAR2,
349 p_Appl_Attribute7 VARCHAR2,
350 p_Appl_Attribute8 VARCHAR2,
351 p_Appl_Attribute9 VARCHAR2,
352 p_Appl_Attribute10 VARCHAR2,
353 p_Appl_Attribute11 VARCHAR2,
354 p_Appl_Attribute12 VARCHAR2,
355 p_Appl_Attribute13 VARCHAR2,
356 p_Appl_Attribute14 VARCHAR2,
357 p_Appl_Attribute15 VARCHAR2,
358 p_Appl_Attribute16 VARCHAR2,
359 p_Appl_Attribute17 VARCHAR2,
363
360 p_Appl_Attribute18 VARCHAR2,
361 p_Appl_Attribute19 VARCHAR2,
362 p_Appl_Attribute20 VARCHAR2);
364 PROCEDURE Delete_Row(p_Rowid VARCHAR2);
365 --
366 -- ----------------------------------------------------------------------------
367 -- |-----------------------< maintain_irc_ass_status >----------------------|
368 -- ----------------------------------------------------------------------------
369 -- {Start Of Comments}
370 --
371 -- Description:
372 -- This procedure is used to update the IRC_ASSIGNMENT_STATUSES when an
373 -- application is terminated/reverse terminated. This status will be
374 -- displayed to an External site visitor of iRecruitment
375 --
376 -- Prerequisites:
377 -- An applicant assignment should be existing
378 --
379 -- In Parameters:
380 -- Name Reqd Type Description
381 -- p_person_id Yes Number System generated person
382 -- primary key from PER_PEOPLE_S
383 -- p_business_group_id Yes Number
384 -- p_application_id Yes Number Id of the application to be
385 -- terminated
386 -- p_date_end Yes Date Application end date
387 -- p_effective_date Yes Date Effective date (Session date)
388 -- p_legislation_code Yes Varchar2 Language sepecific code
389 -- p_action Yes Varchar2 Action should be 'TERM' or
390 -- 'CANCEL'
391 --
392 -- Post Success:
393 -- Will update the application status in IRC_ASSIGNMENT_STATUSES
394 --
395 -- Post Failure:
396 -- None
397 --
398 -- Access Status:
399 -- Public.
400 --
401 -- {End Of Comments}
402 --
403 -- ---------------------------------------------------------------------------
404 procedure maintain_irc_ass_status(p_person_id number,
405 p_business_group_id number,
406 p_date_end date,
407 p_effective_date date,
408 p_application_id number,
409 p_legislation_code varchar2,
410 p_action varchar2);
411 --
412 END PER_APPLICATIONS_PKG;