140: l_scnd_val := rpad(l_scnd_val,l_scnd_val_max);
141: l_thrd_val := rpad(l_thrd_val,l_thrd_val_max);
142: l_frth_val := rpad(l_frth_val,l_frth_val_max);
143: --
144: l_person_id := lpad(to_char(ben_ext_person.g_person_id),l_person_id_max,'0');
145: l_ext_chg_evt_log_id := lpad(to_char(nvl(ben_ext_person.g_ext_chg_evt_log_id,0)),g_ext_chg_evt_log_id_max,'0');
146: l_per_cm_prvdd_id := lpad(to_char(nvl(ben_ext_person.g_per_cm_prvdd_id,0)),g_per_cm_prvdd_id_max,'0');
147: --
148: g_prmy_sort_val := l_prmy_val ||
141: l_thrd_val := rpad(l_thrd_val,l_thrd_val_max);
142: l_frth_val := rpad(l_frth_val,l_frth_val_max);
143: --
144: l_person_id := lpad(to_char(ben_ext_person.g_person_id),l_person_id_max,'0');
145: l_ext_chg_evt_log_id := lpad(to_char(nvl(ben_ext_person.g_ext_chg_evt_log_id,0)),g_ext_chg_evt_log_id_max,'0');
146: l_per_cm_prvdd_id := lpad(to_char(nvl(ben_ext_person.g_per_cm_prvdd_id,0)),g_per_cm_prvdd_id_max,'0');
147: --
148: g_prmy_sort_val := l_prmy_val ||
149: l_scnd_val ||
142: l_frth_val := rpad(l_frth_val,l_frth_val_max);
143: --
144: l_person_id := lpad(to_char(ben_ext_person.g_person_id),l_person_id_max,'0');
145: l_ext_chg_evt_log_id := lpad(to_char(nvl(ben_ext_person.g_ext_chg_evt_log_id,0)),g_ext_chg_evt_log_id_max,'0');
146: l_per_cm_prvdd_id := lpad(to_char(nvl(ben_ext_person.g_per_cm_prvdd_id,0)),g_per_cm_prvdd_id_max,'0');
147: --
148: g_prmy_sort_val := l_prmy_val ||
149: l_scnd_val ||
150: l_thrd_val ||
188: l_thrd_val := rpad(l_thrd_val,l_thrd_val_max);
189: l_frth_val := rpad(l_frth_val,l_frth_val_max);
190: --
191: if p_low_lvl_cd = 'E' then
192: l_dflt_id := ben_ext_person.g_enrt_benefit_order_num;
193: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
194: elsif p_low_lvl_cd = 'G' then
195: l_dflt_val := lpad(to_char(nvl(ben_ext_person.g_elig_pl_ord_no,0)),g_elig_pl_ord_no_max,'0')||
196: lpad(to_char(nvl(ben_ext_person.g_elig_opt_ord_no,0)),g_elig_opt_ord_no_max,'0');
191: if p_low_lvl_cd = 'E' then
192: l_dflt_id := ben_ext_person.g_enrt_benefit_order_num;
193: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
194: elsif p_low_lvl_cd = 'G' then
195: l_dflt_val := lpad(to_char(nvl(ben_ext_person.g_elig_pl_ord_no,0)),g_elig_pl_ord_no_max,'0')||
196: lpad(to_char(nvl(ben_ext_person.g_elig_opt_ord_no,0)),g_elig_opt_ord_no_max,'0');
197: elsif p_low_lvl_cd = 'Y' then
198: l_dflt_id := ben_ext_person.g_element_input_value_sequence;
199: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
192: l_dflt_id := ben_ext_person.g_enrt_benefit_order_num;
193: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
194: elsif p_low_lvl_cd = 'G' then
195: l_dflt_val := lpad(to_char(nvl(ben_ext_person.g_elig_pl_ord_no,0)),g_elig_pl_ord_no_max,'0')||
196: lpad(to_char(nvl(ben_ext_person.g_elig_opt_ord_no,0)),g_elig_opt_ord_no_max,'0');
197: elsif p_low_lvl_cd = 'Y' then
198: l_dflt_id := ben_ext_person.g_element_input_value_sequence;
199: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
200: elsif p_low_lvl_cd = 'R' then
194: elsif p_low_lvl_cd = 'G' then
195: l_dflt_val := lpad(to_char(nvl(ben_ext_person.g_elig_pl_ord_no,0)),g_elig_pl_ord_no_max,'0')||
196: lpad(to_char(nvl(ben_ext_person.g_elig_opt_ord_no,0)),g_elig_opt_ord_no_max,'0');
197: elsif p_low_lvl_cd = 'Y' then
198: l_dflt_id := ben_ext_person.g_element_input_value_sequence;
199: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
200: elsif p_low_lvl_cd = 'R' then
201: l_dflt_id := ben_ext_person.g_runrslt_input_value_sequence;
202: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
197: elsif p_low_lvl_cd = 'Y' then
198: l_dflt_id := ben_ext_person.g_element_input_value_sequence;
199: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
200: elsif p_low_lvl_cd = 'R' then
201: l_dflt_id := ben_ext_person.g_runrslt_input_value_sequence;
202: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
203: elsif p_low_lvl_cd = 'CO' then
204: l_dflt_id := ben_ext_person.g_contact_seq_num;
205: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
200: elsif p_low_lvl_cd = 'R' then
201: l_dflt_id := ben_ext_person.g_runrslt_input_value_sequence;
202: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
203: elsif p_low_lvl_cd = 'CO' then
204: l_dflt_id := ben_ext_person.g_contact_seq_num;
205: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
206: elsif p_low_lvl_cd = 'F' then
207: l_dflt_val := ben_ext_person.g_flex_bnft_pool_name;
208: elsif p_low_lvl_cd = 'WG' then
203: elsif p_low_lvl_cd = 'CO' then
204: l_dflt_id := ben_ext_person.g_contact_seq_num;
205: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
206: elsif p_low_lvl_cd = 'F' then
207: l_dflt_val := ben_ext_person.g_flex_bnft_pool_name;
208: elsif p_low_lvl_cd = 'WG' then
209: l_dflt_val := ben_ext_person.g_CWB_Budget_Group_Plan_Name ;
210: elsif p_low_lvl_cd = 'WR' then
211: l_dflt_val := ben_ext_person.g_CWB_Awrd_Group_Plan_Name ;
205: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');
206: elsif p_low_lvl_cd = 'F' then
207: l_dflt_val := ben_ext_person.g_flex_bnft_pool_name;
208: elsif p_low_lvl_cd = 'WG' then
209: l_dflt_val := ben_ext_person.g_CWB_Budget_Group_Plan_Name ;
210: elsif p_low_lvl_cd = 'WR' then
211: l_dflt_val := ben_ext_person.g_CWB_Awrd_Group_Plan_Name ;
212:
213: end if;
207: l_dflt_val := ben_ext_person.g_flex_bnft_pool_name;
208: elsif p_low_lvl_cd = 'WG' then
209: l_dflt_val := ben_ext_person.g_CWB_Budget_Group_Plan_Name ;
210: elsif p_low_lvl_cd = 'WR' then
211: l_dflt_val := ben_ext_person.g_CWB_Awrd_Group_Plan_Name ;
212:
213: end if;
214: --
215: g_scnd_sort_val := '1' ||
253: l_thrd_val := rpad(l_thrd_val,l_thrd_val_max);
254: l_frth_val := rpad(l_frth_val,l_frth_val_max);
255: --
256: if p_low_lvl_cd = 'D' then
257: l_dflt_id := ben_ext_person.g_dpnt_contact_seq_num;
258: elsif p_low_lvl_cd = 'B' then
259: l_dflt_id := ben_ext_person.g_bnf_contact_seq_num;
260: elsif p_low_lvl_cd = 'ED' then
261: l_dflt_id := ben_ext_person.g_elig_dpnt_contact_seq_num;
255: --
256: if p_low_lvl_cd = 'D' then
257: l_dflt_id := ben_ext_person.g_dpnt_contact_seq_num;
258: elsif p_low_lvl_cd = 'B' then
259: l_dflt_id := ben_ext_person.g_bnf_contact_seq_num;
260: elsif p_low_lvl_cd = 'ED' then
261: l_dflt_id := ben_ext_person.g_elig_dpnt_contact_seq_num;
262: elsif p_low_lvl_cd = 'A' then
263: l_dflt_id := ben_ext_person.g_actn_type_id;
257: l_dflt_id := ben_ext_person.g_dpnt_contact_seq_num;
258: elsif p_low_lvl_cd = 'B' then
259: l_dflt_id := ben_ext_person.g_bnf_contact_seq_num;
260: elsif p_low_lvl_cd = 'ED' then
261: l_dflt_id := ben_ext_person.g_elig_dpnt_contact_seq_num;
262: elsif p_low_lvl_cd = 'A' then
263: l_dflt_id := ben_ext_person.g_actn_type_id;
264: elsif p_low_lvl_cd = 'PR' then
265: l_dflt_val := ben_ext_person.g_prem_type;
259: l_dflt_id := ben_ext_person.g_bnf_contact_seq_num;
260: elsif p_low_lvl_cd = 'ED' then
261: l_dflt_id := ben_ext_person.g_elig_dpnt_contact_seq_num;
262: elsif p_low_lvl_cd = 'A' then
263: l_dflt_id := ben_ext_person.g_actn_type_id;
264: elsif p_low_lvl_cd = 'PR' then
265: l_dflt_val := ben_ext_person.g_prem_type;
266: end if;
267: --
261: l_dflt_id := ben_ext_person.g_elig_dpnt_contact_seq_num;
262: elsif p_low_lvl_cd = 'A' then
263: l_dflt_id := ben_ext_person.g_actn_type_id;
264: elsif p_low_lvl_cd = 'PR' then
265: l_dflt_val := ben_ext_person.g_prem_type;
266: end if;
267: --
268: if p_low_lvl_cd <> 'PR' then
269: l_dflt_val := lpad(to_char(nvl(l_dflt_id,0)),l_dflt_id_max,'0');