[Home] [Help]
PACKAGE: APPS.HR_MISC_WEB
Source
1 PACKAGE hr_misc_web AUTHID CURRENT_USER AS
2 /* $Header: hrmscmnw.pkh 120.1 2005/09/23 15:05:34 svittal noship $*/
3
4 -- Global Variables.
5 gv_IMAGE_DIR CONSTANT VARCHAR2(50) := '/OA_MEDIA/';
6 gv_HTML_DIR CONSTANT VARCHAR2(50) := '/OA_HTML/';
7 gv_MEE_CSS_FILE CONSTANT VARCHAR2(50) :=
8 'webtools/images/cabo_styles.css';
9 gv_MEE_JS_FILE CONSTANT VARCHAR2(50) := 'hrmecmnw.js';
10 gv_cancel CONSTANT VARCHAR2(200) := 'cancel_button_onClick';
11 gv_hr_menu CONSTANT VARCHAR2(200) := 'main_menu_onClick';
12
13 -- Variables to mimic the functionality of CHR() functions.
14 gv_NULL CONSTANT VARCHAR2(10) :=
15 CONVERT (
16 fnd_global.local_chr(0),
17 SUBSTR(userenv('LANGUAGE'),
18 INSTR(userenv('LANGUAGE'),'.') +1),
19 'WE8ISO8859P1'
20 );
21 gv_NEW_LINE CONSTANT VARCHAR2(10) :=
22 CONVERT (
23 fnd_global.local_chr(10),
24 SUBSTR(userenv('LANGUAGE'),
25 INSTR(userenv('LANGUAGE'),'.') +1),
26 'WE8ISO8859P1'
27 );
28 gv_SPACE CONSTANT VARCHAR2(10) :=
29 CONVERT (
30 fnd_global.local_chr(32),
31 SUBSTR(userenv('LANGUAGE'),
32 INSTR(userenv('LANGUAGE'),'.') +1),
33 'WE8ISO8859P1'
34 );
35 gv_SINGLE_QUOTE CONSTANT VARCHAR2(10) :=
36 CONVERT (
37 fnd_global.local_chr(39),
38 SUBSTR(userenv('LANGUAGE'),
39 INSTR(userenv('LANGUAGE'),'.') +1),
40 'WE8ISO8859P1'
41 );
42 gv_COMMA CONSTANT VARCHAR2(10) :=
43 CONVERT (
44 fnd_global.local_chr(44),
45 SUBSTR(userenv('LANGUAGE'),
46 INSTR(userenv('LANGUAGE'),'.') +1),
47 'WE8ISO8859P1'
48 );
49
50 -- Global TYPES.
51 TYPE grt_trans_info IS RECORD (
52 item_type wf_items.item_type%TYPE,
53 item_key wf_items.item_key%TYPE,
54 actid NUMBER
55 );
56
57 TYPE grt_assignment_details IS RECORD (
58 assignment_id per_assignments_f.assignment_id%TYPE,
59 person_id per_people_f.person_id%TYPE,
60 person_full_name per_people_f.full_name%TYPE,
61 supervisor_id per_people_f.person_id%TYPE,
62 supervisor_full_name per_people_f.full_name%TYPE,
63 job_id per_jobs.job_id%TYPE,
64 job_name per_jobs.name%TYPE,
65 organization_id hr_organization_units.organization_id%TYPE,
66 organization_name hr_organization_units.name%TYPE,
67 assignment_number per_assignments_f.assignment_number%TYPE,
68 business_group_id per_assignments_f.business_group_id%TYPE,
69 effective_start_date per_assignments_f.effective_start_date%TYPE,
70 effective_end_date per_assignments_f.effective_end_date%TYPE,
71 payroll_id per_assignments_f.payroll_id%TYPE,
72 location_id per_assignments_f.location_id%TYPE,
73 primary_flag per_assignments_f.primary_flag%TYPE,
74 object_version_number per_assignments_f.object_version_number%TYPE
75 );
76
77
78 TYPE grt_person_details IS RECORD (
79 full_name per_people_f.full_name%TYPE,
80 business_group_id per_people_f.business_group_id%TYPE
81 );
82
83
84 TYPE grt_enter_process_checks IS RECORD (
85 hire_date VARCHAR2(10) DEFAULT 'N',
86 termination_date VARCHAR2(10) DEFAULT 'N',
87 future_assignment VARCHAR2(10) DEFAULT 'N',
88 pending_workflow VARCHAR2(10) DEFAULT 'N',
89 correction_mode VARCHAR2(10) DEFAULT 'N',
90 earlier_date VARCHAR2(10) DEFAULT 'N',
91 hire_date2 DATE DEFAULT NULL,
92 termination_date2 DATE DEFAULT NULL,
93 future_assignment_date DATE DEFAULT NULL
94 );
95
96 TYPE g_number_tbl_type
97 is table of number
98 index by binary_integer;
99
100 g_number_tbl_default g_number_tbl_type;
101
102 /*
103 ||===========================================================================
104 || PROCEDURE: remove_transaction
105 ||----------------------------------------------------------------------------
106 ||
107 || Description:
108 || This procedure removes transaction steps, transaction step values
109 || and transaction id on Cancel or Exit to Main Menu.
110 ||
111 || Pre-Conditions:
112 ||
113 || Input Parameters:
114 ||
115 || Output Parameters:
116 ||
117 || In out nocopy Parameters:
118 ||
119 || Post Success:
120 ||
121 ||
122 || Post Failure:
123 || Raise exception.
124 ||
125 || Access Status:
126 || Public
127 ||
128 ||=============================================================================
129 */
130 --
131 PROCEDURE remove_transaction(p_item_type in varchar2
132 ,p_item_key in varchar2
133 ,p_actid in number);
134 --
135 /*
139 ||
136 ||===========================================================================
137 || FUNCTION: get_language_code
138 ||---------------------------------------------------------------------------
140 || Description:
141 || This function returns the current language code.
142 || Example:- US - United States
143 || JP - Japan
144 || UK - United Kingdom
145 ||
146 || Pre Conditions:
147 ||
148 || In Arguments:
149 ||
150 || out nocopy Arguments:
151 ||
152 || In out nocopy Arguments:
153 ||
154 || Post Success:
155 || Returns the language code of this installation.
156 ||
157 || Post Failure:
158 || Prints the SQLEERM mesg.
159 ||
160 || Access Status:
161 || Public.
162 ||
163 ||===========================================================================
164 */
165 FUNCTION get_language_code
166 RETURN VARCHAR2;
167
168
169 /*
170 ||===========================================================================
171 || FUNCTION: get_image_directory
172 ||---------------------------------------------------------------------------
173 ||
174 || Description:
175 || This function returns the image directory.
176 || Example:- '/OA_MEDIA/US/'
177 ||
178 || Pre Conditions:
179 ||
180 || In Arguments:
181 ||
182 || out nocopy Arguments:
183 ||
184 || In out nocopy Arguments:
185 ||
186 || Post Success:
187 || Returns the image directory.
188 ||
189 || Post Failure:
190 || Prints the SQLEERM mesg.
191 ||
192 || Access Status:
193 || Public.
194 ||
195 ||===========================================================================
196 */
197 FUNCTION get_image_directory
198 RETURN VARCHAR2;
199
200 /*
201 ||===========================================================================
202 || FUNCTION: get_business_group_id
203 ||---------------------------------------------------------------------------
204 ||
205 || Description:
206 || This function is overloaded to get the business group id either from
207 || the logged in person or from the selected resposibility.
208 || Logged in Person - This function will return the business group of
209 || the logged in person.
210 || Responsibility - The Function call returns the Business Group ID
211 || for the current session's login responsibility.
212 || The defaulting levels are as defined in the
213 || package FND_PROFILE. It returns business group id
214 || value for a specific user/resp/appl combo.
215 || Default is user/resp/appl/site is current login.
216 ||
217 || Pre Conditions:
218 ||
219 || In Arguments:
220 || p_person_id -- Person ID for whom the business group is required.
221 ||
222 || out nocopy Arguments:
223 ||
224 || In out nocopy Arguments:
225 ||
226 || Post Success:
227 || Returns the business group id.
228 ||
229 || Post Failure:
230 ||
231 || Access Status:
232 || Public.
233 ||
234 ||===========================================================================
235 */
236 FUNCTION get_business_group_id (
237 p_person_id IN per_people_f.person_id%TYPE
238 )
239 RETURN per_business_groups.business_group_id%TYPE;
240
241 FUNCTION get_business_group_id
242 RETURN per_business_groups.business_group_id%TYPE;
243
244
245 /*
246 ||===========================================================================
247 || FUNCTION: get_legislation_code
248 ||---------------------------------------------------------------------------
249 ||
250 || Description:
251 || This function will return the legislation code of a person,
252 || an assignment, or of a business_group_id which ever is provided.
253 ||
254 || Pre Conditions:
255 ||
256 || In Arguments:
257 || p_person_id -- Legislation code based on this person id.
258 || p_assignment_id -- Legislation code based on this assignment id.
259 || p_business_group_id -- Legislation code based on this business group.
260 || p_effective_date -- The legislation code returned should be valid
261 || on this date.
262 ||
263 || out nocopy Arguments:
264 ||
265 || In out nocopy Arguments:
266 ||
267 || Post Success:
268 || Returns the legislation code.
269 ||
270 || Post Failure:
271 || Prints out nocopy error message.
272 ||
273 || Access Status:
274 || Public.
275 ||
276 ||===========================================================================
277 */
278 FUNCTION get_legislation_code (
279 p_person_id IN per_people_f.person_id%TYPE DEFAULT NULL,
280 p_assignment_id IN per_assignments_f.assignment_id%TYPE DEFAULT NULL,
281 p_business_group_id IN per_business_groups.business_group_id%TYPE
282 DEFAULT NULL,
283 p_effective_date IN DATE DEFAULT SYSDATE
284 )
285 RETURN per_business_groups.legislation_code%TYPE;
286
287
288 /*
289 ||===========================================================================
290 || FUNCTION: get_person_details
291 ||---------------------------------------------------------------------------
292 ||
293 || Description:
294 || This function will return details pertaining to the passed
295 || person ID. It will return a record structure.
296 ||
297 || Pre Conditions:
298 ||
299 || In Arguments:
300 || p_person_id -- Person ID for whom details are required.
301 ||
302 || out nocopy Arguments:
303 ||
304 || In out nocopy Arguments:
305 ||
306 || Post Success:
307 || Returns a record structure.
308 ||
309 || Post Failure:
310 ||
311 || Access Status:
312 || Public.
313 ||
314 ||===========================================================================
315 */
316 FUNCTION get_person_details (
317 p_person_id IN per_people_f.person_id%TYPE
318 )
319 RETURN hr_misc_web.grt_person_details;
320
321
322
323 /*
324 ||===========================================================================
325 || FUNCTION: get_sshr_segment_value
326 ||---------------------------------------------------------------------------
327 ||
328 || Description:
329 || This function returns the segment value of the given segment name
330 || from the context "Self Service HR Information" of Org DDF.
331 ||
332 || Pre Conditions:
333 ||
334 || In Arguments:
335 || p_bg_id -- Business Group Id.
336 || p_user_column_name -- Segment Name in "Self Service HR Information"
337 || context
338 ||
339 || out nocopy Arguments: Segment value of the give Segment Name.
340 ||
341 || In out nocopy Arguments:
342 ||
343 || Post Success:
344 || Returns a record structure.
345 ||
346 || Post Failure:
347 ||
348 || Access Status:
349 || Public.
350 ||
351 ||===========================================================================
352 */
353
354 FUNCTION get_sshr_segment_value
355 ( p_bg_id IN per_all_people_f.business_group_id%TYPE DEFAULT NULL,
356 p_user_column_name IN varchar2 )
357 RETURN VARCHAR2;
358
359
360
361 /*
362 ||===========================================================================
363 || FUNCTION: get_user_defined_job_segments
364 ||---------------------------------------------------------------------------
365 ||
366 || Description:
367 || Derive the Job Name from the segment string passed as input.
368 ||
369 || Pre Conditions:
370 ||
371 || In Arguments:
372 || p_job_segments - User defined Segment string.
373 || p_job_name - Job Name from per_jobs.
374 || p_job_id - Job Id from per_jobs.
375 ||
376 || out nocopy Arguments: Derived string.
377 ||
378 || In out nocopy Arguments:
379 ||
380 || Post Success:
381 || Returns a record structure.
382 ||
383 || Post Failure:
384 ||
385 || Access Status:
386 || Public.
387 ||
388 ||===========================================================================
389 */
390
391
392 FUNCTION get_user_defined_job_segments
393 ( p_job_segments IN varchar2 DEFAULT NULL,
394 p_job_name IN per_jobs.name%TYPE DEFAULT NULL,
395 p_job_id IN per_jobs.job_id%TYPE DEFAULT NULL)
396 RETURN VARCHAR2;
397
398
399 /*
400 --===========================================================================
401 --|| PROCEDURE: get_job_segments
402 --||-------------------------------------------------------------------------
403 --||
404 --|| Description:
405 --|| Utility method used in V4 to get User Defined Job Segments.
406 --||
407 --||
408 --|| Pre-Conditions: See the context "SSHR Information" is added
409 --|| and the segment "Display MEE Job Segments" if want any
410 --|| configuration.
411 --||
412 --|| Input Parameters: p_bg_id, job_name, job_id
413 --||
414 --|| Output Parameters: derived Job Name
415 --||
416 --|| In Out Parameters:
417 --||
418 --|| Post Success:
419 --||
420 --|| Post Failure:
421 --|| Raise exception.
422 --||
423 --|| Access Status:
424 --|| Public
425 --||
426 --||==========================================================================
427 */
428
429
430 FUNCTION get_job_segments
431 ( p_bg_id IN per_all_people_f.business_group_id%TYPE,
432 p_job_id IN hr_organization_units.organization_id%TYPE,
433 p_job_name IN hr_organization_units.name%TYPE)
434 RETURN VARCHAR2;
435
436
437
438 /*
439 ||===========================================================================
440 || FUNCTION: get_assignment_details
441 ||---------------------------------------------------------------------------
442 ||
443 || Description:
444 || This function will return details pertaining to the passed
445 || assignment ID. It will return a record structure.
446 ||
447 || Pre Conditions:
448 ||
449 || In Arguments:
450 || p_assignment_id -- Returns deatails of this assignment ID.
451 || p_effective_date -- Assignment that is effective on this date.
452 ||
453 || out nocopy Arguments:
454 ||
455 || In out nocopy Arguments:
456 ||
457 || Post Success:
458 || Returns grt_assignment_details record structure.
459 ||
460 || Post Failure:
461 ||
462 || Access Status:
463 || Public.
464 ||
468 p_assignment_id IN per_assignments_f.assignment_id%TYPE,
465 ||===========================================================================
466 */
467 FUNCTION get_assignment_details (
469 p_effective_date IN DATE
470 )
471 RETURN hr_misc_web.grt_assignment_details;
472
473
474 /*
475 ||===========================================================================
476 || FUNCTION: get_assignment_id
477 ||---------------------------------------------------------------------------
478 ||
479 || Description:
480 || This function will return the grt_assignment_details structure
481 || which will have the current assignment id, effective start date
482 || of the person based on the person id.
483 ||
484 || Pre Conditions:
485 ||
486 || In Arguments:
487 || p_person_id -- Returns assignment id of this person id.
488 ||
489 || out nocopy Arguments:
490 ||
491 || In out nocopy Arguments:
492 ||
493 || Post Success:
494 || Returns grt_assignment_details structure.
495 ||
496 || Post Failure:
497 ||
498 || Access Status:
499 || Public.
500 ||
501 ||===========================================================================
502 */
503 FUNCTION get_assignment_id (
504 p_person_id IN per_people_f.person_id%TYPE
505 )
506 RETURN hr_misc_web.grt_assignment_details;
507
508 /*
509 ||===========================================================================
510 || FUNCTION: get_assignment_id
511 ||---------------------------------------------------------------------------
512 ||
513 || Description:
514 || Gets a lookup code meaning from HR_LOOKUPS table for
515 || a given lookup code and type and date.
516 ||
517 || Pre Conditions:
518 ||
519 || In Arguments:
520 || p_proposal_code -- Lookup_code in HR_LOOKUPS
521 || p_lookup_type -- lookup type in HR_LOOKUPS
522 || p_date -- effective_date
523 ||
524 || out nocopy Arguments:
525 ||
526 || In out nocopy Arguments:
527 ||
528 || Post Success:
529 || Returns assignment id.
530 ||
531 || Post Failure:
532 ||
533 || Access Status:
534 || Public.
535 ||
536 ||===========================================================================
537 */
538 FUNCTION get_lookup_meaning (
539 p_code IN VARCHAR2,
540 p_lookup_type IN VARCHAR2,
541 p_date IN DATE
542 )
543 RETURN VARCHAR2;
544
545
546 /*
547 ||===========================================================================
548 || FUNCTION: get_enter_process_checks
549 ||---------------------------------------------------------------------------
550 ||
551 || Description:
552 || This function will return a record which will contain the data to
553 || do the required error checking before launching a module from the
554 || effective date dialog box.
555 ||
556 || Pre Conditions:
557 || None
558 ||
559 || In Arguments:
560 || p_assignment_id -- Assignment ID to get the dates
561 || p_effective_date -- To get future date transactions based on
562 || this date.
563 || p_enter_process_checks -- Structure which will hold all the required
564 || checks.
565 ||
566 || out nocopy Arguments:
567 ||
568 || In out nocopy Arguments:
569 ||
570 || Post Success:
571 || Returs grt_enter_process_checks structure.
572 ||
573 || Post Failure:
574 || Throws exception.
575 ||
576 || Access Status:
577 || Public.
578 ||
579 ||===========================================================================
580 */
581 FUNCTION get_enter_process_checks (
582 p_assignment_id IN NUMBER DEFAULT NULL,
583 p_effective_date IN DATE DEFAULT NULL,
584 p_enter_process_checks IN hr_misc_web.grt_enter_process_checks DEFAULT NULL
585 )
586 RETURN hr_misc_web.grt_enter_process_checks;
587
588
589 END hr_misc_web;