33: -- Private user-defined types.
34: --
35:
36: -- Used for populating Plan Population
37: TYPE g_qual_pop_r IS RECORD (assignment_id per_all_assignments_f.assignment_id%TYPE,
38: person_id per_all_assignments_f.person_id%TYPE,
39: business_group_id per_all_assignments_f.business_group_id%TYPE,
40: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
41: supervisor_assignment_id per_all_assignments_f.supervisor_assignment_id%TYPE,
34: --
35:
36: -- Used for populating Plan Population
37: TYPE g_qual_pop_r IS RECORD (assignment_id per_all_assignments_f.assignment_id%TYPE,
38: person_id per_all_assignments_f.person_id%TYPE,
39: business_group_id per_all_assignments_f.business_group_id%TYPE,
40: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
41: supervisor_assignment_id per_all_assignments_f.supervisor_assignment_id%TYPE,
42: organization_id per_all_assignments_f.organization_id%TYPE,
35:
36: -- Used for populating Plan Population
37: TYPE g_qual_pop_r IS RECORD (assignment_id per_all_assignments_f.assignment_id%TYPE,
38: person_id per_all_assignments_f.person_id%TYPE,
39: business_group_id per_all_assignments_f.business_group_id%TYPE,
40: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
41: supervisor_assignment_id per_all_assignments_f.supervisor_assignment_id%TYPE,
42: organization_id per_all_assignments_f.organization_id%TYPE,
43: position_id per_all_assignments_f.position_id%TYPE);
36: -- Used for populating Plan Population
37: TYPE g_qual_pop_r IS RECORD (assignment_id per_all_assignments_f.assignment_id%TYPE,
38: person_id per_all_assignments_f.person_id%TYPE,
39: business_group_id per_all_assignments_f.business_group_id%TYPE,
40: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
41: supervisor_assignment_id per_all_assignments_f.supervisor_assignment_id%TYPE,
42: organization_id per_all_assignments_f.organization_id%TYPE,
43: position_id per_all_assignments_f.position_id%TYPE);
44: TYPE g_qual_pop_t IS TABLE OF g_qual_pop_r INDEX BY binary_integer;
37: TYPE g_qual_pop_r IS RECORD (assignment_id per_all_assignments_f.assignment_id%TYPE,
38: person_id per_all_assignments_f.person_id%TYPE,
39: business_group_id per_all_assignments_f.business_group_id%TYPE,
40: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
41: supervisor_assignment_id per_all_assignments_f.supervisor_assignment_id%TYPE,
42: organization_id per_all_assignments_f.organization_id%TYPE,
43: position_id per_all_assignments_f.position_id%TYPE);
44: TYPE g_qual_pop_t IS TABLE OF g_qual_pop_r INDEX BY binary_integer;
45: g_qual_pop_tbl g_qual_pop_t;
38: person_id per_all_assignments_f.person_id%TYPE,
39: business_group_id per_all_assignments_f.business_group_id%TYPE,
40: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
41: supervisor_assignment_id per_all_assignments_f.supervisor_assignment_id%TYPE,
42: organization_id per_all_assignments_f.organization_id%TYPE,
43: position_id per_all_assignments_f.position_id%TYPE);
44: TYPE g_qual_pop_t IS TABLE OF g_qual_pop_r INDEX BY binary_integer;
45: g_qual_pop_tbl g_qual_pop_t;
46:
39: business_group_id per_all_assignments_f.business_group_id%TYPE,
40: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
41: supervisor_assignment_id per_all_assignments_f.supervisor_assignment_id%TYPE,
42: organization_id per_all_assignments_f.organization_id%TYPE,
43: position_id per_all_assignments_f.position_id%TYPE);
44: TYPE g_qual_pop_t IS TABLE OF g_qual_pop_r INDEX BY binary_integer;
45: g_qual_pop_tbl g_qual_pop_t;
46:
47: -- Used for populating existing scorecard population
112: person_id per_personal_scorecards.person_id%TYPE,
113: scorecard_name per_personal_scorecards.scorecard_name%TYPE);
114:
115: TYPE assignment_info is RECORD (
116: assignment_id per_all_assignments_f.assignment_id%TYPE,
117: business_group_id per_all_assignments_f.business_group_id%TYPE,
118: grade_id per_all_assignments_f.grade_id%TYPE,
119: position_id per_all_assignments_f.position_id%TYPE,
120: job_id per_all_assignments_f.job_id%TYPE,
113: scorecard_name per_personal_scorecards.scorecard_name%TYPE);
114:
115: TYPE assignment_info is RECORD (
116: assignment_id per_all_assignments_f.assignment_id%TYPE,
117: business_group_id per_all_assignments_f.business_group_id%TYPE,
118: grade_id per_all_assignments_f.grade_id%TYPE,
119: position_id per_all_assignments_f.position_id%TYPE,
120: job_id per_all_assignments_f.job_id%TYPE,
121: org_id per_all_assignments_f.organization_id%TYPE,
114:
115: TYPE assignment_info is RECORD (
116: assignment_id per_all_assignments_f.assignment_id%TYPE,
117: business_group_id per_all_assignments_f.business_group_id%TYPE,
118: grade_id per_all_assignments_f.grade_id%TYPE,
119: position_id per_all_assignments_f.position_id%TYPE,
120: job_id per_all_assignments_f.job_id%TYPE,
121: org_id per_all_assignments_f.organization_id%TYPE,
122: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
115: TYPE assignment_info is RECORD (
116: assignment_id per_all_assignments_f.assignment_id%TYPE,
117: business_group_id per_all_assignments_f.business_group_id%TYPE,
118: grade_id per_all_assignments_f.grade_id%TYPE,
119: position_id per_all_assignments_f.position_id%TYPE,
120: job_id per_all_assignments_f.job_id%TYPE,
121: org_id per_all_assignments_f.organization_id%TYPE,
122: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
123: effective_state_date per_all_assignments_f.effective_start_date%TYPE
116: assignment_id per_all_assignments_f.assignment_id%TYPE,
117: business_group_id per_all_assignments_f.business_group_id%TYPE,
118: grade_id per_all_assignments_f.grade_id%TYPE,
119: position_id per_all_assignments_f.position_id%TYPE,
120: job_id per_all_assignments_f.job_id%TYPE,
121: org_id per_all_assignments_f.organization_id%TYPE,
122: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
123: effective_state_date per_all_assignments_f.effective_start_date%TYPE
124: );
117: business_group_id per_all_assignments_f.business_group_id%TYPE,
118: grade_id per_all_assignments_f.grade_id%TYPE,
119: position_id per_all_assignments_f.position_id%TYPE,
120: job_id per_all_assignments_f.job_id%TYPE,
121: org_id per_all_assignments_f.organization_id%TYPE,
122: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
123: effective_state_date per_all_assignments_f.effective_start_date%TYPE
124: );
125:
118: grade_id per_all_assignments_f.grade_id%TYPE,
119: position_id per_all_assignments_f.position_id%TYPE,
120: job_id per_all_assignments_f.job_id%TYPE,
121: org_id per_all_assignments_f.organization_id%TYPE,
122: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
123: effective_state_date per_all_assignments_f.effective_start_date%TYPE
124: );
125:
126: TYPE appraisal_templ_info is RECORD (
119: position_id per_all_assignments_f.position_id%TYPE,
120: job_id per_all_assignments_f.job_id%TYPE,
121: org_id per_all_assignments_f.organization_id%TYPE,
122: supervisor_id per_all_assignments_f.supervisor_id%TYPE,
123: effective_state_date per_all_assignments_f.effective_start_date%TYPE
124: );
125:
126: TYPE appraisal_templ_info is RECORD (
127: appraisal_template_id per_appraisal_templates.appraisal_template_id%TYPE,
448: CURSOR csr_sup_hier_pop IS
449: select * from
450: ( SELECT asg.assignment_id, asg.person_id, asg.business_group_id,
451: asg.supervisor_id, asg.supervisor_assignment_id, asg.organization_id, asg.position_id
452: FROM per_all_assignments_f asg
453: WHERE ((p_plan_rec.assignment_types_code in ('E', 'C')
454: and asg.assignment_type = p_plan_rec.assignment_types_code) OR
455: (p_plan_rec.assignment_types_code = 'EC'
456: and asg.assignment_type IN ('E', 'C')))
477: CURSOR csr_sup_asg_hier_pop IS
478: SELECT * from
479: (SELECT asg.assignment_id, asg.person_id, asg.business_group_id, asg.supervisor_id,
480: asg.supervisor_assignment_id, asg.organization_id, asg.position_id
481: FROM per_all_assignments_f asg
482: WHERE ((p_plan_rec.assignment_types_code in ('E', 'C')
483: and asg.assignment_type = p_plan_rec.assignment_types_code) OR
484: (p_plan_rec.assignment_types_code = 'EC'
485: and asg.assignment_type IN ('E', 'C')))
503: --
504: CURSOR csr_org_hier_pop IS
505: SELECT asg.assignment_id, asg.person_id, asg.business_group_id, asg.supervisor_id,
506: asg.supervisor_assignment_id, asg.organization_id, asg.position_id
507: FROM per_all_assignments_f asg
508: WHERE ((p_plan_rec.assignment_types_code in ('E', 'C')
509: and asg.assignment_type = 'E') OR
510: (p_plan_rec.assignment_types_code = 'EC'
511: and asg.assignment_type IN ('E', 'C')))
541: --
542: CURSOR csr_pos_hier_pop IS
543: SELECT asg.assignment_id, asg.person_id, asg.business_group_id, asg.supervisor_id,
544: asg.supervisor_assignment_id, asg.organization_id, asg.position_id
545: FROM per_all_assignments_f asg
546: WHERE ((p_plan_rec.assignment_types_code in ('E', 'C')
547: and asg.assignment_type = p_plan_rec.assignment_types_code) OR
548: (p_plan_rec.assignment_types_code = 'EC'
549: and asg.assignment_type IN ('E', 'C')))
2220: IS
2221: SELECT scorecard_id, assignment_id, person_id, scorecard_name FROM per_personal_scorecards
2222: WHERE scorecard_id = p_scorecard_id;
2223:
2224: cursor get_assignment_info(p_assignment_id per_all_assignments_f.assignment_id%TYPE)
2225: IS
2226: SELECT assignment_id, business_group_id, grade_id, position_id, job_id, organization_id, supervisor_id, effective_start_date
2227: FROM per_all_assignments_f
2228: WHERE assignment_id = p_assignment_id
2223:
2224: cursor get_assignment_info(p_assignment_id per_all_assignments_f.assignment_id%TYPE)
2225: IS
2226: SELECT assignment_id, business_group_id, grade_id, position_id, job_id, organization_id, supervisor_id, effective_start_date
2227: FROM per_all_assignments_f
2228: WHERE assignment_id = p_assignment_id
2229: and trunc(sysdate) between effective_start_date and effective_end_date;
2230:
2231: cursor get_appraisal_templ_info (p_appraisal_templ_id per_appraisals.appraisal_template_id%TYPE)
5032: paa.person_id,
5033: paa.ORGANIZATION_ID,
5034: paa.SUPERVISOR_ID
5035: from
5036: per_all_assignments_f paa
5037: where
5038: ( trunc(sysdate) between paa.effective_start_date and paa.effective_end_date)
5039: and paa.person_id = p_supervisor_id
5040: and paa.PRIMARY_FLAG = 'Y';
6177: AND p_effective_date BETWEEN task_start_date AND task_end_date;
6178: l_appraisals_in_progress VARCHAR2(1) := 'N';
6179: l_sc_dtls VARCHAR2(500);
6180: l_scorecard_status_code VARCHAR2(30);
6181: --Bug7567079 l_sup_id per_all_assignments_f.supervisor_id%type default null;
6182: BEGIN
6183: OPEN csr_appr_in_progress(p_plan_id,p_effective_date);
6184: FETCH csr_appr_in_progress INTO l_appraisals_in_progress;
6185: CLOSE csr_appr_in_progress;
6273: FROM per_objectives
6274: WHERE scorecard_id = p_scorecard_id
6275: AND copied_from_library_id = p_library_id;
6276: l_sc_dup_obj VARCHAR2(1);
6277: l_sup_id per_all_assignments_f.supervisor_id%type default null;
6278: BEGIN
6279: IF (g_plan_dtls(1).automatic_allocation_flag = 'Y') THEN
6280: populate_qual_objectives(g_plan_dtls(1).start_date,
6281: g_plan_dtls(1).end_date);
6605: dbms_output.put_line(SubStr('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM, 1, 255));
6606: err_msg := SubStr('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM, 1, 255);
6607: end send_message_notification;
6608:
6609: function get_manager_id ( p_person_id in per_all_assignments_f.person_id%type, p_assignment_id per_all_assignments_f.assignment_id%type)
6610: return number
6611: is
6612:
6613: cursor get_supervisor_id(person_id per_all_people_f.person_id%TYPE)
6611: is
6612:
6613: cursor get_supervisor_id(person_id per_all_people_f.person_id%TYPE)
6614: is
6615: select supervisor_id from per_all_assignments_f
6616: where person_id=p_person_id
6617: and trunc(sysdate) between effective_start_date and effective_end_date
6618: and primary_flag = 'Y';
6619:
6617: and trunc(sysdate) between effective_start_date and effective_end_date
6618: and primary_flag = 'Y';
6619:
6620:
6621: l_super_visor_id per_all_assignments_f.supervisor_id%type;
6622: l_role wf_local_roles.name%TYPE default null;
6623: begin
6624:
6625: open get_supervisor_id(p_person_id);