DBA Data[Home] [Help]

APPS.BEN_CWB_ASG_UPDATE SQL Statements

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

Line: 79

FUNCTION get_update_mode(
  p_assignment_id  IN per_all_assignments_f.assignment_id%TYPE
 ,p_ovn            IN per_all_assignments_f.object_version_number%TYPE
 ,p_effective_date IN DATE
)
RETURN VARCHAR2
IS
  l_correction           boolean;
Line: 87

  l_update               boolean;
Line: 88

  l_update_override      boolean;
Line: 89

  l_update_change_insert boolean;
Line: 91

  l_datetrack_update_mode varchar2(100);
Line: 110

      ,p_update               => l_update
      ,p_update_override      => l_update_override
      ,p_update_change_insert => l_update_change_insert);
Line: 114

  if l_update then
      -- we can do an update
      l_datetrack_update_mode := hr_api.g_update;
Line: 117

    elsif l_update_change_insert then
      -- we can do an update change insert
      l_datetrack_update_mode := hr_api.g_update_change_insert;
Line: 123

      l_datetrack_update_mode := hr_api.g_correction;
Line: 126

      l_datetrack_update_mode := hr_api.g_update;
Line: 129

  RETURN l_datetrack_update_mode;
Line: 137

procedure delete_transaction
   (p_transaction_id in number
   ,p_transaction_type in varchar2) is
begin
  delete ben_transaction
  where transaction_id = p_transaction_id
  and   transaction_type = p_transaction_type;
Line: 170

       select inf.group_per_in_ler_id
             ,inf.group_pl_id pl_id
             ,inf.lf_evt_ocrd_dt
       from   ben_cwb_person_info inf
             ,ben_cwb_pl_dsgn pl
       where inf.assignment_id         = p_txn_old.transaction_id
       and   inf.group_pl_id           = p_group_pl_id
       and   inf.group_pl_id           = pl.pl_id
       and   inf.lf_evt_ocrd_dt        = pl.lf_evt_ocrd_dt
       and   pl.oipl_id                = -1
       and   to_char(pl.perf_revw_strt_dt,'yyyy/mm/dd') = p_txn_old.attribute1
       and   nvl(pl.emp_interview_typ_cd,'-1') = nvl(p_txn_old.attribute2,'-1');
Line: 185

      select meaning
      from hr_lookups
      where lookup_type = v_lookup_type
      and   lookup_code = v_lookup_code;
Line: 192

      select employee_id
      from fnd_user
      where user_id = l_user_id;
Line: 199

      select *
      from ben_transaction
      where transaction_id = p_assgn_id
      and transaction_type = p_trans_type;
Line: 234

    select * into l_txn_new
    from ben_transaction
    where transaction_id = p_txn_old.transaction_id
    and transaction_type = p_txn_old.transaction_type;
Line: 331

       select inf.group_per_in_ler_id
             ,inf.group_pl_id pl_id
             ,inf.lf_evt_ocrd_dt
       from   ben_cwb_person_info inf
             ,ben_cwb_pl_dsgn pl
       where inf.assignment_id         = p_txn_old.transaction_id
       and   inf.group_pl_id           = p_group_pl_id
       and   inf.group_pl_id           = pl.pl_id
       and   inf.lf_evt_ocrd_dt        = pl.lf_evt_ocrd_dt
       and   pl.oipl_id                = -1
       and   to_char(pl.asg_updt_eff_date,'yyyy/mm/dd') = p_txn_old.attribute1;
Line: 345

      select meaning
      from hr_lookups
      where lookup_type = v_lookup_type
      and   lookup_code = v_lookup_code;
Line: 351

      select employee_id
      from fnd_user
      where user_id = fnd_global.user_id;
Line: 358

      select *
      from ben_transaction
      where transaction_id = v_assgn_id
      and transaction_type = v_trans_type;
Line: 366

      select substr(name,1,200)
      from per_jobs_tl
      where job_id = v_job_id
      and language = v_lang;
Line: 374

      select substr(name,1,200)
      from per_grades_tl
      where grade_id = v_grade_id
      and language = v_lang;
Line: 382

      select substr(name,1,200)
      from hr_all_positions_f_tl
      where position_id = v_position_id
      and language = l_lang;
Line: 405

  select userenv('LANG') into l_lang
  from dual;
Line: 419

    select * into l_txn_new
    from ben_transaction
    where transaction_id = p_txn_old.transaction_id
    and transaction_type = p_txn_old.transaction_type;
Line: 1992

procedure insert_or_update_transaction
    (p_transaction_id      in number
    ,p_transaction_type    in varchar2
    ,p_txn_rec             in g_txn%rowtype) is
  cursor c_found is
     select txn.transaction_id
     from   ben_transaction txn
     where  txn.transaction_id = p_transaction_id
     and    txn.transaction_type = p_transaction_type;
Line: 2009

    insert into ben_transaction
        (transaction_id ,transaction_type
        ,attribute1 ,attribute2
        ,attribute3 ,attribute4
        ,attribute5 ,attribute6
        ,attribute7 ,attribute8
        ,attribute9 ,attribute10
        ,attribute11 ,attribute12
        ,attribute13 ,attribute14
        ,attribute15 ,attribute16
        ,attribute17 ,attribute18
        ,attribute19 ,attribute20
        ,attribute21 ,attribute22
        ,attribute23 ,attribute24
        ,attribute25 ,attribute26
        ,attribute27 ,attribute28
        ,attribute29 ,attribute30
        ,attribute31 ,attribute32
        ,attribute33 ,attribute34
        ,attribute35 ,attribute36
        ,attribute37 ,attribute38
        ,attribute39 ,attribute40)
    values
       (p_transaction_id ,p_transaction_type
       ,p_txn_rec.attribute1 ,p_txn_rec.attribute2
       ,p_txn_rec.attribute3 ,p_txn_rec.attribute4
       ,p_txn_rec.attribute5 ,p_txn_rec.attribute6
       ,p_txn_rec.attribute7 ,p_txn_rec.attribute8
       ,p_txn_rec.attribute9 ,p_txn_rec.attribute10
       ,p_txn_rec.attribute11 ,p_txn_rec.attribute12
       ,p_txn_rec.attribute13 ,p_txn_rec.attribute14
       ,p_txn_rec.attribute15 ,p_txn_rec.attribute16
       ,p_txn_rec.attribute17 ,p_txn_rec.attribute18
       ,p_txn_rec.attribute19 ,p_txn_rec.attribute20
       ,p_txn_rec.attribute21 ,p_txn_rec.attribute22
       ,p_txn_rec.attribute23 ,p_txn_rec.attribute24
       ,p_txn_rec.attribute25 ,p_txn_rec.attribute26
       ,p_txn_rec.attribute27 ,p_txn_rec.attribute28
       ,p_txn_rec.attribute29 ,p_txn_rec.attribute30
       ,p_txn_rec.attribute31 ,p_txn_rec.attribute32
       ,p_txn_rec.attribute33 ,p_txn_rec.attribute34
       ,p_txn_rec.attribute35 ,p_txn_rec.attribute36
       ,p_txn_rec.attribute37 ,p_txn_rec.attribute38
       ,p_txn_rec.attribute39 ,p_txn_rec.attribute40);
Line: 2054

    update ben_transaction
    set attribute1  = p_txn_rec.attribute1
       ,attribute2  = p_txn_rec.attribute2
       ,attribute3  = p_txn_rec.attribute3
       ,attribute4  = p_txn_rec.attribute4
       ,attribute5  = p_txn_rec.attribute5
       ,attribute6  = p_txn_rec.attribute6
       ,attribute7  = p_txn_rec.attribute7
       ,attribute8  = p_txn_rec.attribute8
       ,attribute9  = p_txn_rec.attribute9
       ,attribute10 = p_txn_rec.attribute10
       ,attribute11 = p_txn_rec.attribute11
       ,attribute12 = p_txn_rec.attribute12
       ,attribute13 = p_txn_rec.attribute13
       ,attribute14 = p_txn_rec.attribute14
       ,attribute15 = p_txn_rec.attribute15
       ,attribute16 = p_txn_rec.attribute16
       ,attribute17 = p_txn_rec.attribute17
       ,attribute18 = p_txn_rec.attribute18
       ,attribute19 = p_txn_rec.attribute19
       ,attribute20 = p_txn_rec.attribute20
       ,attribute21 = p_txn_rec.attribute21
       ,attribute22 = p_txn_rec.attribute22
       ,attribute23 = p_txn_rec.attribute23
       ,attribute24 = p_txn_rec.attribute24
       ,attribute25 = p_txn_rec.attribute25
       ,attribute26 = p_txn_rec.attribute26
       ,attribute27 = p_txn_rec.attribute27
       ,attribute28 = p_txn_rec.attribute28
       ,attribute29 = p_txn_rec.attribute29
       ,attribute30 = p_txn_rec.attribute30
       ,attribute31 = p_txn_rec.attribute31
       ,attribute32 = p_txn_rec.attribute32
       ,attribute33 = p_txn_rec.attribute33
       ,attribute34 = p_txn_rec.attribute34
       ,attribute35 = p_txn_rec.attribute35
       ,attribute36 = p_txn_rec.attribute36
       ,attribute37 = p_txn_rec.attribute37
       ,attribute38 = p_txn_rec.attribute38
       ,attribute39 = p_txn_rec.attribute39
       ,attribute40 = p_txn_rec.attribute40
    where transaction_id = p_transaction_id
    and   transaction_type = p_transaction_type;
Line: 2098

end insert_or_update_transaction;
Line: 2109

    ,p_update_person_id       in number
    ,p_update_date            in date
    ,p_group_pl_id            in number) is
  l_txn          g_txn%rowtype;
Line: 2124

   select *
   from ben_transaction
   where transaction_id = p_assgn_id
   and transaction_type = g_ws_perf_rec_typ || p_perf_revw_dt || p_perfor_type;
Line: 2156

    delete_transaction(p_transaction_id => p_assignment_id
                      ,p_transaction_type => g_ws_perf_rec_type||p_perf_revw_strt_dt||p_perf_type);
Line: 2172

  l_txn.attribute4    := to_char(p_update_date, 'yyyy/mm/dd');
Line: 2173

  l_txn.attribute5    := p_update_person_id;
Line: 2192

  insert_or_update_transaction(p_transaction_id   => p_assignment_id
                              ,p_transaction_type => g_ws_perf_rec_type||p_perf_revw_strt_dt||p_perf_type
                              ,p_txn_rec          => l_txn);
Line: 2282

     ,p_update_person_id       in number
     ,p_update_date            in date
     ,p_group_pl_id            in number) is
  l_txn          g_txn%rowtype;
Line: 2297

   select *
   from ben_transaction
   where transaction_id = p_assgn_id
   and transaction_type = g_ws_perf_rec_typ || p_asg_updt_eff_dt;
Line: 2349

    delete_transaction(p_transaction_id => p_assignment_id
                      ,p_transaction_type => g_ws_asg_rec_type||p_asg_updt_eff_date);
Line: 2433

  insert_or_update_transaction(p_transaction_id   => p_assignment_id
                              ,p_transaction_type => g_ws_asg_rec_type||p_asg_updt_eff_date
                              ,p_txn_rec          => l_txn);
Line: 2489

  l_update_event_id          number;
Line: 2490

  l_update_review_id         number;
Line: 2494

     select perf.performance_review_id
           ,perf.event_id
           ,perf.object_version_number
     from  per_performance_reviews perf
     where perf.person_id = p_person_id
     and   perf.review_date = l_perf_date;
Line: 2502

     select evt.type
     from  per_events evt
     where evt.assignment_id = p_txn_rec.assignment_id
     and   evt.date_start <= l_perf_date
     and   evt.event_id = l_event_id;
Line: 2567

	hr_perf_review_api.update_perf_review(
		  p_validate                   => false
		 ,p_performance_review_id      => l_performance_review_id
	         ,p_performance_rating         => p_txn_rec.attribute3
	         ,p_object_version_number      => l_perf_ovn
	         ,p_next_review_date_warning   => l_next_review_date_warning);
Line: 2607

     l_update_event_id := l_event_id;
Line: 2608

     l_update_review_id := l_performance_review_id;
Line: 2609

     update ben_cwb_person_info
     set    new_perf_event_id   = l_update_event_id,
            new_perf_review_id  = l_update_review_id,
	    performance_rating = p_txn_rec.attribute3
     where  group_per_in_ler_id = p_group_per_in_ler_id;
Line: 2646

  l_spp_delete_warning boolean;
Line: 2651

  l_update_position_id number;
Line: 2652

  l_update_done        boolean := false;
Line: 2655

     select asg.*
     from   per_all_assignments_f asg
     where  asg.assignment_id = l_assignment_id
     and    l_effective_date between
            asg.effective_start_date and asg.effective_end_date;
Line: 2706

      l_datetrack_mode := hr_api.g_update;
Line: 2709

     l_datetrack_mode := get_update_mode(
                                p_assignment_id  => l_assignment_id
                               ,p_ovn            => l_asg_rec.object_version_number
                               ,p_effective_date => l_effective_date
                          );
Line: 2716

    hr_assignment_api.update_emp_asg(
      p_validate                  => false
     ,p_effective_date            => l_effective_date
     ,p_datetrack_update_mode     => l_datetrack_mode
     ,p_assignment_id             => l_assignment_id
     ,p_object_version_number     => l_asg_rec.object_version_number
     ,p_change_reason             => nvl(p_asg_txn_rec.attribute3,
                                         l_asg_rec.change_reason)
     ,p_ass_attribute_category    => l_asg_rec.ass_attribute_category
     ,p_ass_attribute1            => nvl(p_asg_txn_rec.attribute11,
                                         l_asg_rec.ass_attribute1)
     ,p_ass_attribute2            => nvl(p_asg_txn_rec.attribute12,
                                         l_asg_rec.ass_attribute2)
     ,p_ass_attribute3            => nvl(p_asg_txn_rec.attribute13,
                                         l_asg_rec.ass_attribute3)
     ,p_ass_attribute4             => nvl(p_asg_txn_rec.attribute14,
                                          l_asg_rec.ass_attribute4)
     ,p_ass_attribute5             => nvl(p_asg_txn_rec.attribute15,
                                          l_asg_rec.ass_attribute5)
     ,p_ass_attribute6             => nvl(p_asg_txn_rec.attribute16,
                                          l_asg_rec.ass_attribute6)
     ,p_ass_attribute7                => nvl(p_asg_txn_rec.attribute17,
                                             l_asg_rec.ass_attribute7)
     ,p_ass_attribute8                => nvl(p_asg_txn_rec.attribute18,
                                             l_asg_rec.ass_attribute8)
     ,p_ass_attribute9                => nvl(p_asg_txn_rec.attribute19,
                                             l_asg_rec.ass_attribute9)
     ,p_ass_attribute10               => nvl(p_asg_txn_rec.attribute20,
                                             l_asg_rec.ass_attribute10)
     ,p_ass_attribute11               => nvl(p_asg_txn_rec.attribute21,
                                             l_asg_rec.ass_attribute11)
     ,p_ass_attribute12               => nvl(p_asg_txn_rec.attribute22,
                                             l_asg_rec.ass_attribute12)
     ,p_ass_attribute13               => nvl(p_asg_txn_rec.attribute23,
                                             l_asg_rec.ass_attribute13)
     ,p_ass_attribute14               => nvl(p_asg_txn_rec.attribute24,
                                             l_asg_rec.ass_attribute14)
     ,p_ass_attribute15               => nvl(p_asg_txn_rec.attribute25,
                                             l_asg_rec.ass_attribute15)
     ,p_ass_attribute16               => nvl(p_asg_txn_rec.attribute26,
                                             l_asg_rec.ass_attribute16)
     ,p_ass_attribute17               => nvl(p_asg_txn_rec.attribute27,
                                             l_asg_rec.ass_attribute17)
     ,p_ass_attribute18               => nvl(p_asg_txn_rec.attribute28,
                                             l_asg_rec.ass_attribute18)
     ,p_ass_attribute19               => nvl(p_asg_txn_rec.attribute29,
                                             l_asg_rec.ass_attribute19)
     ,p_ass_attribute20               => nvl(p_asg_txn_rec.attribute30,
                                             l_asg_rec.ass_attribute20)
     ,p_ass_attribute21               => nvl(p_asg_txn_rec.attribute31,
                                             l_asg_rec.ass_attribute21)
     ,p_ass_attribute22               => nvl(p_asg_txn_rec.attribute32,
                                             l_asg_rec.ass_attribute22)
     ,p_ass_attribute23               => nvl(p_asg_txn_rec.attribute33,
                                             l_asg_rec.ass_attribute23)
     ,p_ass_attribute24               => nvl(p_asg_txn_rec.attribute34,
                                             l_asg_rec.ass_attribute24)
     ,p_ass_attribute25               => nvl(p_asg_txn_rec.attribute35,
                                             l_asg_rec.ass_attribute25)
     ,p_ass_attribute26               => nvl(p_asg_txn_rec.attribute36,
                                             l_asg_rec.ass_attribute26)
     ,p_ass_attribute27               => nvl(p_asg_txn_rec.attribute37,
                                             l_asg_rec.ass_attribute27)
     ,p_ass_attribute28               => nvl(p_asg_txn_rec.attribute38,
                                             l_asg_rec.ass_attribute28)
     ,p_ass_attribute29               => nvl(p_asg_txn_rec.attribute39,
                                             l_asg_rec.ass_attribute29)
     ,p_ass_attribute30               => nvl(p_asg_txn_rec.attribute40,
                                             l_asg_rec.ass_attribute30)
     ,p_concatenated_segments         => l_concat_segments
     ,p_soft_coding_keyflex_id        => l_scl_id
     ,p_comment_id                    => l_comment_id
     ,p_effective_start_date          => l_asg_rec.effective_start_date
     ,p_effective_end_date            => l_asg_rec.effective_end_date
     ,p_no_managers_warning           => l_no_mgr_warning
     ,p_other_manager_warning         => l_othr_mgr_warning);
Line: 2793

    l_update_done := true;
Line: 2808

      l_datetrack_mode := hr_api.g_update;
Line: 2811

    l_datetrack_mode := get_update_mode(
                                p_assignment_id  => l_assignment_id
                               ,p_ovn            => l_asg_rec.object_version_number
                               ,p_effective_date => l_effective_date
                          );
Line: 2829

      l_update_position_id := null;
Line: 2831

      l_update_position_id := nvl(p_asg_txn_rec.attribute6,
                                  l_asg_rec.position_id);
Line: 2835

    hr_assignment_api.update_emp_asg_criteria(
       p_validate                   => false
      ,p_effective_date             => l_effective_date
      ,p_datetrack_update_mode      => l_datetrack_mode
      ,p_assignment_id              => l_assignment_id
      ,p_object_version_number      => l_asg_rec.object_version_number
      ,p_grade_id                   => nvl(p_asg_txn_rec.attribute7,
                                           l_asg_rec.grade_id)
      ,p_position_id                => l_update_position_id
      ,p_job_id                     => nvl(p_asg_txn_rec.attribute5,
                                           l_asg_rec.job_id)
      ,p_special_ceiling_step_id    => l_asg_rec.special_ceiling_step_id
      ,p_group_name                 => l_group_name
      ,p_effective_start_date       => l_asg_rec.effective_start_date
      ,p_effective_end_date         => l_asg_rec.effective_end_date
      ,p_people_group_id            => l_people_group_id
      ,p_org_now_no_manager_warning => l_no_mgr_warning
      ,p_other_manager_warning      => l_othr_mgr_warning
      ,p_spp_delete_warning         => l_spp_delete_warning
      ,p_entries_changed_warning    => l_entry_chg_warning
      ,p_tax_district_changed_warning => l_tax_dist_changed);
Line: 2857

    l_update_done := true;
Line: 2862

  if p_group_per_in_ler_id is not null and l_update_done then
    --
    update ben_cwb_person_info
    set    new_assgn_ovn       = l_asg_rec.object_version_number
    where  group_per_in_ler_id = p_group_per_in_ler_id;