DBA Data[Home] [Help]

APPS.BEN_PLAN_BENEFICIARY_API SQL Statements

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

Line: 64

  ,p_program_update_date            in  date      default null
  ,p_object_version_number          out nocopy number
  ,p_per_in_ler_id                  in  number    default null
  ,p_effective_date                 in  date
  ,p_multi_row_actn                 in  boolean   default TRUE
  ) is
  --
  --
  -- Declare cursors and local variables
  --
  l_pl_bnf_id                  ben_pl_bnf_f.pl_bnf_id%TYPE;
Line: 82

  select pil.per_in_ler_id
from ben_prtt_enrt_rslt_f pen ,
     ben_per_in_ler pil
where pen.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
  and pen.per_in_ler_id = pil.per_in_ler_id
  and pen.prtt_enrt_rslt_stat_cd is null
  and pil.per_in_ler_stat_cd not in ('BCKDT','VOIDD')
  order by pil.lf_evt_ocrd_dt asc;
Line: 183

      ,p_program_update_date            =>  p_program_update_date
      ,p_per_in_ler_id                  =>  l_per_in_ler_id
      ,p_effective_date                 =>  trunc(p_effective_date)
      );
Line: 250

    ,p_program_update_date           => p_program_update_date
    ,p_object_version_number         => l_object_version_number
    ,p_per_in_ler_id                 => l_per_in_ler_id
    ,p_effective_date                => trunc(p_effective_date)
    );
Line: 344

      ,p_program_update_date            =>  p_program_update_date
      ,p_object_version_number          =>  l_object_version_number
      ,p_per_in_ler_id                  =>  l_per_in_ler_id
      ,p_effective_date                 =>  trunc(p_effective_date)
      );
Line: 527

procedure update_PLAN_BENEFICIARY
  (p_validate                       in  boolean   default false
  ,p_pl_bnf_id                      in  number
  ,p_effective_start_date           out nocopy date
  ,p_effective_end_date             out nocopy date
  ,p_business_group_id              in  number    default hr_api.g_number
  ,p_prtt_enrt_rslt_id              in  number    default hr_api.g_number
  ,p_bnf_person_id                  in  number    default hr_api.g_number
  ,p_organization_id                in  number    default hr_api.g_number
  ,p_ttee_person_id                 in  number    default hr_api.g_number
  ,p_prmry_cntngnt_cd               in  varchar2  default hr_api.g_varchar2
  ,p_pct_dsgd_num                   in  number    default hr_api.g_number
  ,p_amt_dsgd_val                   in  number    default hr_api.g_number
  ,p_amt_dsgd_uom                   in  varchar2  default hr_api.g_varchar2
  ,p_dsgn_strt_dt                   in  date      default hr_api.g_date
  ,p_dsgn_thru_dt                   in  date      default hr_api.g_date
  ,p_addl_instrn_txt                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute_category         in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute1                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute2                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute3                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute4                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute5                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute6                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute7                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute8                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute9                 in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute10                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute11                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute12                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute13                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute14                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute15                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute16                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute17                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute18                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute19                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute20                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute21                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute22                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute23                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute24                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute25                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute26                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute27                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute28                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute29                in  varchar2  default hr_api.g_varchar2
  ,p_pbn_attribute30                in  varchar2  default hr_api.g_varchar2
  ,p_request_id                     in  number    default hr_api.g_number
  ,p_program_application_id         in  number    default hr_api.g_number
  ,p_program_id                     in  number    default hr_api.g_number
  ,p_program_update_date            in  date      default hr_api.g_date
  ,p_object_version_number          in out nocopy number
  ,p_per_in_ler_id                  in  number    default hr_api.g_number
 ,p_effective_date                 in  date
  ,p_datetrack_mode                 in  varchar2
  ,p_multi_row_actn                 in  boolean   default TRUE
  ) is
  --
  -- Declare cursors and local variables
  --
  --
  l_proc varchar2(72) := g_package||'update_PLAN_BENEFICIARY';
Line: 617

  savepoint update_PLAN_BENEFICIARY;
Line: 630

    ben_PLAN_BENEFICIARY_bk2.update_PLAN_BENEFICIARY_b
      (
       p_pl_bnf_id                      =>  p_pl_bnf_id
      ,p_business_group_id              =>  p_business_group_id
      ,p_prtt_enrt_rslt_id              =>  p_prtt_enrt_rslt_id
      ,p_bnf_person_id                  =>  p_bnf_person_id
      ,p_organization_id                =>  p_organization_id
      ,p_ttee_person_id                 =>  p_ttee_person_id
      ,p_prmry_cntngnt_cd               =>  p_prmry_cntngnt_cd
      ,p_pct_dsgd_num                   =>  p_pct_dsgd_num
      ,p_amt_dsgd_val                   =>  p_amt_dsgd_val
      ,p_amt_dsgd_uom                   =>  p_amt_dsgd_uom
      ,p_dsgn_strt_dt                   =>  p_dsgn_strt_dt
      ,p_dsgn_thru_dt                   =>  p_dsgn_thru_dt
      ,p_addl_instrn_txt                =>  p_addl_instrn_txt
      ,p_pbn_attribute_category         =>  p_pbn_attribute_category
      ,p_pbn_attribute1                 =>  p_pbn_attribute1
      ,p_pbn_attribute2                 =>  p_pbn_attribute2
      ,p_pbn_attribute3                 =>  p_pbn_attribute3
      ,p_pbn_attribute4                 =>  p_pbn_attribute4
      ,p_pbn_attribute5                 =>  p_pbn_attribute5
      ,p_pbn_attribute6                 =>  p_pbn_attribute6
      ,p_pbn_attribute7                 =>  p_pbn_attribute7
      ,p_pbn_attribute8                 =>  p_pbn_attribute8
      ,p_pbn_attribute9                 =>  p_pbn_attribute9
      ,p_pbn_attribute10                =>  p_pbn_attribute10
      ,p_pbn_attribute11                =>  p_pbn_attribute11
      ,p_pbn_attribute12                =>  p_pbn_attribute12
      ,p_pbn_attribute13                =>  p_pbn_attribute13
      ,p_pbn_attribute14                =>  p_pbn_attribute14
      ,p_pbn_attribute15                =>  p_pbn_attribute15
      ,p_pbn_attribute16                =>  p_pbn_attribute16
      ,p_pbn_attribute17                =>  p_pbn_attribute17
      ,p_pbn_attribute18                =>  p_pbn_attribute18
      ,p_pbn_attribute19                =>  p_pbn_attribute19
      ,p_pbn_attribute20                =>  p_pbn_attribute20
      ,p_pbn_attribute21                =>  p_pbn_attribute21
      ,p_pbn_attribute22                =>  p_pbn_attribute22
      ,p_pbn_attribute23                =>  p_pbn_attribute23
      ,p_pbn_attribute24                =>  p_pbn_attribute24
      ,p_pbn_attribute25                =>  p_pbn_attribute25
      ,p_pbn_attribute26                =>  p_pbn_attribute26
      ,p_pbn_attribute27                =>  p_pbn_attribute27
      ,p_pbn_attribute28                =>  p_pbn_attribute28
      ,p_pbn_attribute29                =>  p_pbn_attribute29
      ,p_pbn_attribute30                =>  p_pbn_attribute30
      ,p_request_id                     =>  p_request_id
      ,p_program_application_id         =>  p_program_application_id
      ,p_program_id                     =>  p_program_id
      ,p_program_update_date            =>  p_program_update_date
      ,p_object_version_number          =>  p_object_version_number
      ,p_per_in_ler_id                  =>  p_per_in_ler_id
      ,p_effective_date                 => trunc(p_effective_date)
      ,p_datetrack_mode                 => p_datetrack_mode
      );
Line: 688

        (p_module_name => 'UPDATE_PLAN_BENEFICIARY'
        ,p_hook_type   => 'BP'
        );
Line: 747

    ,p_program_update_date           => p_program_update_date
    ,p_object_version_number         => l_object_version_number
    ,p_per_in_ler_id                 => p_per_in_ler_id
    ,p_effective_date                => trunc(p_effective_date)
    ,p_datetrack_mode                => p_datetrack_mode
    );
Line: 773

     ben_prtt_enrt_actn_api.delete_prtt_enrt_actn
          (p_validate              => p_validate,
           p_effective_date        => p_effective_date,
           p_business_group_id     => p_business_group_id,
           p_datetrack_mode        => hr_api.g_zap,
           p_object_version_number => l_object_version_number,
           p_prtt_enrt_rslt_id     => p_prtt_enrt_rslt_id,
           p_rslt_object_version_number => l_rslt_object_version_number,
           p_unsuspend_enrt_flag   => 'N',
           p_effective_start_date  => l_effective_start_date,
           p_effective_end_date    => l_effective_end_date,
           p_prtt_enrt_actn_id     => l_prtt_enrt_actn_id);
Line: 797

    if p_datetrack_mode = 'UPDATE' then
      l2_datetrack_mode := 'DELETE';
Line: 841

    ben_PLAN_BENEFICIARY_bk2.update_PLAN_BENEFICIARY_a
      (
       p_pl_bnf_id                      =>  p_pl_bnf_id
      ,p_effective_start_date           =>  l_effective_start_date
      ,p_effective_end_date             =>  l_effective_end_date
      ,p_business_group_id              =>  p_business_group_id
      ,p_prtt_enrt_rslt_id              =>  p_prtt_enrt_rslt_id
      ,p_bnf_person_id                  =>  p_bnf_person_id
      ,p_organization_id                =>  p_organization_id
      ,p_ttee_person_id                 =>  p_ttee_person_id
      ,p_prmry_cntngnt_cd               =>  p_prmry_cntngnt_cd
      ,p_pct_dsgd_num                   =>  p_pct_dsgd_num
      ,p_amt_dsgd_val                   =>  p_amt_dsgd_val
      ,p_amt_dsgd_uom                   =>  p_amt_dsgd_uom
      ,p_dsgn_strt_dt                   =>  p_dsgn_strt_dt
      ,p_dsgn_thru_dt                   =>  p_dsgn_thru_dt
      ,p_addl_instrn_txt                =>  p_addl_instrn_txt
      ,p_pbn_attribute_category         =>  p_pbn_attribute_category
      ,p_pbn_attribute1                 =>  p_pbn_attribute1
      ,p_pbn_attribute2                 =>  p_pbn_attribute2
      ,p_pbn_attribute3                 =>  p_pbn_attribute3
      ,p_pbn_attribute4                 =>  p_pbn_attribute4
      ,p_pbn_attribute5                 =>  p_pbn_attribute5
      ,p_pbn_attribute6                 =>  p_pbn_attribute6
      ,p_pbn_attribute7                 =>  p_pbn_attribute7
      ,p_pbn_attribute8                 =>  p_pbn_attribute8
      ,p_pbn_attribute9                 =>  p_pbn_attribute9
      ,p_pbn_attribute10                =>  p_pbn_attribute10
      ,p_pbn_attribute11                =>  p_pbn_attribute11
      ,p_pbn_attribute12                =>  p_pbn_attribute12
      ,p_pbn_attribute13                =>  p_pbn_attribute13
      ,p_pbn_attribute14                =>  p_pbn_attribute14
      ,p_pbn_attribute15                =>  p_pbn_attribute15
      ,p_pbn_attribute16                =>  p_pbn_attribute16
      ,p_pbn_attribute17                =>  p_pbn_attribute17
      ,p_pbn_attribute18                =>  p_pbn_attribute18
      ,p_pbn_attribute19                =>  p_pbn_attribute19
      ,p_pbn_attribute20                =>  p_pbn_attribute20
      ,p_pbn_attribute21                =>  p_pbn_attribute21
      ,p_pbn_attribute22                =>  p_pbn_attribute22
      ,p_pbn_attribute23                =>  p_pbn_attribute23
      ,p_pbn_attribute24                =>  p_pbn_attribute24
      ,p_pbn_attribute25                =>  p_pbn_attribute25
      ,p_pbn_attribute26                =>  p_pbn_attribute26
      ,p_pbn_attribute27                =>  p_pbn_attribute27
      ,p_pbn_attribute28                =>  p_pbn_attribute28
      ,p_pbn_attribute29                =>  p_pbn_attribute29
      ,p_pbn_attribute30                =>  p_pbn_attribute30
      ,p_request_id                     =>  p_request_id
      ,p_program_application_id         =>  p_program_application_id
      ,p_program_id                     =>  p_program_id
      ,p_program_update_date            =>  p_program_update_date
      ,p_object_version_number          =>  l_object_version_number
      ,p_per_in_ler_id                  =>  p_per_in_ler_id
      ,p_effective_date                 => trunc(p_effective_date)
      ,p_datetrack_mode                 => p_datetrack_mode
      );
Line: 901

        (p_module_name => 'UPDATE_PLAN_BENEFICIARY'
        ,p_hook_type   => 'AP'
        );
Line: 932

    ROLLBACK TO update_PLAN_BENEFICIARY;
Line: 946

    ROLLBACK TO update_PLAN_BENEFICIARY;
Line: 951

end update_PLAN_BENEFICIARY;
Line: 957

procedure update_plan_beneficiary_w
(
   p_validate                       in  varchar2
  ,p_pl_bnf_id                      in  number
  ,p_effective_start_date           out nocopy date
  ,p_effective_end_date             out nocopy date
  ,p_business_group_id              in  number
  ,p_prtt_enrt_rslt_id              in  number
  ,p_bnf_person_id                  in  number    default hr_api.g_number
  ,p_organization_id                in  number    default hr_api.g_number
  ,p_prmry_cntngnt_cd               in  varchar2
  ,p_pct_dsgd_num                   in  number
  ,p_dsgn_strt_dt                   in  date
  ,p_dsgn_thru_dt                   in  date
  ,p_object_version_number      in  out nocopy number
  ,p_per_in_ler_id                  in  number
  ,p_effective_date                 in  date
  ,p_datetrack_mode                 in  varchar2
  ,p_multi_row_actn                 in  varchar2
)
is

  l_proc varchar2(72) := g_package||'update_plan_beneficiary - wrapper';
Line: 1024

  update_plan_beneficiary
  (
     p_validate                =>    l_validate
    ,p_pl_bnf_id               =>    p_pl_bnf_id
    ,p_effective_start_date    =>    l_effective_start_date
    ,p_effective_end_date      =>    l_effective_end_date
    ,p_business_group_id       =>    p_business_group_id
    ,p_prtt_enrt_rslt_id       =>    p_prtt_enrt_rslt_id
    ,p_bnf_person_id           =>    p_bnf_person_id
    ,p_organization_id         =>    p_organization_id
    ,p_prmry_cntngnt_cd        =>    p_prmry_cntngnt_cd
    ,p_pct_dsgd_num            =>    p_pct_dsgd_num
    ,p_amt_dsgd_val            =>    null
    ,p_amt_dsgd_uom            =>    null
    ,p_dsgn_strt_dt            =>    p_dsgn_strt_dt
    ,p_dsgn_thru_dt            =>    p_dsgn_thru_dt
    ,p_object_version_number   =>    l_object_version_number
    ,p_per_in_ler_id           =>    p_per_in_ler_id
    ,p_effective_date          =>    p_effective_date
    ,p_datetrack_mode          =>    p_datetrack_mode
    ,p_multi_row_actn          =>    l_multi_row_actn
  );
Line: 1067

end update_plan_beneficiary_w;
Line: 1073

procedure delete_PLAN_BENEFICIARY
  (p_validate                       in  boolean  default false
  ,p_pl_bnf_id                      in  number
  ,p_effective_start_date           out nocopy date
  ,p_effective_end_date             out nocopy date
  ,p_object_version_number          in out nocopy number
  ,p_business_group_id              in number
  ,p_effective_date                 in  date
  ,p_datetrack_mode                 in  varchar2
  ,p_multi_row_actn                 in  boolean   default TRUE
  ) is
  --
  -- Declare cursors and local variables
  --
  l_proc varchar2(72) := g_package||'DELETE_PLAN_BENEFICIARY';
Line: 1101

     select effective_start_date
       from ben_pl_bnf_f pnb
      where pnb.pl_bnf_id = p_pl_bnf_id
        and p_effective_date between pnb.effective_start_date
                                 and pnb.effective_end_date ;
Line: 1109

     select pl_bnf_ctfn_prvdd_id,
            object_version_number,
            effective_end_date
       from ben_pl_bnf_ctfn_prvdd_f
       where pl_bnf_id = p_pl_bnf_id
         and business_group_id = p_business_group_id
         and l_effective_date between effective_start_date
                                  and effective_end_date;
Line: 1120

    select null
    from ben_pl_bnf_ctfn_prvdd_f
    where pl_bnf_ctfn_prvdd_id = p_pl_bnf_ctfn_prvdd_id
    and   effective_start_date > p_effective_date;
Line: 1126

     select distinct pl_bnf_ctfn_prvdd_id
     from   ben_pl_bnf_ctfn_prvdd_f
     where  pl_bnf_id = p_pl_bnf_id;
Line: 1131

     select max(object_version_number)
     from   ben_pl_bnf_ctfn_prvdd_f
     where  pl_bnf_ctfn_prvdd_id = l_pl_bnf_ctfn_prvdd_id;
Line: 1148

  elsif p_datetrack_mode = hr_api.g_delete then
    l_effective_date := p_effective_date - 1 ;
Line: 1173

  savepoint delete_PLAN_BENEFICIARY;
Line: 1192

         ben_pl_bnf_ctfn_prvdd_api.delete_pl_bnf_ctfn_prvdd
           (p_validate                 => FALSE
           ,p_pl_bnf_ctfn_prvdd_id     => ctfn_rec.pl_bnf_ctfn_prvdd_id
           ,p_effective_start_date     => l2_effective_start_date
           ,p_effective_end_date       => l2_effective_end_date
           ,p_object_version_number    => l2_object_version_number
           ,p_business_group_id        => p_business_group_id
           ,p_effective_date           => l_effective_date
           ,p_datetrack_mode           => l_datetrack_mode
           );
Line: 1222

                 l_datetrack_mode := hr_api.g_delete;
Line: 1228

            ben_pl_bnf_ctfn_prvdd_api.delete_pl_bnf_ctfn_prvdd
              (p_validate                 => FALSE
              ,p_pl_bnf_ctfn_prvdd_id     => ctfn_rec.pl_bnf_ctfn_prvdd_id
              ,p_effective_start_date     => l2_effective_start_date
              ,p_effective_end_date       => l2_effective_end_date
              ,p_object_version_number    => l2_object_version_number
              ,p_business_group_id        => p_business_group_id
              ,p_effective_date           => l_effective_date
              ,p_datetrack_mode           => l_datetrack_mode
              );
Line: 1249

    ben_PLAN_BENEFICIARY_bk3.delete_PLAN_BENEFICIARY_b
      (
       p_pl_bnf_id                      =>  p_pl_bnf_id
      ,p_object_version_number          =>  p_object_version_number
      ,p_effective_date                      => trunc(l_effective_date)
      ,p_datetrack_mode                      => l_datetrack_mode
      );
Line: 1259

        (p_module_name => 'DELETE_PLAN_BENEFICIARY'
        ,p_hook_type   => 'BP'
        );
Line: 1269

     otherwise process will recreate the action items which got deleted above.
  --  Call Action item RCO if p_multi_row_actn = TRUE
  --
  if p_multi_row_actn then
    --
    bnf_actn_items(
           p_prtt_enrt_rslt_id  => null
          ,p_pl_bnf_id          => p_pl_bnf_id
          ,p_effective_date     => l_effective_date
          ,p_business_group_id  => null
          ,p_validate           => p_validate
          ,p_datetrack_mode     => l_datetrack_mode
          ,p_delete_flag        => 'Y'
          );
Line: 1291

  if p_datetrack_mode not in ('FUTURE_CHANGE','DELETE_NEXT_CHANGE') then
   --
    remove_usage(
     p_validate          => p_validate
    ,p_pl_bnf_id         => p_pl_bnf_id
    ,p_effective_date    => l_effective_date
    ,p_datetrack_mode    => l_datetrack_mode
    ,p_business_group_id => p_business_group_id
		-- 5668052
		,p_dsgn_thru_dt      => NULL
    );
Line: 1326

          ,p_delete_flag        => 'Y'
          );
Line: 1335

    ben_PLAN_BENEFICIARY_bk3.delete_PLAN_BENEFICIARY_a
      (
       p_pl_bnf_id                      =>  p_pl_bnf_id
      ,p_effective_start_date           =>  l_effective_start_date
      ,p_effective_end_date             =>  l_effective_end_date
      ,p_object_version_number          =>  l_object_version_number
    ,p_effective_date                      => trunc(l_effective_date)
    ,p_datetrack_mode                      => l_datetrack_mode
      );
Line: 1347

        (p_module_name => 'DELETE_PLAN_BENEFICIARY'
        ,p_hook_type   => 'AP'
        );
Line: 1372

    ROLLBACK TO delete_PLAN_BENEFICIARY;
Line: 1385

    ROLLBACK TO delete_PLAN_BENEFICIARY;
Line: 1390

end delete_PLAN_BENEFICIARY;
Line: 1396

procedure delete_plan_beneficiary_w
(
   p_validate                       in  varchar2
  ,p_pl_bnf_id                      in  number
  ,p_effective_start_date           out nocopy date
  ,p_effective_end_date             out nocopy date
  ,p_object_version_number      in  out nocopy number
  ,p_business_group_id              in  number
  ,p_effective_date                 in  date
  ,p_datetrack_mode                 in  varchar2
  ,p_prtt_enrt_rslt_id              in number
  ,p_multi_row_actn                 in  varchar2
  )
is

  l_proc varchar2(72) := g_package||'delete_plan_beneficiary - wrapper';
Line: 1462

  delete_plan_beneficiary
  (
     p_validate                =>    l_validate
    ,p_pl_bnf_id               =>    p_pl_bnf_id
    ,p_effective_start_date    =>    l_effective_start_date
    ,p_effective_end_date      =>    l_effective_end_date
    ,p_business_group_id       =>    p_business_group_id
    ,p_object_version_number   =>    l_object_version_number
    ,p_effective_date          =>    p_effective_date
    ,p_datetrack_mode          =>    p_datetrack_mode
    ,p_multi_row_actn          =>    l_multi_row_actn
  );
Line: 1491

          ,p_delete_flag        => 'N'
          );
Line: 1508

end delete_plan_beneficiary_w;
Line: 1561

  ,p_delete_flag                    in     varchar2 default 'N'
  ) is
--
l_proc varchar2(72) := g_package||'bnf_actn_items';
Line: 1581

   select prtt_enrt_rslt_id,
          business_group_id,
          decode(prmry_cntngnt_cd, 'PRIMY',pct_dsgd_num,0)   prmry_dsgd_pct,
          decode(prmry_cntngnt_cd, 'CNTNGNT',pct_dsgd_num,0) cntngnt_dsgd_pct,
          decode(prmry_cntngnt_cd, 'PRIMY',amt_dsgd_val,0)   prmry_dsgd_amt,
          decode(prmry_cntngnt_cd, 'CNTNGNT',amt_dsgd_val,0) cntngnt_dsgd_amt
    from ben_pl_bnf_f
    where pl_bnf_id = p_pl_bnf_id
      and p_effective_date between effective_start_date
                               and effective_end_date;
Line: 1593

   select object_version_number,
          sspndd_flag,
          bnft_amt
   from   ben_prtt_enrt_rslt_f
   where  prtt_enrt_rslt_id = l_prtt_enrt_rslt_id
   and    business_group_id = l_business_group_id
   and    prtt_enrt_rslt_stat_cd is null
   and    p_effective_date
          between effective_start_date and effective_end_date;
Line: 1604

  select pbn.prmry_cntngnt_cd prmry_cntngnt_cd,
         sum(pbn.pct_dsgd_num) prcnt,
         sum(pbn.amt_dsgd_val) amount
    from ben_pl_bnf_f pbn,
         ben_per_in_ler pil
   where pbn.prtt_enrt_rslt_id = l_prtt_enrt_rslt_id
     and pbn.business_group_id = l_business_group_id
     -- and p_effective_date between pbn.effective_start_date and pbn.effective_end_date
     and p_effective_date >= pbn.effective_start_date
     and p_effective_date <   pbn.effective_end_date
     and pil.per_in_ler_id=pbn.per_in_ler_id
     and pil.per_in_ler_stat_cd not in ('VOIDD','BCKDT')
   group by pbn.prmry_cntngnt_cd;
Line: 1624

      p_delete_flag  = 'Y' then
      --
      open get_rslt_id_c;
Line: 1635

      if p_delete_flag = 'N' then
        l_prmry_dsgd_pct   := 0;
Line: 1754

    select person_type_id
      from per_person_types
      where system_person_type = 'BNF'
        and business_group_id = p_business_group_id;
Line: 1760

    select enrt_cvg_strt_dt
      from ben_prtt_enrt_rslt_f   a
      where a.prtt_enrt_rslt_id = p_prtt_enrt_rslt_id
        and a.business_group_id = p_business_group_id
        and a.prtt_enrt_rslt_stat_cd is null
        and p_effective_date between nvl(a.effective_start_date, p_effective_date)
                                 and nvl(a.effective_end_date, p_effective_date);
Line: 1771

    select a.effective_start_date,
           a.effective_end_date,
           a.person_type_usage_id
    from per_person_type_usages_f    a
    where a.person_id = p_bnf_person_id
      and a.person_type_id = l_person_type_id
     -- and a.effective_start_date <= hr_api.g_date
      and a.effective_end_date >= l_dsg_strt_dt
     ;
Line: 1850

               update per_person_type_usages_f
                   set effective_end_date = hr_api.g_date
                   where person_type_usage_id = l_person_type_usage_id;
Line: 1856

              update per_person_type_usages_f
                   set effective_start_date = l_dsg_strt_dt
                where person_type_usage_id = l_person_type_usage_id;
Line: 1863

              update per_person_type_usages_f
                   set effective_start_date = l_dsg_strt_dt,
                       effective_end_date   = hr_api.g_date
                    where person_type_usage_id = l_person_type_usage_id;
Line: 1914

    select b.bnf_person_id,
           b.business_group_id
      from ben_pl_bnf_f  b
     where b.pl_bnf_id = p_pl_bnf_id
       and business_group_id = p_business_group_id
       and p_effective_date between b.effective_start_date
                                and b.effective_end_date;
Line: 1923

     select null
       from ben_pl_bnf_f a
      where a.bnf_person_id = l_bnf_person_id
        and a.business_group_id = p_business_group_id
        and a.pl_bnf_id <> p_pl_bnf_id
        -- and p_effective_date between a.effective_start_date
        --                            and a.effective_end_date;
Line: 1934

    select a.person_type_usage_id,
           a.object_version_number,
           a.effective_end_date
					 -- bug 5668052
					 ,a.effective_start_date
      from per_person_type_usages_f a,
           per_person_types         b
     where a.person_id = l_bnf_person_id
       and a.person_type_id = b.person_type_id
       and b.system_person_type = 'BNF'
       and b.business_group_id = l_business_group_id
       and p_effective_date between a.effective_start_date
                                     and a.effective_end_date;
Line: 1951

      SELECT pl_bnf_id
        FROM ben_pl_bnf_f pbn
       WHERE pbn.bnf_person_id = v_bnf_person_id
			   AND pbn.pl_bnf_id <> p_pl_bnf_id
         AND pbn.business_group_id = p_business_group_id;
Line: 1987

				   if l_datetrack_mode = hr_api.g_delete
					    and p_dsgn_thru_dt < l_usg_effective_start_date
					    then
						   l_datetrack_mode := 'ZAP';
Line: 1994

				if l_datetrack_mode = 'DELETE' AND l_effective_end_date = hr_api.g_eot
                               then


					hr_per_type_usage_internal.delete_person_type_usage
          (p_validate               =>  FALSE
          ,p_person_type_usage_id   =>  l_person_type_usage_id
          ,p_effective_date         =>  p_effective_date
          -- ,p_datetrack_mode         =>  p_datetrack_mode
					,p_datetrack_mode         =>  l_datetrack_mode
          ,p_object_version_number  =>  l_object_version_number
          ,p_effective_start_date   =>  l_effective_start_date
          ,p_effective_end_date     =>  l_effective_end_date
          );
Line: 2016

								hr_utility.set_location('Deleteing in zap mode ',121);
Line: 2017

								hr_per_type_usage_internal.delete_person_type_usage
								(p_validate               =>  FALSE
								,p_person_type_usage_id   =>  l_person_type_usage_id
								,p_effective_date         =>  p_effective_date
								-- ,p_datetrack_mode         =>  p_datetrack_mode
								,p_datetrack_mode         =>  l_datetrack_mode
								,p_object_version_number  =>  l_object_version_number
								,p_effective_start_date   =>  l_effective_start_date
								,p_effective_end_date     =>  l_effective_end_date
								);