DBA Data[Home] [Help]

PACKAGE: APPS.PER_APPLICATIONS_PKG

Source


1 PACKAGE PER_APPLICATIONS_PKG AUTHID CURRENT_USER as
2 /* $Header: peapp01t.pkh 120.1 2011/06/02 16:32:37 lbodired 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 -- included for the bug#12593632
102 PROCEDURE cancel_update_assigns_obg(p_person_id         NUMBER,
103                                 p_business_group_id NUMBER,
104                                 P_date_end          DATE,
105                                 P_application_id    NUMBER,
106                                 p_legislation_code  VARCHAR2,
107                                 P_end_of_time       DATE,
108                                 P_last_updated_by   NUMBER,
109                                 p_last_update_login NUMBER,
110                                 p_assignment_id     NUMBER) ;
111 -----------------------------------------------------------------------------
112 
113 -- Name                                                                    --
114 --   term_update_assignments                                               --
115 -- Purpose                                                                 --
116 --   when terminating an applicant close down all the applicant assignments
117 --   as of the termination date.
118 -- Arguments                                                               --
119 --   See below.                                                            --
120 -- Notes                                                                   --
121 -----------------------------------------------------------------------------
122 PROCEDURE term_update_assignments(p_person_id         NUMBER,
123                                   p_business_group_id NUMBER,
124                                   P_date_end          DATE,
125                                   P_application_id    NUMBER,
126                                   p_last_updated_by   NUMBER,
127                                   p_last_update_login NUMBER);
128 -----------------------------------------------------------------------------
129 -- Name                                                                    --
130 --   canc_chk_fut_person_changes                                           --
131 -- Purpose                                                                 --
132 --   Check that there are no person type changes after the termination
133 --   date
134 -- Arguments                                                               --
135 --   See below.                                                            --
136 -- Notes                                                                   --
137 -----------------------------------------------------------------------------
138 PROCEDURE canc_chk_fut_per_changes(p_person_id      NUMBER,
139                                    p_application_id NUMBER,
140                                    p_date_end       DATE     ) ;
141 -----------------------------------------------------------------------------
142 -- Name                                                                    --
143 --   term_chk_fut_person_changes                                           --
144 -- Purpose                                                                 --
145 --   check that the applicant has no future person record changes after the
146 --   apparent termination date since this would prohibit a termination.    --
147 -- Arguments                                                               --
148 --   See below.                                                            --
149 -- Notes                                                                   --
150 -----------------------------------------------------------------------------
151 PROCEDURE term_chk_fut_per_changes(p_person_id         NUMBER,
152                                       p_business_group_id NUMBER,
153                                       P_date_end          DATE);
154 -----------------------------------------------------------------------------
155 -- Name                                                                    --
156 --   term_chk_fut_assign_changes                                           --
157 -- Purpose                                                                 --
158 --   if future assignment changes of any sort exist for the person, then   --
159 --   the user cannot terminate the application.                            --
160 -- Arguments                                                               --
161 --   See below.                                                            --
162 -- Notes                                                                   --
163 -----------------------------------------------------------------------------
164 PROCEDURE term_chk_fut_assign_changes(p_person_id         NUMBER,
165                                       p_business_group_id NUMBER,
166                                       P_date_end          DATE);
167 -----------------------------------------------------------------------------
168 -- Name                                                                    --
169 --   maint_security_cancel                                                 --
170 -- Purpose                                                                 --
171 --   when an applicant's termination is cancelled delete the applicant and --
172 --   their security profile id from per_person_list_changes.               --
173 -- Arguments                                                               --
174 --   See below.                                                            --
175 -- Notes                                                                   --
176 -----------------------------------------------------------------------------
177 PROCEDURE maint_security_cancel(p_person_id        NUMBER);
178 -----------------------------------------------------------------------------
179 -- Name                                                                    --
180 --   maint_security_term                                                   --
181 -- Purpose                                                                 --
182 --   when the applicant has been terminated ensure that
183 --   per_person_list_changes is maintained and that a row is inserted for
184 --   each security profile in which the applicant appears.
185 -- Arguments                                                               --
186 --   See below.                                                            --
187 -- Notes                                                                   --
188 -----------------------------------------------------------------------------
189 PROCEDURE maint_security_term(p_person_id        NUMBER);
190 -----------------------------------------------------------------------------
191 -- Name                                                                    --
192 --   sec_statuses_cancel                                                   --
193 -- Purpose                                                                 --
194 --   to nuliify any secondary assignment statuses end dates on the applicant's
195 --   assignments if they are currently the same as the termination date when
196 --   the applicant was terminated.
197 -- Arguments                                                               --
198 --   See below.                                                            --
199 -- Notes                                                                   --
200 -----------------------------------------------------------------------------
201 PROCEDURE sec_statuses_cancel(p_end_date          DATE,
202                            p_application_id     NUMBER,
203                            p_business_group_id  NUMBER,
204                            p_last_updated_by    NUMBER,
205                            p_last_update_login  NUMBER,
206                            p_person_id          NUMBER);
207 -----------------------------------------------------------------------------
208 -- Name                                                                    --
209 --   sec_statuses_term                                                     --
210 -- Purpose                                                                 --
211 --   to delete any future sec.statuses when terminating an applicant. Puts an
212 --   end date as of the applicant's termination date for any secondary
213 --   applicant assignment statuses that start before the termination date
214 --   and which don't have end dates before the termination end date.       --
215 -- Arguments                                                               --
216 --   See below.                                                            --
217 -- Notes                                                                   --
218 -----------------------------------------------------------------------------
219 PROCEDURE sec_statuses_term(p_end_date          DATE,
220                            p_application_id     NUMBER,
221                            p_business_group_id  NUMBER,
222                            p_last_updated_by    NUMBER,
223                            p_last_update_login  NUMBER,
224                            p_person_id          NUMBER);
225 -----------------------------------------------------------------------------
226 -- Name                                                                    --
227 --   del_interviews_term                                                   --
228 -- Purpose                                                                 --
229 --   To delete any future interviews that an applicant may have when being --
230 --   terminated.
231 -- Arguments                                                               --
232 --   See below.                                                            --
233 -- Notes                                                                   --
234 -----------------------------------------------------------------------------
235 PROCEDURE del_interviews_term(P_person_id               NUMBER,
236                               P_date_end                DATE,
237                               P_Business_group_id       NUMBER,
238                               P_application_id          NUMBER);
239 -----------------------------------------------------------------------------
240 -- Name                                                                    --
241 --   maintain_ppt_cancel                                                   --
242 -- Purpose                                                                 --
243 --   On cancellation of a termination, delete the last record in PER_PEOPLE_F
244 --   and open out the previous recordto the end of time.                   --
245 -- Arguments                                                               --
246 --   See below.                                                            --
247 -- Notes                                                                   --
248 -----------------------------------------------------------------------------
249 PROCEDURE maintain_ppt_cancel(P_person_id               NUMBER,
250                               P_Business_group_id       NUMBER,
251                               P_date_end                DATE,
252                               P_last_updated_by         NUMBER,
253                               P_last_update_login       NUMBER,
254                               P_end_of_time             DATE);
255 
256 -----------------------------------------------------------------------------
257 PROCEDURE chk_not_already_termed(P_Business_group_id         NUMBER,
258                                  P_person_id                 NUMBER,
259                                  P_application_id            NUMBER,
260                                  P_date_end                  DATE);
261 -----------------------------------------------------------------------------
262 
263 PROCEDURE maintain_ppt_term(P_Business_group_id    NUMBER,
264                             P_person_id                 NUMBER,
265                             P_date_end                  DATE,
266                             P_end_of_time               DATE,
267                             P_last_updated_by           NUMBER,
268                             P_last_update_login         NUMBER);
269 
270 PROCEDURE Insert_Row(p_Rowid                         IN OUT NOCOPY VARCHAR2,
271                      p_Application_Id                       IN OUT NOCOPY NUMBER,
272                      p_Business_Group_Id                    NUMBER,
273                      p_Person_Id                            NUMBER,
274                      p_Date_Received                        DATE,
275                      p_Comments                             VARCHAR2,
276                      p_Current_Employer                     VARCHAR2,
277                      p_Date_End                             DATE,
278                      p_Projected_Hire_Date                  DATE,
279                      p_Successful_Flag                      VARCHAR2,
280                      p_Termination_Reason                   VARCHAR2,
281                      p_Appl_Attribute_Category              VARCHAR2,
282                      p_Appl_Attribute1                      VARCHAR2,
283                      p_Appl_Attribute2                      VARCHAR2,
284                      p_Appl_Attribute3                      VARCHAR2,
285                      p_Appl_Attribute4                      VARCHAR2,
286                      p_Appl_Attribute5                      VARCHAR2,
287                      p_Appl_Attribute6                      VARCHAR2,
288                      p_Appl_Attribute7                      VARCHAR2,
289                      p_Appl_Attribute8                      VARCHAR2,
290                      p_Appl_Attribute9                      VARCHAR2,
291                      p_Appl_Attribute10                     VARCHAR2,
292                      p_Appl_Attribute11                     VARCHAR2,
293                      p_Appl_Attribute12                     VARCHAR2,
294                      p_Appl_Attribute13                     VARCHAR2,
295                      p_Appl_Attribute14                     VARCHAR2,
296                      p_Appl_Attribute15                     VARCHAR2,
297                      p_Appl_Attribute16                     VARCHAR2,
298                      p_Appl_Attribute17                     VARCHAR2,
299                      p_Appl_Attribute18                     VARCHAR2,
300                      p_Appl_Attribute19                     VARCHAR2,
301                      p_Appl_Attribute20                     VARCHAR2,
302                      p_Last_Update_Date                     DATE,
303                      p_Last_Updated_By                      NUMBER,
304                      p_Last_Update_Login                    NUMBER,
305                      p_Created_By                           NUMBER,
306                      p_Creation_Date                        DATE);
307 
308 PROCEDURE Lock_Row(p_Rowid                                  VARCHAR2,
309                    p_Application_Id                         NUMBER,
310                    p_Business_Group_Id                      NUMBER,
311                    p_Person_Id                              NUMBER,
315                    p_Date_End                               DATE,
312                    p_Date_Received                          DATE,
313                    p_Comments                               VARCHAR2,
314                    p_Current_Employer                       VARCHAR2,
316                    p_Projected_Hire_Date                    DATE,
317                    p_Successful_Flag                        VARCHAR2,
318                    p_Termination_Reason                     VARCHAR2,
319                    p_Appl_Attribute_Category                VARCHAR2,
320                    p_Appl_Attribute1                        VARCHAR2,
321                    p_Appl_Attribute2                        VARCHAR2,
322                    p_Appl_Attribute3                        VARCHAR2,
323                    p_Appl_Attribute4                        VARCHAR2,
324                    p_Appl_Attribute5                        VARCHAR2,
325                    p_Appl_Attribute6                        VARCHAR2,
326                    p_Appl_Attribute7                        VARCHAR2,
327                    p_Appl_Attribute8                        VARCHAR2,
328                    p_Appl_Attribute9                        VARCHAR2,
329                    p_Appl_Attribute10                       VARCHAR2,
330                    p_Appl_Attribute11                       VARCHAR2,
331                    p_Appl_Attribute12                       VARCHAR2,
332                    p_Appl_Attribute13                       VARCHAR2,
333                    p_Appl_Attribute14                       VARCHAR2,
334                    p_Appl_Attribute15                       VARCHAR2,
335                    p_Appl_Attribute16                       VARCHAR2,
336                    p_Appl_Attribute17                       VARCHAR2,
337                    p_Appl_Attribute18                       VARCHAR2,
338                    p_Appl_Attribute19                       VARCHAR2,
339                    p_Appl_Attribute20                       VARCHAR2);
340 
341 PROCEDURE Update_Row(p_Rowid                               VARCHAR2,
342                      p_Application_Id                      NUMBER,
343                      p_Business_Group_Id                   NUMBER,
344                      p_Person_Id                           NUMBER,
345                      p_Person_Type_Id                      NUMBER,
346                      p_Date_Received                       DATE,
347                      p_Comments                            VARCHAR2,
348                      p_Current_Employer                    VARCHAR2,
349                      p_Date_End                            DATE,
350                      p_Projected_Hire_Date                 DATE,
351                      p_Successful_Flag                     VARCHAR2,
352                      p_Termination_Reason                  VARCHAR2,
353                      p_Cancellation_Flag                   VARCHAR2, -- parameter added for Bug 3053711
354                      p_Appl_Attribute_Category             VARCHAR2,
355                      p_Appl_Attribute1                     VARCHAR2,
356                      p_Appl_Attribute2                     VARCHAR2,
357                      p_Appl_Attribute3                     VARCHAR2,
358                      p_Appl_Attribute4                     VARCHAR2,
359                      p_Appl_Attribute5                     VARCHAR2,
360                      p_Appl_Attribute6                     VARCHAR2,
361                      p_Appl_Attribute7                     VARCHAR2,
362                      p_Appl_Attribute8                     VARCHAR2,
363                      p_Appl_Attribute9                     VARCHAR2,
364                      p_Appl_Attribute10                    VARCHAR2,
365                      p_Appl_Attribute11                    VARCHAR2,
366                      p_Appl_Attribute12                    VARCHAR2,
367                      p_Appl_Attribute13                    VARCHAR2,
368                      p_Appl_Attribute14                    VARCHAR2,
369                      p_Appl_Attribute15                    VARCHAR2,
370                      p_Appl_Attribute16                    VARCHAR2,
371                      p_Appl_Attribute17                    VARCHAR2,
372                      p_Appl_Attribute18                    VARCHAR2,
373                      p_Appl_Attribute19                    VARCHAR2,
374                      p_Appl_Attribute20                    VARCHAR2);
375 
376 PROCEDURE Delete_Row(p_Rowid VARCHAR2);
377 --
378 -- ----------------------------------------------------------------------------
379 -- |-----------------------< maintain_irc_ass_status >----------------------|
380 -- ----------------------------------------------------------------------------
381 -- {Start Of Comments}
382 --
383 -- Description:
384 --   This procedure is used to update the IRC_ASSIGNMENT_STATUSES when an
385 --   application is terminated/reverse terminated. This status will be
386 --   displayed to an External site visitor of iRecruitment
387 --
388 -- Prerequisites:
389 --   An applicant assignment should be existing
390 --
391 -- In Parameters:
392 --   Name                        Reqd   Type     Description
393 --   p_person_id                 Yes    Number   System generated person
394 --                                               primary key from PER_PEOPLE_S
395 --   p_business_group_id         Yes    Number
396 --   p_application_id            Yes    Number   Id of the application to be
397 --                                               terminated
398 --   p_date_end                  Yes    Date     Application end date
399 --   p_effective_date            Yes    Date     Effective date (Session date)
400 --   p_legislation_code          Yes    Varchar2 Language sepecific code
401 --   p_action                    Yes    Varchar2 Action should be 'TERM' or
402 --                                               'CANCEL'
403 --
404 -- Post Success:
405 --   Will update the application status in IRC_ASSIGNMENT_STATUSES
406 --
407 -- Post Failure:
408 --   None
409 --
410 -- Access Status:
411 --   Public.
412 --
413 -- {End Of Comments}
414 --
415 -- ---------------------------------------------------------------------------
416 procedure maintain_irc_ass_status(p_person_id         number,
417                                   p_business_group_id number,
418                                   p_date_end          date,
419                                   p_effective_date    date,
420                                   p_application_id    number,
421                                   p_legislation_code  varchar2,
422                                   p_action            varchar2);
423 --
424 END PER_APPLICATIONS_PKG;