DBA Data[Home] [Help]

APPS.HRHIRAPL SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 16

                                 ,p_update_primary_flag VARCHAR2
                                 ,p_employee_number VARCHAR2
                                 ,p_set_of_books_id IN INTEGER
                                 ,p_emp_apl VARCHAR2
                                 ,p_adjusted_svc_date IN DATE
                                 ,p_session_date IN DATE -- Bug 3564129
                                 -- #2264569
                                 ,p_table IN HR_EMPLOYEE_APPLICANT_API.t_ApplTable
                                 ) IS
/*
  NAME
    employ_applicant
  DESCRIPTION
    Procedures fired when applicant is hired.
    PARAMETERS
    p_business_group_id   : Current business group.
    p_legislation_code    : Legislation code.
    p_new_primary_id      : Id of new primary assignment.
    p_assignment_status_type_id: Current assignment status id.
    p_user_id             : user id
    p_login_id            : Login id of user.
    p_start_date          : Start date.
    p_end_of_time         : Maximum date that can be held by an Oracle system.
    p_current_date        : Today's Date
    p_update_primary_flag : Flag whether to update the primary assignment or not
    p_set_of_books_id : Current set of books_id
    p_emp_apl             : Whether EMP_APL or APL.
    p_session_date        : Session Date -- Bug 3564129
    -- #2264569
    p_table               : PL/SQL table that has information about the type of
                            processing performed to the appl assignment.

*/
--
v_period_of_service_id INTEGER;
Line: 55

l_delete_warn boolean;  -- #2933750
Line: 58

     select segment1,
            segment2,
            segment3,
            segment4,
            segment5,
            segment6,
            segment7,
            segment8,
            segment9,
            segment10,
            segment11,
            segment12,
            segment13,
            segment14,
            segment15,
            segment16,
            segment17,
            segment18,
            segment19,
            segment20,
            segment21,
            segment22,
            segment23,
            segment24,
            segment25,
            segment26,
            segment27,
            segment28,
            segment29,
            segment30
     from   pay_people_groups
     where  people_group_id = l_pg_id;
Line: 165

      select pps.period_of_service_id
      into   v_dummy
      from   per_periods_of_service pps
      where  p_start_date between pps.date_start
      and    nvl(pps.ACTUAL_TERMINATION_DATE,p_end_of_time)
      and    pps.person_id = p_person_id
      and    pps.business_group_id  + 0 = p_business_group_id;
Line: 185

     select per_periods_of_service_s.nextval
     into   v_dummy
     from   sys.dual;
Line: 199

       insert into per_periods_of_service
       (period_of_service_id
        ,business_group_id
        ,person_id
        ,date_start
        ,last_update_date
        ,last_update_login
        ,last_updated_by
        ,created_by
        ,creation_date
        ,adjusted_svc_date)
        values
        (v_dummy
        ,p_business_group_id
        ,p_person_id
        ,p_start_date
        ,null
        ,null
        ,null
        ,null
        ,null
        ,p_adjusted_svc_date
);
Line: 250

                     ,p_event          => 'INSERTING'
                     ,p_effective_date => p_start_date);
Line: 264

PROCEDURE update_primary_assignment(p_business_group_id IN INTEGER
                                   ,p_person_id IN INTEGER
                                   ,p_start_date IN DATE
                                   ,p_current_date IN DATE
                                   ,p_user_id IN INTEGER
                                   ,p_login_id IN INTEGER
                                   ) is
--
-- Date effectively end the current primary assignment
--
--
begin
--
  hr_utility.set_location('hr_person.update_primary_assignment',1);
Line: 279

insert into per_assignments_f
(assignment_id
,effective_start_date
,effective_end_date
,business_group_id
,grade_id
,position_id
,job_id
,assignment_status_type_id
,payroll_id
,location_id
,person_id
,organization_id
,people_group_id
,soft_coding_keyflex_id
,vacancy_id
,assignment_sequence
,assignment_type
,manager_flag
,primary_flag
,application_id
,assignment_number
,change_reason
,comment_id
,date_probation_end
,default_code_comb_id
,frequency
,internal_address_line
,normal_hours
,period_of_service_id
,probation_period
,probation_unit
,recruiter_id
,set_of_books_id
,special_ceiling_step_id
,supervisor_id
,time_normal_finish
,time_normal_start
,request_id
,program_application_id
,program_id
,program_update_date
,ass_attribute_category
,ass_attribute1
,ass_attribute2
,ass_attribute3
,ass_attribute4
,ass_attribute5
,ass_attribute6
,ass_attribute7
,ass_attribute8
,ass_attribute9
,ass_attribute10
,ass_attribute11
,ass_attribute12
,ass_attribute13
,ass_attribute14
,ass_attribute15
,ass_attribute16
,ass_attribute17
,ass_attribute18
,ass_attribute19
,ass_attribute20
,ass_attribute21
,ass_attribute22
,ass_attribute23
,ass_attribute24
,ass_attribute25
,ass_attribute26
,ass_attribute27
,ass_attribute28
,ass_attribute29
,ass_attribute30
,last_update_date
,last_updated_by
,last_update_login
,created_by
,creation_date
,pay_basis_id
,person_referred_by_id
,recruitment_activity_id
,source_organization_id
,source_type
,employment_category            /* columns added Bug 978981 */
,perf_review_period
,perf_review_period_frequency
,sal_review_period
,sal_review_period_frequency
,bargaining_unit_code
,labour_union_member_flag
,hourly_salaried_code
,title
,supervisor_assignment_id   --- #Added for fix of 4053244
,EMPLOYEE_CATEGORY          -- Added for fix of 4212826
,COLLECTIVE_AGREEMENT_ID
,CAGR_ID_FLEX_NUM
,CAGR_GRADE_DEF_ID
,GRADE_LADDER_PGM_ID)
select pa.assignment_id
,pa.effective_start_date
,p_start_date - 1
,pa.business_group_id
,pa.grade_id
,pa.position_id
,pa.job_id
,pa.assignment_status_type_id
,pa.payroll_id
,pa.location_id
,pa.person_id
,pa.organization_id
,pa.people_group_id
,pa.soft_coding_keyflex_id
,pa.vacancy_id
,pa.assignment_sequence
,pa.assignment_type
,pa.manager_flag
,pa.primary_flag
,pa.application_id
,pa.assignment_number
,pa.change_reason
,pa.comment_id
,pa.date_probation_end
,pa.default_code_comb_id
,pa.frequency
,pa.internal_address_line
,pa.normal_hours
,pa.period_of_service_id
,pa.probation_period
,pa.probation_unit
,pa.recruiter_id
,pa.set_of_books_id
,pa.special_ceiling_step_id
,pa.supervisor_id
,pa.time_normal_finish
,pa.time_normal_start
,pa.request_id
,pa.program_application_id
,pa.program_id
,pa.program_update_date
,pa.ass_attribute_category
,pa.ass_attribute1
,pa.ass_attribute2
,pa.ass_attribute3
,pa.ass_attribute4
,pa.ass_attribute5
,pa.ass_attribute6
,pa.ass_attribute7
,pa.ass_attribute8
,pa.ass_attribute9
,pa.ass_attribute10
,pa.ass_attribute11
,pa.ass_attribute12
,pa.ass_attribute13
,pa.ass_attribute14
,pa.ass_attribute15
,pa.ass_attribute16
,pa.ass_attribute17
,pa.ass_attribute18
,pa.ass_attribute19
,pa.ass_attribute20
,pa.ass_attribute21
,pa.ass_attribute22
,pa.ass_attribute23
,pa.ass_attribute24
,pa.ass_attribute25
,pa.ass_attribute26
,pa.ass_attribute27
,pa.ass_attribute28
,pa.ass_attribute29
,pa.ass_attribute30
,p_current_date
,p_user_id
,p_login_id
,pa.created_by
,pa.creation_date
,pa.pay_basis_id
,pa.person_referred_by_id
,pa.recruitment_activity_id
,pa.source_organization_id
,pa.source_type
,employment_category            /* columns added Bug 978981 */
,perf_review_period
,perf_review_period_frequency
,sal_review_period
,sal_review_period_frequency
,bargaining_unit_code
,labour_union_member_flag
,hourly_salaried_code
,title
,pa.supervisor_assignment_id     --- #Added for fix of 4053244
,pa.EMPLOYEE_CATEGORY            -- Added for fix of 4212826
,pa.COLLECTIVE_AGREEMENT_ID
,pa.CAGR_ID_FLEX_NUM
,pa.CAGR_GRADE_DEF_ID
,pa.GRADE_LADDER_PGM_ID -- fix of bug 5513751
from per_assignments_f pa
where pa.person_id = p_person_id
and   pa.business_group_id + 0 = p_business_group_id
and   pa.primary_flag = 'Y'
and   p_start_date between pa.effective_start_date
and   pa.effective_end_date
and   p_start_date > pa.effective_start_date; -- #1981550
Line: 493

end update_primary_assignment;
Line: 501

                        ,p_update_primary_flag IN VARCHAR2
                        ,p_new_primary_id IN INTEGER
                        ,p_user_id IN INTEGER
                        ,p_login_id IN INTEGER
                        ,p_start_date IN DATE
                        ,p_end_of_time IN DATE
                        ,p_employee_number IN VARCHAR2
                        ,p_set_of_books_id IN INTEGER
                        ,p_current_date IN DATE
                        ) is
--
-- Make other accepted assignment rows secondary
-- as long as the user does not want to keep them in the system
-- i.e. (R)etain value exists in p_table
--
-- counter to hold number of assignments inserted
-- used to check that all are updated.
v_count INTEGER;
Line: 537

select default_context_field_name
from fnd_descriptive_flexs
where application_id = 800 -- bug 5469726
and descriptive_flexfield_name = 'PER_ASSIGNMENTS';
Line: 547

     select pa.*
      from  per_assignments_f pa
      ,     per_assignment_status_types past
      where nvl(past.business_group_id,p_business_group_id) = pa.business_group_id + 0
      and   nvl(past.legislation_code, p_legislation_code)
                   = p_legislation_code
      and  past.per_system_status   = 'ACCEPTED'
      and    pa.assignment_type     = 'A'
      and    pa.business_group_id   + 0 = p_business_group_id
      and    pa.person_id           = p_person_id
      and    past.assignment_status_type_id = pa.assignment_status_type_id
           and  ((p_update_primary_flag in ('Y','V')
      	          and pa.assignment_id <> p_new_primary_id
                  )
      	or (p_update_primary_flag not in ('Y','V')
           )
      	)
           and   p_start_date between pa.effective_start_date
           and   pa.effective_end_date
           order by decode(pa.assignment_id,p_new_primary_id,1,0) desc --added for bug  5589928
           for update of pa.assignment_status_type_id;
Line: 572

     select pa.*
      from  per_assignments_f pa
      ,     per_assignment_status_types past
      where nvl(past.business_group_id,p_business_group_id) = pa.business_group_id + 0
      and   nvl(past.legislation_code, p_legislation_code)
                   = p_legislation_code
      and  past.per_system_status   = 'ACCEPTED'
      and    pa.assignment_type     = 'A'
      and    pa.business_group_id   + 0 = p_business_group_id
      and    pa.person_id           = p_person_id
      and    past.assignment_status_type_id = pa.assignment_status_type_id
           and  ((p_update_primary_flag in ('Y','V')
      	          and pa.assignment_id <> p_new_primary_id
                  )
      	or (p_update_primary_flag not in ('Y','V')
           )
      	)
           and   p_start_date between pa.effective_start_date
           and   pa.effective_end_date
           and   pa.assignment_id = p_new_primary_id
           for update of pa.assignment_status_type_id;
Line: 596

     select pa.*
      from  per_assignments_f pa
      ,     per_assignment_status_types past
      where nvl(past.business_group_id,p_business_group_id) = pa.business_group_id + 0
      and   nvl(past.legislation_code, p_legislation_code)
                   = p_legislation_code
      and  past.per_system_status   = 'ACCEPTED'
      and    pa.assignment_type     = 'A'
      and    pa.business_group_id   + 0 = p_business_group_id
      and    pa.person_id           = p_person_id
      and    past.assignment_status_type_id = pa.assignment_status_type_id
           and  ((p_update_primary_flag in ('Y','V')
      	          and pa.assignment_id <> p_new_primary_id
                  )
      	or (p_update_primary_flag not in ('Y','V')
           )
      	)
           and   p_start_date between pa.effective_start_date
           and   pa.effective_end_date
           and   pa.assignment_id <> p_new_primary_id
           for update of pa.assignment_status_type_id;
Line: 661

  select application_column_name
  from   fnd_descr_flex_column_usages fdfcu,
         fnd_descr_flex_contexts fdfc
  where  fdfcu.descriptive_flexfield_name = 'PER_ASSIGNMENTS'
  and    fdfcu.descriptive_flexfield_name = fdfc.descriptive_flexfield_name
  and    fdfcu.descriptive_flex_context_code = fdfc.descriptive_flex_context_code
  and    fdfcu.application_id = fdfc.application_id --- bug 5469726
  and    fdfc.application_id = 800 --- bug 5469726
  and    fdfc.global_flag 		= 'N'
  and    l_col_name 			= 'ASSIGNMENT_TYPE';
Line: 676

    select pay_proposal_id,object_version_number,proposed_salary_n, change_date
    from per_pay_proposals
    where assignment_id=ass_id
    and   approved = 'N'
    order by change_date desc;
Line: 714

      update per_applications pap
      set date_end = p_start_date -1,
          successful_flag = 'Y'
      where pap.person_id = p_person_id -- added for bug 5469726
      and   exists (select '1'
      from per_assignments_f pa,
      per_assignment_status_types past
      where nvl(past.business_group_id,p_business_group_id) = pa.business_group_id + 0
      and   nvl(past.legislation_code, p_legislation_code)
                   = p_legislation_code
      and  past.per_system_status   = 'ACCEPTED'
      and    pa.assignment_type     = 'A'
      and    pa.business_group_id   + 0 = p_business_group_id
      and    pa.person_id           = p_person_id
      and    pa.person_id           = pap.person_id
      and    past.assignment_status_type_id = pa.assignment_status_type_id
      and   p_start_date between pap.date_received and nvl(pap.date_end,p_start_date)
      and   p_start_date between pa.effective_start_date
      and   pa.effective_end_date)
      and not  exists (select '1'
      from per_assignments_f pa,
           per_assignment_status_types past
      where nvl(past.business_group_id,p_business_group_id) = pa.business_group_id + 0
      and   nvl(past.legislation_code, p_legislation_code)
                   = p_legislation_code
      and  past.per_system_status  <> 'ACCEPTED'
      and  pa.assignment_type     = 'A'
      and  pa.business_group_id   + 0 = p_business_group_id
      and  pa.person_id           = p_person_id
      and  pa.person_id           = pap.person_id
      and  past.assignment_status_type_id = pa.assignment_status_type_id
      and  p_start_date between pa.effective_start_date
      and  pa.effective_end_date);
Line: 770

hr_utility.set_location('p_update_primary_flag  '||p_update_primary_flag,2);
Line: 771

if p_update_primary_flag not in ('C','N') then commented for bug  5589928*/

  open ass_cur;
Line: 794

        insert into per_assignments_f
        (assignment_id
        ,effective_start_date
        ,effective_end_date
        ,business_group_id
        ,grade_id
        ,position_id
        ,job_id
        ,assignment_status_type_id
        ,payroll_id
        ,location_id
        ,person_id
        ,organization_id
        ,people_group_id
        ,soft_coding_keyflex_id
        ,vacancy_id
        ,assignment_sequence
        ,assignment_type
        ,manager_flag
        ,primary_flag
        ,application_id
        ,assignment_number
        ,change_reason
        ,comment_id
        ,date_probation_end
        ,default_code_comb_id
        ,frequency
        ,internal_address_line
        ,normal_hours
        ,period_of_service_id
        ,probation_period
        ,probation_unit
        ,recruiter_id
        ,set_of_books_id
        ,special_ceiling_step_id
        ,supervisor_id
        ,time_normal_finish
        ,time_normal_start
        ,request_id
        ,program_application_id
        ,program_id
        ,program_update_date
        ,ass_attribute_category
        ,ass_attribute1
        ,ass_attribute2
        ,ass_attribute3
        ,ass_attribute4
        ,ass_attribute5
        ,ass_attribute6
        ,ass_attribute7
        ,ass_attribute8
        ,ass_attribute9
        ,ass_attribute10
        ,ass_attribute11
        ,ass_attribute12
        ,ass_attribute13
        ,ass_attribute14
        ,ass_attribute15
        ,ass_attribute16
        ,ass_attribute17
        ,ass_attribute18
        ,ass_attribute19
        ,ass_attribute20
        ,ass_attribute21
        ,ass_attribute22
        ,ass_attribute23
        ,ass_attribute24
        ,ass_attribute25
        ,ass_attribute26
        ,ass_attribute27
        ,ass_attribute28
        ,ass_attribute29
        ,ass_attribute30
        ,last_update_date
        ,last_updated_by
        ,last_update_login
        ,created_by
        ,creation_date
        ,pay_basis_id
        ,person_referred_by_id
        ,recruitment_activity_id
        ,source_organization_id
        ,source_type
        ,employment_category            /* columns added Bug 978981 */
        ,perf_review_period
        ,perf_review_period_frequency
        ,sal_review_period
        ,sal_review_period_frequency
        ,bargaining_unit_code
        ,labour_union_member_flag
        ,hourly_salaried_code
        ,title
        ,job_post_source_name   -- added for 4486233
	,supervisor_assignment_id) ---#4053244
         values
        (l_asg_rec.assignment_id
        ,l_asg_rec.effective_start_date
        ,p_start_date - 1
        ,l_asg_rec.business_group_id
        ,l_asg_rec.grade_id
        ,l_asg_rec.position_id
        ,l_asg_rec.job_id
        ,l_asg_rec.assignment_status_type_id
        ,l_asg_rec.payroll_id
        ,l_asg_rec.location_id
        ,l_asg_rec.person_id
        ,l_asg_rec.organization_id
        ,l_asg_rec.people_group_id
        ,l_asg_rec.soft_coding_keyflex_id
        ,l_asg_rec.vacancy_id
        ,l_asg_rec.assignment_sequence
        ,l_asg_rec.assignment_type
        ,l_asg_rec.manager_flag
        ,l_asg_rec.primary_flag
        ,l_asg_rec.application_id
        ,l_asg_rec.assignment_number
        ,l_asg_rec.change_reason
        ,l_asg_rec.comment_id
        ,l_asg_rec.date_probation_end
        ,l_asg_rec.default_code_comb_id
        ,l_asg_rec.frequency
        ,l_asg_rec.internal_address_line
        ,l_asg_rec.normal_hours
        ,l_asg_rec.period_of_service_id
        ,l_asg_rec.probation_period
        ,l_asg_rec.probation_unit
        ,l_asg_rec.recruiter_id
        ,l_asg_rec.set_of_books_id
        ,l_asg_rec.special_ceiling_step_id
        ,l_asg_rec.supervisor_id
        ,l_asg_rec.time_normal_finish
        ,l_asg_rec.time_normal_start
        ,l_asg_rec.request_id
        ,l_asg_rec.program_application_id
        ,l_asg_rec.program_id
        ,l_asg_rec.program_update_date
        ,l_asg_rec.ass_attribute_category
        ,l_asg_rec.ass_attribute1
        ,l_asg_rec.ass_attribute2
        ,l_asg_rec.ass_attribute3
        ,l_asg_rec.ass_attribute4
        ,l_asg_rec.ass_attribute5
        ,l_asg_rec.ass_attribute6
        ,l_asg_rec.ass_attribute7
        ,l_asg_rec.ass_attribute8
        ,l_asg_rec.ass_attribute9
        ,l_asg_rec.ass_attribute10
        ,l_asg_rec.ass_attribute11
        ,l_asg_rec.ass_attribute12
        ,l_asg_rec.ass_attribute13
        ,l_asg_rec.ass_attribute14
        ,l_asg_rec.ass_attribute15
        ,l_asg_rec.ass_attribute16
        ,l_asg_rec.ass_attribute17
        ,l_asg_rec.ass_attribute18
        ,l_asg_rec.ass_attribute19
        ,l_asg_rec.ass_attribute20
        ,l_asg_rec.ass_attribute21
        ,l_asg_rec.ass_attribute22
        ,l_asg_rec.ass_attribute23
        ,l_asg_rec.ass_attribute24
        ,l_asg_rec.ass_attribute25
        ,l_asg_rec.ass_attribute26
        ,l_asg_rec.ass_attribute27
        ,l_asg_rec.ass_attribute28
        ,l_asg_rec.ass_attribute29
        ,l_asg_rec.ass_attribute30
        ,p_current_date
        ,p_user_id
        ,p_login_id
        ,l_asg_rec.created_by
        ,l_asg_rec.creation_date
        ,l_asg_rec.pay_basis_id
        ,l_asg_rec.person_referred_by_id
        ,l_asg_rec.recruitment_activity_id
        ,l_asg_rec.source_organization_id
        ,l_asg_rec.source_type
        ,l_asg_rec.employment_category            /* columns added Bug 978981 */
        ,l_asg_rec.perf_review_period
        ,l_asg_rec.perf_review_period_frequency
        ,l_asg_rec.sal_review_period
        ,l_asg_rec.sal_review_period_frequency
        ,l_asg_rec.bargaining_unit_code
        ,l_asg_rec.labour_union_member_flag
        ,l_asg_rec.hourly_salaried_code
        ,l_asg_rec.title
        ,l_asg_rec.job_post_source_name   -- added for 4486233
	,l_asg_rec.supervisor_assignment_id); ---#4053244
Line: 1134

                                  ,'INSERT'
                                  ,p_start_date
                                  ,p_end_of_time);
Line: 1171

   select projected_hire_date
   from per_applications
   where application_id =l_appl_id;
Line: 1216

      update per_assignments_f pa
      set    pa.assignment_status_type_id = p_assignment_status_type_id
      ,      pa.assignment_type           = 'E'
      ,      pa.effective_start_date      = p_start_date
      ,      pa.effective_end_date        = p_end_of_time
      ,      pa.period_of_service_id      = v_period_of_service_id
      ,      pa.primary_flag              = 'N'
      ,      pa.assignment_number         = p_assignment_number
      ,      pa.assignment_sequence       = p_assignment_sequence
      ,      pa.last_update_date          = p_current_date
      ,      pa.last_updated_by           = p_user_id
      ,      pa.last_update_login         = p_login_id
      ,      pa.set_of_books_id           = p_set_of_books_id
      ,      pa.ass_attribute_category    = decode(l_col_name,'ASSIGNMENT_TYPE','E'
                                 ,pa.ass_attribute_category)
          ,	pa.ass_attribute1	= l_ass_attribute1
          ,	pa.ass_attribute2	= l_ass_attribute2
          ,	pa.ass_attribute3	= l_ass_attribute3
          ,	pa.ass_attribute4	= l_ass_attribute4
          ,	pa.ass_attribute5	= l_ass_attribute5
          ,	pa.ass_attribute6	= l_ass_attribute6
          ,	pa.ass_attribute7	= l_ass_attribute7
          ,	pa.ass_attribute8	= l_ass_attribute8
          ,	pa.ass_attribute9	= l_ass_attribute9
          ,	pa.ass_attribute10	= l_ass_attribute10
          ,	pa.ass_attribute11	= l_ass_attribute11
          ,	pa.ass_attribute12	= l_ass_attribute12
          ,	pa.ass_attribute13	= l_ass_attribute13
          ,	pa.ass_attribute14	= l_ass_attribute14
          ,	pa.ass_attribute15	= l_ass_attribute15
          ,	pa.ass_attribute16	= l_ass_attribute16
          ,	pa.ass_attribute17	= l_ass_attribute17
          ,	pa.ass_attribute18	= l_ass_attribute18
          ,	pa.ass_attribute19	= l_ass_attribute19
          ,	pa.ass_attribute20	= l_ass_attribute20
          ,	pa.ass_attribute21	= l_ass_attribute21
          ,	pa.ass_attribute22	= l_ass_attribute22
          ,	pa.ass_attribute23	= l_ass_attribute23
          ,	pa.ass_attribute24	= l_ass_attribute24
          ,	pa.ass_attribute25	= l_ass_attribute25
          ,	pa.ass_attribute26	= l_ass_attribute26
          ,	pa.ass_attribute27	= l_ass_attribute27
          ,	pa.ass_attribute28	= l_ass_attribute28
          ,	pa.ass_attribute29	= l_ass_attribute29
          ,	pa.ass_attribute30	= l_ass_attribute30
	  , pa.date_probation_end	=l_asg_rec.date_probation_end --7120387
      where current of ass_cur;  -- pa.rowid = p_rowid;
Line: 1306

                               ,'INSERT'
                               ,p_start_date
                               ,p_end_of_time);
Line: 1327

        update per_assignments_f
          set effective_end_date = p_start_date -1
         where current of ass_cur;
Line: 1469

        insert into per_assignments_f
        (assignment_id
        ,effective_start_date
        ,effective_end_date
        ,business_group_id
        ,grade_id
        ,position_id
        ,job_id
        ,assignment_status_type_id
        ,payroll_id
        ,location_id
        ,person_id
        ,organization_id
        ,people_group_id
        ,soft_coding_keyflex_id
        ,vacancy_id
        ,assignment_sequence
        ,assignment_type
        ,manager_flag
        ,primary_flag
        ,application_id
        ,assignment_number
        ,change_reason
        ,comment_id
        ,date_probation_end
        ,default_code_comb_id
        ,frequency
        ,internal_address_line
        ,normal_hours
        ,period_of_service_id
        ,probation_period
        ,probation_unit
        ,recruiter_id
        ,set_of_books_id
        ,special_ceiling_step_id
        ,supervisor_id
        ,time_normal_finish
        ,time_normal_start
        ,request_id
        ,program_application_id
        ,program_id
        ,program_update_date
        ,ass_attribute_category
        ,ass_attribute1
        ,ass_attribute2
        ,ass_attribute3
        ,ass_attribute4
        ,ass_attribute5
        ,ass_attribute6
        ,ass_attribute7
        ,ass_attribute8
        ,ass_attribute9
        ,ass_attribute10
        ,ass_attribute11
        ,ass_attribute12
        ,ass_attribute13
        ,ass_attribute14
        ,ass_attribute15
        ,ass_attribute16
        ,ass_attribute17
        ,ass_attribute18
        ,ass_attribute19
        ,ass_attribute20
        ,ass_attribute21
        ,ass_attribute22
        ,ass_attribute23
        ,ass_attribute24
        ,ass_attribute25
        ,ass_attribute26
        ,ass_attribute27
        ,ass_attribute28
        ,ass_attribute29
        ,ass_attribute30
        ,last_update_date
        ,last_updated_by
        ,last_update_login
        ,created_by
        ,creation_date
        ,pay_basis_id
        ,person_referred_by_id
        ,recruitment_activity_id
        ,source_organization_id
        ,source_type
        ,employment_category            --columns added Bug 978981
        ,perf_review_period
        ,perf_review_period_frequency
        ,sal_review_period
        ,sal_review_period_frequency
        ,bargaining_unit_code
        ,labour_union_member_flag
        ,hourly_salaried_code
        ,title
        ,job_post_source_name   -- added for 4486233
	,supervisor_assignment_id) ---#4053244
         values
        (l_asg_rec.assignment_id
        ,l_asg_rec.effective_start_date
        ,p_start_date - 1
        ,l_asg_rec.business_group_id
        ,l_asg_rec.grade_id
        ,l_asg_rec.position_id
        ,l_asg_rec.job_id
        ,l_asg_rec.assignment_status_type_id
        ,l_asg_rec.payroll_id
        ,l_asg_rec.location_id
        ,l_asg_rec.person_id
        ,l_asg_rec.organization_id
        ,l_asg_rec.people_group_id
        ,l_asg_rec.soft_coding_keyflex_id
        ,l_asg_rec.vacancy_id
        ,l_asg_rec.assignment_sequence
        ,l_asg_rec.assignment_type
        ,l_asg_rec.manager_flag
        ,l_asg_rec.primary_flag
        ,l_asg_rec.application_id
        ,l_asg_rec.assignment_number
        ,l_asg_rec.change_reason
        ,l_asg_rec.comment_id
        ,l_asg_rec.date_probation_end
        ,l_asg_rec.default_code_comb_id
        ,l_asg_rec.frequency
        ,l_asg_rec.internal_address_line
        ,l_asg_rec.normal_hours
        ,l_asg_rec.period_of_service_id
        ,l_asg_rec.probation_period
        ,l_asg_rec.probation_unit
        ,l_asg_rec.recruiter_id
        ,l_asg_rec.set_of_books_id
        ,l_asg_rec.special_ceiling_step_id
        ,l_asg_rec.supervisor_id
        ,l_asg_rec.time_normal_finish
        ,l_asg_rec.time_normal_start
        ,l_asg_rec.request_id
        ,l_asg_rec.program_application_id
        ,l_asg_rec.program_id
        ,l_asg_rec.program_update_date
        ,l_asg_rec.ass_attribute_category
        ,l_asg_rec.ass_attribute1
        ,l_asg_rec.ass_attribute2
        ,l_asg_rec.ass_attribute3
        ,l_asg_rec.ass_attribute4
        ,l_asg_rec.ass_attribute5
        ,l_asg_rec.ass_attribute6
        ,l_asg_rec.ass_attribute7
        ,l_asg_rec.ass_attribute8
        ,l_asg_rec.ass_attribute9
        ,l_asg_rec.ass_attribute10
        ,l_asg_rec.ass_attribute11
        ,l_asg_rec.ass_attribute12
        ,l_asg_rec.ass_attribute13
        ,l_asg_rec.ass_attribute14
        ,l_asg_rec.ass_attribute15
        ,l_asg_rec.ass_attribute16
        ,l_asg_rec.ass_attribute17
        ,l_asg_rec.ass_attribute18
        ,l_asg_rec.ass_attribute19
        ,l_asg_rec.ass_attribute20
        ,l_asg_rec.ass_attribute21
        ,l_asg_rec.ass_attribute22
        ,l_asg_rec.ass_attribute23
        ,l_asg_rec.ass_attribute24
        ,l_asg_rec.ass_attribute25
        ,l_asg_rec.ass_attribute26
        ,l_asg_rec.ass_attribute27
        ,l_asg_rec.ass_attribute28
        ,l_asg_rec.ass_attribute29
        ,l_asg_rec.ass_attribute30
        ,p_current_date
        ,p_user_id
        ,p_login_id
        ,l_asg_rec.created_by
        ,l_asg_rec.creation_date
        ,l_asg_rec.pay_basis_id
        ,l_asg_rec.person_referred_by_id
        ,l_asg_rec.recruitment_activity_id
        ,l_asg_rec.source_organization_id
        ,l_asg_rec.source_type
        ,l_asg_rec.employment_category            -- columns added Bug 978981
        ,l_asg_rec.perf_review_period
        ,l_asg_rec.perf_review_period_frequency
        ,l_asg_rec.sal_review_period
        ,l_asg_rec.sal_review_period_frequency
        ,l_asg_rec.bargaining_unit_code
        ,l_asg_rec.labour_union_member_flag
        ,l_asg_rec.hourly_salaried_code
        ,l_asg_rec.title
        ,l_asg_rec.job_post_source_name   -- added for 4486233
	,l_asg_rec.supervisor_assignment_id); ---#4053244
Line: 1809

                                  ,'INSERT'
                                  ,p_start_date
                                  ,p_end_of_time);
Line: 1837

      update per_assignments_f pa
      set    pa.assignment_status_type_id = p_assignment_status_type_id
      ,      pa.assignment_type           = 'E'
      ,      pa.effective_start_date      = p_start_date
      ,      pa.effective_end_date        = p_end_of_time
      ,      pa.period_of_service_id      = v_period_of_service_id
      ,      pa.primary_flag              = 'N'
      ,      pa.assignment_number         = p_assignment_number
      ,      pa.assignment_sequence       = p_assignment_sequence
      ,      pa.last_update_date          = p_current_date
      ,      pa.last_updated_by           = p_user_id
      ,      pa.last_update_login         = p_login_id
      ,      pa.set_of_books_id           = p_set_of_books_id
      ,      pa.ass_attribute_category    = decode(l_col_name,'ASSIGNMENT_TYPE','E'
                                 ,pa.ass_attribute_category)
          ,	pa.ass_attribute1	= l_ass_attribute1
          ,	pa.ass_attribute2	= l_ass_attribute2
          ,	pa.ass_attribute3	= l_ass_attribute3
          ,	pa.ass_attribute4	= l_ass_attribute4
          ,	pa.ass_attribute5	= l_ass_attribute5
          ,	pa.ass_attribute6	= l_ass_attribute6
          ,	pa.ass_attribute7	= l_ass_attribute7
          ,	pa.ass_attribute8	= l_ass_attribute8
          ,	pa.ass_attribute9	= l_ass_attribute9
          ,	pa.ass_attribute10	= l_ass_attribute10
          ,	pa.ass_attribute11	= l_ass_attribute11
          ,	pa.ass_attribute12	= l_ass_attribute12
          ,	pa.ass_attribute13	= l_ass_attribute13
          ,	pa.ass_attribute14	= l_ass_attribute14
          ,	pa.ass_attribute15	= l_ass_attribute15
          ,	pa.ass_attribute16	= l_ass_attribute16
          ,	pa.ass_attribute17	= l_ass_attribute17
          ,	pa.ass_attribute18	= l_ass_attribute18
          ,	pa.ass_attribute19	= l_ass_attribute19
          ,	pa.ass_attribute20	= l_ass_attribute20
          ,	pa.ass_attribute21	= l_ass_attribute21
          ,	pa.ass_attribute22	= l_ass_attribute22
          ,	pa.ass_attribute23	= l_ass_attribute23
          ,	pa.ass_attribute24	= l_ass_attribute24
          ,	pa.ass_attribute25	= l_ass_attribute25
          ,	pa.ass_attribute26	= l_ass_attribute26
          ,	pa.ass_attribute27	= l_ass_attribute27
          ,	pa.ass_attribute28	= l_ass_attribute28
          ,	pa.ass_attribute29	= l_ass_attribute29
          ,	pa.ass_attribute30	= l_ass_attribute30
      where current of csr_ass_cur_for_primary;  -- pa.rowid = p_rowid;
Line: 1918

                               ,'INSERT'
                               ,p_start_date
                               ,p_end_of_time);
Line: 1937

        update per_assignments_f
          set effective_end_date = p_start_date -1
         where current of csr_ass_cur_for_primary;
Line: 2006

        insert into per_assignments_f
        (assignment_id
        ,effective_start_date
        ,effective_end_date
        ,business_group_id
        ,grade_id
        ,position_id
        ,job_id
        ,assignment_status_type_id
        ,payroll_id
        ,location_id
        ,person_id
        ,organization_id
        ,people_group_id
        ,soft_coding_keyflex_id
        ,vacancy_id
        ,assignment_sequence
        ,assignment_type
        ,manager_flag
        ,primary_flag
        ,application_id
        ,assignment_number
        ,change_reason
        ,comment_id
        ,date_probation_end
        ,default_code_comb_id
        ,frequency
        ,internal_address_line
        ,normal_hours
        ,period_of_service_id
        ,probation_period
        ,probation_unit
        ,recruiter_id
        ,set_of_books_id
        ,special_ceiling_step_id
        ,supervisor_id
        ,time_normal_finish
        ,time_normal_start
        ,request_id
        ,program_application_id
        ,program_id
        ,program_update_date
        ,ass_attribute_category
        ,ass_attribute1
        ,ass_attribute2
        ,ass_attribute3
        ,ass_attribute4
        ,ass_attribute5
        ,ass_attribute6
        ,ass_attribute7
        ,ass_attribute8
        ,ass_attribute9
        ,ass_attribute10
        ,ass_attribute11
        ,ass_attribute12
        ,ass_attribute13
        ,ass_attribute14
        ,ass_attribute15
        ,ass_attribute16
        ,ass_attribute17
        ,ass_attribute18
        ,ass_attribute19
        ,ass_attribute20
        ,ass_attribute21
        ,ass_attribute22
        ,ass_attribute23
        ,ass_attribute24
        ,ass_attribute25
        ,ass_attribute26
        ,ass_attribute27
        ,ass_attribute28
        ,ass_attribute29
        ,ass_attribute30
        ,last_update_date
        ,last_updated_by
        ,last_update_login
        ,created_by
        ,creation_date
        ,pay_basis_id
        ,person_referred_by_id
        ,recruitment_activity_id
        ,source_organization_id
        ,source_type
        ,employment_category            -- columns added Bug 978981
        ,perf_review_period
        ,perf_review_period_frequency
        ,sal_review_period
        ,sal_review_period_frequency
        ,bargaining_unit_code
        ,labour_union_member_flag
        ,hourly_salaried_code
        ,title
        ,job_post_source_name   -- added for 4486233
	,supervisor_assignment_id) ---#4053244
         values
        (l_asg_rec.assignment_id
        ,l_asg_rec.effective_start_date
        ,p_start_date - 1
        ,l_asg_rec.business_group_id
        ,l_asg_rec.grade_id
        ,l_asg_rec.position_id
        ,l_asg_rec.job_id
        ,l_asg_rec.assignment_status_type_id
        ,l_asg_rec.payroll_id
        ,l_asg_rec.location_id
        ,l_asg_rec.person_id
        ,l_asg_rec.organization_id
        ,l_asg_rec.people_group_id
        ,l_asg_rec.soft_coding_keyflex_id
        ,l_asg_rec.vacancy_id
        ,l_asg_rec.assignment_sequence
        ,l_asg_rec.assignment_type
        ,l_asg_rec.manager_flag
        ,l_asg_rec.primary_flag
        ,l_asg_rec.application_id
        ,l_asg_rec.assignment_number
        ,l_asg_rec.change_reason
        ,l_asg_rec.comment_id
        ,l_asg_rec.date_probation_end
        ,l_asg_rec.default_code_comb_id
        ,l_asg_rec.frequency
        ,l_asg_rec.internal_address_line
        ,l_asg_rec.normal_hours
        ,l_asg_rec.period_of_service_id
        ,l_asg_rec.probation_period
        ,l_asg_rec.probation_unit
        ,l_asg_rec.recruiter_id
        ,l_asg_rec.set_of_books_id
        ,l_asg_rec.special_ceiling_step_id
        ,l_asg_rec.supervisor_id
        ,l_asg_rec.time_normal_finish
        ,l_asg_rec.time_normal_start
        ,l_asg_rec.request_id
        ,l_asg_rec.program_application_id
        ,l_asg_rec.program_id
        ,l_asg_rec.program_update_date
        ,l_asg_rec.ass_attribute_category
        ,l_asg_rec.ass_attribute1
        ,l_asg_rec.ass_attribute2
        ,l_asg_rec.ass_attribute3
        ,l_asg_rec.ass_attribute4
        ,l_asg_rec.ass_attribute5
        ,l_asg_rec.ass_attribute6
        ,l_asg_rec.ass_attribute7
        ,l_asg_rec.ass_attribute8
        ,l_asg_rec.ass_attribute9
        ,l_asg_rec.ass_attribute10
        ,l_asg_rec.ass_attribute11
        ,l_asg_rec.ass_attribute12
        ,l_asg_rec.ass_attribute13
        ,l_asg_rec.ass_attribute14
        ,l_asg_rec.ass_attribute15
        ,l_asg_rec.ass_attribute16
        ,l_asg_rec.ass_attribute17
        ,l_asg_rec.ass_attribute18
        ,l_asg_rec.ass_attribute19
        ,l_asg_rec.ass_attribute20
        ,l_asg_rec.ass_attribute21
        ,l_asg_rec.ass_attribute22
        ,l_asg_rec.ass_attribute23
        ,l_asg_rec.ass_attribute24
        ,l_asg_rec.ass_attribute25
        ,l_asg_rec.ass_attribute26
        ,l_asg_rec.ass_attribute27
        ,l_asg_rec.ass_attribute28
        ,l_asg_rec.ass_attribute29
        ,l_asg_rec.ass_attribute30
        ,p_current_date
        ,p_user_id
        ,p_login_id
        ,l_asg_rec.created_by
        ,l_asg_rec.creation_date
        ,l_asg_rec.pay_basis_id
        ,l_asg_rec.person_referred_by_id
        ,l_asg_rec.recruitment_activity_id
        ,l_asg_rec.source_organization_id
        ,l_asg_rec.source_type
        ,l_asg_rec.employment_category        -- columns added Bug 978981
        ,l_asg_rec.perf_review_period
        ,l_asg_rec.perf_review_period_frequency
        ,l_asg_rec.sal_review_period
        ,l_asg_rec.sal_review_period_frequency
        ,l_asg_rec.bargaining_unit_code
        ,l_asg_rec.labour_union_member_flag
        ,l_asg_rec.hourly_salaried_code
        ,l_asg_rec.title
        ,l_asg_rec.job_post_source_name   -- added for 4486233
	,l_asg_rec.supervisor_assignment_id); ---#4053244
Line: 2346

                                  ,'INSERT'
                                  ,p_start_date
                                  ,p_end_of_time);
Line: 2374

      update per_assignments_f pa
      set    pa.assignment_status_type_id = p_assignment_status_type_id
      ,      pa.assignment_type           = 'E'
      ,      pa.effective_start_date      = p_start_date
      ,      pa.effective_end_date        = p_end_of_time
      ,      pa.period_of_service_id      = v_period_of_service_id
      ,      pa.primary_flag              = 'N'
      ,      pa.assignment_number         = p_assignment_number
      ,      pa.assignment_sequence       = p_assignment_sequence
      ,      pa.last_update_date          = p_current_date
      ,      pa.last_updated_by           = p_user_id
      ,      pa.last_update_login         = p_login_id
      ,      pa.set_of_books_id           = p_set_of_books_id
      ,      pa.ass_attribute_category    = decode(l_col_name,'ASSIGNMENT_TYPE','E'
                                 ,pa.ass_attribute_category)
          ,	pa.ass_attribute1	= l_ass_attribute1
          ,	pa.ass_attribute2	= l_ass_attribute2
          ,	pa.ass_attribute3	= l_ass_attribute3
          ,	pa.ass_attribute4	= l_ass_attribute4
          ,	pa.ass_attribute5	= l_ass_attribute5
          ,	pa.ass_attribute6	= l_ass_attribute6
          ,	pa.ass_attribute7	= l_ass_attribute7
          ,	pa.ass_attribute8	= l_ass_attribute8
          ,	pa.ass_attribute9	= l_ass_attribute9
          ,	pa.ass_attribute10	= l_ass_attribute10
          ,	pa.ass_attribute11	= l_ass_attribute11
          ,	pa.ass_attribute12	= l_ass_attribute12
          ,	pa.ass_attribute13	= l_ass_attribute13
          ,	pa.ass_attribute14	= l_ass_attribute14
          ,	pa.ass_attribute15	= l_ass_attribute15
          ,	pa.ass_attribute16	= l_ass_attribute16
          ,	pa.ass_attribute17	= l_ass_attribute17
          ,	pa.ass_attribute18	= l_ass_attribute18
          ,	pa.ass_attribute19	= l_ass_attribute19
          ,	pa.ass_attribute20	= l_ass_attribute20
          ,	pa.ass_attribute21	= l_ass_attribute21
          ,	pa.ass_attribute22	= l_ass_attribute22
          ,	pa.ass_attribute23	= l_ass_attribute23
          ,	pa.ass_attribute24	= l_ass_attribute24
          ,	pa.ass_attribute25	= l_ass_attribute25
          ,	pa.ass_attribute26	= l_ass_attribute26
          ,	pa.ass_attribute27	= l_ass_attribute27
          ,	pa.ass_attribute28	= l_ass_attribute28
          ,	pa.ass_attribute29	= l_ass_attribute29
          ,	pa.ass_attribute30	= l_ass_attribute30
      where current of csr_ass_cur_for_nonprimary;  -- pa.rowid = p_rowid;
Line: 2455

                               ,'INSERT'
                               ,p_start_date
                               ,p_end_of_time);
Line: 2474

        update per_assignments_f
          set effective_end_date = p_start_date -1
         where current of csr_ass_cur_for_nonprimary;
Line: 2548

       select rowid, assignment_id, effective_start_date, effective_end_date
         from per_assignments_f
        where   primary_flag      = 'Y'
          and   business_group_id  + 0 = p_business_group_id
          and   person_id          = p_person_id
          and   assignment_type    = 'E'
          and   effective_start_date > p_start_date
        for update of effective_start_date;
Line: 2574

                                      ,'DELETE'
                                      ,l_asg_start_date
                                      ,l_asg_end_date);
Line: 2584

                                   ,'DELETE'
                                   ,l_asg_start_date
                                   ,l_asg_end_date);
Line: 2610

                                    ,p_update_primary_flag IN VARCHAR2
                                    ,p_employee_number IN VARCHAR2
                                    ,p_set_of_books_id  IN INTEGER
                                    ,p_emp_apl IN VARCHAR2
                                    ) is
--
--  Create a new primary assignment.
--
--
p_assignment_number VARCHAR2(30);
Line: 2634

select default_context_field_name
from fnd_descriptive_flexs
where application_id = 800 -- bug 5469726
and descriptive_flexfield_name = 'PER_ASSIGNMENTS';
Line: 2644

select * from per_all_assignments_f paf
where paf.assignment_id = p_new_primary_id
 and paf.business_group_id +0 = p_business_group_id
 and p_start_date between paf.effective_start_date
 and paf.effective_end_date;
Line: 2651

select * from per_all_assignments_f paf
where paf.person_id = p_person_id
 and paf.business_group_id +0 = p_business_group_id
 -- #1981550
 and paf.primary_flag = 'Y'
 and paf.assignment_type = 'E'
 and p_start_date between paf.effective_start_date
 -- #1981550
 and paf.effective_end_date;
Line: 2673

    select pay_proposal_id,object_version_number,proposed_salary_n, change_date
    from per_pay_proposals
    where assignment_id=ass_id
    and   approved = 'N'
    order by change_date desc;
Line: 2680

    select pay_proposal_id,object_version_number,proposed_salary_n, change_date
    from per_pay_proposals
    where assignment_id=ass_id
    and   approved = 'N'
    order by change_date desc;
Line: 2707

  procedure Delete_future_assignments is
  --
     cursor fut_asg is
       select rowid, assignment_id, effective_start_date, effective_end_date
         from per_assignments_f
        where   primary_flag      = 'Y'
          and   business_group_id  + 0 = p_business_group_id
          and   person_id          = p_person_id
          and   assignment_type    = 'E'
          and   effective_start_date > p_start_date
        for update of effective_start_date;
Line: 2725

    hr_utility.set_location('IN Delete future assignments',201);
Line: 2734

      delete from per_assignments_f
       where rowid = l_rowid;
Line: 2741

          hr_utility.set_message_token('PROCEDURE','Delete_future_assignments');
Line: 2747

    hr_utility.set_location('OUT Delete future assignments',203);
Line: 2748

  end Delete_future_assignments;
Line: 2764

  if p_update_primary_flag not in ('Y','V') then
    if p_emp_apl = 'Y' then
      begin
      -- #1769702
      Delete_future_assignments;
Line: 2770

      update per_assignments_f pa
      set pa.primary_flag = 'N'
      ,   pa.effective_start_date =p_start_date
      ,   pa.effective_end_date   = p_end_of_time
      ,   pa.last_update_login    = p_login_id
      ,   pa.last_updated_by      = p_user_id
      ,   pa.last_update_date     = p_start_date
      where pa.primary_flag       = 'Y'
      and   pa.business_group_id  + 0 = p_business_group_id
      and   pa.person_id          = p_person_id
      and   p_start_date between pa.effective_start_date
      and   pa.effective_end_date;
Line: 2799

                              ,'INSERT'
                              ,p_start_date
                              ,p_end_of_time);
Line: 2826

      update per_all_assignments_f pa
      set    pa.primary_flag = 'Y'
      ,      pa.effective_start_date = p_start_date
      ,      pa.effective_end_date = p_end_of_time
      ,      pa.set_of_books_id    = emp_asg_rec.set_of_books_id
      ,      pa.change_reason = null
      where  pa.business_group_id + 0 = p_business_group_id
      and    pa.assignment_id     = p_new_primary_id
      and    p_start_date between pa.effective_start_date
      and    pa.effective_end_date;
Line: 2856

                         ,'INSERT'
                         ,p_start_date
                         ,p_end_of_time);
Line: 2873

   select projected_hire_date
   from per_applications
   where application_id =l_appl_id;
Line: 2880

     select assignment_id
     ,      rowid
     ,      effective_end_date -- #1769702
     from   per_assignments_f pa
     where pa.primary_flag='Y'
     and   pa.person_id = p_person_id
     and   pa.business_group_id + 0 = p_business_group_id
     and   p_start_date between pa.effective_start_date
     and   pa.effective_end_date
     for update of pa.organization_id;
Line: 2898

    select assignment_type
    from per_all_assignments_f paf
    where paf.assignment_id = p_old_assignment_id;
Line: 2907

     select assignment_id
     ,      rowid
     ,      effective_start_date
     ,      effective_end_date
      from  per_assignments_f pa
     where  pa.primary_flag       = 'Y'
       and  pa.business_group_id  + 0 = p_business_group_id
       and  pa.person_id          = p_person_id
       and  pa.assignment_type    = 'E'
       and  pa.effective_start_date > p_start_date
     for update of pa.organization_id;
Line: 2936

  if p_update_primary_flag = 'Y' then

       hr_utility.set_location('primary_flag =  Y',480);
Line: 3042

       update per_assignments_f pa
       set pa.organization_id = apl_asg_rec.organization_id
       ,pa.effective_start_date = p_start_date
       ,pa.effective_end_date = p_end_of_time
       ,pa.recruiter_id = apl_asg_rec.recruiter_id
       ,pa.grade_id = apl_asg_rec.grade_id
       ,pa.position_id = apl_asg_rec.position_id
       ,pa.job_id = apl_asg_rec.job_id
       ,pa.payroll_id = apl_asg_rec.payroll_id
       ,pa.location_id = apl_asg_rec.location_id
       ,pa.person_referred_by_id = apl_asg_rec.person_referred_by_id
       ,pa.supervisor_id = apl_asg_rec.supervisor_id
       ,pa.supervisor_assignment_id = apl_asg_rec.supervisor_assignment_id -- #4053244
       ,pa.special_ceiling_step_id = apl_asg_rec.special_ceiling_step_id
       ,pa.recruitment_activity_id = apl_asg_rec.recruitment_activity_id
       ,pa.source_organization_id = apl_asg_rec.source_organization_id
       ,pa.people_group_id = apl_asg_rec.people_group_id
       ,pa.soft_coding_keyflex_id = apl_asg_rec.soft_coding_keyflex_id
       ,pa.vacancy_id = apl_asg_rec.vacancy_id
       ,pa.application_id = apl_asg_rec.application_id
       ,pa.comment_id = apl_asg_rec.comment_id
       ,pa.date_probation_end = apl_asg_rec.date_probation_end
       ,pa.default_code_comb_id = apl_asg_rec.default_code_comb_id
       ,pa.employment_category = apl_asg_rec.employment_category
       ,pa.frequency = apl_asg_rec.frequency
       ,pa.internal_address_line = apl_asg_rec.internal_address_line
       ,pa.manager_flag = apl_asg_rec.manager_flag
       ,pa.normal_hours = apl_asg_rec.normal_hours
       ,pa.probation_period = apl_asg_rec.probation_period
       ,pa.probation_unit = apl_asg_rec.probation_unit
       ,pa.set_of_books_id = p_set_of_books_id
       ,pa.source_type = apl_asg_rec.source_type
       ,pa.time_normal_finish = apl_asg_rec.time_normal_finish
       ,pa.time_normal_start = apl_asg_rec.time_normal_start
       ,pa.pay_basis_id = apl_asg_rec.pay_basis_id
       ,pa.ass_attribute_category = decode(l_col_name,'ASSIGNMENT_TYPE','E',pa.ass_attribute_category)
       ,pa.ass_attribute1 = apl_asg_rec.ass_attribute1
       ,pa.ass_attribute2 = apl_asg_rec.ass_attribute2
       ,pa.ass_attribute3 = apl_asg_rec.ass_attribute3
       ,pa.ass_attribute4 = apl_asg_rec.ass_attribute4
       ,pa.ass_attribute5 = apl_asg_rec.ass_attribute5
       ,pa.ass_attribute6 = apl_asg_rec.ass_attribute6
       ,pa.ass_attribute7 = apl_asg_rec.ass_attribute7
       ,pa.ass_attribute8 = apl_asg_rec.ass_attribute8
       ,pa.ass_attribute9 = apl_asg_rec.ass_attribute9
       ,pa.ass_attribute10 = apl_asg_rec.ass_attribute10
       ,pa.ass_attribute11 = apl_asg_rec.ass_attribute11
       ,pa.ass_attribute12 = apl_asg_rec.ass_attribute12
       ,pa.ass_attribute13 = apl_asg_rec.ass_attribute13
       ,pa.ass_attribute14 = apl_asg_rec.ass_attribute14
       ,pa.ass_attribute15 = apl_asg_rec.ass_attribute15
       ,pa.ass_attribute16 = apl_asg_rec.ass_attribute16
       ,pa.ass_attribute17 = apl_asg_rec.ass_attribute17
       ,pa.ass_attribute18 = apl_asg_rec.ass_attribute18
       ,pa.ass_attribute19 = apl_asg_rec.ass_attribute19
       ,pa.ass_attribute20 = apl_asg_rec.ass_attribute20
       ,pa.ass_attribute21 = apl_asg_rec.ass_attribute21
       ,pa.ass_attribute22 = apl_asg_rec.ass_attribute22
       ,pa.ass_attribute23 = apl_asg_rec.ass_attribute23
       ,pa.ass_attribute24 = apl_asg_rec.ass_attribute24
       ,pa.ass_attribute25 = apl_asg_rec.ass_attribute25
       ,pa.ass_attribute26 = apl_asg_rec.ass_attribute26
       ,pa.ass_attribute27 = apl_asg_rec.ass_attribute27
       ,pa.ass_attribute28 = apl_asg_rec.ass_attribute28
       ,pa.ass_attribute29 = apl_asg_rec.ass_attribute29
       ,pa.ass_attribute30 = apl_asg_rec.ass_attribute30
       ,pa.GRADE_LADDER_PGM_ID=apl_asg_rec.GRADE_LADDER_PGM_ID-- added for bug 5513751
       ,pa.EMPLOYEE_CATEGORY=apl_asg_rec.EMPLOYEE_CATEGORY--added for bug 5513751
       ,pa.COLLECTIVE_AGREEMENT_id=apl_asg_rec.COLLECTIVE_AGREEMENT_id-- added for bug 5513751
       where pa.rowid = p_rowid;
Line: 3139

       hr_utility.set_location('Updated EMP assignment',11);
Line: 3197

       Delete_future_assignments;
Line: 3200

  elsif p_update_primary_flag = 'V' then
    hr_utility.set_location('Overwrite EMP assignment',15);
Line: 3376

       hr_utility.set_location('Updated EMP assignment',90);
Line: 3521

       update per_assignments_f pa
       set pa.organization_id = emp_asg_rec.organization_id
       ,pa.effective_start_date = p_start_date
       --,pa.effective_end_date = p_end_of_time -- #1769702 what if future asg exist?
       ,pa.recruiter_id = emp_asg_rec.recruiter_id
       ,pa.grade_id = emp_asg_rec.grade_id
       ,pa.position_id = emp_asg_rec.position_id
       ,pa.job_id = emp_asg_rec.job_id
       ,pa.payroll_id = emp_asg_rec.payroll_id
       ,pa.location_id = emp_asg_rec.location_id
       ,pa.person_referred_by_id = emp_asg_rec.person_referred_by_id
       ,pa.supervisor_id = emp_asg_rec.supervisor_id
       ,pa.supervisor_assignment_id = emp_asg_rec.supervisor_assignment_id -- #4053244
       ,pa.special_ceiling_step_id = emp_asg_rec.special_ceiling_step_id
       ,pa.recruitment_activity_id = emp_asg_rec.recruitment_activity_id
       ,pa.source_organization_id = emp_asg_rec.source_organization_id
       ,pa.people_group_id = emp_asg_rec.people_group_id
       ,pa.soft_coding_keyflex_id = emp_asg_rec.soft_coding_keyflex_id
       ,pa.vacancy_id = emp_asg_rec.vacancy_id
       ,pa.application_id = emp_asg_rec.application_id
       ,pa.comment_id = emp_asg_rec.comment_id
       ,pa.date_probation_end = emp_asg_rec.date_probation_end
       ,pa.default_code_comb_id = emp_asg_rec.default_code_comb_id
       ,pa.employment_category = emp_asg_rec.employment_category
       ,pa.frequency = emp_asg_rec.frequency
       ,pa.internal_address_line = emp_asg_rec.internal_address_line
       ,pa.manager_flag = emp_asg_rec.manager_flag
       ,pa.normal_hours = emp_asg_rec.normal_hours
       ,pa.probation_period = emp_asg_rec.probation_period
       ,pa.probation_unit = emp_asg_rec.probation_unit
       ,pa.set_of_books_id = emp_asg_rec.set_of_books_id
       ,pa.source_type = emp_asg_rec.source_type
       ,pa.time_normal_finish = emp_asg_rec.time_normal_finish
       ,pa.time_normal_start = emp_asg_rec.time_normal_start
       ,pa.pay_basis_id = emp_asg_rec.pay_basis_id
       ,pa.ass_attribute_category = decode(l_col_name,'ASSIGNMENT_TYPE','E',pa.ass_attribute_category)
       ,pa.ass_attribute1 = emp_asg_rec.ass_attribute1
       ,pa.ass_attribute2 = emp_asg_rec.ass_attribute2
       ,pa.ass_attribute3 = emp_asg_rec.ass_attribute3
       ,pa.ass_attribute4 = emp_asg_rec.ass_attribute4
       ,pa.ass_attribute5 = emp_asg_rec.ass_attribute5
       ,pa.ass_attribute6 = emp_asg_rec.ass_attribute6
       ,pa.ass_attribute7 = emp_asg_rec.ass_attribute7
       ,pa.ass_attribute8 = emp_asg_rec.ass_attribute8
       ,pa.ass_attribute9 = emp_asg_rec.ass_attribute9
       ,pa.ass_attribute10 = emp_asg_rec.ass_attribute10
       ,pa.ass_attribute11 = emp_asg_rec.ass_attribute11
       ,pa.ass_attribute12 = emp_asg_rec.ass_attribute12
       ,pa.ass_attribute13 = emp_asg_rec.ass_attribute13
       ,pa.ass_attribute14 = emp_asg_rec.ass_attribute14
       ,pa.ass_attribute15 = emp_asg_rec.ass_attribute15
       ,pa.ass_attribute16 = emp_asg_rec.ass_attribute16
       ,pa.ass_attribute17 = emp_asg_rec.ass_attribute17
       ,pa.ass_attribute18 = emp_asg_rec.ass_attribute18
       ,pa.ass_attribute19 = emp_asg_rec.ass_attribute19
       ,pa.ass_attribute20 = emp_asg_rec.ass_attribute20
       ,pa.ass_attribute21 = emp_asg_rec.ass_attribute21
       ,pa.ass_attribute22 = emp_asg_rec.ass_attribute22
       ,pa.ass_attribute23 = emp_asg_rec.ass_attribute23
       ,pa.ass_attribute24 = emp_asg_rec.ass_attribute24
       ,pa.ass_attribute25 = emp_asg_rec.ass_attribute25
       ,pa.ass_attribute26 = emp_asg_rec.ass_attribute26
       ,pa.ass_attribute27 = emp_asg_rec.ass_attribute27
       ,pa.ass_attribute28 = emp_asg_rec.ass_attribute28
       ,pa.ass_attribute29 = emp_asg_rec.ass_attribute29
       ,pa.ass_attribute30 = emp_asg_rec.ass_attribute30
       ,pa.GRADE_LADDER_PGM_ID= emp_asg_rec.GRADE_LADDER_PGM_ID --  5513751
       ,pa.EMPLOYEE_CATEGORY= emp_asg_rec.EMPLOYEE_CATEGORY -- 5513751
       ,pa.COLLECTIVE_AGREEMENT_id= emp_asg_rec.COLLECTIVE_AGREEMENT_id  -- 5513751
       where pa.rowid = p_rowid;
Line: 3685

           update per_assignments_f pa
           set pa.organization_id = emp_asg_rec.organization_id
           ,pa.recruiter_id = emp_asg_rec.recruiter_id
           ,pa.grade_id = emp_asg_rec.grade_id
           ,pa.position_id = emp_asg_rec.position_id
           ,pa.job_id = emp_asg_rec.job_id
           ,pa.payroll_id = emp_asg_rec.payroll_id
           ,pa.location_id = emp_asg_rec.location_id
           ,pa.person_referred_by_id = emp_asg_rec.person_referred_by_id
           ,pa.supervisor_id = emp_asg_rec.supervisor_id
	   ,pa.supervisor_assignment_id = emp_asg_rec.supervisor_assignment_id -- #4053244
           ,pa.special_ceiling_step_id = emp_asg_rec.special_ceiling_step_id
           ,pa.recruitment_activity_id = emp_asg_rec.recruitment_activity_id
           ,pa.source_organization_id = emp_asg_rec.source_organization_id
           ,pa.people_group_id = emp_asg_rec.people_group_id
           ,pa.soft_coding_keyflex_id = emp_asg_rec.soft_coding_keyflex_id
           ,pa.vacancy_id = emp_asg_rec.vacancy_id
           ,pa.application_id = emp_asg_rec.application_id
           ,pa.comment_id = emp_asg_rec.comment_id
           ,pa.date_probation_end = emp_asg_rec.date_probation_end
           ,pa.default_code_comb_id = emp_asg_rec.default_code_comb_id
           ,pa.employment_category = emp_asg_rec.employment_category
           ,pa.frequency = emp_asg_rec.frequency
           ,pa.internal_address_line = emp_asg_rec.internal_address_line
           ,pa.manager_flag = emp_asg_rec.manager_flag
           ,pa.normal_hours = emp_asg_rec.normal_hours
           ,pa.probation_period = emp_asg_rec.probation_period
           ,pa.probation_unit = emp_asg_rec.probation_unit
           ,pa.set_of_books_id = emp_asg_rec.set_of_books_id
           ,pa.source_type = emp_asg_rec.source_type
           ,pa.time_normal_finish = emp_asg_rec.time_normal_finish
           ,pa.time_normal_start = emp_asg_rec.time_normal_start
           ,pa.pay_basis_id = emp_asg_rec.pay_basis_id
           ,pa.ass_attribute_category = decode(l_col_name,'ASSIGNMENT_TYPE','E',pa.ass_attribute_category)
           ,pa.ass_attribute1 = emp_asg_rec.ass_attribute1
           ,pa.ass_attribute2 = emp_asg_rec.ass_attribute2
           ,pa.ass_attribute3 = emp_asg_rec.ass_attribute3
           ,pa.ass_attribute4 = emp_asg_rec.ass_attribute4
           ,pa.ass_attribute5 = emp_asg_rec.ass_attribute5
           ,pa.ass_attribute6 = emp_asg_rec.ass_attribute6
           ,pa.ass_attribute7 = emp_asg_rec.ass_attribute7
           ,pa.ass_attribute8 = emp_asg_rec.ass_attribute8
           ,pa.ass_attribute9 = emp_asg_rec.ass_attribute9
           ,pa.ass_attribute10 = emp_asg_rec.ass_attribute10
           ,pa.ass_attribute11 = emp_asg_rec.ass_attribute11
           ,pa.ass_attribute12 = emp_asg_rec.ass_attribute12
           ,pa.ass_attribute13 = emp_asg_rec.ass_attribute13
           ,pa.ass_attribute14 = emp_asg_rec.ass_attribute14
           ,pa.ass_attribute15 = emp_asg_rec.ass_attribute15
           ,pa.ass_attribute16 = emp_asg_rec.ass_attribute16
           ,pa.ass_attribute17 = emp_asg_rec.ass_attribute17
           ,pa.ass_attribute18 = emp_asg_rec.ass_attribute18
           ,pa.ass_attribute19 = emp_asg_rec.ass_attribute19
           ,pa.ass_attribute20 = emp_asg_rec.ass_attribute20
           ,pa.ass_attribute21 = emp_asg_rec.ass_attribute21
           ,pa.ass_attribute22 = emp_asg_rec.ass_attribute22
           ,pa.ass_attribute23 = emp_asg_rec.ass_attribute23
           ,pa.ass_attribute24 = emp_asg_rec.ass_attribute24
           ,pa.ass_attribute25 = emp_asg_rec.ass_attribute25
           ,pa.ass_attribute26 = emp_asg_rec.ass_attribute26
           ,pa.ass_attribute27 = emp_asg_rec.ass_attribute27
           ,pa.ass_attribute28 = emp_asg_rec.ass_attribute28
           ,pa.ass_attribute29 = emp_asg_rec.ass_attribute29
           ,pa.ass_attribute30 = emp_asg_rec.ass_attribute30
	   ,pa.GRADE_LADDER_PGM_ID= emp_asg_rec.GRADE_LADDER_PGM_ID --  5513751
           ,pa.EMPLOYEE_CATEGORY= emp_asg_rec.EMPLOYEE_CATEGORY -- 5513751
           ,pa.COLLECTIVE_AGREEMENT_id= emp_asg_rec.COLLECTIVE_AGREEMENT_id  -- 5513751
           where pa.rowid = p_rowid;
Line: 3756

                                             ,'INSERT'
                                             ,l_fut_start_date
                                             ,l_fut_end_date);
Line: 3766

                                         ,'INSERT'
                                         ,l_fut_start_date
                                         ,l_fut_end_date);
Line: 3799

			      ,p_mode                 => 'UPDATE'
			      ,p_location_id          => emp_asg_rec.location_id
			      ,p_return_code          => l_return_code
			      ,p_return_text          => l_return_text
			       );
Line: 3824

                            p_datetrack_mode        => hr_api.g_update,
                            p_validation_start_date => p_start_date,
                            p_validation_end_date   => p_end_of_time,
                            p_grade_id              => apl_asg_rec.grade_id,
                            p_spp_delete_warning    => l_delete_warn);
Line: 3835

                              ,'INSERT'
                              ,p_start_date
                              ,l_asg_end_date); -- #1769702
Line: 3856

                                 ,'INSERT'
                                 ,p_start_date
                                 ,l_asg_end_date); -- #1769702
Line: 3887

			      ,p_mode                 => 'UPDATE'
			      ,p_location_id          => emp_asg_rec.location_id
			      ,p_return_code          => l_return_code
			      ,p_return_text          => l_return_text
			       );
Line: 3908

     select pa.rowid
     from per_assignments_f pa
     where pa.assignment_id = p_new_primary_id
     and   p_start_date between pa.effective_start_date
                        and pa.effective_end_date
     for update of pa.effective_end_date;
Line: 3916

      hr_utility.trace('    Update APL asg id => '||to_char(p_new_primary_id));
Line: 3922

       update per_assignments_f
       set effective_end_date = p_start_date - 1
       where rowid = p_rowid;
Line: 3941

  hr_assignment.update_assgn_context_value (p_business_group_id,
					   p_person_id,
					   p_assignment_id,
					   p_start_date);
Line: 3977

   if p_update_primary_flag in ('Y','C','V') then
--
  hr_utility.set_location('hr_person.employ_applicant',2);
Line: 3985

      update_primary_assignment(p_business_group_id
                               ,p_person_id
                               ,p_start_date
                               ,p_current_date
                               ,p_user_id
                               ,p_login_id
                               );
Line: 4003

                   ,p_update_primary_flag
                   ,p_new_primary_id
                   ,p_user_id
                   ,p_login_id
                   ,p_start_date
                   ,p_end_of_time
                   ,p_employee_number
                   ,p_set_of_books_id
                   ,p_current_date);
Line: 4026

                              ,p_update_primary_flag
                              ,p_employee_number
                              ,p_set_of_books_id
                              ,p_emp_apl
                              );
Line: 4032

   else -- update_primary_flag = 'N'
--
  hr_utility.set_location('hr_person.employ_applicant',5);
Line: 4043

                 ,p_update_primary_flag
                 ,p_new_primary_id
                 ,p_user_id
                 ,p_login_id
                 ,p_start_date
                 ,p_end_of_time
                 ,p_employee_number
                 ,p_set_of_books_id
                 ,p_current_date);
Line: 4054

 else -- employing an applicant; update_primary_flag = 'N'
Line: 4065

                     ,p_update_primary_flag
                     ,p_new_primary_id
                     ,p_user_id
                     ,p_login_id
                     ,p_start_date
                     ,p_end_of_time
                     ,p_employee_number
                     ,p_set_of_books_id
                     ,p_current_date);
Line: 4085

                            ,p_update_primary_flag
                            ,p_employee_number
                            ,p_set_of_books_id
                            ,p_emp_apl
                            );
Line: 4114

    cursor asg_cur is select *
      from per_all_assignments_f
      where primary_flag          ='Y'
      and   assignment_type       = 'E'
      and   person_id             = p_person_id
      and   business_group_id + 0 = p_business_group_id
      and   p_start_date between effective_start_date
      and   effective_end_date;
Line: 4128

                     p_action    => 'INSERT');
Line: 4142

    cursor asg_cur is select *
      from per_all_assignments_f
      where
           assignment_type       = 'E'
      and   person_id             = p_person_id
      and   business_group_id + 0 = p_business_group_id
      and   p_start_date between effective_start_date
      and   effective_end_date;
Line: 4152

   select projected_hire_date
   from per_applications
   where application_id =l_appl_id;
Line: 4196

      update per_all_assignments_f
      set date_probation_end =l_date_probation_end
      where
      assignment_type       = 'E'
      and   person_id             = p_person_id
      and   business_group_id + 0 = p_business_group_id
      and   p_start_date between effective_start_date
      and   effective_end_date
      and assignment_id = l_asg_probation_det.assignment_id;
Line: 4253

select pa.assignment_id
,      pa.effective_start_date
from   per_all_assignments_f pa
,     per_assignment_status_types past
where nvl(past.business_group_id,p_business_group_id) = pa.business_group_id + 0
and   pa.person_id               = p_person_id
and   pa.business_group_id + 0   = p_business_group_id
   and
      (( p_apl           = 'Y'
      and  nvl(past.legislation_code, p_legislation_code) = p_legislation_code
      and  past.per_system_status   = 'ACCEPTED'
      and    pa.assignment_type     = 'A'
      and    past.assignment_status_type_id = pa.assignment_status_type_id
      and   p_start_date between pa.effective_start_date
              and   pa.effective_end_date
      )
--if this is a current employee, no need to check legislation code,or
--system status.
   or
      (p_emp            =  'Y'
      and    pa.assignment_type     =  'E'
      and    p_start_date between pa.effective_start_date
                              and pa.effective_end_date
      and    past.assignment_status_type_id = pa.assignment_status_type_id));
Line: 4280

  select 1
  from per_periods_of_service pps
  where pps.person_id =p_person_id
  and date_start <= (select effective_date
                     from   fnd_sessions
                     where  session_id =
                     userenv('sessionid'));
Line: 4288

  select 1
  from per_periods_of_service pps
  where pps.person_id =p_person_id;
Line: 4354

   select pa.assignment_id
    from per_assignments_f pa
    where  pa.person_id = p_person_id
    and    pa.business_group_id + 0 = p_business_group_id
    and    pa.assignment_type = 'A'
    and p_end_date between pa.effective_start_date
                    and pa.effective_end_date -- fix for bug 6036285
    and    pa.assignment_status_type_id IN (
                       select past.assignment_status_type_id
                       from   per_assignment_status_types past
                       ,      per_ass_status_type_amends pasa
                       where  pasa.assignment_status_type_id(+)=
                              past.assignment_status_type_id
                       and    pasa.business_group_id(+) + 0 = p_business_group_id
                       and    nvl(past.business_group_id,p_business_group_id) =
                               p_business_group_id
                       and    nvl(past.legislation_code, p_legislation_code) =
                              p_legislation_code
                       and    nvl(pasa.per_system_status,past.per_system_status) <>
                              'ACCEPTED'
                                          )
      for update of pa.effective_end_date;
Line: 4403

          update per_assignments pa
          set    pa.effective_end_date = l_end_date
          where current of unacc_cur;
Line: 4459

select pe.event_id
from  per_events pe
,     per_assignments_f a
where pe.business_group_id  +0 = a.business_group_id
and   a.business_group_id      = p_business_group_id
and   pe.assignment_id         = a.assignment_id
and   pe.date_start >=p_start_date
and   a.person_id              = p_person_id
and   p_start_date between a.effective_start_date
and   a.effective_end_date
and   pe.event_or_interview = 'E'
for   update of event_id;
Line: 4473

select booking_id
from   per_bookings pb
where   pb.event_id           = l_event_id
for update of booking_id;
Line: 4504

   delete from per_bookings pb
   where pb.event_id = l_event_id;
Line: 4517

   delete from per_events
   where event_id = l_event_id;