10: l_counter number;
11: l_ret_id number := null;
12: begin
13: --
14: l_counter := nvl(ben_pd_copy_to_ben_one.g_pk_tbl.LAST, 0);
15: if l_counter > 0 and p_old_val is not null then
16: for i in 1..l_counter loop
17: if ben_pd_copy_to_ben_one.g_pk_tbl(i).pk_id_column = p_col_name and
18: ben_pd_copy_to_ben_one.g_pk_tbl(i).old_value = p_old_val
13: --
14: l_counter := nvl(ben_pd_copy_to_ben_one.g_pk_tbl.LAST, 0);
15: if l_counter > 0 and p_old_val is not null then
16: for i in 1..l_counter loop
17: if ben_pd_copy_to_ben_one.g_pk_tbl(i).pk_id_column = p_col_name and
18: ben_pd_copy_to_ben_one.g_pk_tbl(i).old_value = p_old_val
19: then
20: l_ret_id := ben_pd_copy_to_ben_one.g_pk_tbl(i).new_value;
21: exit;
14: l_counter := nvl(ben_pd_copy_to_ben_one.g_pk_tbl.LAST, 0);
15: if l_counter > 0 and p_old_val is not null then
16: for i in 1..l_counter loop
17: if ben_pd_copy_to_ben_one.g_pk_tbl(i).pk_id_column = p_col_name and
18: ben_pd_copy_to_ben_one.g_pk_tbl(i).old_value = p_old_val
19: then
20: l_ret_id := ben_pd_copy_to_ben_one.g_pk_tbl(i).new_value;
21: exit;
22: end if;
16: for i in 1..l_counter loop
17: if ben_pd_copy_to_ben_one.g_pk_tbl(i).pk_id_column = p_col_name and
18: ben_pd_copy_to_ben_one.g_pk_tbl(i).old_value = p_old_val
19: then
20: l_ret_id := ben_pd_copy_to_ben_one.g_pk_tbl(i).new_value;
21: exit;
22: end if;
23: end loop;
24: end if;
40: --
41: else
42: */
43: --
44: l_counter := nvl(ben_pd_copy_to_ben_one.g_pk_tbl.LAST, 0);
45: if l_counter > 0 and p_old_val is not null then
46: for i in 1..l_counter loop
47: if ben_pd_copy_to_ben_one.g_pk_tbl(i).pk_id_column = p_col_name and
48: ben_pd_copy_to_ben_one.g_pk_tbl(i).old_value = p_old_val
43: --
44: l_counter := nvl(ben_pd_copy_to_ben_one.g_pk_tbl.LAST, 0);
45: if l_counter > 0 and p_old_val is not null then
46: for i in 1..l_counter loop
47: if ben_pd_copy_to_ben_one.g_pk_tbl(i).pk_id_column = p_col_name and
48: ben_pd_copy_to_ben_one.g_pk_tbl(i).old_value = p_old_val
49: then
50: l_ret_id := ben_pd_copy_to_ben_one.g_pk_tbl(i).new_value;
51: exit;
44: l_counter := nvl(ben_pd_copy_to_ben_one.g_pk_tbl.LAST, 0);
45: if l_counter > 0 and p_old_val is not null then
46: for i in 1..l_counter loop
47: if ben_pd_copy_to_ben_one.g_pk_tbl(i).pk_id_column = p_col_name and
48: ben_pd_copy_to_ben_one.g_pk_tbl(i).old_value = p_old_val
49: then
50: l_ret_id := ben_pd_copy_to_ben_one.g_pk_tbl(i).new_value;
51: exit;
52: end if;
46: for i in 1..l_counter loop
47: if ben_pd_copy_to_ben_one.g_pk_tbl(i).pk_id_column = p_col_name and
48: ben_pd_copy_to_ben_one.g_pk_tbl(i).old_value = p_old_val
49: then
50: l_ret_id := ben_pd_copy_to_ben_one.g_pk_tbl(i).new_value;
51: exit;
52: end if;
53: end loop;
54: --
218: end get_elm_inpt_ids;
219: --
220: -- Private procedure to update the cer with target details
221: --
222: procedure update_cer_with_target(c_pk_rec BEN_PD_COPY_TO_BEN_one.G_PK_REC_TYPE, p_copy_entity_txn_id in number) is
223: begin
224: hr_utility.set_location('Inside update_cer_with_target ',233);
225: update ben_copy_entity_results
226: set information9 = c_pk_rec.copy_reuse_type||'-'||c_pk_rec.new_value
395: end if ;
396: -- End Prefix Sufix derivation
397: for r_CTU_unique in c_unique_CTU('CTU') loop
398:
399: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
400: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
401: r_CTU_unique.information3 >=
402: ben_pd_copy_to_ben_one.g_copy_effective_date)
403: ) then
396: -- End Prefix Sufix derivation
397: for r_CTU_unique in c_unique_CTU('CTU') loop
398:
399: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
400: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
401: r_CTU_unique.information3 >=
402: ben_pd_copy_to_ben_one.g_copy_effective_date)
403: ) then
404: --
398:
399: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
400: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
401: r_CTU_unique.information3 >=
402: ben_pd_copy_to_ben_one.g_copy_effective_date)
403: ) then
404: --
405: hr_utility.set_location(' r_CTU_unique.table_route_id '||r_CTU_unique.table_route_id,10);
406: hr_utility.set_location(' r_CTU_unique.information1 '||r_CTU_unique.information1,10);
442: l_object_found_in_target := TRUE;
443: --
444: if l_process_date between r_CTU_unique.information2 and r_CTU_unique.information3 then
445: l_update := true;
446: if r_CTU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
447: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID'
448: then
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
450: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTU_unique.information1 ;
443: --
444: if l_process_date between r_CTU_unique.information2 and r_CTU_unique.information3 then
445: l_update := true;
446: if r_CTU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
447: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID'
448: then
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
450: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTU_unique.information1 ;
451: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTU_unique.information1 ;
445: l_update := true;
446: if r_CTU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
447: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID'
448: then
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
450: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTU_unique.information1 ;
451: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTU_unique.information1 ;
452: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTU_unique.table_route_id;
446: if r_CTU_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
447: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID'
448: then
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
450: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTU_unique.information1 ;
451: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTU_unique.information1 ;
452: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTU_unique.table_route_id;
454: --
447: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID'
448: then
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
450: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTU_unique.information1 ;
451: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTU_unique.information1 ;
452: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTU_unique.table_route_id;
454: --
455: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
448: then
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
450: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTU_unique.information1 ;
451: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTU_unique.information1 ;
452: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTU_unique.table_route_id;
454: --
455: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
456: --
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
450: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTU_unique.information1 ;
451: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTU_unique.information1 ;
452: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTU_unique.table_route_id;
454: --
455: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
456: --
457: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTU_unique.table_route_id;
454: --
455: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
456: --
457: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
458: -- DOUBT WHERE IS NAME ?
459: -- log_data('CTU',l_new_value,l_prefix || r_CTU_unique.name|| l_suffix,'REUSED');
460: --
461: end if ;
476: open c_CTU_min_max_dates(r_CTU_unique.table_route_id, r_CTU_unique.information1 ) ;
477: fetch c_CTU_min_max_dates into l_min_esd,l_max_eed ;
478: --
479:
480: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
481: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
482: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
483: end if;
484: l_min_esd := greatest(l_min_esd,r_CTU_unique.information2);
477: fetch c_CTU_min_max_dates into l_min_esd,l_max_eed ;
478: --
479:
480: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
481: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
482: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
483: end if;
484: l_min_esd := greatest(l_min_esd,r_CTU_unique.information2);
485:
478: --
479:
480: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
481: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
482: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
483: end if;
484: l_min_esd := greatest(l_min_esd,r_CTU_unique.information2);
485:
486: /*open c_CTU(r_CTU_unique.table_route_id,
511: p_to_date => l_max_eed );
512: if l_dt_rec_found THEN
513: --END TEMPIK
514: --
515: if r_CTU_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
516: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID' then
517: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
518: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU_unique.information1 ;
519: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
512: if l_dt_rec_found THEN
513: --END TEMPIK
514: --
515: if r_CTU_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
516: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID' then
517: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
518: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU_unique.information1 ;
519: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
520: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
513: --END TEMPIK
514: --
515: if r_CTU_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
516: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID' then
517: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
518: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU_unique.information1 ;
519: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
520: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
521: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
514: --
515: if r_CTU_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
516: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID' then
517: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
518: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU_unique.information1 ;
519: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
520: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
521: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
522: --
515: if r_CTU_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
516: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID' then
517: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
518: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU_unique.information1 ;
519: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
520: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
521: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
522: --
523: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
516: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_USG_ID' then
517: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
518: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU_unique.information1 ;
519: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
520: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
521: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
522: --
523: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
524: --
517: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
518: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU_unique.information1 ;
519: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
520: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
521: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
522: --
523: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
524: --
525: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
519: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
520: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
521: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
522: --
523: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
524: --
525: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
526: end if ;
527: --
521: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
522: --
523: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
524: --
525: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
526: end if ;
527: --
528: l_object_found_in_target := true ;
529: --TEMPIK
559: end if ;
560: --
561:
562: l_effective_date := r_CTU.information2;
563: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
564: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
565: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
566: end if;
567:
560: --
561:
562: l_effective_date := r_CTU.information2;
563: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
564: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
565: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
566: end if;
567:
568: --if l_first_rec then
561:
562: l_effective_date := r_CTU.information2;
563: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
564: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
565: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
566: end if;
567:
568: --if l_first_rec then
569: -- UPD START
628: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
629: -- Update all relevent cer records with new pk_id
630: hr_utility.set_location('Before plsql table ',222);
631: hr_utility.set_location('new_value id '||l_cm_typ_usg_id,222);
632: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
633: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU.information1 ;
634: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_USG_ID ;
635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
629: -- Update all relevent cer records with new pk_id
630: hr_utility.set_location('Before plsql table ',222);
631: hr_utility.set_location('new_value id '||l_cm_typ_usg_id,222);
632: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
633: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU.information1 ;
634: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_USG_ID ;
635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
637: hr_utility.set_location('After plsql table ',222);
630: hr_utility.set_location('Before plsql table ',222);
631: hr_utility.set_location('new_value id '||l_cm_typ_usg_id,222);
632: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
633: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU.information1 ;
634: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_USG_ID ;
635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
637: hr_utility.set_location('After plsql table ',222);
638: --
631: hr_utility.set_location('new_value id '||l_cm_typ_usg_id,222);
632: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
633: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU.information1 ;
634: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_USG_ID ;
635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
637: hr_utility.set_location('After plsql table ',222);
638: --
639: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
632: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_USG_ID' ;
633: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTU.information1 ;
634: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_USG_ID ;
635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
637: hr_utility.set_location('After plsql table ',222);
638: --
639: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
640: --
635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTU_unique.table_route_id;
637: hr_utility.set_location('After plsql table ',222);
638: --
639: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
640: --
641: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
642: --
643: else
637: hr_utility.set_location('After plsql table ',222);
638: --
639: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
640: --
641: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
642: --
643: else
644: --
645: -- Call Update routine for the pk_id created in prev run .
910: end if ;
911: -- End Prefix Sufix derivation
912: for r_CTT_unique in c_unique_CTT('CTT') loop
913:
914: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
915: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
916: r_CTT_unique.information3 >=
917: ben_pd_copy_to_ben_one.g_copy_effective_date)
918: ) then
911: -- End Prefix Sufix derivation
912: for r_CTT_unique in c_unique_CTT('CTT') loop
913:
914: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
915: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
916: r_CTT_unique.information3 >=
917: ben_pd_copy_to_ben_one.g_copy_effective_date)
918: ) then
919: --
913:
914: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
915: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
916: r_CTT_unique.information3 >=
917: ben_pd_copy_to_ben_one.g_copy_effective_date)
918: ) then
919: --
920: hr_utility.set_location(' r_CTT_unique.table_route_id '||r_CTT_unique.table_route_id,10);
921: hr_utility.set_location(' r_CTT_unique.information1 '||r_CTT_unique.information1,10);
950: l_object_found_in_target := TRUE;
951: --
952: if l_process_date between r_CTT_unique.information2 and r_CTT_unique.information3 then
953: l_update := true;
954: if r_CTT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
955: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID'
956: then
957: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
958: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTT_unique.information1 ;
951: --
952: if l_process_date between r_CTT_unique.information2 and r_CTT_unique.information3 then
953: l_update := true;
954: if r_CTT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
955: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID'
956: then
957: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
958: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTT_unique.information1 ;
959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTT_unique.information1 ;
953: l_update := true;
954: if r_CTT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
955: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID'
956: then
957: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
958: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTT_unique.information1 ;
959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTT_unique.information1 ;
960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTT_unique.table_route_id;
954: if r_CTT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
955: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID'
956: then
957: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
958: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTT_unique.information1 ;
959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTT_unique.information1 ;
960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTT_unique.table_route_id;
962: --
955: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID'
956: then
957: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
958: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTT_unique.information1 ;
959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTT_unique.information1 ;
960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTT_unique.table_route_id;
962: --
963: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
956: then
957: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
958: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTT_unique.information1 ;
959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTT_unique.information1 ;
960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTT_unique.table_route_id;
962: --
963: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
964: --
957: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
958: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTT_unique.information1 ;
959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTT_unique.information1 ;
960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTT_unique.table_route_id;
962: --
963: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
964: --
965: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTT_unique.table_route_id;
962: --
963: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
964: --
965: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
966: -- DOUBT
967: --log_data('CTT',l_new_value,l_prefix || r_CTT_unique.name|| l_suffix,'REUSED');
968: --
969: end if ;
983: open c_CTT_min_max_dates(r_CTT_unique.table_route_id, r_CTT_unique.information1 ) ;
984: fetch c_CTT_min_max_dates into l_min_esd,l_max_eed ;
985: --
986:
987: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
988: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
989: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
990: end if;
991: l_min_esd := greatest(l_min_esd,r_CTT_unique.information2);
984: fetch c_CTT_min_max_dates into l_min_esd,l_max_eed ;
985: --
986:
987: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
988: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
989: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
990: end if;
991: l_min_esd := greatest(l_min_esd,r_CTT_unique.information2);
992: /*open c_CTT(r_CTT_unique.table_route_id,
985: --
986:
987: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
988: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
989: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
990: end if;
991: l_min_esd := greatest(l_min_esd,r_CTT_unique.information2);
992: /*open c_CTT(r_CTT_unique.table_route_id,
993: r_CTT_unique.information1,
1014: p_from_date => l_min_esd,
1015: p_to_date => l_max_eed );
1016: if l_dt_rec_found THEN
1017: --END TEMPIK
1018: if r_CTT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1019: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID' then
1020: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1021: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT_unique.information1 ;
1022: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1015: p_to_date => l_max_eed );
1016: if l_dt_rec_found THEN
1017: --END TEMPIK
1018: if r_CTT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1019: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID' then
1020: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1021: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT_unique.information1 ;
1022: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1023: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1016: if l_dt_rec_found THEN
1017: --END TEMPIK
1018: if r_CTT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1019: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID' then
1020: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1021: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT_unique.information1 ;
1022: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1023: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1024: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1017: --END TEMPIK
1018: if r_CTT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1019: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID' then
1020: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1021: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT_unique.information1 ;
1022: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1023: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1024: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1025: --
1018: if r_CTT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1019: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID' then
1020: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1021: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT_unique.information1 ;
1022: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1023: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1024: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1025: --
1026: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1019: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_TYP_TRGR_ID' then
1020: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1021: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT_unique.information1 ;
1022: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1023: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1024: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1025: --
1026: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1027: --
1020: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1021: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT_unique.information1 ;
1022: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1023: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1024: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1025: --
1026: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1027: --
1028: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1022: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1023: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1024: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1025: --
1026: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1027: --
1028: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1029: end if ;
1030: --
1024: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1025: --
1026: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1027: --
1028: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1029: end if ;
1030: --
1031: l_object_found_in_target := true ;
1032: --TEMPIK
1063: end if ;
1064: --
1065:
1066: l_effective_date := r_CTT.information2;
1067: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1068: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1069: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1070: end if;
1071: -- UPD START
1064: --
1065:
1066: l_effective_date := r_CTT.information2;
1067: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1068: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1069: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1070: end if;
1071: -- UPD START
1072: --if l_first_rec then
1065:
1066: l_effective_date := r_CTT.information2;
1067: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1068: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1069: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1070: end if;
1071: -- UPD START
1072: --if l_first_rec then
1073: if l_first_rec and not l_update then
1123: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
1124: -- Update all relevent cer records with new pk_id
1125: hr_utility.set_location('Before plsql table ',222);
1126: hr_utility.set_location('new_value id '||l_cm_typ_trgr_id,222);
1127: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1128: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT.information1 ;
1129: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_TRGR_ID ;
1130: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1131: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1124: -- Update all relevent cer records with new pk_id
1125: hr_utility.set_location('Before plsql table ',222);
1126: hr_utility.set_location('new_value id '||l_cm_typ_trgr_id,222);
1127: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1128: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT.information1 ;
1129: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_TRGR_ID ;
1130: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1131: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1132: hr_utility.set_location('After plsql table ',222);
1125: hr_utility.set_location('Before plsql table ',222);
1126: hr_utility.set_location('new_value id '||l_cm_typ_trgr_id,222);
1127: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1128: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT.information1 ;
1129: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_TRGR_ID ;
1130: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1131: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1132: hr_utility.set_location('After plsql table ',222);
1133: --
1126: hr_utility.set_location('new_value id '||l_cm_typ_trgr_id,222);
1127: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1128: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT.information1 ;
1129: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_TRGR_ID ;
1130: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1131: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1132: hr_utility.set_location('After plsql table ',222);
1133: --
1134: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1127: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_TYP_TRGR_ID' ;
1128: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CTT.information1 ;
1129: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_TYP_TRGR_ID ;
1130: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1131: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1132: hr_utility.set_location('After plsql table ',222);
1133: --
1134: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1135: --
1130: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1131: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CTT_unique.table_route_id;
1132: hr_utility.set_location('After plsql table ',222);
1133: --
1134: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1135: --
1136: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1137: --
1138: else
1132: hr_utility.set_location('After plsql table ',222);
1133: --
1134: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1135: --
1136: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1137: --
1138: else
1139: --
1140: -- Call Update routine for the pk_id created in prev run .
1418: --
1419: if l_dml_operation = 'UPDATE' then
1420: --
1421: l_update := true;
1422: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1423: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1424: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1425: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1426: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := r_CMT_unique.information1 ;
1419: if l_dml_operation = 'UPDATE' then
1420: --
1421: l_update := true;
1422: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1423: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1424: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1425: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1426: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := r_CMT_unique.information1 ;
1427: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1420: --
1421: l_update := true;
1422: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1423: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1424: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1425: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1426: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := r_CMT_unique.information1 ;
1427: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1428: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1421: l_update := true;
1422: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1423: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1424: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1425: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1426: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := r_CMT_unique.information1 ;
1427: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1428: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1429: --
1422: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1423: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1424: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1425: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1426: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := r_CMT_unique.information1 ;
1427: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1428: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1429: --
1430: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ; -- NEW
1423: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1424: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1425: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1426: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := r_CMT_unique.information1 ;
1427: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1428: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1429: --
1430: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ; -- NEW
1431: --
1424: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1425: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1426: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := r_CMT_unique.information1 ;
1427: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1428: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1429: --
1430: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ; -- NEW
1431: --
1432: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1426: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := r_CMT_unique.information1 ;
1427: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1428: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1429: --
1430: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ; -- NEW
1431: --
1432: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1433: --
1434: ben_pd_copy_to_ben_one.log_data('CMT',l_new_value,l_prefix || r_CMT_unique.name|| l_suffix,'REUSED');
1428: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1429: --
1430: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ; -- NEW
1431: --
1432: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1433: --
1434: ben_pd_copy_to_ben_one.log_data('CMT',l_new_value,l_prefix || r_CMT_unique.name|| l_suffix,'REUSED');
1435: --
1436: end if ;
1430: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ; -- NEW
1431: --
1432: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1433: --
1434: ben_pd_copy_to_ben_one.log_data('CMT',l_new_value,l_prefix || r_CMT_unique.name|| l_suffix,'REUSED');
1435: --
1436: end if ;
1437: l_CM_DLVRY_MTHD_TYP_ID := r_CMT_unique.information1 ;
1438: l_object_version_number := r_CMT.information265 ;
1446: p_target_business_group_id, nvl(l_cm_dlvry_mthd_typ_id, -999) ) ;
1447: fetch c_find_CMT_in_target into l_new_value ;
1448: if c_find_CMT_in_target%found then
1449: --
1450: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1451: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1454: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1447: fetch c_find_CMT_in_target into l_new_value ;
1448: if c_find_CMT_in_target%found then
1449: --
1450: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1451: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1454: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1455: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1448: if c_find_CMT_in_target%found then
1449: --
1450: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1451: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1454: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1455: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1456: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1449: --
1450: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1451: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1454: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1455: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1456: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1457: --
1450: if r_CMT_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1451: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1454: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1455: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1456: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1457: --
1458: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1451: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MTHD_TYP_ID' then
1452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1454: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1455: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1456: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1457: --
1458: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1459: --
1452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT_unique.information1 ;
1454: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1455: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1456: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1457: --
1458: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1459: --
1460: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1454: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1455: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1456: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1457: --
1458: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1459: --
1460: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1461: end if ;
1462: --
1456: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1457: --
1458: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1459: --
1460: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1461: end if ;
1462: --
1463: l_object_found_in_target := true ;
1464: end if;
1506: hr_utility.set_location(' BEN_CM_DLVRY_MTHD_TYP CREATE_COMM_DLVRY_MTHDS ',20);
1507: BEN_COMM_DLVRY_MTHDS_API.CREATE_COMM_DLVRY_MTHDS(
1508: --
1509: P_VALIDATE => false
1510: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
1511: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
1512: --
1513: ,P_CMT_ATTRIBUTE1 => r_CMT.INFORMATION111
1514: ,P_CMT_ATTRIBUTE10 => r_CMT.INFORMATION120
1552: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
1553: -- Update all relevent cer records with new pk_id
1554: hr_utility.set_location('Before plsql table ',222);
1555: hr_utility.set_location('new_value id '||l_cm_dlvry_mthd_typ_id,222);
1556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT.information1 ;
1558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MTHD_TYP_ID ;
1559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1553: -- Update all relevent cer records with new pk_id
1554: hr_utility.set_location('Before plsql table ',222);
1555: hr_utility.set_location('new_value id '||l_cm_dlvry_mthd_typ_id,222);
1556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT.information1 ;
1558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MTHD_TYP_ID ;
1559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1561: hr_utility.set_location('After plsql table ',222);
1554: hr_utility.set_location('Before plsql table ',222);
1555: hr_utility.set_location('new_value id '||l_cm_dlvry_mthd_typ_id,222);
1556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT.information1 ;
1558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MTHD_TYP_ID ;
1559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1561: hr_utility.set_location('After plsql table ',222);
1562: --
1555: hr_utility.set_location('new_value id '||l_cm_dlvry_mthd_typ_id,222);
1556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT.information1 ;
1558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MTHD_TYP_ID ;
1559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1561: hr_utility.set_location('After plsql table ',222);
1562: --
1563: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MTHD_TYP_ID' ;
1557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMT.information1 ;
1558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MTHD_TYP_ID ;
1559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1561: hr_utility.set_location('After plsql table ',222);
1562: --
1563: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1564: --
1559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMT_unique.table_route_id;
1561: hr_utility.set_location('After plsql table ',222);
1562: --
1563: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1564: --
1565: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1566: --
1567: elsif l_update then
1561: hr_utility.set_location('After plsql table ',222);
1562: --
1563: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1564: --
1565: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1566: --
1567: elsif l_update then
1568: --
1569:
1788: l_object_found_in_target := TRUE;
1789: --
1790: if l_process_date between r_CMD_unique.information2 and r_CMD_unique.information3 then
1791: l_update := true;
1792: if r_CMD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1793: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID'
1794: then
1795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CMD_unique.information1 ;
1789: --
1790: if l_process_date between r_CMD_unique.information2 and r_CMD_unique.information3 then
1791: l_update := true;
1792: if r_CMD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1793: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID'
1794: then
1795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CMD_unique.information1 ;
1797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CMD_unique.information1 ;
1791: l_update := true;
1792: if r_CMD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1793: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID'
1794: then
1795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CMD_unique.information1 ;
1797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CMD_unique.information1 ;
1798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CMD_unique.table_route_id;
1792: if r_CMD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1793: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID'
1794: then
1795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CMD_unique.information1 ;
1797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CMD_unique.information1 ;
1798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CMD_unique.table_route_id;
1800: --
1793: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID'
1794: then
1795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CMD_unique.information1 ;
1797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CMD_unique.information1 ;
1798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CMD_unique.table_route_id;
1800: --
1801: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1794: then
1795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CMD_unique.information1 ;
1797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CMD_unique.information1 ;
1798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CMD_unique.table_route_id;
1800: --
1801: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1802: --
1795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CMD_unique.information1 ;
1797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CMD_unique.information1 ;
1798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CMD_unique.table_route_id;
1800: --
1801: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1802: --
1803: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CMD_unique.table_route_id;
1800: --
1801: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1802: --
1803: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1804: --
1805: BEN_PD_COPY_TO_BEN_ONE.log_data('CMD',l_new_value,l_prefix || r_CMD_unique.name|| l_suffix,'REUSED');
1806: --
1807: end if ;
1801: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1802: --
1803: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1804: --
1805: BEN_PD_COPY_TO_BEN_ONE.log_data('CMD',l_new_value,l_prefix || r_CMD_unique.name|| l_suffix,'REUSED');
1806: --
1807: end if ;
1808: hr_utility.set_location( 'found record for update',10);
1809: --
1819: p_target_business_group_id, nvl(l_cm_dlvry_med_typ_id, -999) ) ;
1820: fetch c_find_CMD_in_target into l_new_value ;
1821: if c_find_CMD_in_target%found then
1822: --
1823: if r_CMD_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1824: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID' then
1825: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1826: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD_unique.information1 ;
1827: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1820: fetch c_find_CMD_in_target into l_new_value ;
1821: if c_find_CMD_in_target%found then
1822: --
1823: if r_CMD_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1824: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID' then
1825: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1826: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD_unique.information1 ;
1827: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1828: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1821: if c_find_CMD_in_target%found then
1822: --
1823: if r_CMD_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1824: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID' then
1825: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1826: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD_unique.information1 ;
1827: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1828: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1829: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1822: --
1823: if r_CMD_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1824: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID' then
1825: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1826: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD_unique.information1 ;
1827: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1828: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1829: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1830: --
1823: if r_CMD_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
1824: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID' then
1825: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1826: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD_unique.information1 ;
1827: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1828: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1829: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1830: --
1831: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1824: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CM_DLVRY_MED_TYP_ID' then
1825: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1826: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD_unique.information1 ;
1827: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1828: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1829: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1830: --
1831: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1832: --
1825: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1826: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD_unique.information1 ;
1827: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1828: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1829: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1830: --
1831: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1832: --
1833: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1827: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
1828: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
1829: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1830: --
1831: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1832: --
1833: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1834: end if ;
1835: --
1829: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1830: --
1831: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
1832: --
1833: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1834: end if ;
1835: --
1836: l_object_found_in_target := true ;
1837: end if;
1871: hr_utility.set_location(' BEN_CM_DLVRY_MED_TYP CREATE_COMM_DLVRY_MEDIA ',20);
1872: BEN_COMM_DLVRY_MEDIA_API.CREATE_COMM_DLVRY_MEDIA(
1873: --
1874: P_VALIDATE => false
1875: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
1876: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
1877: --
1878: ,P_CMD_ATTRIBUTE1 => r_CMD.INFORMATION111
1879: ,P_CMD_ATTRIBUTE10 => r_CMD.INFORMATION120
1917: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
1918: -- Update all relevent cer records with new pk_id
1919: hr_utility.set_location('Before plsql table ',222);
1920: hr_utility.set_location('new_value id '||l_cm_dlvry_med_typ_id,222);
1921: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1922: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD.information1 ;
1923: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MED_TYP_ID ;
1924: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1925: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1918: -- Update all relevent cer records with new pk_id
1919: hr_utility.set_location('Before plsql table ',222);
1920: hr_utility.set_location('new_value id '||l_cm_dlvry_med_typ_id,222);
1921: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1922: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD.information1 ;
1923: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MED_TYP_ID ;
1924: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1925: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1926: hr_utility.set_location('After plsql table ',222);
1919: hr_utility.set_location('Before plsql table ',222);
1920: hr_utility.set_location('new_value id '||l_cm_dlvry_med_typ_id,222);
1921: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1922: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD.information1 ;
1923: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MED_TYP_ID ;
1924: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1925: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1926: hr_utility.set_location('After plsql table ',222);
1927: --
1920: hr_utility.set_location('new_value id '||l_cm_dlvry_med_typ_id,222);
1921: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1922: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD.information1 ;
1923: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MED_TYP_ID ;
1924: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1925: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1926: hr_utility.set_location('After plsql table ',222);
1927: --
1928: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1921: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CM_DLVRY_MED_TYP_ID' ;
1922: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CMD.information1 ;
1923: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CM_DLVRY_MED_TYP_ID ;
1924: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1925: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1926: hr_utility.set_location('After plsql table ',222);
1927: --
1928: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1929: --
1924: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
1925: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CMD_unique.table_route_id;
1926: hr_utility.set_location('After plsql table ',222);
1927: --
1928: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1929: --
1930: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1931: --
1932: elsif l_update then
1926: hr_utility.set_location('After plsql table ',222);
1927: --
1928: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
1929: --
1930: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
1931: --
1932: elsif l_update then
1933: --
1934: -- UPD START
1935: hr_utility.set_location(' BEN_CM_DLVRY_MED_TYP CREATE_COMM_DLVRY_MEDIA ',20);
1936: BEN_COMM_DLVRY_MEDIA_API.UPDATE_COMM_DLVRY_MEDIA(
1937: --
1938: P_VALIDATE => false
1939: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
1940: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
1941: --
1942: ,P_CMD_ATTRIBUTE1 => r_CMD.INFORMATION111
1943: ,P_CMD_ATTRIBUTE10 => r_CMD.INFORMATION120
2275: -- Derive the prefix - sufix
2276: -- End Prefix Sufix derivation
2277: for r_ABR_unique in c_unique_ABR('ABR') loop
2278:
2279: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2280: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2281: r_ABR_unique.information3 >=
2282: ben_pd_copy_to_ben_one.g_copy_effective_date)
2283: ) then
2276: -- End Prefix Sufix derivation
2277: for r_ABR_unique in c_unique_ABR('ABR') loop
2278:
2279: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2280: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2281: r_ABR_unique.information3 >=
2282: ben_pd_copy_to_ben_one.g_copy_effective_date)
2283: ) then
2284: --
2278:
2279: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2280: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2281: r_ABR_unique.information3 >=
2282: ben_pd_copy_to_ben_one.g_copy_effective_date)
2283: ) then
2284: --
2285: if p_prefix_suffix_cd = 'PREFIX' then
2286: l_prefix := p_prefix_suffix_text ;
2355:
2356: -- l_ELEMENT_TYPE_ID := get_fk('ELEMENT_TYPE_ID',r_ABR.information174,r_ABR.dml_operation);
2357: -- l_INPUT_VALUE_ID := get_fk('INPUT_VALUE_ID',r_ABR.information178,r_ABR.dml_operation);
2358:
2359: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
2360: l_ELEMENT_TYPE_ID := r_ABR.information176;
2361: l_INPUT_VALUE_ID := r_ABR.information180;
2362: else
2363: l_ELEMENT_TYPE_ID := r_ABR.information174;
2368: if (g_ghr_mode = 'TRUE') then
2369: get_elm_inpt_ids(p_elm_old_name => r_ABR.information173
2370: ,p_elm_new_id => l_ELEMENT_TYPE_ID
2371: ,p_business_group_id => p_target_business_group_id
2372: ,p_effective_date => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
2373: ,p_inpt_old_name => r_ABR.information177
2374: ,p_inpt_new_id => l_INPUT_VALUE_ID ) ;
2375: end if;
2376: --
2386: l_object_found_in_target := TRUE;
2387: --
2388: if l_process_date between r_ABR_unique.information2 and r_ABR_unique.information3 then
2389: l_update := true;
2390: if r_ABR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2391: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID'
2392: then
2393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABR_unique.information1 ;
2387: --
2388: if l_process_date between r_ABR_unique.information2 and r_ABR_unique.information3 then
2389: l_update := true;
2390: if r_ABR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2391: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID'
2392: then
2393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABR_unique.information1 ;
2395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABR_unique.information1 ;
2389: l_update := true;
2390: if r_ABR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2391: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID'
2392: then
2393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABR_unique.information1 ;
2395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABR_unique.information1 ;
2396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABR_unique.table_route_id;
2390: if r_ABR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2391: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID'
2392: then
2393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABR_unique.information1 ;
2395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABR_unique.information1 ;
2396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABR_unique.table_route_id;
2398: --
2391: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID'
2392: then
2393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABR_unique.information1 ;
2395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABR_unique.information1 ;
2396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABR_unique.table_route_id;
2398: --
2399: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2392: then
2393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABR_unique.information1 ;
2395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABR_unique.information1 ;
2396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABR_unique.table_route_id;
2398: --
2399: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2400: --
2393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABR_unique.information1 ;
2395: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABR_unique.information1 ;
2396: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABR_unique.table_route_id;
2398: --
2399: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2400: --
2401: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2397: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABR_unique.table_route_id;
2398: --
2399: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2400: --
2401: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2402: --
2403: BEN_PD_COPY_TO_BEN_ONE.log_data('ABR',l_new_value,l_prefix || r_ABR_unique.name|| l_suffix,'REUSED');
2404: --
2405: end if ;
2399: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2400: --
2401: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2402: --
2403: BEN_PD_COPY_TO_BEN_ONE.log_data('ABR',l_new_value,l_prefix || r_ABR_unique.name|| l_suffix,'REUSED');
2404: --
2405: end if ;
2406: hr_utility.set_location( 'found record for update',10);
2407: --
2419: open c_ABR_min_max_dates(r_ABR_unique.table_route_id, r_ABR_unique.information1 ) ;
2420: fetch c_ABR_min_max_dates into l_min_esd,l_max_eed ;
2421: --
2422:
2423: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2424: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2425: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2426: end if;
2427: l_min_esd := greatest(l_min_esd,r_ABR_unique.information2);
2420: fetch c_ABR_min_max_dates into l_min_esd,l_max_eed ;
2421: --
2422:
2423: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2424: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2425: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2426: end if;
2427: l_min_esd := greatest(l_min_esd,r_ABR_unique.information2);
2428:
2421: --
2422:
2423: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2424: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2425: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2426: end if;
2427: l_min_esd := greatest(l_min_esd,r_ABR_unique.information2);
2428:
2429: -- UPD START
2450: --
2451: end if ;
2452: --
2453: /*
2454: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
2455: l_ELEMENT_TYPE_ID := r_ABR.information176;
2456: l_INPUT_VALUE_ID := r_ABR.information180;
2457: else
2458: l_ELEMENT_TYPE_ID := r_ABR.information174;
2463: if (g_ghr_mode = 'TRUE') then
2464: get_elm_inpt_ids(p_elm_old_name => r_ABR.information173
2465: ,p_elm_new_id => l_ELEMENT_TYPE_ID
2466: ,p_business_group_id => p_target_business_group_id
2467: ,p_effective_date => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
2468: ,p_inpt_old_name => r_ABR.information177
2469: ,p_inpt_new_id => l_INPUT_VALUE_ID ) ;
2470: end if;
2471: --
2516: p_to_date => l_max_eed );
2517: if l_dt_rec_found THEN
2518: --END TEMPIK
2519: --
2520: if r_ABR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
2521: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID' then
2522: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2523: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR_unique.information1 ;
2524: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
2517: if l_dt_rec_found THEN
2518: --END TEMPIK
2519: --
2520: if r_ABR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
2521: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID' then
2522: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2523: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR_unique.information1 ;
2524: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
2525: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
2518: --END TEMPIK
2519: --
2520: if r_ABR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
2521: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID' then
2522: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2523: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR_unique.information1 ;
2524: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
2525: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
2526: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2519: --
2520: if r_ABR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
2521: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID' then
2522: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2523: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR_unique.information1 ;
2524: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
2525: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
2526: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2527: --
2520: if r_ABR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
2521: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID' then
2522: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2523: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR_unique.information1 ;
2524: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
2525: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
2526: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2527: --
2528: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
2521: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_ID' then
2522: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2523: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR_unique.information1 ;
2524: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
2525: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
2526: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2527: --
2528: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
2529: --
2522: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2523: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR_unique.information1 ;
2524: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
2525: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
2526: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2527: --
2528: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
2529: --
2530: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
2524: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
2525: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
2526: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2527: --
2528: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
2529: --
2530: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
2531: --
2532: -- LOG
2526: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2527: --
2528: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
2529: --
2530: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
2531: --
2532: -- LOG
2533: BEN_PD_COPY_TO_BEN_ONE.log_data('ABR',l_new_value,l_prefix || r_ABR_unique.name|| l_suffix,'REUSED');
2534: --
2529: --
2530: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
2531: --
2532: -- LOG
2533: BEN_PD_COPY_TO_BEN_ONE.log_data('ABR',l_new_value,l_prefix || r_ABR_unique.name|| l_suffix,'REUSED');
2534: --
2535: end if ;
2536: --
2537: l_object_found_in_target := true ;
2604: l_first_rec := true ;
2605: --
2606: end if ;
2607: --
2608: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_ACTY_BASE_RT_F',l_prefix || r_ABR.INFORMATION170 || l_suffix);
2609: --
2610:
2611: l_effective_date := r_ABR.information2;
2612: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2608: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_ACTY_BASE_RT_F',l_prefix || r_ABR.INFORMATION170 || l_suffix);
2609: --
2610:
2611: l_effective_date := r_ABR.information2;
2612: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2613: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2614: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2615: end if;
2616: -- UPD START
2609: --
2610:
2611: l_effective_date := r_ABR.information2;
2612: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2613: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2614: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2615: end if;
2616: -- UPD START
2617: --if l_first_rec then
2610:
2611: l_effective_date := r_ABR.information2;
2612: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2613: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2614: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2615: end if;
2616: -- UPD START
2617: --if l_first_rec then
2618: if l_first_rec and not l_update then
2767: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
2768: -- Update all relevent cer records with new pk_id
2769: hr_utility.set_location('Before plsql table ',222);
2770: hr_utility.set_location('new_value id '||l_acty_base_rt_id,222);
2771: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2772: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR.information1 ;
2773: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_ID ;
2774: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
2775: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2768: -- Update all relevent cer records with new pk_id
2769: hr_utility.set_location('Before plsql table ',222);
2770: hr_utility.set_location('new_value id '||l_acty_base_rt_id,222);
2771: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2772: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR.information1 ;
2773: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_ID ;
2774: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
2775: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2776: hr_utility.set_location('After plsql table ',222);
2769: hr_utility.set_location('Before plsql table ',222);
2770: hr_utility.set_location('new_value id '||l_acty_base_rt_id,222);
2771: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2772: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR.information1 ;
2773: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_ID ;
2774: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
2775: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2776: hr_utility.set_location('After plsql table ',222);
2777: --
2770: hr_utility.set_location('new_value id '||l_acty_base_rt_id,222);
2771: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2772: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR.information1 ;
2773: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_ID ;
2774: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
2775: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2776: hr_utility.set_location('After plsql table ',222);
2777: --
2778: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
2771: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_ID' ;
2772: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABR.information1 ;
2773: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_ID ;
2774: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
2775: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2776: hr_utility.set_location('After plsql table ',222);
2777: --
2778: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
2779: --
2774: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
2775: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABR_unique.table_route_id;
2776: hr_utility.set_location('After plsql table ',222);
2777: --
2778: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
2779: --
2780: if (g_ghr_mode = 'TRUE' and r_ABR.INFORMATION45 = 'Y') then
2781: --
2782: -- In ghr mode mapping is done based on names so just
2785: update ben_copy_entity_results
2786: set information176 = l_element_type_id,
2787: information180 = l_input_value_id
2788: where copy_entity_txn_id = p_copy_entity_txn_id
2789: and table_route_id = ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id
2790: and information1 = ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value;
2791: --
2792: end if;
2793: --
2786: set information176 = l_element_type_id,
2787: information180 = l_input_value_id
2788: where copy_entity_txn_id = p_copy_entity_txn_id
2789: and table_route_id = ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id
2790: and information1 = ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value;
2791: --
2792: end if;
2793: --
2794: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
2790: and information1 = ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value;
2791: --
2792: end if;
2793: --
2794: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
2795: --
2796: -- LOG
2797: BEN_PD_COPY_TO_BEN_ONE.log_data('ABR',l_new_value,l_prefix || r_ABR.INFORMATION170|| l_suffix,'COPIED');
2798: --
2793: --
2794: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
2795: --
2796: -- LOG
2797: BEN_PD_COPY_TO_BEN_ONE.log_data('ABR',l_new_value,l_prefix || r_ABR.INFORMATION170|| l_suffix,'COPIED');
2798: --
2799: else
2800: --
2801: -- Call Update routine for the pk_id created in prev run .
3013: end loop;
3014: --
3015: exception when others then
3016: --
3017: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ABR',l_prefix || r_ABR.INFORMATION170 || l_suffix) ;
3018:
3019: end create_ABR_rows;
3020:
3021: --
3158: end if ;
3159: -- End Prefix Sufix derivation
3160: for r_MTR_unique in c_unique_MTR('MTR') loop
3161:
3162: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3163: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3164: r_MTR_unique.information3 >=
3165: ben_pd_copy_to_ben_one.g_copy_effective_date)
3166: ) then
3159: -- End Prefix Sufix derivation
3160: for r_MTR_unique in c_unique_MTR('MTR') loop
3161:
3162: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3163: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3164: r_MTR_unique.information3 >=
3165: ben_pd_copy_to_ben_one.g_copy_effective_date)
3166: ) then
3167: --
3161:
3162: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3163: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3164: r_MTR_unique.information3 >=
3165: ben_pd_copy_to_ben_one.g_copy_effective_date)
3166: ) then
3167: --
3168: hr_utility.set_location(' r_MTR_unique.table_route_id '||r_MTR_unique.table_route_id,10);
3169: hr_utility.set_location(' r_MTR_unique.information1 '||r_MTR_unique.information1,10);
3200: l_object_found_in_target := TRUE;
3201: --
3202: if l_process_date between r_MTR_unique.information2 and r_MTR_unique.information3 then
3203: l_update := true;
3204: if r_MTR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3205: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID'
3206: then
3207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_MTR_unique.information1 ;
3201: --
3202: if l_process_date between r_MTR_unique.information2 and r_MTR_unique.information3 then
3203: l_update := true;
3204: if r_MTR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3205: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID'
3206: then
3207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_MTR_unique.information1 ;
3209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_MTR_unique.information1 ;
3203: l_update := true;
3204: if r_MTR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3205: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID'
3206: then
3207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_MTR_unique.information1 ;
3209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_MTR_unique.information1 ;
3210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_MTR_unique.table_route_id;
3204: if r_MTR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3205: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID'
3206: then
3207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_MTR_unique.information1 ;
3209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_MTR_unique.information1 ;
3210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_MTR_unique.table_route_id;
3212: --
3205: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID'
3206: then
3207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_MTR_unique.information1 ;
3209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_MTR_unique.information1 ;
3210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_MTR_unique.table_route_id;
3212: --
3213: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3206: then
3207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_MTR_unique.information1 ;
3209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_MTR_unique.information1 ;
3210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_MTR_unique.table_route_id;
3212: --
3213: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3214: --
3207: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3208: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_MTR_unique.information1 ;
3209: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_MTR_unique.information1 ;
3210: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_MTR_unique.table_route_id;
3212: --
3213: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3214: --
3215: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_MTR_unique.table_route_id;
3212: --
3213: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3214: --
3215: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3216: -- DOUBT
3217: -- BEN_PD_COPY_TO_BEN_ONE.log_data('MTR',l_new_value,l_prefix || r_MTR_unique.name|| l_suffix,'REUSED');
3218: --
3219: end if ;
3213: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3214: --
3215: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3216: -- DOUBT
3217: -- BEN_PD_COPY_TO_BEN_ONE.log_data('MTR',l_new_value,l_prefix || r_MTR_unique.name|| l_suffix,'REUSED');
3218: --
3219: end if ;
3220: hr_utility.set_location( 'found record for update',10);
3221: --
3233: open c_MTR_min_max_dates(r_MTR_unique.table_route_id, r_MTR_unique.information1 ) ;
3234: fetch c_MTR_min_max_dates into l_min_esd,l_max_eed ;
3235: --
3236:
3237: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3238: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3239: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3240: end if;
3241: l_min_esd := greatest(l_min_esd,r_MTR_unique.information2);
3234: fetch c_MTR_min_max_dates into l_min_esd,l_max_eed ;
3235: --
3236:
3237: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3238: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3239: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3240: end if;
3241: l_min_esd := greatest(l_min_esd,r_MTR_unique.information2);
3242: /*
3235: --
3236:
3237: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3238: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3239: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3240: end if;
3241: l_min_esd := greatest(l_min_esd,r_MTR_unique.information2);
3242: /*
3243: open c_MTR(r_MTR_unique.table_route_id,
3265: p_to_date => l_max_eed );
3266: if l_dt_rec_found THEN
3267: --END TEMPIK
3268: --
3269: if r_MTR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3270: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID' then
3271: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3272: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR_unique.information1 ;
3273: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3266: if l_dt_rec_found THEN
3267: --END TEMPIK
3268: --
3269: if r_MTR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3270: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID' then
3271: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3272: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR_unique.information1 ;
3273: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3274: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3267: --END TEMPIK
3268: --
3269: if r_MTR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3270: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID' then
3271: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3272: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR_unique.information1 ;
3273: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3274: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3275: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3268: --
3269: if r_MTR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3270: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID' then
3271: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3272: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR_unique.information1 ;
3273: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3274: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3275: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3276: --
3269: if r_MTR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3270: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID' then
3271: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3272: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR_unique.information1 ;
3273: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3274: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3275: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3276: --
3277: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3270: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'MTCHG_RT_ID' then
3271: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3272: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR_unique.information1 ;
3273: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3274: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3275: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3276: --
3277: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3278: --
3271: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3272: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR_unique.information1 ;
3273: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3274: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3275: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3276: --
3277: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3278: --
3279: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3273: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3274: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3275: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3276: --
3277: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3278: --
3279: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3280: end if ;
3281: --
3275: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3276: --
3277: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3278: --
3279: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3280: end if ;
3281: --
3282: l_object_found_in_target := true ;
3283: --TEMPIK
3314: end if ;
3315: --
3316:
3317: l_effective_date := r_MTR.information2;
3318: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3319: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3320: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3321: end if;
3322:
3315: --
3316:
3317: l_effective_date := r_MTR.information2;
3318: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3319: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3320: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3321: end if;
3322:
3323: -- UPD START
3316:
3317: l_effective_date := r_MTR.information2;
3318: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3319: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3320: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3321: end if;
3322:
3323: -- UPD START
3324: --if l_first_rec then
3388: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
3389: -- Update all relevent cer records with new pk_id
3390: hr_utility.set_location('Before plsql table ',222);
3391: hr_utility.set_location('new_value id '||l_mtchg_rt_id,222);
3392: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3393: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR.information1 ;
3394: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_MTCHG_RT_ID ;
3395: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3396: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3389: -- Update all relevent cer records with new pk_id
3390: hr_utility.set_location('Before plsql table ',222);
3391: hr_utility.set_location('new_value id '||l_mtchg_rt_id,222);
3392: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3393: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR.information1 ;
3394: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_MTCHG_RT_ID ;
3395: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3396: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3397: hr_utility.set_location('After plsql table ',222);
3390: hr_utility.set_location('Before plsql table ',222);
3391: hr_utility.set_location('new_value id '||l_mtchg_rt_id,222);
3392: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3393: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR.information1 ;
3394: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_MTCHG_RT_ID ;
3395: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3396: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3397: hr_utility.set_location('After plsql table ',222);
3398: --
3391: hr_utility.set_location('new_value id '||l_mtchg_rt_id,222);
3392: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3393: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR.information1 ;
3394: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_MTCHG_RT_ID ;
3395: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3396: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3397: hr_utility.set_location('After plsql table ',222);
3398: --
3399: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
3392: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'MTCHG_RT_ID' ;
3393: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_MTR.information1 ;
3394: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_MTCHG_RT_ID ;
3395: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3396: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3397: hr_utility.set_location('After plsql table ',222);
3398: --
3399: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
3400: --
3395: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3396: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_MTR_unique.table_route_id;
3397: hr_utility.set_location('After plsql table ',222);
3398: --
3399: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
3400: --
3401: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3402: --
3403: else
3397: hr_utility.set_location('After plsql table ',222);
3398: --
3399: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
3400: --
3401: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3402: --
3403: else
3404: --
3405: -- Call Update routine for the pk_id created in prev run .
3527: end loop;
3528: --
3529: exception when others then
3530: --
3531: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'MTR',r_MTR.information5 ) ;
3532: --
3533: end create_MTR_rows;
3534:
3535: --
3672: end if ;
3673: -- End Prefix Sufix derivation
3674: for r_APL1_unique in c_unique_APL1('APL1') loop
3675:
3676: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3677: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3678: r_APL1_unique.information3 >=
3679: ben_pd_copy_to_ben_one.g_copy_effective_date)
3680: ) then
3673: -- End Prefix Sufix derivation
3674: for r_APL1_unique in c_unique_APL1('APL1') loop
3675:
3676: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3677: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3678: r_APL1_unique.information3 >=
3679: ben_pd_copy_to_ben_one.g_copy_effective_date)
3680: ) then
3681: --
3675:
3676: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3677: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3678: r_APL1_unique.information3 >=
3679: ben_pd_copy_to_ben_one.g_copy_effective_date)
3680: ) then
3681: --
3682: hr_utility.set_location(' r_APL1_unique.table_route_id '||r_APL1_unique.table_route_id,10);
3683: hr_utility.set_location(' r_APL1_unique.information1 '||r_APL1_unique.information1,10);
3710: l_object_found_in_target := TRUE;
3711: --
3712: if l_process_date between r_APL1_unique.information2 and r_APL1_unique.information3 then
3713: l_update := true;
3714: if r_APL1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3715: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID'
3716: then
3717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APL1_unique.information1 ;
3711: --
3712: if l_process_date between r_APL1_unique.information2 and r_APL1_unique.information3 then
3713: l_update := true;
3714: if r_APL1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3715: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID'
3716: then
3717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APL1_unique.information1 ;
3719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APL1_unique.information1 ;
3713: l_update := true;
3714: if r_APL1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3715: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID'
3716: then
3717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APL1_unique.information1 ;
3719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APL1_unique.information1 ;
3720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APL1_unique.table_route_id;
3714: if r_APL1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3715: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID'
3716: then
3717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APL1_unique.information1 ;
3719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APL1_unique.information1 ;
3720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APL1_unique.table_route_id;
3722: --
3715: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID'
3716: then
3717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APL1_unique.information1 ;
3719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APL1_unique.information1 ;
3720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APL1_unique.table_route_id;
3722: --
3723: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3716: then
3717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APL1_unique.information1 ;
3719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APL1_unique.information1 ;
3720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APL1_unique.table_route_id;
3722: --
3723: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3724: --
3717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APL1_unique.information1 ;
3719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APL1_unique.information1 ;
3720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APL1_unique.table_route_id;
3722: --
3723: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3724: --
3725: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APL1_unique.table_route_id;
3722: --
3723: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3724: --
3725: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3726: --
3727: -- DOUBT
3728: --BEN_PD_COPY_TO_BEN_ONE.log_data('APL1',l_new_value,l_prefix || r_APL1_unique.name|| l_suffix,'REUSED');
3729: --
3724: --
3725: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3726: --
3727: -- DOUBT
3728: --BEN_PD_COPY_TO_BEN_ONE.log_data('APL1',l_new_value,l_prefix || r_APL1_unique.name|| l_suffix,'REUSED');
3729: --
3730: end if ;
3731: hr_utility.set_location( 'found record for update',10);
3732: --
3744: open c_APL1_min_max_dates(r_APL1_unique.table_route_id, r_APL1_unique.information1 ) ;
3745: fetch c_APL1_min_max_dates into l_min_esd,l_max_eed ;
3746: --
3747:
3748: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3749: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3750: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3751: end if;
3752: l_min_esd := greatest(l_min_esd,r_APL1_unique.information2);
3745: fetch c_APL1_min_max_dates into l_min_esd,l_max_eed ;
3746: --
3747:
3748: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3749: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3750: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3751: end if;
3752: l_min_esd := greatest(l_min_esd,r_APL1_unique.information2);
3753: /*open c_APL1(r_APL1_unique.table_route_id,
3746: --
3747:
3748: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3749: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3750: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3751: end if;
3752: l_min_esd := greatest(l_min_esd,r_APL1_unique.information2);
3753: /*open c_APL1(r_APL1_unique.table_route_id,
3754: r_APL1_unique.information1,
3775: p_to_date => l_max_eed );
3776: if l_dt_rec_found THEN
3777: --END TEMPIK
3778: --
3779: if r_APL1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3780: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID' then
3781: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3782: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1_unique.information1 ;
3783: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3776: if l_dt_rec_found THEN
3777: --END TEMPIK
3778: --
3779: if r_APL1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3780: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID' then
3781: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3782: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1_unique.information1 ;
3783: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3784: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3777: --END TEMPIK
3778: --
3779: if r_APL1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3780: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID' then
3781: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3782: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1_unique.information1 ;
3783: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3784: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3785: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3778: --
3779: if r_APL1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3780: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID' then
3781: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3782: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1_unique.information1 ;
3783: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3784: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3785: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3786: --
3779: if r_APL1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
3780: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID' then
3781: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3782: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1_unique.information1 ;
3783: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3784: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3785: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3786: --
3787: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3780: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PTD_LMT_ID' then
3781: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3782: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1_unique.information1 ;
3783: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3784: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3785: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3786: --
3787: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3788: --
3781: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3782: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1_unique.information1 ;
3783: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3784: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3785: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3786: --
3787: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3788: --
3789: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3783: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
3784: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
3785: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3786: --
3787: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3788: --
3789: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3790: end if ;
3791: --
3785: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3786: --
3787: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
3788: --
3789: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3790: end if ;
3791: --
3792: l_object_found_in_target := true ;
3793: --TEMPIK
3825: end if ;
3826: --
3827:
3828: l_effective_date := r_APL1.information2;
3829: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3830: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3831: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3832: end if;
3833: -- UPD START
3826: --
3827:
3828: l_effective_date := r_APL1.information2;
3829: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3830: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3831: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3832: end if;
3833: -- UPD START
3834: -- if l_first_rec then
3827:
3828: l_effective_date := r_APL1.information2;
3829: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3830: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3831: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3832: end if;
3833: -- UPD START
3834: -- if l_first_rec then
3835: if l_first_rec and not l_update then
3884: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
3885: -- Update all relevent cer records with new pk_id
3886: hr_utility.set_location('Before plsql table ',222);
3887: hr_utility.set_location('new_value id '||l_acty_rt_ptd_lmt_id,222);
3888: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3889: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1.information1 ;
3890: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_RT_PTD_LMT_ID ;
3891: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3892: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3885: -- Update all relevent cer records with new pk_id
3886: hr_utility.set_location('Before plsql table ',222);
3887: hr_utility.set_location('new_value id '||l_acty_rt_ptd_lmt_id,222);
3888: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3889: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1.information1 ;
3890: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_RT_PTD_LMT_ID ;
3891: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3892: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3893: hr_utility.set_location('After plsql table ',222);
3886: hr_utility.set_location('Before plsql table ',222);
3887: hr_utility.set_location('new_value id '||l_acty_rt_ptd_lmt_id,222);
3888: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3889: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1.information1 ;
3890: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_RT_PTD_LMT_ID ;
3891: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3892: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3893: hr_utility.set_location('After plsql table ',222);
3894: --
3887: hr_utility.set_location('new_value id '||l_acty_rt_ptd_lmt_id,222);
3888: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3889: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1.information1 ;
3890: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_RT_PTD_LMT_ID ;
3891: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3892: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3893: hr_utility.set_location('After plsql table ',222);
3894: --
3895: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
3888: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_RT_PTD_LMT_ID' ;
3889: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APL1.information1 ;
3890: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_RT_PTD_LMT_ID ;
3891: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3892: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3893: hr_utility.set_location('After plsql table ',222);
3894: --
3895: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
3896: --
3891: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
3892: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APL1_unique.table_route_id;
3893: hr_utility.set_location('After plsql table ',222);
3894: --
3895: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
3896: --
3897: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3898: --
3899: else
3893: hr_utility.set_location('After plsql table ',222);
3894: --
3895: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
3896: --
3897: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
3898: --
3899: else
3900: --
3901: -- Call Update routine for the pk_id created in prev run .
4011: end loop;
4012: --
4013: exception when others then
4014: --
4015: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'APL1',r_APL1.information5 ) ;
4016: --
4017: end create_APL1_rows;
4018:
4019: --
4192: -- Derive the prefix - sufix
4193: -- End Prefix Sufix derivation
4194: for r_APR_unique in c_unique_APR('APR') loop
4195:
4196: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4197: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4198: r_APR_unique.information3 >=
4199: ben_pd_copy_to_ben_one.g_copy_effective_date)
4200: ) then
4193: -- End Prefix Sufix derivation
4194: for r_APR_unique in c_unique_APR('APR') loop
4195:
4196: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4197: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4198: r_APR_unique.information3 >=
4199: ben_pd_copy_to_ben_one.g_copy_effective_date)
4200: ) then
4201: --
4195:
4196: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4197: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4198: r_APR_unique.information3 >=
4199: ben_pd_copy_to_ben_one.g_copy_effective_date)
4200: ) then
4201: --
4202: if p_prefix_suffix_cd = 'PREFIX' then
4203: l_prefix := p_prefix_suffix_text ;
4247: l_object_found_in_target := TRUE;
4248: --
4249: if l_process_date between r_APR_unique.information2 and r_APR_unique.information3 then
4250: l_update := true;
4251: if r_APR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4252: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID'
4253: then
4254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APR_unique.information1 ;
4248: --
4249: if l_process_date between r_APR_unique.information2 and r_APR_unique.information3 then
4250: l_update := true;
4251: if r_APR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4252: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID'
4253: then
4254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APR_unique.information1 ;
4256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APR_unique.information1 ;
4250: l_update := true;
4251: if r_APR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4252: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID'
4253: then
4254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APR_unique.information1 ;
4256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APR_unique.information1 ;
4257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APR_unique.table_route_id;
4251: if r_APR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4252: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID'
4253: then
4254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APR_unique.information1 ;
4256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APR_unique.information1 ;
4257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APR_unique.table_route_id;
4259: --
4252: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID'
4253: then
4254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APR_unique.information1 ;
4256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APR_unique.information1 ;
4257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APR_unique.table_route_id;
4259: --
4260: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4253: then
4254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APR_unique.information1 ;
4256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APR_unique.information1 ;
4257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APR_unique.table_route_id;
4259: --
4260: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4261: --
4254: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APR_unique.information1 ;
4256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APR_unique.information1 ;
4257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APR_unique.table_route_id;
4259: --
4260: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4261: --
4262: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APR_unique.table_route_id;
4259: --
4260: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4261: --
4262: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4263: --
4264: BEN_PD_COPY_TO_BEN_ONE.log_data('APR',l_new_value,l_prefix || r_APR_unique.name|| l_suffix,'REUSED');
4265: --
4266: end if ;
4260: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4261: --
4262: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4263: --
4264: BEN_PD_COPY_TO_BEN_ONE.log_data('APR',l_new_value,l_prefix || r_APR_unique.name|| l_suffix,'REUSED');
4265: --
4266: end if ;
4267: hr_utility.set_location( 'found record for update',10);
4268: --
4280: open c_APR_min_max_dates(r_APR_unique.table_route_id, r_APR_unique.information1 ) ;
4281: fetch c_APR_min_max_dates into l_min_esd,l_max_eed ;
4282: --
4283:
4284: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4285: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4286: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4287: end if;
4288: l_min_esd := greatest(l_min_esd,r_APR_unique.information2);
4281: fetch c_APR_min_max_dates into l_min_esd,l_max_eed ;
4282: --
4283:
4284: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4285: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4286: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4287: end if;
4288: l_min_esd := greatest(l_min_esd,r_APR_unique.information2);
4289: /*
4282: --
4283:
4284: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4285: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4286: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4287: end if;
4288: l_min_esd := greatest(l_min_esd,r_APR_unique.information2);
4289: /*
4290: open c_APR(r_APR_unique.table_route_id,
4312: p_from_date => l_min_esd,
4313: p_to_date => l_max_eed );
4314: if l_dt_rec_found THEN
4315: --END TEMPIK --
4316: if r_APR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4317: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID' then
4318: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4319: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR_unique.information1 ;
4320: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4313: p_to_date => l_max_eed );
4314: if l_dt_rec_found THEN
4315: --END TEMPIK --
4316: if r_APR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4317: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID' then
4318: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4319: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR_unique.information1 ;
4320: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4321: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4314: if l_dt_rec_found THEN
4315: --END TEMPIK --
4316: if r_APR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4317: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID' then
4318: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4319: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR_unique.information1 ;
4320: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4321: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4322: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4315: --END TEMPIK --
4316: if r_APR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4317: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID' then
4318: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4319: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR_unique.information1 ;
4320: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4321: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4322: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4323: --
4316: if r_APR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4317: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID' then
4318: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4319: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR_unique.information1 ;
4320: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4321: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4322: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4323: --
4324: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4317: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_ID' then
4318: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4319: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR_unique.information1 ;
4320: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4321: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4322: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4323: --
4324: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4325: --
4318: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4319: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR_unique.information1 ;
4320: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4321: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4322: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4323: --
4324: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4325: --
4326: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4320: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4321: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4322: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4323: --
4324: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4325: --
4326: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4327: --
4328: ben_pd_copy_to_ben_one.log_data('APR',l_new_value,l_prefix || r_APR_unique.name|| l_suffix,'REUSED');
4322: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4323: --
4324: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4325: --
4326: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4327: --
4328: ben_pd_copy_to_ben_one.log_data('APR',l_new_value,l_prefix || r_APR_unique.name|| l_suffix,'REUSED');
4329: --
4330: end if ;
4324: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4325: --
4326: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4327: --
4328: ben_pd_copy_to_ben_one.log_data('APR',l_new_value,l_prefix || r_APR_unique.name|| l_suffix,'REUSED');
4329: --
4330: end if ;
4331: --
4332: l_object_found_in_target := true ;
4396: l_first_rec := true ;
4397: --
4398: end if ;
4399: --
4400: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_ACTL_PREM_F',l_prefix || r_APR.information170 || l_suffix);
4401: --
4402:
4403: l_effective_date := r_APR.information2;
4404: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4400: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_ACTL_PREM_F',l_prefix || r_APR.information170 || l_suffix);
4401: --
4402:
4403: l_effective_date := r_APR.information2;
4404: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4405: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4406: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4407: end if;
4408: -- UPD START
4401: --
4402:
4403: l_effective_date := r_APR.information2;
4404: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4405: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4406: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4407: end if;
4408: -- UPD START
4409: --if l_first_rec then
4402:
4403: l_effective_date := r_APR.information2;
4404: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4405: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4406: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4407: end if;
4408: -- UPD START
4409: --if l_first_rec then
4410: if l_first_rec and not l_update then
4489: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
4490: -- Update all relevent cer records with new pk_id
4491: hr_utility.set_location('Before plsql table ',222);
4492: hr_utility.set_location('new_value id '||l_actl_prem_id,222);
4493: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4494: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR.information1 ;
4495: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_ID ;
4496: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
4497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4490: -- Update all relevent cer records with new pk_id
4491: hr_utility.set_location('Before plsql table ',222);
4492: hr_utility.set_location('new_value id '||l_actl_prem_id,222);
4493: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4494: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR.information1 ;
4495: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_ID ;
4496: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
4497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4498: hr_utility.set_location('After plsql table ',222);
4491: hr_utility.set_location('Before plsql table ',222);
4492: hr_utility.set_location('new_value id '||l_actl_prem_id,222);
4493: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4494: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR.information1 ;
4495: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_ID ;
4496: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
4497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4498: hr_utility.set_location('After plsql table ',222);
4499: --
4492: hr_utility.set_location('new_value id '||l_actl_prem_id,222);
4493: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4494: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR.information1 ;
4495: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_ID ;
4496: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
4497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4498: hr_utility.set_location('After plsql table ',222);
4499: --
4500: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
4493: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_ID' ;
4494: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APR.information1 ;
4495: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_ID ;
4496: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
4497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4498: hr_utility.set_location('After plsql table ',222);
4499: --
4500: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
4501: --
4496: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
4497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APR_unique.table_route_id;
4498: hr_utility.set_location('After plsql table ',222);
4499: --
4500: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
4501: --
4502: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4503: ben_pd_copy_to_ben_one.log_data('APR',l_new_value,l_prefix || r_APR.information170|| l_suffix,'COPIED');
4504: --
4498: hr_utility.set_location('After plsql table ',222);
4499: --
4500: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
4501: --
4502: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4503: ben_pd_copy_to_ben_one.log_data('APR',l_new_value,l_prefix || r_APR.information170|| l_suffix,'COPIED');
4504: --
4505: else
4506: --
4499: --
4500: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
4501: --
4502: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4503: ben_pd_copy_to_ben_one.log_data('APR',l_new_value,l_prefix || r_APR.information170|| l_suffix,'COPIED');
4504: --
4505: else
4506: --
4507: -- Call Update routine for the pk_id created in prev run .
4646: end loop;
4647: --
4648: exception when others then
4649: --
4650: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'APR',l_prefix || r_APR.information170 || l_suffix) ;
4651: --
4652: end create_APR_rows;
4653:
4654: --
4790: end if ;
4791: -- End Prefix Sufix derivation
4792: for r_AVR_unique in c_unique_AVR('AVR') loop
4793:
4794: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4795: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4796: r_AVR_unique.information3 >=
4797: ben_pd_copy_to_ben_one.g_copy_effective_date)
4798: ) then
4791: -- End Prefix Sufix derivation
4792: for r_AVR_unique in c_unique_AVR('AVR') loop
4793:
4794: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4795: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4796: r_AVR_unique.information3 >=
4797: ben_pd_copy_to_ben_one.g_copy_effective_date)
4798: ) then
4799: --
4793:
4794: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4795: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4796: r_AVR_unique.information3 >=
4797: ben_pd_copy_to_ben_one.g_copy_effective_date)
4798: ) then
4799: --
4800: hr_utility.set_location(' r_AVR_unique.table_route_id '||r_AVR_unique.table_route_id,10);
4801: hr_utility.set_location(' r_AVR_unique.information1 '||r_AVR_unique.information1,10);
4829: l_object_found_in_target := TRUE;
4830: --
4831: if l_process_date between r_AVR_unique.information2 and r_AVR_unique.information3 then
4832: l_update := true;
4833: if r_AVR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4834: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID'
4835: then
4836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4837: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVR_unique.information1 ;
4830: --
4831: if l_process_date between r_AVR_unique.information2 and r_AVR_unique.information3 then
4832: l_update := true;
4833: if r_AVR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4834: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID'
4835: then
4836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4837: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVR_unique.information1 ;
4838: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVR_unique.information1 ;
4832: l_update := true;
4833: if r_AVR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4834: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID'
4835: then
4836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4837: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVR_unique.information1 ;
4838: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVR_unique.information1 ;
4839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVR_unique.table_route_id;
4833: if r_AVR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4834: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID'
4835: then
4836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4837: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVR_unique.information1 ;
4838: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVR_unique.information1 ;
4839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVR_unique.table_route_id;
4841: --
4834: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID'
4835: then
4836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4837: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVR_unique.information1 ;
4838: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVR_unique.information1 ;
4839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVR_unique.table_route_id;
4841: --
4842: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4835: then
4836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4837: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVR_unique.information1 ;
4838: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVR_unique.information1 ;
4839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVR_unique.table_route_id;
4841: --
4842: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4843: --
4836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4837: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVR_unique.information1 ;
4838: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVR_unique.information1 ;
4839: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVR_unique.table_route_id;
4841: --
4842: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4843: --
4844: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4840: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVR_unique.table_route_id;
4841: --
4842: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4843: --
4844: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4845: --
4846: -- DOUBT
4847: --BEN_PD_COPY_TO_BEN_ONE.log_data('AVR',l_new_value,l_prefix || r_AVR_unique.name|| l_suffix,'REUSED');
4848: --
4843: --
4844: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4845: --
4846: -- DOUBT
4847: --BEN_PD_COPY_TO_BEN_ONE.log_data('AVR',l_new_value,l_prefix || r_AVR_unique.name|| l_suffix,'REUSED');
4848: --
4849: end if ;
4850: hr_utility.set_location( 'found record for update',10);
4851: --
4863: open c_AVR_min_max_dates(r_AVR_unique.table_route_id, r_AVR_unique.information1 ) ;
4864: fetch c_AVR_min_max_dates into l_min_esd,l_max_eed ;
4865: --
4866:
4867: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4868: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4869: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4870: end if;
4871: l_min_esd := greatest(l_min_esd,r_AVR_unique.information2);
4864: fetch c_AVR_min_max_dates into l_min_esd,l_max_eed ;
4865: --
4866:
4867: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4868: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4869: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4870: end if;
4871: l_min_esd := greatest(l_min_esd,r_AVR_unique.information2);
4872: /*
4865: --
4866:
4867: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4868: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4869: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4870: end if;
4871: l_min_esd := greatest(l_min_esd,r_AVR_unique.information2);
4872: /*
4873: open c_AVR(r_AVR_unique.table_route_id,
4897: p_from_date => l_min_esd,
4898: p_to_date => l_max_eed );
4899: if l_dt_rec_found THEN
4900: --END TEMPIK --
4901: if r_AVR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4902: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID' then
4903: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4904: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR_unique.information1 ;
4905: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4898: p_to_date => l_max_eed );
4899: if l_dt_rec_found THEN
4900: --END TEMPIK --
4901: if r_AVR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4902: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID' then
4903: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4904: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR_unique.information1 ;
4905: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4906: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4899: if l_dt_rec_found THEN
4900: --END TEMPIK --
4901: if r_AVR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4902: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID' then
4903: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4904: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR_unique.information1 ;
4905: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4906: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4907: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
4900: --END TEMPIK --
4901: if r_AVR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4902: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID' then
4903: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4904: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR_unique.information1 ;
4905: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4906: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4907: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
4908: --
4901: if r_AVR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
4902: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID' then
4903: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4904: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR_unique.information1 ;
4905: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4906: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4907: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
4908: --
4909: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4902: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_VRBL_RT_ID' then
4903: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4904: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR_unique.information1 ;
4905: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4906: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4907: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
4908: --
4909: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4910: --
4903: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
4904: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR_unique.information1 ;
4905: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4906: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4907: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
4908: --
4909: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4910: --
4911: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4905: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
4906: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
4907: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
4908: --
4909: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4910: --
4911: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4912: end if ;
4913: --
4907: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
4908: --
4909: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
4910: --
4911: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
4912: end if ;
4913: --
4914: l_object_found_in_target := true ;
4915: --TEMPIK
4947: end if ;
4948: --
4949:
4950: l_effective_date := r_AVR.information2;
4951: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4952: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4953: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4954: end if;
4955: -- UPD START
4948: --
4949:
4950: l_effective_date := r_AVR.information2;
4951: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4952: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4953: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4954: end if;
4955: -- UPD START
4956: --if l_first_rec then
4949:
4950: l_effective_date := r_AVR.information2;
4951: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4952: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4953: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4954: end if;
4955: -- UPD START
4956: --if l_first_rec then
4957: if l_first_rec and not l_update then
5007: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
5008: -- Update all relevent cer records with new pk_id
5009: hr_utility.set_location('Before plsql table ',222);
5010: hr_utility.set_location('new_value id '||l_acty_vrbl_rt_id,222);
5011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
5012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR.information1 ;
5013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_VRBL_RT_ID ;
5014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
5008: -- Update all relevent cer records with new pk_id
5009: hr_utility.set_location('Before plsql table ',222);
5010: hr_utility.set_location('new_value id '||l_acty_vrbl_rt_id,222);
5011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
5012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR.information1 ;
5013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_VRBL_RT_ID ;
5014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
5016: hr_utility.set_location('After plsql table ',222);
5009: hr_utility.set_location('Before plsql table ',222);
5010: hr_utility.set_location('new_value id '||l_acty_vrbl_rt_id,222);
5011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
5012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR.information1 ;
5013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_VRBL_RT_ID ;
5014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
5016: hr_utility.set_location('After plsql table ',222);
5017: --
5010: hr_utility.set_location('new_value id '||l_acty_vrbl_rt_id,222);
5011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
5012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR.information1 ;
5013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_VRBL_RT_ID ;
5014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
5016: hr_utility.set_location('After plsql table ',222);
5017: --
5018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_VRBL_RT_ID' ;
5012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVR.information1 ;
5013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_VRBL_RT_ID ;
5014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
5016: hr_utility.set_location('After plsql table ',222);
5017: --
5018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5019: --
5014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVR_unique.table_route_id;
5016: hr_utility.set_location('After plsql table ',222);
5017: --
5018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5019: --
5020: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5021: --
5022: else
5016: hr_utility.set_location('After plsql table ',222);
5017: --
5018: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5019: --
5020: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5021: --
5022: else
5023: --
5024: -- Call Update routine for the pk_id created in prev run .
5134: end loop;
5135: --
5136: exception when others then
5137: --
5138: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'AVR',r_AVR.information5 ) ;
5139: --
5140: end create_AVR_rows;
5141:
5142: --
5285: end if ;
5286: -- End Prefix Sufix derivation
5287: for r_VPF_unique in c_unique_VPF('VPF') loop
5288:
5289: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5290: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5291: r_VPF_unique.information3 >=
5292: ben_pd_copy_to_ben_one.g_copy_effective_date)
5293: ) then
5286: -- End Prefix Sufix derivation
5287: for r_VPF_unique in c_unique_VPF('VPF') loop
5288:
5289: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5290: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5291: r_VPF_unique.information3 >=
5292: ben_pd_copy_to_ben_one.g_copy_effective_date)
5293: ) then
5294: --
5288:
5289: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5290: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5291: r_VPF_unique.information3 >=
5292: ben_pd_copy_to_ben_one.g_copy_effective_date)
5293: ) then
5294: --
5295: hr_utility.set_location(' r_VPF_unique.table_route_id '||r_VPF_unique.table_route_id,10);
5296: hr_utility.set_location(' r_VPF_unique.information1 '||r_VPF_unique.information1,10);
5328: l_object_found_in_target := TRUE;
5329: --
5330: if l_process_date between r_VPF_unique.information2 and r_VPF_unique.information3 then
5331: l_update := true;
5332: if r_VPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5333: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID'
5334: then
5335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VPF_unique.information1 ;
5329: --
5330: if l_process_date between r_VPF_unique.information2 and r_VPF_unique.information3 then
5331: l_update := true;
5332: if r_VPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5333: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID'
5334: then
5335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VPF_unique.information1 ;
5337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VPF_unique.information1 ;
5331: l_update := true;
5332: if r_VPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5333: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID'
5334: then
5335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VPF_unique.information1 ;
5337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VPF_unique.information1 ;
5338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VPF_unique.table_route_id;
5332: if r_VPF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5333: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID'
5334: then
5335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VPF_unique.information1 ;
5337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VPF_unique.information1 ;
5338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VPF_unique.table_route_id;
5340: --
5333: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID'
5334: then
5335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VPF_unique.information1 ;
5337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VPF_unique.information1 ;
5338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VPF_unique.table_route_id;
5340: --
5341: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5334: then
5335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VPF_unique.information1 ;
5337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VPF_unique.information1 ;
5338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VPF_unique.table_route_id;
5340: --
5341: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5342: --
5335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VPF_unique.information1 ;
5337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VPF_unique.information1 ;
5338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VPF_unique.table_route_id;
5340: --
5341: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5342: --
5343: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5339: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VPF_unique.table_route_id;
5340: --
5341: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5342: --
5343: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5344: --
5345: BEN_PD_COPY_TO_BEN_ONE.log_data('VPF',l_new_value,l_prefix || r_VPF_unique.name|| l_suffix,'REUSED');
5346: --
5347: end if ;
5341: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5342: --
5343: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5344: --
5345: BEN_PD_COPY_TO_BEN_ONE.log_data('VPF',l_new_value,l_prefix || r_VPF_unique.name|| l_suffix,'REUSED');
5346: --
5347: end if ;
5348: hr_utility.set_location( 'found record for update',10);
5349: --
5361: open c_VPF_min_max_dates(r_VPF_unique.table_route_id, r_VPF_unique.information1 ) ;
5362: fetch c_VPF_min_max_dates into l_min_esd,l_max_eed ;
5363: --
5364:
5365: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5366: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5367: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5368: end if;
5369: l_min_esd := greatest(l_min_esd,r_VPF_unique.information2);
5362: fetch c_VPF_min_max_dates into l_min_esd,l_max_eed ;
5363: --
5364:
5365: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5366: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5367: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5368: end if;
5369: l_min_esd := greatest(l_min_esd,r_VPF_unique.information2);
5370:
5363: --
5364:
5365: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5366: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5367: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5368: end if;
5369: l_min_esd := greatest(l_min_esd,r_VPF_unique.information2);
5370:
5371: -- Only For Use by Create Wizard - Same Business Group
5369: l_min_esd := greatest(l_min_esd,r_VPF_unique.information2);
5370:
5371: -- Only For Use by Create Wizard - Same Business Group
5372:
5373: if BEN_PD_COPY_TO_BEN_ONE.g_transaction_category = 'BEN_PDCRWZ' then
5374:
5375: l_OIPL_ID := NVL(get_fk('OIPL_ID', r_VPF.information258,r_VPF.dml_operation),
5376: r_VPF.information258);
5377: l_PL_ID := NVL(get_fk('PL_ID', r_VPF.information261,r_VPF.dml_operation),
5402: p_to_date => l_max_eed );
5403: if l_dt_rec_found THEN
5404: --END TEMPIK
5405: --
5406: if r_VPF_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
5407: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID' then
5408: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5409: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF_unique.information1 ;
5410: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
5403: if l_dt_rec_found THEN
5404: --END TEMPIK
5405: --
5406: if r_VPF_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
5407: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID' then
5408: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5409: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF_unique.information1 ;
5410: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
5411: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
5404: --END TEMPIK
5405: --
5406: if r_VPF_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
5407: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID' then
5408: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5409: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF_unique.information1 ;
5410: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
5411: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
5412: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5405: --
5406: if r_VPF_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
5407: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID' then
5408: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5409: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF_unique.information1 ;
5410: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
5411: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
5412: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5413: --
5406: if r_VPF_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
5407: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID' then
5408: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5409: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF_unique.information1 ;
5410: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
5411: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
5412: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5413: --
5414: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
5407: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'VRBL_RT_PRFL_ID' then
5408: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5409: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF_unique.information1 ;
5410: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
5411: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
5412: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5413: --
5414: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
5415: --
5408: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5409: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF_unique.information1 ;
5410: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
5411: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
5412: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5413: --
5414: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
5415: --
5416: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5410: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
5411: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
5412: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5413: --
5414: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
5415: --
5416: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5417: --
5418: ben_pd_copy_to_ben_one.log_data('VPF',l_new_value,l_prefix || r_VPF_unique.name|| l_suffix,'REUSED');
5412: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5413: --
5414: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
5415: --
5416: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5417: --
5418: ben_pd_copy_to_ben_one.log_data('VPF',l_new_value,l_prefix || r_VPF_unique.name|| l_suffix,'REUSED');
5419: --
5420: end if ;
5414: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
5415: --
5416: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5417: --
5418: ben_pd_copy_to_ben_one.log_data('VPF',l_new_value,l_prefix || r_VPF_unique.name|| l_suffix,'REUSED');
5419: --
5420: end if ;
5421: --
5422: l_object_found_in_target := true ;
5452: l_first_rec := true ;
5453: --
5454: end if ;
5455: --
5456: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_VRBL_RT_PRFL_F',l_prefix || r_VPF.information170 || l_suffix);
5457: --
5458:
5459: l_effective_date := r_VPF.information2;
5460: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5456: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_VRBL_RT_PRFL_F',l_prefix || r_VPF.information170 || l_suffix);
5457: --
5458:
5459: l_effective_date := r_VPF.information2;
5460: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5461: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5462: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5463: end if;
5464: -- UPD START
5457: --
5458:
5459: l_effective_date := r_VPF.information2;
5460: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5461: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5462: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5463: end if;
5464: -- UPD START
5465: --if l_first_rec then
5458:
5459: l_effective_date := r_VPF.information2;
5460: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5461: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5462: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5463: end if;
5464: -- UPD START
5465: --if l_first_rec then
5466: if l_first_rec and not l_update then
5609: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
5610: -- Update all relevent cer records with new pk_id
5611: hr_utility.set_location('Before plsql table ',222);
5612: hr_utility.set_location('new_value id '||l_vrbl_rt_prfl_id,222);
5613: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5614: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF.information1 ;
5615: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_VRBL_RT_PRFL_ID ;
5616: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5617: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5610: -- Update all relevent cer records with new pk_id
5611: hr_utility.set_location('Before plsql table ',222);
5612: hr_utility.set_location('new_value id '||l_vrbl_rt_prfl_id,222);
5613: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5614: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF.information1 ;
5615: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_VRBL_RT_PRFL_ID ;
5616: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5617: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5618: hr_utility.set_location('After plsql table ',222);
5611: hr_utility.set_location('Before plsql table ',222);
5612: hr_utility.set_location('new_value id '||l_vrbl_rt_prfl_id,222);
5613: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5614: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF.information1 ;
5615: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_VRBL_RT_PRFL_ID ;
5616: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5617: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5618: hr_utility.set_location('After plsql table ',222);
5619: --
5612: hr_utility.set_location('new_value id '||l_vrbl_rt_prfl_id,222);
5613: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5614: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF.information1 ;
5615: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_VRBL_RT_PRFL_ID ;
5616: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5617: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5618: hr_utility.set_location('After plsql table ',222);
5619: --
5620: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5613: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'VRBL_RT_PRFL_ID' ;
5614: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_VPF.information1 ;
5615: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_VRBL_RT_PRFL_ID ;
5616: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5617: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5618: hr_utility.set_location('After plsql table ',222);
5619: --
5620: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5621: --
5616: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
5617: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_VPF_unique.table_route_id;
5618: hr_utility.set_location('After plsql table ',222);
5619: --
5620: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5621: --
5622: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5623: ben_pd_copy_to_ben_one.log_data('VPF',l_new_value,l_prefix || r_VPF.information170|| l_suffix,'COPIED');
5624: --
5618: hr_utility.set_location('After plsql table ',222);
5619: --
5620: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5621: --
5622: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5623: ben_pd_copy_to_ben_one.log_data('VPF',l_new_value,l_prefix || r_VPF.information170|| l_suffix,'COPIED');
5624: --
5625: else
5626: --
5619: --
5620: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
5621: --
5622: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
5623: ben_pd_copy_to_ben_one.log_data('VPF',l_new_value,l_prefix || r_VPF.information170|| l_suffix,'COPIED');
5624: --
5625: else
5626: --
5627: -- Call Update routine for the pk_id created in prev run .
5831: end loop;
5832: --
5833: exception when others then
5834: --
5835: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'VPF', l_prefix || r_VPF.information170 || l_suffix) ;
5836: --
5837: end create_VPF_rows;
5838:
5839: --
6006: -- Derive the prefix - sufix
6007: -- End Prefix Sufix derivation
6008: for r_CCM_unique in c_unique_CCM('CCM') loop
6009:
6010: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6011: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6012: r_CCM_unique.information3 >=
6013: ben_pd_copy_to_ben_one.g_copy_effective_date)
6014: ) then
6007: -- End Prefix Sufix derivation
6008: for r_CCM_unique in c_unique_CCM('CCM') loop
6009:
6010: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6011: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6012: r_CCM_unique.information3 >=
6013: ben_pd_copy_to_ben_one.g_copy_effective_date)
6014: ) then
6015: --
6009:
6010: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6011: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6012: r_CCM_unique.information3 >=
6013: ben_pd_copy_to_ben_one.g_copy_effective_date)
6014: ) then
6015: --
6016: if p_prefix_suffix_cd = 'PREFIX' then
6017: l_prefix := p_prefix_suffix_text ;
6059: l_object_found_in_target := TRUE;
6060: --
6061: if l_process_date between r_CCM_unique.information2 and r_CCM_unique.information3 then
6062: l_update := true;
6063: if r_CCM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6064: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID'
6065: then
6066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CCM_unique.information1 ;
6060: --
6061: if l_process_date between r_CCM_unique.information2 and r_CCM_unique.information3 then
6062: l_update := true;
6063: if r_CCM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6064: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID'
6065: then
6066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CCM_unique.information1 ;
6068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CCM_unique.information1 ;
6062: l_update := true;
6063: if r_CCM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6064: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID'
6065: then
6066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CCM_unique.information1 ;
6068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CCM_unique.information1 ;
6069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CCM_unique.table_route_id;
6063: if r_CCM_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6064: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID'
6065: then
6066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CCM_unique.information1 ;
6068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CCM_unique.information1 ;
6069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CCM_unique.table_route_id;
6071: --
6064: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID'
6065: then
6066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CCM_unique.information1 ;
6068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CCM_unique.information1 ;
6069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CCM_unique.table_route_id;
6071: --
6072: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6065: then
6066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CCM_unique.information1 ;
6068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CCM_unique.information1 ;
6069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CCM_unique.table_route_id;
6071: --
6072: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6073: --
6066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CCM_unique.information1 ;
6068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CCM_unique.information1 ;
6069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CCM_unique.table_route_id;
6071: --
6072: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6073: --
6074: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CCM_unique.table_route_id;
6071: --
6072: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6073: --
6074: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6075: --
6076: BEN_PD_COPY_TO_BEN_ONE.log_data('CCM',l_new_value,l_prefix || r_CCM_unique.name|| l_suffix,'REUSED');
6077: --
6078: end if ;
6072: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6073: --
6074: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6075: --
6076: BEN_PD_COPY_TO_BEN_ONE.log_data('CCM',l_new_value,l_prefix || r_CCM_unique.name|| l_suffix,'REUSED');
6077: --
6078: end if ;
6079: hr_utility.set_location( 'found record for update',10);
6080: --
6093: open c_CCM_min_max_dates(r_CCM_unique.table_route_id, r_CCM_unique.information1 ) ;
6094: fetch c_CCM_min_max_dates into l_min_esd,l_max_eed ;
6095: --
6096:
6097: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6098: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6099: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6100: end if;
6101: l_min_esd := greatest(l_min_esd,r_CCM_unique.information2);
6094: fetch c_CCM_min_max_dates into l_min_esd,l_max_eed ;
6095: --
6096:
6097: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6098: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6099: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6100: end if;
6101: l_min_esd := greatest(l_min_esd,r_CCM_unique.information2);
6102: if p_reuse_object_flag = 'Y' then
6095: --
6096:
6097: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6098: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6099: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6100: end if;
6101: l_min_esd := greatest(l_min_esd,r_CCM_unique.information2);
6102: if p_reuse_object_flag = 'Y' then
6103: if c_CCM_min_max_dates%found then
6115: p_to_date => l_max_eed );
6116: if l_dt_rec_found THEN
6117: --END TEMPIK
6118: --
6119: if r_CCM_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6120: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID' then
6121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM_unique.information1 ;
6123: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6116: if l_dt_rec_found THEN
6117: --END TEMPIK
6118: --
6119: if r_CCM_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6120: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID' then
6121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM_unique.information1 ;
6123: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6124: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6117: --END TEMPIK
6118: --
6119: if r_CCM_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6120: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID' then
6121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM_unique.information1 ;
6123: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6124: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6125: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6118: --
6119: if r_CCM_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6120: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID' then
6121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM_unique.information1 ;
6123: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6124: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6125: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6126: --
6119: if r_CCM_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6120: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID' then
6121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM_unique.information1 ;
6123: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6124: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6125: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6126: --
6127: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6120: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'CVG_AMT_CALC_MTHD_ID' then
6121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM_unique.information1 ;
6123: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6124: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6125: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6126: --
6127: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6128: --
6121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM_unique.information1 ;
6123: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6124: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6125: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6126: --
6127: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6128: --
6129: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6123: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6124: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6125: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6126: --
6127: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6128: --
6129: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6130: ben_pd_copy_to_ben_one.log_data('CCM',l_new_value,l_prefix || r_CCM_unique.name|| l_suffix,'REUSED');
6131: end if ;
6125: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6126: --
6127: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6128: --
6129: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6130: ben_pd_copy_to_ben_one.log_data('CCM',l_new_value,l_prefix || r_CCM_unique.name|| l_suffix,'REUSED');
6131: end if ;
6132: --
6133: l_object_found_in_target := true ;
6126: --
6127: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6128: --
6129: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6130: ben_pd_copy_to_ben_one.log_data('CCM',l_new_value,l_prefix || r_CCM_unique.name|| l_suffix,'REUSED');
6131: end if ;
6132: --
6133: l_object_found_in_target := true ;
6134: --TEMPIK
6197: l_first_rec := true ;
6198: --
6199: end if ;
6200: --
6201: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_CVG_AMT_CALC_MTHD_F',l_prefix || r_CCM.information170 || l_suffix);
6202: --
6203:
6204: l_effective_date := r_CCM.information2;
6205: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6201: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_CVG_AMT_CALC_MTHD_F',l_prefix || r_CCM.information170 || l_suffix);
6202: --
6203:
6204: l_effective_date := r_CCM.information2;
6205: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6206: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6207: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6208: end if;
6209:
6202: --
6203:
6204: l_effective_date := r_CCM.information2;
6205: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6206: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6207: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6208: end if;
6209:
6210: -- UPD START
6203:
6204: l_effective_date := r_CCM.information2;
6205: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6206: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6207: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6208: end if;
6209:
6210: -- UPD START
6211: --if l_first_rec then
6288: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
6289: -- Update all relevent cer records with new pk_id
6290: hr_utility.set_location('Before plsql table ',222);
6291: hr_utility.set_location('new_value id '||l_cvg_amt_calc_mthd_id,222);
6292: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6293: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM.information1 ;
6294: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CVG_AMT_CALC_MTHD_ID ;
6295: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6296: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6289: -- Update all relevent cer records with new pk_id
6290: hr_utility.set_location('Before plsql table ',222);
6291: hr_utility.set_location('new_value id '||l_cvg_amt_calc_mthd_id,222);
6292: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6293: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM.information1 ;
6294: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CVG_AMT_CALC_MTHD_ID ;
6295: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6296: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6297: hr_utility.set_location('After plsql table ',222);
6290: hr_utility.set_location('Before plsql table ',222);
6291: hr_utility.set_location('new_value id '||l_cvg_amt_calc_mthd_id,222);
6292: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6293: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM.information1 ;
6294: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CVG_AMT_CALC_MTHD_ID ;
6295: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6296: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6297: hr_utility.set_location('After plsql table ',222);
6298: --
6291: hr_utility.set_location('new_value id '||l_cvg_amt_calc_mthd_id,222);
6292: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6293: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM.information1 ;
6294: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CVG_AMT_CALC_MTHD_ID ;
6295: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6296: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6297: hr_utility.set_location('After plsql table ',222);
6298: --
6299: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6292: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'CVG_AMT_CALC_MTHD_ID' ;
6293: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_CCM.information1 ;
6294: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_CVG_AMT_CALC_MTHD_ID ;
6295: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6296: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6297: hr_utility.set_location('After plsql table ',222);
6298: --
6299: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6300: --
6295: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6296: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_CCM_unique.table_route_id;
6297: hr_utility.set_location('After plsql table ',222);
6298: --
6299: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6300: --
6301: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6302: ben_pd_copy_to_ben_one.log_data('CCM',l_new_value,l_prefix || r_CCM.information170|| l_suffix,'COPIED');
6303: --
6297: hr_utility.set_location('After plsql table ',222);
6298: --
6299: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6300: --
6301: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6302: ben_pd_copy_to_ben_one.log_data('CCM',l_new_value,l_prefix || r_CCM.information170|| l_suffix,'COPIED');
6303: --
6304: else
6305: --
6298: --
6299: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6300: --
6301: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6302: ben_pd_copy_to_ben_one.log_data('CCM',l_new_value,l_prefix || r_CCM.information170|| l_suffix,'COPIED');
6303: --
6304: else
6305: --
6306: -- Call Update routine for the pk_id created in prev run .
6438: end loop;
6439: --
6440: exception when others then
6441: --
6442: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CCM',l_prefix || r_CCM.information170 || l_suffix) ;
6443: --
6444: end create_CCM_rows;
6445:
6446: --
6585: end if ;
6586: -- End Prefix Sufix derivation
6587: for r_BVR1_unique in c_unique_BVR1('BVR1') loop
6588:
6589: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6590: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6591: r_BVR1_unique.information3 >=
6592: ben_pd_copy_to_ben_one.g_copy_effective_date)
6593: ) then
6586: -- End Prefix Sufix derivation
6587: for r_BVR1_unique in c_unique_BVR1('BVR1') loop
6588:
6589: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6590: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6591: r_BVR1_unique.information3 >=
6592: ben_pd_copy_to_ben_one.g_copy_effective_date)
6593: ) then
6594: --
6588:
6589: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6590: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6591: r_BVR1_unique.information3 >=
6592: ben_pd_copy_to_ben_one.g_copy_effective_date)
6593: ) then
6594: --
6595: hr_utility.set_location(' r_BVR1_unique.table_route_id '||r_BVR1_unique.table_route_id,10);
6596: hr_utility.set_location(' r_BVR1_unique.information1 '||r_BVR1_unique.information1,10);
6624: l_object_found_in_target := TRUE;
6625: --
6626: if l_process_date between r_BVR1_unique.information2 and r_BVR1_unique.information3 then
6627: l_update := true;
6628: if r_BVR1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6629: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID'
6630: then
6631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BVR1_unique.information1 ;
6625: --
6626: if l_process_date between r_BVR1_unique.information2 and r_BVR1_unique.information3 then
6627: l_update := true;
6628: if r_BVR1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6629: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID'
6630: then
6631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BVR1_unique.information1 ;
6633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BVR1_unique.information1 ;
6627: l_update := true;
6628: if r_BVR1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6629: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID'
6630: then
6631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BVR1_unique.information1 ;
6633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BVR1_unique.information1 ;
6634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BVR1_unique.table_route_id;
6628: if r_BVR1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6629: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID'
6630: then
6631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BVR1_unique.information1 ;
6633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BVR1_unique.information1 ;
6634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BVR1_unique.table_route_id;
6636: --
6629: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID'
6630: then
6631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BVR1_unique.information1 ;
6633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BVR1_unique.information1 ;
6634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BVR1_unique.table_route_id;
6636: --
6637: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6630: then
6631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BVR1_unique.information1 ;
6633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BVR1_unique.information1 ;
6634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BVR1_unique.table_route_id;
6636: --
6637: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6638: --
6631: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6632: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BVR1_unique.information1 ;
6633: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BVR1_unique.information1 ;
6634: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BVR1_unique.table_route_id;
6636: --
6637: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6638: --
6639: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BVR1_unique.table_route_id;
6636: --
6637: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6638: --
6639: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6640: --
6641: -- DOUBT
6642: --BEN_PD_COPY_TO_BEN_ONE.log_data('BVR1',l_new_value,l_prefix || r_BVR1_unique.name|| l_suffix,'REUSED');
6643: --
6638: --
6639: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6640: --
6641: -- DOUBT
6642: --BEN_PD_COPY_TO_BEN_ONE.log_data('BVR1',l_new_value,l_prefix || r_BVR1_unique.name|| l_suffix,'REUSED');
6643: --
6644: end if ;
6645: hr_utility.set_location( 'found record for update',10);
6646: --
6658: open c_BVR1_min_max_dates(r_BVR1_unique.table_route_id, r_BVR1_unique.information1 ) ;
6659: fetch c_BVR1_min_max_dates into l_min_esd,l_max_eed ;
6660: --
6661:
6662: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6663: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6664: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6665: end if;
6666: l_min_esd := greatest(l_min_esd,r_BVR1_unique.information2);
6659: fetch c_BVR1_min_max_dates into l_min_esd,l_max_eed ;
6660: --
6661:
6662: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6663: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6664: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6665: end if;
6666: l_min_esd := greatest(l_min_esd,r_BVR1_unique.information2);
6667: --
6660: --
6661:
6662: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6663: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6664: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6665: end if;
6666: l_min_esd := greatest(l_min_esd,r_BVR1_unique.information2);
6667: --
6668: if p_reuse_object_flag = 'Y' then
6681: p_from_date => l_min_esd,
6682: p_to_date => l_max_eed );
6683: if l_dt_rec_found THEN
6684: --END TEMPIK
6685: if r_BVR1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6686: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID' then
6687: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6688: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1_unique.information1 ;
6689: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6682: p_to_date => l_max_eed );
6683: if l_dt_rec_found THEN
6684: --END TEMPIK
6685: if r_BVR1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6686: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID' then
6687: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6688: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1_unique.information1 ;
6689: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6690: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6683: if l_dt_rec_found THEN
6684: --END TEMPIK
6685: if r_BVR1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6686: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID' then
6687: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6688: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1_unique.information1 ;
6689: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6690: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6691: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6684: --END TEMPIK
6685: if r_BVR1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6686: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID' then
6687: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6688: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1_unique.information1 ;
6689: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6690: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6691: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6692: --
6685: if r_BVR1_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
6686: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID' then
6687: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6688: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1_unique.information1 ;
6689: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6690: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6691: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6692: --
6693: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6686: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_ID' then
6687: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6688: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1_unique.information1 ;
6689: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6690: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6691: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6692: --
6693: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6694: --
6687: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6688: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1_unique.information1 ;
6689: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6690: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6691: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6692: --
6693: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6694: --
6695: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6689: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
6690: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
6691: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6692: --
6693: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6694: --
6695: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6696: end if ;
6697: --
6691: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6692: --
6693: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
6694: --
6695: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6696: end if ;
6697: --
6698: l_object_found_in_target := true ;
6699: --TEMPIK
6730: end if ;
6731: --
6732:
6733: l_effective_date := r_BVR1.information2;
6734: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6735: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6736: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6737: end if;
6738:
6731: --
6732:
6733: l_effective_date := r_BVR1.information2;
6734: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6735: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6736: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6737: end if;
6738:
6739: -- UPD START
6732:
6733: l_effective_date := r_BVR1.information2;
6734: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6735: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6736: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6737: end if;
6738:
6739: -- UPD START
6740: --if l_first_rec then
6792: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
6793: -- Update all relevent cer records with new pk_id
6794: hr_utility.set_location('Before plsql table ',222);
6795: hr_utility.set_location('new_value id '||l_bnft_vrbl_rt_id,222);
6796: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6797: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1.information1 ;
6798: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_ID ;
6799: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6800: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6793: -- Update all relevent cer records with new pk_id
6794: hr_utility.set_location('Before plsql table ',222);
6795: hr_utility.set_location('new_value id '||l_bnft_vrbl_rt_id,222);
6796: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6797: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1.information1 ;
6798: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_ID ;
6799: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6800: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6801: hr_utility.set_location('After plsql table ',222);
6794: hr_utility.set_location('Before plsql table ',222);
6795: hr_utility.set_location('new_value id '||l_bnft_vrbl_rt_id,222);
6796: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6797: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1.information1 ;
6798: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_ID ;
6799: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6800: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6801: hr_utility.set_location('After plsql table ',222);
6802: --
6795: hr_utility.set_location('new_value id '||l_bnft_vrbl_rt_id,222);
6796: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6797: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1.information1 ;
6798: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_ID ;
6799: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6800: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6801: hr_utility.set_location('After plsql table ',222);
6802: --
6803: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6796: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_ID' ;
6797: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BVR1.information1 ;
6798: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_ID ;
6799: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6800: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6801: hr_utility.set_location('After plsql table ',222);
6802: --
6803: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6804: --
6799: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
6800: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BVR1_unique.table_route_id;
6801: hr_utility.set_location('After plsql table ',222);
6802: --
6803: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6804: --
6805: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6806: --
6807: else
6801: hr_utility.set_location('After plsql table ',222);
6802: --
6803: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
6804: --
6805: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
6806: --
6807: else
6808: --
6809: -- Call Update routine for the pk_id created in prev run .
6916: end loop;
6917: --
6918: exception when others then
6919: --
6920: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'BVR1',r_BVR1.information5 ) ;
6921: --
6922: end create_BVR1_rows;
6923:
6924: --
7060: end if ;
7061: -- End Prefix Sufix derivation
7062: for r_BRR_unique in c_unique_BRR('BRR') loop
7063:
7064: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7065: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7066: r_BRR_unique.information3 >=
7067: ben_pd_copy_to_ben_one.g_copy_effective_date)
7068: ) then
7061: -- End Prefix Sufix derivation
7062: for r_BRR_unique in c_unique_BRR('BRR') loop
7063:
7064: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7065: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7066: r_BRR_unique.information3 >=
7067: ben_pd_copy_to_ben_one.g_copy_effective_date)
7068: ) then
7069: --
7063:
7064: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7065: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7066: r_BRR_unique.information3 >=
7067: ben_pd_copy_to_ben_one.g_copy_effective_date)
7068: ) then
7069: --
7070: hr_utility.set_location(' r_BRR_unique.table_route_id '||r_BRR_unique.table_route_id,10);
7071: hr_utility.set_location(' r_BRR_unique.information1 '||r_BRR_unique.information1,10);
7098: l_object_found_in_target := TRUE;
7099: --
7100: if l_process_date between r_BRR_unique.information2 and r_BRR_unique.information3 then
7101: l_update := true;
7102: if r_BRR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7103: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID'
7104: then
7105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRR_unique.information1 ;
7099: --
7100: if l_process_date between r_BRR_unique.information2 and r_BRR_unique.information3 then
7101: l_update := true;
7102: if r_BRR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7103: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID'
7104: then
7105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRR_unique.information1 ;
7107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRR_unique.information1 ;
7101: l_update := true;
7102: if r_BRR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7103: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID'
7104: then
7105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRR_unique.information1 ;
7107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRR_unique.information1 ;
7108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRR_unique.table_route_id;
7102: if r_BRR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7103: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID'
7104: then
7105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRR_unique.information1 ;
7107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRR_unique.information1 ;
7108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRR_unique.table_route_id;
7110: --
7103: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID'
7104: then
7105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRR_unique.information1 ;
7107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRR_unique.information1 ;
7108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRR_unique.table_route_id;
7110: --
7111: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7104: then
7105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRR_unique.information1 ;
7107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRR_unique.information1 ;
7108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRR_unique.table_route_id;
7110: --
7111: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7112: --
7105: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7106: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRR_unique.information1 ;
7107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRR_unique.information1 ;
7108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRR_unique.table_route_id;
7110: --
7111: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7112: --
7113: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRR_unique.table_route_id;
7110: --
7111: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7112: --
7113: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7114: --
7115: --BEN_PD_COPY_TO_BEN_ONE.log_data('BRR',l_new_value,l_prefix || r_BRR_unique.name|| l_suffix,'REUSED');
7116: --
7117: end if ;
7111: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7112: --
7113: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7114: --
7115: --BEN_PD_COPY_TO_BEN_ONE.log_data('BRR',l_new_value,l_prefix || r_BRR_unique.name|| l_suffix,'REUSED');
7116: --
7117: end if ;
7118: hr_utility.set_location( 'found record for update',10);
7119: --
7131: open c_BRR_min_max_dates(r_BRR_unique.table_route_id, r_BRR_unique.information1 ) ;
7132: fetch c_BRR_min_max_dates into l_min_esd,l_max_eed ;
7133: --
7134:
7135: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7136: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7137: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7138: end if;
7139: l_min_esd := greatest(l_min_esd,r_BRR_unique.information2);
7132: fetch c_BRR_min_max_dates into l_min_esd,l_max_eed ;
7133: --
7134:
7135: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7136: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7137: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7138: end if;
7139: l_min_esd := greatest(l_min_esd,r_BRR_unique.information2);
7140:
7133: --
7134:
7135: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7136: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7137: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7138: end if;
7139: l_min_esd := greatest(l_min_esd,r_BRR_unique.information2);
7140:
7141: if p_reuse_object_flag = 'Y' then
7154: p_to_date => l_max_eed );
7155: if l_dt_rec_found THEN
7156: --END TEMPIK
7157: --
7158: if r_BRR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7159: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID' then
7160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR_unique.information1 ;
7162: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7155: if l_dt_rec_found THEN
7156: --END TEMPIK
7157: --
7158: if r_BRR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7159: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID' then
7160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR_unique.information1 ;
7162: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7163: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7156: --END TEMPIK
7157: --
7158: if r_BRR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7159: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID' then
7160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR_unique.information1 ;
7162: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7163: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7164: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7157: --
7158: if r_BRR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7159: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID' then
7160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR_unique.information1 ;
7162: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7163: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7164: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7165: --
7158: if r_BRR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7159: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID' then
7160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR_unique.information1 ;
7162: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7163: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7164: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7165: --
7166: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7159: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_VRBL_RT_RL_ID' then
7160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR_unique.information1 ;
7162: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7163: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7164: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7165: --
7166: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7167: --
7160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR_unique.information1 ;
7162: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7163: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7164: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7165: --
7166: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7167: --
7168: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7162: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7163: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7164: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7165: --
7166: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7167: --
7168: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7169: end if ;
7170: --
7164: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7165: --
7166: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7167: --
7168: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7169: end if ;
7170: --
7171: l_object_found_in_target := true ;
7172: --TEMPIK
7202: end if ;
7203: --
7204:
7205: l_effective_date := r_BRR.information2;
7206: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7207: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7208: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7209: end if;
7210:
7203: --
7204:
7205: l_effective_date := r_BRR.information2;
7206: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7207: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7208: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7209: end if;
7210:
7211: -- UPD START
7204:
7205: l_effective_date := r_BRR.information2;
7206: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7207: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7208: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7209: end if;
7210:
7211: -- UPD START
7212: --if l_first_rec then
7262: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
7263: -- Update all relevent cer records with new pk_id
7264: hr_utility.set_location('Before plsql table ',222);
7265: hr_utility.set_location('new_value id '||l_bnft_vrbl_rt_rl_id,222);
7266: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7267: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR.information1 ;
7268: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_RL_ID ;
7269: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7270: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7263: -- Update all relevent cer records with new pk_id
7264: hr_utility.set_location('Before plsql table ',222);
7265: hr_utility.set_location('new_value id '||l_bnft_vrbl_rt_rl_id,222);
7266: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7267: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR.information1 ;
7268: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_RL_ID ;
7269: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7270: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7271: hr_utility.set_location('After plsql table ',222);
7264: hr_utility.set_location('Before plsql table ',222);
7265: hr_utility.set_location('new_value id '||l_bnft_vrbl_rt_rl_id,222);
7266: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7267: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR.information1 ;
7268: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_RL_ID ;
7269: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7270: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7271: hr_utility.set_location('After plsql table ',222);
7272: --
7265: hr_utility.set_location('new_value id '||l_bnft_vrbl_rt_rl_id,222);
7266: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7267: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR.information1 ;
7268: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_RL_ID ;
7269: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7270: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7271: hr_utility.set_location('After plsql table ',222);
7272: --
7273: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
7266: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_VRBL_RT_RL_ID' ;
7267: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BRR.information1 ;
7268: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_VRBL_RT_RL_ID ;
7269: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7270: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7271: hr_utility.set_location('After plsql table ',222);
7272: --
7273: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
7274: --
7269: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7270: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BRR_unique.table_route_id;
7271: hr_utility.set_location('After plsql table ',222);
7272: --
7273: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
7274: --
7275: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7276: --
7277: else
7271: hr_utility.set_location('After plsql table ',222);
7272: --
7273: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
7274: --
7275: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7276: --
7277: else
7278: --
7279: -- Call Update routine for the pk_id created in prev run .
7386: end loop;
7387: --
7388: exception when others then
7389: --
7390: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'BRR',r_BRR.information5 ) ;
7391: --
7392: end create_BRR_rows;
7393:
7394: --
7530: end if ;
7531: -- End Prefix Sufix derivation
7532: for r_APV_unique in c_unique_APV('APV') loop
7533:
7534: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7535: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7536: r_APV_unique.information3 >=
7537: ben_pd_copy_to_ben_one.g_copy_effective_date)
7538: ) then
7531: -- End Prefix Sufix derivation
7532: for r_APV_unique in c_unique_APV('APV') loop
7533:
7534: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7535: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7536: r_APV_unique.information3 >=
7537: ben_pd_copy_to_ben_one.g_copy_effective_date)
7538: ) then
7539: --
7533:
7534: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7535: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7536: r_APV_unique.information3 >=
7537: ben_pd_copy_to_ben_one.g_copy_effective_date)
7538: ) then
7539: --
7540: hr_utility.set_location(' r_APV_unique.table_route_id '||r_APV_unique.table_route_id,10);
7541: hr_utility.set_location(' r_APV_unique.information1 '||r_APV_unique.information1,10);
7568: l_object_found_in_target := TRUE;
7569: --
7570: if l_process_date between r_APV_unique.information2 and r_APV_unique.information3 then
7571: l_update := true;
7572: if r_APV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7573: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID'
7574: then
7575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APV_unique.information1 ;
7569: --
7570: if l_process_date between r_APV_unique.information2 and r_APV_unique.information3 then
7571: l_update := true;
7572: if r_APV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7573: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID'
7574: then
7575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APV_unique.information1 ;
7577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APV_unique.information1 ;
7571: l_update := true;
7572: if r_APV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7573: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID'
7574: then
7575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APV_unique.information1 ;
7577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APV_unique.information1 ;
7578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APV_unique.table_route_id;
7572: if r_APV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7573: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID'
7574: then
7575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APV_unique.information1 ;
7577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APV_unique.information1 ;
7578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APV_unique.table_route_id;
7580: --
7573: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID'
7574: then
7575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APV_unique.information1 ;
7577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APV_unique.information1 ;
7578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APV_unique.table_route_id;
7580: --
7581: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7574: then
7575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APV_unique.information1 ;
7577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APV_unique.information1 ;
7578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APV_unique.table_route_id;
7580: --
7581: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7582: --
7575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APV_unique.information1 ;
7577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APV_unique.information1 ;
7578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APV_unique.table_route_id;
7580: --
7581: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7582: --
7583: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APV_unique.table_route_id;
7580: --
7581: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7582: --
7583: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7584: --
7585: --BEN_PD_COPY_TO_BEN_ONE.log_data('APV',l_new_value,l_prefix || r_APV_unique.name|| l_suffix,'REUSED');
7586: --
7587: end if ;
7581: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7582: --
7583: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7584: --
7585: --BEN_PD_COPY_TO_BEN_ONE.log_data('APV',l_new_value,l_prefix || r_APV_unique.name|| l_suffix,'REUSED');
7586: --
7587: end if ;
7588: hr_utility.set_location( 'found record for update',10);
7589: --
7600: open c_APV_min_max_dates(r_APV_unique.table_route_id, r_APV_unique.information1 ) ;
7601: fetch c_APV_min_max_dates into l_min_esd,l_max_eed ;
7602: --
7603:
7604: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7605: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7606: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7607: end if;
7608: l_min_esd := greatest(l_min_esd,r_APV_unique.information2);
7601: fetch c_APV_min_max_dates into l_min_esd,l_max_eed ;
7602: --
7603:
7604: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7605: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7606: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7607: end if;
7608: l_min_esd := greatest(l_min_esd,r_APV_unique.information2);
7609: if p_reuse_object_flag = 'Y' then
7602: --
7603:
7604: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7605: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7606: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7607: end if;
7608: l_min_esd := greatest(l_min_esd,r_APV_unique.information2);
7609: if p_reuse_object_flag = 'Y' then
7610: if c_APV_min_max_dates%found then
7621: p_from_date => l_min_esd,
7622: p_to_date => l_max_eed );
7623: if l_dt_rec_found THEN
7624: --END TEMPIK --
7625: if r_APV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7626: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID' then
7627: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7628: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV_unique.information1 ;
7629: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7622: p_to_date => l_max_eed );
7623: if l_dt_rec_found THEN
7624: --END TEMPIK --
7625: if r_APV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7626: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID' then
7627: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7628: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV_unique.information1 ;
7629: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7630: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7623: if l_dt_rec_found THEN
7624: --END TEMPIK --
7625: if r_APV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7626: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID' then
7627: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7628: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV_unique.information1 ;
7629: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7630: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7631: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7624: --END TEMPIK --
7625: if r_APV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7626: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID' then
7627: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7628: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV_unique.information1 ;
7629: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7630: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7631: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7632: --
7625: if r_APV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
7626: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID' then
7627: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7628: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV_unique.information1 ;
7629: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7630: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7631: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7632: --
7633: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7626: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_ID' then
7627: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7628: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV_unique.information1 ;
7629: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7630: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7631: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7632: --
7633: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7634: --
7627: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7628: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV_unique.information1 ;
7629: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7630: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7631: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7632: --
7633: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7634: --
7635: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7629: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
7630: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
7631: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7632: --
7633: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7634: --
7635: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7636: end if ;
7637: --
7631: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7632: --
7633: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
7634: --
7635: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7636: end if ;
7637: --
7638: l_object_found_in_target := true ;
7639: --TEMPIK
7669: end if ;
7670: --
7671:
7672: l_effective_date := r_APV.information2;
7673: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7674: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7675: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7676: end if;
7677: -- UPD START
7670: --
7671:
7672: l_effective_date := r_APV.information2;
7673: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7674: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7675: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7676: end if;
7677: -- UPD START
7678: --if l_first_rec then
7671:
7672: l_effective_date := r_APV.information2;
7673: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7674: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7675: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7676: end if;
7677: -- UPD START
7678: --if l_first_rec then
7679: if l_first_rec and not l_update then
7731: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
7732: -- Update all relevent cer records with new pk_id
7733: hr_utility.set_location('Before plsql table ',222);
7734: hr_utility.set_location('new_value id '||l_actl_prem_vrbl_rt_id,222);
7735: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7736: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV.information1 ;
7737: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_ID ;
7738: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7739: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7732: -- Update all relevent cer records with new pk_id
7733: hr_utility.set_location('Before plsql table ',222);
7734: hr_utility.set_location('new_value id '||l_actl_prem_vrbl_rt_id,222);
7735: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7736: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV.information1 ;
7737: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_ID ;
7738: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7739: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7740: hr_utility.set_location('After plsql table ',222);
7733: hr_utility.set_location('Before plsql table ',222);
7734: hr_utility.set_location('new_value id '||l_actl_prem_vrbl_rt_id,222);
7735: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7736: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV.information1 ;
7737: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_ID ;
7738: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7739: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7740: hr_utility.set_location('After plsql table ',222);
7741: --
7734: hr_utility.set_location('new_value id '||l_actl_prem_vrbl_rt_id,222);
7735: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7736: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV.information1 ;
7737: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_ID ;
7738: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7739: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7740: hr_utility.set_location('After plsql table ',222);
7741: --
7742: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
7735: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_ID' ;
7736: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_APV.information1 ;
7737: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_ID ;
7738: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7739: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7740: hr_utility.set_location('After plsql table ',222);
7741: --
7742: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
7743: --
7738: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
7739: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_APV_unique.table_route_id;
7740: hr_utility.set_location('After plsql table ',222);
7741: --
7742: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
7743: --
7744: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7745: --
7746: else
7740: hr_utility.set_location('After plsql table ',222);
7741: --
7742: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
7743: --
7744: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
7745: --
7746: else
7747: --
7748: -- Call Update routine for the pk_id created in prev run .
7855: end loop;
7856: --
7857: exception when others then
7858: --
7859: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'APV',r_APV.information5 ) ;
7860: --
7861: end create_APV_rows;
7862:
7863: --
7999: end if ;
8000: -- End Prefix Sufix derivation
8001: for r_AVA_unique in c_unique_AVA('AVA') loop
8002:
8003: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8004: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8005: r_AVA_unique.information3 >=
8006: ben_pd_copy_to_ben_one.g_copy_effective_date)
8007: ) then
8000: -- End Prefix Sufix derivation
8001: for r_AVA_unique in c_unique_AVA('AVA') loop
8002:
8003: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8004: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8005: r_AVA_unique.information3 >=
8006: ben_pd_copy_to_ben_one.g_copy_effective_date)
8007: ) then
8008: --
8002:
8003: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8004: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8005: r_AVA_unique.information3 >=
8006: ben_pd_copy_to_ben_one.g_copy_effective_date)
8007: ) then
8008: --
8009: hr_utility.set_location(' r_AVA_unique.table_route_id '||r_AVA_unique.table_route_id,10);
8010: hr_utility.set_location(' r_AVA_unique.information1 '||r_AVA_unique.information1,10);
8037: l_object_found_in_target := TRUE;
8038: --
8039: if l_process_date between r_AVA_unique.information2 and r_AVA_unique.information3 then
8040: l_update := true;
8041: if r_AVA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8042: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID'
8043: then
8044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVA_unique.information1 ;
8038: --
8039: if l_process_date between r_AVA_unique.information2 and r_AVA_unique.information3 then
8040: l_update := true;
8041: if r_AVA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8042: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID'
8043: then
8044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVA_unique.information1 ;
8046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVA_unique.information1 ;
8040: l_update := true;
8041: if r_AVA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8042: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID'
8043: then
8044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVA_unique.information1 ;
8046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVA_unique.information1 ;
8047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVA_unique.table_route_id;
8041: if r_AVA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8042: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID'
8043: then
8044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVA_unique.information1 ;
8046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVA_unique.information1 ;
8047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVA_unique.table_route_id;
8049: --
8042: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID'
8043: then
8044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVA_unique.information1 ;
8046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVA_unique.information1 ;
8047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVA_unique.table_route_id;
8049: --
8050: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8043: then
8044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVA_unique.information1 ;
8046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVA_unique.information1 ;
8047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVA_unique.table_route_id;
8049: --
8050: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8051: --
8044: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8045: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_AVA_unique.information1 ;
8046: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_AVA_unique.information1 ;
8047: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVA_unique.table_route_id;
8049: --
8050: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8051: --
8052: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8048: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_AVA_unique.table_route_id;
8049: --
8050: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8051: --
8052: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8053: --
8054: --BEN_PD_COPY_TO_BEN_ONE.log_data('AVA',l_new_value,l_prefix || r_AVA_unique.name|| l_suffix,'REUSED');
8055: --
8056: end if ;
8050: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8051: --
8052: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8053: --
8054: --BEN_PD_COPY_TO_BEN_ONE.log_data('AVA',l_new_value,l_prefix || r_AVA_unique.name|| l_suffix,'REUSED');
8055: --
8056: end if ;
8057: hr_utility.set_location( 'found record for update',10);
8058: --
8071: open c_AVA_min_max_dates(r_AVA_unique.table_route_id, r_AVA_unique.information1 ) ;
8072: fetch c_AVA_min_max_dates into l_min_esd,l_max_eed ;
8073: --
8074:
8075: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8076: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8077: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8078: end if;
8079: l_min_esd := greatest(l_min_esd,r_AVA_unique.information2);
8072: fetch c_AVA_min_max_dates into l_min_esd,l_max_eed ;
8073: --
8074:
8075: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8076: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8077: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8078: end if;
8079: l_min_esd := greatest(l_min_esd,r_AVA_unique.information2);
8080: /*open c_AVA(r_AVA_unique.table_route_id,
8073: --
8074:
8075: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8076: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8077: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8078: end if;
8079: l_min_esd := greatest(l_min_esd,r_AVA_unique.information2);
8080: /*open c_AVA(r_AVA_unique.table_route_id,
8081: r_AVA_unique.information1,
8102: p_from_date => l_min_esd,
8103: p_to_date => l_max_eed );
8104: if l_dt_rec_found THEN
8105: --END TEMPIK
8106: if r_AVA_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8107: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID' then
8108: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8109: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA_unique.information1 ;
8110: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8103: p_to_date => l_max_eed );
8104: if l_dt_rec_found THEN
8105: --END TEMPIK
8106: if r_AVA_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8107: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID' then
8108: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8109: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA_unique.information1 ;
8110: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8111: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8104: if l_dt_rec_found THEN
8105: --END TEMPIK
8106: if r_AVA_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8107: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID' then
8108: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8109: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA_unique.information1 ;
8110: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8111: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8112: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8105: --END TEMPIK
8106: if r_AVA_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8107: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID' then
8108: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8109: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA_unique.information1 ;
8110: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8111: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8112: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8113: --
8106: if r_AVA_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8107: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID' then
8108: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8109: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA_unique.information1 ;
8110: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8111: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8112: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8113: --
8114: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8107: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTL_PREM_VRBL_RT_RL_ID' then
8108: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8109: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA_unique.information1 ;
8110: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8111: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8112: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8113: --
8114: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8115: --
8108: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8109: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA_unique.information1 ;
8110: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8111: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8112: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8113: --
8114: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8115: --
8116: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8110: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8111: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8112: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8113: --
8114: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8115: --
8116: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8117: end if ;
8118: --
8112: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8113: --
8114: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8115: --
8116: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8117: end if ;
8118: --
8119: l_object_found_in_target := true ;
8120: --TEMPIK
8151: end if ;
8152: --
8153:
8154: l_effective_date := r_AVA.information2;
8155: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8156: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8157: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8158: end if;
8159:
8152: --
8153:
8154: l_effective_date := r_AVA.information2;
8155: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8156: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8157: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8158: end if;
8159:
8160: -- UPD START
8153:
8154: l_effective_date := r_AVA.information2;
8155: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8156: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8157: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8158: end if;
8159:
8160: -- UPD START
8161: --if l_first_rec then
8214: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
8215: -- Update all relevent cer records with new pk_id
8216: hr_utility.set_location('Before plsql table ',222);
8217: hr_utility.set_location('new_value id '||l_actl_prem_vrbl_rt_rl_id,222);
8218: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA.information1 ;
8220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_RL_ID ;
8221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8215: -- Update all relevent cer records with new pk_id
8216: hr_utility.set_location('Before plsql table ',222);
8217: hr_utility.set_location('new_value id '||l_actl_prem_vrbl_rt_rl_id,222);
8218: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA.information1 ;
8220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_RL_ID ;
8221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8223: hr_utility.set_location('After plsql table ',222);
8216: hr_utility.set_location('Before plsql table ',222);
8217: hr_utility.set_location('new_value id '||l_actl_prem_vrbl_rt_rl_id,222);
8218: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA.information1 ;
8220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_RL_ID ;
8221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8223: hr_utility.set_location('After plsql table ',222);
8224: --
8217: hr_utility.set_location('new_value id '||l_actl_prem_vrbl_rt_rl_id,222);
8218: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA.information1 ;
8220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_RL_ID ;
8221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8223: hr_utility.set_location('After plsql table ',222);
8224: --
8225: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
8218: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTL_PREM_VRBL_RT_RL_ID' ;
8219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_AVA.information1 ;
8220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTL_PREM_VRBL_RT_RL_ID ;
8221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8223: hr_utility.set_location('After plsql table ',222);
8224: --
8225: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
8226: --
8221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_AVA_unique.table_route_id;
8223: hr_utility.set_location('After plsql table ',222);
8224: --
8225: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
8226: --
8227: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8228: --
8229: else
8223: hr_utility.set_location('After plsql table ',222);
8224: --
8225: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
8226: --
8227: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8228: --
8229: else
8230: --
8231: -- Call Update routine for the pk_id created in prev run .
8340: end loop;
8341: --
8342: exception when others then
8343: --
8344: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'AVA',r_AVA.information5 ) ;
8345: --
8346: end create_AVA_rows;
8347: ---------------------------------------------------------------
8348: ----------------------< create_ABP_rows >-----------------------
8482: end if ;
8483: -- End Prefix Sufix derivation
8484: for r_ABP_unique in c_unique_ABP('ABP') loop
8485:
8486: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8487: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8488: r_ABP_unique.information3 >=
8489: ben_pd_copy_to_ben_one.g_copy_effective_date)
8490: ) then
8483: -- End Prefix Sufix derivation
8484: for r_ABP_unique in c_unique_ABP('ABP') loop
8485:
8486: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8487: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8488: r_ABP_unique.information3 >=
8489: ben_pd_copy_to_ben_one.g_copy_effective_date)
8490: ) then
8491: --
8485:
8486: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8487: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8488: r_ABP_unique.information3 >=
8489: ben_pd_copy_to_ben_one.g_copy_effective_date)
8490: ) then
8491: --
8492: hr_utility.set_location(' r_ABP_unique.table_route_id '||r_ABP_unique.table_route_id,10);
8493: hr_utility.set_location(' r_ABP_unique.information1 '||r_ABP_unique.information1,10);
8522: l_object_found_in_target := TRUE;
8523: --
8524: if l_process_date between r_ABP_unique.information2 and r_ABP_unique.information3 then
8525: l_update := true;
8526: if r_ABP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8527: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID'
8528: then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABP_unique.information1 ;
8523: --
8524: if l_process_date between r_ABP_unique.information2 and r_ABP_unique.information3 then
8525: l_update := true;
8526: if r_ABP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8527: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID'
8528: then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABP_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABP_unique.information1 ;
8525: l_update := true;
8526: if r_ABP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8527: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID'
8528: then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABP_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABP_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABP_unique.table_route_id;
8526: if r_ABP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8527: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID'
8528: then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABP_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABP_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABP_unique.table_route_id;
8534: --
8527: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID'
8528: then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABP_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABP_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABP_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8528: then
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABP_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABP_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABP_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8536: --
8529: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8530: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABP_unique.information1 ;
8531: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABP_unique.information1 ;
8532: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABP_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8536: --
8537: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8533: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABP_unique.table_route_id;
8534: --
8535: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8536: --
8537: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8538: --
8539: -- BEN_PD_COPY_TO_BEN_ONE.log_data('ABP',l_new_value,l_prefix || r_ABP_unique.name|| l_suffix,'REUSED');
8540: --
8541: end if ;
8535: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8536: --
8537: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8538: --
8539: -- BEN_PD_COPY_TO_BEN_ONE.log_data('ABP',l_new_value,l_prefix || r_ABP_unique.name|| l_suffix,'REUSED');
8540: --
8541: end if ;
8542: hr_utility.set_location( 'found record for update',10);
8543: --
8555: open c_ABP_min_max_dates(r_ABP_unique.table_route_id, r_ABP_unique.information1 ) ;
8556: fetch c_ABP_min_max_dates into l_min_esd,l_max_eed ;
8557: --
8558:
8559: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8560: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8561: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8562: end if;
8563: l_min_esd := greatest(l_min_esd,r_ABP_unique.information2);
8556: fetch c_ABP_min_max_dates into l_min_esd,l_max_eed ;
8557: --
8558:
8559: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8560: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8561: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8562: end if;
8563: l_min_esd := greatest(l_min_esd,r_ABP_unique.information2);
8564: /*open c_ABP(r_ABP_unique.table_route_id,
8557: --
8558:
8559: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8560: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8561: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8562: end if;
8563: l_min_esd := greatest(l_min_esd,r_ABP_unique.information2);
8564: /*open c_ABP(r_ABP_unique.table_route_id,
8565: r_ABP_unique.information1,
8586: p_from_date => l_min_esd,
8587: p_to_date => l_max_eed );
8588: if l_dt_rec_found THEN
8589: --END TEMPIK
8590: if r_ABP_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8591: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID' then
8592: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8593: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP_unique.information1 ;
8594: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8587: p_to_date => l_max_eed );
8588: if l_dt_rec_found THEN
8589: --END TEMPIK
8590: if r_ABP_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8591: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID' then
8592: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8593: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP_unique.information1 ;
8594: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8595: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8588: if l_dt_rec_found THEN
8589: --END TEMPIK
8590: if r_ABP_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8591: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID' then
8592: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8593: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP_unique.information1 ;
8594: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8595: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8596: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8589: --END TEMPIK
8590: if r_ABP_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8591: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID' then
8592: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8593: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP_unique.information1 ;
8594: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8595: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8596: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8597: --
8590: if r_ABP_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
8591: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID' then
8592: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8593: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP_unique.information1 ;
8594: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8595: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8596: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8597: --
8598: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8591: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'APLCN_TO_BNFT_POOL_ID' then
8592: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8593: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP_unique.information1 ;
8594: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8595: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8596: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8597: --
8598: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8599: --
8592: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8593: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP_unique.information1 ;
8594: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8595: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8596: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8597: --
8598: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8599: --
8600: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8594: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
8595: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
8596: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8597: --
8598: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8599: --
8600: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8601: end if ;
8602: --
8596: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8597: --
8598: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
8599: --
8600: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8601: end if ;
8602: --
8603: l_object_found_in_target := true ;
8604: --TEMPIK
8635: end if ;
8636: --
8637:
8638: l_effective_date := r_ABP.information2;
8639: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8640: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8641: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8642: end if;
8643:
8636: --
8637:
8638: l_effective_date := r_ABP.information2;
8639: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8640: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8641: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8642: end if;
8643:
8644: -- UPD START
8637:
8638: l_effective_date := r_ABP.information2;
8639: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8640: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8641: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8642: end if;
8643:
8644: -- UPD START
8645: --if l_first_rec then
8696: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
8697: -- Update all relevent cer records with new pk_id
8698: hr_utility.set_location('Before plsql table ',222);
8699: hr_utility.set_location('new_value id '||l_aplcn_to_bnft_pool_id,222);
8700: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8701: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP.information1 ;
8702: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_APLCN_TO_BNFT_POOL_ID ;
8703: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8704: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8697: -- Update all relevent cer records with new pk_id
8698: hr_utility.set_location('Before plsql table ',222);
8699: hr_utility.set_location('new_value id '||l_aplcn_to_bnft_pool_id,222);
8700: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8701: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP.information1 ;
8702: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_APLCN_TO_BNFT_POOL_ID ;
8703: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8704: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8705: hr_utility.set_location('After plsql table ',222);
8698: hr_utility.set_location('Before plsql table ',222);
8699: hr_utility.set_location('new_value id '||l_aplcn_to_bnft_pool_id,222);
8700: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8701: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP.information1 ;
8702: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_APLCN_TO_BNFT_POOL_ID ;
8703: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8704: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8705: hr_utility.set_location('After plsql table ',222);
8706: --
8699: hr_utility.set_location('new_value id '||l_aplcn_to_bnft_pool_id,222);
8700: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8701: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP.information1 ;
8702: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_APLCN_TO_BNFT_POOL_ID ;
8703: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8704: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8705: hr_utility.set_location('After plsql table ',222);
8706: --
8707: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
8700: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'APLCN_TO_BNFT_POOL_ID' ;
8701: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABP.information1 ;
8702: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_APLCN_TO_BNFT_POOL_ID ;
8703: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8704: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8705: hr_utility.set_location('After plsql table ',222);
8706: --
8707: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
8708: --
8703: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
8704: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABP_unique.table_route_id;
8705: hr_utility.set_location('After plsql table ',222);
8706: --
8707: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
8708: --
8709: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8710: --
8711: else
8705: hr_utility.set_location('After plsql table ',222);
8706: --
8707: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
8708: --
8709: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
8710: --
8711: else
8712: --
8713: -- Call Update routine for the pk_id created in prev run .
8819: end loop;
8820: --
8821: exception when others then
8822: --
8823: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ABP',r_ABP.information5 ) ;
8824: --
8825: end create_ABP_rows;
8826:
8827: --
8966: end if ;
8967: -- End Prefix Sufix derivation
8968: for r_BPR_unique in c_unique_BPR('BPR1') loop
8969:
8970: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8971: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8972: r_BPR_unique.information3 >=
8973: ben_pd_copy_to_ben_one.g_copy_effective_date)
8974: ) then
8967: -- End Prefix Sufix derivation
8968: for r_BPR_unique in c_unique_BPR('BPR1') loop
8969:
8970: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8971: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8972: r_BPR_unique.information3 >=
8973: ben_pd_copy_to_ben_one.g_copy_effective_date)
8974: ) then
8975: --
8969:
8970: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8971: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8972: r_BPR_unique.information3 >=
8973: ben_pd_copy_to_ben_one.g_copy_effective_date)
8974: ) then
8975: --
8976: hr_utility.set_location(' r_BPR_unique.table_route_id '||r_BPR_unique.table_route_id,10);
8977: hr_utility.set_location(' r_BPR_unique.information1 '||r_BPR_unique.information1,10);
9010: l_object_found_in_target := TRUE;
9011: --
9012: if l_process_date between r_BPR_unique.information2 and r_BPR_unique.information3 then
9013: l_update := true;
9014: if r_BPR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9015: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID'
9016: then
9017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPR_unique.information1 ;
9011: --
9012: if l_process_date between r_BPR_unique.information2 and r_BPR_unique.information3 then
9013: l_update := true;
9014: if r_BPR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9015: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID'
9016: then
9017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPR_unique.information1 ;
9019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPR_unique.information1 ;
9013: l_update := true;
9014: if r_BPR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9015: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID'
9016: then
9017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPR_unique.information1 ;
9019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPR_unique.information1 ;
9020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPR_unique.table_route_id;
9014: if r_BPR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9015: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID'
9016: then
9017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPR_unique.information1 ;
9019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPR_unique.information1 ;
9020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPR_unique.table_route_id;
9022: --
9015: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID'
9016: then
9017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPR_unique.information1 ;
9019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPR_unique.information1 ;
9020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPR_unique.table_route_id;
9022: --
9023: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9016: then
9017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPR_unique.information1 ;
9019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPR_unique.information1 ;
9020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPR_unique.table_route_id;
9022: --
9023: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9024: --
9017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPR_unique.information1 ;
9019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPR_unique.information1 ;
9020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPR_unique.table_route_id;
9022: --
9023: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9024: --
9025: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPR_unique.table_route_id;
9022: --
9023: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9024: --
9025: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9026: --
9027: --BEN_PD_COPY_TO_BEN_ONE.log_data('BPR',l_new_value,l_prefix || r_BPR_unique.name|| l_suffix,'REUSED');
9028: --
9029: end if ;
9023: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9024: --
9025: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9026: --
9027: --BEN_PD_COPY_TO_BEN_ONE.log_data('BPR',l_new_value,l_prefix || r_BPR_unique.name|| l_suffix,'REUSED');
9028: --
9029: end if ;
9030: hr_utility.set_location( 'found record for update',10);
9031: --
9043: open c_BPR_min_max_dates(r_BPR_unique.table_route_id, r_BPR_unique.information1 ) ;
9044: fetch c_BPR_min_max_dates into l_min_esd,l_max_eed ;
9045: --
9046:
9047: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9048: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9049: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9050: end if;
9051: l_min_esd := greatest(l_min_esd,r_BPR_unique.information2);
9044: fetch c_BPR_min_max_dates into l_min_esd,l_max_eed ;
9045: --
9046:
9047: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9048: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9049: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9050: end if;
9051: l_min_esd := greatest(l_min_esd,r_BPR_unique.information2);
9052: /*open c_BPR(r_BPR_unique.table_route_id,
9045: --
9046:
9047: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9048: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9049: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9050: end if;
9051: l_min_esd := greatest(l_min_esd,r_BPR_unique.information2);
9052: /*open c_BPR(r_BPR_unique.table_route_id,
9053: r_BPR_unique.information1,
9074: p_from_date => l_min_esd,
9075: p_to_date => l_max_eed );
9076: if l_dt_rec_found THEN
9077: --END TEMPIK
9078: if r_BPR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9079: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID' then
9080: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9081: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR_unique.information1 ;
9082: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9075: p_to_date => l_max_eed );
9076: if l_dt_rec_found THEN
9077: --END TEMPIK
9078: if r_BPR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9079: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID' then
9080: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9081: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR_unique.information1 ;
9082: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9076: if l_dt_rec_found THEN
9077: --END TEMPIK
9078: if r_BPR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9079: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID' then
9080: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9081: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR_unique.information1 ;
9082: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9077: --END TEMPIK
9078: if r_BPR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9079: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID' then
9080: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9081: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR_unique.information1 ;
9082: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9085: --
9078: if r_BPR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9079: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID' then
9080: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9081: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR_unique.information1 ;
9082: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9085: --
9086: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9079: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'BNFT_POOL_RLOVR_RQMT_ID' then
9080: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9081: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR_unique.information1 ;
9082: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9085: --
9086: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9087: --
9080: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9081: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR_unique.information1 ;
9082: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9085: --
9086: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9087: --
9088: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9082: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9085: --
9086: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9087: --
9088: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9089: end if ;
9090: --
9084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9085: --
9086: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9087: --
9088: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9089: end if ;
9090: --
9091: l_object_found_in_target := true ;
9092: --TEMPIK
9121: end if ;
9122: --
9123:
9124: l_effective_date := r_BPR.information2;
9125: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9126: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9127: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9128: end if;
9129:
9122: --
9123:
9124: l_effective_date := r_BPR.information2;
9125: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9126: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9127: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9128: end if;
9129:
9130: -- UPD START
9123:
9124: l_effective_date := r_BPR.information2;
9125: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9126: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9127: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9128: end if;
9129:
9130: -- UPD START
9131: --if l_first_rec then
9201: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
9202: -- Update all relevent cer records with new pk_id
9203: hr_utility.set_location('Before plsql table ',222);
9204: hr_utility.set_location('new_value id '||l_bnft_pool_rlovr_rqmt_id,222);
9205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR.information1 ;
9207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_POOL_RLOVR_RQMT_ID ;
9208: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9209: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9202: -- Update all relevent cer records with new pk_id
9203: hr_utility.set_location('Before plsql table ',222);
9204: hr_utility.set_location('new_value id '||l_bnft_pool_rlovr_rqmt_id,222);
9205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR.information1 ;
9207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_POOL_RLOVR_RQMT_ID ;
9208: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9209: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9210: hr_utility.set_location('After plsql table ',222);
9203: hr_utility.set_location('Before plsql table ',222);
9204: hr_utility.set_location('new_value id '||l_bnft_pool_rlovr_rqmt_id,222);
9205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR.information1 ;
9207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_POOL_RLOVR_RQMT_ID ;
9208: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9209: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9210: hr_utility.set_location('After plsql table ',222);
9211: --
9204: hr_utility.set_location('new_value id '||l_bnft_pool_rlovr_rqmt_id,222);
9205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR.information1 ;
9207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_POOL_RLOVR_RQMT_ID ;
9208: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9209: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9210: hr_utility.set_location('After plsql table ',222);
9211: --
9212: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
9205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'BNFT_POOL_RLOVR_RQMT_ID' ;
9206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_BPR.information1 ;
9207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_BNFT_POOL_RLOVR_RQMT_ID ;
9208: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9209: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9210: hr_utility.set_location('After plsql table ',222);
9211: --
9212: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
9213: --
9208: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9209: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_BPR_unique.table_route_id;
9210: hr_utility.set_location('After plsql table ',222);
9211: --
9212: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
9213: --
9214: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9215: --
9216: else
9210: hr_utility.set_location('After plsql table ',222);
9211: --
9212: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
9213: --
9214: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9215: --
9216: else
9217: --
9218: -- Call Update routine for the pk_id created in prev run .
9344: end loop;
9345: --
9346: exception when others then
9347: --
9348: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'BPR',r_BPR.information5 ) ;
9349: --
9350: end create_BPR_rows;
9351:
9352: --
9490: end if ;
9491: -- End Prefix Sufix derivation
9492: for r_DCR_unique in c_unique_DCR('DCR') loop
9493:
9494: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9495: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9496: r_DCR_unique.information3 >=
9497: ben_pd_copy_to_ben_one.g_copy_effective_date)
9498: ) then
9491: -- End Prefix Sufix derivation
9492: for r_DCR_unique in c_unique_DCR('DCR') loop
9493:
9494: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9495: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9496: r_DCR_unique.information3 >=
9497: ben_pd_copy_to_ben_one.g_copy_effective_date)
9498: ) then
9499: --
9493:
9494: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9495: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9496: r_DCR_unique.information3 >=
9497: ben_pd_copy_to_ben_one.g_copy_effective_date)
9498: ) then
9499: --
9500: hr_utility.set_location(' r_DCR_unique.table_route_id '||r_DCR_unique.table_route_id,10);
9501: hr_utility.set_location(' r_DCR_unique.information1 '||r_DCR_unique.information1,10);
9530: l_object_found_in_target := TRUE;
9531: --
9532: if l_process_date between r_DCR_unique.information2 and r_DCR_unique.information3 then
9533: l_update := true;
9534: if r_DCR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9535: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID'
9536: then
9537: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9538: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DCR_unique.information1 ;
9531: --
9532: if l_process_date between r_DCR_unique.information2 and r_DCR_unique.information3 then
9533: l_update := true;
9534: if r_DCR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9535: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID'
9536: then
9537: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9538: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DCR_unique.information1 ;
9539: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DCR_unique.information1 ;
9533: l_update := true;
9534: if r_DCR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9535: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID'
9536: then
9537: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9538: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DCR_unique.information1 ;
9539: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DCR_unique.information1 ;
9540: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DCR_unique.table_route_id;
9534: if r_DCR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9535: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID'
9536: then
9537: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9538: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DCR_unique.information1 ;
9539: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DCR_unique.information1 ;
9540: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DCR_unique.table_route_id;
9542: --
9535: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID'
9536: then
9537: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9538: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DCR_unique.information1 ;
9539: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DCR_unique.information1 ;
9540: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DCR_unique.table_route_id;
9542: --
9543: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9536: then
9537: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9538: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DCR_unique.information1 ;
9539: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DCR_unique.information1 ;
9540: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DCR_unique.table_route_id;
9542: --
9543: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9544: --
9537: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9538: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DCR_unique.information1 ;
9539: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DCR_unique.information1 ;
9540: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DCR_unique.table_route_id;
9542: --
9543: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9544: --
9545: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DCR_unique.table_route_id;
9542: --
9543: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9544: --
9545: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9546: --
9547: --BEN_PD_COPY_TO_BEN_ONE.log_data('DCR',l_new_value,l_prefix || r_DCR_unique.name|| l_suffix,'REUSED');
9548: --
9549: end if ;
9543: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9544: --
9545: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9546: --
9547: --BEN_PD_COPY_TO_BEN_ONE.log_data('DCR',l_new_value,l_prefix || r_DCR_unique.name|| l_suffix,'REUSED');
9548: --
9549: end if ;
9550: hr_utility.set_location( 'found record for update',10);
9551: --
9563: open c_DCR_min_max_dates(r_DCR_unique.table_route_id, r_DCR_unique.information1 ) ;
9564: fetch c_DCR_min_max_dates into l_min_esd,l_max_eed ;
9565: --
9566:
9567: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9568: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9569: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9570: end if;
9571: l_min_esd := greatest(l_min_esd,r_DCR_unique.information2);
9564: fetch c_DCR_min_max_dates into l_min_esd,l_max_eed ;
9565: --
9566:
9567: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9568: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9569: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9570: end if;
9571: l_min_esd := greatest(l_min_esd,r_DCR_unique.information2);
9572:
9565: --
9566:
9567: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9568: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9569: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9570: end if;
9571: l_min_esd := greatest(l_min_esd,r_DCR_unique.information2);
9572:
9573: /*open c_DCR(r_DCR_unique.table_route_id,
9595: p_from_date => l_min_esd,
9596: p_to_date => l_max_eed );
9597: if l_dt_rec_found THEN
9598: --END TEMPIK
9599: if r_DCR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9600: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID' then
9601: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9602: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR_unique.information1 ;
9603: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9596: p_to_date => l_max_eed );
9597: if l_dt_rec_found THEN
9598: --END TEMPIK
9599: if r_DCR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9600: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID' then
9601: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9602: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR_unique.information1 ;
9603: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9604: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9597: if l_dt_rec_found THEN
9598: --END TEMPIK
9599: if r_DCR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9600: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID' then
9601: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9602: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR_unique.information1 ;
9603: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9604: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9598: --END TEMPIK
9599: if r_DCR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9600: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID' then
9601: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9602: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR_unique.information1 ;
9603: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9604: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9606: --
9599: if r_DCR_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
9600: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID' then
9601: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9602: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR_unique.information1 ;
9603: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9604: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9606: --
9607: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9600: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVG_RQD_RLSHP_ID' then
9601: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9602: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR_unique.information1 ;
9603: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9604: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9606: --
9607: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9608: --
9601: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9602: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR_unique.information1 ;
9603: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9604: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9606: --
9607: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9608: --
9609: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9603: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
9604: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
9605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9606: --
9607: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9608: --
9609: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9610: end if ;
9611: --
9605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9606: --
9607: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
9608: --
9609: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9610: end if ;
9611: --
9612: l_object_found_in_target := true ;
9613: --TEMPIK
9642: end if ;
9643: --
9644:
9645: l_effective_date := r_DCR.information2;
9646: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9647: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9648: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9649: end if;
9650: -- UPD START
9643: --
9644:
9645: l_effective_date := r_DCR.information2;
9646: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9647: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9648: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9649: end if;
9650: -- UPD START
9651: --if l_first_rec then
9644:
9645: l_effective_date := r_DCR.information2;
9646: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9647: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9648: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9649: end if;
9650: -- UPD START
9651: --if l_first_rec then
9652: if l_first_rec and not l_update then
9705: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
9706: -- Update all relevent cer records with new pk_id
9707: hr_utility.set_location('Before plsql table ',222);
9708: hr_utility.set_location('new_value id '||l_dpnt_cvg_rqd_rlshp_id,222);
9709: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9710: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR.information1 ;
9711: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVG_RQD_RLSHP_ID ;
9712: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9713: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9706: -- Update all relevent cer records with new pk_id
9707: hr_utility.set_location('Before plsql table ',222);
9708: hr_utility.set_location('new_value id '||l_dpnt_cvg_rqd_rlshp_id,222);
9709: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9710: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR.information1 ;
9711: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVG_RQD_RLSHP_ID ;
9712: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9713: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9714: hr_utility.set_location('After plsql table ',222);
9707: hr_utility.set_location('Before plsql table ',222);
9708: hr_utility.set_location('new_value id '||l_dpnt_cvg_rqd_rlshp_id,222);
9709: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9710: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR.information1 ;
9711: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVG_RQD_RLSHP_ID ;
9712: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9713: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9714: hr_utility.set_location('After plsql table ',222);
9715: --
9708: hr_utility.set_location('new_value id '||l_dpnt_cvg_rqd_rlshp_id,222);
9709: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9710: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR.information1 ;
9711: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVG_RQD_RLSHP_ID ;
9712: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9713: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9714: hr_utility.set_location('After plsql table ',222);
9715: --
9716: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
9709: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVG_RQD_RLSHP_ID' ;
9710: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DCR.information1 ;
9711: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVG_RQD_RLSHP_ID ;
9712: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9713: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9714: hr_utility.set_location('After plsql table ',222);
9715: --
9716: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
9717: --
9712: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
9713: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DCR_unique.table_route_id;
9714: hr_utility.set_location('After plsql table ',222);
9715: --
9716: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
9717: --
9718: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9719: --
9720: else
9714: hr_utility.set_location('After plsql table ',222);
9715: --
9716: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
9717: --
9718: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
9719: --
9720: else
9721: --
9722: -- Call Update routine for the pk_id created in prev run .
9832: end loop;
9833: --
9834: exception when others then
9835: --
9836: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'DCR',r_DCR.information5 ) ;
9837: --
9838: end create_DCR_rows;
9839:
9840: --
9976: end if ;
9977: -- End Prefix Sufix derivation
9978: for r_DEC_unique in c_unique_DEC('DEC') loop
9979:
9980: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9981: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9982: r_DEC_unique.information3 >=
9983: ben_pd_copy_to_ben_one.g_copy_effective_date)
9984: ) then
9977: -- End Prefix Sufix derivation
9978: for r_DEC_unique in c_unique_DEC('DEC') loop
9979:
9980: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9981: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9982: r_DEC_unique.information3 >=
9983: ben_pd_copy_to_ben_one.g_copy_effective_date)
9984: ) then
9985: --
9979:
9980: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9981: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9982: r_DEC_unique.information3 >=
9983: ben_pd_copy_to_ben_one.g_copy_effective_date)
9984: ) then
9985: --
9986: hr_utility.set_location(' r_DEC_unique.table_route_id '||r_DEC_unique.table_route_id,10);
9987: hr_utility.set_location(' r_DEC_unique.information1 '||r_DEC_unique.information1,10);
10013: l_object_found_in_target := TRUE;
10014: --
10015: if l_process_date between r_DEC_unique.information2 and r_DEC_unique.information3 then
10016: l_update := true;
10017: if r_DEC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10018: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID'
10019: then
10020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DEC_unique.information1 ;
10014: --
10015: if l_process_date between r_DEC_unique.information2 and r_DEC_unique.information3 then
10016: l_update := true;
10017: if r_DEC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10018: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID'
10019: then
10020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DEC_unique.information1 ;
10022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DEC_unique.information1 ;
10016: l_update := true;
10017: if r_DEC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10018: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID'
10019: then
10020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DEC_unique.information1 ;
10022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DEC_unique.information1 ;
10023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DEC_unique.table_route_id;
10017: if r_DEC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10018: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID'
10019: then
10020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DEC_unique.information1 ;
10022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DEC_unique.information1 ;
10023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DEC_unique.table_route_id;
10025: --
10018: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID'
10019: then
10020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DEC_unique.information1 ;
10022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DEC_unique.information1 ;
10023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DEC_unique.table_route_id;
10025: --
10026: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10019: then
10020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DEC_unique.information1 ;
10022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DEC_unique.information1 ;
10023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DEC_unique.table_route_id;
10025: --
10026: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10027: --
10020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DEC_unique.information1 ;
10022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DEC_unique.information1 ;
10023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DEC_unique.table_route_id;
10025: --
10026: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10027: --
10028: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DEC_unique.table_route_id;
10025: --
10026: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10027: --
10028: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10029: --
10030: --BEN_PD_COPY_TO_BEN_ONE.log_data('DEC',l_new_value,l_prefix || r_DEC_unique.name|| l_suffix,'REUSED');
10031: --
10032: end if ;
10026: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10027: --
10028: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10029: --
10030: --BEN_PD_COPY_TO_BEN_ONE.log_data('DEC',l_new_value,l_prefix || r_DEC_unique.name|| l_suffix,'REUSED');
10031: --
10032: end if ;
10033: hr_utility.set_location( 'found record for update',10);
10034: --
10046: open c_DEC_min_max_dates(r_DEC_unique.table_route_id, r_DEC_unique.information1 ) ;
10047: fetch c_DEC_min_max_dates into l_min_esd,l_max_eed ;
10048: --
10049:
10050: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10051: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10052: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10053: end if;
10054: l_min_esd := greatest(l_min_esd,r_DEC_unique.information2);
10047: fetch c_DEC_min_max_dates into l_min_esd,l_max_eed ;
10048: --
10049:
10050: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10051: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10052: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10053: end if;
10054: l_min_esd := greatest(l_min_esd,r_DEC_unique.information2);
10055: /*open c_DEC(r_DEC_unique.table_route_id,
10048: --
10049:
10050: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10051: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10052: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10053: end if;
10054: l_min_esd := greatest(l_min_esd,r_DEC_unique.information2);
10055: /*open c_DEC(r_DEC_unique.table_route_id,
10056: r_DEC_unique.information1,
10077: p_from_date => l_min_esd,
10078: p_to_date => l_max_eed );
10079: if l_dt_rec_found THEN
10080: --END TEMPIK
10081: if r_DEC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10082: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID' then
10083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC_unique.information1 ;
10085: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10078: p_to_date => l_max_eed );
10079: if l_dt_rec_found THEN
10080: --END TEMPIK
10081: if r_DEC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10082: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID' then
10083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC_unique.information1 ;
10085: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10086: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10079: if l_dt_rec_found THEN
10080: --END TEMPIK
10081: if r_DEC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10082: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID' then
10083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC_unique.information1 ;
10085: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10086: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10087: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10080: --END TEMPIK
10081: if r_DEC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10082: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID' then
10083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC_unique.information1 ;
10085: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10086: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10087: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10088: --
10081: if r_DEC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10082: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID' then
10083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC_unique.information1 ;
10085: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10086: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10087: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10088: --
10089: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10082: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DSGNTR_ENRLD_CVG_ID' then
10083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC_unique.information1 ;
10085: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10086: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10087: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10088: --
10089: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10090: --
10083: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10084: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC_unique.information1 ;
10085: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10086: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10087: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10088: --
10089: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10090: --
10091: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10085: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10086: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10087: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10088: --
10089: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10090: --
10091: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10092: end if ;
10093: --
10087: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10088: --
10089: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10090: --
10091: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10092: end if ;
10093: --
10094: l_object_found_in_target := true ;
10095: --TEMPIK
10125: end if ;
10126: --
10127:
10128: l_effective_date := r_DEC.information2;
10129: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10130: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10131: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10132: end if;
10133:
10126: --
10127:
10128: l_effective_date := r_DEC.information2;
10129: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10130: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10131: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10132: end if;
10133:
10134: --if l_first_rec then
10127:
10128: l_effective_date := r_DEC.information2;
10129: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10130: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10131: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10132: end if;
10133:
10134: --if l_first_rec then
10135: if l_first_rec and not l_update then
10184: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
10185: -- Update all relevent cer records with new pk_id
10186: hr_utility.set_location('Before plsql table ',222);
10187: hr_utility.set_location('new_value id '||l_dsgntr_enrld_cvg_id,222);
10188: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10189: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC.information1 ;
10190: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DSGNTR_ENRLD_CVG_ID ;
10191: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10192: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10185: -- Update all relevent cer records with new pk_id
10186: hr_utility.set_location('Before plsql table ',222);
10187: hr_utility.set_location('new_value id '||l_dsgntr_enrld_cvg_id,222);
10188: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10189: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC.information1 ;
10190: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DSGNTR_ENRLD_CVG_ID ;
10191: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10192: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10193: hr_utility.set_location('After plsql table ',222);
10186: hr_utility.set_location('Before plsql table ',222);
10187: hr_utility.set_location('new_value id '||l_dsgntr_enrld_cvg_id,222);
10188: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10189: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC.information1 ;
10190: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DSGNTR_ENRLD_CVG_ID ;
10191: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10192: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10193: hr_utility.set_location('After plsql table ',222);
10194: --
10187: hr_utility.set_location('new_value id '||l_dsgntr_enrld_cvg_id,222);
10188: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10189: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC.information1 ;
10190: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DSGNTR_ENRLD_CVG_ID ;
10191: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10192: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10193: hr_utility.set_location('After plsql table ',222);
10194: --
10195: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
10188: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DSGNTR_ENRLD_CVG_ID' ;
10189: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DEC.information1 ;
10190: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DSGNTR_ENRLD_CVG_ID ;
10191: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10192: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10193: hr_utility.set_location('After plsql table ',222);
10194: --
10195: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
10196: --
10191: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10192: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DEC_unique.table_route_id;
10193: hr_utility.set_location('After plsql table ',222);
10194: --
10195: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
10196: --
10197: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10198: --
10199: else
10193: hr_utility.set_location('After plsql table ',222);
10194: --
10195: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
10196: --
10197: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10198: --
10199: else
10200: --
10201: -- Call Update routine for the pk_id created in prev run .
10307: end loop;
10308: --
10309: exception when others then
10310: --
10311: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'DEC',r_DEC.information5 ) ;
10312: --
10313: end create_DEC_rows;
10314: --
10315: ---------------------------------------------------------------
10449: end if ;
10450: -- End Prefix Sufix derivation
10451: for r_DPC_unique in c_unique_DPC('DPC') loop
10452:
10453: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10454: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10455: r_DPC_unique.information3 >=
10456: ben_pd_copy_to_ben_one.g_copy_effective_date)
10457: ) then
10450: -- End Prefix Sufix derivation
10451: for r_DPC_unique in c_unique_DPC('DPC') loop
10452:
10453: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10454: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10455: r_DPC_unique.information3 >=
10456: ben_pd_copy_to_ben_one.g_copy_effective_date)
10457: ) then
10458: --
10452:
10453: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10454: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10455: r_DPC_unique.information3 >=
10456: ben_pd_copy_to_ben_one.g_copy_effective_date)
10457: ) then
10458: --
10459: hr_utility.set_location(' r_DPC_unique.table_route_id '||r_DPC_unique.table_route_id,10);
10460: hr_utility.set_location(' r_DPC_unique.information1 '||r_DPC_unique.information1,10);
10489: l_object_found_in_target := TRUE;
10490: --
10491: if l_process_date between r_DPC_unique.information2 and r_DPC_unique.information3 then
10492: l_update := true;
10493: if r_DPC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10494: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID'
10495: then
10496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DPC_unique.information1 ;
10490: --
10491: if l_process_date between r_DPC_unique.information2 and r_DPC_unique.information3 then
10492: l_update := true;
10493: if r_DPC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10494: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID'
10495: then
10496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DPC_unique.information1 ;
10498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DPC_unique.information1 ;
10492: l_update := true;
10493: if r_DPC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10494: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID'
10495: then
10496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DPC_unique.information1 ;
10498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DPC_unique.information1 ;
10499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DPC_unique.table_route_id;
10493: if r_DPC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10494: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID'
10495: then
10496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DPC_unique.information1 ;
10498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DPC_unique.information1 ;
10499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DPC_unique.table_route_id;
10501: --
10494: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID'
10495: then
10496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DPC_unique.information1 ;
10498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DPC_unique.information1 ;
10499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DPC_unique.table_route_id;
10501: --
10502: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10495: then
10496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DPC_unique.information1 ;
10498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DPC_unique.information1 ;
10499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DPC_unique.table_route_id;
10501: --
10502: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10503: --
10496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DPC_unique.information1 ;
10498: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DPC_unique.information1 ;
10499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DPC_unique.table_route_id;
10501: --
10502: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10503: --
10504: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DPC_unique.table_route_id;
10501: --
10502: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10503: --
10504: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10505: --
10506: --BEN_PD_COPY_TO_BEN_ONE.log_data('DPC',l_new_value,l_prefix || r_DPC_unique.name|| l_suffix,'REUSED');
10507: --
10508: end if ;
10502: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10503: --
10504: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10505: --
10506: --BEN_PD_COPY_TO_BEN_ONE.log_data('DPC',l_new_value,l_prefix || r_DPC_unique.name|| l_suffix,'REUSED');
10507: --
10508: end if ;
10509: hr_utility.set_location( 'found record for update',10);
10510: --
10523: open c_DPC_min_max_dates(r_DPC_unique.table_route_id, r_DPC_unique.information1 ) ;
10524: fetch c_DPC_min_max_dates into l_min_esd,l_max_eed ;
10525: --
10526:
10527: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10528: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10529: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10530: end if;
10531: l_min_esd := greatest(l_min_esd,r_DPC_unique.information2);
10524: fetch c_DPC_min_max_dates into l_min_esd,l_max_eed ;
10525: --
10526:
10527: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10528: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10529: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10530: end if;
10531: l_min_esd := greatest(l_min_esd,r_DPC_unique.information2);
10532: /*open c_DPC(r_DPC_unique.table_route_id,
10525: --
10526:
10527: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10528: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10529: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10530: end if;
10531: l_min_esd := greatest(l_min_esd,r_DPC_unique.information2);
10532: /*open c_DPC(r_DPC_unique.table_route_id,
10533: r_DPC_unique.information1,
10555: p_from_date => l_min_esd,
10556: p_to_date => l_max_eed );
10557: if l_dt_rec_found THEN
10558: --END TEMPIK
10559: if r_DPC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10560: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID' then
10561: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10562: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC_unique.information1 ;
10563: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10556: p_to_date => l_max_eed );
10557: if l_dt_rec_found THEN
10558: --END TEMPIK
10559: if r_DPC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10560: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID' then
10561: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10562: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC_unique.information1 ;
10563: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10564: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10557: if l_dt_rec_found THEN
10558: --END TEMPIK
10559: if r_DPC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10560: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID' then
10561: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10562: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC_unique.information1 ;
10563: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10564: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10565: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10558: --END TEMPIK
10559: if r_DPC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10560: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID' then
10561: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10562: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC_unique.information1 ;
10563: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10564: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10565: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10566: --
10559: if r_DPC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
10560: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID' then
10561: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10562: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC_unique.information1 ;
10563: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10564: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10565: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10566: --
10567: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10560: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'DPNT_CVRD_ANTHR_PL_CVG_ID' then
10561: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10562: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC_unique.information1 ;
10563: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10564: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10565: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10566: --
10567: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10568: --
10561: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10562: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC_unique.information1 ;
10563: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10564: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10565: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10566: --
10567: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10568: --
10569: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10563: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
10564: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
10565: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10566: --
10567: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10568: --
10569: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10570: end if ;
10571: --
10565: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10566: --
10567: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
10568: --
10569: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10570: end if ;
10571: --
10572: l_object_found_in_target := true ;
10573: --TEMPIK
10603: end if ;
10604: --
10605:
10606: l_effective_date := r_DPC.information2;
10607: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10608: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10609: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10610: end if;
10611: -- UPD START
10604: --
10605:
10606: l_effective_date := r_DPC.information2;
10607: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10608: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10609: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10610: end if;
10611: -- UPD START
10612: --if l_first_rec then
10605:
10606: l_effective_date := r_DPC.information2;
10607: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10608: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10609: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10610: end if;
10611: -- UPD START
10612: --if l_first_rec then
10613: if l_first_rec and not l_update then
10666: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
10667: -- Update all relevent cer records with new pk_id
10668: hr_utility.set_location('Before plsql table ',222);
10669: hr_utility.set_location('new_value id '||l_dpnt_cvrd_anthr_pl_cvg_id,222);
10670: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10671: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC.information1 ;
10672: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVRD_ANTHR_PL_CVG_ID ;
10673: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10674: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10667: -- Update all relevent cer records with new pk_id
10668: hr_utility.set_location('Before plsql table ',222);
10669: hr_utility.set_location('new_value id '||l_dpnt_cvrd_anthr_pl_cvg_id,222);
10670: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10671: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC.information1 ;
10672: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVRD_ANTHR_PL_CVG_ID ;
10673: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10674: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10675: hr_utility.set_location('After plsql table ',222);
10668: hr_utility.set_location('Before plsql table ',222);
10669: hr_utility.set_location('new_value id '||l_dpnt_cvrd_anthr_pl_cvg_id,222);
10670: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10671: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC.information1 ;
10672: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVRD_ANTHR_PL_CVG_ID ;
10673: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10674: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10675: hr_utility.set_location('After plsql table ',222);
10676: --
10669: hr_utility.set_location('new_value id '||l_dpnt_cvrd_anthr_pl_cvg_id,222);
10670: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10671: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC.information1 ;
10672: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVRD_ANTHR_PL_CVG_ID ;
10673: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10674: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10675: hr_utility.set_location('After plsql table ',222);
10676: --
10677: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
10670: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'DPNT_CVRD_ANTHR_PL_CVG_ID' ;
10671: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_DPC.information1 ;
10672: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_DPNT_CVRD_ANTHR_PL_CVG_ID ;
10673: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10674: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10675: hr_utility.set_location('After plsql table ',222);
10676: --
10677: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
10678: --
10673: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
10674: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_DPC_unique.table_route_id;
10675: hr_utility.set_location('After plsql table ',222);
10676: --
10677: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
10678: --
10679: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10680: --
10681: else
10675: hr_utility.set_location('After plsql table ',222);
10676: --
10677: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
10678: --
10679: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
10680: --
10681: else
10682: --
10683: -- Call Update routine for the pk_id created in prev run .
10792: end loop;
10793: --
10794: exception when others then
10795: --
10796: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'DPC',r_DPC.information5 ) ;
10797: --
10798: end create_DPC_rows;
10799:
10800: --
10937: end if ;
10938: -- End Prefix Sufix derivation
10939: for r_EAC_unique in c_unique_EAC('EAC') loop
10940:
10941: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10942: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10943: r_EAC_unique.information3 >=
10944: ben_pd_copy_to_ben_one.g_copy_effective_date)
10945: ) then
10938: -- End Prefix Sufix derivation
10939: for r_EAC_unique in c_unique_EAC('EAC') loop
10940:
10941: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10942: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10943: r_EAC_unique.information3 >=
10944: ben_pd_copy_to_ben_one.g_copy_effective_date)
10945: ) then
10946: --
10940:
10941: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10942: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10943: r_EAC_unique.information3 >=
10944: ben_pd_copy_to_ben_one.g_copy_effective_date)
10945: ) then
10946: --
10947: hr_utility.set_location(' r_EAC_unique.table_route_id '||r_EAC_unique.table_route_id,10);
10948: hr_utility.set_location(' r_EAC_unique.information1 '||r_EAC_unique.information1,10);
10977: l_object_found_in_target := TRUE;
10978: --
10979: if l_process_date between r_EAC_unique.information2 and r_EAC_unique.information3 then
10980: l_update := true;
10981: if r_EAC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10982: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID'
10983: then
10984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
10985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAC_unique.information1 ;
10978: --
10979: if l_process_date between r_EAC_unique.information2 and r_EAC_unique.information3 then
10980: l_update := true;
10981: if r_EAC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10982: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID'
10983: then
10984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
10985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAC_unique.information1 ;
10986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAC_unique.information1 ;
10980: l_update := true;
10981: if r_EAC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10982: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID'
10983: then
10984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
10985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAC_unique.information1 ;
10986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAC_unique.information1 ;
10987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAC_unique.table_route_id;
10981: if r_EAC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10982: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID'
10983: then
10984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
10985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAC_unique.information1 ;
10986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAC_unique.information1 ;
10987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAC_unique.table_route_id;
10989: --
10982: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID'
10983: then
10984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
10985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAC_unique.information1 ;
10986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAC_unique.information1 ;
10987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAC_unique.table_route_id;
10989: --
10990: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10983: then
10984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
10985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAC_unique.information1 ;
10986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAC_unique.information1 ;
10987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAC_unique.table_route_id;
10989: --
10990: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10991: --
10984: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
10985: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EAC_unique.information1 ;
10986: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EAC_unique.information1 ;
10987: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAC_unique.table_route_id;
10989: --
10990: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10991: --
10992: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10988: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EAC_unique.table_route_id;
10989: --
10990: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10991: --
10992: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10993: --
10994: --BEN_PD_COPY_TO_BEN_ONE.log_data('EAC',l_new_value,l_prefix || r_EAC_unique.name|| l_suffix,'REUSED');
10995: --
10996: end if ;
10990: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10991: --
10992: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10993: --
10994: --BEN_PD_COPY_TO_BEN_ONE.log_data('EAC',l_new_value,l_prefix || r_EAC_unique.name|| l_suffix,'REUSED');
10995: --
10996: end if ;
10997: hr_utility.set_location( 'found record for update',10);
10998: --
11009: open c_EAC_min_max_dates(r_EAC_unique.table_route_id, r_EAC_unique.information1 ) ;
11010: fetch c_EAC_min_max_dates into l_min_esd,l_max_eed ;
11011: --
11012:
11013: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11014: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11015: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11016: end if;
11017: l_min_esd := greatest(l_min_esd,r_EAC_unique.information2);
11010: fetch c_EAC_min_max_dates into l_min_esd,l_max_eed ;
11011: --
11012:
11013: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11014: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11015: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11016: end if;
11017: l_min_esd := greatest(l_min_esd,r_EAC_unique.information2);
11018: /*open c_EAC(r_EAC_unique.table_route_id,
11011: --
11012:
11013: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11014: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11015: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11016: end if;
11017: l_min_esd := greatest(l_min_esd,r_EAC_unique.information2);
11018: /*open c_EAC(r_EAC_unique.table_route_id,
11019: r_EAC_unique.information1,
11040: p_from_date => l_min_esd,
11041: p_to_date => l_max_eed );
11042: if l_dt_rec_found THEN
11043: --END TEMPIK
11044: if r_EAC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11045: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID' then
11046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC_unique.information1 ;
11048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11041: p_to_date => l_max_eed );
11042: if l_dt_rec_found THEN
11043: --END TEMPIK
11044: if r_EAC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11045: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID' then
11046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC_unique.information1 ;
11048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11042: if l_dt_rec_found THEN
11043: --END TEMPIK
11044: if r_EAC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11045: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID' then
11046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC_unique.information1 ;
11048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11050: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11043: --END TEMPIK
11044: if r_EAC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11045: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID' then
11046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC_unique.information1 ;
11048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11050: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11051: --
11044: if r_EAC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11045: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID' then
11046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC_unique.information1 ;
11048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11050: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11051: --
11052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11045: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_AGE_CVG_ID' then
11046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC_unique.information1 ;
11048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11050: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11051: --
11052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11053: --
11046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC_unique.information1 ;
11048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11050: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11051: --
11052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11053: --
11054: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11050: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11051: --
11052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11053: --
11054: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11055: end if ;
11056: --
11050: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11051: --
11052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11053: --
11054: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11055: end if ;
11056: --
11057: l_object_found_in_target := true ;
11058: --TEMPIK
11089: end if ;
11090: --
11091:
11092: l_effective_date := r_EAC.information2;
11093: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11094: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11095: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11096: end if;
11097:
11090: --
11091:
11092: l_effective_date := r_EAC.information2;
11093: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11094: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11095: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11096: end if;
11097:
11098: --if l_first_rec then
11091:
11092: l_effective_date := r_EAC.information2;
11093: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11094: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11095: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11096: end if;
11097:
11098: --if l_first_rec then
11099: if l_first_rec and not l_update then
11153: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
11154: -- Update all relevent cer records with new pk_id
11155: hr_utility.set_location('Before plsql table ',222);
11156: hr_utility.set_location('new_value id '||l_elig_age_cvg_id,222);
11157: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11158: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC.information1 ;
11159: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_AGE_CVG_ID ;
11160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11154: -- Update all relevent cer records with new pk_id
11155: hr_utility.set_location('Before plsql table ',222);
11156: hr_utility.set_location('new_value id '||l_elig_age_cvg_id,222);
11157: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11158: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC.information1 ;
11159: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_AGE_CVG_ID ;
11160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11162: hr_utility.set_location('After plsql table ',222);
11155: hr_utility.set_location('Before plsql table ',222);
11156: hr_utility.set_location('new_value id '||l_elig_age_cvg_id,222);
11157: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11158: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC.information1 ;
11159: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_AGE_CVG_ID ;
11160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11162: hr_utility.set_location('After plsql table ',222);
11163: --
11156: hr_utility.set_location('new_value id '||l_elig_age_cvg_id,222);
11157: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11158: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC.information1 ;
11159: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_AGE_CVG_ID ;
11160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11162: hr_utility.set_location('After plsql table ',222);
11163: --
11164: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
11157: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_AGE_CVG_ID' ;
11158: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EAC.information1 ;
11159: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_AGE_CVG_ID ;
11160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11162: hr_utility.set_location('After plsql table ',222);
11163: --
11164: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
11165: --
11160: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11161: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EAC_unique.table_route_id;
11162: hr_utility.set_location('After plsql table ',222);
11163: --
11164: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
11165: --
11166: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11167: --
11168: else
11162: hr_utility.set_location('After plsql table ',222);
11163: --
11164: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
11165: --
11166: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11167: --
11168: else
11169: --
11170: -- Call Update routine for the pk_id created in prev run .
11281: end loop;
11282: --
11283: exception when others then
11284: --
11285: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EAC',r_EAC.information5 ) ;
11286: --
11287: end create_EAC_rows;
11288:
11289: --
11426: end if ;
11427: -- End Prefix Sufix derivation
11428: for r_EDC_unique in c_unique_EDC('EDC') loop
11429:
11430: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11431: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11432: r_EDC_unique.information3 >=
11433: ben_pd_copy_to_ben_one.g_copy_effective_date)
11434: ) then
11427: -- End Prefix Sufix derivation
11428: for r_EDC_unique in c_unique_EDC('EDC') loop
11429:
11430: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11431: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11432: r_EDC_unique.information3 >=
11433: ben_pd_copy_to_ben_one.g_copy_effective_date)
11434: ) then
11435: --
11429:
11430: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11431: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11432: r_EDC_unique.information3 >=
11433: ben_pd_copy_to_ben_one.g_copy_effective_date)
11434: ) then
11435: --
11436: hr_utility.set_location(' r_EDC_unique.table_route_id '||r_EDC_unique.table_route_id,10);
11437: hr_utility.set_location(' r_EDC_unique.information1 '||r_EDC_unique.information1,10);
11466: l_object_found_in_target := TRUE;
11467: --
11468: if l_process_date between r_EDC_unique.information2 and r_EDC_unique.information3 then
11469: l_update := true;
11470: if r_EDC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11471: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID'
11472: then
11473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDC_unique.information1 ;
11467: --
11468: if l_process_date between r_EDC_unique.information2 and r_EDC_unique.information3 then
11469: l_update := true;
11470: if r_EDC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11471: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID'
11472: then
11473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDC_unique.information1 ;
11475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDC_unique.information1 ;
11469: l_update := true;
11470: if r_EDC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11471: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID'
11472: then
11473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDC_unique.information1 ;
11475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDC_unique.information1 ;
11476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDC_unique.table_route_id;
11470: if r_EDC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11471: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID'
11472: then
11473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDC_unique.information1 ;
11475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDC_unique.information1 ;
11476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDC_unique.table_route_id;
11478: --
11471: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID'
11472: then
11473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDC_unique.information1 ;
11475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDC_unique.information1 ;
11476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDC_unique.table_route_id;
11478: --
11479: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11472: then
11473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDC_unique.information1 ;
11475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDC_unique.information1 ;
11476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDC_unique.table_route_id;
11478: --
11479: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11480: --
11473: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11474: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EDC_unique.information1 ;
11475: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EDC_unique.information1 ;
11476: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDC_unique.table_route_id;
11478: --
11479: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11480: --
11481: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11477: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EDC_unique.table_route_id;
11478: --
11479: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11480: --
11481: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11482: --
11483: --BEN_PD_COPY_TO_BEN_ONE.log_data('EDC',l_new_value,l_prefix || r_EDC_unique.name|| l_suffix,'REUSED');
11484: --
11485: end if ;
11479: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11480: --
11481: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11482: --
11483: --BEN_PD_COPY_TO_BEN_ONE.log_data('EDC',l_new_value,l_prefix || r_EDC_unique.name|| l_suffix,'REUSED');
11484: --
11485: end if ;
11486: hr_utility.set_location( 'found record for update',10);
11487: --
11499: open c_EDC_min_max_dates(r_EDC_unique.table_route_id, r_EDC_unique.information1 ) ;
11500: fetch c_EDC_min_max_dates into l_min_esd,l_max_eed ;
11501: --
11502:
11503: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11504: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11505: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11506: end if;
11507: l_min_esd := greatest(l_min_esd,r_EDC_unique.information2);
11500: fetch c_EDC_min_max_dates into l_min_esd,l_max_eed ;
11501: --
11502:
11503: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11504: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11505: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11506: end if;
11507: l_min_esd := greatest(l_min_esd,r_EDC_unique.information2);
11508: --
11501: --
11502:
11503: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11504: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11505: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11506: end if;
11507: l_min_esd := greatest(l_min_esd,r_EDC_unique.information2);
11508: --
11509: if p_reuse_object_flag = 'Y' then
11522: p_from_date => l_min_esd,
11523: p_to_date => l_max_eed );
11524: if l_dt_rec_found THEN
11525: --END TEMPIK
11526: if r_EDC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11527: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID' then
11528: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11529: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC_unique.information1 ;
11530: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11523: p_to_date => l_max_eed );
11524: if l_dt_rec_found THEN
11525: --END TEMPIK
11526: if r_EDC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11527: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID' then
11528: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11529: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC_unique.information1 ;
11530: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11531: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11524: if l_dt_rec_found THEN
11525: --END TEMPIK
11526: if r_EDC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11527: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID' then
11528: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11529: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC_unique.information1 ;
11530: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11531: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11532: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11525: --END TEMPIK
11526: if r_EDC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11527: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID' then
11528: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11529: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC_unique.information1 ;
11530: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11531: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11532: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11533: --
11526: if r_EDC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
11527: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID' then
11528: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11529: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC_unique.information1 ;
11530: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11531: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11532: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11533: --
11534: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11527: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_DSBLD_STAT_CVG_ID' then
11528: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11529: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC_unique.information1 ;
11530: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11531: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11532: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11533: --
11534: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11535: --
11528: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11529: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC_unique.information1 ;
11530: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11531: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11532: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11533: --
11534: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11535: --
11536: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11530: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
11531: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
11532: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11533: --
11534: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11535: --
11536: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11537: end if ;
11538: --
11532: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11533: --
11534: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
11535: --
11536: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11537: end if ;
11538: --
11539: l_object_found_in_target := true ;
11540: --TEMPIK
11569: end if ;
11570: --
11571:
11572: l_effective_date := r_EDC.information2;
11573: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11574: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11575: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11576: end if;
11577:
11570: --
11571:
11572: l_effective_date := r_EDC.information2;
11573: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11574: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11575: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11576: end if;
11577:
11578: --if l_first_rec then
11571:
11572: l_effective_date := r_EDC.information2;
11573: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11574: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11575: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11576: end if;
11577:
11578: --if l_first_rec then
11579: if l_first_rec and not l_update then
11631: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
11632: -- Update all relevent cer records with new pk_id
11633: hr_utility.set_location('Before plsql table ',222);
11634: hr_utility.set_location('new_value id '||l_elig_dsbld_stat_cvg_id,222);
11635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC.information1 ;
11637: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_DSBLD_STAT_CVG_ID ;
11638: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11639: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11632: -- Update all relevent cer records with new pk_id
11633: hr_utility.set_location('Before plsql table ',222);
11634: hr_utility.set_location('new_value id '||l_elig_dsbld_stat_cvg_id,222);
11635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC.information1 ;
11637: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_DSBLD_STAT_CVG_ID ;
11638: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11639: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11640: hr_utility.set_location('After plsql table ',222);
11633: hr_utility.set_location('Before plsql table ',222);
11634: hr_utility.set_location('new_value id '||l_elig_dsbld_stat_cvg_id,222);
11635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC.information1 ;
11637: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_DSBLD_STAT_CVG_ID ;
11638: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11639: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11640: hr_utility.set_location('After plsql table ',222);
11641: --
11634: hr_utility.set_location('new_value id '||l_elig_dsbld_stat_cvg_id,222);
11635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC.information1 ;
11637: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_DSBLD_STAT_CVG_ID ;
11638: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11639: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11640: hr_utility.set_location('After plsql table ',222);
11641: --
11642: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
11635: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_DSBLD_STAT_CVG_ID' ;
11636: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EDC.information1 ;
11637: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_DSBLD_STAT_CVG_ID ;
11638: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11639: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11640: hr_utility.set_location('After plsql table ',222);
11641: --
11642: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
11643: --
11638: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
11639: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EDC_unique.table_route_id;
11640: hr_utility.set_location('After plsql table ',222);
11641: --
11642: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
11643: --
11644: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11645: --
11646: else
11640: hr_utility.set_location('After plsql table ',222);
11641: --
11642: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
11643: --
11644: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
11645: --
11646: else
11647: --
11648: -- Call Update routine for the pk_id created in prev run .
11758: end loop;
11759: --
11760: exception when others then
11761: --
11762: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EDC',r_EDC.information5 ) ;
11763: --
11764: end create_EDC_rows;
11765:
11766: --
11901: end if ;
11902: -- End Prefix Sufix derivation
11903: for r_EMC_unique in c_unique_EMC('EMC') loop
11904:
11905: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11906: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11907: r_EMC_unique.information3 >=
11908: ben_pd_copy_to_ben_one.g_copy_effective_date)
11909: ) then
11902: -- End Prefix Sufix derivation
11903: for r_EMC_unique in c_unique_EMC('EMC') loop
11904:
11905: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11906: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11907: r_EMC_unique.information3 >=
11908: ben_pd_copy_to_ben_one.g_copy_effective_date)
11909: ) then
11910: --
11904:
11905: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11906: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11907: r_EMC_unique.information3 >=
11908: ben_pd_copy_to_ben_one.g_copy_effective_date)
11909: ) then
11910: --
11911: hr_utility.set_location(' r_EMC_unique.table_route_id '||r_EMC_unique.table_route_id,10);
11912: hr_utility.set_location(' r_EMC_unique.information1 '||r_EMC_unique.information1,10);
11942: l_object_found_in_target := TRUE;
11943: --
11944: if l_process_date between r_EMC_unique.information2 and r_EMC_unique.information3 then
11945: l_update := true;
11946: if r_EMC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID'
11948: then
11949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
11950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMC_unique.information1 ;
11943: --
11944: if l_process_date between r_EMC_unique.information2 and r_EMC_unique.information3 then
11945: l_update := true;
11946: if r_EMC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID'
11948: then
11949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
11950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMC_unique.information1 ;
11951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMC_unique.information1 ;
11945: l_update := true;
11946: if r_EMC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID'
11948: then
11949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
11950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMC_unique.information1 ;
11951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMC_unique.information1 ;
11952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMC_unique.table_route_id;
11946: if r_EMC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID'
11948: then
11949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
11950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMC_unique.information1 ;
11951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMC_unique.information1 ;
11952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMC_unique.table_route_id;
11954: --
11947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID'
11948: then
11949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
11950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMC_unique.information1 ;
11951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMC_unique.information1 ;
11952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMC_unique.table_route_id;
11954: --
11955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11948: then
11949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
11950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMC_unique.information1 ;
11951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMC_unique.information1 ;
11952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMC_unique.table_route_id;
11954: --
11955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11956: --
11949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
11950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMC_unique.information1 ;
11951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMC_unique.information1 ;
11952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMC_unique.table_route_id;
11954: --
11955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11956: --
11957: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMC_unique.table_route_id;
11954: --
11955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11956: --
11957: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11958: --
11959: --BEN_PD_COPY_TO_BEN_ONE.log_data('EMC',l_new_value,l_prefix || r_EMC_unique.name|| l_suffix,'REUSED');
11960: --
11961: end if ;
11955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11956: --
11957: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11958: --
11959: --BEN_PD_COPY_TO_BEN_ONE.log_data('EMC',l_new_value,l_prefix || r_EMC_unique.name|| l_suffix,'REUSED');
11960: --
11961: end if ;
11962: hr_utility.set_location( 'found record for update',10);
11963: --
11975: open c_EMC_min_max_dates(r_EMC_unique.table_route_id, r_EMC_unique.information1 ) ;
11976: fetch c_EMC_min_max_dates into l_min_esd,l_max_eed ;
11977: --
11978:
11979: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11980: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11981: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11982: end if;
11983: l_min_esd := greatest(l_min_esd,r_EMC_unique.information2);
11976: fetch c_EMC_min_max_dates into l_min_esd,l_max_eed ;
11977: --
11978:
11979: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11980: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11981: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11982: end if;
11983: l_min_esd := greatest(l_min_esd,r_EMC_unique.information2);
11984: /*open c_EMC(r_EMC_unique.table_route_id,
11977: --
11978:
11979: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11980: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11981: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11982: end if;
11983: l_min_esd := greatest(l_min_esd,r_EMC_unique.information2);
11984: /*open c_EMC(r_EMC_unique.table_route_id,
11985: r_EMC_unique.information1,
12005: p_from_date => l_min_esd,
12006: p_to_date => l_max_eed );
12007: if l_dt_rec_found THEN
12008: --END TEMPIK --
12009: if r_EMC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12010: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID' then
12011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC_unique.information1 ;
12013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12006: p_to_date => l_max_eed );
12007: if l_dt_rec_found THEN
12008: --END TEMPIK --
12009: if r_EMC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12010: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID' then
12011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC_unique.information1 ;
12013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12007: if l_dt_rec_found THEN
12008: --END TEMPIK --
12009: if r_EMC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12010: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID' then
12011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC_unique.information1 ;
12013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12008: --END TEMPIK --
12009: if r_EMC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12010: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID' then
12011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC_unique.information1 ;
12013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12016: --
12009: if r_EMC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12010: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID' then
12011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC_unique.information1 ;
12013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12016: --
12017: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12010: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MLTRY_STAT_CVG_ID' then
12011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC_unique.information1 ;
12013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12016: --
12017: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12018: --
12011: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12012: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC_unique.information1 ;
12013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12016: --
12017: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12018: --
12019: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12013: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12014: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12016: --
12017: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12018: --
12019: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12020: end if ;
12021: --
12015: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12016: --
12017: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12018: --
12019: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12020: end if ;
12021: --
12022: l_object_found_in_target := true ;
12023: --TEMPIK
12052: end if ;
12053: --
12054:
12055: l_effective_date := r_EMC.information2;
12056: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12057: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12058: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12059: end if;
12060:
12053: --
12054:
12055: l_effective_date := r_EMC.information2;
12056: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12057: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12058: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12059: end if;
12060:
12061: --if l_first_rec then
12054:
12055: l_effective_date := r_EMC.information2;
12056: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12057: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12058: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12059: end if;
12060:
12061: --if l_first_rec then
12062: if l_first_rec and not l_update then
12114: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
12115: -- Update all relevent cer records with new pk_id
12116: hr_utility.set_location('Before plsql table ',222);
12117: hr_utility.set_location('new_value id '||l_elig_mltry_stat_cvg_id,222);
12118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC.information1 ;
12120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MLTRY_STAT_CVG_ID ;
12121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12115: -- Update all relevent cer records with new pk_id
12116: hr_utility.set_location('Before plsql table ',222);
12117: hr_utility.set_location('new_value id '||l_elig_mltry_stat_cvg_id,222);
12118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC.information1 ;
12120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MLTRY_STAT_CVG_ID ;
12121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12123: hr_utility.set_location('After plsql table ',222);
12116: hr_utility.set_location('Before plsql table ',222);
12117: hr_utility.set_location('new_value id '||l_elig_mltry_stat_cvg_id,222);
12118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC.information1 ;
12120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MLTRY_STAT_CVG_ID ;
12121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12123: hr_utility.set_location('After plsql table ',222);
12124: --
12117: hr_utility.set_location('new_value id '||l_elig_mltry_stat_cvg_id,222);
12118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC.information1 ;
12120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MLTRY_STAT_CVG_ID ;
12121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12123: hr_utility.set_location('After plsql table ',222);
12124: --
12125: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
12118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MLTRY_STAT_CVG_ID' ;
12119: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMC.information1 ;
12120: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MLTRY_STAT_CVG_ID ;
12121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12123: hr_utility.set_location('After plsql table ',222);
12124: --
12125: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
12126: --
12121: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12122: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMC_unique.table_route_id;
12123: hr_utility.set_location('After plsql table ',222);
12124: --
12125: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
12126: --
12127: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12128: --
12129: else
12123: hr_utility.set_location('After plsql table ',222);
12124: --
12125: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
12126: --
12127: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12128: --
12129: else
12130: --
12131: -- Call Update routine for the pk_id created in prev run .
12241: end loop;
12242: --
12243: exception when others then
12244: --
12245: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EMC',r_EMC.information5 ) ;
12246: --
12247: end create_EMC_rows;
12248:
12249: --
12386: end if ;
12387: -- End Prefix Sufix derivation
12388: for r_EMS_unique in c_unique_EMS('EMS') loop
12389:
12390: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12391: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12392: r_EMS_unique.information3 >=
12393: ben_pd_copy_to_ben_one.g_copy_effective_date)
12394: ) then
12387: -- End Prefix Sufix derivation
12388: for r_EMS_unique in c_unique_EMS('EMS') loop
12389:
12390: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12391: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12392: r_EMS_unique.information3 >=
12393: ben_pd_copy_to_ben_one.g_copy_effective_date)
12394: ) then
12395: --
12389:
12390: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12391: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12392: r_EMS_unique.information3 >=
12393: ben_pd_copy_to_ben_one.g_copy_effective_date)
12394: ) then
12395: --
12396: hr_utility.set_location(' r_EMS_unique.table_route_id '||r_EMS_unique.table_route_id,10);
12397: hr_utility.set_location(' r_EMS_unique.information1 '||r_EMS_unique.information1,10);
12427: l_object_found_in_target := TRUE;
12428: --
12429: if l_process_date between r_EMS_unique.information2 and r_EMS_unique.information3 then
12430: l_update := true;
12431: if r_EMS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12432: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID'
12433: then
12434: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12435: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMS_unique.information1 ;
12428: --
12429: if l_process_date between r_EMS_unique.information2 and r_EMS_unique.information3 then
12430: l_update := true;
12431: if r_EMS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12432: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID'
12433: then
12434: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12435: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMS_unique.information1 ;
12436: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMS_unique.information1 ;
12430: l_update := true;
12431: if r_EMS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12432: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID'
12433: then
12434: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12435: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMS_unique.information1 ;
12436: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMS_unique.information1 ;
12437: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12438: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMS_unique.table_route_id;
12431: if r_EMS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12432: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID'
12433: then
12434: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12435: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMS_unique.information1 ;
12436: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMS_unique.information1 ;
12437: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12438: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMS_unique.table_route_id;
12439: --
12432: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID'
12433: then
12434: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12435: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMS_unique.information1 ;
12436: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMS_unique.information1 ;
12437: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12438: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMS_unique.table_route_id;
12439: --
12440: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12433: then
12434: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12435: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMS_unique.information1 ;
12436: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMS_unique.information1 ;
12437: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12438: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMS_unique.table_route_id;
12439: --
12440: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12441: --
12434: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12435: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EMS_unique.information1 ;
12436: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EMS_unique.information1 ;
12437: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12438: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMS_unique.table_route_id;
12439: --
12440: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12441: --
12442: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12438: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EMS_unique.table_route_id;
12439: --
12440: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12441: --
12442: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12443: --
12444: --BEN_PD_COPY_TO_BEN_ONE.log_data('EMS',l_new_value,l_prefix || r_EMS_unique.name|| l_suffix,'REUSED');
12445: --
12446: end if ;
12440: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12441: --
12442: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12443: --
12444: --BEN_PD_COPY_TO_BEN_ONE.log_data('EMS',l_new_value,l_prefix || r_EMS_unique.name|| l_suffix,'REUSED');
12445: --
12446: end if ;
12447: hr_utility.set_location( 'found record for update',10);
12448: --
12460: open c_EMS_min_max_dates(r_EMS_unique.table_route_id, r_EMS_unique.information1 ) ;
12461: fetch c_EMS_min_max_dates into l_min_esd,l_max_eed ;
12462: --
12463:
12464: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12465: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12466: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12467: end if;
12468: l_min_esd := greatest(l_min_esd,r_EMS_unique.information2);
12461: fetch c_EMS_min_max_dates into l_min_esd,l_max_eed ;
12462: --
12463:
12464: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12465: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12466: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12467: end if;
12468: l_min_esd := greatest(l_min_esd,r_EMS_unique.information2);
12469: /*open c_EMS(r_EMS_unique.table_route_id,
12462: --
12463:
12464: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12465: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12466: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12467: end if;
12468: l_min_esd := greatest(l_min_esd,r_EMS_unique.information2);
12469: /*open c_EMS(r_EMS_unique.table_route_id,
12470: r_EMS_unique.information1,
12491: p_from_date => l_min_esd,
12492: p_to_date => l_max_eed );
12493: if l_dt_rec_found THEN
12494: --END TEMPIK
12495: if r_EMS_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12496: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID' then
12497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12498: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS_unique.information1 ;
12499: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12492: p_to_date => l_max_eed );
12493: if l_dt_rec_found THEN
12494: --END TEMPIK
12495: if r_EMS_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12496: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID' then
12497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12498: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS_unique.information1 ;
12499: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12500: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12493: if l_dt_rec_found THEN
12494: --END TEMPIK
12495: if r_EMS_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12496: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID' then
12497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12498: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS_unique.information1 ;
12499: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12500: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12501: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12494: --END TEMPIK
12495: if r_EMS_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12496: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID' then
12497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12498: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS_unique.information1 ;
12499: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12500: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12501: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12502: --
12495: if r_EMS_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12496: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID' then
12497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12498: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS_unique.information1 ;
12499: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12500: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12501: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12502: --
12503: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12496: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_MRTL_STAT_CVG_ID' then
12497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12498: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS_unique.information1 ;
12499: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12500: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12501: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12502: --
12503: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12504: --
12497: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12498: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS_unique.information1 ;
12499: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12500: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12501: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12502: --
12503: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12504: --
12505: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12499: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12500: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12501: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12502: --
12503: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12504: --
12505: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12506: end if ;
12507: --
12501: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12502: --
12503: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12504: --
12505: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12506: end if ;
12507: --
12508: l_object_found_in_target := true ;
12509: --TEMPIK
12538: end if ;
12539: --
12540:
12541: l_effective_date := r_EMS.information2;
12542: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12543: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12544: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12545: end if;
12546:
12539: --
12540:
12541: l_effective_date := r_EMS.information2;
12542: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12543: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12544: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12545: end if;
12546:
12547: --if l_first_rec then
12540:
12541: l_effective_date := r_EMS.information2;
12542: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12543: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12544: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12545: end if;
12546:
12547: --if l_first_rec then
12548: if l_first_rec and not l_update then
12601: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
12602: -- Update all relevent cer records with new pk_id
12603: hr_utility.set_location('Before plsql table ',222);
12604: hr_utility.set_location('new_value id '||l_elig_mrtl_stat_cvg_id,222);
12605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12606: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS.information1 ;
12607: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MRTL_STAT_CVG_ID ;
12608: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12609: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12602: -- Update all relevent cer records with new pk_id
12603: hr_utility.set_location('Before plsql table ',222);
12604: hr_utility.set_location('new_value id '||l_elig_mrtl_stat_cvg_id,222);
12605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12606: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS.information1 ;
12607: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MRTL_STAT_CVG_ID ;
12608: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12609: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12610: hr_utility.set_location('After plsql table ',222);
12603: hr_utility.set_location('Before plsql table ',222);
12604: hr_utility.set_location('new_value id '||l_elig_mrtl_stat_cvg_id,222);
12605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12606: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS.information1 ;
12607: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MRTL_STAT_CVG_ID ;
12608: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12609: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12610: hr_utility.set_location('After plsql table ',222);
12611: --
12604: hr_utility.set_location('new_value id '||l_elig_mrtl_stat_cvg_id,222);
12605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12606: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS.information1 ;
12607: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MRTL_STAT_CVG_ID ;
12608: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12609: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12610: hr_utility.set_location('After plsql table ',222);
12611: --
12612: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
12605: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_MRTL_STAT_CVG_ID' ;
12606: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EMS.information1 ;
12607: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_MRTL_STAT_CVG_ID ;
12608: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12609: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12610: hr_utility.set_location('After plsql table ',222);
12611: --
12612: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
12613: --
12608: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
12609: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EMS_unique.table_route_id;
12610: hr_utility.set_location('After plsql table ',222);
12611: --
12612: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
12613: --
12614: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12615: --
12616: else
12610: hr_utility.set_location('After plsql table ',222);
12611: --
12612: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
12613: --
12614: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12615: --
12616: else
12617: --
12618: -- Call Update routine for the pk_id created in prev run .
12728: end loop;
12729: --
12730: exception when others then
12731: --
12732: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EMS',r_EMS.information5 ) ;
12733: --
12734: end create_EMS_rows;
12735:
12736: --
12871: end if ;
12872: -- End Prefix Sufix derivation
12873: for r_EPL_unique in c_unique_EPL('EPL') loop
12874:
12875: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12876: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12877: r_EPL_unique.information3 >=
12878: ben_pd_copy_to_ben_one.g_copy_effective_date)
12879: ) then
12872: -- End Prefix Sufix derivation
12873: for r_EPL_unique in c_unique_EPL('EPL') loop
12874:
12875: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12876: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12877: r_EPL_unique.information3 >=
12878: ben_pd_copy_to_ben_one.g_copy_effective_date)
12879: ) then
12880: --
12874:
12875: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12876: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12877: r_EPL_unique.information3 >=
12878: ben_pd_copy_to_ben_one.g_copy_effective_date)
12879: ) then
12880: --
12881: hr_utility.set_location(' r_EPL_unique.table_route_id '||r_EPL_unique.table_route_id,10);
12882: hr_utility.set_location(' r_EPL_unique.information1 '||r_EPL_unique.information1,10);
12908: l_object_found_in_target := TRUE;
12909: --
12910: if l_process_date between r_EPL_unique.information2 and r_EPL_unique.information3 then
12911: l_update := true;
12912: if r_EPL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12913: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID'
12914: then
12915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPL_unique.information1 ;
12909: --
12910: if l_process_date between r_EPL_unique.information2 and r_EPL_unique.information3 then
12911: l_update := true;
12912: if r_EPL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12913: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID'
12914: then
12915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPL_unique.information1 ;
12917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPL_unique.information1 ;
12911: l_update := true;
12912: if r_EPL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12913: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID'
12914: then
12915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPL_unique.information1 ;
12917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPL_unique.information1 ;
12918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPL_unique.table_route_id;
12912: if r_EPL_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12913: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID'
12914: then
12915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPL_unique.information1 ;
12917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPL_unique.information1 ;
12918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPL_unique.table_route_id;
12920: --
12913: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID'
12914: then
12915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPL_unique.information1 ;
12917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPL_unique.information1 ;
12918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPL_unique.table_route_id;
12920: --
12921: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12914: then
12915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPL_unique.information1 ;
12917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPL_unique.information1 ;
12918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPL_unique.table_route_id;
12920: --
12921: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12922: --
12915: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12916: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPL_unique.information1 ;
12917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPL_unique.information1 ;
12918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPL_unique.table_route_id;
12920: --
12921: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12922: --
12923: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPL_unique.table_route_id;
12920: --
12921: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12922: --
12923: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12924: --
12925: -- BEN_PD_COPY_TO_BEN_ONE.log_data('EPL',l_new_value,l_prefix || r_EPL_unique.name|| l_suffix,'REUSED');
12926: --
12927: end if ;
12921: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12922: --
12923: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12924: --
12925: -- BEN_PD_COPY_TO_BEN_ONE.log_data('EPL',l_new_value,l_prefix || r_EPL_unique.name|| l_suffix,'REUSED');
12926: --
12927: end if ;
12928: hr_utility.set_location( 'found record for update',10);
12929: --
12940: open c_EPL_min_max_dates(r_EPL_unique.table_route_id, r_EPL_unique.information1 ) ;
12941: fetch c_EPL_min_max_dates into l_min_esd,l_max_eed ;
12942: --
12943:
12944: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12945: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12946: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12947: end if;
12948: l_min_esd := greatest(l_min_esd,r_EPL_unique.information2);
12941: fetch c_EPL_min_max_dates into l_min_esd,l_max_eed ;
12942: --
12943:
12944: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12945: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12946: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12947: end if;
12948: l_min_esd := greatest(l_min_esd,r_EPL_unique.information2);
12949: --
12942: --
12943:
12944: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12945: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12946: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12947: end if;
12948: l_min_esd := greatest(l_min_esd,r_EPL_unique.information2);
12949: --
12950: if p_reuse_object_flag = 'Y' then
12962: p_from_date => l_min_esd,
12963: p_to_date => l_max_eed );
12964: if l_dt_rec_found THEN
12965: --END TEMPIK --
12966: if r_EPL_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12967: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID' then
12968: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12969: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL_unique.information1 ;
12970: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12963: p_to_date => l_max_eed );
12964: if l_dt_rec_found THEN
12965: --END TEMPIK --
12966: if r_EPL_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12967: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID' then
12968: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12969: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL_unique.information1 ;
12970: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12971: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12964: if l_dt_rec_found THEN
12965: --END TEMPIK --
12966: if r_EPL_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12967: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID' then
12968: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12969: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL_unique.information1 ;
12970: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12971: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12972: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
12965: --END TEMPIK --
12966: if r_EPL_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12967: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID' then
12968: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12969: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL_unique.information1 ;
12970: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12971: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12972: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
12973: --
12966: if r_EPL_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
12967: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID' then
12968: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12969: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL_unique.information1 ;
12970: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12971: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12972: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
12973: --
12974: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12967: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_PSTL_CD_R_RNG_CVG_ID' then
12968: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12969: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL_unique.information1 ;
12970: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12971: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12972: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
12973: --
12974: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12975: --
12968: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
12969: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL_unique.information1 ;
12970: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12971: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12972: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
12973: --
12974: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12975: --
12976: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12970: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
12971: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
12972: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
12973: --
12974: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12975: --
12976: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12977: end if ;
12978: --
12972: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
12973: --
12974: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
12975: --
12976: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
12977: end if ;
12978: --
12979: l_object_found_in_target := true ;
12980: --TEMPIK
13009: end if ;
13010: --
13011:
13012: l_effective_date := r_EPL.information2;
13013: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13014: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13015: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13016: end if;
13017:
13010: --
13011:
13012: l_effective_date := r_EPL.information2;
13013: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13014: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13015: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13016: end if;
13017:
13018: --if l_first_rec then
13011:
13012: l_effective_date := r_EPL.information2;
13013: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13014: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13015: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13016: end if;
13017:
13018: --if l_first_rec then
13019: if l_first_rec and not l_update then
13069: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
13070: -- Update all relevent cer records with new pk_id
13071: hr_utility.set_location('Before plsql table ',222);
13072: hr_utility.set_location('new_value id '||l_elig_pstl_cd_r_rng_cvg_id,222);
13073: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
13074: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL.information1 ;
13075: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_CVG_ID ;
13076: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13077: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
13070: -- Update all relevent cer records with new pk_id
13071: hr_utility.set_location('Before plsql table ',222);
13072: hr_utility.set_location('new_value id '||l_elig_pstl_cd_r_rng_cvg_id,222);
13073: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
13074: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL.information1 ;
13075: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_CVG_ID ;
13076: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13077: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
13078: hr_utility.set_location('After plsql table ',222);
13071: hr_utility.set_location('Before plsql table ',222);
13072: hr_utility.set_location('new_value id '||l_elig_pstl_cd_r_rng_cvg_id,222);
13073: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
13074: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL.information1 ;
13075: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_CVG_ID ;
13076: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13077: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
13078: hr_utility.set_location('After plsql table ',222);
13079: --
13072: hr_utility.set_location('new_value id '||l_elig_pstl_cd_r_rng_cvg_id,222);
13073: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
13074: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL.information1 ;
13075: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_CVG_ID ;
13076: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13077: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
13078: hr_utility.set_location('After plsql table ',222);
13079: --
13080: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
13073: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_PSTL_CD_R_RNG_CVG_ID' ;
13074: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EPL.information1 ;
13075: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_PSTL_CD_R_RNG_CVG_ID ;
13076: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13077: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
13078: hr_utility.set_location('After plsql table ',222);
13079: --
13080: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
13081: --
13076: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13077: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EPL_unique.table_route_id;
13078: hr_utility.set_location('After plsql table ',222);
13079: --
13080: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
13081: --
13082: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13083: --
13084: else
13078: hr_utility.set_location('After plsql table ',222);
13079: --
13080: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
13081: --
13082: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13083: --
13084: else
13085: --
13086: -- Call Update routine for the pk_id created in prev run .
13195: end loop;
13196: --
13197: exception when others then
13198: --
13199: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPL',r_EPL.information5 ) ;
13200: --
13201: end create_EPL_rows;
13202:
13203: --
13339: end if ;
13340: -- End Prefix Sufix derivation
13341: for r_ESC_unique in c_unique_ESC('ESC') loop
13342:
13343: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13344: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13345: r_ESC_unique.information3 >=
13346: ben_pd_copy_to_ben_one.g_copy_effective_date)
13347: ) then
13340: -- End Prefix Sufix derivation
13341: for r_ESC_unique in c_unique_ESC('ESC') loop
13342:
13343: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13344: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13345: r_ESC_unique.information3 >=
13346: ben_pd_copy_to_ben_one.g_copy_effective_date)
13347: ) then
13348: --
13342:
13343: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13344: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13345: r_ESC_unique.information3 >=
13346: ben_pd_copy_to_ben_one.g_copy_effective_date)
13347: ) then
13348: --
13349: hr_utility.set_location(' r_ESC_unique.table_route_id '||r_ESC_unique.table_route_id,10);
13350: hr_utility.set_location(' r_ESC_unique.information1 '||r_ESC_unique.information1,10);
13380: l_object_found_in_target := TRUE;
13381: --
13382: if l_process_date between r_ESC_unique.information2 and r_ESC_unique.information3 then
13383: l_update := true;
13384: if r_ESC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13385: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID'
13386: then
13387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESC_unique.information1 ;
13381: --
13382: if l_process_date between r_ESC_unique.information2 and r_ESC_unique.information3 then
13383: l_update := true;
13384: if r_ESC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13385: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID'
13386: then
13387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESC_unique.information1 ;
13389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESC_unique.information1 ;
13383: l_update := true;
13384: if r_ESC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13385: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID'
13386: then
13387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESC_unique.information1 ;
13389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESC_unique.information1 ;
13390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESC_unique.table_route_id;
13384: if r_ESC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13385: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID'
13386: then
13387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESC_unique.information1 ;
13389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESC_unique.information1 ;
13390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESC_unique.table_route_id;
13392: --
13385: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID'
13386: then
13387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESC_unique.information1 ;
13389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESC_unique.information1 ;
13390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESC_unique.table_route_id;
13392: --
13393: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13386: then
13387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESC_unique.information1 ;
13389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESC_unique.information1 ;
13390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESC_unique.table_route_id;
13392: --
13393: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13394: --
13387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ESC_unique.information1 ;
13389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ESC_unique.information1 ;
13390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESC_unique.table_route_id;
13392: --
13393: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13394: --
13395: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ESC_unique.table_route_id;
13392: --
13393: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13394: --
13395: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13396: --
13397: --BEN_PD_COPY_TO_BEN_ONE.log_data('ESC',l_new_value,l_prefix || r_ESC_unique.name|| l_suffix,'REUSED');
13398: --
13399: end if ;
13393: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13394: --
13395: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13396: --
13397: --BEN_PD_COPY_TO_BEN_ONE.log_data('ESC',l_new_value,l_prefix || r_ESC_unique.name|| l_suffix,'REUSED');
13398: --
13399: end if ;
13400: hr_utility.set_location( 'found record for update',10);
13401: --
13413: open c_ESC_min_max_dates(r_ESC_unique.table_route_id, r_ESC_unique.information1 ) ;
13414: fetch c_ESC_min_max_dates into l_min_esd,l_max_eed ;
13415: --
13416:
13417: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13418: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13419: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13420: end if;
13421: l_min_esd := greatest(l_min_esd,r_ESC_unique.information2);
13414: fetch c_ESC_min_max_dates into l_min_esd,l_max_eed ;
13415: --
13416:
13417: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13418: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13419: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13420: end if;
13421: l_min_esd := greatest(l_min_esd,r_ESC_unique.information2);
13422: /*open c_ESC(r_ESC_unique.table_route_id,
13415: --
13416:
13417: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13418: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13419: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13420: end if;
13421: l_min_esd := greatest(l_min_esd,r_ESC_unique.information2);
13422: /*open c_ESC(r_ESC_unique.table_route_id,
13423: r_ESC_unique.information1,
13443: p_from_date => l_min_esd,
13444: p_to_date => l_max_eed );
13445: if l_dt_rec_found THEN
13446: --END TEMPIK --
13447: if r_ESC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13448: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID' then
13449: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13450: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC_unique.information1 ;
13451: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13444: p_to_date => l_max_eed );
13445: if l_dt_rec_found THEN
13446: --END TEMPIK --
13447: if r_ESC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13448: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID' then
13449: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13450: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC_unique.information1 ;
13451: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13445: if l_dt_rec_found THEN
13446: --END TEMPIK --
13447: if r_ESC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13448: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID' then
13449: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13450: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC_unique.information1 ;
13451: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13446: --END TEMPIK --
13447: if r_ESC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13448: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID' then
13449: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13450: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC_unique.information1 ;
13451: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13454: --
13447: if r_ESC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13448: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID' then
13449: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13450: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC_unique.information1 ;
13451: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13454: --
13455: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13448: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ELIG_STDNT_STAT_CVG_ID' then
13449: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13450: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC_unique.information1 ;
13451: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13454: --
13455: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13456: --
13449: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13450: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC_unique.information1 ;
13451: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13454: --
13455: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13456: --
13457: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13451: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13452: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13454: --
13455: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13456: --
13457: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13458: end if ;
13459: --
13453: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13454: --
13455: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13456: --
13457: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13458: end if ;
13459: --
13460: l_object_found_in_target := true ;
13461: --TEMPIK
13490: end if ;
13491: --
13492:
13493: l_effective_date := r_ESC.information2;
13494: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13495: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13496: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13497: end if;
13498:
13491: --
13492:
13493: l_effective_date := r_ESC.information2;
13494: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13495: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13496: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13497: end if;
13498:
13499: --if l_first_rec then
13492:
13493: l_effective_date := r_ESC.information2;
13494: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13495: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13496: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13497: end if;
13498:
13499: --if l_first_rec then
13500: if l_first_rec and not l_update then
13552: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
13553: -- Update all relevent cer records with new pk_id
13554: hr_utility.set_location('Before plsql table ',222);
13555: hr_utility.set_location('new_value id '||l_elig_stdnt_stat_cvg_id,222);
13556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC.information1 ;
13558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_STDNT_STAT_CVG_ID ;
13559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13553: -- Update all relevent cer records with new pk_id
13554: hr_utility.set_location('Before plsql table ',222);
13555: hr_utility.set_location('new_value id '||l_elig_stdnt_stat_cvg_id,222);
13556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC.information1 ;
13558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_STDNT_STAT_CVG_ID ;
13559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13561: hr_utility.set_location('After plsql table ',222);
13554: hr_utility.set_location('Before plsql table ',222);
13555: hr_utility.set_location('new_value id '||l_elig_stdnt_stat_cvg_id,222);
13556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC.information1 ;
13558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_STDNT_STAT_CVG_ID ;
13559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13561: hr_utility.set_location('After plsql table ',222);
13562: --
13555: hr_utility.set_location('new_value id '||l_elig_stdnt_stat_cvg_id,222);
13556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC.information1 ;
13558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_STDNT_STAT_CVG_ID ;
13559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13561: hr_utility.set_location('After plsql table ',222);
13562: --
13563: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
13556: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ELIG_STDNT_STAT_CVG_ID' ;
13557: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ESC.information1 ;
13558: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ELIG_STDNT_STAT_CVG_ID ;
13559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13561: hr_utility.set_location('After plsql table ',222);
13562: --
13563: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
13564: --
13559: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
13560: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ESC_unique.table_route_id;
13561: hr_utility.set_location('After plsql table ',222);
13562: --
13563: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
13564: --
13565: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13566: --
13567: else
13561: hr_utility.set_location('After plsql table ',222);
13562: --
13563: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
13564: --
13565: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13566: --
13567: else
13568: --
13569: -- Call Update routine for the pk_id created in prev run .
13679: end loop;
13680: --
13681: exception when others then
13682: --
13683: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ESC',r_ESC.information5 ) ;
13684: --
13685: end create_ESC_rows;
13686:
13687: --
13861:
13862: --
13863: l_ACTY_BASE_RT_ID := get_fk('ACTY_BASE_RT_ID', r_EIV.INFORMATION253,l_dml_operation);
13864:
13865: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
13866:
13867: -- Begin Logic for finding input values in target
13868: open c_element_type_id(r_EIV.information253,
13869: r_EIV.copy_entity_txn_id);
13875: else
13876: open c_input_value_in_target(l_element_type_id,
13877: r_EIV.information173,
13878: p_target_business_group_id,
13879: NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date));
13880: fetch c_input_value_in_target into l_INPUT_VALUE_ID;
13881: if c_input_value_in_target%notfound then
13882: l_INPUT_VALUE_ID := null;
13883: end if;
13898: l_object_found_in_target := TRUE;
13899: --
13900: if l_process_date between r_EIV_unique.information2 and r_EIV_unique.information3 then
13901: l_update := true;
13902: if r_EIV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13903: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID'
13904: then
13905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EIV_unique.information1 ;
13899: --
13900: if l_process_date between r_EIV_unique.information2 and r_EIV_unique.information3 then
13901: l_update := true;
13902: if r_EIV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13903: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID'
13904: then
13905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EIV_unique.information1 ;
13907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EIV_unique.information1 ;
13901: l_update := true;
13902: if r_EIV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13903: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID'
13904: then
13905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EIV_unique.information1 ;
13907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EIV_unique.information1 ;
13908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EIV_unique.table_route_id;
13902: if r_EIV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13903: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID'
13904: then
13905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EIV_unique.information1 ;
13907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EIV_unique.information1 ;
13908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EIV_unique.table_route_id;
13910: --
13903: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID'
13904: then
13905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EIV_unique.information1 ;
13907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EIV_unique.information1 ;
13908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EIV_unique.table_route_id;
13910: --
13911: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13904: then
13905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EIV_unique.information1 ;
13907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EIV_unique.information1 ;
13908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EIV_unique.table_route_id;
13910: --
13911: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13912: --
13905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EIV_unique.information1 ;
13907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EIV_unique.information1 ;
13908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EIV_unique.table_route_id;
13910: --
13911: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13912: --
13913: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EIV_unique.table_route_id;
13910: --
13911: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13912: --
13913: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13914: --
13915: --BEN_PD_COPY_TO_BEN_ONE.log_data('EIV',l_new_value,l_prefix || r_EIV_unique.name|| l_suffix,'REUSED');
13916: --
13917: end if ;
13911: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13912: --
13913: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13914: --
13915: --BEN_PD_COPY_TO_BEN_ONE.log_data('EIV',l_new_value,l_prefix || r_EIV_unique.name|| l_suffix,'REUSED');
13916: --
13917: end if ;
13918: hr_utility.set_location( 'found record for update',10);
13919: --
13931: p_target_business_group_id, nvl(l_extra_input_value_id, -999) ) ;
13932: fetch c_find_EIV_in_target into l_new_value ;
13933: if c_find_EIV_in_target%found then
13934: --
13935: if r_EIV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13936: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID' then
13937: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13938: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV_unique.information1 ;
13939: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13932: fetch c_find_EIV_in_target into l_new_value ;
13933: if c_find_EIV_in_target%found then
13934: --
13935: if r_EIV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13936: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID' then
13937: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13938: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV_unique.information1 ;
13939: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13940: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13933: if c_find_EIV_in_target%found then
13934: --
13935: if r_EIV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13936: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID' then
13937: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13938: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV_unique.information1 ;
13939: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13940: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13941: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
13934: --
13935: if r_EIV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13936: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID' then
13937: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13938: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV_unique.information1 ;
13939: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13940: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13941: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
13942: --
13935: if r_EIV_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
13936: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID' then
13937: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13938: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV_unique.information1 ;
13939: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13940: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13941: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
13942: --
13943: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13936: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'EXTRA_INPUT_VALUE_ID' then
13937: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13938: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV_unique.information1 ;
13939: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13940: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13941: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
13942: --
13943: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13944: --
13937: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
13938: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV_unique.information1 ;
13939: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13940: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13941: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
13942: --
13943: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13944: --
13945: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13939: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
13940: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
13941: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
13942: --
13943: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13944: --
13945: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13946: end if ;
13947: --
13941: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
13942: --
13943: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
13944: --
13945: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
13946: end if ;
13947: --
13948: l_object_found_in_target := true ;
13949: end if;
13972: end if ;
13973: --
13974:
13975: l_parent_effective_start_date := r_EIV.information10;
13976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
13977: if l_parent_effective_start_date is null then
13978: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13979: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
13980: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13974:
13975: l_parent_effective_start_date := r_EIV.information10;
13976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
13977: if l_parent_effective_start_date is null then
13978: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13979: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
13980: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13981: end if;
13982: end if;
13975: l_parent_effective_start_date := r_EIV.information10;
13976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
13977: if l_parent_effective_start_date is null then
13978: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13979: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
13980: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13981: end if;
13982: end if;
13983: --
13976: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
13977: if l_parent_effective_start_date is null then
13978: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13979: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
13980: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13981: end if;
13982: end if;
13983: --
13984: -- To avoid creating a child with out a parent
14041: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
14042: -- Update all relevent cer records with new pk_id
14043: hr_utility.set_location('Before plsql table ',222);
14044: hr_utility.set_location('new_value id '||l_extra_input_value_id,222);
14045: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
14046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV.information1 ;
14047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_EXTRA_INPUT_VALUE_ID ;
14048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
14049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
14042: -- Update all relevent cer records with new pk_id
14043: hr_utility.set_location('Before plsql table ',222);
14044: hr_utility.set_location('new_value id '||l_extra_input_value_id,222);
14045: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
14046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV.information1 ;
14047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_EXTRA_INPUT_VALUE_ID ;
14048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
14049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
14050: hr_utility.set_location('After plsql table ',222);
14043: hr_utility.set_location('Before plsql table ',222);
14044: hr_utility.set_location('new_value id '||l_extra_input_value_id,222);
14045: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
14046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV.information1 ;
14047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_EXTRA_INPUT_VALUE_ID ;
14048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
14049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
14050: hr_utility.set_location('After plsql table ',222);
14051: --
14044: hr_utility.set_location('new_value id '||l_extra_input_value_id,222);
14045: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
14046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV.information1 ;
14047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_EXTRA_INPUT_VALUE_ID ;
14048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
14049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
14050: hr_utility.set_location('After plsql table ',222);
14051: --
14052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
14045: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'EXTRA_INPUT_VALUE_ID' ;
14046: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_EIV.information1 ;
14047: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_EXTRA_INPUT_VALUE_ID ;
14048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
14049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
14050: hr_utility.set_location('After plsql table ',222);
14051: --
14052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
14053: --
14048: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
14049: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_EIV_unique.table_route_id;
14050: hr_utility.set_location('After plsql table ',222);
14051: --
14052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
14053: --
14054: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
14055: --
14056: elsif l_update then
14050: hr_utility.set_location('After plsql table ',222);
14051: --
14052: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
14053: --
14054: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
14055: --
14056: elsif l_update then
14057: --
14058: hr_utility.set_location(' BEN_EXTRA_INPUT_VALUES UPDATE_EXTRA_INPUT_VALUE ',20);
14114: end loop;
14115: --
14116: exception when others then
14117: --
14118: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EIV',r_EIV.information5 ) ;
14119: --
14120: end create_EIV_rows;
14121: --
14122: ---------------------------------------------------------------
14269: l_object_found_in_target := TRUE;
14270: --
14271: if l_process_date between r_PSQ_unique.information2 and r_PSQ_unique.information3 then
14272: l_update := true;
14273: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14274: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID'
14275: then
14276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14270: --
14271: if l_process_date between r_PSQ_unique.information2 and r_PSQ_unique.information3 then
14272: l_update := true;
14273: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14274: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID'
14275: then
14276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PSQ_unique.information1 ;
14272: l_update := true;
14273: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14274: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID'
14275: then
14276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PSQ_unique.information1 ;
14279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14280: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14273: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14274: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID'
14275: then
14276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PSQ_unique.information1 ;
14279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14280: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14281: --
14274: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID'
14275: then
14276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PSQ_unique.information1 ;
14279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14280: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14281: --
14282: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14275: then
14276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PSQ_unique.information1 ;
14279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14280: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14281: --
14282: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14283: --
14276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PSQ_unique.information1 ;
14279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14280: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14281: --
14282: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14283: --
14284: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14280: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14281: --
14282: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14283: --
14284: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14285: --
14286: --BEN_PD_COPY_TO_BEN_ONE.log_data('PSQ',l_new_value,l_prefix || r_PSQ_unique.name|| l_suffix,'REUSED');
14287: --
14288: end if ;
14282: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14283: --
14284: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14285: --
14286: --BEN_PD_COPY_TO_BEN_ONE.log_data('PSQ',l_new_value,l_prefix || r_PSQ_unique.name|| l_suffix,'REUSED');
14287: --
14288: end if ;
14289: hr_utility.set_location( 'found record for update',10);
14290: --
14302: p_target_business_group_id, nvl(l_pymt_sched_py_freq_id, -999) ) ;
14303: fetch c_find_PSQ_in_target into l_new_value ;
14304: if c_find_PSQ_in_target%found then
14305: --
14306: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14307: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID' then
14308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14309: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14303: fetch c_find_PSQ_in_target into l_new_value ;
14304: if c_find_PSQ_in_target%found then
14305: --
14306: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14307: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID' then
14308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14309: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14304: if c_find_PSQ_in_target%found then
14305: --
14306: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14307: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID' then
14308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14309: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14305: --
14306: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14307: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID' then
14308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14309: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14313: --
14306: if r_PSQ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14307: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID' then
14308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14309: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14313: --
14314: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14307: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PYMT_SCHED_PY_FREQ_ID' then
14308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14309: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14313: --
14314: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14315: --
14308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14309: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ_unique.information1 ;
14310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14313: --
14314: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14315: --
14316: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14310: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14311: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14313: --
14314: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14315: --
14316: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14317: --
14318: end if ;
14312: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14313: --
14314: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14315: --
14316: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14317: --
14318: end if ;
14319: --
14320: l_object_found_in_target := true ;
14356: hr_utility.set_location(' BEN_PYMT_SCHED_PY_FREQ CREATE_PYMT_SCHED_PY_FREQ ',20);
14357: BEN_PYMT_SCHED_PY_FREQ_API.CREATE_PYMT_SCHED_PY_FREQ(
14358: --
14359: P_VALIDATE => false
14360: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
14361: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
14362: --
14363: ,P_ACTY_RT_PYMT_SCHED_ID => l_ACTY_RT_PYMT_SCHED_ID
14364: ,P_DFLT_FLAG => r_PSQ.INFORMATION12
14401: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
14402: -- Update all relevent cer records with new pk_id
14403: hr_utility.set_location('Before plsql table ',222);
14404: hr_utility.set_location('new_value id '||l_pymt_sched_py_freq_id,222);
14405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ.information1 ;
14407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PYMT_SCHED_PY_FREQ_ID ;
14408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14402: -- Update all relevent cer records with new pk_id
14403: hr_utility.set_location('Before plsql table ',222);
14404: hr_utility.set_location('new_value id '||l_pymt_sched_py_freq_id,222);
14405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ.information1 ;
14407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PYMT_SCHED_PY_FREQ_ID ;
14408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14410: hr_utility.set_location('After plsql table ',222);
14403: hr_utility.set_location('Before plsql table ',222);
14404: hr_utility.set_location('new_value id '||l_pymt_sched_py_freq_id,222);
14405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ.information1 ;
14407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PYMT_SCHED_PY_FREQ_ID ;
14408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14410: hr_utility.set_location('After plsql table ',222);
14411: --
14404: hr_utility.set_location('new_value id '||l_pymt_sched_py_freq_id,222);
14405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ.information1 ;
14407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PYMT_SCHED_PY_FREQ_ID ;
14408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14410: hr_utility.set_location('After plsql table ',222);
14411: --
14412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14405: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PYMT_SCHED_PY_FREQ_ID' ;
14406: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PSQ.information1 ;
14407: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PYMT_SCHED_PY_FREQ_ID ;
14408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14410: hr_utility.set_location('After plsql table ',222);
14411: --
14412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14413: --
14408: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14409: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PSQ_unique.table_route_id;
14410: hr_utility.set_location('After plsql table ',222);
14411: --
14412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14413: --
14414: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14415: elsif l_update then
14416: --
14410: hr_utility.set_location('After plsql table ',222);
14411: --
14412: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14413: --
14414: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14415: elsif l_update then
14416: --
14417: hr_utility.set_location(' BEN_PYMT_SCHED_PY_FREQ UPDATE_PYMT_SCHED_PY_FREQ ',20);
14418: BEN_PYMT_SCHED_PY_FREQ_API.UPDATE_PYMT_SCHED_PY_FREQ(
14417: hr_utility.set_location(' BEN_PYMT_SCHED_PY_FREQ UPDATE_PYMT_SCHED_PY_FREQ ',20);
14418: BEN_PYMT_SCHED_PY_FREQ_API.UPDATE_PYMT_SCHED_PY_FREQ(
14419: --
14420: P_VALIDATE => false
14421: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
14422: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
14423: --
14424: ,P_ACTY_RT_PYMT_SCHED_ID => l_ACTY_RT_PYMT_SCHED_ID
14425: ,P_DFLT_FLAG => r_PSQ.INFORMATION12
14470: end loop;
14471: --
14472: exception when others then
14473: --
14474: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PSQ',R_PSQ.information5 ) ;
14475: --
14476: end create_PSQ_rows;
14477:
14478: --
14614: end if ;
14615: -- End Prefix Sufix derivation
14616: for r_APF_unique in c_unique_APF('APF') loop
14617:
14618: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14619: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14620: r_APF_unique.information3 >=
14621: ben_pd_copy_to_ben_one.g_copy_effective_date)
14622: ) then
14615: -- End Prefix Sufix derivation
14616: for r_APF_unique in c_unique_APF('APF') loop
14617:
14618: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14619: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14620: r_APF_unique.information3 >=
14621: ben_pd_copy_to_ben_one.g_copy_effective_date)
14622: ) then
14623: --
14617:
14618: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14619: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14620: r_APF_unique.information3 >=
14621: ben_pd_copy_to_ben_one.g_copy_effective_date)
14622: ) then
14623: --
14624: hr_utility.set_location(' r_APF_unique.table_route_id '||r_APF_unique.table_route_id,10);
14625: hr_utility.set_location(' r_APF_unique.information1 '||r_APF_unique.information1,10);
14653: l_object_found_in_target := TRUE;
14654: --
14655: if l_process_date between r_APF_unique.information2 and r_APF_unique.information3 then
14656: l_update := true;
14657: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID'
14659: then
14660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14654: --
14655: if l_process_date between r_APF_unique.information2 and r_APF_unique.information3 then
14656: l_update := true;
14657: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID'
14659: then
14660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APF_unique.information1 ;
14656: l_update := true;
14657: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID'
14659: then
14660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APF_unique.information1 ;
14663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14657: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID'
14659: then
14660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APF_unique.information1 ;
14663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14665: --
14658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID'
14659: then
14660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APF_unique.information1 ;
14663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14665: --
14666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14659: then
14660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APF_unique.information1 ;
14663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14665: --
14666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14667: --
14660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_APF_unique.information1 ;
14663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14665: --
14666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14667: --
14668: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14665: --
14666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14667: --
14668: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14669: --
14670: --BEN_PD_COPY_TO_BEN_ONE.log_data('APF',l_new_value,l_prefix || r_APF_unique.name|| l_suffix,'REUSED');
14671: --
14672: end if ;
14666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14667: --
14668: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14669: --
14670: --BEN_PD_COPY_TO_BEN_ONE.log_data('APF',l_new_value,l_prefix || r_APF_unique.name|| l_suffix,'REUSED');
14671: --
14672: end if ;
14673: hr_utility.set_location( 'found record for update',10);
14674: --
14686: open c_APF_min_max_dates(r_APF_unique.table_route_id, r_APF_unique.information1 ) ;
14687: fetch c_APF_min_max_dates into l_min_esd,l_max_eed ;
14688: --
14689:
14690: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14691: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14692: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14693: end if;
14694: l_min_esd := greatest(l_min_esd,r_APF_unique.information2);
14687: fetch c_APF_min_max_dates into l_min_esd,l_max_eed ;
14688: --
14689:
14690: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14691: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14692: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14693: end if;
14694: l_min_esd := greatest(l_min_esd,r_APF_unique.information2);
14695: /*open c_APF(r_APF_unique.table_route_id,
14688: --
14689:
14690: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14691: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14692: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14693: end if;
14694: l_min_esd := greatest(l_min_esd,r_APF_unique.information2);
14695: /*open c_APF(r_APF_unique.table_route_id,
14696: r_APF_unique.information1,
14716: p_from_date => l_min_esd,
14717: p_to_date => l_max_eed );
14718: if l_dt_rec_found THEN
14719: --END TEMPIK --
14720: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14721: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID' then
14722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14724: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14717: p_to_date => l_max_eed );
14718: if l_dt_rec_found THEN
14719: --END TEMPIK --
14720: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14721: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID' then
14722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14724: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14725: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14718: if l_dt_rec_found THEN
14719: --END TEMPIK --
14720: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14721: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID' then
14722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14724: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14725: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14719: --END TEMPIK --
14720: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14721: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID' then
14722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14724: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14725: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14727: --
14720: if r_APF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
14721: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID' then
14722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14724: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14725: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14727: --
14728: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14721: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_RT_PYMT_SCHED_ID' then
14722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14724: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14725: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14727: --
14728: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14729: --
14722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF_unique.information1 ;
14724: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14725: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14727: --
14728: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14729: --
14730: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14724: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14725: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14727: --
14728: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14729: --
14730: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14731: --
14732: end if ;
14726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14727: --
14728: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14729: --
14730: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14731: --
14732: end if ;
14733: --
14734: l_object_found_in_target := true ;
14763: end if ;
14764: --
14765:
14766: l_effective_date := r_APF.information2;
14767: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14768: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14769: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14770: end if;
14771:
14764: --
14765:
14766: l_effective_date := r_APF.information2;
14767: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14768: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14769: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14770: end if;
14771:
14772: --if l_first_rec then
14765:
14766: l_effective_date := r_APF.information2;
14767: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14768: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14769: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14770: end if;
14771:
14772: --if l_first_rec then
14773: if l_first_rec and not l_update then
14823: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
14824: -- Update all relevent cer records with new pk_id
14825: hr_utility.set_location('Before plsql table ',222);
14826: hr_utility.set_location('new_value id '||l_acty_rt_pymt_sched_id,222);
14827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF.information1 ;
14829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ACTY_RT_PYMT_SCHED_ID ;
14830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14824: -- Update all relevent cer records with new pk_id
14825: hr_utility.set_location('Before plsql table ',222);
14826: hr_utility.set_location('new_value id '||l_acty_rt_pymt_sched_id,222);
14827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF.information1 ;
14829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ACTY_RT_PYMT_SCHED_ID ;
14830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14832: hr_utility.set_location('After plsql table ',222);
14825: hr_utility.set_location('Before plsql table ',222);
14826: hr_utility.set_location('new_value id '||l_acty_rt_pymt_sched_id,222);
14827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF.information1 ;
14829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ACTY_RT_PYMT_SCHED_ID ;
14830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14832: hr_utility.set_location('After plsql table ',222);
14833: --
14826: hr_utility.set_location('new_value id '||l_acty_rt_pymt_sched_id,222);
14827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF.information1 ;
14829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ACTY_RT_PYMT_SCHED_ID ;
14830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14832: hr_utility.set_location('After plsql table ',222);
14833: --
14834: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14827: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_RT_PYMT_SCHED_ID' ;
14828: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_APF.information1 ;
14829: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ACTY_RT_PYMT_SCHED_ID ;
14830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14832: hr_utility.set_location('After plsql table ',222);
14833: --
14834: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14835: --
14830: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14831: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_APF_unique.table_route_id;
14832: hr_utility.set_location('After plsql table ',222);
14833: --
14834: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14835: --
14836: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14837: --
14838: else
14832: hr_utility.set_location('After plsql table ',222);
14833: --
14834: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14835: --
14836: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14837: --
14838: else
14839: --
14840: -- Call Update routine for the pk_id created in prev run .
14947: end loop;
14948: --
14949: exception when others then
14950: --
14951: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'APF',r_APF.information5 ) ;
14952: --
14953: end create_APF_rows;
14954:
14955: --
15092: end if ;
15093: -- End Prefix Sufix derivation
15094: for r_ABC_unique in c_unique_ABC('ABC') loop
15095:
15096: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15097: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15098: r_ABC_unique.information3 >=
15099: ben_pd_copy_to_ben_one.g_copy_effective_date)
15100: ) then
15093: -- End Prefix Sufix derivation
15094: for r_ABC_unique in c_unique_ABC('ABC') loop
15095:
15096: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15097: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15098: r_ABC_unique.information3 >=
15099: ben_pd_copy_to_ben_one.g_copy_effective_date)
15100: ) then
15101: --
15095:
15096: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15097: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15098: r_ABC_unique.information3 >=
15099: ben_pd_copy_to_ben_one.g_copy_effective_date)
15100: ) then
15101: --
15102: hr_utility.set_location(' r_ABC_unique.table_route_id '||r_ABC_unique.table_route_id,10);
15103: hr_utility.set_location(' r_ABC_unique.information1 '||r_ABC_unique.information1,10);
15133: l_object_found_in_target := TRUE;
15134: --
15135: if l_process_date between r_ABC_unique.information2 and r_ABC_unique.information3 then
15136: l_update := true;
15137: if r_ABC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15138: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID'
15139: then
15140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABC_unique.information1 ;
15134: --
15135: if l_process_date between r_ABC_unique.information2 and r_ABC_unique.information3 then
15136: l_update := true;
15137: if r_ABC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15138: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID'
15139: then
15140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABC_unique.information1 ;
15142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABC_unique.information1 ;
15136: l_update := true;
15137: if r_ABC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15138: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID'
15139: then
15140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABC_unique.information1 ;
15142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABC_unique.information1 ;
15143: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15144: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABC_unique.table_route_id;
15137: if r_ABC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15138: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID'
15139: then
15140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABC_unique.information1 ;
15142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABC_unique.information1 ;
15143: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15144: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABC_unique.table_route_id;
15145: --
15138: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID'
15139: then
15140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABC_unique.information1 ;
15142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABC_unique.information1 ;
15143: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15144: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABC_unique.table_route_id;
15145: --
15146: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15139: then
15140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABC_unique.information1 ;
15142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABC_unique.information1 ;
15143: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15144: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABC_unique.table_route_id;
15145: --
15146: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15147: --
15140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ABC_unique.information1 ;
15142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ABC_unique.information1 ;
15143: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15144: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABC_unique.table_route_id;
15145: --
15146: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15147: --
15148: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15144: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ABC_unique.table_route_id;
15145: --
15146: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15147: --
15148: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15149: --
15150: --BEN_PD_COPY_TO_BEN_ONE.log_data('ABC',l_new_value,l_prefix || r_ABC_unique.name|| l_suffix,'REUSED');
15151: --
15152: end if ;
15146: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15147: --
15148: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15149: --
15150: --BEN_PD_COPY_TO_BEN_ONE.log_data('ABC',l_new_value,l_prefix || r_ABC_unique.name|| l_suffix,'REUSED');
15151: --
15152: end if ;
15153: hr_utility.set_location( 'found record for update',10);
15154: --
15166: open c_ABC_min_max_dates(r_ABC_unique.table_route_id, r_ABC_unique.information1 ) ;
15167: fetch c_ABC_min_max_dates into l_min_esd,l_max_eed ;
15168: --
15169:
15170: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15171: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15172: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15173: end if;
15174: l_min_esd := greatest(l_min_esd,r_ABC_unique.information2);
15167: fetch c_ABC_min_max_dates into l_min_esd,l_max_eed ;
15168: --
15169:
15170: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15171: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15172: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15173: end if;
15174: l_min_esd := greatest(l_min_esd,r_ABC_unique.information2);
15175: /*open c_ABC(r_ABC_unique.table_route_id,
15168: --
15169:
15170: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15171: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15172: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15173: end if;
15174: l_min_esd := greatest(l_min_esd,r_ABC_unique.information2);
15175: /*open c_ABC(r_ABC_unique.table_route_id,
15176: r_ABC_unique.information1,
15197: p_from_date => l_min_esd,
15198: p_to_date => l_max_eed );
15199: if l_dt_rec_found THEN
15200: --END TEMPIK --
15201: if r_ABC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
15202: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID' then
15203: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15204: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC_unique.information1 ;
15205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
15198: p_to_date => l_max_eed );
15199: if l_dt_rec_found THEN
15200: --END TEMPIK --
15201: if r_ABC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
15202: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID' then
15203: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15204: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC_unique.information1 ;
15205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
15206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
15199: if l_dt_rec_found THEN
15200: --END TEMPIK --
15201: if r_ABC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
15202: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID' then
15203: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15204: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC_unique.information1 ;
15205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
15206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
15207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15200: --END TEMPIK --
15201: if r_ABC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
15202: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID' then
15203: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15204: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC_unique.information1 ;
15205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
15206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
15207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15208: --
15201: if r_ABC_unique.information1 <> nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).old_value, -999) or
15202: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID' then
15203: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15204: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC_unique.information1 ;
15205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
15206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
15207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15208: --
15209: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
15202: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACTY_BASE_RT_CTFN_ID' then
15203: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15204: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC_unique.information1 ;
15205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
15206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
15207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15208: --
15209: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
15210: --
15203: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15204: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC_unique.information1 ;
15205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
15206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
15207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15208: --
15209: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
15210: --
15211: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
15205: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
15206: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
15207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15208: --
15209: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
15210: --
15211: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
15212: end if ;
15213: --
15207: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15208: --
15209: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
15210: --
15211: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
15212: end if ;
15213: --
15214: l_object_found_in_target := true ;
15215: --TEMPIK
15244: end if ;
15245: --
15246:
15247: l_effective_date := r_ABC.information2;
15248: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15249: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15250: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15251: end if;
15252:
15245: --
15246:
15247: l_effective_date := r_ABC.information2;
15248: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15249: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15250: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15251: end if;
15252:
15253: --if l_first_rec then
15246:
15247: l_effective_date := r_ABC.information2;
15248: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15249: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15250: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15251: end if;
15252:
15253: --if l_first_rec then
15254: if l_first_rec and not l_update then
15304: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
15305: -- Update all relevent cer records with new pk_id
15306: hr_utility.set_location('Before plsql table ',222);
15307: hr_utility.set_location('new_value id '||l_acty_base_rt_ctfn_id,222);
15308: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15309: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC.information1 ;
15310: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_CTFN_ID ;
15311: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
15312: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15305: -- Update all relevent cer records with new pk_id
15306: hr_utility.set_location('Before plsql table ',222);
15307: hr_utility.set_location('new_value id '||l_acty_base_rt_ctfn_id,222);
15308: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15309: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC.information1 ;
15310: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_CTFN_ID ;
15311: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
15312: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15313: hr_utility.set_location('After plsql table ',222);
15306: hr_utility.set_location('Before plsql table ',222);
15307: hr_utility.set_location('new_value id '||l_acty_base_rt_ctfn_id,222);
15308: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15309: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC.information1 ;
15310: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_CTFN_ID ;
15311: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
15312: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15313: hr_utility.set_location('After plsql table ',222);
15314: --
15307: hr_utility.set_location('new_value id '||l_acty_base_rt_ctfn_id,222);
15308: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15309: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC.information1 ;
15310: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_CTFN_ID ;
15311: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
15312: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15313: hr_utility.set_location('After plsql table ',222);
15314: --
15315: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
15308: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACTY_BASE_RT_CTFN_ID' ;
15309: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ABC.information1 ;
15310: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACTY_BASE_RT_CTFN_ID ;
15311: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
15312: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15313: hr_utility.set_location('After plsql table ',222);
15314: --
15315: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
15316: --
15311: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
15312: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ABC_unique.table_route_id;
15313: hr_utility.set_location('After plsql table ',222);
15314: --
15315: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
15316: --
15317: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
15318: --
15319: else
15313: hr_utility.set_location('After plsql table ',222);
15314: --
15315: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
15316: --
15317: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
15318: --
15319: else
15320: --
15321: -- Call Update routine for the pk_id created in prev run .
15429: end loop;
15430: --
15431: exception when others then
15432: --
15433: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ABC',r_ABC.information5 ) ;
15434: --
15435: end create_ABC_rows;
15436:
15437:
15605: end if ;
15606: -- End Prefix Sufix derivation
15607: for r_PMRPV_unique in c_unique_PMRPV('PMRPV') loop
15608:
15609: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15610: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15611: r_PMRPV_unique.information3 >=
15612: ben_pd_copy_to_ben_one.g_copy_effective_date)
15613: ) then
15606: -- End Prefix Sufix derivation
15607: for r_PMRPV_unique in c_unique_PMRPV('PMRPV') loop
15608:
15609: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15610: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15611: r_PMRPV_unique.information3 >=
15612: ben_pd_copy_to_ben_one.g_copy_effective_date)
15613: ) then
15614: --
15608:
15609: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15610: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15611: r_PMRPV_unique.information3 >=
15612: ben_pd_copy_to_ben_one.g_copy_effective_date)
15613: ) then
15614: --
15615: hr_utility.set_location(' r_PMRPV_unique.table_route_id '||r_PMRPV_unique.table_route_id,10);
15616: hr_utility.set_location(' r_PMRPV_unique.information1 '||r_PMRPV_unique.information1,10);
15653: l_object_found_in_target := TRUE;
15654: --
15655: if l_process_date between r_PMRPV_unique.information2 and r_PMRPV_unique.information3 then
15656: l_update := true;
15657: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID'
15659: then
15660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15654: --
15655: if l_process_date between r_PMRPV_unique.information2 and r_PMRPV_unique.information3 then
15656: l_update := true;
15657: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID'
15659: then
15660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PMRPV_unique.information1 ;
15656: l_update := true;
15657: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID'
15659: then
15660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PMRPV_unique.information1 ;
15663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15657: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID'
15659: then
15660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PMRPV_unique.information1 ;
15663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15665: --
15658: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID'
15659: then
15660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PMRPV_unique.information1 ;
15663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15665: --
15666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15659: then
15660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PMRPV_unique.information1 ;
15663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15665: --
15666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15667: --
15660: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15661: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15662: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PMRPV_unique.information1 ;
15663: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15665: --
15666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15667: --
15668: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15664: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15665: --
15666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15667: --
15668: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15669: --
15670: --BEN_PD_COPY_TO_BEN_ONE.log_data('PMRPV',l_new_value,l_prefix || r_PMRPV_unique.name|| l_suffix,'REUSED');
15671: --
15672: end if ;
15666: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15667: --
15668: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15669: --
15670: --BEN_PD_COPY_TO_BEN_ONE.log_data('PMRPV',l_new_value,l_prefix || r_PMRPV_unique.name|| l_suffix,'REUSED');
15671: --
15672: end if ;
15673: hr_utility.set_location( 'found record for update',10);
15674: --
15686: open c_PMRPV_min_max_dates(r_PMRPV_unique.table_route_id, r_PMRPV_unique.information1 ) ;
15687: fetch c_PMRPV_min_max_dates into l_min_esd,l_max_eed ;
15688: --
15689:
15690: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15691: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15692: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15693: end if;
15694: l_min_esd := greatest(l_min_esd,r_PMRPV_unique.information2);
15687: fetch c_PMRPV_min_max_dates into l_min_esd,l_max_eed ;
15688: --
15689:
15690: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15691: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15692: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15693: end if;
15694: l_min_esd := greatest(l_min_esd,r_PMRPV_unique.information2);
15695:
15688: --
15689:
15690: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15691: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15692: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15693: end if;
15694: l_min_esd := greatest(l_min_esd,r_PMRPV_unique.information2);
15695:
15696: if p_reuse_object_flag = 'Y' then
15709: p_to_date => l_max_eed );
15710: if l_dt_rec_found THEN
15711: --END TEMPIK
15712: --
15713: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15714: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID' then
15715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15710: if l_dt_rec_found THEN
15711: --END TEMPIK
15712: --
15713: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15714: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID' then
15715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15711: --END TEMPIK
15712: --
15713: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15714: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID' then
15715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15712: --
15713: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15714: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID' then
15715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15720: --
15713: if r_PMRPV_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
15714: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID' then
15715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15720: --
15721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15714: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTL_MO_RT_PRTN_VAL_ID' then
15715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15720: --
15721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15722: --
15715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV_unique.information1 ;
15717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15720: --
15721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15722: --
15723: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15720: --
15721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15722: --
15723: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15724: end if ;
15725: --
15719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15720: --
15721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15722: --
15723: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15724: end if ;
15725: --
15726: l_object_found_in_target := true ;
15727: --TEMPIK
15756: end if ;
15757: --
15758:
15759: l_effective_date := r_PMRPV.information2;
15760: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15761: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15762: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15763: end if;
15764:
15757: --
15758:
15759: l_effective_date := r_PMRPV.information2;
15760: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15761: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15762: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15763: end if;
15764:
15765: --if l_first_rec then
15758:
15759: l_effective_date := r_PMRPV.information2;
15760: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15761: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15762: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15763: end if;
15764:
15765: --if l_first_rec then
15766: if l_first_rec and not l_update then
15828: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
15829: -- Update all relevent cer records with new pk_id
15830: hr_utility.set_location('Before plsql table ',222);
15831: hr_utility.set_location('new_value id '||l_prtl_mo_rt_prtn_val_id,222);
15832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV.information1 ;
15834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTL_MO_RT_PRTN_VAL_ID ;
15835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15829: -- Update all relevent cer records with new pk_id
15830: hr_utility.set_location('Before plsql table ',222);
15831: hr_utility.set_location('new_value id '||l_prtl_mo_rt_prtn_val_id,222);
15832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV.information1 ;
15834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTL_MO_RT_PRTN_VAL_ID ;
15835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15837: hr_utility.set_location('After plsql table ',222);
15830: hr_utility.set_location('Before plsql table ',222);
15831: hr_utility.set_location('new_value id '||l_prtl_mo_rt_prtn_val_id,222);
15832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV.information1 ;
15834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTL_MO_RT_PRTN_VAL_ID ;
15835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15837: hr_utility.set_location('After plsql table ',222);
15838: --
15831: hr_utility.set_location('new_value id '||l_prtl_mo_rt_prtn_val_id,222);
15832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV.information1 ;
15834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTL_MO_RT_PRTN_VAL_ID ;
15835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15837: hr_utility.set_location('After plsql table ',222);
15838: --
15839: -- update_cer_with_target(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTL_MO_RT_PRTN_VAL_ID' ;
15833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PMRPV.information1 ;
15834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTL_MO_RT_PRTN_VAL_ID ;
15835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15837: hr_utility.set_location('After plsql table ',222);
15838: --
15839: -- update_cer_with_target(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15840: --
15835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PMRPV_unique.table_route_id;
15837: hr_utility.set_location('After plsql table ',222);
15838: --
15839: -- update_cer_with_target(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15840: --
15841: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15842: --
15843: else
15837: hr_utility.set_location('After plsql table ',222);
15838: --
15839: -- update_cer_with_target(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15840: --
15841: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15842: --
15843: else
15844: --
15845: -- Call Update routine for the pk_id created in prev run .
16103: end if ;
16104: -- End Prefix Sufix derivation
16105: for r_VEP_unique in c_unique_VEP('VEP') loop
16106:
16107: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16108: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16109: r_VEP_unique.information3 >=
16110: ben_pd_copy_to_ben_one.g_copy_effective_date)
16111: ) then
16104: -- End Prefix Sufix derivation
16105: for r_VEP_unique in c_unique_VEP('VEP') loop
16106:
16107: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16108: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16109: r_VEP_unique.information3 >=
16110: ben_pd_copy_to_ben_one.g_copy_effective_date)
16111: ) then
16112: --
16106:
16107: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16108: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16109: r_VEP_unique.information3 >=
16110: ben_pd_copy_to_ben_one.g_copy_effective_date)
16111: ) then
16112: --
16113: hr_utility.set_location(' r_VEP_unique.table_route_id '||r_VEP_unique.table_route_id,10);
16114: hr_utility.set_location(' r_VEP_unique.information1 '||r_VEP_unique.information1,10);
16142: l_object_found_in_target := TRUE;
16143: --
16144: if l_process_date between r_VEP_unique.information2 and r_VEP_unique.information3 then
16145: l_update := true;
16146: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
16147: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID'
16148: then
16149: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16143: --
16144: if l_process_date between r_VEP_unique.information2 and r_VEP_unique.information3 then
16145: l_update := true;
16146: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
16147: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID'
16148: then
16149: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VEP_unique.information1 ;
16145: l_update := true;
16146: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
16147: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID'
16148: then
16149: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VEP_unique.information1 ;
16152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16146: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
16147: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID'
16148: then
16149: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VEP_unique.information1 ;
16152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16154: --
16147: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID'
16148: then
16149: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VEP_unique.information1 ;
16152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16154: --
16155: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16148: then
16149: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VEP_unique.information1 ;
16152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16154: --
16155: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16156: --
16149: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16150: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16151: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VEP_unique.information1 ;
16152: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16154: --
16155: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16156: --
16157: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16153: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16154: --
16155: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16156: --
16157: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16158: --
16159: --BEN_PD_COPY_TO_BEN_ONE.log_data('VEP',l_new_value,l_prefix || r_VEP_unique.name|| l_suffix,'REUSED');
16160: --
16161: end if ;
16155: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16156: --
16157: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16158: --
16159: --BEN_PD_COPY_TO_BEN_ONE.log_data('VEP',l_new_value,l_prefix || r_VEP_unique.name|| l_suffix,'REUSED');
16160: --
16161: end if ;
16162: hr_utility.set_location( 'found record for update',10);
16163: --
16175: open c_VEP_min_max_dates(r_VEP_unique.table_route_id, r_VEP_unique.information1 ) ;
16176: fetch c_VEP_min_max_dates into l_min_esd,l_max_eed ;
16177: --
16178:
16179: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16180: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16181: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16182: end if;
16183: l_min_esd := greatest(l_min_esd,r_VEP_unique.information2);
16176: fetch c_VEP_min_max_dates into l_min_esd,l_max_eed ;
16177: --
16178:
16179: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16180: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16181: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16182: end if;
16183: l_min_esd := greatest(l_min_esd,r_VEP_unique.information2);
16184: /*open c_VEP(r_VEP_unique.table_route_id,
16177: --
16178:
16179: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16180: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16181: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16182: end if;
16183: l_min_esd := greatest(l_min_esd,r_VEP_unique.information2);
16184: /*open c_VEP(r_VEP_unique.table_route_id,
16185: r_VEP_unique.information1,
16205: p_from_date => l_min_esd,
16206: p_to_date => l_max_eed );
16207: if l_dt_rec_found THEN
16208: --END TEMPIK --
16209: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16210: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID' then
16211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16206: p_to_date => l_max_eed );
16207: if l_dt_rec_found THEN
16208: --END TEMPIK --
16209: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16210: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID' then
16211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16207: if l_dt_rec_found THEN
16208: --END TEMPIK --
16209: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16210: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID' then
16211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16208: --END TEMPIK --
16209: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16210: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID' then
16211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16216: --
16209: if r_VEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999) or
16210: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID' then
16211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16216: --
16217: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16210: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VRBL_RT_ELIG_PRFL_ID' then
16211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16216: --
16217: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16218: --
16211: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP_unique.information1 ;
16213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16216: --
16217: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16218: --
16219: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16216: --
16217: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16218: --
16219: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16220: end if ;
16221: --
16215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16216: --
16217: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16218: --
16219: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16220: end if ;
16221: --
16222: l_object_found_in_target := true ;
16223: --TEMPIK
16251: end if ;
16252: --
16253:
16254: l_effective_date := r_VEP.information2;
16255: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16256: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16257: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16258: end if;
16259:
16252: --
16253:
16254: l_effective_date := r_VEP.information2;
16255: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16256: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16257: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16258: end if;
16259:
16260: --if l_first_rec then
16253:
16254: l_effective_date := r_VEP.information2;
16255: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16256: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16257: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16258: end if;
16259:
16260: --if l_first_rec then
16261: if l_first_rec and not l_update then
16310: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
16311: -- Update all relevent cer records with new pk_id
16312: hr_utility.set_location('Before plsql table ',222);
16313: hr_utility.set_location('new_value id '||l_vrbl_rt_elig_prfl_id,222);
16314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP.information1 ;
16316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VRBL_RT_ELIG_PRFL_ID ;
16317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16311: -- Update all relevent cer records with new pk_id
16312: hr_utility.set_location('Before plsql table ',222);
16313: hr_utility.set_location('new_value id '||l_vrbl_rt_elig_prfl_id,222);
16314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP.information1 ;
16316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VRBL_RT_ELIG_PRFL_ID ;
16317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16319: hr_utility.set_location('After plsql table ',222);
16312: hr_utility.set_location('Before plsql table ',222);
16313: hr_utility.set_location('new_value id '||l_vrbl_rt_elig_prfl_id,222);
16314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP.information1 ;
16316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VRBL_RT_ELIG_PRFL_ID ;
16317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16319: hr_utility.set_location('After plsql table ',222);
16320: --
16313: hr_utility.set_location('new_value id '||l_vrbl_rt_elig_prfl_id,222);
16314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP.information1 ;
16316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VRBL_RT_ELIG_PRFL_ID ;
16317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16319: hr_utility.set_location('After plsql table ',222);
16320: --
16321: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16314: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VRBL_RT_ELIG_PRFL_ID' ;
16315: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VEP.information1 ;
16316: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VRBL_RT_ELIG_PRFL_ID ;
16317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16319: hr_utility.set_location('After plsql table ',222);
16320: --
16321: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16322: --
16317: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VEP_unique.table_route_id;
16319: hr_utility.set_location('After plsql table ',222);
16320: --
16321: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16322: --
16323: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16324: --
16325: else
16319: hr_utility.set_location('After plsql table ',222);
16320: --
16321: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16322: --
16323: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16324: --
16325: else
16326: --
16327: -- Call Update routine for the pk_id created in prev run .
16435: end loop;
16436: --
16437: exception when others then
16438: --
16439: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'VEP',r_vep.information5 );
16440: --
16441: end create_VEP_rows;
16442:
16443: procedure create_rate_rows
16454: --
16455: --dbms_output.put_line(' Start of create_rate_rows ') ;
16456: /* TEMP COMMENT Communication Types
16457: --
16458: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CTU') then
16459: BEN_PD_COPY_TO_BEN_five.create_CTU_rows
16460: (p_validate => p_validate
16461: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16462: ,p_effective_date => p_effective_date
16467: end if;
16468: --
16469:
16470: --
16471: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CTT') then
16472: BEN_PD_COPY_TO_BEN_five.create_CTT_rows
16473: (p_validate => p_validate
16474: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16475: ,p_effective_date => p_effective_date
16480: end if;
16481: --
16482:
16483: --
16484: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CMT') then
16485: BEN_PD_COPY_TO_BEN_five.create_CMT_rows
16486: (p_validate => p_validate
16487: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16488: ,p_effective_date => p_effective_date
16493: end if;
16494: --
16495:
16496: --
16497: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CMD') then
16498: BEN_PD_COPY_TO_BEN_five.create_CMD_rows
16499: (p_validate => p_validate
16500: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16501: ,p_effective_date => p_effective_date
16507: --
16508: */
16509: -- Bug 2695254 Moved to be in CCM,APR and ABR Order
16510: --
16511: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CCM') then
16512: BEN_PD_COPY_TO_BEN_five.create_CCM_rows
16513: (p_validate => p_validate
16514: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16515: ,p_effective_date => p_effective_date
16518: ,p_target_business_group_id => p_target_business_group_id
16519: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16520: end if;
16521: --
16522: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('APR') then
16523: BEN_PD_COPY_TO_BEN_five.create_APR_rows
16524: (p_validate => p_validate
16525: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16526: ,p_effective_date => p_effective_date
16531: end if;
16532: --
16533: build_abr_hierarchy ( p_copy_entity_txn_id );
16534: --
16535: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ABR') then
16536: BEN_PD_COPY_TO_BEN_five.create_ABR_rows
16537: (p_validate => p_validate
16538: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16539: ,p_effective_date => p_effective_date
16543: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16544: end if;
16545: --
16546: --
16547: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EIV') then
16548: BEN_PD_COPY_TO_BEN_five.create_EIV_rows
16549: (p_validate => p_validate
16550: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16551: ,p_effective_date => p_effective_date
16555: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16556: end if;
16557: --
16558: --
16559: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('APF') then
16560: BEN_PD_COPY_TO_BEN_five.create_APF_rows
16561: (p_validate => p_validate
16562: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16563: ,p_effective_date => p_effective_date
16567: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16568: end if;
16569: --
16570: --
16571: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PSQ') then
16572: BEN_PD_COPY_TO_BEN_five.create_PSQ_rows
16573: (p_validate => p_validate
16574: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16575: ,p_effective_date => p_effective_date
16579: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16580: end if;
16581: --
16582: --
16583: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ABC') then
16584: BEN_PD_COPY_TO_BEN_five.create_ABC_rows
16585: (p_validate => p_validate
16586: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16587: ,p_effective_date => p_effective_date
16592: end if;
16593: --
16594:
16595: --
16596: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('MTR') then
16597: BEN_PD_COPY_TO_BEN_five.create_MTR_rows
16598: (p_validate => p_validate
16599: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16600: ,p_effective_date => p_effective_date
16605: end if;
16606: --
16607:
16608: --
16609: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('APL1') then
16610: BEN_PD_COPY_TO_BEN_five.create_APL1_rows
16611: (p_validate => p_validate
16612: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16613: ,p_effective_date => p_effective_date
16617: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16618: end if;
16619: --
16620: --
16621: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('VPF') then
16622: BEN_PD_COPY_TO_BEN_five.create_VPF_rows
16623: (p_validate => p_validate
16624: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16625: ,p_effective_date => p_effective_date
16629: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16630: end if;
16631: --
16632: --
16633: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('AVR') then
16634: BEN_PD_COPY_TO_BEN_five.create_AVR_rows
16635: (p_validate => p_validate
16636: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16637: ,p_effective_date => p_effective_date
16644: --
16645: -- Create Partial Month Proration
16646: -- (To be called after creating ABR, APR and CCM)
16647: --
16648: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PMRPV') then
16649: BEN_PD_COPY_TO_BEN_five.create_PMRPV_rows
16650: (p_validate => p_validate
16651: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16652: ,p_effective_date => p_effective_date
16657: end if;
16658: --
16659:
16660: --
16661: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('BVR1') then
16662: BEN_PD_COPY_TO_BEN_five.create_BVR1_rows
16663: (p_validate => p_validate
16664: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16665: ,p_effective_date => p_effective_date
16670: end if;
16671: --
16672:
16673: --
16674: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('BRR') then
16675: BEN_PD_COPY_TO_BEN_five.create_BRR_rows
16676: (p_validate => p_validate
16677: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16678: ,p_effective_date => p_effective_date
16683: end if;
16684: --
16685:
16686: --
16687: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('APV') then
16688: BEN_PD_COPY_TO_BEN_five.create_APV_rows
16689: (p_validate => p_validate
16690: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16691: ,p_effective_date => p_effective_date
16696: end if;
16697: --
16698:
16699: --
16700: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('AVA') then
16701: BEN_PD_COPY_TO_BEN_five.create_AVA_rows
16702: (p_validate => p_validate
16703: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16704: ,p_effective_date => p_effective_date
16709: end if;
16710: --
16711:
16712: --
16713: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('DCR') then
16714: BEN_PD_COPY_TO_BEN_five.create_DCR_rows
16715: (p_validate => p_validate
16716: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16717: ,p_effective_date => p_effective_date
16722: end if;
16723: --
16724:
16725: --
16726: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('DEC') then
16727: BEN_PD_COPY_TO_BEN_five.create_DEC_rows
16728: (p_validate => p_validate
16729: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16730: ,p_effective_date => p_effective_date
16735: end if;
16736: --
16737:
16738: --
16739: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EAC') then
16740: BEN_PD_COPY_TO_BEN_five.create_EAC_rows
16741: (p_validate => p_validate
16742: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16743: ,p_effective_date => p_effective_date
16748: end if;
16749: --
16750:
16751: --
16752: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EDC') then
16753: BEN_PD_COPY_TO_BEN_five.create_EDC_rows
16754: (p_validate => p_validate
16755: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16756: ,p_effective_date => p_effective_date
16761: end if;
16762: --
16763:
16764: --
16765: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EMC') then
16766: BEN_PD_COPY_TO_BEN_five.create_EMC_rows
16767: (p_validate => p_validate
16768: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16769: ,p_effective_date => p_effective_date
16774: end if;
16775: --
16776:
16777: --
16778: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EMS') then
16779: BEN_PD_COPY_TO_BEN_five.create_EMS_rows
16780: (p_validate => p_validate
16781: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16782: ,p_effective_date => p_effective_date
16787: end if;
16788: --
16789:
16790: --
16791: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPL') then
16792: BEN_PD_COPY_TO_BEN_five.create_EPL_rows
16793: (p_validate => p_validate
16794: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16795: ,p_effective_date => p_effective_date
16799: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16800: end if;
16801: --
16802: --
16803: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ESC') then
16804: BEN_PD_COPY_TO_BEN_five.create_ESC_rows
16805: (p_validate => p_validate
16806: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16807: ,p_effective_date => p_effective_date
16810: ,p_target_business_group_id => p_target_business_group_id
16811: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16812: end if;
16813:
16814: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('VEP') then
16815: BEN_PD_COPY_TO_BEN_five.create_VEP_rows
16816: (p_validate => p_validate
16817: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16818: ,p_effective_date => p_effective_date
16827:
16828: --
16829: -- Foll. Criteria to be copied only in Create Plan Wizard flow
16830: --
16831: if BEN_PD_COPY_TO_BEN_ONE.g_transaction_category = 'BEN_PDCRWZ' then
16832:
16833: --
16834: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ABP') then
16835: BEN_PD_COPY_TO_BEN_five.create_ABP_rows
16830: --
16831: if BEN_PD_COPY_TO_BEN_ONE.g_transaction_category = 'BEN_PDCRWZ' then
16832:
16833: --
16834: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ABP') then
16835: BEN_PD_COPY_TO_BEN_five.create_ABP_rows
16836: (p_validate => p_validate
16837: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16838: ,p_effective_date => p_effective_date
16842: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16843: end if;
16844: --
16845: --
16846: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('BPR1') then
16847: BEN_PD_COPY_TO_BEN_five.create_BPR_rows
16848: (p_validate => p_validate
16849: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16850: ,p_effective_date => p_effective_date
16854: ,p_prefix_suffix_cd => p_prefix_suffix_cd);
16855: end if;
16856: --
16857: --
16858: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('DPC') then
16859: BEN_PD_COPY_TO_BEN_five.create_DPC_rows
16860: (p_validate => p_validate
16861: ,p_copy_entity_txn_id => p_copy_entity_txn_id
16862: ,p_effective_date => p_effective_date