491: l_effective_start_date date;
492: l_effective_end_date date;
493: l_delete_warning boolean;
494: l_exists BOOLEAN := FALSE;
495: l_pgm_id ben_pgm_f.pgm_id%type;
496:
497: -- Cursor to get Program
498: CURSOR c_get_pgm_id(c_prog_name ben_pgm_f.name%type,
499: c_business_group_id ben_pgm_f.business_group_id%type,
494: l_exists BOOLEAN := FALSE;
495: l_pgm_id ben_pgm_f.pgm_id%type;
496:
497: -- Cursor to get Program
498: CURSOR c_get_pgm_id(c_prog_name ben_pgm_f.name%type,
499: c_business_group_id ben_pgm_f.business_group_id%type,
500: c_effective_date ben_pgm_f.effective_start_date%type) is
501: SELECT pgm.pgm_id
502: FROM ben_pgm_f pgm
495: l_pgm_id ben_pgm_f.pgm_id%type;
496:
497: -- Cursor to get Program
498: CURSOR c_get_pgm_id(c_prog_name ben_pgm_f.name%type,
499: c_business_group_id ben_pgm_f.business_group_id%type,
500: c_effective_date ben_pgm_f.effective_start_date%type) is
501: SELECT pgm.pgm_id
502: FROM ben_pgm_f pgm
503: WHERE pgm.name = c_prog_name
496:
497: -- Cursor to get Program
498: CURSOR c_get_pgm_id(c_prog_name ben_pgm_f.name%type,
499: c_business_group_id ben_pgm_f.business_group_id%type,
500: c_effective_date ben_pgm_f.effective_start_date%type) is
501: SELECT pgm.pgm_id
502: FROM ben_pgm_f pgm
503: WHERE pgm.name = c_prog_name
504: AND pgm.business_group_id = c_business_group_id
498: CURSOR c_get_pgm_id(c_prog_name ben_pgm_f.name%type,
499: c_business_group_id ben_pgm_f.business_group_id%type,
500: c_effective_date ben_pgm_f.effective_start_date%type) is
501: SELECT pgm.pgm_id
502: FROM ben_pgm_f pgm
503: WHERE pgm.name = c_prog_name
504: AND pgm.business_group_id = c_business_group_id
505: AND c_effective_date between effective_start_date and effective_end_date;
506:
505: AND c_effective_date between effective_start_date and effective_end_date;
506:
507: CURSOR c_emp_in_ben(c_person_id ben_prtt_enrt_rslt_f.person_id%type,
508: c_pgm_id ben_prtt_enrt_rslt_f.pgm_id%type,
509: c_effective_date ben_pgm_f.effective_start_date%type) is
510: SELECT 1
511: FROM ben_prtt_enrt_rslt_f
512: WHERE person_id = c_person_id
513: AND pgm_id = c_pgm_id