138: --
139: else
140: */
141: --
142: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
143: if l_counter > 0 and p_old_val is not null then
144: for i in 1..l_counter loop
145: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
146: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
141: --
142: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
143: if l_counter > 0 and p_old_val is not null then
144: for i in 1..l_counter loop
145: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
146: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
147: then
148: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
149: exit;
142: l_counter := nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.LAST, 0);
143: if l_counter > 0 and p_old_val is not null then
144: for i in 1..l_counter loop
145: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
146: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
147: then
148: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
149: exit;
150: end if;
144: for i in 1..l_counter loop
145: if BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).pk_id_column = p_col_name and
146: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).old_value = p_old_val
147: then
148: l_ret_id := BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(i).new_value;
149: exit;
150: end if;
151: end loop;
152: end if;
159: end;
160: --
161: -- Private procedure to update the cer with target details
162: --
163: 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
164: begin
165: hr_utility.set_location('Inside update_cer_with_target ',233);
166: update ben_copy_entity_results
167: set information9 = c_pk_rec.copy_reuse_type||'-'||c_pk_rec.new_value
188: null ;
189: open c_cet ;
190: fetch c_cet into l_dummy ;
191: if c_cet%found then
192: BEN_PD_COPY_TO_BEN_ONE.g_mapping_done := false ;
193: else
194: BEN_PD_COPY_TO_BEN_ONE.g_mapping_done := true ;
195: end if;
196: close c_cet ;
190: fetch c_cet into l_dummy ;
191: if c_cet%found then
192: BEN_PD_COPY_TO_BEN_ONE.g_mapping_done := false ;
193: else
194: BEN_PD_COPY_TO_BEN_ONE.g_mapping_done := true ;
195: end if;
196: close c_cet ;
197: end set_mapping ;
198:
338: end if ;
339: -- End Prefix Sufix derivation
340: for r_PRB_unique in c_unique_PRB('PRB') loop
341:
342: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
343: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
344: r_PRB_unique.information3 >=
345: ben_pd_copy_to_ben_one.g_copy_effective_date)
346: ) then
339: -- End Prefix Sufix derivation
340: for r_PRB_unique in c_unique_PRB('PRB') loop
341:
342: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
343: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
344: r_PRB_unique.information3 >=
345: ben_pd_copy_to_ben_one.g_copy_effective_date)
346: ) then
347: --
341:
342: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
343: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
344: r_PRB_unique.information3 >=
345: ben_pd_copy_to_ben_one.g_copy_effective_date)
346: ) then
347: --
348: hr_utility.set_location(' r_PRB_unique.table_route_id '||r_PRB_unique.table_route_id,10);
349: hr_utility.set_location(' r_PRB_unique.information1 '||r_PRB_unique.information1,10);
378: l_object_found_in_target := TRUE;
379: --
380: if l_process_date between r_PRB_unique.information2 and r_PRB_unique.information3 then
381: l_update := true;
382: if r_PRB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
383: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID'
384: then
385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
379: --
380: if l_process_date between r_PRB_unique.information2 and r_PRB_unique.information3 then
381: l_update := true;
382: if r_PRB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
383: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID'
384: then
385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRB_unique.information1 ;
381: l_update := true;
382: if r_PRB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
383: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID'
384: then
385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRB_unique.information1 ;
388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
382: if r_PRB_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
383: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID'
384: then
385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRB_unique.information1 ;
388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
390: --
383: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID'
384: then
385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRB_unique.information1 ;
388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
390: --
391: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
384: then
385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRB_unique.information1 ;
388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
390: --
391: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
392: --
385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRB_unique.information1 ;
388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
390: --
391: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
392: --
393: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
389: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
390: --
391: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
392: --
393: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
394: --
395: --DOUBT log_data('PRB',l_new_value,l_prefix || r_PRB_unique.name|| l_suffix,'REUSED');
396: --
397: end if ;
410: open c_PRB_min_max_dates(r_PRB_unique.table_route_id, r_PRB_unique.information1 ) ;
411: fetch c_PRB_min_max_dates into l_min_esd,l_max_eed ;
412: --
413:
414: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
415: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
416: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
417: end if;
418: l_min_esd := greatest(l_min_esd,r_PRB_unique.information2);
411: fetch c_PRB_min_max_dates into l_min_esd,l_max_eed ;
412: --
413:
414: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
415: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
416: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
417: end if;
418: l_min_esd := greatest(l_min_esd,r_PRB_unique.information2);
419:
412: --
413:
414: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
415: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
416: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
417: end if;
418: l_min_esd := greatest(l_min_esd,r_PRB_unique.information2);
419:
420: --
439: p_from_date => l_min_esd,
440: p_to_date => l_max_eed );
441: if l_dt_rec_found THEN
442: --END TEMPIK
443: if r_PRB_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
444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID' then
445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
440: p_to_date => l_max_eed );
441: if l_dt_rec_found THEN
442: --END TEMPIK
443: if r_PRB_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
444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID' then
445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
441: if l_dt_rec_found THEN
442: --END TEMPIK
443: if r_PRB_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
444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID' then
445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
442: --END TEMPIK
443: if r_PRB_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
444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID' then
445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
450: --
443: if r_PRB_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
444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID' then
445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
450: --
451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
444: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_BOD_ID' then
445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
450: --
451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
452: --
445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB_unique.information1 ;
447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
450: --
451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
452: --
453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
448: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
450: --
451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
452: --
453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
454: end if ;
455: --
449: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
450: --
451: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
452: --
453: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
454: end if ;
455: --
456: l_object_found_in_target := true ;
457: --TEMPIK
484: end if ;
485: --
486:
487: l_effective_date := r_PRB.information2;
488: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
489: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
490: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
491: end if;
492:
485: --
486:
487: l_effective_date := r_PRB.information2;
488: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
489: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
490: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
491: end if;
492:
493: if l_first_rec and not l_update then
486:
487: l_effective_date := r_PRB.information2;
488: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
489: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
490: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
491: end if;
492:
493: if l_first_rec and not l_update then
494: -- Call Create routine.
545: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
546: -- Update all relevent cer records with new pk_id
547: hr_utility.set_location('Before plsql table ',222);
548: hr_utility.set_location('new_value id '||l_pl_regy_bod_id,222);
549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB.information1 ;
551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_BOD_ID ;
552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
546: -- Update all relevent cer records with new pk_id
547: hr_utility.set_location('Before plsql table ',222);
548: hr_utility.set_location('new_value id '||l_pl_regy_bod_id,222);
549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB.information1 ;
551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_BOD_ID ;
552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
554: hr_utility.set_location('After plsql table ',222);
547: hr_utility.set_location('Before plsql table ',222);
548: hr_utility.set_location('new_value id '||l_pl_regy_bod_id,222);
549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB.information1 ;
551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_BOD_ID ;
552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
554: hr_utility.set_location('After plsql table ',222);
555: --
548: hr_utility.set_location('new_value id '||l_pl_regy_bod_id,222);
549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB.information1 ;
551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_BOD_ID ;
552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
554: hr_utility.set_location('After plsql table ',222);
555: --
556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_BOD_ID' ;
550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRB.information1 ;
551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_BOD_ID ;
552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
554: hr_utility.set_location('After plsql table ',222);
555: --
556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
557: --
552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRB_unique.table_route_id;
554: hr_utility.set_location('After plsql table ',222);
555: --
556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
557: --
558: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
559: --
560: else
554: hr_utility.set_location('After plsql table ',222);
555: --
556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
557: --
558: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
559: --
560: else
561: --
562: -- Call Update routine for the pk_id created in prev run .
675: end loop;
676: --
677: exception when others then
678: --
679: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PRB',r_prb.information5 );
680: --
681: end create_PRB_rows;
682:
683: --
817: end if ;
818: -- End Prefix Sufix derivation
819: for r_SAZ_unique in c_unique_SAZ('SAZ') loop
820:
821: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
822: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
823: r_SAZ_unique.information3 >=
824: ben_pd_copy_to_ben_one.g_copy_effective_date)
825: ) then
818: -- End Prefix Sufix derivation
819: for r_SAZ_unique in c_unique_SAZ('SAZ') loop
820:
821: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
822: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
823: r_SAZ_unique.information3 >=
824: ben_pd_copy_to_ben_one.g_copy_effective_date)
825: ) then
826: --
820:
821: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
822: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
823: r_SAZ_unique.information3 >=
824: ben_pd_copy_to_ben_one.g_copy_effective_date)
825: ) then
826: --
827: hr_utility.set_location(' r_SAZ_unique.table_route_id '||r_SAZ_unique.table_route_id,10);
828: hr_utility.set_location(' r_SAZ_unique.information1 '||r_SAZ_unique.information1,10);
855: l_object_found_in_target := TRUE;
856: --
857: if l_process_date between r_SAZ_unique.information2 and r_SAZ_unique.information3 then
858: l_update := true;
859: if r_SAZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
860: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID'
861: then
862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
856: --
857: if l_process_date between r_SAZ_unique.information2 and r_SAZ_unique.information3 then
858: l_update := true;
859: if r_SAZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
860: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID'
861: then
862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SAZ_unique.information1 ;
858: l_update := true;
859: if r_SAZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
860: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID'
861: then
862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SAZ_unique.information1 ;
865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
866: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
859: if r_SAZ_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
860: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID'
861: then
862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SAZ_unique.information1 ;
865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
866: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
867: --
860: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID'
861: then
862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SAZ_unique.information1 ;
865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
866: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
867: --
868: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
861: then
862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SAZ_unique.information1 ;
865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
866: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
867: --
868: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
869: --
862: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
863: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
864: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SAZ_unique.information1 ;
865: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
866: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
867: --
868: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
869: --
870: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
866: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
867: --
868: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
869: --
870: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
871: --
872: --DOUBT log_data('SAZ',l_new_value,l_prefix || r_SAZ_unique.name|| l_suffix,'REUSED');
873: --
874: end if ;
887: open c_SAZ_min_max_dates(r_SAZ_unique.table_route_id, r_SAZ_unique.information1 ) ;
888: fetch c_SAZ_min_max_dates into l_min_esd,l_max_eed ;
889: --
890:
891: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
892: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
893: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
894: end if;
895: l_min_esd := greatest(l_min_esd,r_SAZ_unique.information2);
888: fetch c_SAZ_min_max_dates into l_min_esd,l_max_eed ;
889: --
890:
891: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
892: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
893: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
894: end if;
895: l_min_esd := greatest(l_min_esd,r_SAZ_unique.information2);
896:
889: --
890:
891: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
892: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
893: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
894: end if;
895: l_min_esd := greatest(l_min_esd,r_SAZ_unique.information2);
896:
897: --
911: p_from_date => l_min_esd,
912: p_to_date => l_max_eed );
913: if l_dt_rec_found THEN
914: --END TEMPIK
915: if r_SAZ_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
916: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID' then
917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
912: p_to_date => l_max_eed );
913: if l_dt_rec_found THEN
914: --END TEMPIK
915: if r_SAZ_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
916: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID' then
917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
913: if l_dt_rec_found THEN
914: --END TEMPIK
915: if r_SAZ_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
916: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID' then
917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
921: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
914: --END TEMPIK
915: if r_SAZ_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
916: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID' then
917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
921: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
922: --
915: if r_SAZ_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
916: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID' then
917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
921: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
922: --
923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
916: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SVC_AREA_PSTL_ZIP_RNG_ID' then
917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
921: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
922: --
923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
924: --
917: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
918: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ_unique.information1 ;
919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
921: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
922: --
923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
924: --
925: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
919: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
920: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
921: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
922: --
923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
924: --
925: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
926: end if ;
927: --
921: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
922: --
923: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
924: --
925: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
926: end if ;
927: --
928: l_object_found_in_target := true ;
929: --TEMPIK
957: end if ;
958: --
959:
960: l_effective_date := r_SAZ.information2;
961: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
962: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
963: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
964: end if;
965:
958: --
959:
960: l_effective_date := r_SAZ.information2;
961: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
962: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
963: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
964: end if;
965:
966: if l_first_rec and not l_update then
959:
960: l_effective_date := r_SAZ.information2;
961: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
962: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
963: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
964: end if;
965:
966: if l_first_rec and not l_update then
967: -- Call Create routine.
1014: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
1015: -- Update all relevent cer records with new pk_id
1016: hr_utility.set_location('Before plsql table ',222);
1017: hr_utility.set_location('new_value id '||l_svc_area_pstl_zip_rng_id,222);
1018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
1019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ.information1 ;
1020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SVC_AREA_PSTL_ZIP_RNG_ID ;
1021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
1015: -- Update all relevent cer records with new pk_id
1016: hr_utility.set_location('Before plsql table ',222);
1017: hr_utility.set_location('new_value id '||l_svc_area_pstl_zip_rng_id,222);
1018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
1019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ.information1 ;
1020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SVC_AREA_PSTL_ZIP_RNG_ID ;
1021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
1023: hr_utility.set_location('After plsql table ',222);
1016: hr_utility.set_location('Before plsql table ',222);
1017: hr_utility.set_location('new_value id '||l_svc_area_pstl_zip_rng_id,222);
1018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
1019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ.information1 ;
1020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SVC_AREA_PSTL_ZIP_RNG_ID ;
1021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
1023: hr_utility.set_location('After plsql table ',222);
1024: --
1017: hr_utility.set_location('new_value id '||l_svc_area_pstl_zip_rng_id,222);
1018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
1019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ.information1 ;
1020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SVC_AREA_PSTL_ZIP_RNG_ID ;
1021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
1023: hr_utility.set_location('After plsql table ',222);
1024: --
1025: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SVC_AREA_PSTL_ZIP_RNG_ID' ;
1019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SAZ.information1 ;
1020: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SVC_AREA_PSTL_ZIP_RNG_ID ;
1021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
1023: hr_utility.set_location('After plsql table ',222);
1024: --
1025: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1026: --
1021: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SAZ_unique.table_route_id;
1023: hr_utility.set_location('After plsql table ',222);
1024: --
1025: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1026: --
1027: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1028: --
1029: else
1023: hr_utility.set_location('After plsql table ',222);
1024: --
1025: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1026: --
1027: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1028: --
1029: else
1030: --
1031: -- Call Update routine for the pk_id created in prev run .
1136: end loop;
1137: --
1138: exception when others then
1139: --
1140: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'SAZ',r_saz.information5 );
1141: --
1142: end create_SAZ_rows;
1143: ---------------------------------------------------------------
1144: ----------------------< create_PCX_rows >-----------------------
1285: end if ;
1286: -- End Prefix Sufix derivation
1287: for r_PCX_unique in c_unique_PCX('PCX') loop
1288:
1289: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1290: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1291: r_PCX_unique.information3 >=
1292: ben_pd_copy_to_ben_one.g_copy_effective_date)
1293: ) then
1286: -- End Prefix Sufix derivation
1287: for r_PCX_unique in c_unique_PCX('PCX') loop
1288:
1289: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1290: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1291: r_PCX_unique.information3 >=
1292: ben_pd_copy_to_ben_one.g_copy_effective_date)
1293: ) then
1294: --
1288:
1289: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1290: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1291: r_PCX_unique.information3 >=
1292: ben_pd_copy_to_ben_one.g_copy_effective_date)
1293: ) then
1294: --
1295: hr_utility.set_location(' r_PCX_unique.table_route_id '||r_PCX_unique.table_route_id,10);
1296: hr_utility.set_location(' r_PCX_unique.information1 '||r_PCX_unique.information1,10);
1324: l_object_found_in_target := TRUE;
1325: --
1326: if l_process_date between r_PCX_unique.information2 and r_PCX_unique.information3 then
1327: l_update := true;
1328: if r_PCX_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1329: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID'
1330: then
1331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1325: --
1326: if l_process_date between r_PCX_unique.information2 and r_PCX_unique.information3 then
1327: l_update := true;
1328: if r_PCX_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1329: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID'
1330: then
1331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCX_unique.information1 ;
1327: l_update := true;
1328: if r_PCX_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1329: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID'
1330: then
1331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCX_unique.information1 ;
1334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1328: if r_PCX_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1329: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID'
1330: then
1331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCX_unique.information1 ;
1334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1336: --
1329: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID'
1330: then
1331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCX_unique.information1 ;
1334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1336: --
1337: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1330: then
1331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCX_unique.information1 ;
1334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1336: --
1337: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1338: --
1331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCX_unique.information1 ;
1334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1336: --
1337: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1338: --
1339: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1336: --
1337: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1338: --
1339: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1340: --
1341: -- log_data('PCX',l_new_value,l_prefix || r_PCX_unique.name|| l_suffix,'REUSED');
1342: --
1343: end if ;
1356: l_max_eed := null ;
1357: open c_PCX_min_max_dates(r_PCX_unique.table_route_id, r_PCX_unique.information1 ) ;
1358: fetch c_PCX_min_max_dates into l_min_esd,l_max_eed ;
1359:
1360: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1361: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1362: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1363: end if;
1364: l_min_esd := greatest(l_min_esd,r_PCX_unique.information2);
1357: open c_PCX_min_max_dates(r_PCX_unique.table_route_id, r_PCX_unique.information1 ) ;
1358: fetch c_PCX_min_max_dates into l_min_esd,l_max_eed ;
1359:
1360: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1361: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1362: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1363: end if;
1364: l_min_esd := greatest(l_min_esd,r_PCX_unique.information2);
1365:
1358: fetch c_PCX_min_max_dates into l_min_esd,l_max_eed ;
1359:
1360: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1361: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1362: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1363: end if;
1364: l_min_esd := greatest(l_min_esd,r_PCX_unique.information2);
1365:
1366: --
1384: p_from_date => l_min_esd,
1385: p_to_date => l_max_eed );
1386: if l_dt_rec_found THEN
1387: --END TEMPIK
1388: if r_PCX_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
1389: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID' then
1390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1385: p_to_date => l_max_eed );
1386: if l_dt_rec_found THEN
1387: --END TEMPIK
1388: if r_PCX_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
1389: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID' then
1390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1386: if l_dt_rec_found THEN
1387: --END TEMPIK
1388: if r_PCX_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
1389: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID' then
1390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1387: --END TEMPIK
1388: if r_PCX_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
1389: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID' then
1390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1395: --
1388: if r_PCX_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
1389: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID' then
1390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1395: --
1396: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1389: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_BNF_CTFN_ID' then
1390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1395: --
1396: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1397: --
1390: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1391: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX_unique.information1 ;
1392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1395: --
1396: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1397: --
1398: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1392: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1393: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1395: --
1396: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1397: --
1398: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1399: end if ;
1400: --
1394: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1395: --
1396: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1397: --
1398: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1399: end if ;
1400: --
1401: l_object_found_in_target := true ;
1402: --TEMPIK
1431: end if ;
1432: --
1433:
1434: l_effective_date := r_PCX.information2;
1435: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1436: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1437: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1438: end if;
1439:
1432: --
1433:
1434: l_effective_date := r_PCX.information2;
1435: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1436: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1437: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1438: end if;
1439:
1440: if l_first_rec and not l_update then
1433:
1434: l_effective_date := r_PCX.information2;
1435: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1436: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1437: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1438: end if;
1439:
1440: if l_first_rec and not l_update then
1441:
1495: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
1496: -- Update all relevent cer records with new pk_id
1497: hr_utility.set_location('Before plsql table ',222);
1498: hr_utility.set_location('new_value id '||l_pl_bnf_ctfn_id,222);
1499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX.information1 ;
1501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_BNF_CTFN_ID ;
1502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1496: -- Update all relevent cer records with new pk_id
1497: hr_utility.set_location('Before plsql table ',222);
1498: hr_utility.set_location('new_value id '||l_pl_bnf_ctfn_id,222);
1499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX.information1 ;
1501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_BNF_CTFN_ID ;
1502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1504: hr_utility.set_location('After plsql table ',222);
1497: hr_utility.set_location('Before plsql table ',222);
1498: hr_utility.set_location('new_value id '||l_pl_bnf_ctfn_id,222);
1499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX.information1 ;
1501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_BNF_CTFN_ID ;
1502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1504: hr_utility.set_location('After plsql table ',222);
1505: --
1498: hr_utility.set_location('new_value id '||l_pl_bnf_ctfn_id,222);
1499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX.information1 ;
1501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_BNF_CTFN_ID ;
1502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1504: hr_utility.set_location('After plsql table ',222);
1505: --
1506: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1499: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_BNF_CTFN_ID' ;
1500: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCX.information1 ;
1501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_BNF_CTFN_ID ;
1502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1504: hr_utility.set_location('After plsql table ',222);
1505: --
1506: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1507: --
1502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCX_unique.table_route_id;
1504: hr_utility.set_location('After plsql table ',222);
1505: --
1506: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1507: --
1508: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1509: --
1510: else
1504: hr_utility.set_location('After plsql table ',222);
1505: --
1506: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1507: --
1508: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1509: --
1510: else
1511: --
1512: -- Call Update routine for the pk_id created in prev run .
1624: end loop;
1625: --
1626: exception when others then
1627: --
1628: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PCX',r_pcx.information5 );
1629: --
1630: end create_PCX_rows;
1631:
1632: --
1765: end if ;
1766: -- End Prefix Sufix derivation
1767: for r_PND_unique in c_unique_PND('PND') loop
1768:
1769: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1770: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1771: r_PND_unique.information3 >=
1772: ben_pd_copy_to_ben_one.g_copy_effective_date)
1773: ) then
1766: -- End Prefix Sufix derivation
1767: for r_PND_unique in c_unique_PND('PND') loop
1768:
1769: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1770: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1771: r_PND_unique.information3 >=
1772: ben_pd_copy_to_ben_one.g_copy_effective_date)
1773: ) then
1774:
1768:
1769: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
1770: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1771: r_PND_unique.information3 >=
1772: ben_pd_copy_to_ben_one.g_copy_effective_date)
1773: ) then
1774:
1775: --
1776: hr_utility.set_location(' r_PND_unique.table_route_id '||r_PND_unique.table_route_id,10);
1804: l_object_found_in_target := TRUE;
1805: --
1806: if l_process_date between r_PND_unique.information2 and r_PND_unique.information3 then
1807: l_update := true;
1808: if r_PND_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1809: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID'
1810: then
1811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1805: --
1806: if l_process_date between r_PND_unique.information2 and r_PND_unique.information3 then
1807: l_update := true;
1808: if r_PND_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1809: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID'
1810: then
1811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PND_unique.information1 ;
1807: l_update := true;
1808: if r_PND_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1809: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID'
1810: then
1811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PND_unique.information1 ;
1814: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1815: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1808: if r_PND_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
1809: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID'
1810: then
1811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PND_unique.information1 ;
1814: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1815: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1816: --
1809: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID'
1810: then
1811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PND_unique.information1 ;
1814: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1815: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1816: --
1817: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1810: then
1811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PND_unique.information1 ;
1814: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1815: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1816: --
1817: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1818: --
1811: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1812: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1813: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PND_unique.information1 ;
1814: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1815: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1816: --
1817: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1818: --
1819: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1815: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1816: --
1817: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
1818: --
1819: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1820: --
1821: --DOUBT log_data('PND',l_new_value,l_prefix || r_PND_unique.name|| l_suffix,'REUSED');
1822: --
1823: end if ;
1837: open c_PND_min_max_dates(r_PND_unique.table_route_id, r_PND_unique.information1 ) ;
1838: fetch c_PND_min_max_dates into l_min_esd,l_max_eed ;
1839: --
1840:
1841: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1842: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1843: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1844: end if;
1845: l_min_esd := greatest(l_min_esd,r_PND_unique.information2);
1838: fetch c_PND_min_max_dates into l_min_esd,l_max_eed ;
1839: --
1840:
1841: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1842: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1843: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1844: end if;
1845: l_min_esd := greatest(l_min_esd,r_PND_unique.information2);
1846:
1839: --
1840:
1841: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1842: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1843: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
1844: end if;
1845: l_min_esd := greatest(l_min_esd,r_PND_unique.information2);
1846:
1847: --
1863: p_from_date => l_min_esd,
1864: p_to_date => l_max_eed );
1865: if l_dt_rec_found THEN
1866: --END TEMPIK
1867: if r_PND_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
1868: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID' then
1869: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1870: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1871: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1864: p_to_date => l_max_eed );
1865: if l_dt_rec_found THEN
1866: --END TEMPIK
1867: if r_PND_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
1868: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID' then
1869: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1870: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1871: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1872: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1865: if l_dt_rec_found THEN
1866: --END TEMPIK
1867: if r_PND_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
1868: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID' then
1869: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1870: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1871: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1872: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1866: --END TEMPIK
1867: if r_PND_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
1868: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID' then
1869: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1870: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1871: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1872: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1874: --
1867: if r_PND_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
1868: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID' then
1869: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1870: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1871: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1872: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1874: --
1875: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1868: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_DPNT_CVG_CTFN_ID' then
1869: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1870: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1871: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1872: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1874: --
1875: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1876: --
1869: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1870: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND_unique.information1 ;
1871: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1872: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1874: --
1875: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1876: --
1877: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1871: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
1872: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
1873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1874: --
1875: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1876: --
1877: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1878: end if ;
1879: --
1873: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1874: --
1875: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
1876: --
1877: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1878: end if ;
1879: --
1880: l_object_found_in_target := true ;
1881: --TEMPIK
1909: end if ;
1910: --
1911:
1912: l_effective_date := r_PND.information2;
1913: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1914: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1915: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1916: end if;
1917:
1910: --
1911:
1912: l_effective_date := r_PND.information2;
1913: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1914: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1915: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1916: end if;
1917:
1918: if l_first_rec and not l_update then
1911:
1912: l_effective_date := r_PND.information2;
1913: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
1914: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
1915: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
1916: end if;
1917:
1918: if l_first_rec and not l_update then
1919: -- Call Create routine.
1971: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
1972: -- Update all relevent cer records with new pk_id
1973: hr_utility.set_location('Before plsql table ',222);
1974: hr_utility.set_location('new_value id '||l_pl_dpnt_cvg_ctfn_id,222);
1975: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1976: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND.information1 ;
1977: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_DPNT_CVG_CTFN_ID ;
1978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1972: -- Update all relevent cer records with new pk_id
1973: hr_utility.set_location('Before plsql table ',222);
1974: hr_utility.set_location('new_value id '||l_pl_dpnt_cvg_ctfn_id,222);
1975: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1976: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND.information1 ;
1977: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_DPNT_CVG_CTFN_ID ;
1978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1980: hr_utility.set_location('After plsql table ',222);
1973: hr_utility.set_location('Before plsql table ',222);
1974: hr_utility.set_location('new_value id '||l_pl_dpnt_cvg_ctfn_id,222);
1975: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1976: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND.information1 ;
1977: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_DPNT_CVG_CTFN_ID ;
1978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1980: hr_utility.set_location('After plsql table ',222);
1981: --
1974: hr_utility.set_location('new_value id '||l_pl_dpnt_cvg_ctfn_id,222);
1975: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1976: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND.information1 ;
1977: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_DPNT_CVG_CTFN_ID ;
1978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1980: hr_utility.set_location('After plsql table ',222);
1981: --
1982: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1975: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_DPNT_CVG_CTFN_ID' ;
1976: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PND.information1 ;
1977: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_DPNT_CVG_CTFN_ID ;
1978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1980: hr_utility.set_location('After plsql table ',222);
1981: --
1982: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1983: --
1978: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
1979: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PND_unique.table_route_id;
1980: hr_utility.set_location('After plsql table ',222);
1981: --
1982: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1983: --
1984: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1985: --
1986: else
1980: hr_utility.set_location('After plsql table ',222);
1981: --
1982: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
1983: --
1984: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
1985: --
1986: else
1987: --
1988: -- Call Update routine for the pk_id created in prev run .
2098: end loop;
2099: --
2100: exception when others then
2101: --
2102: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PND',r_pnd.information5 );
2103: --
2104: end create_PND_rows;
2105:
2106: --
2241: end if ;
2242: -- End Prefix Sufix derivation
2243: for r_LPE_unique in c_unique_LPE('LPE') loop
2244:
2245: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2246: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2247: r_LPE_unique.information3 >=
2248: ben_pd_copy_to_ben_one.g_copy_effective_date)
2249: ) then
2242: -- End Prefix Sufix derivation
2243: for r_LPE_unique in c_unique_LPE('LPE') loop
2244:
2245: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2246: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2247: r_LPE_unique.information3 >=
2248: ben_pd_copy_to_ben_one.g_copy_effective_date)
2249: ) then
2250:
2244:
2245: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2246: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2247: r_LPE_unique.information3 >=
2248: ben_pd_copy_to_ben_one.g_copy_effective_date)
2249: ) then
2250:
2251: --
2252: hr_utility.set_location(' r_LPE_unique.table_route_id '||r_LPE_unique.table_route_id,10);
2285: l_object_found_in_target := TRUE;
2286: --
2287: if l_process_date between r_LPE_unique.information2 and r_LPE_unique.information3 then
2288: l_update := true;
2289: if r_LPE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2290: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID'
2291: then
2292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2286: --
2287: if l_process_date between r_LPE_unique.information2 and r_LPE_unique.information3 then
2288: l_update := true;
2289: if r_LPE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2290: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID'
2291: then
2292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPE_unique.information1 ;
2288: l_update := true;
2289: if r_LPE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2290: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID'
2291: then
2292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPE_unique.information1 ;
2295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2289: if r_LPE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2290: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID'
2291: then
2292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPE_unique.information1 ;
2295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2297: --
2290: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID'
2291: then
2292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPE_unique.information1 ;
2295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2297: --
2298: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2291: then
2292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPE_unique.information1 ;
2295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2297: --
2298: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2299: --
2292: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2293: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2294: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPE_unique.information1 ;
2295: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2297: --
2298: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2299: --
2300: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2296: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2297: --
2298: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2299: --
2300: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2301: --
2302: --DOUBT log_data('LPE',l_new_value,l_prefix || r_LPE_unique.name|| l_suffix,'REUSED');
2303: --
2304: end if ;
2317: open c_LPE_min_max_dates(r_LPE_unique.table_route_id, r_LPE_unique.information1 ) ;
2318: fetch c_LPE_min_max_dates into l_min_esd,l_max_eed ;
2319: --
2320:
2321: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2322: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2323: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2324: end if;
2325: l_min_esd := greatest(l_min_esd,r_LPE_unique.information2);
2318: fetch c_LPE_min_max_dates into l_min_esd,l_max_eed ;
2319: --
2320:
2321: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2322: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2323: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2324: end if;
2325: l_min_esd := greatest(l_min_esd,r_LPE_unique.information2);
2326:
2319: --
2320:
2321: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2322: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2323: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2324: end if;
2325: l_min_esd := greatest(l_min_esd,r_LPE_unique.information2);
2326:
2327: --
2341: p_from_date => l_min_esd,
2342: p_to_date => l_max_eed );
2343: if l_dt_rec_found THEN
2344: --END TEMPIK
2345: if r_LPE_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
2346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID' then
2347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2342: p_to_date => l_max_eed );
2343: if l_dt_rec_found THEN
2344: --END TEMPIK
2345: if r_LPE_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
2346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID' then
2347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2343: if l_dt_rec_found THEN
2344: --END TEMPIK
2345: if r_LPE_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
2346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID' then
2347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2344: --END TEMPIK
2345: if r_LPE_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
2346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID' then
2347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2352: --
2345: if r_LPE_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
2346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID' then
2347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2352: --
2353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2346: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PL_NIP_ENRT_ID' then
2347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2352: --
2353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2354: --
2347: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE_unique.information1 ;
2349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2352: --
2353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2354: --
2355: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2352: --
2353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2354: --
2355: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2356: end if ;
2357: --
2351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2352: --
2353: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2354: --
2355: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2356: end if ;
2357: --
2358: l_object_found_in_target := true ;
2359: --TEMPIK
2386: end if ;
2387: --
2388:
2389: l_effective_date := r_LPE.information2;
2390: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2391: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2392: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2393: end if;
2394:
2387: --
2388:
2389: l_effective_date := r_LPE.information2;
2390: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2391: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2392: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2393: end if;
2394:
2395: if l_first_rec and not l_update then
2388:
2389: l_effective_date := r_LPE.information2;
2390: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2391: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2392: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2393: end if;
2394:
2395: if l_first_rec and not l_update then
2396: -- Call Create routine.
2453: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
2454: -- Update all relevent cer records with new pk_id
2455: hr_utility.set_location('Before plsql table ',222);
2456: hr_utility.set_location('new_value id '||l_ler_chg_pl_nip_enrt_id,222);
2457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE.information1 ;
2459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PL_NIP_ENRT_ID ;
2460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2461: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2454: -- Update all relevent cer records with new pk_id
2455: hr_utility.set_location('Before plsql table ',222);
2456: hr_utility.set_location('new_value id '||l_ler_chg_pl_nip_enrt_id,222);
2457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE.information1 ;
2459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PL_NIP_ENRT_ID ;
2460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2461: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2462: hr_utility.set_location('After plsql table ',222);
2455: hr_utility.set_location('Before plsql table ',222);
2456: hr_utility.set_location('new_value id '||l_ler_chg_pl_nip_enrt_id,222);
2457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE.information1 ;
2459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PL_NIP_ENRT_ID ;
2460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2461: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2462: hr_utility.set_location('After plsql table ',222);
2463: --
2456: hr_utility.set_location('new_value id '||l_ler_chg_pl_nip_enrt_id,222);
2457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE.information1 ;
2459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PL_NIP_ENRT_ID ;
2460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2461: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2462: hr_utility.set_location('After plsql table ',222);
2463: --
2464: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PL_NIP_ENRT_ID' ;
2458: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPE.information1 ;
2459: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PL_NIP_ENRT_ID ;
2460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2461: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2462: hr_utility.set_location('After plsql table ',222);
2463: --
2464: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2465: --
2460: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2461: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPE_unique.table_route_id;
2462: hr_utility.set_location('After plsql table ',222);
2463: --
2464: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2465: --
2466: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2467: --
2468: else
2462: hr_utility.set_location('After plsql table ',222);
2463: --
2464: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2465: --
2466: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2467: --
2468: else
2469: --
2470: -- Call Update routine for the pk_id created in prev run .
2586: end loop;
2587: --
2588: exception when others then
2589: --
2590: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LPE',r_lpe.information5 );
2591: --
2592: end create_LPE_rows;
2593:
2594: --
2729: end if ;
2730: -- End Prefix Sufix derivation
2731: for r_LOP_unique in c_unique_LOP('LOP') loop
2732:
2733: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2734: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2735: r_LOP_unique.information3 >=
2736: ben_pd_copy_to_ben_one.g_copy_effective_date)
2737: ) then
2730: -- End Prefix Sufix derivation
2731: for r_LOP_unique in c_unique_LOP('LOP') loop
2732:
2733: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2734: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2735: r_LOP_unique.information3 >=
2736: ben_pd_copy_to_ben_one.g_copy_effective_date)
2737: ) then
2738: --
2732:
2733: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
2734: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2735: r_LOP_unique.information3 >=
2736: ben_pd_copy_to_ben_one.g_copy_effective_date)
2737: ) then
2738: --
2739: hr_utility.set_location(' r_LOP_unique.table_route_id '||r_LOP_unique.table_route_id,10);
2740: hr_utility.set_location(' r_LOP_unique.information1 '||r_LOP_unique.information1,10);
2770: l_object_found_in_target := TRUE;
2771: --
2772: if l_process_date between r_LOP_unique.information2 and r_LOP_unique.information3 then
2773: l_update := true;
2774: if r_LOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2775: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID'
2776: then
2777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2771: --
2772: if l_process_date between r_LOP_unique.information2 and r_LOP_unique.information3 then
2773: l_update := true;
2774: if r_LOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2775: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID'
2776: then
2777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2779: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LOP_unique.information1 ;
2773: l_update := true;
2774: if r_LOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2775: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID'
2776: then
2777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2779: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LOP_unique.information1 ;
2780: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2781: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2774: if r_LOP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
2775: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID'
2776: then
2777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2779: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LOP_unique.information1 ;
2780: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2781: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2782: --
2775: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID'
2776: then
2777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2779: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LOP_unique.information1 ;
2780: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2781: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2782: --
2783: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2776: then
2777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2779: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LOP_unique.information1 ;
2780: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2781: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2782: --
2783: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2784: --
2777: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2778: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2779: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LOP_unique.information1 ;
2780: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2781: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2782: --
2783: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2784: --
2785: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2781: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2782: --
2783: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
2784: --
2785: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2786: --
2787: --DOUBT log_data('LOP',l_new_value,l_prefix || r_LOP_unique.name|| l_suffix,'REUSED');
2788: --
2789: end if ;
2802: open c_LOP_min_max_dates(r_LOP_unique.table_route_id, r_LOP_unique.information1 ) ;
2803: fetch c_LOP_min_max_dates into l_min_esd,l_max_eed ;
2804: --
2805:
2806: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2807: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2808: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2809: end if;
2810: l_min_esd := greatest(l_min_esd,r_LOP_unique.information2);
2803: fetch c_LOP_min_max_dates into l_min_esd,l_max_eed ;
2804: --
2805:
2806: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2807: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2808: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2809: end if;
2810: l_min_esd := greatest(l_min_esd,r_LOP_unique.information2);
2811:
2804: --
2805:
2806: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2807: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2808: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
2809: end if;
2810: l_min_esd := greatest(l_min_esd,r_LOP_unique.information2);
2811:
2812: --
2826: p_from_date => l_min_esd,
2827: p_to_date => l_max_eed );
2828: if l_dt_rec_found THEN
2829: --END TEMPIK
2830: if r_LOP_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
2831: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID' then
2832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2827: p_to_date => l_max_eed );
2828: if l_dt_rec_found THEN
2829: --END TEMPIK
2830: if r_LOP_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
2831: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID' then
2832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2828: if l_dt_rec_found THEN
2829: --END TEMPIK
2830: if r_LOP_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
2831: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID' then
2832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2829: --END TEMPIK
2830: if r_LOP_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
2831: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID' then
2832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2837: --
2830: if r_LOP_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
2831: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID' then
2832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2837: --
2838: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2831: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_OIPL_ENRT_ID' then
2832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2837: --
2838: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2839: --
2832: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2833: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP_unique.information1 ;
2834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2837: --
2838: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2839: --
2840: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2834: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
2835: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
2836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2837: --
2838: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2839: --
2840: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2841: end if ;
2842: --
2836: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2837: --
2838: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
2839: --
2840: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2841: end if ;
2842: --
2843: l_object_found_in_target := true ;
2844: --TEMPIK
2872: end if ;
2873: --
2874:
2875: l_effective_date := r_LOP.information2;
2876: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2877: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2878: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2879: end if;
2880:
2873: --
2874:
2875: l_effective_date := r_LOP.information2;
2876: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2877: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2878: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2879: end if;
2880:
2881: if l_first_rec and not l_update then
2874:
2875: l_effective_date := r_LOP.information2;
2876: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
2877: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
2878: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
2879: end if;
2880:
2881: if l_first_rec and not l_update then
2882: -- Call Create routine.
2938: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
2939: -- Update all relevent cer records with new pk_id
2940: hr_utility.set_location('Before plsql table ',222);
2941: hr_utility.set_location('new_value id '||l_ler_chg_oipl_enrt_id,222);
2942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2943: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP.information1 ;
2944: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_OIPL_ENRT_ID ;
2945: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2946: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2939: -- Update all relevent cer records with new pk_id
2940: hr_utility.set_location('Before plsql table ',222);
2941: hr_utility.set_location('new_value id '||l_ler_chg_oipl_enrt_id,222);
2942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2943: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP.information1 ;
2944: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_OIPL_ENRT_ID ;
2945: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2946: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2947: hr_utility.set_location('After plsql table ',222);
2940: hr_utility.set_location('Before plsql table ',222);
2941: hr_utility.set_location('new_value id '||l_ler_chg_oipl_enrt_id,222);
2942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2943: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP.information1 ;
2944: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_OIPL_ENRT_ID ;
2945: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2946: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2947: hr_utility.set_location('After plsql table ',222);
2948: --
2941: hr_utility.set_location('new_value id '||l_ler_chg_oipl_enrt_id,222);
2942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2943: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP.information1 ;
2944: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_OIPL_ENRT_ID ;
2945: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2946: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2947: hr_utility.set_location('After plsql table ',222);
2948: --
2949: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_OIPL_ENRT_ID' ;
2943: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LOP.information1 ;
2944: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_OIPL_ENRT_ID ;
2945: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2946: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2947: hr_utility.set_location('After plsql table ',222);
2948: --
2949: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2950: --
2945: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
2946: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LOP_unique.table_route_id;
2947: hr_utility.set_location('After plsql table ',222);
2948: --
2949: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2950: --
2951: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2952: --
2953: else
2947: hr_utility.set_location('After plsql table ',222);
2948: --
2949: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
2950: --
2951: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
2952: --
2953: else
2954: --
2955: -- Call Update routine for the pk_id created in prev run .
3067: end loop;
3068: --
3069: exception when others then
3070: --
3071: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LOP',r_lOP.information5 );
3072: --
3073: end create_LOP_rows;
3074:
3075: --
3208: end if ;
3209: -- End Prefix Sufix derivation
3210: for r_LNC_unique in c_unique_LNC('LNC') loop
3211:
3212: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3213: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3214: r_LNC_unique.information3 >=
3215: ben_pd_copy_to_ben_one.g_copy_effective_date)
3216: ) then
3209: -- End Prefix Sufix derivation
3210: for r_LNC_unique in c_unique_LNC('LNC') loop
3211:
3212: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3213: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3214: r_LNC_unique.information3 >=
3215: ben_pd_copy_to_ben_one.g_copy_effective_date)
3216: ) then
3217: --
3211:
3212: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3213: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3214: r_LNC_unique.information3 >=
3215: ben_pd_copy_to_ben_one.g_copy_effective_date)
3216: ) then
3217: --
3218: hr_utility.set_location(' r_LNC_unique.table_route_id '||r_LNC_unique.table_route_id,10);
3219: hr_utility.set_location(' r_LNC_unique.information1 '||r_LNC_unique.information1,10);
3248: l_object_found_in_target := TRUE;
3249: --
3250: if l_process_date between r_LNC_unique.information2 and r_LNC_unique.information3 then
3251: l_update := true;
3252: if r_LNC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3253: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID'
3254: then
3255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3249: --
3250: if l_process_date between r_LNC_unique.information2 and r_LNC_unique.information3 then
3251: l_update := true;
3252: if r_LNC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3253: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID'
3254: then
3255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LNC_unique.information1 ;
3251: l_update := true;
3252: if r_LNC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3253: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID'
3254: then
3255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LNC_unique.information1 ;
3258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3252: if r_LNC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3253: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID'
3254: then
3255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LNC_unique.information1 ;
3258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3260: --
3253: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID'
3254: then
3255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LNC_unique.information1 ;
3258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3260: --
3261: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3254: then
3255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LNC_unique.information1 ;
3258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3260: --
3261: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3262: --
3255: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3256: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3257: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LNC_unique.information1 ;
3258: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3260: --
3261: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3262: --
3263: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3259: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3260: --
3261: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3262: --
3263: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3264: --
3265: --DOUBT log_data('LNC',l_new_value,l_prefix || r_LNC_unique.name|| l_suffix,'REUSED');
3266: --
3267: end if ;
3280: open c_LNC_min_max_dates(r_LNC_unique.table_route_id, r_LNC_unique.information1 ) ;
3281: fetch c_LNC_min_max_dates into l_min_esd,l_max_eed ;
3282: --
3283:
3284: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3285: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3286: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3287: end if;
3288: l_min_esd := greatest(l_min_esd,r_LNC_unique.information2);
3281: fetch c_LNC_min_max_dates into l_min_esd,l_max_eed ;
3282: --
3283:
3284: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3285: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3286: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3287: end if;
3288: l_min_esd := greatest(l_min_esd,r_LNC_unique.information2);
3289: /* open c_LNC(r_LNC_unique.table_route_id,
3282: --
3283:
3284: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3285: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3286: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3287: end if;
3288: l_min_esd := greatest(l_min_esd,r_LNC_unique.information2);
3289: /* open c_LNC(r_LNC_unique.table_route_id,
3290: r_LNC_unique.information1,
3312: p_from_date => l_min_esd,
3313: p_to_date => l_max_eed );
3314: if l_dt_rec_found THEN
3315: --END TEMPIK
3316: if r_LNC_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
3317: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID' then
3318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3313: p_to_date => l_max_eed );
3314: if l_dt_rec_found THEN
3315: --END TEMPIK
3316: if r_LNC_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
3317: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID' then
3318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3314: if l_dt_rec_found THEN
3315: --END TEMPIK
3316: if r_LNC_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
3317: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID' then
3318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3322: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3315: --END TEMPIK
3316: if r_LNC_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
3317: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID' then
3318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3322: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3323: --
3316: if r_LNC_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
3317: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID' then
3318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3322: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3323: --
3324: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3317: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_ENRT_CTFN_ID' then
3318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3322: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3323: --
3324: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3325: --
3318: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3319: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC_unique.information1 ;
3320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3322: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3323: --
3324: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3325: --
3326: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3320: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3321: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3322: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3323: --
3324: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3325: --
3326: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3327: end if ;
3328: --
3322: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3323: --
3324: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3325: --
3326: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3327: end if ;
3328: --
3329: l_object_found_in_target := true ;
3330: --TEMPIK
3358: end if ;
3359: --
3360:
3361: l_effective_date := r_LNC.information2;
3362: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3363: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3364: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3365: end if;
3366:
3359: --
3360:
3361: l_effective_date := r_LNC.information2;
3362: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3363: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3364: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3365: end if;
3366:
3367: if l_first_rec and not l_update then
3360:
3361: l_effective_date := r_LNC.information2;
3362: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3363: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3364: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3365: end if;
3366:
3367: if l_first_rec and not l_update then
3368: -- Call Create routine.
3417: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
3418: -- Update all relevent cer records with new pk_id
3419: hr_utility.set_location('Before plsql table ',222);
3420: hr_utility.set_location('new_value id '||l_ler_enrt_ctfn_id,222);
3421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC.information1 ;
3423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_ENRT_CTFN_ID ;
3424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3418: -- Update all relevent cer records with new pk_id
3419: hr_utility.set_location('Before plsql table ',222);
3420: hr_utility.set_location('new_value id '||l_ler_enrt_ctfn_id,222);
3421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC.information1 ;
3423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_ENRT_CTFN_ID ;
3424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3426: hr_utility.set_location('After plsql table ',222);
3419: hr_utility.set_location('Before plsql table ',222);
3420: hr_utility.set_location('new_value id '||l_ler_enrt_ctfn_id,222);
3421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC.information1 ;
3423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_ENRT_CTFN_ID ;
3424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3426: hr_utility.set_location('After plsql table ',222);
3427: --
3420: hr_utility.set_location('new_value id '||l_ler_enrt_ctfn_id,222);
3421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC.information1 ;
3423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_ENRT_CTFN_ID ;
3424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3426: hr_utility.set_location('After plsql table ',222);
3427: --
3428: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3421: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_ENRT_CTFN_ID' ;
3422: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LNC.information1 ;
3423: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_ENRT_CTFN_ID ;
3424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3426: hr_utility.set_location('After plsql table ',222);
3427: --
3428: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3429: --
3424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LNC_unique.table_route_id;
3426: hr_utility.set_location('After plsql table ',222);
3427: --
3428: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3429: --
3430: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3431: --
3432: else
3426: hr_utility.set_location('After plsql table ',222);
3427: --
3428: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3429: --
3430: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3431: --
3432: else
3433: --
3434: -- Call Update routine for the pk_id created in prev run .
3542: end loop;
3543: --
3544: exception when others then
3545: --
3546: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LNC',r_lnc.information5 );
3547: --
3548: end create_LNC_rows;
3549:
3550: --
3686: end if ;
3687: -- End Prefix Sufix derivation
3688: for r_LRE_unique in c_unique_LRE('LRE') loop
3689:
3690: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3691: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3692: r_LRE_unique.information3 >=
3693: ben_pd_copy_to_ben_one.g_copy_effective_date)
3694: ) then
3687: -- End Prefix Sufix derivation
3688: for r_LRE_unique in c_unique_LRE('LRE') loop
3689:
3690: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3691: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3692: r_LRE_unique.information3 >=
3693: ben_pd_copy_to_ben_one.g_copy_effective_date)
3694: ) then
3695: --
3689:
3690: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
3691: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3692: r_LRE_unique.information3 >=
3693: ben_pd_copy_to_ben_one.g_copy_effective_date)
3694: ) then
3695: --
3696: hr_utility.set_location(' r_LRE_unique.table_route_id '||r_LRE_unique.table_route_id,10);
3697: hr_utility.set_location(' r_LRE_unique.information1 '||r_LRE_unique.information1,10);
3726: l_object_found_in_target := TRUE;
3727: --
3728: if l_process_date between r_LRE_unique.information2 and r_LRE_unique.information3 then
3729: l_update := true;
3730: if r_LRE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3731: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID'
3732: then
3733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3727: --
3728: if l_process_date between r_LRE_unique.information2 and r_LRE_unique.information3 then
3729: l_update := true;
3730: if r_LRE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3731: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID'
3732: then
3733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRE_unique.information1 ;
3729: l_update := true;
3730: if r_LRE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3731: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID'
3732: then
3733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRE_unique.information1 ;
3736: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3730: if r_LRE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
3731: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID'
3732: then
3733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRE_unique.information1 ;
3736: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3738: --
3731: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID'
3732: then
3733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRE_unique.information1 ;
3736: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3738: --
3739: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3732: then
3733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRE_unique.information1 ;
3736: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3738: --
3739: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3740: --
3733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRE_unique.information1 ;
3736: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3738: --
3739: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3740: --
3741: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3738: --
3739: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
3740: --
3741: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3742: --
3743: -- log_data('LER',l_new_value,l_prefix || r_LRE_unique.name|| l_suffix,'REUSED');
3744: --
3745: end if ;
3758: open c_LRE_min_max_dates(r_LRE_unique.table_route_id, r_LRE_unique.information1 ) ;
3759: fetch c_LRE_min_max_dates into l_min_esd,l_max_eed ;
3760: --
3761:
3762: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3763: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3764: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3765: end if;
3766: l_min_esd := greatest(l_min_esd,r_LRE_unique.information2);
3759: fetch c_LRE_min_max_dates into l_min_esd,l_max_eed ;
3760: --
3761:
3762: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3763: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3764: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3765: end if;
3766: l_min_esd := greatest(l_min_esd,r_LRE_unique.information2);
3767: /* open c_LRE(r_LRE_unique.table_route_id,
3760: --
3761:
3762: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3763: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3764: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
3765: end if;
3766: l_min_esd := greatest(l_min_esd,r_LRE_unique.information2);
3767: /* open c_LRE(r_LRE_unique.table_route_id,
3768: r_LRE_unique.information1,
3789: p_from_date => l_min_esd,
3790: p_to_date => l_max_eed );
3791: if l_dt_rec_found THEN
3792: --END TEMPIK
3793: if r_LRE_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
3794: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID' then
3795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3790: p_to_date => l_max_eed );
3791: if l_dt_rec_found THEN
3792: --END TEMPIK
3793: if r_LRE_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
3794: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID' then
3795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3791: if l_dt_rec_found THEN
3792: --END TEMPIK
3793: if r_LRE_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
3794: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID' then
3795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3792: --END TEMPIK
3793: if r_LRE_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
3794: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID' then
3795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3800: --
3793: if r_LRE_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
3794: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID' then
3795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3800: --
3801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3794: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_RQRS_ENRT_CTFN_ID' then
3795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3800: --
3801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3802: --
3795: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3796: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE_unique.information1 ;
3797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3800: --
3801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3802: --
3803: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3797: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
3798: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
3799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3800: --
3801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3802: --
3803: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3804: end if ;
3805: --
3799: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3800: --
3801: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
3802: --
3803: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3804: end if ;
3805: --
3806: l_object_found_in_target := true ;
3807: --TEMPIK
3835: end if ;
3836: --
3837:
3838: l_effective_date := r_LRE.information2;
3839: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3840: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3841: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3842: end if;
3843:
3836: --
3837:
3838: l_effective_date := r_LRE.information2;
3839: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3840: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3841: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3842: end if;
3843:
3844: if l_first_rec and not l_update then
3837:
3838: l_effective_date := r_LRE.information2;
3839: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
3840: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
3841: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
3842: end if;
3843:
3844: if l_first_rec and not l_update then
3845: -- Call Create routine.
3901: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
3902: -- Update all relevent cer records with new pk_id
3903: hr_utility.set_location('Before plsql table ',222);
3904: hr_utility.set_location('new_value id '||l_ler_rqrs_enrt_ctfn_id,222);
3905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE.information1 ;
3907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_RQRS_ENRT_CTFN_ID ;
3908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3902: -- Update all relevent cer records with new pk_id
3903: hr_utility.set_location('Before plsql table ',222);
3904: hr_utility.set_location('new_value id '||l_ler_rqrs_enrt_ctfn_id,222);
3905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE.information1 ;
3907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_RQRS_ENRT_CTFN_ID ;
3908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3910: hr_utility.set_location('After plsql table ',222);
3903: hr_utility.set_location('Before plsql table ',222);
3904: hr_utility.set_location('new_value id '||l_ler_rqrs_enrt_ctfn_id,222);
3905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE.information1 ;
3907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_RQRS_ENRT_CTFN_ID ;
3908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3910: hr_utility.set_location('After plsql table ',222);
3911: --
3904: hr_utility.set_location('new_value id '||l_ler_rqrs_enrt_ctfn_id,222);
3905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE.information1 ;
3907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_RQRS_ENRT_CTFN_ID ;
3908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3910: hr_utility.set_location('After plsql table ',222);
3911: --
3912: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_RQRS_ENRT_CTFN_ID' ;
3906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRE.information1 ;
3907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_RQRS_ENRT_CTFN_ID ;
3908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3910: hr_utility.set_location('After plsql table ',222);
3911: --
3912: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3913: --
3908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
3909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRE_unique.table_route_id;
3910: hr_utility.set_location('After plsql table ',222);
3911: --
3912: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3913: --
3914: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3915: --
3916: else
3910: hr_utility.set_location('After plsql table ',222);
3911: --
3912: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
3913: --
3914: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
3915: --
3916: else
3917: --
3918: -- Call Update routine for the pk_id created in prev run .
4031: end loop;
4032: --
4033: exception when others then
4034: --
4035: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LRE',r_lre.information5 );
4036: --
4037: end create_LRE_rows;
4038:
4039: --
4173: end if ;
4174: -- End Prefix Sufix derivation
4175: for r_LBC_unique in c_unique_LBC('LBC') loop
4176:
4177: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4178: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4179: r_LBC_unique.information3 >=
4180: ben_pd_copy_to_ben_one.g_copy_effective_date)
4181: ) then
4174: -- End Prefix Sufix derivation
4175: for r_LBC_unique in c_unique_LBC('LBC') loop
4176:
4177: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4178: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4179: r_LBC_unique.information3 >=
4180: ben_pd_copy_to_ben_one.g_copy_effective_date)
4181: ) then
4182: --
4176:
4177: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4178: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4179: r_LBC_unique.information3 >=
4180: ben_pd_copy_to_ben_one.g_copy_effective_date)
4181: ) then
4182: --
4183: hr_utility.set_location(' r_LBC_unique.table_route_id '||r_LBC_unique.table_route_id,10);
4184: hr_utility.set_location(' r_LBC_unique.information1 '||r_LBC_unique.information1,10);
4212: l_object_found_in_target := TRUE;
4213: --
4214: if l_process_date between r_LBC_unique.information2 and r_LBC_unique.information3 then
4215: l_update := true;
4216: if r_LBC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4217: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID'
4218: then
4219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4213: --
4214: if l_process_date between r_LBC_unique.information2 and r_LBC_unique.information3 then
4215: l_update := true;
4216: if r_LBC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4217: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID'
4218: then
4219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBC_unique.information1 ;
4215: l_update := true;
4216: if r_LBC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4217: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID'
4218: then
4219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBC_unique.information1 ;
4222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4216: if r_LBC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4217: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID'
4218: then
4219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBC_unique.information1 ;
4222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4224: --
4217: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID'
4218: then
4219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBC_unique.information1 ;
4222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4224: --
4225: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4218: then
4219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBC_unique.information1 ;
4222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4224: --
4225: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4226: --
4219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBC_unique.information1 ;
4222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4224: --
4225: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4226: --
4227: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4224: --
4225: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4226: --
4227: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4228: --
4229: --DOUBT log_data('LBC',l_new_value,l_prefix || r_LBC_unique.name|| l_suffix,'REUSED');
4230: --
4231: end if ;
4244: open c_LBC_min_max_dates(r_LBC_unique.table_route_id, r_LBC_unique.information1 ) ;
4245: fetch c_LBC_min_max_dates into l_min_esd,l_max_eed ;
4246: --
4247:
4248: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4249: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4250: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4251: end if;
4252: l_min_esd := greatest(l_min_esd,r_LBC_unique.information2);
4245: fetch c_LBC_min_max_dates into l_min_esd,l_max_eed ;
4246: --
4247:
4248: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4249: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4250: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4251: end if;
4252: l_min_esd := greatest(l_min_esd,r_LBC_unique.information2);
4253: /* open c_LBC(r_LBC_unique.table_route_id,
4246: --
4247:
4248: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4249: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4250: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4251: end if;
4252: l_min_esd := greatest(l_min_esd,r_LBC_unique.information2);
4253: /* open c_LBC(r_LBC_unique.table_route_id,
4254: r_LBC_unique.information1,
4275: p_from_date => l_min_esd,
4276: p_to_date => l_max_eed );
4277: if l_dt_rec_found THEN
4278: --END TEMPIK
4279: if r_LBC_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
4280: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID' then
4281: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4282: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4283: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4276: p_to_date => l_max_eed );
4277: if l_dt_rec_found THEN
4278: --END TEMPIK
4279: if r_LBC_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
4280: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID' then
4281: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4282: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4283: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4284: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4277: if l_dt_rec_found THEN
4278: --END TEMPIK
4279: if r_LBC_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
4280: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID' then
4281: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4282: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4283: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4284: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4285: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4278: --END TEMPIK
4279: if r_LBC_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
4280: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID' then
4281: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4282: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4283: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4284: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4285: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4286: --
4279: if r_LBC_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
4280: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID' then
4281: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4282: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4283: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4284: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4285: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4286: --
4287: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4280: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_CTFN_ID' then
4281: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4282: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4283: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4284: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4285: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4286: --
4287: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4288: --
4281: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4282: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC_unique.information1 ;
4283: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4284: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4285: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4286: --
4287: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4288: --
4289: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4283: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4284: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4285: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4286: --
4287: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4288: --
4289: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4290: end if ;
4291: --
4285: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4286: --
4287: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4288: --
4289: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4290: end if ;
4291: --
4292: l_object_found_in_target := true ;
4293: --TEMPIK
4321: end if ;
4322: --
4323:
4324: l_effective_date := r_LBC.information2;
4325: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4326: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4327: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4328: end if;
4329:
4322: --
4323:
4324: l_effective_date := r_LBC.information2;
4325: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4326: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4327: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4328: end if;
4329:
4330: if l_first_rec and not l_update then
4323:
4324: l_effective_date := r_LBC.information2;
4325: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4326: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4327: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4328: end if;
4329:
4330: if l_first_rec and not l_update then
4331: -- Call Create routine.
4380: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
4381: -- Update all relevent cer records with new pk_id
4382: hr_utility.set_location('Before plsql table ',222);
4383: hr_utility.set_location('new_value id '||l_ler_bnft_rstrn_ctfn_id,222);
4384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC.information1 ;
4386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_CTFN_ID ;
4387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4381: -- Update all relevent cer records with new pk_id
4382: hr_utility.set_location('Before plsql table ',222);
4383: hr_utility.set_location('new_value id '||l_ler_bnft_rstrn_ctfn_id,222);
4384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC.information1 ;
4386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_CTFN_ID ;
4387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4389: hr_utility.set_location('After plsql table ',222);
4382: hr_utility.set_location('Before plsql table ',222);
4383: hr_utility.set_location('new_value id '||l_ler_bnft_rstrn_ctfn_id,222);
4384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC.information1 ;
4386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_CTFN_ID ;
4387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4389: hr_utility.set_location('After plsql table ',222);
4390: --
4383: hr_utility.set_location('new_value id '||l_ler_bnft_rstrn_ctfn_id,222);
4384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC.information1 ;
4386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_CTFN_ID ;
4387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4389: hr_utility.set_location('After plsql table ',222);
4390: --
4391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4384: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_CTFN_ID' ;
4385: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBC.information1 ;
4386: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_CTFN_ID ;
4387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4389: hr_utility.set_location('After plsql table ',222);
4390: --
4391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4392: --
4387: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4388: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBC_unique.table_route_id;
4389: hr_utility.set_location('After plsql table ',222);
4390: --
4391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4392: --
4393: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4394: --
4395: else
4389: hr_utility.set_location('After plsql table ',222);
4390: --
4391: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4392: --
4393: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4394: --
4395: else
4396: --
4397: -- Call Update routine for the pk_id created in prev run .
4505: end loop;
4506: --
4507: exception when others then
4508: --
4509: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LBC',r_lbc.information5 );
4510: --
4511: end create_LBC_rows;
4512:
4513: --
4647: end if ;
4648: -- End Prefix Sufix derivation
4649: for r_BRC_unique in c_unique_BRC('BRC') loop
4650:
4651: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4652: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4653: r_BRC_unique.information3 >=
4654: ben_pd_copy_to_ben_one.g_copy_effective_date)
4655: ) then
4648: -- End Prefix Sufix derivation
4649: for r_BRC_unique in c_unique_BRC('BRC') loop
4650:
4651: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4652: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4653: r_BRC_unique.information3 >=
4654: ben_pd_copy_to_ben_one.g_copy_effective_date)
4655: ) then
4656:
4650:
4651: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
4652: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4653: r_BRC_unique.information3 >=
4654: ben_pd_copy_to_ben_one.g_copy_effective_date)
4655: ) then
4656:
4657: --
4658: hr_utility.set_location(' r_BRC_unique.table_route_id '||r_BRC_unique.table_route_id,10);
4688: l_object_found_in_target := TRUE;
4689: --
4690: if l_process_date between r_BRC_unique.information2 and r_BRC_unique.information3 then
4691: l_update := true;
4692: if r_BRC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4693: 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_RSTRN_CTFN_ID'
4694: then
4695: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4696: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4689: --
4690: if l_process_date between r_BRC_unique.information2 and r_BRC_unique.information3 then
4691: l_update := true;
4692: if r_BRC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4693: 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_RSTRN_CTFN_ID'
4694: then
4695: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4696: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRC_unique.information1 ;
4691: l_update := true;
4692: if r_BRC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4693: 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_RSTRN_CTFN_ID'
4694: then
4695: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4696: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRC_unique.information1 ;
4698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4692: if r_BRC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
4693: 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_RSTRN_CTFN_ID'
4694: then
4695: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4696: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRC_unique.information1 ;
4698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4700: --
4693: 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_RSTRN_CTFN_ID'
4694: then
4695: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4696: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRC_unique.information1 ;
4698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4700: --
4701: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4694: then
4695: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4696: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRC_unique.information1 ;
4698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4700: --
4701: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4702: --
4695: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4696: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BRC_unique.information1 ;
4698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4700: --
4701: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4702: --
4703: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4700: --
4701: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
4702: --
4703: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4704: --
4705: --DOUBT log_data('BRC',l_new_value,l_prefix || r_BRC_unique.name|| l_suffix,'REUSED');
4706: --
4707: end if ;
4721: open c_BRC_min_max_dates(r_BRC_unique.table_route_id, r_BRC_unique.information1 ) ;
4722: fetch c_BRC_min_max_dates into l_min_esd,l_max_eed ;
4723: --
4724:
4725: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4726: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4727: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4728: end if;
4729: l_min_esd := greatest(l_min_esd,r_BRC_unique.information2);
4722: fetch c_BRC_min_max_dates into l_min_esd,l_max_eed ;
4723: --
4724:
4725: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4726: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4727: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4728: end if;
4729: l_min_esd := greatest(l_min_esd,r_BRC_unique.information2);
4730: --
4723: --
4724:
4725: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4726: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4727: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
4728: end if;
4729: l_min_esd := greatest(l_min_esd,r_BRC_unique.information2);
4730: --
4731: if p_reuse_object_flag = 'Y' then
4744: p_from_date => l_min_esd,
4745: p_to_date => l_max_eed );
4746: if l_dt_rec_found THEN
4747: --END TEMPIK
4748: if r_BRC_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
4749: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_RSTRN_CTFN_ID' then
4750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4745: p_to_date => l_max_eed );
4746: if l_dt_rec_found THEN
4747: --END TEMPIK
4748: if r_BRC_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
4749: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_RSTRN_CTFN_ID' then
4750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4753: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4746: if l_dt_rec_found THEN
4747: --END TEMPIK
4748: if r_BRC_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
4749: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_RSTRN_CTFN_ID' then
4750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4753: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4747: --END TEMPIK
4748: if r_BRC_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
4749: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_RSTRN_CTFN_ID' then
4750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4753: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4755: --
4748: if r_BRC_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
4749: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_RSTRN_CTFN_ID' then
4750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4753: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4755: --
4756: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4749: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_RSTRN_CTFN_ID' then
4750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4753: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4755: --
4756: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4757: --
4750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4751: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC_unique.information1 ;
4752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4753: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4755: --
4756: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4757: --
4758: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4752: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
4753: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
4754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4755: --
4756: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4757: --
4758: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4759: end if ;
4760: --
4754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4755: --
4756: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
4757: --
4758: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4759: end if ;
4760: --
4761: l_object_found_in_target := true ;
4762: --TEMPIK
4790: end if ;
4791: --
4792:
4793: l_effective_date := r_BRC.information2;
4794: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4795: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4796: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4797: end if;
4798: if l_first_rec and not l_update then
4791: --
4792:
4793: l_effective_date := r_BRC.information2;
4794: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4795: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4796: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4797: end if;
4798: if l_first_rec and not l_update then
4799: -- Call Create routine.
4792:
4793: l_effective_date := r_BRC.information2;
4794: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
4795: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
4796: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
4797: end if;
4798: if l_first_rec and not l_update then
4799: -- Call Create routine.
4800: hr_utility.set_location(' BEN_BNFT_RSTRN_CTFN_F CREATE_BNFT_RSTRN_CTFN ',20);
4848: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
4849: -- Update all relevent cer records with new pk_id
4850: hr_utility.set_location('Before plsql table ',222);
4851: hr_utility.set_location('new_value id '||l_bnft_rstrn_ctfn_id,222);
4852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC.information1 ;
4854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_RSTRN_CTFN_ID ;
4855: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4849: -- Update all relevent cer records with new pk_id
4850: hr_utility.set_location('Before plsql table ',222);
4851: hr_utility.set_location('new_value id '||l_bnft_rstrn_ctfn_id,222);
4852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC.information1 ;
4854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_RSTRN_CTFN_ID ;
4855: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4857: hr_utility.set_location('After plsql table ',222);
4850: hr_utility.set_location('Before plsql table ',222);
4851: hr_utility.set_location('new_value id '||l_bnft_rstrn_ctfn_id,222);
4852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC.information1 ;
4854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_RSTRN_CTFN_ID ;
4855: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4857: hr_utility.set_location('After plsql table ',222);
4858: --
4851: hr_utility.set_location('new_value id '||l_bnft_rstrn_ctfn_id,222);
4852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC.information1 ;
4854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_RSTRN_CTFN_ID ;
4855: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4857: hr_utility.set_location('After plsql table ',222);
4858: --
4859: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_RSTRN_CTFN_ID' ;
4853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BRC.information1 ;
4854: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_RSTRN_CTFN_ID ;
4855: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4857: hr_utility.set_location('After plsql table ',222);
4858: --
4859: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4860: --
4855: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
4856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BRC_unique.table_route_id;
4857: hr_utility.set_location('After plsql table ',222);
4858: --
4859: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4860: --
4861: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4862: --
4863: else
4857: hr_utility.set_location('After plsql table ',222);
4858: --
4859: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
4860: --
4861: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
4862: --
4863: else
4864: --
4865: -- Call Update routine for the pk_id created in prev run .
4972: end loop;
4973: --
4974: exception when others then
4975: --
4976: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'BRC',r_brc.information5 );
4977: --
4978: end create_BRC_rows;
4979:
4980: --
5115: end if ;
5116: -- End Prefix Sufix derivation
5117: for r_WCN_unique in c_unique_WCN('WCN') loop
5118:
5119: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5120: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5121: r_WCN_unique.information3 >=
5122: ben_pd_copy_to_ben_one.g_copy_effective_date)
5123: ) then
5116: -- End Prefix Sufix derivation
5117: for r_WCN_unique in c_unique_WCN('WCN') loop
5118:
5119: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5120: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5121: r_WCN_unique.information3 >=
5122: ben_pd_copy_to_ben_one.g_copy_effective_date)
5123: ) then
5124: --
5118:
5119: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5120: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5121: r_WCN_unique.information3 >=
5122: ben_pd_copy_to_ben_one.g_copy_effective_date)
5123: ) then
5124: --
5125: hr_utility.set_location(' r_WCN_unique.table_route_id '||r_WCN_unique.table_route_id,10);
5126: hr_utility.set_location(' r_WCN_unique.information1 '||r_WCN_unique.information1,10);
5154: l_object_found_in_target := TRUE;
5155: --
5156: if l_process_date between r_WCN_unique.information2 and r_WCN_unique.information3 then
5157: l_update := true;
5158: if r_WCN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5159: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID'
5160: then
5161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5155: --
5156: if l_process_date between r_WCN_unique.information2 and r_WCN_unique.information3 then
5157: l_update := true;
5158: if r_WCN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5159: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID'
5160: then
5161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCN_unique.information1 ;
5157: l_update := true;
5158: if r_WCN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5159: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID'
5160: then
5161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCN_unique.information1 ;
5164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5158: if r_WCN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5159: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID'
5160: then
5161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCN_unique.information1 ;
5164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5166: --
5159: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID'
5160: then
5161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCN_unique.information1 ;
5164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5166: --
5167: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5160: then
5161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCN_unique.information1 ;
5164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5166: --
5167: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5168: --
5161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCN_unique.information1 ;
5164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5166: --
5167: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5168: --
5169: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5165: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5166: --
5167: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5168: --
5169: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5170: --
5171: --DOUBT log_data('WCN',l_new_value,l_prefix || r_WCN_unique.name|| l_suffix,'REUSED');
5172: --
5173: end if ;
5186: open c_WCN_min_max_dates(r_WCN_unique.table_route_id, r_WCN_unique.information1 ) ;
5187: fetch c_WCN_min_max_dates into l_min_esd,l_max_eed ;
5188: --
5189:
5190: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5191: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5192: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5193: end if;
5194: l_min_esd := greatest(l_min_esd,r_WCN_unique.information2);
5187: fetch c_WCN_min_max_dates into l_min_esd,l_max_eed ;
5188: --
5189:
5190: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5191: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5192: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5193: end if;
5194: l_min_esd := greatest(l_min_esd,r_WCN_unique.information2);
5195: /* open c_WCN(r_WCN_unique.table_route_id,
5188: --
5189:
5190: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5191: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5192: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5193: end if;
5194: l_min_esd := greatest(l_min_esd,r_WCN_unique.information2);
5195: /* open c_WCN(r_WCN_unique.table_route_id,
5196: r_WCN_unique.information1,
5218: p_from_date => l_min_esd,
5219: p_to_date => l_max_eed );
5220: if l_dt_rec_found THEN
5221: --END TEMPIK
5222: if r_WCN_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
5223: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID' then
5224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5219: p_to_date => l_max_eed );
5220: if l_dt_rec_found THEN
5221: --END TEMPIK
5222: if r_WCN_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
5223: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID' then
5224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5220: if l_dt_rec_found THEN
5221: --END TEMPIK
5222: if r_WCN_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
5223: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID' then
5224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5221: --END TEMPIK
5222: if r_WCN_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
5223: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID' then
5224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5229: --
5222: if r_WCN_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
5223: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID' then
5224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5229: --
5230: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5223: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PL_ID' then
5224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5229: --
5230: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5231: --
5224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN_unique.information1 ;
5226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5229: --
5230: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5231: --
5232: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5229: --
5230: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5231: --
5232: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5233: end if ;
5234: --
5228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5229: --
5230: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5231: --
5232: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5233: end if ;
5234: --
5235: l_object_found_in_target := true ;
5236: --TEMPIK
5263: end if ;
5264: --
5265:
5266: l_effective_date := r_WCN.information2;
5267: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5268: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5269: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5270: end if;
5271:
5264: --
5265:
5266: l_effective_date := r_WCN.information2;
5267: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5268: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5269: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5270: end if;
5271:
5272: if l_first_rec and not l_update then
5265:
5266: l_effective_date := r_WCN.information2;
5267: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5268: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5269: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5270: end if;
5271:
5272: if l_first_rec and not l_update then
5273: -- Call Create routine.
5324: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
5325: -- Update all relevent cer records with new pk_id
5326: hr_utility.set_location('Before plsql table ',222);
5327: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ctfn_pl_id,222);
5328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN.information1 ;
5330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PL_ID ;
5331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5325: -- Update all relevent cer records with new pk_id
5326: hr_utility.set_location('Before plsql table ',222);
5327: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ctfn_pl_id,222);
5328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN.information1 ;
5330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PL_ID ;
5331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5333: hr_utility.set_location('After plsql table ',222);
5326: hr_utility.set_location('Before plsql table ',222);
5327: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ctfn_pl_id,222);
5328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN.information1 ;
5330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PL_ID ;
5331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5333: hr_utility.set_location('After plsql table ',222);
5334: --
5327: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ctfn_pl_id,222);
5328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN.information1 ;
5330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PL_ID ;
5331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5333: hr_utility.set_location('After plsql table ',222);
5334: --
5335: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PL_ID' ;
5329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCN.information1 ;
5330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PL_ID ;
5331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5333: hr_utility.set_location('After plsql table ',222);
5334: --
5335: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5336: --
5331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCN_unique.table_route_id;
5333: hr_utility.set_location('After plsql table ',222);
5334: --
5335: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5336: --
5337: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5338: --
5339: else
5333: hr_utility.set_location('After plsql table ',222);
5334: --
5335: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5336: --
5337: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5338: --
5339: else
5340: --
5341: -- Call Update routine for the pk_id created in prev run .
5451: end loop;
5452: --
5453: exception when others then
5454: --
5455: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'WCN',r_wcn.information5 );
5456: --
5457: end create_WCN_rows;
5458:
5459: --
5592: end if ;
5593: -- End Prefix Sufix derivation
5594: for r_WPN_unique in c_unique_WPN('WPN') loop
5595:
5596: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5597: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5598: r_WPN_unique.information3 >=
5599: ben_pd_copy_to_ben_one.g_copy_effective_date)
5600: ) then
5593: -- End Prefix Sufix derivation
5594: for r_WPN_unique in c_unique_WPN('WPN') loop
5595:
5596: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5597: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5598: r_WPN_unique.information3 >=
5599: ben_pd_copy_to_ben_one.g_copy_effective_date)
5600: ) then
5601:
5595:
5596: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
5597: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5598: r_WPN_unique.information3 >=
5599: ben_pd_copy_to_ben_one.g_copy_effective_date)
5600: ) then
5601:
5602: --
5603: hr_utility.set_location(' r_WPN_unique.table_route_id '||r_WPN_unique.table_route_id,10);
5631: l_object_found_in_target := TRUE;
5632: --
5633: if l_process_date between r_WPN_unique.information2 and r_WPN_unique.information3 then
5634: l_update := true;
5635: if r_WPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5636: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID'
5637: then
5638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5632: --
5633: if l_process_date between r_WPN_unique.information2 and r_WPN_unique.information3 then
5634: l_update := true;
5635: if r_WPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5636: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID'
5637: then
5638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPN_unique.information1 ;
5634: l_update := true;
5635: if r_WPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5636: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID'
5637: then
5638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPN_unique.information1 ;
5641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5635: if r_WPN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
5636: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID'
5637: then
5638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPN_unique.information1 ;
5641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5643: --
5636: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID'
5637: then
5638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPN_unique.information1 ;
5641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5643: --
5644: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5637: then
5638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPN_unique.information1 ;
5641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5643: --
5644: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5645: --
5638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPN_unique.information1 ;
5641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5643: --
5644: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5645: --
5646: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5643: --
5644: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
5645: --
5646: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5647: --
5648: -- DOUBT log_data('WPN',l_new_value,l_prefix || r_WPN_unique.name|| l_suffix,'REUSED');
5649: --
5650: end if ;
5663: open c_WPN_min_max_dates(r_WPN_unique.table_route_id, r_WPN_unique.information1 ) ;
5664: fetch c_WPN_min_max_dates into l_min_esd,l_max_eed ;
5665: --
5666:
5667: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5668: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5669: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5670: end if;
5671: l_min_esd := greatest(l_min_esd,r_WPN_unique.information2);
5664: fetch c_WPN_min_max_dates into l_min_esd,l_max_eed ;
5665: --
5666:
5667: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5668: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5669: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5670: end if;
5671: l_min_esd := greatest(l_min_esd,r_WPN_unique.information2);
5672: /* open c_WPN(r_WPN_unique.table_route_id,
5665: --
5666:
5667: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5668: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5669: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
5670: end if;
5671: l_min_esd := greatest(l_min_esd,r_WPN_unique.information2);
5672: /* open c_WPN(r_WPN_unique.table_route_id,
5673: r_WPN_unique.information1,
5694: p_from_date => l_min_esd,
5695: p_to_date => l_max_eed );
5696: if l_dt_rec_found THEN
5697: --END TEMPIK
5698: if r_WPN_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
5699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID' then
5700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5695: p_to_date => l_max_eed );
5696: if l_dt_rec_found THEN
5697: --END TEMPIK
5698: if r_WPN_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
5699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID' then
5700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5696: if l_dt_rec_found THEN
5697: --END TEMPIK
5698: if r_WPN_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
5699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID' then
5700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5697: --END TEMPIK
5698: if r_WPN_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
5699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID' then
5700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5705: --
5698: if r_WPN_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
5699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID' then
5700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5705: --
5706: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5699: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PL_ID' then
5700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5705: --
5706: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5707: --
5700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN_unique.information1 ;
5702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5705: --
5706: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5707: --
5708: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5702: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
5703: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
5704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5705: --
5706: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5707: --
5708: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5709: end if ;
5710: --
5704: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5705: --
5706: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
5707: --
5708: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5709: end if ;
5710: --
5711: l_object_found_in_target := true ;
5712: --TEMPIK
5739: end if ;
5740: --
5741:
5742: l_effective_date := r_WPN.information2;
5743: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5744: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5745: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5746: end if;
5747:
5740: --
5741:
5742: l_effective_date := r_WPN.information2;
5743: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5744: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5745: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5746: end if;
5747:
5748: if l_first_rec and not l_update then
5741:
5742: l_effective_date := r_WPN.information2;
5743: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
5744: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
5745: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
5746: end if;
5747:
5748: if l_first_rec and not l_update then
5749: -- Call Create routine.
5797: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
5798: -- Update all relevent cer records with new pk_id
5799: hr_utility.set_location('Before plsql table ',222);
5800: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_pl_id,222);
5801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN.information1 ;
5803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PL_ID ;
5804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5798: -- Update all relevent cer records with new pk_id
5799: hr_utility.set_location('Before plsql table ',222);
5800: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_pl_id,222);
5801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN.information1 ;
5803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PL_ID ;
5804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5806: hr_utility.set_location('After plsql table ',222);
5799: hr_utility.set_location('Before plsql table ',222);
5800: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_pl_id,222);
5801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN.information1 ;
5803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PL_ID ;
5804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5806: hr_utility.set_location('After plsql table ',222);
5807: --
5800: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_pl_id,222);
5801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN.information1 ;
5803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PL_ID ;
5804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5806: hr_utility.set_location('After plsql table ',222);
5807: --
5808: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PL_ID' ;
5802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPN.information1 ;
5803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PL_ID ;
5804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5806: hr_utility.set_location('After plsql table ',222);
5807: --
5808: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5809: --
5804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
5805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPN_unique.table_route_id;
5806: hr_utility.set_location('After plsql table ',222);
5807: --
5808: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5809: --
5810: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5811: --
5812: else
5806: hr_utility.set_location('After plsql table ',222);
5807: --
5808: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
5809: --
5810: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
5811: --
5812: else
5813: --
5814: -- Call Update routine for the pk_id created in prev run .
5921: end loop;
5922: --
5923: exception when others then
5924: --
5925: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'WPN',r_wpn.information5 );
5926: --
5927: end create_WPN_rows;
5928:
5929: --
6061: end if ;
6062: -- End Prefix Sufix derivation
6063: for r_VRP_unique in c_unique_VRP('VRP') loop
6064:
6065: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6066: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6067: r_VRP_unique.information3 >=
6068: ben_pd_copy_to_ben_one.g_copy_effective_date)
6069: ) then
6062: -- End Prefix Sufix derivation
6063: for r_VRP_unique in c_unique_VRP('VRP') loop
6064:
6065: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6066: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6067: r_VRP_unique.information3 >=
6068: ben_pd_copy_to_ben_one.g_copy_effective_date)
6069: ) then
6070:
6064:
6065: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6066: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6067: r_VRP_unique.information3 >=
6068: ben_pd_copy_to_ben_one.g_copy_effective_date)
6069: ) then
6070:
6071: --
6072: hr_utility.set_location(' r_VRP_unique.table_route_id '||r_VRP_unique.table_route_id,10);
6100: l_object_found_in_target := TRUE;
6101: --
6102: if l_process_date between r_VRP_unique.information2 and r_VRP_unique.information3 then
6103: l_update := true;
6104: if r_VRP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6105: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID'
6106: then
6107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6101: --
6102: if l_process_date between r_VRP_unique.information2 and r_VRP_unique.information3 then
6103: l_update := true;
6104: if r_VRP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6105: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID'
6106: then
6107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VRP_unique.information1 ;
6103: l_update := true;
6104: if r_VRP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6105: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID'
6106: then
6107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VRP_unique.information1 ;
6110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6104: if r_VRP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6105: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID'
6106: then
6107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VRP_unique.information1 ;
6110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6112: --
6105: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID'
6106: then
6107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VRP_unique.information1 ;
6110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6112: --
6113: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6106: then
6107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VRP_unique.information1 ;
6110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6112: --
6113: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6114: --
6107: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6108: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VRP_unique.information1 ;
6110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6112: --
6113: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6114: --
6115: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6112: --
6113: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6114: --
6115: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6116: --
6117: --DOUBT log_data('VRP',l_new_value,l_prefix || r_VRP_unique.name|| l_suffix,'REUSED');
6118: --
6119: end if ;
6132: open c_VRP_min_max_dates(r_VRP_unique.table_route_id, r_VRP_unique.information1 ) ;
6133: fetch c_VRP_min_max_dates into l_min_esd,l_max_eed ;
6134: --
6135:
6136: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6137: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6138: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6139: end if;
6140: l_min_esd := greatest(l_min_esd,r_VRP_unique.information2);
6133: fetch c_VRP_min_max_dates into l_min_esd,l_max_eed ;
6134: --
6135:
6136: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6137: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6138: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6139: end if;
6140: l_min_esd := greatest(l_min_esd,r_VRP_unique.information2);
6141: /* open c_VRP(r_VRP_unique.table_route_id,
6134: --
6135:
6136: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6137: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6138: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6139: end if;
6140: l_min_esd := greatest(l_min_esd,r_VRP_unique.information2);
6141: /* open c_VRP(r_VRP_unique.table_route_id,
6142: r_VRP_unique.information1,
6163: p_from_date => l_min_esd,
6164: p_to_date => l_max_eed );
6165: if l_dt_rec_found THEN
6166: --END TEMPIK
6167: if r_VRP_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
6168: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID' then
6169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6164: p_to_date => l_max_eed );
6165: if l_dt_rec_found THEN
6166: --END TEMPIK
6167: if r_VRP_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
6168: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID' then
6169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6172: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6165: if l_dt_rec_found THEN
6166: --END TEMPIK
6167: if r_VRP_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
6168: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID' then
6169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6172: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6173: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6166: --END TEMPIK
6167: if r_VRP_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
6168: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID' then
6169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6172: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6173: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6174: --
6167: if r_VRP_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
6168: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID' then
6169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6172: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6173: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6174: --
6175: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6168: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'VALD_RLSHP_FOR_REIMB_ID' then
6169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6172: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6173: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6174: --
6175: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6176: --
6169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP_unique.information1 ;
6171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6172: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6173: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6174: --
6175: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6176: --
6177: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6172: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6173: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6174: --
6175: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6176: --
6177: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6178: end if ;
6179: --
6173: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6174: --
6175: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6176: --
6177: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6178: end if ;
6179: --
6180: l_object_found_in_target := true ;
6181: --TEMPIK
6208: end if ;
6209: --
6210:
6211: l_effective_date := r_VRP.information2;
6212: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6213: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6214: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6215: end if;
6216:
6209: --
6210:
6211: l_effective_date := r_VRP.information2;
6212: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6213: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6214: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6215: end if;
6216:
6217: if l_first_rec and not l_update then
6210:
6211: l_effective_date := r_VRP.information2;
6212: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6213: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6214: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6215: end if;
6216:
6217: if l_first_rec and not l_update then
6218: -- Call Create routine.
6265: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
6266: -- Update all relevent cer records with new pk_id
6267: hr_utility.set_location('Before plsql table ',222);
6268: hr_utility.set_location('new_value id '||l_vald_rlshp_for_reimb_id,222);
6269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP.information1 ;
6271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VALD_RLSHP_FOR_REIMB_ID ;
6272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6266: -- Update all relevent cer records with new pk_id
6267: hr_utility.set_location('Before plsql table ',222);
6268: hr_utility.set_location('new_value id '||l_vald_rlshp_for_reimb_id,222);
6269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP.information1 ;
6271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VALD_RLSHP_FOR_REIMB_ID ;
6272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6274: hr_utility.set_location('After plsql table ',222);
6267: hr_utility.set_location('Before plsql table ',222);
6268: hr_utility.set_location('new_value id '||l_vald_rlshp_for_reimb_id,222);
6269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP.information1 ;
6271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VALD_RLSHP_FOR_REIMB_ID ;
6272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6274: hr_utility.set_location('After plsql table ',222);
6275: --
6268: hr_utility.set_location('new_value id '||l_vald_rlshp_for_reimb_id,222);
6269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP.information1 ;
6271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VALD_RLSHP_FOR_REIMB_ID ;
6272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6274: hr_utility.set_location('After plsql table ',222);
6275: --
6276: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6269: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'VALD_RLSHP_FOR_REIMB_ID' ;
6270: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VRP.information1 ;
6271: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_VALD_RLSHP_FOR_REIMB_ID ;
6272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6274: hr_utility.set_location('After plsql table ',222);
6275: --
6276: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6277: --
6272: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6273: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VRP_unique.table_route_id;
6274: hr_utility.set_location('After plsql table ',222);
6275: --
6276: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6277: --
6278: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6279: --
6280: else
6274: hr_utility.set_location('After plsql table ',222);
6275: --
6276: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6277: --
6278: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6279: --
6280: else
6281: --
6282: -- Call Update routine for the pk_id created in prev run .
6387: end loop;
6388: --
6389: exception when others then
6390: --
6391: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'VRP',r_vrp.information5 );
6392: --
6393: end create_VRP_rows;
6394:
6395: --
6530: end if ;
6531: -- End Prefix Sufix derivation
6532: for r_PCT_unique in c_unique_PCT('PCT') loop
6533:
6534: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6535: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6536: r_PCT_unique.information3 >=
6537: ben_pd_copy_to_ben_one.g_copy_effective_date)
6538: ) then
6531: -- End Prefix Sufix derivation
6532: for r_PCT_unique in c_unique_PCT('PCT') loop
6533:
6534: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6535: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6536: r_PCT_unique.information3 >=
6537: ben_pd_copy_to_ben_one.g_copy_effective_date)
6538: ) then
6539: --
6533:
6534: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
6535: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6536: r_PCT_unique.information3 >=
6537: ben_pd_copy_to_ben_one.g_copy_effective_date)
6538: ) then
6539: --
6540: hr_utility.set_location(' r_PCT_unique.table_route_id '||r_PCT_unique.table_route_id,10);
6541: hr_utility.set_location(' r_PCT_unique.information1 '||r_PCT_unique.information1,10);
6570: l_object_found_in_target := TRUE;
6571: --
6572: if l_process_date between r_PCT_unique.information2 and r_PCT_unique.information3 then
6573: l_update := true;
6574: if r_PCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6575: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID'
6576: then
6577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6571: --
6572: if l_process_date between r_PCT_unique.information2 and r_PCT_unique.information3 then
6573: l_update := true;
6574: if r_PCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6575: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID'
6576: then
6577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCT_unique.information1 ;
6573: l_update := true;
6574: if r_PCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6575: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID'
6576: then
6577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCT_unique.information1 ;
6580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6574: if r_PCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
6575: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID'
6576: then
6577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCT_unique.information1 ;
6580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6582: --
6575: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID'
6576: then
6577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCT_unique.information1 ;
6580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6582: --
6583: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6576: then
6577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCT_unique.information1 ;
6580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6582: --
6583: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6584: --
6577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCT_unique.information1 ;
6580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6582: --
6583: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6584: --
6585: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6582: --
6583: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
6584: --
6585: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6586: --
6587: --DOUBT log_data('PCT',l_new_value,l_prefix || r_PCT_unique.name|| l_suffix,'REUSED');
6588: --
6589: end if ;
6602: open c_PCT_min_max_dates(r_PCT_unique.table_route_id, r_PCT_unique.information1 ) ;
6603: fetch c_PCT_min_max_dates into l_min_esd,l_max_eed ;
6604: --
6605:
6606: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6607: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6608: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6609: end if;
6610: l_min_esd := greatest(l_min_esd,r_PCT_unique.information2);
6603: fetch c_PCT_min_max_dates into l_min_esd,l_max_eed ;
6604: --
6605:
6606: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6607: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6608: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6609: end if;
6610: l_min_esd := greatest(l_min_esd,r_PCT_unique.information2);
6611: /* open c_PCT(r_PCT_unique.table_route_id,
6604: --
6605:
6606: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6607: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6608: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
6609: end if;
6610: l_min_esd := greatest(l_min_esd,r_PCT_unique.information2);
6611: /* open c_PCT(r_PCT_unique.table_route_id,
6612: r_PCT_unique.information1,
6633: p_from_date => l_min_esd,
6634: p_to_date => l_max_eed );
6635: if l_dt_rec_found THEN
6636: --END TEMPIK
6637: if r_PCT_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
6638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID' then
6639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6634: p_to_date => l_max_eed );
6635: if l_dt_rec_found THEN
6636: --END TEMPIK
6637: if r_PCT_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
6638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID' then
6639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6635: if l_dt_rec_found THEN
6636: --END TEMPIK
6637: if r_PCT_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
6638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID' then
6639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6636: --END TEMPIK
6637: if r_PCT_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
6638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID' then
6639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6644: --
6637: if r_PCT_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
6638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID' then
6639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6644: --
6645: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6638: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_R_SVC_CTFN_ID' then
6639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6644: --
6645: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6646: --
6639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT_unique.information1 ;
6641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6644: --
6645: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6646: --
6647: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6641: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
6642: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
6643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6644: --
6645: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6646: --
6647: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6648: end if ;
6649: --
6643: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6644: --
6645: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
6646: --
6647: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6648: end if ;
6649: --
6650: l_object_found_in_target := true ;
6651: --TEMPIK
6679: end if ;
6680: --
6681:
6682: l_effective_date := r_PCT.information2;
6683: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6684: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6685: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6686: end if;
6687:
6680: --
6681:
6682: l_effective_date := r_PCT.information2;
6683: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6684: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6685: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6686: end if;
6687:
6688: if l_first_rec and not l_update then
6681:
6682: l_effective_date := r_PCT.information2;
6683: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
6684: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
6685: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
6686: end if;
6687:
6688: if l_first_rec and not l_update then
6689: -- Call Create routine.
6742: -- Update all relevent cer records with new pk_id
6743:
6744: hr_utility.set_location('Before plsql table ',222);
6745: hr_utility.set_location('new_value id '||l_pl_gd_r_svc_ctfn_id,222);
6746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT.information1 ;
6748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_R_SVC_CTFN_ID ;
6749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6743:
6744: hr_utility.set_location('Before plsql table ',222);
6745: hr_utility.set_location('new_value id '||l_pl_gd_r_svc_ctfn_id,222);
6746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT.information1 ;
6748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_R_SVC_CTFN_ID ;
6749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6751: hr_utility.set_location('After plsql table ',222);
6744: hr_utility.set_location('Before plsql table ',222);
6745: hr_utility.set_location('new_value id '||l_pl_gd_r_svc_ctfn_id,222);
6746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT.information1 ;
6748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_R_SVC_CTFN_ID ;
6749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6751: hr_utility.set_location('After plsql table ',222);
6752: --
6745: hr_utility.set_location('new_value id '||l_pl_gd_r_svc_ctfn_id,222);
6746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT.information1 ;
6748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_R_SVC_CTFN_ID ;
6749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6751: hr_utility.set_location('After plsql table ',222);
6752: --
6753: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_R_SVC_CTFN_ID' ;
6747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCT.information1 ;
6748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_R_SVC_CTFN_ID ;
6749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6751: hr_utility.set_location('After plsql table ',222);
6752: --
6753: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6754: --
6749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
6750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCT_unique.table_route_id;
6751: hr_utility.set_location('After plsql table ',222);
6752: --
6753: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6754: --
6755: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6756: --
6757: else
6751: hr_utility.set_location('After plsql table ',222);
6752: --
6753: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
6754: --
6755: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
6756: --
6757: else
6758: --
6759: -- Call Update routine for the pk_id created in prev run .
6868: end loop;
6869: --
6870: exception when others then
6871: --
6872: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PCT',r_pct.information5 );
6873: --
6874: end create_PCT_rows;
6875:
6876: --
7008: end if ;
7009: -- End Prefix Sufix derivation
7010: for r_VGS_unique in c_unique_VGS('VGS') loop
7011:
7012: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7013: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7014: r_VGS_unique.information3 >=
7015: ben_pd_copy_to_ben_one.g_copy_effective_date)
7016: ) then
7009: -- End Prefix Sufix derivation
7010: for r_VGS_unique in c_unique_VGS('VGS') loop
7011:
7012: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7013: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7014: r_VGS_unique.information3 >=
7015: ben_pd_copy_to_ben_one.g_copy_effective_date)
7016: ) then
7017: --
7011:
7012: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7013: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7014: r_VGS_unique.information3 >=
7015: ben_pd_copy_to_ben_one.g_copy_effective_date)
7016: ) then
7017: --
7018: hr_utility.set_location(' r_VGS_unique.table_route_id '||r_VGS_unique.table_route_id,10);
7019: hr_utility.set_location(' r_VGS_unique.information1 '||r_VGS_unique.information1,10);
7046: l_object_found_in_target := TRUE;
7047: --
7048: if l_process_date between r_VGS_unique.information2 and r_VGS_unique.information3 then
7049: l_update := true;
7050: if r_VGS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7051: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID'
7052: then
7053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7047: --
7048: if l_process_date between r_VGS_unique.information2 and r_VGS_unique.information3 then
7049: l_update := true;
7050: if r_VGS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7051: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID'
7052: then
7053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VGS_unique.information1 ;
7049: l_update := true;
7050: if r_VGS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7051: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID'
7052: then
7053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VGS_unique.information1 ;
7056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7050: if r_VGS_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7051: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID'
7052: then
7053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VGS_unique.information1 ;
7056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7058: --
7051: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID'
7052: then
7053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VGS_unique.information1 ;
7056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7058: --
7059: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7052: then
7053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VGS_unique.information1 ;
7056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7058: --
7059: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7060: --
7053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_VGS_unique.information1 ;
7056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7058: --
7059: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7060: --
7061: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7058: --
7059: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7060: --
7061: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7062: --
7063: --DOUBT log_data('VGS',l_new_value,l_prefix || r_VGS_unique.name|| l_suffix,'REUSED');
7064: --
7065: end if ;
7079: open c_VGS_min_max_dates(r_VGS_unique.table_route_id, r_VGS_unique.information1 ) ;
7080: fetch c_VGS_min_max_dates into l_min_esd,l_max_eed ;
7081: --
7082:
7083: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7084: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7085: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7086: end if;
7087: l_min_esd := greatest(l_min_esd,r_VGS_unique.information2);
7080: fetch c_VGS_min_max_dates into l_min_esd,l_max_eed ;
7081: --
7082:
7083: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7084: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7085: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7086: end if;
7087: l_min_esd := greatest(l_min_esd,r_VGS_unique.information2);
7088: /* open c_VGS(r_VGS_unique.table_route_id,
7081: --
7082:
7083: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7084: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7085: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7086: end if;
7087: l_min_esd := greatest(l_min_esd,r_VGS_unique.information2);
7088: /* open c_VGS(r_VGS_unique.table_route_id,
7089: r_VGS_unique.information1,
7110: p_from_date => l_min_esd,
7111: p_to_date => l_max_eed );
7112: if l_dt_rec_found THEN
7113: --END TEMPIK
7114: if r_VGS_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
7115: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID' then
7116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7111: p_to_date => l_max_eed );
7112: if l_dt_rec_found THEN
7113: --END TEMPIK
7114: if r_VGS_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
7115: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID' then
7116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7112: if l_dt_rec_found THEN
7113: --END TEMPIK
7114: if r_VGS_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
7115: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID' then
7116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7113: --END TEMPIK
7114: if r_VGS_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
7115: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID' then
7116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7121: --
7114: if r_VGS_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
7115: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID' then
7116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7121: --
7122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7115: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_GD_OR_SVC_ID' then
7116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7121: --
7122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7123: --
7116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS_unique.information1 ;
7118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7121: --
7122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7123: --
7124: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7121: --
7122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7123: --
7124: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7125: end if ;
7126: --
7120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7121: --
7122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7123: --
7124: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7125: end if ;
7126: --
7127: l_object_found_in_target := true ;
7128: --TEMPIK
7155: end if ;
7156: --
7157:
7158: l_effective_date := r_VGS.information2;
7159: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7160: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7161: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7162: end if;
7163:
7156: --
7157:
7158: l_effective_date := r_VGS.information2;
7159: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7160: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7161: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7162: end if;
7163:
7164: if l_first_rec and not l_update then
7157:
7158: l_effective_date := r_VGS.information2;
7159: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7160: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7161: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7162: end if;
7163:
7164: if l_first_rec and not l_update then
7165: -- Call Create routine.
7217: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
7218: -- Update all relevent cer records with new pk_id
7219: hr_utility.set_location('Before plsql table ',222);
7220: hr_utility.set_location('new_value id '||l_pl_gd_or_svc_id,222);
7221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS.information1 ;
7223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_OR_SVC_ID ;
7224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7218: -- Update all relevent cer records with new pk_id
7219: hr_utility.set_location('Before plsql table ',222);
7220: hr_utility.set_location('new_value id '||l_pl_gd_or_svc_id,222);
7221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS.information1 ;
7223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_OR_SVC_ID ;
7224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7226: hr_utility.set_location('After plsql table ',222);
7219: hr_utility.set_location('Before plsql table ',222);
7220: hr_utility.set_location('new_value id '||l_pl_gd_or_svc_id,222);
7221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS.information1 ;
7223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_OR_SVC_ID ;
7224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7226: hr_utility.set_location('After plsql table ',222);
7227: --
7220: hr_utility.set_location('new_value id '||l_pl_gd_or_svc_id,222);
7221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS.information1 ;
7223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_OR_SVC_ID ;
7224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7226: hr_utility.set_location('After plsql table ',222);
7227: --
7228: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_GD_OR_SVC_ID' ;
7222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_VGS.information1 ;
7223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_GD_OR_SVC_ID ;
7224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7226: hr_utility.set_location('After plsql table ',222);
7227: --
7228: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7229: --
7224: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7225: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_VGS_unique.table_route_id;
7226: hr_utility.set_location('After plsql table ',222);
7227: --
7228: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7229: --
7230: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7231: --
7232: else
7226: hr_utility.set_location('After plsql table ',222);
7227: --
7228: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7229: --
7230: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7231: --
7232: else
7233: --
7234: -- Call Update routine for the pk_id created in prev run .
7344: end loop;
7345: --
7346: exception when others then
7347: --
7348: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'VGS',r_vgs.information5 );
7349: --
7350: end create_VGS_rows;
7351:
7352: --
7491: end if ;
7492: -- End Prefix Sufix derivation
7493: for r_LBR_unique in c_unique_LBR('LBR') loop
7494:
7495: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7496: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7497: r_LBR_unique.information3 >=
7498: ben_pd_copy_to_ben_one.g_copy_effective_date)
7499: ) then
7492: -- End Prefix Sufix derivation
7493: for r_LBR_unique in c_unique_LBR('LBR') loop
7494:
7495: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7496: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7497: r_LBR_unique.information3 >=
7498: ben_pd_copy_to_ben_one.g_copy_effective_date)
7499: ) then
7500:
7494:
7495: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
7496: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7497: r_LBR_unique.information3 >=
7498: ben_pd_copy_to_ben_one.g_copy_effective_date)
7499: ) then
7500:
7501: --
7502: hr_utility.set_location(' r_LBR_unique.table_route_id '||r_LBR_unique.table_route_id,10);
7534: l_object_found_in_target := TRUE;
7535: --
7536: if l_process_date between r_LBR_unique.information2 and r_LBR_unique.information3 then
7537: l_update := true;
7538: if r_LBR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7539: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID'
7540: then
7541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7542: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7535: --
7536: if l_process_date between r_LBR_unique.information2 and r_LBR_unique.information3 then
7537: l_update := true;
7538: if r_LBR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7539: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID'
7540: then
7541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7542: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7543: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBR_unique.information1 ;
7537: l_update := true;
7538: if r_LBR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7539: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID'
7540: then
7541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7542: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7543: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBR_unique.information1 ;
7544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7538: if r_LBR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
7539: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID'
7540: then
7541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7542: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7543: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBR_unique.information1 ;
7544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7546: --
7539: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID'
7540: then
7541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7542: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7543: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBR_unique.information1 ;
7544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7546: --
7547: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7540: then
7541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7542: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7543: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBR_unique.information1 ;
7544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7546: --
7547: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7548: --
7541: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7542: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7543: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LBR_unique.information1 ;
7544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7546: --
7547: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7548: --
7549: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7546: --
7547: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
7548: --
7549: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7550: --
7551: --DOUBT log_data('LBR',l_new_value,l_prefix || r_LBR_unique.name|| l_suffix,'REUSED');
7552: --
7553: end if ;
7566: open c_LBR_min_max_dates(r_LBR_unique.table_route_id, r_LBR_unique.information1 ) ;
7567: fetch c_LBR_min_max_dates into l_min_esd,l_max_eed ;
7568: --
7569:
7570: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7571: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7572: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7573: end if;
7574: l_min_esd := greatest(l_min_esd,r_LBR_unique.information2);
7567: fetch c_LBR_min_max_dates into l_min_esd,l_max_eed ;
7568: --
7569:
7570: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7571: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7572: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7573: end if;
7574: l_min_esd := greatest(l_min_esd,r_LBR_unique.information2);
7575: /* open c_LBR(r_LBR_unique.table_route_id,
7568: --
7569:
7570: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7571: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7572: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
7573: end if;
7574: l_min_esd := greatest(l_min_esd,r_LBR_unique.information2);
7575: /* open c_LBR(r_LBR_unique.table_route_id,
7576: r_LBR_unique.information1,
7598: p_from_date => l_min_esd,
7599: p_to_date => l_max_eed );
7600: if l_dt_rec_found THEN
7601: --END TEMPIK
7602: if r_LBR_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
7603: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID' then
7604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7599: p_to_date => l_max_eed );
7600: if l_dt_rec_found THEN
7601: --END TEMPIK
7602: if r_LBR_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
7603: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID' then
7604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7600: if l_dt_rec_found THEN
7601: --END TEMPIK
7602: if r_LBR_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
7603: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID' then
7604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7601: --END TEMPIK
7602: if r_LBR_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
7603: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID' then
7604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7609: --
7602: if r_LBR_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
7603: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID' then
7604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7609: --
7610: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7603: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_BNFT_RSTRN_ID' then
7604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7609: --
7610: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7611: --
7604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR_unique.information1 ;
7606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7609: --
7610: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7611: --
7612: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
7607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
7608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7609: --
7610: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7611: --
7612: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7613: end if ;
7614: --
7608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7609: --
7610: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
7611: --
7612: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7613: end if ;
7614: --
7615: l_object_found_in_target := true ;
7616: --TEMPIK
7644: end if ;
7645: --
7646:
7647: l_effective_date := r_LBR.information2;
7648: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7649: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7650: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7651: end if;
7652:
7645: --
7646:
7647: l_effective_date := r_LBR.information2;
7648: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7649: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7650: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7651: end if;
7652:
7653: if l_first_rec and not l_update then
7646:
7647: l_effective_date := r_LBR.information2;
7648: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
7649: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
7650: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
7651: end if;
7652:
7653: if l_first_rec and not l_update then
7654: -- Call Create routine.
7722: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
7723: -- Update all relevent cer records with new pk_id
7724: hr_utility.set_location('Before plsql table ',222);
7725: hr_utility.set_location('new_value id '||l_ler_bnft_rstrn_id,222);
7726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR.information1 ;
7728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_ID ;
7729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7723: -- Update all relevent cer records with new pk_id
7724: hr_utility.set_location('Before plsql table ',222);
7725: hr_utility.set_location('new_value id '||l_ler_bnft_rstrn_id,222);
7726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR.information1 ;
7728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_ID ;
7729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7731: hr_utility.set_location('After plsql table ',222);
7724: hr_utility.set_location('Before plsql table ',222);
7725: hr_utility.set_location('new_value id '||l_ler_bnft_rstrn_id,222);
7726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR.information1 ;
7728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_ID ;
7729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7731: hr_utility.set_location('After plsql table ',222);
7732: --
7725: hr_utility.set_location('new_value id '||l_ler_bnft_rstrn_id,222);
7726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR.information1 ;
7728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_ID ;
7729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7731: hr_utility.set_location('After plsql table ',222);
7732: --
7733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7726: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_BNFT_RSTRN_ID' ;
7727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LBR.information1 ;
7728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_BNFT_RSTRN_ID ;
7729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7731: hr_utility.set_location('After plsql table ',222);
7732: --
7733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7734: --
7729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
7730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LBR_unique.table_route_id;
7731: hr_utility.set_location('After plsql table ',222);
7732: --
7733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7734: --
7735: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7736: --
7737: else
7731: hr_utility.set_location('After plsql table ',222);
7732: --
7733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
7734: --
7735: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
7736: --
7737: else
7738: --
7739: -- Call Update routine for the pk_id created in prev run .
7866: end loop;
7867: --
7868: exception when others then
7869: --
7870: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LBR',r_lbr.information5 );
7871: --
7872: end create_LBR_rows;
7873:
7874: --
8009: end if ;
8010: -- End Prefix Sufix derivation
8011: for r_LPR1_unique in c_unique_LPR1('LPR1') loop
8012:
8013: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8014: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8015: r_LPR1_unique.information3 >=
8016: ben_pd_copy_to_ben_one.g_copy_effective_date)
8017: ) then
8010: -- End Prefix Sufix derivation
8011: for r_LPR1_unique in c_unique_LPR1('LPR1') loop
8012:
8013: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8014: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8015: r_LPR1_unique.information3 >=
8016: ben_pd_copy_to_ben_one.g_copy_effective_date)
8017: ) then
8018:
8012:
8013: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8014: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8015: r_LPR1_unique.information3 >=
8016: ben_pd_copy_to_ben_one.g_copy_effective_date)
8017: ) then
8018:
8019: --
8020: hr_utility.set_location(' r_LPR1_unique.table_route_id '||r_LPR1_unique.table_route_id,10);
8049: l_object_found_in_target := TRUE;
8050: --
8051: if l_process_date between r_LPR1_unique.information2 and r_LPR1_unique.information3 then
8052: l_update := true;
8053: if r_LPR1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8054: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID'
8055: then
8056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8050: --
8051: if l_process_date between r_LPR1_unique.information2 and r_LPR1_unique.information3 then
8052: l_update := true;
8053: if r_LPR1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8054: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID'
8055: then
8056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8058: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPR1_unique.information1 ;
8052: l_update := true;
8053: if r_LPR1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8054: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID'
8055: then
8056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8058: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPR1_unique.information1 ;
8059: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8053: if r_LPR1_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8054: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID'
8055: then
8056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8058: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPR1_unique.information1 ;
8059: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8061: --
8054: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID'
8055: then
8056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8058: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPR1_unique.information1 ;
8059: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8061: --
8062: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8055: then
8056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8058: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPR1_unique.information1 ;
8059: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8061: --
8062: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8063: --
8056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8057: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8058: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LPR1_unique.information1 ;
8059: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8061: --
8062: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8063: --
8064: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8060: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8061: --
8062: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8063: --
8064: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8065: --
8066: --DOUBT log_data('LPR1',l_new_value,l_prefix || r_LPR1_unique.name|| l_suffix,'REUSED');
8067: --
8068: end if ;
8082: open c_LPR1_min_max_dates(r_LPR1_unique.table_route_id, r_LPR1_unique.information1 ) ;
8083: fetch c_LPR1_min_max_dates into l_min_esd,l_max_eed ;
8084: --
8085:
8086: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8087: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8088: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8089: end if;
8090: l_min_esd := greatest(l_min_esd,r_LPR1_unique.information2);
8083: fetch c_LPR1_min_max_dates into l_min_esd,l_max_eed ;
8084: --
8085:
8086: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8087: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8088: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8089: end if;
8090: l_min_esd := greatest(l_min_esd,r_LPR1_unique.information2);
8091: /* open c_LPR1(r_LPR1_unique.table_route_id,
8084: --
8085:
8086: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8087: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8088: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8089: end if;
8090: l_min_esd := greatest(l_min_esd,r_LPR1_unique.information2);
8091: /* open c_LPR1(r_LPR1_unique.table_route_id,
8092: r_LPR1_unique.information1,
8113: p_from_date => l_min_esd,
8114: p_to_date => l_max_eed );
8115: if l_dt_rec_found THEN
8116: --END TEMPIK
8117: if r_LPR1_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
8118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID' then
8119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8114: p_to_date => l_max_eed );
8115: if l_dt_rec_found THEN
8116: --END TEMPIK
8117: if r_LPR1_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
8118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID' then
8119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8115: if l_dt_rec_found THEN
8116: --END TEMPIK
8117: if r_LPR1_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
8118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID' then
8119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8116: --END TEMPIK
8117: if r_LPR1_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
8118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID' then
8119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8124: --
8117: if r_LPR1_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
8118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID' then
8119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8124: --
8125: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8118: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PLIP_ENRT_ID' then
8119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8124: --
8125: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8126: --
8119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1_unique.information1 ;
8121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8124: --
8125: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8126: --
8127: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8124: --
8125: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8126: --
8127: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8128: end if ;
8129: --
8123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8124: --
8125: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8126: --
8127: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8128: end if ;
8129: --
8130: l_object_found_in_target := true ;
8131: --TEMPIK
8159: end if ;
8160: --
8161:
8162: l_effective_date := r_LPR1.information2;
8163: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8164: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8165: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8166: end if;
8167:
8160: --
8161:
8162: l_effective_date := r_LPR1.information2;
8163: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8164: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8165: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8166: end if;
8167:
8168: if l_first_rec and not l_update then
8161:
8162: l_effective_date := r_LPR1.information2;
8163: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8164: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8165: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8166: end if;
8167:
8168: if l_first_rec and not l_update then
8169: -- Call Create routine.
8226: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
8227: -- Update all relevent cer records with new pk_id
8228: hr_utility.set_location('Before plsql table ',222);
8229: hr_utility.set_location('new_value id '||l_ler_chg_plip_enrt_id,222);
8230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1.information1 ;
8232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PLIP_ENRT_ID ;
8233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8227: -- Update all relevent cer records with new pk_id
8228: hr_utility.set_location('Before plsql table ',222);
8229: hr_utility.set_location('new_value id '||l_ler_chg_plip_enrt_id,222);
8230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1.information1 ;
8232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PLIP_ENRT_ID ;
8233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8235: hr_utility.set_location('After plsql table ',222);
8228: hr_utility.set_location('Before plsql table ',222);
8229: hr_utility.set_location('new_value id '||l_ler_chg_plip_enrt_id,222);
8230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1.information1 ;
8232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PLIP_ENRT_ID ;
8233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8235: hr_utility.set_location('After plsql table ',222);
8236: --
8229: hr_utility.set_location('new_value id '||l_ler_chg_plip_enrt_id,222);
8230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1.information1 ;
8232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PLIP_ENRT_ID ;
8233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8235: hr_utility.set_location('After plsql table ',222);
8236: --
8237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PLIP_ENRT_ID' ;
8231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LPR1.information1 ;
8232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PLIP_ENRT_ID ;
8233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8235: hr_utility.set_location('After plsql table ',222);
8236: --
8237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8238: --
8233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LPR1_unique.table_route_id;
8235: hr_utility.set_location('After plsql table ',222);
8236: --
8237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8238: --
8239: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8240: --
8241: else
8235: hr_utility.set_location('After plsql table ',222);
8236: --
8237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8238: --
8239: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8240: --
8241: else
8242: --
8243: -- Call Update routine for the pk_id created in prev run .
8357: end loop;
8358: --
8359: exception when others then
8360: --
8361: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LPR1',r_LPR1.information5 );
8362: --
8363: end create_LPR1_rows;
8364:
8365: --
8514: end if ;
8515: -- End Prefix Sufix derivation
8516: for r_CPP_unique in c_unique_CPP('CPP') loop
8517:
8518: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8519: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8520: r_CPP_unique.information3 >=
8521: ben_pd_copy_to_ben_one.g_copy_effective_date)
8522: ) then
8515: -- End Prefix Sufix derivation
8516: for r_CPP_unique in c_unique_CPP('CPP') loop
8517:
8518: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8519: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8520: r_CPP_unique.information3 >=
8521: ben_pd_copy_to_ben_one.g_copy_effective_date)
8522: ) then
8523: --
8517:
8518: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
8519: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8520: r_CPP_unique.information3 >=
8521: ben_pd_copy_to_ben_one.g_copy_effective_date)
8522: ) then
8523: --
8524: hr_utility.set_location(' r_CPP_unique.table_route_id '||r_CPP_unique.table_route_id,10);
8525: hr_utility.set_location(' r_CPP_unique.information1 '||r_CPP_unique.information1,10);
8566: l_object_found_in_target := TRUE;
8567: --
8568: if l_process_date between r_CPP_unique.information2 and r_CPP_unique.information3 then
8569: l_update := true;
8570: if r_CPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8571: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID'
8572: then
8573: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8574: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8567: --
8568: if l_process_date between r_CPP_unique.information2 and r_CPP_unique.information3 then
8569: l_update := true;
8570: if r_CPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8571: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID'
8572: then
8573: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8574: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPP_unique.information1 ;
8569: l_update := true;
8570: if r_CPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8571: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID'
8572: then
8573: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8574: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPP_unique.information1 ;
8576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8570: if r_CPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
8571: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID'
8572: then
8573: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8574: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPP_unique.information1 ;
8576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8578: --
8571: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID'
8572: then
8573: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8574: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPP_unique.information1 ;
8576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8578: --
8579: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8572: then
8573: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8574: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPP_unique.information1 ;
8576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8578: --
8579: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8580: --
8573: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8574: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8575: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPP_unique.information1 ;
8576: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8578: --
8579: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8580: --
8581: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8578: --
8579: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
8580: --
8581: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8582: --
8583: --DOUBT log_data('CPP',l_new_value,l_prefix || r_CPP_unique.name|| l_suffix,'REUSED');
8584: --
8585: end if ;
8598: open c_CPP_min_max_dates(r_CPP_unique.table_route_id, r_CPP_unique.information1 ) ;
8599: fetch c_CPP_min_max_dates into l_min_esd,l_max_eed ;
8600: --
8601:
8602: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8603: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8604: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8605: end if;
8606: l_min_esd := greatest(l_min_esd,r_CPP_unique.information2);
8599: fetch c_CPP_min_max_dates into l_min_esd,l_max_eed ;
8600: --
8601:
8602: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8603: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8604: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8605: end if;
8606: l_min_esd := greatest(l_min_esd,r_CPP_unique.information2);
8607: /* open c_CPP(r_CPP_unique.table_route_id,
8600: --
8601:
8602: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8603: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8604: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
8605: end if;
8606: l_min_esd := greatest(l_min_esd,r_CPP_unique.information2);
8607: /* open c_CPP(r_CPP_unique.table_route_id,
8608: r_CPP_unique.information1,
8629: p_from_date => l_min_esd,
8630: p_to_date => l_max_eed );
8631: if l_dt_rec_found THEN
8632: --END TEMPIK
8633: if r_CPP_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
8634: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID' then
8635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8630: p_to_date => l_max_eed );
8631: if l_dt_rec_found THEN
8632: --END TEMPIK
8633: if r_CPP_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
8634: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID' then
8635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8631: if l_dt_rec_found THEN
8632: --END TEMPIK
8633: if r_CPP_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
8634: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID' then
8635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8632: --END TEMPIK
8633: if r_CPP_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
8634: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID' then
8635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8640: --
8633: if r_CPP_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
8634: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID' then
8635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8640: --
8641: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8634: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PLIP_ID' then
8635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8640: --
8641: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8642: --
8635: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP_unique.information1 ;
8637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8640: --
8641: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8642: --
8643: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
8638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
8639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8640: --
8641: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8642: --
8643: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8644: end if ;
8645: --
8639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8640: --
8641: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
8642: --
8643: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8644: end if ;
8645: --
8646: l_object_found_in_target := true ;
8647: --TEMPIK
8674: end if ;
8675: --
8676:
8677: l_effective_date := r_CPP.information2;
8678: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8679: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8680: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8681: end if;
8682:
8675: --
8676:
8677: l_effective_date := r_CPP.information2;
8678: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8679: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8680: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8681: end if;
8682:
8683: if l_first_rec and not l_update then
8676:
8677: l_effective_date := r_CPP.information2;
8678: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
8679: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
8680: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
8681: end if;
8682:
8683: if l_first_rec and not l_update then
8684:
8785: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
8786: -- Update all relevent cer records with new pk_id
8787: hr_utility.set_location('Before plsql table ',222);
8788: hr_utility.set_location('new_value id '||l_plip_id,222);
8789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP.information1 ;
8791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PLIP_ID ;
8792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8786: -- Update all relevent cer records with new pk_id
8787: hr_utility.set_location('Before plsql table ',222);
8788: hr_utility.set_location('new_value id '||l_plip_id,222);
8789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP.information1 ;
8791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PLIP_ID ;
8792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8794: hr_utility.set_location('After plsql table ',222);
8787: hr_utility.set_location('Before plsql table ',222);
8788: hr_utility.set_location('new_value id '||l_plip_id,222);
8789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP.information1 ;
8791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PLIP_ID ;
8792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8794: hr_utility.set_location('After plsql table ',222);
8795: --
8788: hr_utility.set_location('new_value id '||l_plip_id,222);
8789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP.information1 ;
8791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PLIP_ID ;
8792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8794: hr_utility.set_location('After plsql table ',222);
8795: --
8796: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8789: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PLIP_ID' ;
8790: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPP.information1 ;
8791: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PLIP_ID ;
8792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8794: hr_utility.set_location('After plsql table ',222);
8795: --
8796: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8797: --
8792: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
8793: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPP_unique.table_route_id;
8794: hr_utility.set_location('After plsql table ',222);
8795: --
8796: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8797: --
8798: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8799: --
8800: else
8794: hr_utility.set_location('After plsql table ',222);
8795: --
8796: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
8797: --
8798: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
8799: --
8800: else
8801: --
8802: -- Call Update routine for the pk_id created in prev run .
8961: end loop;
8962: --
8963: exception when others then
8964: --
8965: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CPP',r_cpp.information5 );
8966: --
8967: end create_CPP_rows;
8968:
8969: --
9107: end if ;
9108: -- End Prefix Sufix derivation
9109: for r_PYD_unique in c_unique_PYD('PYD') loop
9110:
9111: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9112: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9113: r_PYD_unique.information3 >=
9114: ben_pd_copy_to_ben_one.g_copy_effective_date)
9115: ) then
9108: -- End Prefix Sufix derivation
9109: for r_PYD_unique in c_unique_PYD('PYD') loop
9110:
9111: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9112: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9113: r_PYD_unique.information3 >=
9114: ben_pd_copy_to_ben_one.g_copy_effective_date)
9115: ) then
9116: --
9110:
9111: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9112: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9113: r_PYD_unique.information3 >=
9114: ben_pd_copy_to_ben_one.g_copy_effective_date)
9115: ) then
9116: --
9117: hr_utility.set_location(' r_PYD_unique.table_route_id '||r_PYD_unique.table_route_id,10);
9118: hr_utility.set_location(' r_PYD_unique.information1 '||r_PYD_unique.information1,10);
9147: l_object_found_in_target := TRUE;
9148: --
9149: if l_process_date between r_PYD_unique.information2 and r_PYD_unique.information3 then
9150: l_update := true;
9151: if r_PYD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9152: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID'
9153: then
9154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9148: --
9149: if l_process_date between r_PYD_unique.information2 and r_PYD_unique.information3 then
9150: l_update := true;
9151: if r_PYD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9152: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID'
9153: then
9154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PYD_unique.information1 ;
9150: l_update := true;
9151: if r_PYD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9152: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID'
9153: then
9154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PYD_unique.information1 ;
9157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9151: if r_PYD_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9152: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID'
9153: then
9154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PYD_unique.information1 ;
9157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9159: --
9152: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID'
9153: then
9154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PYD_unique.information1 ;
9157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9159: --
9160: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9153: then
9154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PYD_unique.information1 ;
9157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9159: --
9160: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9161: --
9154: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9155: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9156: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PYD_unique.information1 ;
9157: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9159: --
9160: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9161: --
9162: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9158: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9159: --
9160: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9161: --
9162: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9163: --
9164: --DOUBT log_data('PYD',l_new_value,l_prefix || r_PYD_unique.name|| l_suffix,'REUSED');
9165: --
9166: end if ;
9180: open c_PYD_min_max_dates(r_PYD_unique.table_route_id, r_PYD_unique.information1 ) ;
9181: fetch c_PYD_min_max_dates into l_min_esd,l_max_eed ;
9182: --
9183:
9184: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9185: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9186: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9187: end if;
9188: l_min_esd := greatest(l_min_esd,r_PYD_unique.information2);
9181: fetch c_PYD_min_max_dates into l_min_esd,l_max_eed ;
9182: --
9183:
9184: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9185: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9186: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9187: end if;
9188: l_min_esd := greatest(l_min_esd,r_PYD_unique.information2);
9189: /* open c_PYD(r_PYD_unique.table_route_id,
9182: --
9183:
9184: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9185: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9186: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9187: end if;
9188: l_min_esd := greatest(l_min_esd,r_PYD_unique.information2);
9189: /* open c_PYD(r_PYD_unique.table_route_id,
9190: r_PYD_unique.information1,
9213: p_from_date => l_min_esd,
9214: p_to_date => l_max_eed );
9215: if l_dt_rec_found THEN
9216: --END TEMPIK
9217: if r_PYD_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
9218: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID' then
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9214: p_to_date => l_max_eed );
9215: if l_dt_rec_found THEN
9216: --END TEMPIK
9217: if r_PYD_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
9218: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID' then
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9215: if l_dt_rec_found THEN
9216: --END TEMPIK
9217: if r_PYD_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
9218: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID' then
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9216: --END TEMPIK
9217: if r_PYD_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
9218: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID' then
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9224: --
9217: if r_PYD_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
9218: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID' then
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9224: --
9225: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9218: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_DPNT_CVG_CTFN_ID' then
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9224: --
9225: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9226: --
9219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD_unique.information1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9224: --
9225: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9226: --
9227: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9222: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9224: --
9225: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9226: --
9227: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9228: end if ;
9229: --
9223: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9224: --
9225: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9226: --
9227: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9228: end if ;
9229: --
9230: l_object_found_in_target := true ;
9231: --TEMPIK
9258: end if ;
9259: --
9260:
9261: l_effective_date := r_PYD.information2;
9262: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9263: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9264: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9265: end if;
9266:
9259: --
9260:
9261: l_effective_date := r_PYD.information2;
9262: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9263: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9264: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9265: end if;
9266:
9267: if l_first_rec and not l_update then
9260:
9261: l_effective_date := r_PYD.information2;
9262: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9263: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9264: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9265: end if;
9266:
9267: if l_first_rec and not l_update then
9268: -- Call Create routine.
9320: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
9321: -- Update all relevent cer records with new pk_id
9322: hr_utility.set_location('Before plsql table ',222);
9323: hr_utility.set_location('new_value id '||l_ptip_dpnt_cvg_ctfn_id,222);
9324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD.information1 ;
9326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_DPNT_CVG_CTFN_ID ;
9327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9321: -- Update all relevent cer records with new pk_id
9322: hr_utility.set_location('Before plsql table ',222);
9323: hr_utility.set_location('new_value id '||l_ptip_dpnt_cvg_ctfn_id,222);
9324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD.information1 ;
9326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_DPNT_CVG_CTFN_ID ;
9327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9329: hr_utility.set_location('After plsql table ',222);
9322: hr_utility.set_location('Before plsql table ',222);
9323: hr_utility.set_location('new_value id '||l_ptip_dpnt_cvg_ctfn_id,222);
9324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD.information1 ;
9326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_DPNT_CVG_CTFN_ID ;
9327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9329: hr_utility.set_location('After plsql table ',222);
9330: --
9323: hr_utility.set_location('new_value id '||l_ptip_dpnt_cvg_ctfn_id,222);
9324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD.information1 ;
9326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_DPNT_CVG_CTFN_ID ;
9327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9329: hr_utility.set_location('After plsql table ',222);
9330: --
9331: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9324: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_DPNT_CVG_CTFN_ID' ;
9325: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PYD.information1 ;
9326: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_DPNT_CVG_CTFN_ID ;
9327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9329: hr_utility.set_location('After plsql table ',222);
9330: --
9331: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9332: --
9327: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9328: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PYD_unique.table_route_id;
9329: hr_utility.set_location('After plsql table ',222);
9330: --
9331: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9332: --
9333: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9334: --
9335: else
9329: hr_utility.set_location('After plsql table ',222);
9330: --
9331: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9332: --
9333: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9334: --
9335: else
9336: --
9337: -- Call Update routine for the pk_id created in prev run .
9447: end loop;
9448: --
9449: exception when others then
9450: --
9451: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PYD',r_pyd.information5 );
9452: --
9453: end create_PYD_rows;
9454:
9455: --
9589: end if ;
9590: -- End Prefix Sufix derivation
9591: for r_LCT_unique in c_unique_LCT('LCT') loop
9592:
9593: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9594: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9595: r_LCT_unique.information3 >=
9596: ben_pd_copy_to_ben_one.g_copy_effective_date)
9597: ) then
9590: -- End Prefix Sufix derivation
9591: for r_LCT_unique in c_unique_LCT('LCT') loop
9592:
9593: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9594: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9595: r_LCT_unique.information3 >=
9596: ben_pd_copy_to_ben_one.g_copy_effective_date)
9597: ) then
9598:
9592:
9593: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
9594: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9595: r_LCT_unique.information3 >=
9596: ben_pd_copy_to_ben_one.g_copy_effective_date)
9597: ) then
9598:
9599: --
9600: hr_utility.set_location(' r_LCT_unique.table_route_id '||r_LCT_unique.table_route_id,10);
9629: l_object_found_in_target := TRUE;
9630: --
9631: if l_process_date between r_LCT_unique.information2 and r_LCT_unique.information3 then
9632: l_update := true;
9633: if r_LCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9634: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID'
9635: then
9636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9630: --
9631: if l_process_date between r_LCT_unique.information2 and r_LCT_unique.information3 then
9632: l_update := true;
9633: if r_LCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9634: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID'
9635: then
9636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCT_unique.information1 ;
9632: l_update := true;
9633: if r_LCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9634: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID'
9635: then
9636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCT_unique.information1 ;
9639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9633: if r_LCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
9634: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID'
9635: then
9636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCT_unique.information1 ;
9639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9641: --
9634: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID'
9635: then
9636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCT_unique.information1 ;
9639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9641: --
9642: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9635: then
9636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCT_unique.information1 ;
9639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9641: --
9642: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9643: --
9636: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9637: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9638: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCT_unique.information1 ;
9639: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9641: --
9642: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9643: --
9644: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9640: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9641: --
9642: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
9643: --
9644: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9645: --
9646: --DOUBT log_data('LCT',l_new_value,l_prefix || r_LCT_unique.name|| l_suffix,'REUSED');
9647: --
9648: end if ;
9662: open c_LCT_min_max_dates(r_LCT_unique.table_route_id, r_LCT_unique.information1 ) ;
9663: fetch c_LCT_min_max_dates into l_min_esd,l_max_eed ;
9664: --
9665:
9666: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9667: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9668: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9669: end if;
9670: l_min_esd := greatest(l_min_esd,r_LCT_unique.information2);
9663: fetch c_LCT_min_max_dates into l_min_esd,l_max_eed ;
9664: --
9665:
9666: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9667: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9668: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9669: end if;
9670: l_min_esd := greatest(l_min_esd,r_LCT_unique.information2);
9671: /*
9664: --
9665:
9666: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9667: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9668: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
9669: end if;
9670: l_min_esd := greatest(l_min_esd,r_LCT_unique.information2);
9671: /*
9672: open c_LCT(r_LCT_unique.table_route_id,
9699: p_from_date => l_min_esd,
9700: p_to_date => l_max_eed );
9701: if l_dt_rec_found THEN
9702: --END TEMPIK
9703: if r_LCT_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
9704: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID' then
9705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9700: p_to_date => l_max_eed );
9701: if l_dt_rec_found THEN
9702: --END TEMPIK
9703: if r_LCT_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
9704: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID' then
9705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9701: if l_dt_rec_found THEN
9702: --END TEMPIK
9703: if r_LCT_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
9704: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID' then
9705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9702: --END TEMPIK
9703: if r_LCT_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
9704: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID' then
9705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9710: --
9703: if r_LCT_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
9704: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID' then
9705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9710: --
9711: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9704: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PTIP_ENRT_ID' then
9705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9710: --
9711: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9712: --
9705: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9706: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT_unique.information1 ;
9707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9710: --
9711: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9712: --
9713: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9707: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
9708: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
9709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9710: --
9711: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9712: --
9713: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9714: end if ;
9715: --
9709: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9710: --
9711: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
9712: --
9713: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9714: end if ;
9715: --
9716: l_object_found_in_target := true ;
9717: --TEMPIK
9745: end if ;
9746: --
9747:
9748: l_effective_date := r_LCT.information2;
9749: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9750: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9751: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9752: end if;
9753:
9746: --
9747:
9748: l_effective_date := r_LCT.information2;
9749: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9750: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9751: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9752: end if;
9753:
9754: if l_first_rec and not l_update then
9747:
9748: l_effective_date := r_LCT.information2;
9749: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
9750: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
9751: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
9752: end if;
9753:
9754: if l_first_rec and not l_update then
9755:
9812: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
9813: -- Update all relevent cer records with new pk_id
9814: hr_utility.set_location('Before plsql table ',222);
9815: hr_utility.set_location('new_value id '||l_ler_chg_ptip_enrt_id,222);
9816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT.information1 ;
9818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PTIP_ENRT_ID ;
9819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9813: -- Update all relevent cer records with new pk_id
9814: hr_utility.set_location('Before plsql table ',222);
9815: hr_utility.set_location('new_value id '||l_ler_chg_ptip_enrt_id,222);
9816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT.information1 ;
9818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PTIP_ENRT_ID ;
9819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9821: hr_utility.set_location('After plsql table ',222);
9814: hr_utility.set_location('Before plsql table ',222);
9815: hr_utility.set_location('new_value id '||l_ler_chg_ptip_enrt_id,222);
9816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT.information1 ;
9818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PTIP_ENRT_ID ;
9819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9821: hr_utility.set_location('After plsql table ',222);
9822: --
9815: hr_utility.set_location('new_value id '||l_ler_chg_ptip_enrt_id,222);
9816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT.information1 ;
9818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PTIP_ENRT_ID ;
9819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9821: hr_utility.set_location('After plsql table ',222);
9822: --
9823: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9816: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PTIP_ENRT_ID' ;
9817: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCT.information1 ;
9818: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PTIP_ENRT_ID ;
9819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9821: hr_utility.set_location('After plsql table ',222);
9822: --
9823: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9824: --
9819: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
9820: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCT_unique.table_route_id;
9821: hr_utility.set_location('After plsql table ',222);
9822: --
9823: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9824: --
9825: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9826: --
9827: else
9821: hr_utility.set_location('After plsql table ',222);
9822: --
9823: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
9824: --
9825: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
9826: --
9827: else
9828: --
9829: -- Call Update routine for the pk_id created in prev run .
9943: end loop;
9944: --
9945: exception when others then
9946: --
9947: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LCT',r_lct.information5 );
9948: --
9949: end create_LCT_rows;
9950:
9951: --
10084: end if ;
10085: -- End Prefix Sufix derivation
10086: for r_WCT_unique in c_unique_WCT('WCT') loop
10087:
10088: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10089: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10090: r_WCT_unique.information3 >=
10091: ben_pd_copy_to_ben_one.g_copy_effective_date)
10092: ) then
10085: -- End Prefix Sufix derivation
10086: for r_WCT_unique in c_unique_WCT('WCT') loop
10087:
10088: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10089: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10090: r_WCT_unique.information3 >=
10091: ben_pd_copy_to_ben_one.g_copy_effective_date)
10092: ) then
10093: --
10087:
10088: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10089: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10090: r_WCT_unique.information3 >=
10091: ben_pd_copy_to_ben_one.g_copy_effective_date)
10092: ) then
10093: --
10094: hr_utility.set_location(' r_WCT_unique.table_route_id '||r_WCT_unique.table_route_id,10);
10095: hr_utility.set_location(' r_WCT_unique.information1 '||r_WCT_unique.information1,10);
10123: l_object_found_in_target := TRUE;
10124: --
10125: if l_process_date between r_WCT_unique.information2 and r_WCT_unique.information3 then
10126: l_update := true;
10127: if r_WCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10128: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID'
10129: then
10130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10124: --
10125: if l_process_date between r_WCT_unique.information2 and r_WCT_unique.information3 then
10126: l_update := true;
10127: if r_WCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10128: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID'
10129: then
10130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCT_unique.information1 ;
10126: l_update := true;
10127: if r_WCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10128: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID'
10129: then
10130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCT_unique.information1 ;
10133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10127: if r_WCT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10128: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID'
10129: then
10130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCT_unique.information1 ;
10133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10135: --
10128: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID'
10129: then
10130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCT_unique.information1 ;
10133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10135: --
10136: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10129: then
10130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCT_unique.information1 ;
10133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10135: --
10136: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10137: --
10130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WCT_unique.information1 ;
10133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10135: --
10136: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10137: --
10138: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10135: --
10136: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10137: --
10138: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10139: --
10140: --DOUBT log_data('WCT',l_new_value,l_prefix || r_WCT_unique.name|| l_suffix,'REUSED');
10141: --
10142: end if ;
10155: open c_WCT_min_max_dates(r_WCT_unique.table_route_id, r_WCT_unique.information1 ) ;
10156: fetch c_WCT_min_max_dates into l_min_esd,l_max_eed ;
10157: --
10158:
10159: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10160: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10161: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10162: end if;
10163: l_min_esd := greatest(l_min_esd,r_WCT_unique.information2);
10156: fetch c_WCT_min_max_dates into l_min_esd,l_max_eed ;
10157: --
10158:
10159: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10160: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10161: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10162: end if;
10163: l_min_esd := greatest(l_min_esd,r_WCT_unique.information2);
10164: /* open c_WCT(r_WCT_unique.table_route_id,
10157: --
10158:
10159: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10160: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10161: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10162: end if;
10163: l_min_esd := greatest(l_min_esd,r_WCT_unique.information2);
10164: /* open c_WCT(r_WCT_unique.table_route_id,
10165: r_WCT_unique.information1,
10186: p_from_date => l_min_esd,
10187: p_to_date => l_max_eed );
10188: if l_dt_rec_found THEN
10189: --END TEMPIK
10190: if r_WCT_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
10191: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID' then
10192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10187: p_to_date => l_max_eed );
10188: if l_dt_rec_found THEN
10189: --END TEMPIK
10190: if r_WCT_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
10191: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID' then
10192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10195: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10188: if l_dt_rec_found THEN
10189: --END TEMPIK
10190: if r_WCT_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
10191: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID' then
10192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10195: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10189: --END TEMPIK
10190: if r_WCT_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
10191: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID' then
10192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10195: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10197: --
10190: if r_WCT_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
10191: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID' then
10192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10195: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10197: --
10198: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10191: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_CTFN_PTIP_ID' then
10192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10195: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10197: --
10198: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10199: --
10192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10193: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT_unique.information1 ;
10194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10195: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10197: --
10198: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10199: --
10200: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10194: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10195: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10197: --
10198: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10199: --
10200: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10201: end if ;
10202: --
10196: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10197: --
10198: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10199: --
10200: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10201: end if ;
10202: --
10203: l_object_found_in_target := true ;
10204: --TEMPIK
10231: end if ;
10232: --
10233:
10234: l_effective_date := r_WCT.information2;
10235: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10236: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10237: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10238: end if;
10239:
10232: --
10233:
10234: l_effective_date := r_WCT.information2;
10235: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10236: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10237: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10238: end if;
10239:
10240: if l_first_rec and not l_update then
10233:
10234: l_effective_date := r_WCT.information2;
10235: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10236: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10237: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10238: end if;
10239:
10240: if l_first_rec and not l_update then
10241: -- Call Create routine.
10293: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
10294: -- Update all relevent cer records with new pk_id
10295: hr_utility.set_location('Before plsql table ',222);
10296: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ctfn_ptip_id,222);
10297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT.information1 ;
10299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PTIP_ID ;
10300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10301: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10294: -- Update all relevent cer records with new pk_id
10295: hr_utility.set_location('Before plsql table ',222);
10296: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ctfn_ptip_id,222);
10297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT.information1 ;
10299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PTIP_ID ;
10300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10301: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10302: hr_utility.set_location('After plsql table ',222);
10295: hr_utility.set_location('Before plsql table ',222);
10296: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ctfn_ptip_id,222);
10297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT.information1 ;
10299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PTIP_ID ;
10300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10301: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10302: hr_utility.set_location('After plsql table ',222);
10303: --
10296: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ctfn_ptip_id,222);
10297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT.information1 ;
10299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PTIP_ID ;
10300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10301: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10302: hr_utility.set_location('After plsql table ',222);
10303: --
10304: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10297: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_CTFN_PTIP_ID' ;
10298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WCT.information1 ;
10299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_CTFN_PTIP_ID ;
10300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10301: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10302: hr_utility.set_location('After plsql table ',222);
10303: --
10304: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10305: --
10300: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10301: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WCT_unique.table_route_id;
10302: hr_utility.set_location('After plsql table ',222);
10303: --
10304: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10305: --
10306: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10307: --
10308: else
10302: hr_utility.set_location('After plsql table ',222);
10303: --
10304: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10305: --
10306: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10307: --
10308: else
10309: --
10310: -- Call Update routine for the pk_id created in prev run .
10421: end loop;
10422: --
10423: exception when others then
10424: --
10425: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'WCT',r_wct.information5 );
10426: --
10427: end create_WCT_rows;
10428:
10429: --
10562: end if ;
10563: -- End Prefix Sufix derivation
10564: for r_WPT_unique in c_unique_WPT('WPT') loop
10565:
10566: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10567: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10568: r_WPT_unique.information3 >=
10569: ben_pd_copy_to_ben_one.g_copy_effective_date)
10570: ) then
10563: -- End Prefix Sufix derivation
10564: for r_WPT_unique in c_unique_WPT('WPT') loop
10565:
10566: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10567: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10568: r_WPT_unique.information3 >=
10569: ben_pd_copy_to_ben_one.g_copy_effective_date)
10570: ) then
10571: --
10565:
10566: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
10567: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10568: r_WPT_unique.information3 >=
10569: ben_pd_copy_to_ben_one.g_copy_effective_date)
10570: ) then
10571: --
10572: hr_utility.set_location(' r_WPT_unique.table_route_id '||r_WPT_unique.table_route_id,10);
10573: hr_utility.set_location(' r_WPT_unique.information1 '||r_WPT_unique.information1,10);
10600: l_object_found_in_target := TRUE;
10601: --
10602: if l_process_date between r_WPT_unique.information2 and r_WPT_unique.information3 then
10603: l_update := true;
10604: if r_WPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10605: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID'
10606: then
10607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10601: --
10602: if l_process_date between r_WPT_unique.information2 and r_WPT_unique.information3 then
10603: l_update := true;
10604: if r_WPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10605: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID'
10606: then
10607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPT_unique.information1 ;
10603: l_update := true;
10604: if r_WPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10605: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID'
10606: then
10607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPT_unique.information1 ;
10610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10604: if r_WPT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
10605: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID'
10606: then
10607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPT_unique.information1 ;
10610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10612: --
10605: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID'
10606: then
10607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPT_unique.information1 ;
10610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10612: --
10613: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10606: then
10607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPT_unique.information1 ;
10610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10612: --
10613: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10614: --
10607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_WPT_unique.information1 ;
10610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10612: --
10613: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10614: --
10615: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10612: --
10613: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
10614: --
10615: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10616: --
10617: --DOUBT log_data('WPT',l_new_value,l_prefix || r_WPT_unique.name|| l_suffix,'REUSED');
10618: --
10619: end if ;
10632: open c_WPT_min_max_dates(r_WPT_unique.table_route_id, r_WPT_unique.information1 ) ;
10633: fetch c_WPT_min_max_dates into l_min_esd,l_max_eed ;
10634: --
10635:
10636: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10637: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10638: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10639: end if;
10640: l_min_esd := greatest(l_min_esd,r_WPT_unique.information2);
10633: fetch c_WPT_min_max_dates into l_min_esd,l_max_eed ;
10634: --
10635:
10636: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10637: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10638: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10639: end if;
10640: l_min_esd := greatest(l_min_esd,r_WPT_unique.information2);
10641: /* open c_WPT(r_WPT_unique.table_route_id,
10634: --
10635:
10636: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10637: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10638: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
10639: end if;
10640: l_min_esd := greatest(l_min_esd,r_WPT_unique.information2);
10641: /* open c_WPT(r_WPT_unique.table_route_id,
10642: r_WPT_unique.information1,
10664: p_from_date => l_min_esd,
10665: p_to_date => l_max_eed );
10666: if l_dt_rec_found THEN
10667: --END TEMPIK
10668: if r_WPT_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
10669: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID' then
10670: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10671: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10672: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10665: p_to_date => l_max_eed );
10666: if l_dt_rec_found THEN
10667: --END TEMPIK
10668: if r_WPT_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
10669: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID' then
10670: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10671: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10672: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10673: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10666: if l_dt_rec_found THEN
10667: --END TEMPIK
10668: if r_WPT_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
10669: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID' then
10670: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10671: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10672: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10673: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10674: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10667: --END TEMPIK
10668: if r_WPT_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
10669: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID' then
10670: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10671: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10672: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10673: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10674: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10675: --
10668: if r_WPT_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
10669: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID' then
10670: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10671: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10672: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10673: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10674: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10675: --
10676: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10669: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'WV_PRTN_RSN_PTIP_ID' then
10670: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10671: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10672: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10673: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10674: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10675: --
10676: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10677: --
10670: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10671: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT_unique.information1 ;
10672: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10673: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10674: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10675: --
10676: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10677: --
10678: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10672: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
10673: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
10674: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10675: --
10676: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10677: --
10678: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10679: end if ;
10680: --
10674: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10675: --
10676: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
10677: --
10678: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10679: end if ;
10680: --
10681: l_object_found_in_target := true ;
10682: --TEMPIK
10710: end if ;
10711: --
10712:
10713: l_effective_date := r_WPT.information2;
10714: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10715: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10716: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10717: end if;
10718:
10711: --
10712:
10713: l_effective_date := r_WPT.information2;
10714: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10715: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10716: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10717: end if;
10718:
10719: if l_first_rec and not l_update then
10712:
10713: l_effective_date := r_WPT.information2;
10714: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
10715: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
10716: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
10717: end if;
10718:
10719: if l_first_rec and not l_update then
10720: -- Call Create routine.
10768: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
10769: -- Update all relevent cer records with new pk_id
10770: hr_utility.set_location('Before plsql table ',222);
10771: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ptip_id,222);
10772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT.information1 ;
10774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PTIP_ID ;
10775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10769: -- Update all relevent cer records with new pk_id
10770: hr_utility.set_location('Before plsql table ',222);
10771: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ptip_id,222);
10772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT.information1 ;
10774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PTIP_ID ;
10775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10777: hr_utility.set_location('After plsql table ',222);
10770: hr_utility.set_location('Before plsql table ',222);
10771: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ptip_id,222);
10772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT.information1 ;
10774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PTIP_ID ;
10775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10777: hr_utility.set_location('After plsql table ',222);
10778: --
10771: hr_utility.set_location('new_value id '||l_wv_prtn_rsn_ptip_id,222);
10772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT.information1 ;
10774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PTIP_ID ;
10775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10777: hr_utility.set_location('After plsql table ',222);
10778: --
10779: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10772: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'WV_PRTN_RSN_PTIP_ID' ;
10773: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_WPT.information1 ;
10774: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_WV_PRTN_RSN_PTIP_ID ;
10775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10777: hr_utility.set_location('After plsql table ',222);
10778: --
10779: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10780: --
10775: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
10776: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_WPT_unique.table_route_id;
10777: hr_utility.set_location('After plsql table ',222);
10778: --
10779: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10780: --
10781: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10782: --
10783: else
10777: hr_utility.set_location('After plsql table ',222);
10778: --
10779: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
10780: --
10781: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
10782: --
10783: else
10784: --
10785: -- Call Update routine for the pk_id created in prev run .
10891: end loop;
10892: --
10893: exception when others then
10894: --
10895: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'WPT',r_wpt.information5 );
10896: --
10897: end create_WPT_rows;
10898:
10899: --
11059: end if ;
11060: -- End Prefix Sufix derivation
11061: for r_CTP_unique in c_unique_CTP('CTP') loop
11062:
11063: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11064: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11065: r_CTP_unique.information3 >=
11066: ben_pd_copy_to_ben_one.g_copy_effective_date)
11067: ) then
11060: -- End Prefix Sufix derivation
11061: for r_CTP_unique in c_unique_CTP('CTP') loop
11062:
11063: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11064: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11065: r_CTP_unique.information3 >=
11066: ben_pd_copy_to_ben_one.g_copy_effective_date)
11067: ) then
11068: --
11062:
11063: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11064: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11065: r_CTP_unique.information3 >=
11066: ben_pd_copy_to_ben_one.g_copy_effective_date)
11067: ) then
11068: --
11069: hr_utility.set_location(' r_CTP_unique.table_route_id '||r_CTP_unique.table_route_id,10);
11070: hr_utility.set_location(' r_CTP_unique.information1 '||r_CTP_unique.information1,10);
11112: l_object_found_in_target := TRUE;
11113: --
11114: if l_process_date between r_CTP_unique.information2 and r_CTP_unique.information3 then
11115: l_update := true;
11116: if r_CTP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11117: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID'
11118: then
11119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11113: --
11114: if l_process_date between r_CTP_unique.information2 and r_CTP_unique.information3 then
11115: l_update := true;
11116: if r_CTP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11117: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID'
11118: then
11119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTP_unique.information1 ;
11115: l_update := true;
11116: if r_CTP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11117: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID'
11118: then
11119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTP_unique.information1 ;
11122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11116: if r_CTP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11117: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID'
11118: then
11119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTP_unique.information1 ;
11122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11124: --
11117: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID'
11118: then
11119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTP_unique.information1 ;
11122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11124: --
11125: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11118: then
11119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTP_unique.information1 ;
11122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11124: --
11125: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11126: --
11119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11120: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11121: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CTP_unique.information1 ;
11122: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11124: --
11125: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11126: --
11127: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11123: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11124: --
11125: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11126: --
11127: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11128: --
11129: --DOUBT log_data('CTP',l_new_value,l_prefix || r_CTP_unique.name|| l_suffix,'REUSED');
11130: --
11131: end if ;
11145: open c_CTP_min_max_dates(r_CTP_unique.table_route_id, r_CTP_unique.information1 ) ;
11146: fetch c_CTP_min_max_dates into l_min_esd,l_max_eed ;
11147: --
11148:
11149: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11150: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11151: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11152: end if;
11153: l_min_esd := greatest(l_min_esd,r_CTP_unique.information2);
11146: fetch c_CTP_min_max_dates into l_min_esd,l_max_eed ;
11147: --
11148:
11149: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11150: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11151: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11152: end if;
11153: l_min_esd := greatest(l_min_esd,r_CTP_unique.information2);
11154: /* open c_CTP(r_CTP_unique.table_route_id,
11147: --
11148:
11149: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11150: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11151: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11152: end if;
11153: l_min_esd := greatest(l_min_esd,r_CTP_unique.information2);
11154: /* open c_CTP(r_CTP_unique.table_route_id,
11155: r_CTP_unique.information1,
11177: p_from_date => l_min_esd,
11178: p_to_date => l_max_eed );
11179: if l_dt_rec_found THEN
11180: --END TEMPIK
11181: if r_CTP_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
11182: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID' then
11183: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11184: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11185: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11178: p_to_date => l_max_eed );
11179: if l_dt_rec_found THEN
11180: --END TEMPIK
11181: if r_CTP_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
11182: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID' then
11183: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11184: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11185: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11186: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11179: if l_dt_rec_found THEN
11180: --END TEMPIK
11181: if r_CTP_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
11182: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID' then
11183: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11184: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11185: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11186: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11187: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11180: --END TEMPIK
11181: if r_CTP_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
11182: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID' then
11183: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11184: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11185: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11186: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11187: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11188: --
11181: if r_CTP_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
11182: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID' then
11183: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11184: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11185: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11186: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11187: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11188: --
11189: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11182: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PTIP_ID' then
11183: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11184: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11185: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11186: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11187: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11188: --
11189: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11190: --
11183: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11184: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP_unique.information1 ;
11185: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11186: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11187: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11188: --
11189: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11190: --
11191: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11185: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11186: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11187: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11188: --
11189: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11190: --
11191: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11192: end if ;
11193: --
11187: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11188: --
11189: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11190: --
11191: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11192: end if ;
11193: --
11194: l_object_found_in_target := true ;
11195:
11223: end if ;
11224: --
11225:
11226: l_effective_date := r_CTP.information2;
11227: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11228: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11229: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11230: end if;
11231:
11224: --
11225:
11226: l_effective_date := r_CTP.information2;
11227: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11228: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11229: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11230: end if;
11231:
11232: --ML
11225:
11226: l_effective_date := r_CTP.information2;
11227: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11228: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11229: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11230: end if;
11231:
11232: --ML
11233: if r_CTP.INFORMATION18 = 'Y' and r_CTP.INFORMATION196 is null then
11363: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
11364: -- Update all relevent cer records with new pk_id
11365: hr_utility.set_location('Before plsql table ',222);
11366: hr_utility.set_location('new_value id '||l_ptip_id,222);
11367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP.information1 ;
11369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_ID ;
11370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11364: -- Update all relevent cer records with new pk_id
11365: hr_utility.set_location('Before plsql table ',222);
11366: hr_utility.set_location('new_value id '||l_ptip_id,222);
11367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP.information1 ;
11369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_ID ;
11370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11372: hr_utility.set_location('After plsql table ',222);
11365: hr_utility.set_location('Before plsql table ',222);
11366: hr_utility.set_location('new_value id '||l_ptip_id,222);
11367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP.information1 ;
11369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_ID ;
11370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11372: hr_utility.set_location('After plsql table ',222);
11373: --
11366: hr_utility.set_location('new_value id '||l_ptip_id,222);
11367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP.information1 ;
11369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_ID ;
11370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11372: hr_utility.set_location('After plsql table ',222);
11373: --
11374: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11367: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PTIP_ID' ;
11368: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CTP.information1 ;
11369: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PTIP_ID ;
11370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11372: hr_utility.set_location('After plsql table ',222);
11373: --
11374: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11375: --
11370: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CTP_unique.table_route_id;
11372: hr_utility.set_location('After plsql table ',222);
11373: --
11374: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11375: --
11376: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11377: --
11378: else
11372: hr_utility.set_location('After plsql table ',222);
11373: --
11374: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11375: --
11376: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11377: --
11378: else
11379: --
11380: -- Call Update routine for the pk_id created in prev run .
11549: end loop;
11550: --
11551: exception when others then
11552: --
11553: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CTP',r_ctp.information5 );
11554: --
11555: end create_CTP_rows;
11556:
11557: --
11691: end if ;
11692: -- End Prefix Sufix derivation
11693: for r_LCC_unique in c_unique_LCC('LCC') loop
11694:
11695: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11696: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11697: r_LCC_unique.information3 >=
11698: ben_pd_copy_to_ben_one.g_copy_effective_date)
11699: ) then
11692: -- End Prefix Sufix derivation
11693: for r_LCC_unique in c_unique_LCC('LCC') loop
11694:
11695: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11696: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11697: r_LCC_unique.information3 >=
11698: ben_pd_copy_to_ben_one.g_copy_effective_date)
11699: ) then
11700: --
11694:
11695: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
11696: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11697: r_LCC_unique.information3 >=
11698: ben_pd_copy_to_ben_one.g_copy_effective_date)
11699: ) then
11700: --
11701: hr_utility.set_location(' r_LCC_unique.table_route_id '||r_LCC_unique.table_route_id,10);
11702: hr_utility.set_location(' r_LCC_unique.information1 '||r_LCC_unique.information1,10);
11730: l_object_found_in_target := TRUE;
11731: --
11732: if l_process_date between r_LCC_unique.information2 and r_LCC_unique.information3 then
11733: l_update := true;
11734: if r_LCC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11735: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID'
11736: then
11737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11731: --
11732: if l_process_date between r_LCC_unique.information2 and r_LCC_unique.information3 then
11733: l_update := true;
11734: if r_LCC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11735: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID'
11736: then
11737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCC_unique.information1 ;
11733: l_update := true;
11734: if r_LCC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11735: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID'
11736: then
11737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCC_unique.information1 ;
11740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11734: if r_LCC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
11735: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID'
11736: then
11737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCC_unique.information1 ;
11740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11742: --
11735: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID'
11736: then
11737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCC_unique.information1 ;
11740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11742: --
11743: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11736: then
11737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCC_unique.information1 ;
11740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11742: --
11743: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11744: --
11737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LCC_unique.information1 ;
11740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11742: --
11743: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11744: --
11745: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11742: --
11743: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
11744: --
11745: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11746: --
11747: --DOUBT log_data('LCC',l_new_value,l_prefix || r_LCC_unique.name|| l_suffix,'REUSED');
11748: --
11749: end if ;
11762: open c_LCC_min_max_dates(r_LCC_unique.table_route_id, r_LCC_unique.information1 ) ;
11763: fetch c_LCC_min_max_dates into l_min_esd,l_max_eed ;
11764: --
11765:
11766: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11767: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11768: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11769: end if;
11770: l_min_esd := greatest(l_min_esd,r_LCC_unique.information2);
11763: fetch c_LCC_min_max_dates into l_min_esd,l_max_eed ;
11764: --
11765:
11766: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11767: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11768: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11769: end if;
11770: l_min_esd := greatest(l_min_esd,r_LCC_unique.information2);
11771: /* open c_LCC(r_LCC_unique.table_route_id,
11764: --
11765:
11766: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11767: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11768: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
11769: end if;
11770: l_min_esd := greatest(l_min_esd,r_LCC_unique.information2);
11771: /* open c_LCC(r_LCC_unique.table_route_id,
11772: r_LCC_unique.information1,
11794: p_from_date => l_min_esd,
11795: p_to_date => l_max_eed );
11796: if l_dt_rec_found THEN
11797: --END TEMPIK
11798: if r_LCC_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
11799: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID' then
11800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11795: p_to_date => l_max_eed );
11796: if l_dt_rec_found THEN
11797: --END TEMPIK
11798: if r_LCC_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
11799: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID' then
11800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11796: if l_dt_rec_found THEN
11797: --END TEMPIK
11798: if r_LCC_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
11799: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID' then
11800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11797: --END TEMPIK
11798: if r_LCC_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
11799: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID' then
11800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11805: --
11798: if r_LCC_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
11799: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID' then
11800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11805: --
11806: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11799: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_CTFN_ID' then
11800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11805: --
11806: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11807: --
11800: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11801: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC_unique.information1 ;
11802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11805: --
11806: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11807: --
11808: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11802: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
11803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
11804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11805: --
11806: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11807: --
11808: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11809: end if ;
11810: --
11804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11805: --
11806: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
11807: --
11808: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11809: end if ;
11810: --
11811: l_object_found_in_target := true ;
11812: --TEMPIK
11839: end if ;
11840: --
11841:
11842: l_effective_date := r_LCC.information2;
11843: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11844: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11845: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11846: end if;
11847:
11840: --
11841:
11842: l_effective_date := r_LCC.information2;
11843: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11844: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11845: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11846: end if;
11847:
11848: if l_first_rec and not l_update then
11841:
11842: l_effective_date := r_LCC.information2;
11843: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
11844: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
11845: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
11846: end if;
11847:
11848: if l_first_rec and not l_update then
11849: -- Call Create routine.
11900: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
11901: -- Update all relevent cer records with new pk_id
11902: hr_utility.set_location('Before plsql table ',222);
11903: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_ctfn_id,222);
11904: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC.information1 ;
11906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_CTFN_ID ;
11907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11901: -- Update all relevent cer records with new pk_id
11902: hr_utility.set_location('Before plsql table ',222);
11903: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_ctfn_id,222);
11904: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC.information1 ;
11906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_CTFN_ID ;
11907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11909: hr_utility.set_location('After plsql table ',222);
11902: hr_utility.set_location('Before plsql table ',222);
11903: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_ctfn_id,222);
11904: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC.information1 ;
11906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_CTFN_ID ;
11907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11909: hr_utility.set_location('After plsql table ',222);
11910: --
11903: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_ctfn_id,222);
11904: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC.information1 ;
11906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_CTFN_ID ;
11907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11909: hr_utility.set_location('After plsql table ',222);
11910: --
11911: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11904: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_CTFN_ID' ;
11905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LCC.information1 ;
11906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_CTFN_ID ;
11907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11909: hr_utility.set_location('After plsql table ',222);
11910: --
11911: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11912: --
11907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
11908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LCC_unique.table_route_id;
11909: hr_utility.set_location('After plsql table ',222);
11910: --
11911: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11912: --
11913: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11914: --
11915: else
11909: hr_utility.set_location('After plsql table ',222);
11910: --
11911: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
11912: --
11913: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
11914: --
11915: else
11916: --
11917: -- Call Update routine for the pk_id created in prev run .
12027: end loop;
12028: --
12029: exception when others then
12030: --
12031: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LCC',r_lcc.information5 );
12032: --
12033: end create_LCC_rows;
12034:
12035: --
12167: end if ;
12168: -- End Prefix Sufix derivation
12169: for r_CER_unique in c_unique_CER('CER') loop
12170:
12171: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12172: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12173: r_CER_unique.information3 >=
12174: ben_pd_copy_to_ben_one.g_copy_effective_date)
12175: ) then
12168: -- End Prefix Sufix derivation
12169: for r_CER_unique in c_unique_CER('CER') loop
12170:
12171: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12172: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12173: r_CER_unique.information3 >=
12174: ben_pd_copy_to_ben_one.g_copy_effective_date)
12175: ) then
12176: --
12170:
12171: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12172: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12173: r_CER_unique.information3 >=
12174: ben_pd_copy_to_ben_one.g_copy_effective_date)
12175: ) then
12176: --
12177: hr_utility.set_location(' r_CER_unique.table_route_id '||r_CER_unique.table_route_id,10);
12178: hr_utility.set_location(' r_CER_unique.information1 '||r_CER_unique.information1,10);
12205: l_object_found_in_target := TRUE;
12206: --
12207: if l_process_date between r_CER_unique.information2 and r_CER_unique.information3 then
12208: l_update := true;
12209: if r_CER_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12210: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID'
12211: then
12212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12206: --
12207: if l_process_date between r_CER_unique.information2 and r_CER_unique.information3 then
12208: l_update := true;
12209: if r_CER_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12210: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID'
12211: then
12212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CER_unique.information1 ;
12208: l_update := true;
12209: if r_CER_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12210: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID'
12211: then
12212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CER_unique.information1 ;
12215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12209: if r_CER_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12210: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID'
12211: then
12212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CER_unique.information1 ;
12215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12217: --
12210: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID'
12211: then
12212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CER_unique.information1 ;
12215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12217: --
12218: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12211: then
12212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CER_unique.information1 ;
12215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12217: --
12218: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12219: --
12212: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12213: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12214: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CER_unique.information1 ;
12215: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12217: --
12218: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12219: --
12220: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12216: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12217: --
12218: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12219: --
12220: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12221: --
12222: --DOUBT log_data('CER',l_new_value,l_prefix || r_CER_unique.name|| l_suffix,'REUSED');
12223: --
12224: end if ;
12237: open c_CER_min_max_dates(r_CER_unique.table_route_id, r_CER_unique.information1 ) ;
12238: fetch c_CER_min_max_dates into l_min_esd,l_max_eed ;
12239: --
12240:
12241: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12242: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12243: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12244: end if;
12245: l_min_esd := greatest(l_min_esd,r_CER_unique.information2);
12238: fetch c_CER_min_max_dates into l_min_esd,l_max_eed ;
12239: --
12240:
12241: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12242: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12243: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12244: end if;
12245: l_min_esd := greatest(l_min_esd,r_CER_unique.information2);
12246: /* open c_CER(r_CER_unique.table_route_id,
12239: --
12240:
12241: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12242: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12243: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12244: end if;
12245: l_min_esd := greatest(l_min_esd,r_CER_unique.information2);
12246: /* open c_CER(r_CER_unique.table_route_id,
12247: r_CER_unique.information1,
12269: p_from_date => l_min_esd,
12270: p_to_date => l_max_eed );
12271: if l_dt_rec_found THEN
12272: --END TEMPIK
12273: if r_CER_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
12274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID' then
12275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12270: p_to_date => l_max_eed );
12271: if l_dt_rec_found THEN
12272: --END TEMPIK
12273: if r_CER_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
12274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID' then
12275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12271: if l_dt_rec_found THEN
12272: --END TEMPIK
12273: if r_CER_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
12274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID' then
12275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12272: --END TEMPIK
12273: if r_CER_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
12274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID' then
12275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12280: --
12273: if r_CER_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
12274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID' then
12275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12280: --
12281: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12274: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIGY_RL_ID' then
12275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12280: --
12281: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12282: --
12275: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12276: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CER_unique.information1 ;
12277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12280: --
12281: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12282: --
12283: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12277: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12278: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12280: --
12281: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12282: --
12283: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12284: end if ;
12285: --
12279: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12280: --
12281: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12282: --
12283: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12284: end if ;
12285: --
12286: l_object_found_in_target := true ;
12287: --TEMPIK
12314: end if ;
12315: --
12316:
12317: l_effective_date := r_cer.information2;
12318: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12319: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12320: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12321: end if;
12322:
12315: --
12316:
12317: l_effective_date := r_cer.information2;
12318: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12319: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12320: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12321: end if;
12322:
12323: if l_first_rec and not l_update then
12316:
12317: l_effective_date := r_cer.information2;
12318: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12319: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12320: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12321: end if;
12322:
12323: if l_first_rec and not l_update then
12324: -- Call Create routine.
12374: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
12375: -- Update all relevent cer records with new pk_id
12376: hr_utility.set_location('Before plsql table ',222);
12377: hr_utility.set_location('new_value id '||l_prtn_eligy_rl_id,222);
12378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_cer.information1 ;
12380: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIGY_RL_ID ;
12381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12375: -- Update all relevent cer records with new pk_id
12376: hr_utility.set_location('Before plsql table ',222);
12377: hr_utility.set_location('new_value id '||l_prtn_eligy_rl_id,222);
12378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_cer.information1 ;
12380: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIGY_RL_ID ;
12381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12383: hr_utility.set_location('After plsql table ',222);
12376: hr_utility.set_location('Before plsql table ',222);
12377: hr_utility.set_location('new_value id '||l_prtn_eligy_rl_id,222);
12378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_cer.information1 ;
12380: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIGY_RL_ID ;
12381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12383: hr_utility.set_location('After plsql table ',222);
12384: --
12377: hr_utility.set_location('new_value id '||l_prtn_eligy_rl_id,222);
12378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_cer.information1 ;
12380: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIGY_RL_ID ;
12381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12383: hr_utility.set_location('After plsql table ',222);
12384: --
12385: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12378: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIGY_RL_ID' ;
12379: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_cer.information1 ;
12380: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIGY_RL_ID ;
12381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12383: hr_utility.set_location('After plsql table ',222);
12384: --
12385: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12386: --
12381: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12382: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CER_unique.table_route_id;
12383: hr_utility.set_location('After plsql table ',222);
12384: --
12385: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12386: --
12387: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12388: --
12389: else
12383: hr_utility.set_location('After plsql table ',222);
12384: --
12385: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12386: --
12387: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12388: --
12389: else
12390: --
12391: -- Call Update routine for the pk_id created in prev run .
12499: end loop;
12500: --
12501: exception when others then
12502: --
12503: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CER',r_cer.information5 );
12504: --
12505: end create_CER_rows;
12506:
12507: --
12639: end if ;
12640: -- End Prefix Sufix derivation
12641: for r_CEP_unique in c_unique_CEP('CEP') loop
12642:
12643: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12644: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12645: r_CEP_unique.information3 >=
12646: ben_pd_copy_to_ben_one.g_copy_effective_date)
12647: ) then
12640: -- End Prefix Sufix derivation
12641: for r_CEP_unique in c_unique_CEP('CEP') loop
12642:
12643: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12644: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12645: r_CEP_unique.information3 >=
12646: ben_pd_copy_to_ben_one.g_copy_effective_date)
12647: ) then
12648: --
12642:
12643: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
12644: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12645: r_CEP_unique.information3 >=
12646: ben_pd_copy_to_ben_one.g_copy_effective_date)
12647: ) then
12648: --
12649: hr_utility.set_location(' r_CEP_unique.table_route_id '||r_CEP_unique.table_route_id,10);
12650: hr_utility.set_location(' r_CEP_unique.information1 '||r_CEP_unique.information1,10);
12677: l_object_found_in_target := TRUE;
12678: --
12679: if l_process_date between r_CEP_unique.information2 and r_CEP_unique.information3 then
12680: l_update := true;
12681: if r_CEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12682: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID'
12683: then
12684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12678: --
12679: if l_process_date between r_CEP_unique.information2 and r_CEP_unique.information3 then
12680: l_update := true;
12681: if r_CEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12682: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID'
12683: then
12684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CEP_unique.information1 ;
12680: l_update := true;
12681: if r_CEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12682: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID'
12683: then
12684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CEP_unique.information1 ;
12687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12681: if r_CEP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
12682: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID'
12683: then
12684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CEP_unique.information1 ;
12687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12689: --
12682: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID'
12683: then
12684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CEP_unique.information1 ;
12687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12689: --
12690: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12683: then
12684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CEP_unique.information1 ;
12687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12689: --
12690: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12691: --
12684: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CEP_unique.information1 ;
12687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12689: --
12690: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12691: --
12692: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12689: --
12690: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
12691: --
12692: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12693: --
12694: --DOUBT log_data('CEP',l_new_value,l_prefix || r_CEP_unique.name|| l_suffix,'REUSED');
12695: --
12696: end if ;
12709: open c_CEP_min_max_dates(r_CEP_unique.table_route_id, r_CEP_unique.information1 ) ;
12710: fetch c_CEP_min_max_dates into l_min_esd,l_max_eed ;
12711: --
12712:
12713: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12714: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12715: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12716: end if;
12717: l_min_esd := greatest(l_min_esd,r_CEP_unique.information2);
12710: fetch c_CEP_min_max_dates into l_min_esd,l_max_eed ;
12711: --
12712:
12713: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12714: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12715: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12716: end if;
12717: l_min_esd := greatest(l_min_esd,r_CEP_unique.information2);
12718: /* open c_CEP(r_CEP_unique.table_route_id,
12711: --
12712:
12713: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12714: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12715: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
12716: end if;
12717: l_min_esd := greatest(l_min_esd,r_CEP_unique.information2);
12718: /* open c_CEP(r_CEP_unique.table_route_id,
12719: r_CEP_unique.information1,
12740: p_from_date => l_min_esd,
12741: p_to_date => l_max_eed );
12742: if l_dt_rec_found THEN
12743: --END TEMPIK
12744: if r_CEP_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
12745: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID' then
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12741: p_to_date => l_max_eed );
12742: if l_dt_rec_found THEN
12743: --END TEMPIK
12744: if r_CEP_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
12745: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID' then
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12742: if l_dt_rec_found THEN
12743: --END TEMPIK
12744: if r_CEP_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
12745: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID' then
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12743: --END TEMPIK
12744: if r_CEP_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
12745: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID' then
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12751: --
12744: if r_CEP_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
12745: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID' then
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12751: --
12752: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12745: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_PRFL_ID' then
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12751: --
12752: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12753: --
12746: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12747: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP_unique.information1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12751: --
12752: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12753: --
12754: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12748: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
12749: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12751: --
12752: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12753: --
12754: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12755: end if ;
12756: --
12750: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12751: --
12752: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
12753: --
12754: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12755: end if ;
12756: --
12757: l_object_found_in_target := true ;
12758: --TEMPIK
12785: end if ;
12786: --
12787:
12788: l_effective_date := r_CEP.information2;
12789: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12790: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12791: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12792: end if;
12793:
12786: --
12787:
12788: l_effective_date := r_CEP.information2;
12789: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12790: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12791: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12792: end if;
12793:
12794: if l_first_rec and not l_update then
12787:
12788: l_effective_date := r_CEP.information2;
12789: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
12790: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
12791: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
12792: end if;
12793:
12794: if l_first_rec and not l_update then
12795: -- Call Create routine.
12845: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
12846: -- Update all relevent cer records with new pk_id
12847: hr_utility.set_location('Before plsql table ',222);
12848: hr_utility.set_location('new_value id '||l_prtn_elig_prfl_id,222);
12849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP.information1 ;
12851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_PRFL_ID ;
12852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12846: -- Update all relevent cer records with new pk_id
12847: hr_utility.set_location('Before plsql table ',222);
12848: hr_utility.set_location('new_value id '||l_prtn_elig_prfl_id,222);
12849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP.information1 ;
12851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_PRFL_ID ;
12852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12854: hr_utility.set_location('After plsql table ',222);
12847: hr_utility.set_location('Before plsql table ',222);
12848: hr_utility.set_location('new_value id '||l_prtn_elig_prfl_id,222);
12849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP.information1 ;
12851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_PRFL_ID ;
12852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12854: hr_utility.set_location('After plsql table ',222);
12855: --
12848: hr_utility.set_location('new_value id '||l_prtn_elig_prfl_id,222);
12849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP.information1 ;
12851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_PRFL_ID ;
12852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12854: hr_utility.set_location('After plsql table ',222);
12855: --
12856: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_PRFL_ID' ;
12850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CEP.information1 ;
12851: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_PRFL_ID ;
12852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12854: hr_utility.set_location('After plsql table ',222);
12855: --
12856: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12857: --
12852: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
12853: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CEP_unique.table_route_id;
12854: hr_utility.set_location('After plsql table ',222);
12855: --
12856: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12857: --
12858: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12859: --
12860: else
12854: hr_utility.set_location('After plsql table ',222);
12855: --
12856: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
12857: --
12858: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
12859: --
12860: else
12861: --
12862: -- Call Update routine for the pk_id created in prev run .
12969: end loop;
12970: --
12971: exception when others then
12972: --
12973: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CEP',r_cep.information5 );
12974: --
12975: end create_CEP_rows;
12976:
12977: --
13114: end if ;
13115: -- End Prefix Sufix derivation
13116: for r_CPR_unique in c_unique_CPR('CPR') loop
13117:
13118: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13119: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13120: r_CPR_unique.information3 >=
13121: ben_pd_copy_to_ben_one.g_copy_effective_date)
13122: ) then
13115: -- End Prefix Sufix derivation
13116: for r_CPR_unique in c_unique_CPR('CPR') loop
13117:
13118: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13119: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13120: r_CPR_unique.information3 >=
13121: ben_pd_copy_to_ben_one.g_copy_effective_date)
13122: ) then
13123: --
13117:
13118: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13119: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13120: r_CPR_unique.information3 >=
13121: ben_pd_copy_to_ben_one.g_copy_effective_date)
13122: ) then
13123: --
13124: hr_utility.set_location(' r_CPR_unique.table_route_id '||r_CPR_unique.table_route_id,10);
13125: hr_utility.set_location(' r_CPR_unique.information1 '||r_CPR_unique.information1,10);
13153: l_object_found_in_target := TRUE;
13154: --
13155: if l_process_date between r_CPR_unique.information2 and r_CPR_unique.information3 then
13156: l_update := true;
13157: if r_CPR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13158: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID'
13159: then
13160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13154: --
13155: if l_process_date between r_CPR_unique.information2 and r_CPR_unique.information3 then
13156: l_update := true;
13157: if r_CPR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13158: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID'
13159: then
13160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPR_unique.information1 ;
13156: l_update := true;
13157: if r_CPR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13158: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID'
13159: then
13160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPR_unique.information1 ;
13163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13157: if r_CPR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13158: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID'
13159: then
13160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPR_unique.information1 ;
13163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13165: --
13158: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID'
13159: then
13160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPR_unique.information1 ;
13163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13165: --
13166: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13159: then
13160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPR_unique.information1 ;
13163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13165: --
13166: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13167: --
13160: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13161: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13162: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPR_unique.information1 ;
13163: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13165: --
13166: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13167: --
13168: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13164: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13165: --
13166: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13167: --
13168: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13169: --
13170: --DOUBT log_data('CPR',l_new_value,l_prefix || r_CPR_unique.name|| l_suffix,'REUSED');
13171: --
13172: end if ;
13185: open c_CPR_min_max_dates(r_CPR_unique.table_route_id, r_CPR_unique.information1 ) ;
13186: fetch c_CPR_min_max_dates into l_min_esd,l_max_eed ;
13187: --
13188:
13189: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13190: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13191: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13192: end if;
13193: l_min_esd := greatest(l_min_esd,r_CPR_unique.information2);
13186: fetch c_CPR_min_max_dates into l_min_esd,l_max_eed ;
13187: --
13188:
13189: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13190: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13191: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13192: end if;
13193: l_min_esd := greatest(l_min_esd,r_CPR_unique.information2);
13194: /* open c_CPR(r_CPR_unique.table_route_id,
13187: --
13188:
13189: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13190: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13191: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13192: end if;
13193: l_min_esd := greatest(l_min_esd,r_CPR_unique.information2);
13194: /* open c_CPR(r_CPR_unique.table_route_id,
13195: r_CPR_unique.information1,
13220: p_from_date => l_min_esd,
13221: p_to_date => l_max_eed );
13222: if l_dt_rec_found THEN
13223: --END TEMPIK
13224: if r_CPR_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
13225: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID' then
13226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13221: p_to_date => l_max_eed );
13222: if l_dt_rec_found THEN
13223: --END TEMPIK
13224: if r_CPR_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
13225: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID' then
13226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13229: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13222: if l_dt_rec_found THEN
13223: --END TEMPIK
13224: if r_CPR_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
13225: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID' then
13226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13229: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13223: --END TEMPIK
13224: if r_CPR_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
13225: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID' then
13226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13229: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13231: --
13224: if r_CPR_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
13225: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID' then
13226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13229: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13231: --
13232: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13225: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ROLE_ID' then
13226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13229: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13231: --
13232: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13233: --
13226: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13227: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR_unique.information1 ;
13228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13229: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13231: --
13232: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13233: --
13234: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13228: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13229: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13231: --
13232: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13233: --
13234: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13235: end if ;
13236: --
13230: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13231: --
13232: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13233: --
13234: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13235: end if ;
13236: --
13237: l_object_found_in_target := true ;
13238: --TEMPIK
13263: l_first_rec := true ;
13264: --
13265: end if ;
13266: --
13267: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_POPL_ORG_ROLE_F',l_prefix || r_CPR.information170 || l_suffix);
13268: --
13269:
13270: l_effective_date := r_CPR.information2;
13271: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13267: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_POPL_ORG_ROLE_F',l_prefix || r_CPR.information170 || l_suffix);
13268: --
13269:
13270: l_effective_date := r_CPR.information2;
13271: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13272: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13273: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13274: end if;
13275:
13268: --
13269:
13270: l_effective_date := r_CPR.information2;
13271: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13272: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13273: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13274: end if;
13275:
13276: if l_first_rec and not l_update then
13269:
13270: l_effective_date := r_CPR.information2;
13271: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13272: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13273: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13274: end if;
13275:
13276: if l_first_rec and not l_update then
13277: -- Call Create routine.
13325: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
13326: -- Update all relevent cer records with new pk_id
13327: hr_utility.set_location('Before plsql table ',222);
13328: hr_utility.set_location('new_value id '||l_popl_org_role_id,222);
13329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR.information1 ;
13331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ROLE_ID ;
13332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13326: -- Update all relevent cer records with new pk_id
13327: hr_utility.set_location('Before plsql table ',222);
13328: hr_utility.set_location('new_value id '||l_popl_org_role_id,222);
13329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR.information1 ;
13331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ROLE_ID ;
13332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13334: hr_utility.set_location('After plsql table ',222);
13327: hr_utility.set_location('Before plsql table ',222);
13328: hr_utility.set_location('new_value id '||l_popl_org_role_id,222);
13329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR.information1 ;
13331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ROLE_ID ;
13332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13334: hr_utility.set_location('After plsql table ',222);
13335: --
13328: hr_utility.set_location('new_value id '||l_popl_org_role_id,222);
13329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR.information1 ;
13331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ROLE_ID ;
13332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13334: hr_utility.set_location('After plsql table ',222);
13335: --
13336: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13329: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ROLE_ID' ;
13330: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPR.information1 ;
13331: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ROLE_ID ;
13332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13334: hr_utility.set_location('After plsql table ',222);
13335: --
13336: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13337: --
13332: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13333: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPR_unique.table_route_id;
13334: hr_utility.set_location('After plsql table ',222);
13335: --
13336: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13337: --
13338: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13339: --
13340: else
13334: hr_utility.set_location('After plsql table ',222);
13335: --
13336: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13337: --
13338: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13339: --
13340: else
13341: --
13342: -- Call Update routine for the pk_id created in prev run .
13449: end loop;
13450: --
13451: exception when others then
13452: --
13453: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CPR',l_prefix || r_CPR.information170 || l_suffix);
13454: --
13455: end create_CPR_rows;
13456:
13457: --
13594: end if ;
13595: -- End Prefix Sufix derivation
13596: for r_CPO_unique in c_unique_CPO('CPO') loop
13597:
13598: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13599: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13600: r_CPO_unique.information3 >=
13601: ben_pd_copy_to_ben_one.g_copy_effective_date)
13602: ) then
13595: -- End Prefix Sufix derivation
13596: for r_CPO_unique in c_unique_CPO('CPO') loop
13597:
13598: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13599: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13600: r_CPO_unique.information3 >=
13601: ben_pd_copy_to_ben_one.g_copy_effective_date)
13602: ) then
13603: --
13597:
13598: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
13599: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13600: r_CPO_unique.information3 >=
13601: ben_pd_copy_to_ben_one.g_copy_effective_date)
13602: ) then
13603: --
13604: hr_utility.set_location(' r_CPO_unique.table_route_id '||r_CPO_unique.table_route_id,10);
13605: hr_utility.set_location(' r_CPO_unique.information1 '||r_CPO_unique.information1,10);
13623: l_dml_operation:= r_CPO_unique.dml_operation ;
13624: l_PERSON_ID := get_fk('PERSON_ID', r_CPO.INFORMATION258,l_dml_operation );
13625: l_PGM_ID := get_fk('PGM_ID', r_CPO.INFORMATION260,l_dml_operation );
13626: l_PL_ID := get_fk('PL_ID', r_CPO.INFORMATION261,l_dml_operation );
13627: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
13628: l_ORGANIZATION_ID := r_CPO.information176 ;
13629: else
13630: l_ORGANIZATION_ID := r_CPO.information174 ;
13631: end if;
13638: l_object_found_in_target := TRUE;
13639: --
13640: if l_process_date between r_CPO_unique.information2 and r_CPO_unique.information3 then
13641: l_update := true;
13642: if r_CPO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13643: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID'
13644: then
13645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13639: --
13640: if l_process_date between r_CPO_unique.information2 and r_CPO_unique.information3 then
13641: l_update := true;
13642: if r_CPO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13643: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID'
13644: then
13645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPO_unique.information1 ;
13641: l_update := true;
13642: if r_CPO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13643: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID'
13644: then
13645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPO_unique.information1 ;
13648: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13649: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13642: if r_CPO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
13643: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID'
13644: then
13645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPO_unique.information1 ;
13648: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13649: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13650: --
13643: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID'
13644: then
13645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPO_unique.information1 ;
13648: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13649: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13650: --
13651: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13644: then
13645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPO_unique.information1 ;
13648: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13649: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13650: --
13651: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13652: --
13645: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13646: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13647: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPO_unique.information1 ;
13648: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13649: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13650: --
13651: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13652: --
13653: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13649: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13650: --
13651: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
13652: --
13653: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13654: --
13655: --DOUBT log_data('CPO',l_new_value,l_prefix || r_CPO_unique.name|| l_suffix,'REUSED');
13656: --
13657: end if ;
13670: open c_CPO_min_max_dates(r_CPO_unique.table_route_id, r_CPO_unique.information1 ) ;
13671: fetch c_CPO_min_max_dates into l_min_esd,l_max_eed ;
13672: --
13673:
13674: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13675: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13676: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13677: end if;
13678: l_min_esd := greatest(l_min_esd,r_CPO_unique.information2);
13671: fetch c_CPO_min_max_dates into l_min_esd,l_max_eed ;
13672: --
13673:
13674: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13675: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13676: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13677: end if;
13678: l_min_esd := greatest(l_min_esd,r_CPO_unique.information2);
13679: /* open c_CPO(r_CPO_unique.table_route_id,
13672: --
13673:
13674: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13675: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13676: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
13677: end if;
13678: l_min_esd := greatest(l_min_esd,r_CPO_unique.information2);
13679: /* open c_CPO(r_CPO_unique.table_route_id,
13680: r_CPO_unique.information1,
13684: fetch c_CPO into r_CPO ;
13685: --
13686: close c_CPO ;
13687: --
13688: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
13689: l_ORGANIZATION_ID := r_CPO.information176 ;
13690: else
13691: l_ORGANIZATION_ID := r_CPO.information174 ;
13692: end if;
13731: p_from_date => l_min_esd,
13732: p_to_date => l_max_eed );
13733: if l_dt_rec_found THEN
13734: --END TEMPIK
13735: if r_CPO_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
13736: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID' then
13737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13732: p_to_date => l_max_eed );
13733: if l_dt_rec_found THEN
13734: --END TEMPIK
13735: if r_CPO_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
13736: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID' then
13737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13733: if l_dt_rec_found THEN
13734: --END TEMPIK
13735: if r_CPO_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
13736: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID' then
13737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13734: --END TEMPIK
13735: if r_CPO_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
13736: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID' then
13737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13742: --
13735: if r_CPO_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
13736: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID' then
13737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13742: --
13743: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13736: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ORG_ID' then
13737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13742: --
13743: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13744: --
13737: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13738: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO_unique.information1 ;
13739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13742: --
13743: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13744: --
13745: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13739: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
13740: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
13741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13742: --
13743: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13744: --
13745: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13746: end if ;
13747: --
13741: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13742: --
13743: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
13744: --
13745: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13746: end if ;
13747: --
13748: l_object_found_in_target := true ;
13749: --TEMPIK
13776: end if ;
13777: --
13778:
13779: l_effective_date := r_CPO.information2;
13780: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13781: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13782: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13783: end if;
13784:
13777: --
13778:
13779: l_effective_date := r_CPO.information2;
13780: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13781: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13782: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13783: end if;
13784:
13785: if l_first_rec and not l_update then
13778:
13779: l_effective_date := r_CPO.information2;
13780: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
13781: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
13782: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
13783: end if;
13784:
13785: if l_first_rec and not l_update then
13786: -- Call Create routine.
13837: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
13838: -- Update all relevent cer records with new pk_id
13839: hr_utility.set_location('Before plsql table ',222);
13840: hr_utility.set_location('new_value id '||l_popl_org_id,222);
13841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO.information1 ;
13843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ID ;
13844: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13845: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13838: -- Update all relevent cer records with new pk_id
13839: hr_utility.set_location('Before plsql table ',222);
13840: hr_utility.set_location('new_value id '||l_popl_org_id,222);
13841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO.information1 ;
13843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ID ;
13844: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13845: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13846: hr_utility.set_location('After plsql table ',222);
13839: hr_utility.set_location('Before plsql table ',222);
13840: hr_utility.set_location('new_value id '||l_popl_org_id,222);
13841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO.information1 ;
13843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ID ;
13844: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13845: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13846: hr_utility.set_location('After plsql table ',222);
13847: --
13840: hr_utility.set_location('new_value id '||l_popl_org_id,222);
13841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO.information1 ;
13843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ID ;
13844: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13845: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13846: hr_utility.set_location('After plsql table ',222);
13847: --
13848: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13841: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ORG_ID' ;
13842: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPO.information1 ;
13843: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ORG_ID ;
13844: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13845: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13846: hr_utility.set_location('After plsql table ',222);
13847: --
13848: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13849: --
13844: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
13845: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPO_unique.table_route_id;
13846: hr_utility.set_location('After plsql table ',222);
13847: --
13848: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13849: --
13850: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13851: --
13852: else
13846: hr_utility.set_location('After plsql table ',222);
13847: --
13848: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
13849: --
13850: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
13851: --
13852: else
13853: --
13854: -- Call Update routine for the pk_id created in prev run .
13964: end loop;
13965: --
13966: exception when others then
13967: --
13968: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CPO',r_cpo.information5 );
13969: --
13970: end create_CPO_rows;
13971:
13972: --
14124: end if ;
14125: -- End Prefix Sufix derivation
14126: for r_PRG_unique in c_unique_PRG('PRG') loop
14127:
14128: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14129: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14130: r_PRG_unique.information3 >=
14131: ben_pd_copy_to_ben_one.g_copy_effective_date)
14132: ) then
14125: -- End Prefix Sufix derivation
14126: for r_PRG_unique in c_unique_PRG('PRG') loop
14127:
14128: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14129: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14130: r_PRG_unique.information3 >=
14131: ben_pd_copy_to_ben_one.g_copy_effective_date)
14132: ) then
14133: --
14127:
14128: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14129: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14130: r_PRG_unique.information3 >=
14131: ben_pd_copy_to_ben_one.g_copy_effective_date)
14132: ) then
14133: --
14134: hr_utility.set_location(' r_PRG_unique.table_route_id '||r_PRG_unique.table_route_id,10);
14135: hr_utility.set_location(' r_PRG_unique.information1 '||r_PRG_unique.information1,10);
14167: l_object_found_in_target := TRUE;
14168: --
14169: if l_process_date between r_PRG_unique.information2 and r_PRG_unique.information3 then
14170: l_update := true;
14171: if r_PRG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14172: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID'
14173: then
14174: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14175: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14168: --
14169: if l_process_date between r_PRG_unique.information2 and r_PRG_unique.information3 then
14170: l_update := true;
14171: if r_PRG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14172: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID'
14173: then
14174: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14175: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRG_unique.information1 ;
14170: l_update := true;
14171: if r_PRG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14172: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID'
14173: then
14174: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14175: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRG_unique.information1 ;
14177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14171: if r_PRG_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14172: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID'
14173: then
14174: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14175: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRG_unique.information1 ;
14177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14179: --
14172: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID'
14173: then
14174: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14175: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRG_unique.information1 ;
14177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14179: --
14180: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14173: then
14174: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14175: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRG_unique.information1 ;
14177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14179: --
14180: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14181: --
14174: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14175: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14176: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRG_unique.information1 ;
14177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14179: --
14180: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14181: --
14182: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14179: --
14180: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14181: --
14182: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14183: --
14184: --DOUBT log_data('PRG',l_new_value,l_prefix || r_PRG_unique.name|| l_suffix,'REUSED');
14185: --
14186: end if ;
14199: open c_PRG_min_max_dates(r_PRG_unique.table_route_id, r_PRG_unique.information1 ) ;
14200: fetch c_PRG_min_max_dates into l_min_esd,l_max_eed ;
14201: --
14202:
14203: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14204: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14205: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14206: end if;
14207: l_min_esd := greatest(l_min_esd,r_PRG_unique.information2);
14200: fetch c_PRG_min_max_dates into l_min_esd,l_max_eed ;
14201: --
14202:
14203: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14204: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14205: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14206: end if;
14207: l_min_esd := greatest(l_min_esd,r_PRG_unique.information2);
14208: /* open c_PRG(r_PRG_unique.table_route_id,
14201: --
14202:
14203: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14204: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14205: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14206: end if;
14207: l_min_esd := greatest(l_min_esd,r_PRG_unique.information2);
14208: /* open c_PRG(r_PRG_unique.table_route_id,
14209: r_PRG_unique.information1,
14222: -- NOT REQUIRED as create_REG_rows has been uncommented
14223: -- and will store the required regn_id in g_pk_tbl
14224: -- so that it can be got by get_fk
14225:
14226: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
14227: open c_regn(r_PRG.information185,
14228: p_target_business_group_id,
14229: r_PRG.information2)
14230: );
14258: p_from_date => l_min_esd,
14259: p_to_date => l_max_eed );
14260: if l_dt_rec_found THEN
14261: --END TEMPIK
14262: if r_PRG_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
14263: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID' then
14264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14259: p_to_date => l_max_eed );
14260: if l_dt_rec_found THEN
14261: --END TEMPIK
14262: if r_PRG_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
14263: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID' then
14264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14260: if l_dt_rec_found THEN
14261: --END TEMPIK
14262: if r_PRG_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
14263: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID' then
14264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14261: --END TEMPIK
14262: if r_PRG_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
14263: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID' then
14264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14269: --
14262: if r_PRG_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
14263: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID' then
14264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14269: --
14270: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14263: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGN_ID' then
14264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14269: --
14270: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14271: --
14264: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14265: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG_unique.information1 ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14269: --
14270: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14271: --
14272: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14266: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14267: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14269: --
14270: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14271: --
14272: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14273: end if ;
14274: --
14268: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14269: --
14270: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14271: --
14272: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14273: end if ;
14274: --
14275: l_object_found_in_target := true ;
14276: --TEMPIK
14303: end if ;
14304: --
14305:
14306: l_effective_date := r_PRG.information2;
14307: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14308: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14309: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14310: end if;
14311:
14304: --
14305:
14306: l_effective_date := r_PRG.information2;
14307: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14308: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14309: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14310: end if;
14311:
14312: if l_first_rec and not l_update then
14305:
14306: l_effective_date := r_PRG.information2;
14307: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14308: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14309: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14310: end if;
14311:
14312: if l_first_rec and not l_update then
14313: -- Call Create routine.
14367: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
14368: -- Update all relevent cer records with new pk_id
14369: hr_utility.set_location('Before plsql table ',222);
14370: hr_utility.set_location('new_value id '||l_pl_regn_id,222);
14371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG.information1 ;
14373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGN_ID ;
14374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14375: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14368: -- Update all relevent cer records with new pk_id
14369: hr_utility.set_location('Before plsql table ',222);
14370: hr_utility.set_location('new_value id '||l_pl_regn_id,222);
14371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG.information1 ;
14373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGN_ID ;
14374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14375: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14376: hr_utility.set_location('After plsql table ',222);
14369: hr_utility.set_location('Before plsql table ',222);
14370: hr_utility.set_location('new_value id '||l_pl_regn_id,222);
14371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG.information1 ;
14373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGN_ID ;
14374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14375: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14376: hr_utility.set_location('After plsql table ',222);
14377: --
14370: hr_utility.set_location('new_value id '||l_pl_regn_id,222);
14371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG.information1 ;
14373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGN_ID ;
14374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14375: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14376: hr_utility.set_location('After plsql table ',222);
14377: --
14378: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14371: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGN_ID' ;
14372: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRG.information1 ;
14373: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGN_ID ;
14374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14375: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14376: hr_utility.set_location('After plsql table ',222);
14377: --
14378: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14379: --
14374: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14375: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRG_unique.table_route_id;
14376: hr_utility.set_location('After plsql table ',222);
14377: --
14378: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14379: --
14380: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14381: --
14382: else
14376: hr_utility.set_location('After plsql table ',222);
14377: --
14378: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14379: --
14380: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14381: --
14382: else
14383: --
14384: -- Call Update routine for the pk_id created in prev run .
14496: end loop;
14497: --
14498: exception when others then
14499: --
14500: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PRG',r_prg.information5 );
14501: --
14502: end create_PRG_rows;
14503:
14504: --
14640: end if ;
14641: -- End Prefix Sufix derivation
14642: for r_RGR_unique in c_unique_RGR('RGR') loop
14643:
14644: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14645: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14646: r_RGR_unique.information3 >=
14647: ben_pd_copy_to_ben_one.g_copy_effective_date)
14648: ) then
14641: -- End Prefix Sufix derivation
14642: for r_RGR_unique in c_unique_RGR('RGR') loop
14643:
14644: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14645: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14646: r_RGR_unique.information3 >=
14647: ben_pd_copy_to_ben_one.g_copy_effective_date)
14648: ) then
14649: --
14643:
14644: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
14645: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14646: r_RGR_unique.information3 >=
14647: ben_pd_copy_to_ben_one.g_copy_effective_date)
14648: ) then
14649: --
14650: hr_utility.set_location(' r_RGR_unique.table_route_id '||r_RGR_unique.table_route_id,10);
14651: hr_utility.set_location(' r_RGR_unique.information1 '||r_RGR_unique.information1,10);
14678: l_object_found_in_target := TRUE;
14679: --
14680: if l_process_date between r_RGR_unique.information2 and r_RGR_unique.information3 then
14681: l_update := true;
14682: if r_RGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14683: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID'
14684: then
14685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14679: --
14680: if l_process_date between r_RGR_unique.information2 and r_RGR_unique.information3 then
14681: l_update := true;
14682: if r_RGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14683: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID'
14684: then
14685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_RGR_unique.information1 ;
14681: l_update := true;
14682: if r_RGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14683: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID'
14684: then
14685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_RGR_unique.information1 ;
14688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14689: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14682: if r_RGR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
14683: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID'
14684: then
14685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_RGR_unique.information1 ;
14688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14689: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14690: --
14683: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID'
14684: then
14685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_RGR_unique.information1 ;
14688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14689: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14690: --
14691: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14684: then
14685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_RGR_unique.information1 ;
14688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14689: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14690: --
14691: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14692: --
14685: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14686: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14687: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_RGR_unique.information1 ;
14688: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14689: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14690: --
14691: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14692: --
14693: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14689: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14690: --
14691: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
14692: --
14693: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14694: --
14695: --DOUBT log_data('RGR',l_new_value,l_prefix || r_RGR_unique.name|| l_suffix,'REUSED');
14696: --
14697: end if ;
14710: open c_RGR_min_max_dates(r_RGR_unique.table_route_id, r_RGR_unique.information1 ) ;
14711: fetch c_RGR_min_max_dates into l_min_esd,l_max_eed ;
14712: --
14713:
14714: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14715: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14716: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14717: end if;
14718: l_min_esd := greatest(l_min_esd,r_RGR_unique.information2);
14711: fetch c_RGR_min_max_dates into l_min_esd,l_max_eed ;
14712: --
14713:
14714: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14715: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14716: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14717: end if;
14718: l_min_esd := greatest(l_min_esd,r_RGR_unique.information2);
14719: /* open c_RGR(r_RGR_unique.table_route_id,
14712: --
14713:
14714: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14715: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14716: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
14717: end if;
14718: l_min_esd := greatest(l_min_esd,r_RGR_unique.information2);
14719: /* open c_RGR(r_RGR_unique.table_route_id,
14720: r_RGR_unique.information1,
14748: p_from_date => l_min_esd,
14749: p_to_date => l_max_eed );
14750: if l_dt_rec_found THEN
14751: --END TEMPIK
14752: if r_RGR_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
14753: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID' then
14754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14756: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14749: p_to_date => l_max_eed );
14750: if l_dt_rec_found THEN
14751: --END TEMPIK
14752: if r_RGR_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
14753: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID' then
14754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14756: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14757: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14750: if l_dt_rec_found THEN
14751: --END TEMPIK
14752: if r_RGR_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
14753: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID' then
14754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14756: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14757: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14758: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14751: --END TEMPIK
14752: if r_RGR_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
14753: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID' then
14754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14756: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14757: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14758: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14759: --
14752: if r_RGR_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
14753: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID' then
14754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14756: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14757: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14758: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14759: --
14760: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14753: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_RPTG_GRP_ID' then
14754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14756: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14757: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14758: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14759: --
14760: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14761: --
14754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR_unique.information1 ;
14756: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14757: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14758: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14759: --
14760: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14761: --
14762: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14756: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
14757: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
14758: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14759: --
14760: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14761: --
14762: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14763: end if ;
14764: --
14758: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14759: --
14760: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
14761: --
14762: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14763: end if ;
14764: --
14765: l_object_found_in_target := true ;
14766: --TEMPIK
14794: end if ;
14795: --
14796:
14797: l_effective_date := r_RGR.information2;
14798: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14799: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14800: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14801: end if;
14802:
14795: --
14796:
14797: l_effective_date := r_RGR.information2;
14798: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14799: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14800: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14801: end if;
14802:
14803: if l_first_rec and not l_update then
14796:
14797: l_effective_date := r_RGR.information2;
14798: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
14799: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
14800: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
14801: end if;
14802:
14803: if l_first_rec and not l_update then
14804: -- Call Create routine.
14852: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
14853: -- Update all relevent cer records with new pk_id
14854: hr_utility.set_location('Before plsql table ',222);
14855: hr_utility.set_location('new_value id '||l_popl_rptg_grp_id,222);
14856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR.information1 ;
14858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_RPTG_GRP_ID ;
14859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14853: -- Update all relevent cer records with new pk_id
14854: hr_utility.set_location('Before plsql table ',222);
14855: hr_utility.set_location('new_value id '||l_popl_rptg_grp_id,222);
14856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR.information1 ;
14858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_RPTG_GRP_ID ;
14859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14861: hr_utility.set_location('After plsql table ',222);
14854: hr_utility.set_location('Before plsql table ',222);
14855: hr_utility.set_location('new_value id '||l_popl_rptg_grp_id,222);
14856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR.information1 ;
14858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_RPTG_GRP_ID ;
14859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14861: hr_utility.set_location('After plsql table ',222);
14862: --
14855: hr_utility.set_location('new_value id '||l_popl_rptg_grp_id,222);
14856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR.information1 ;
14858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_RPTG_GRP_ID ;
14859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14861: hr_utility.set_location('After plsql table ',222);
14862: --
14863: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14856: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_RPTG_GRP_ID' ;
14857: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_RGR.information1 ;
14858: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_RPTG_GRP_ID ;
14859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14861: hr_utility.set_location('After plsql table ',222);
14862: --
14863: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14864: --
14859: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
14860: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_RGR_unique.table_route_id;
14861: hr_utility.set_location('After plsql table ',222);
14862: --
14863: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14864: --
14865: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14866: --
14867: else
14861: hr_utility.set_location('After plsql table ',222);
14862: --
14863: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
14864: --
14865: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
14866: --
14867: else
14868: --
14869: -- Call Update routine for the pk_id created in prev run .
14977: end loop;
14978: --
14979: exception when others then
14980: --
14981: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'RGR',r_rgr.information5 );
14982: --
14983: end create_RGR_rows;
14984:
14985: ---------------------------------------------------------------
15122: end if ;
15123: -- End Prefix Sufix derivation
15124: for r_ECF_unique in c_unique_ECF('ECF') loop
15125:
15126: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15127: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15128: r_ECF_unique.information3 >=
15129: ben_pd_copy_to_ben_one.g_copy_effective_date)
15130: ) then
15123: -- End Prefix Sufix derivation
15124: for r_ECF_unique in c_unique_ECF('ECF') loop
15125:
15126: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15127: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15128: r_ECF_unique.information3 >=
15129: ben_pd_copy_to_ben_one.g_copy_effective_date)
15130: ) then
15131:
15125:
15126: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15127: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15128: r_ECF_unique.information3 >=
15129: ben_pd_copy_to_ben_one.g_copy_effective_date)
15130: ) then
15131:
15132: --
15133: hr_utility.set_location(' r_ECF_unique.table_route_id '||r_ECF_unique.table_route_id,10);
15160: l_object_found_in_target := TRUE;
15161: --
15162: if l_process_date between r_ECF_unique.information2 and r_ECF_unique.information3 then
15163: l_update := true;
15164: if r_ECF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15165: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID'
15166: then
15167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15161: --
15162: if l_process_date between r_ECF_unique.information2 and r_ECF_unique.information3 then
15163: l_update := true;
15164: if r_ECF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15165: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID'
15166: then
15167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECF_unique.information1 ;
15163: l_update := true;
15164: if r_ECF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15165: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID'
15166: then
15167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECF_unique.information1 ;
15170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15164: if r_ECF_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15165: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID'
15166: then
15167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECF_unique.information1 ;
15170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15172: --
15165: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID'
15166: then
15167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECF_unique.information1 ;
15170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15172: --
15173: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15166: then
15167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECF_unique.information1 ;
15170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15172: --
15173: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15174: --
15167: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15168: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15169: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ECF_unique.information1 ;
15170: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15172: --
15173: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15174: --
15175: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15171: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15172: --
15173: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15174: --
15175: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15176: --
15177: --DOUBT log_data('ECF',l_new_value,l_prefix || r_ECF_unique.name|| l_suffix,'REUSED');
15178: --
15179: end if ;
15192: open c_ECF_min_max_dates(r_ECF_unique.table_route_id, r_ECF_unique.information1 ) ;
15193: fetch c_ECF_min_max_dates into l_min_esd,l_max_eed ;
15194: --
15195:
15196: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15197: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15198: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15199: end if;
15200: l_min_esd := greatest(l_min_esd,r_ECF_unique.information2);
15193: fetch c_ECF_min_max_dates into l_min_esd,l_max_eed ;
15194: --
15195:
15196: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15197: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15198: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15199: end if;
15200: l_min_esd := greatest(l_min_esd,r_ECF_unique.information2);
15201: /* open c_ECF(r_ECF_unique.table_route_id,
15194: --
15195:
15196: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15197: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15198: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15199: end if;
15200: l_min_esd := greatest(l_min_esd,r_ECF_unique.information2);
15201: /* open c_ECF(r_ECF_unique.table_route_id,
15202: r_ECF_unique.information1,
15225: p_from_date => l_min_esd,
15226: p_to_date => l_max_eed );
15227: if l_dt_rec_found THEN
15228: --END TEMPIK
15229: if r_ECF_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
15230: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID' then
15231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15226: p_to_date => l_max_eed );
15227: if l_dt_rec_found THEN
15228: --END TEMPIK
15229: if r_ECF_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
15230: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID' then
15231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15227: if l_dt_rec_found THEN
15228: --END TEMPIK
15229: if r_ECF_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
15230: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID' then
15231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15228: --END TEMPIK
15229: if r_ECF_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
15230: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID' then
15231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15236: --
15229: if r_ECF_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
15230: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID' then
15231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15236: --
15237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15230: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_CTFN_ID' then
15231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15236: --
15237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15238: --
15231: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15232: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF_unique.information1 ;
15233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15236: --
15237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15238: --
15239: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15233: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15234: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15236: --
15237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15238: --
15239: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15240: end if ;
15241: --
15235: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15236: --
15237: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15238: --
15239: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15240: end if ;
15241: --
15242: l_object_found_in_target := true ;
15243: --TEMPIK
15270: end if ;
15271: --
15272:
15273: l_effective_date := r_ECF.information2;
15274: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15275: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15276: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15277: end if;
15278:
15271: --
15272:
15273: l_effective_date := r_ECF.information2;
15274: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15275: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15276: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15277: end if;
15278:
15279: if l_first_rec and not l_update then
15272:
15273: l_effective_date := r_ECF.information2;
15274: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15275: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15276: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15277: end if;
15278:
15279: if l_first_rec and not l_update then
15280: -- Call Create routine.
15330: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
15331: -- Update all relevent cer records with new pk_id
15332: hr_utility.set_location('Before plsql table ',222);
15333: hr_utility.set_location('new_value id '||l_enrt_ctfn_id,222);
15334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF.information1 ;
15336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_CTFN_ID ;
15337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15331: -- Update all relevent cer records with new pk_id
15332: hr_utility.set_location('Before plsql table ',222);
15333: hr_utility.set_location('new_value id '||l_enrt_ctfn_id,222);
15334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF.information1 ;
15336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_CTFN_ID ;
15337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15339: hr_utility.set_location('After plsql table ',222);
15332: hr_utility.set_location('Before plsql table ',222);
15333: hr_utility.set_location('new_value id '||l_enrt_ctfn_id,222);
15334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF.information1 ;
15336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_CTFN_ID ;
15337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15339: hr_utility.set_location('After plsql table ',222);
15340: --
15333: hr_utility.set_location('new_value id '||l_enrt_ctfn_id,222);
15334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF.information1 ;
15336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_CTFN_ID ;
15337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15339: hr_utility.set_location('After plsql table ',222);
15340: --
15341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15334: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_CTFN_ID' ;
15335: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ECF.information1 ;
15336: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_CTFN_ID ;
15337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15339: hr_utility.set_location('After plsql table ',222);
15340: --
15341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15342: --
15337: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15338: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ECF_unique.table_route_id;
15339: hr_utility.set_location('After plsql table ',222);
15340: --
15341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15342: --
15343: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15344: --
15345: else
15339: hr_utility.set_location('After plsql table ',222);
15340: --
15341: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15342: --
15343: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15344: --
15345: else
15346: --
15347: -- Call Update routine for the pk_id created in prev run .
15455: end loop;
15456: --
15457: exception when others then
15458: --
15459: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ECF',r_ecf.information5 );
15460: --
15461: end create_ECF_rows;
15462:
15463: --
15613: end if ;
15614: -- End Prefix Sufix derivation
15615: for r_EPA_unique in c_unique_EPA('EPA') loop
15616:
15617: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15618: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15619: r_EPA_unique.information3 >=
15620: ben_pd_copy_to_ben_one.g_copy_effective_date)
15621: ) then
15614: -- End Prefix Sufix derivation
15615: for r_EPA_unique in c_unique_EPA('EPA') loop
15616:
15617: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15618: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15619: r_EPA_unique.information3 >=
15620: ben_pd_copy_to_ben_one.g_copy_effective_date)
15621: ) then
15622: --
15616:
15617: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
15618: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15619: r_EPA_unique.information3 >=
15620: ben_pd_copy_to_ben_one.g_copy_effective_date)
15621: ) then
15622: --
15623: hr_utility.set_location(' r_EPA_unique.table_route_id '||r_EPA_unique.table_route_id,10);
15624: hr_utility.set_location(' r_EPA_unique.information1 '||r_EPA_unique.information1,10);
15658: l_object_found_in_target := TRUE;
15659: --
15660: if l_process_date between r_EPA_unique.information2 and r_EPA_unique.information3 then
15661: l_update := true;
15662: if r_EPA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15663: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID'
15664: then
15665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15659: --
15660: if l_process_date between r_EPA_unique.information2 and r_EPA_unique.information3 then
15661: l_update := true;
15662: if r_EPA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15663: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID'
15664: then
15665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPA_unique.information1 ;
15661: l_update := true;
15662: if r_EPA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15663: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID'
15664: then
15665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPA_unique.information1 ;
15668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15662: if r_EPA_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
15663: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID'
15664: then
15665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPA_unique.information1 ;
15668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15670: --
15663: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID'
15664: then
15665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPA_unique.information1 ;
15668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15670: --
15671: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15664: then
15665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPA_unique.information1 ;
15668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15670: --
15671: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15672: --
15665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_EPA_unique.information1 ;
15668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15670: --
15671: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15672: --
15673: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15670: --
15671: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
15672: --
15673: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15674: --
15675: --DOUBT log_data('EPA',l_new_value,l_prefix || r_EPA_unique.name|| l_suffix,'REUSED');
15676: --
15677: end if ;
15690: open c_EPA_min_max_dates(r_EPA_unique.table_route_id, r_EPA_unique.information1 ) ;
15691: fetch c_EPA_min_max_dates into l_min_esd,l_max_eed ;
15692: --
15693:
15694: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15695: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15696: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15697: end if;
15698: l_min_esd := greatest(l_min_esd,r_EPA_unique.information2);
15691: fetch c_EPA_min_max_dates into l_min_esd,l_max_eed ;
15692: --
15693:
15694: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15695: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15696: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15697: end if;
15698: l_min_esd := greatest(l_min_esd,r_EPA_unique.information2);
15699: /* open c_EPA(r_EPA_unique.table_route_id,
15692: --
15693:
15694: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15695: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15696: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
15697: end if;
15698: l_min_esd := greatest(l_min_esd,r_EPA_unique.information2);
15699: /* open c_EPA(r_EPA_unique.table_route_id,
15700: r_EPA_unique.information1,
15721: p_from_date => l_min_esd,
15722: p_to_date => l_max_eed );
15723: if l_dt_rec_found THEN
15724: --END TEMPIK
15725: if r_EPA_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
15726: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID' then
15727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15722: p_to_date => l_max_eed );
15723: if l_dt_rec_found THEN
15724: --END TEMPIK
15725: if r_EPA_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
15726: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID' then
15727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15723: if l_dt_rec_found THEN
15724: --END TEMPIK
15725: if r_EPA_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
15726: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID' then
15727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15724: --END TEMPIK
15725: if r_EPA_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
15726: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID' then
15727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15732: --
15725: if r_EPA_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
15726: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID' then
15727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15732: --
15733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15726: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PRTN_ELIG_ID' then
15727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15732: --
15733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15734: --
15727: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15728: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA_unique.information1 ;
15729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15732: --
15733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15734: --
15735: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15729: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
15730: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
15731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15732: --
15733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15734: --
15735: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15736: end if ;
15737: --
15731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15732: --
15733: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
15734: --
15735: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15736: end if ;
15737: --
15738: l_object_found_in_target := true ;
15739: --TEMPIK
15766: end if ;
15767: --
15768:
15769: l_effective_date := r_EPA.information2;
15770: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15771: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15772: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15773: end if;
15774:
15767: --
15768:
15769: l_effective_date := r_EPA.information2;
15770: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15771: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15772: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15773: end if;
15774:
15775: if l_first_rec and not l_update then
15768:
15769: l_effective_date := r_EPA.information2;
15770: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
15771: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
15772: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
15773: end if;
15774:
15775: if l_first_rec and not l_update then
15776: -- Call Create routine.
15842: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
15843: -- Update all relevent cer records with new pk_id
15844: hr_utility.set_location('Before plsql table ',222);
15845: hr_utility.set_location('new_value id '||l_prtn_elig_id,222);
15846: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA.information1 ;
15848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_ID ;
15849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15843: -- Update all relevent cer records with new pk_id
15844: hr_utility.set_location('Before plsql table ',222);
15845: hr_utility.set_location('new_value id '||l_prtn_elig_id,222);
15846: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA.information1 ;
15848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_ID ;
15849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15851: hr_utility.set_location('After plsql table ',222);
15844: hr_utility.set_location('Before plsql table ',222);
15845: hr_utility.set_location('new_value id '||l_prtn_elig_id,222);
15846: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA.information1 ;
15848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_ID ;
15849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15851: hr_utility.set_location('After plsql table ',222);
15852: --
15845: hr_utility.set_location('new_value id '||l_prtn_elig_id,222);
15846: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA.information1 ;
15848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_ID ;
15849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15851: hr_utility.set_location('After plsql table ',222);
15852: --
15853: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15846: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PRTN_ELIG_ID' ;
15847: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_EPA.information1 ;
15848: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PRTN_ELIG_ID ;
15849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15851: hr_utility.set_location('After plsql table ',222);
15852: --
15853: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15854: --
15849: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
15850: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_EPA_unique.table_route_id;
15851: hr_utility.set_location('After plsql table ',222);
15852: --
15853: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15854: --
15855: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15856: --
15857: else
15851: hr_utility.set_location('After plsql table ',222);
15852: --
15853: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
15854: --
15855: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
15856: --
15857: else
15858: --
15859: -- Call Update routine for the pk_id created in prev run .
15983: end loop;
15984: --
15985: exception when others then
15986: --
15987: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'EPA',r_epa.information5 );
15988: --
15989: end create_EPA_rows;
15990:
15991: ---------------------------------------------------------------
16182: --
16183: if l_dml_operation = 'UPDATE' then
16184: --
16185: l_update := true;
16186: if r_CPY_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
16187: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16188: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16189: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16183: if l_dml_operation = 'UPDATE' then
16184: --
16185: l_update := true;
16186: if r_CPY_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
16187: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16188: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16189: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16184: --
16185: l_update := true;
16186: if r_CPY_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
16187: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16188: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16189: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16185: l_update := true;
16186: if r_CPY_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
16187: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16188: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16189: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16193: --
16186: if r_CPY_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
16187: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16188: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16189: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16193: --
16194: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16187: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16188: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16189: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16193: --
16194: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16195: --
16188: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16189: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16193: --
16194: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16195: --
16196: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16190: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CPY_unique.information1 ;
16191: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16193: --
16194: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16195: --
16196: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16197: --
16198: --DOUBT log_data('CPY',l_new_value,l_prefix || r_CPY_unique.name|| l_suffix,'REUSED');
16192: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16193: --
16194: -- update_cer_with_target( g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ; -- NEW
16195: --
16196: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16197: --
16198: --DOUBT log_data('CPY',l_new_value,l_prefix || r_CPY_unique.name|| l_suffix,'REUSED');
16199: --
16200: end if ;
16211: p_target_business_group_id, nvl(l_popl_yr_perd_id, -999) ) ;
16212: fetch c_find_CPY_in_target into l_new_value ;
16213: if c_find_CPY_in_target%found then
16214: --
16215: if r_CPY_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
16216: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16218: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16212: fetch c_find_CPY_in_target into l_new_value ;
16213: if c_find_CPY_in_target%found then
16214: --
16215: if r_CPY_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
16216: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16218: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16213: if c_find_CPY_in_target%found then
16214: --
16215: if r_CPY_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
16216: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16218: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16214: --
16215: if r_CPY_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
16216: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16218: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16222: --
16215: if r_CPY_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
16216: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16218: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16222: --
16223: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16216: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_YR_PERD_ID' then
16217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16218: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16222: --
16223: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16224: --
16217: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16218: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY_unique.information1 ;
16219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16222: --
16223: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16224: --
16225: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16219: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16220: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16222: --
16223: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16224: --
16225: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16226: end if ;
16227: --
16221: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16222: --
16223: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16224: --
16225: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16226: end if ;
16227: --
16228: l_object_found_in_target := true ;
16229: end if;
16344: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
16345: -- Update all relevent cer records with new pk_id
16346: hr_utility.set_location('Before plsql table ',222);
16347: hr_utility.set_location('new_value id '||l_popl_yr_perd_id,222);
16348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16352: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16345: -- Update all relevent cer records with new pk_id
16346: hr_utility.set_location('Before plsql table ',222);
16347: hr_utility.set_location('new_value id '||l_popl_yr_perd_id,222);
16348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16352: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16353: hr_utility.set_location('After plsql table ',222);
16346: hr_utility.set_location('Before plsql table ',222);
16347: hr_utility.set_location('new_value id '||l_popl_yr_perd_id,222);
16348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16352: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16353: hr_utility.set_location('After plsql table ',222);
16354: --
16347: hr_utility.set_location('new_value id '||l_popl_yr_perd_id,222);
16348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16352: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16353: hr_utility.set_location('After plsql table ',222);
16354: --
16355: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16348: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_YR_PERD_ID' ;
16349: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CPY.information1 ;
16350: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_YR_PERD_ID ;
16351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16352: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16353: hr_utility.set_location('After plsql table ',222);
16354: --
16355: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16356: --
16351: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16352: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CPY_unique.table_route_id;
16353: hr_utility.set_location('After plsql table ',222);
16354: --
16355: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16356: --
16357: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16358: end if;--Bug 14490456
16359: elsif l_update then
16353: hr_utility.set_location('After plsql table ',222);
16354: --
16355: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16356: --
16357: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16358: end if;--Bug 14490456
16359: elsif l_update then
16360: BEN_POPL_YR_PERD_API.UPDATE_POPL_YR_PERD(
16361: --
16414: end loop;
16415: --
16416: exception when others then
16417: --
16418: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CPY',r_cpy.information5 );
16419: --
16420: end create_CPY_rows;
16421:
16422: --
16559: end if ;
16560: -- End Prefix Sufix derivation
16561: for r_PET_unique in c_unique_PET('PET') loop
16562:
16563: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16564: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16565: r_PET_unique.information3 >=
16566: ben_pd_copy_to_ben_one.g_copy_effective_date)
16567: ) then
16560: -- End Prefix Sufix derivation
16561: for r_PET_unique in c_unique_PET('PET') loop
16562:
16563: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16564: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16565: r_PET_unique.information3 >=
16566: ben_pd_copy_to_ben_one.g_copy_effective_date)
16567: ) then
16568: --
16562:
16563: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
16564: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16565: r_PET_unique.information3 >=
16566: ben_pd_copy_to_ben_one.g_copy_effective_date)
16567: ) then
16568: --
16569: hr_utility.set_location(' r_PET_unique.table_route_id '||r_PET_unique.table_route_id,10);
16570: hr_utility.set_location(' r_PET_unique.information1 '||r_PET_unique.information1,10);
16596: l_object_found_in_target := TRUE;
16597: --
16598: if l_process_date between r_PET_unique.information2 and r_PET_unique.information3 then
16599: l_update := true;
16600: if r_PET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
16601: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID'
16602: then
16603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16597: --
16598: if l_process_date between r_PET_unique.information2 and r_PET_unique.information3 then
16599: l_update := true;
16600: if r_PET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
16601: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID'
16602: then
16603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16599: l_update := true;
16600: if r_PET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
16601: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID'
16602: then
16603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16600: if r_PET_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
16601: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID'
16602: then
16603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16608: --
16601: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID'
16602: then
16603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16608: --
16609: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16602: then
16603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16608: --
16609: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16610: --
16603: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16604: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16605: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PET_unique.information1 ;
16606: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16608: --
16609: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16610: --
16611: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16608: --
16609: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
16610: --
16611: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16612: --
16613: --DOUBT log_data('PET',l_new_value,l_prefix || r_PET_unique.name|| l_suffix,'REUSED');
16614: --
16615: end if ;
16628: open c_PET_min_max_dates(r_PET_unique.table_route_id, r_PET_unique.information1 ) ;
16629: fetch c_PET_min_max_dates into l_min_esd,l_max_eed ;
16630: --
16631:
16632: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16633: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16634: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16635: end if;
16636: l_min_esd := greatest(l_min_esd,r_PET_unique.information2);
16629: fetch c_PET_min_max_dates into l_min_esd,l_max_eed ;
16630: --
16631:
16632: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16633: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16634: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16635: end if;
16636: l_min_esd := greatest(l_min_esd,r_PET_unique.information2);
16637: /* open c_PET(r_PET_unique.table_route_id,
16630: --
16631:
16632: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16633: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16634: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
16635: end if;
16636: l_min_esd := greatest(l_min_esd,r_PET_unique.information2);
16637: /* open c_PET(r_PET_unique.table_route_id,
16638: r_PET_unique.information1,
16659: p_from_date => l_min_esd,
16660: p_to_date => l_max_eed );
16661: if l_dt_rec_found THEN
16662: --END TEMPIK
16663: if r_PET_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
16664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID' then
16665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16660: p_to_date => l_max_eed );
16661: if l_dt_rec_found THEN
16662: --END TEMPIK
16663: if r_PET_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
16664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID' then
16665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16661: if l_dt_rec_found THEN
16662: --END TEMPIK
16663: if r_PET_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
16664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID' then
16665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16662: --END TEMPIK
16663: if r_PET_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
16664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID' then
16665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16670: --
16663: if r_PET_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
16664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID' then
16665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16670: --
16671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16664: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ENRT_TYP_CYCL_ID' then
16665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16670: --
16671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16672: --
16665: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16666: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET_unique.information1 ;
16667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16670: --
16671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16672: --
16673: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16667: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
16668: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
16669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16670: --
16671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16672: --
16673: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16674: end if ;
16675: --
16669: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16670: --
16671: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
16672: --
16673: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16674: end if ;
16675: --
16676: l_object_found_in_target := true ;
16677: --TEMPIK
16704: end if ;
16705: --
16706:
16707: l_effective_date := r_PET.information2;
16708: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16709: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16710: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16711: end if;
16712:
16705: --
16706:
16707: l_effective_date := r_PET.information2;
16708: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16709: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16710: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16711: end if;
16712:
16713: if l_first_rec and not l_update then
16706:
16707: l_effective_date := r_PET.information2;
16708: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
16709: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
16710: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
16711: end if;
16712:
16713: if l_first_rec and not l_update then
16714: -- Call Create routine.
16762: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
16763: -- Update all relevent cer records with new pk_id
16764: hr_utility.set_location('Before plsql table ',222);
16765: hr_utility.set_location('new_value id '||l_popl_enrt_typ_cycl_id,222);
16766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ENRT_TYP_CYCL_ID ;
16769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16763: -- Update all relevent cer records with new pk_id
16764: hr_utility.set_location('Before plsql table ',222);
16765: hr_utility.set_location('new_value id '||l_popl_enrt_typ_cycl_id,222);
16766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ENRT_TYP_CYCL_ID ;
16769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16771: hr_utility.set_location('After plsql table ',222);
16764: hr_utility.set_location('Before plsql table ',222);
16765: hr_utility.set_location('new_value id '||l_popl_enrt_typ_cycl_id,222);
16766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ENRT_TYP_CYCL_ID ;
16769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16771: hr_utility.set_location('After plsql table ',222);
16772: --
16765: hr_utility.set_location('new_value id '||l_popl_enrt_typ_cycl_id,222);
16766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ENRT_TYP_CYCL_ID ;
16769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16771: hr_utility.set_location('After plsql table ',222);
16772: --
16773: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16766: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ENRT_TYP_CYCL_ID' ;
16767: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PET.information1 ;
16768: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ENRT_TYP_CYCL_ID ;
16769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16771: hr_utility.set_location('After plsql table ',222);
16772: --
16773: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16774: --
16769: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
16770: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PET_unique.table_route_id;
16771: hr_utility.set_location('After plsql table ',222);
16772: --
16773: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16774: --
16775: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16776: --
16777: else
16771: hr_utility.set_location('After plsql table ',222);
16772: --
16773: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
16774: --
16775: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
16776: --
16777: else
16778: --
16779: -- Call Update routine for the pk_id created in prev run .
16884: end loop;
16885: --
16886: exception when others then
16887: --
16888: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PET',r_pet.information5 );
16889: --
16890: end create_PET_rows;
16891:
16892: --
17045: l_YR_PERD_ID := get_fk('YR_PERD_ID', r_ENP.INFORMATION240,l_dml_operation);
17046:
17047:
17048:
17049: if BEN_PD_COPY_TO_BEN_ONE.g_mapping_done then
17050: l_POS_STRUCTURE_VERSION_ID := r_ENP.information176 ;
17051: else
17052: l_POS_STRUCTURE_VERSION_ID := r_ENP.information174 ;
17053: end if;
17059: --
17060: if l_dml_operation = 'UPDATE' then
17061: --
17062: l_update := true;
17063: if r_ENP_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
17064: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17065: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
17060: if l_dml_operation = 'UPDATE' then
17061: --
17062: l_update := true;
17063: if r_ENP_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
17064: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17065: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
17068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17061: --
17062: l_update := true;
17063: if r_ENP_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
17064: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17065: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
17068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17062: l_update := true;
17063: if r_ENP_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
17064: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17065: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
17068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17070: --
17063: if r_ENP_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
17064: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17065: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
17068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17070: --
17071: -- update_cer_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
17064: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17065: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
17068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17070: --
17071: -- update_cer_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
17072: --
17065: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17066: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
17068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17070: --
17071: -- update_cer_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
17072: --
17073: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17067: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ENP_unique.information1 ;
17068: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17070: --
17071: -- update_cer_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
17072: --
17073: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17074: --
17075: --DOUBT log_data('ENP',l_new_value,l_prefix || r_ENP_unique.name|| l_suffix,'REUSED');
17069: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17070: --
17071: -- update_cer_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
17072: --
17073: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17074: --
17075: --DOUBT log_data('ENP',l_new_value,l_prefix || r_ENP_unique.name|| l_suffix,'REUSED');
17076: --
17077: end if ;
17088: p_target_business_group_id, nvl(l_enrt_perd_id, -999) ) ;
17089: fetch c_find_ENP_in_target into l_new_value ;
17090: if c_find_ENP_in_target%found then
17091: --
17092: if r_ENP_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
17093: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17089: fetch c_find_ENP_in_target into l_new_value ;
17090: if c_find_ENP_in_target%found then
17091: --
17092: if r_ENP_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
17093: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17090: if c_find_ENP_in_target%found then
17091: --
17092: if r_ENP_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
17093: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17091: --
17092: if r_ENP_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
17093: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17099: --
17092: if r_ENP_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
17093: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17099: --
17100: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17093: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_ID' then
17094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17099: --
17100: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17101: --
17094: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17095: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP_unique.information1 ;
17096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17099: --
17100: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17101: --
17102: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17096: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17097: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17099: --
17100: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17101: --
17102: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17103: end if ;
17104: --
17098: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17099: --
17100: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17101: --
17102: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17103: end if ;
17104: --
17105: l_object_found_in_target := true ;
17106: end if;
17128: end if ;
17129: --
17130:
17131: l_parent_effective_start_date := r_ENP.information10;
17132: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
17133: if l_parent_effective_start_date is null then
17134: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17135: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
17136: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17130:
17131: l_parent_effective_start_date := r_ENP.information10;
17132: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
17133: if l_parent_effective_start_date is null then
17134: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17135: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
17136: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17137: end if;
17138: end if;
17131: l_parent_effective_start_date := r_ENP.information10;
17132: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
17133: if l_parent_effective_start_date is null then
17134: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17135: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
17136: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17137: end if;
17138: end if;
17139: --
17132: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
17133: if l_parent_effective_start_date is null then
17134: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17135: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
17136: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17137: end if;
17138: end if;
17139: --
17140: -- To avoid creating a child with out a parent
17236: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
17237: -- Update all relevent cer records with new pk_id
17238: hr_utility.set_location('Before plsql table ',222);
17239: hr_utility.set_location('new_value id '||l_enrt_perd_id,222);
17240: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17241: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17237: -- Update all relevent cer records with new pk_id
17238: hr_utility.set_location('Before plsql table ',222);
17239: hr_utility.set_location('new_value id '||l_enrt_perd_id,222);
17240: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17241: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17245: hr_utility.set_location('After plsql table ',222);
17238: hr_utility.set_location('Before plsql table ',222);
17239: hr_utility.set_location('new_value id '||l_enrt_perd_id,222);
17240: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17241: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17245: hr_utility.set_location('After plsql table ',222);
17246: --
17239: hr_utility.set_location('new_value id '||l_enrt_perd_id,222);
17240: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17241: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17245: hr_utility.set_location('After plsql table ',222);
17246: --
17247: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17240: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_ID' ;
17241: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ENP.information1 ;
17242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_ID ;
17243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17245: hr_utility.set_location('After plsql table ',222);
17246: --
17247: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17248: --
17243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ENP_unique.table_route_id;
17245: hr_utility.set_location('After plsql table ',222);
17246: --
17247: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17248: --
17249: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17250: --
17251: elsif l_update then
17245: hr_utility.set_location('After plsql table ',222);
17246: --
17247: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17248: --
17249: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17250: --
17251: elsif l_update then
17252: BEN_ENROLLMENT_PERIOD_API.UPDATE_ENROLLMENT_PERIOD(
17253: --
17349: end loop;
17350: --
17351: exception when others then
17352: --
17353: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ENP',r_enp.information5 );
17354: --
17355: end create_ENP_rows;
17356:
17357: --
17495: end if ;
17496: -- End Prefix Sufix derivation
17497: for r_LEN_unique in c_unique_LEN('LEN') loop
17498:
17499: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17500: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17501: r_LEN_unique.information3 >=
17502: ben_pd_copy_to_ben_one.g_copy_effective_date)
17503: ) then
17496: -- End Prefix Sufix derivation
17497: for r_LEN_unique in c_unique_LEN('LEN') loop
17498:
17499: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17500: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17501: r_LEN_unique.information3 >=
17502: ben_pd_copy_to_ben_one.g_copy_effective_date)
17503: ) then
17504: --
17498:
17499: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
17500: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17501: r_LEN_unique.information3 >=
17502: ben_pd_copy_to_ben_one.g_copy_effective_date)
17503: ) then
17504: --
17505: hr_utility.set_location(' r_LEN_unique.table_route_id '||r_LEN_unique.table_route_id,10);
17506: hr_utility.set_location(' r_LEN_unique.information1 '||r_LEN_unique.information1,10);
17537: l_object_found_in_target := TRUE;
17538: --
17539: if l_process_date between r_LEN_unique.information2 and r_LEN_unique.information3 then
17540: l_update := true;
17541: if r_LEN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
17542: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID'
17543: then
17544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17538: --
17539: if l_process_date between r_LEN_unique.information2 and r_LEN_unique.information3 then
17540: l_update := true;
17541: if r_LEN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
17542: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID'
17543: then
17544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17540: l_update := true;
17541: if r_LEN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
17542: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID'
17543: then
17544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17541: if r_LEN_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
17542: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID'
17543: then
17544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17549: --
17542: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID'
17543: then
17544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17549: --
17550: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17543: then
17544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17549: --
17550: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17551: --
17544: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17545: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LEN_unique.information1 ;
17547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17549: --
17550: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17551: --
17552: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17549: --
17550: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
17551: --
17552: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17553: --
17554: --DOUBT log_data('LEN',l_new_value,l_prefix || r_LEN_unique.name|| l_suffix,'REUSED');
17555: --
17556: end if ;
17569: open c_LEN_min_max_dates(r_LEN_unique.table_route_id, r_LEN_unique.information1 ) ;
17570: fetch c_LEN_min_max_dates into l_min_esd,l_max_eed ;
17571: --
17572:
17573: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17574: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17575: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17576: end if;
17577: l_min_esd := greatest(l_min_esd,r_LEN_unique.information2);
17570: fetch c_LEN_min_max_dates into l_min_esd,l_max_eed ;
17571: --
17572:
17573: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17574: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17575: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17576: end if;
17577: l_min_esd := greatest(l_min_esd,r_LEN_unique.information2);
17578: /* open c_LEN(r_LEN_unique.table_route_id,
17571: --
17572:
17573: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17574: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17575: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
17576: end if;
17577: l_min_esd := greatest(l_min_esd,r_LEN_unique.information2);
17578: /* open c_LEN(r_LEN_unique.table_route_id,
17579: r_LEN_unique.information1,
17601: p_from_date => l_min_esd,
17602: p_to_date => l_max_eed );
17603: if l_dt_rec_found THEN
17604: --END TEMPIK
17605: if r_LEN_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
17606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID' then
17607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17602: p_to_date => l_max_eed );
17603: if l_dt_rec_found THEN
17604: --END TEMPIK
17605: if r_LEN_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
17606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID' then
17607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17603: if l_dt_rec_found THEN
17604: --END TEMPIK
17605: if r_LEN_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
17606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID' then
17607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17604: --END TEMPIK
17605: if r_LEN_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
17606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID' then
17607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17612: --
17605: if r_LEN_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
17606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID' then
17607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17612: --
17613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_ID' then
17607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17612: --
17613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17614: --
17607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN_unique.information1 ;
17609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17612: --
17613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17614: --
17615: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
17610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
17611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17612: --
17613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17614: --
17615: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17616: end if ;
17617: --
17611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17612: --
17613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
17614: --
17615: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17616: end if ;
17617: --
17618: l_object_found_in_target := true ;
17619: --TEMPIK
17646: end if ;
17647: --
17648:
17649: l_effective_date := r_LEN.information2;
17650: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17651: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17652: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17653: end if;
17654:
17647: --
17648:
17649: l_effective_date := r_LEN.information2;
17650: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17651: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17652: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17653: end if;
17654:
17655: if l_first_rec and not l_update then
17648:
17649: l_effective_date := r_LEN.information2;
17650: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
17651: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
17652: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
17653: end if;
17654:
17655: if l_first_rec and not l_update then
17656: -- Call Create routine.
17727: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
17728: -- Update all relevent cer records with new pk_id
17729: hr_utility.set_location('Before plsql table ',222);
17730: hr_utility.set_location('new_value id '||l_lee_rsn_id,222);
17731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17732: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17728: -- Update all relevent cer records with new pk_id
17729: hr_utility.set_location('Before plsql table ',222);
17730: hr_utility.set_location('new_value id '||l_lee_rsn_id,222);
17731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17732: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17736: hr_utility.set_location('After plsql table ',222);
17729: hr_utility.set_location('Before plsql table ',222);
17730: hr_utility.set_location('new_value id '||l_lee_rsn_id,222);
17731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17732: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17736: hr_utility.set_location('After plsql table ',222);
17737: --
17730: hr_utility.set_location('new_value id '||l_lee_rsn_id,222);
17731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17732: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17736: hr_utility.set_location('After plsql table ',222);
17737: --
17738: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17731: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_ID' ;
17732: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LEN.information1 ;
17733: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_ID ;
17734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17736: hr_utility.set_location('After plsql table ',222);
17737: --
17738: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17739: --
17734: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
17735: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LEN_unique.table_route_id;
17736: hr_utility.set_location('After plsql table ',222);
17737: --
17738: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17739: --
17740: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17741: --
17742: else
17736: hr_utility.set_location('After plsql table ',222);
17737: --
17738: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
17739: --
17740: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
17741: --
17742: else
17743: --
17744: -- Call Update routine for the pk_id created in prev run .
17870: end loop;
17871: --
17872: exception when others then
17873: --
17874: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LEN',r_len.information5 );
17875: --
17876: end create_LEN_rows;
17877:
17878: --
18020: end if ;
18021: -- End Prefix Sufix derivation
18022: for r_ERP_unique in c_unique_ERP('ERP') loop
18023:
18024: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18025: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18026: r_ERP_unique.information3 >=
18027: ben_pd_copy_to_ben_one.g_copy_effective_date)
18028: ) then
18021: -- End Prefix Sufix derivation
18022: for r_ERP_unique in c_unique_ERP('ERP') loop
18023:
18024: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18025: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18026: r_ERP_unique.information3 >=
18027: ben_pd_copy_to_ben_one.g_copy_effective_date)
18028: ) then
18029: --
18023:
18024: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18025: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18026: r_ERP_unique.information3 >=
18027: ben_pd_copy_to_ben_one.g_copy_effective_date)
18028: ) then
18029: --
18030: hr_utility.set_location(' r_ERP_unique.table_route_id '||r_ERP_unique.table_route_id,10);
18031: hr_utility.set_location(' r_ERP_unique.information1 '||r_ERP_unique.information1,10);
18063: l_object_found_in_target := TRUE;
18064: --
18065: if l_process_date between r_ERP_unique.information2 and r_ERP_unique.information3 then
18066: l_update := true;
18067: if r_ERP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
18068: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID'
18069: then
18070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18064: --
18065: if l_process_date between r_ERP_unique.information2 and r_ERP_unique.information3 then
18066: l_update := true;
18067: if r_ERP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
18068: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID'
18069: then
18070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
18066: l_update := true;
18067: if r_ERP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
18068: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID'
18069: then
18070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
18073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18067: if r_ERP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
18068: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID'
18069: then
18070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
18073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18075: --
18068: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID'
18069: then
18070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
18073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18075: --
18076: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18069: then
18070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
18073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18075: --
18076: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18077: --
18070: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18071: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18072: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ERP_unique.information1 ;
18073: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18075: --
18076: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18077: --
18078: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18074: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18075: --
18076: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18077: --
18078: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18079: --
18080: --DOUBT log_data('ERP',l_new_value,l_prefix || r_ERP_unique.name|| l_suffix,'REUSED');
18081: --
18082: end if ;
18095: open c_ERP_min_max_dates(r_ERP_unique.table_route_id, r_ERP_unique.information1 ) ;
18096: fetch c_ERP_min_max_dates into l_min_esd,l_max_eed ;
18097: --
18098:
18099: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18100: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18101: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18102: end if;
18103: l_min_esd := greatest(l_min_esd,r_ERP_unique.information2);
18096: fetch c_ERP_min_max_dates into l_min_esd,l_max_eed ;
18097: --
18098:
18099: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18100: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18101: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18102: end if;
18103: l_min_esd := greatest(l_min_esd,r_ERP_unique.information2);
18104: /* open c_ERP(r_ERP_unique.table_route_id,
18097: --
18098:
18099: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18100: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18101: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18102: end if;
18103: l_min_esd := greatest(l_min_esd,r_ERP_unique.information2);
18104: /* open c_ERP(r_ERP_unique.table_route_id,
18105: r_ERP_unique.information1,
18127: p_from_date => l_min_esd,
18128: p_to_date => l_max_eed );
18129: if l_dt_rec_found THEN
18130: --END TEMPIK
18131: if r_ERP_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
18132: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID' then
18133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18128: p_to_date => l_max_eed );
18129: if l_dt_rec_found THEN
18130: --END TEMPIK
18131: if r_ERP_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
18132: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID' then
18133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18129: if l_dt_rec_found THEN
18130: --END TEMPIK
18131: if r_ERP_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
18132: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID' then
18133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18130: --END TEMPIK
18131: if r_ERP_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
18132: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID' then
18133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18138: --
18131: if r_ERP_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
18132: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID' then
18133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18138: --
18139: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18132: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ENRT_PERD_FOR_PL_ID' then
18133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18138: --
18139: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18140: --
18133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP_unique.information1 ;
18135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18138: --
18139: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18140: --
18141: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18138: --
18139: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18140: --
18141: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18142: end if ;
18143: --
18137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18138: --
18139: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18140: --
18141: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18142: end if ;
18143: --
18144: l_object_found_in_target := true ;
18145: --TEMPIK
18172: end if ;
18173: --
18174:
18175: l_effective_date := r_ERP.information2;
18176: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18177: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18178: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18179: end if;
18180:
18173: --
18174:
18175: l_effective_date := r_ERP.information2;
18176: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18177: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18178: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18179: end if;
18180:
18181: if l_first_rec and not l_update then
18174:
18175: l_effective_date := r_ERP.information2;
18176: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18177: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18178: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18179: end if;
18180:
18181: if l_first_rec and not l_update then
18182: -- Call Create routine.
18238: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
18239: -- Update all relevent cer records with new pk_id
18240: hr_utility.set_location('Before plsql table ',222);
18241: hr_utility.set_location('new_value id '||l_enrt_perd_for_pl_id,222);
18242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_FOR_PL_ID ;
18245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18239: -- Update all relevent cer records with new pk_id
18240: hr_utility.set_location('Before plsql table ',222);
18241: hr_utility.set_location('new_value id '||l_enrt_perd_for_pl_id,222);
18242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_FOR_PL_ID ;
18245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18247: hr_utility.set_location('After plsql table ',222);
18240: hr_utility.set_location('Before plsql table ',222);
18241: hr_utility.set_location('new_value id '||l_enrt_perd_for_pl_id,222);
18242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_FOR_PL_ID ;
18245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18247: hr_utility.set_location('After plsql table ',222);
18248: --
18241: hr_utility.set_location('new_value id '||l_enrt_perd_for_pl_id,222);
18242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_FOR_PL_ID ;
18245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18247: hr_utility.set_location('After plsql table ',222);
18248: --
18249: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18242: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ENRT_PERD_FOR_PL_ID' ;
18243: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ERP.information1 ;
18244: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ENRT_PERD_FOR_PL_ID ;
18245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18247: hr_utility.set_location('After plsql table ',222);
18248: --
18249: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18250: --
18245: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18246: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ERP_unique.table_route_id;
18247: hr_utility.set_location('After plsql table ',222);
18248: --
18249: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18250: --
18251: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18252: --
18253: else
18247: hr_utility.set_location('After plsql table ',222);
18248: --
18249: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18250: --
18251: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18252: --
18253: else
18254: --
18255: -- Call Update routine for the pk_id created in prev run .
18368: end loop;
18369: --
18370: exception when others then
18371: --
18372: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ERP',r_erp.information5 );
18373: --
18374: end create_ERP_rows;
18375:
18376: --
18508: end if ;
18509: -- End Prefix Sufix derivation
18510: for r_SER_unique in c_unique_SER('SER') loop
18511:
18512: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18513: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18514: r_SER_unique.information3 >=
18515: ben_pd_copy_to_ben_one.g_copy_effective_date)
18516: ) then
18509: -- End Prefix Sufix derivation
18510: for r_SER_unique in c_unique_SER('SER') loop
18511:
18512: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18513: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18514: r_SER_unique.information3 >=
18515: ben_pd_copy_to_ben_one.g_copy_effective_date)
18516: ) then
18517: --
18511:
18512: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18513: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18514: r_SER_unique.information3 >=
18515: ben_pd_copy_to_ben_one.g_copy_effective_date)
18516: ) then
18517: --
18518: hr_utility.set_location(' r_SER_unique.table_route_id '||r_SER_unique.table_route_id,10);
18519: hr_utility.set_location(' r_SER_unique.information1 '||r_SER_unique.information1,10);
18544: l_object_found_in_target := TRUE;
18545: --
18546: if l_process_date between r_SER_unique.information2 and r_SER_unique.information3 then
18547: l_update := true;
18548: if r_SER_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
18549: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID'
18550: then
18551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18545: --
18546: if l_process_date between r_SER_unique.information2 and r_SER_unique.information3 then
18547: l_update := true;
18548: if r_SER_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
18549: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID'
18550: then
18551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18547: l_update := true;
18548: if r_SER_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
18549: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID'
18550: then
18551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18548: if r_SER_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
18549: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID'
18550: then
18551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18556: --
18549: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID'
18550: then
18551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18556: --
18557: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18550: then
18551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18556: --
18557: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18558: --
18551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_SER_unique.information1 ;
18554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18556: --
18557: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18558: --
18559: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18556: --
18557: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
18558: --
18559: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18560: --
18561: --DOUBT log_data('SER',l_new_value,l_prefix || r_SER_unique.name|| l_suffix,'REUSED');
18562: --
18563: end if ;
18576: open c_SER_min_max_dates(r_SER_unique.table_route_id, r_SER_unique.information1 ) ;
18577: fetch c_SER_min_max_dates into l_min_esd,l_max_eed ;
18578: --
18579:
18580: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18581: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18582: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18583: end if;
18584: l_min_esd := greatest(l_min_esd,r_SER_unique.information2);
18577: fetch c_SER_min_max_dates into l_min_esd,l_max_eed ;
18578: --
18579:
18580: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18581: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18582: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18583: end if;
18584: l_min_esd := greatest(l_min_esd,r_SER_unique.information2);
18585: /* open c_SER(r_SER_unique.table_route_id,
18578: --
18579:
18580: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18581: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18582: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
18583: end if;
18584: l_min_esd := greatest(l_min_esd,r_SER_unique.information2);
18585: /* open c_SER(r_SER_unique.table_route_id,
18586: r_SER_unique.information1,
18607: p_from_date => l_min_esd,
18608: p_to_date => l_max_eed );
18609: if l_dt_rec_found THEN
18610: --END TEMPIK
18611: if r_SER_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
18612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID' then
18613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18608: p_to_date => l_max_eed );
18609: if l_dt_rec_found THEN
18610: --END TEMPIK
18611: if r_SER_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
18612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID' then
18613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18609: if l_dt_rec_found THEN
18610: --END TEMPIK
18611: if r_SER_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
18612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID' then
18613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18610: --END TEMPIK
18611: if r_SER_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
18612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID' then
18613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18618: --
18611: if r_SER_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
18612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID' then
18613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18618: --
18619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18612: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'SCHEDD_ENRT_RL_ID' then
18613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18618: --
18619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18620: --
18613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER_unique.information1 ;
18615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18618: --
18619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18620: --
18621: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
18616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
18617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18618: --
18619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18620: --
18621: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18622: end if ;
18623: --
18617: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18618: --
18619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
18620: --
18621: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18622: end if ;
18623: --
18624: l_object_found_in_target := true ;
18625: --TEMPIK
18652: end if ;
18653: --
18654:
18655: l_effective_date := r_SER.information2;
18656: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18657: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18658: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18659: end if;
18660:
18653: --
18654:
18655: l_effective_date := r_SER.information2;
18656: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18657: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18658: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18659: end if;
18660:
18661: if l_first_rec and not l_update then
18654:
18655: l_effective_date := r_SER.information2;
18656: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18657: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
18658: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
18659: end if;
18660:
18661: if l_first_rec and not l_update then
18662: -- Call Create routine.
18710: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
18711: -- Update all relevent cer records with new pk_id
18712: hr_utility.set_location('Before plsql table ',222);
18713: hr_utility.set_location('new_value id '||l_schedd_enrt_rl_id,222);
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18711: -- Update all relevent cer records with new pk_id
18712: hr_utility.set_location('Before plsql table ',222);
18713: hr_utility.set_location('new_value id '||l_schedd_enrt_rl_id,222);
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18719: hr_utility.set_location('After plsql table ',222);
18712: hr_utility.set_location('Before plsql table ',222);
18713: hr_utility.set_location('new_value id '||l_schedd_enrt_rl_id,222);
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18719: hr_utility.set_location('After plsql table ',222);
18720: --
18713: hr_utility.set_location('new_value id '||l_schedd_enrt_rl_id,222);
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18719: hr_utility.set_location('After plsql table ',222);
18720: --
18721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18714: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'SCHEDD_ENRT_RL_ID' ;
18715: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_SER.information1 ;
18716: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_SCHEDD_ENRT_RL_ID ;
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18719: hr_utility.set_location('After plsql table ',222);
18720: --
18721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18722: --
18717: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
18718: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_SER_unique.table_route_id;
18719: hr_utility.set_location('After plsql table ',222);
18720: --
18721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18722: --
18723: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18724: --
18725: else
18719: hr_utility.set_location('After plsql table ',222);
18720: --
18721: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
18722: --
18723: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
18724: --
18725: else
18726: --
18727: -- Call Update routine for the pk_id created in prev run .
18832: end loop;
18833: --
18834: exception when others then
18835: --
18836: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'SER',r_ser.information5 );
18837: --
18838: end create_SER_rows;
18839: --
18840: ---------------------------------------------------------------
18971: end if ;
18972: -- End Prefix Sufix derivation
18973: for r_LRR_unique in c_unique_LRR('LRR') loop
18974:
18975: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18976: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18977: r_LRR_unique.information3 >=
18978: ben_pd_copy_to_ben_one.g_copy_effective_date)
18979: ) then
18972: -- End Prefix Sufix derivation
18973: for r_LRR_unique in c_unique_LRR('LRR') loop
18974:
18975: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18976: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18977: r_LRR_unique.information3 >=
18978: ben_pd_copy_to_ben_one.g_copy_effective_date)
18979: ) then
18980: --
18974:
18975: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
18976: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
18977: r_LRR_unique.information3 >=
18978: ben_pd_copy_to_ben_one.g_copy_effective_date)
18979: ) then
18980: --
18981: hr_utility.set_location(' r_LRR_unique.table_route_id '||r_LRR_unique.table_route_id,10);
18982: hr_utility.set_location(' r_LRR_unique.information1 '||r_LRR_unique.information1,10);
19007: l_object_found_in_target := TRUE;
19008: --
19009: if l_process_date between r_LRR_unique.information2 and r_LRR_unique.information3 then
19010: l_update := true;
19011: if r_LRR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19012: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID'
19013: then
19014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19008: --
19009: if l_process_date between r_LRR_unique.information2 and r_LRR_unique.information3 then
19010: l_update := true;
19011: if r_LRR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19012: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID'
19013: then
19014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
19010: l_update := true;
19011: if r_LRR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19012: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID'
19013: then
19014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
19017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19011: if r_LRR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19012: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID'
19013: then
19014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
19017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19019: --
19012: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID'
19013: then
19014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
19017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19019: --
19020: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19013: then
19014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
19017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19019: --
19020: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19021: --
19014: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LRR_unique.information1 ;
19017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19019: --
19020: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19021: --
19022: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19019: --
19020: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19021: --
19022: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19023: --
19024: --DOUBT log_data('LRR',l_new_value,l_prefix || r_LRR_unique.name|| l_suffix,'REUSED');
19025: --
19026: end if ;
19039: open c_LRR_min_max_dates(r_LRR_unique.table_route_id, r_LRR_unique.information1 ) ;
19040: fetch c_LRR_min_max_dates into l_min_esd,l_max_eed ;
19041: --
19042:
19043: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19044: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19045: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19046: end if;
19047: l_min_esd := greatest(l_min_esd,r_LRR_unique.information2);
19040: fetch c_LRR_min_max_dates into l_min_esd,l_max_eed ;
19041: --
19042:
19043: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19044: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19045: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19046: end if;
19047: l_min_esd := greatest(l_min_esd,r_LRR_unique.information2);
19048: /* open c_LRR(r_LRR_unique.table_route_id,
19041: --
19042:
19043: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19044: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19045: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19046: end if;
19047: l_min_esd := greatest(l_min_esd,r_LRR_unique.information2);
19048: /* open c_LRR(r_LRR_unique.table_route_id,
19049: r_LRR_unique.information1,
19070: p_from_date => l_min_esd,
19071: p_to_date => l_max_eed );
19072: if l_dt_rec_found THEN
19073: --END TEMPIK
19074: if r_LRR_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
19075: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID' then
19076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19071: p_to_date => l_max_eed );
19072: if l_dt_rec_found THEN
19073: --END TEMPIK
19074: if r_LRR_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
19075: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID' then
19076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19072: if l_dt_rec_found THEN
19073: --END TEMPIK
19074: if r_LRR_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
19075: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID' then
19076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19073: --END TEMPIK
19074: if r_LRR_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
19075: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID' then
19076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19081: --
19074: if r_LRR_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
19075: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID' then
19076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19081: --
19082: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19075: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LEE_RSN_RL_ID' then
19076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19081: --
19082: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19083: --
19076: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19077: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR_unique.information1 ;
19078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19081: --
19082: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19083: --
19084: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19078: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19079: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19081: --
19082: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19083: --
19084: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19085: end if ;
19086: --
19080: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19081: --
19082: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19083: --
19084: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19085: end if ;
19086: --
19087: l_object_found_in_target := true ;
19088: --TEMPIK
19115: end if ;
19116: --
19117:
19118: l_effective_date := r_LRR.information2;
19119: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19120: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19121: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19122: end if;
19123:
19116: --
19117:
19118: l_effective_date := r_LRR.information2;
19119: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19120: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19121: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19122: end if;
19123:
19124: if l_first_rec and not l_update then
19117:
19118: l_effective_date := r_LRR.information2;
19119: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19120: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19121: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19122: end if;
19123:
19124: if l_first_rec and not l_update then
19125: -- Call Create routine.
19173: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
19174: -- Update all relevent cer records with new pk_id
19175: hr_utility.set_location('Before plsql table ',222);
19176: hr_utility.set_location('new_value id '||l_lee_rsn_rl_id,222);
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19174: -- Update all relevent cer records with new pk_id
19175: hr_utility.set_location('Before plsql table ',222);
19176: hr_utility.set_location('new_value id '||l_lee_rsn_rl_id,222);
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19182: hr_utility.set_location('After plsql table ',222);
19175: hr_utility.set_location('Before plsql table ',222);
19176: hr_utility.set_location('new_value id '||l_lee_rsn_rl_id,222);
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19182: hr_utility.set_location('After plsql table ',222);
19183: --
19176: hr_utility.set_location('new_value id '||l_lee_rsn_rl_id,222);
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19182: hr_utility.set_location('After plsql table ',222);
19183: --
19184: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19177: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LEE_RSN_RL_ID' ;
19178: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LRR.information1 ;
19179: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LEE_RSN_RL_ID ;
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19182: hr_utility.set_location('After plsql table ',222);
19183: --
19184: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19185: --
19180: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19181: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LRR_unique.table_route_id;
19182: hr_utility.set_location('After plsql table ',222);
19183: --
19184: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19185: --
19186: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19187: --
19188: else
19182: hr_utility.set_location('After plsql table ',222);
19183: --
19184: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19185: --
19186: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19187: --
19188: else
19189: --
19190: -- Call Update routine for the pk_id created in prev run .
19294: end loop;
19295: --
19296: exception when others then
19297: --
19298: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LRR',r_lrr.information5 );
19299: --
19300: end create_LRR_rows;
19301:
19302: ---------------------------------------------------------------
19442: end if ;
19443: -- End Prefix Sufix derivation
19444: for r_ADE_unique in c_unique_ADE('ADE') loop
19445:
19446: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19447: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19448: r_ADE_unique.information3 >=
19449: ben_pd_copy_to_ben_one.g_copy_effective_date)
19450: ) then
19443: -- End Prefix Sufix derivation
19444: for r_ADE_unique in c_unique_ADE('ADE') loop
19445:
19446: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19447: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19448: r_ADE_unique.information3 >=
19449: ben_pd_copy_to_ben_one.g_copy_effective_date)
19450: ) then
19451: --
19445:
19446: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19447: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19448: r_ADE_unique.information3 >=
19449: ben_pd_copy_to_ben_one.g_copy_effective_date)
19450: ) then
19451: --
19452: hr_utility.set_location(' r_ADE_unique.table_route_id '||r_ADE_unique.table_route_id,10);
19453: hr_utility.set_location(' r_ADE_unique.information1 '||r_ADE_unique.information1,10);
19481: l_object_found_in_target := TRUE;
19482: --
19483: if l_process_date between r_ADE_unique.information2 and r_ADE_unique.information3 then
19484: l_update := true;
19485: if r_ADE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19486: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID'
19487: then
19488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19482: --
19483: if l_process_date between r_ADE_unique.information2 and r_ADE_unique.information3 then
19484: l_update := true;
19485: if r_ADE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19486: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID'
19487: then
19488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19484: l_update := true;
19485: if r_ADE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19486: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID'
19487: then
19488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19485: if r_ADE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19486: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID'
19487: then
19488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19493: --
19486: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID'
19487: then
19488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19493: --
19494: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19487: then
19488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19493: --
19494: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19495: --
19488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19489: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19490: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ADE_unique.information1 ;
19491: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19493: --
19494: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19495: --
19496: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19492: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19493: --
19494: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19495: --
19496: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19497: --
19498: --DOUBT log_data('ADE',l_new_value,l_prefix || r_ADE_unique.name|| l_suffix,'REUSED');
19499: --
19500: end if ;
19513: open c_ADE_min_max_dates(r_ADE_unique.table_route_id, r_ADE_unique.information1 ) ;
19514: fetch c_ADE_min_max_dates into l_min_esd,l_max_eed ;
19515: --
19516:
19517: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19518: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19519: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19520: end if;
19521: l_min_esd := greatest(l_min_esd,r_ADE_unique.information2);
19514: fetch c_ADE_min_max_dates into l_min_esd,l_max_eed ;
19515: --
19516:
19517: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19518: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19519: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19520: end if;
19521: l_min_esd := greatest(l_min_esd,r_ADE_unique.information2);
19522: /* open c_ADE(r_ADE_unique.table_route_id,
19515: --
19516:
19517: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19518: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19519: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19520: end if;
19521: l_min_esd := greatest(l_min_esd,r_ADE_unique.information2);
19522: /* open c_ADE(r_ADE_unique.table_route_id,
19523: r_ADE_unique.information1,
19544: p_from_date => l_min_esd,
19545: p_to_date => l_max_eed );
19546: if l_dt_rec_found THEN
19547: --END TEMPIK
19548: if r_ADE_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
19549: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID' then
19550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19545: p_to_date => l_max_eed );
19546: if l_dt_rec_found THEN
19547: --END TEMPIK
19548: if r_ADE_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
19549: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID' then
19550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19546: if l_dt_rec_found THEN
19547: --END TEMPIK
19548: if r_ADE_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
19549: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID' then
19550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19547: --END TEMPIK
19548: if r_ADE_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
19549: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID' then
19550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19555: --
19548: if r_ADE_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
19549: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID' then
19550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19555: --
19556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19549: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'APLD_DPNT_CVG_ELIG_PRFL_ID' then
19550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19555: --
19556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19557: --
19550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE_unique.information1 ;
19552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19555: --
19556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19557: --
19558: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
19553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19555: --
19556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19557: --
19558: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19559: end if ;
19560: --
19554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19555: --
19556: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
19557: --
19558: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19559: end if ;
19560: --
19561: l_object_found_in_target := true ;
19562: --TEMPIK
19589: end if ;
19590: --
19591:
19592: l_effective_date := r_ADE.information2;
19593: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19594: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19595: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19596: end if;
19597:
19590: --
19591:
19592: l_effective_date := r_ADE.information2;
19593: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19594: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19595: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19596: end if;
19597:
19598: if l_first_rec and not l_update then
19591:
19592: l_effective_date := r_ADE.information2;
19593: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19594: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19595: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
19596: end if;
19597:
19598: if l_first_rec and not l_update then
19599: -- Call Create routine.
19650: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
19651: -- Update all relevent cer records with new pk_id
19652: hr_utility.set_location('Before plsql table ',222);
19653: hr_utility.set_location('new_value id '||l_apld_dpnt_cvg_elig_prfl_id,222);
19654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_APLD_DPNT_CVG_ELIG_PRFL_ID ;
19657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19651: -- Update all relevent cer records with new pk_id
19652: hr_utility.set_location('Before plsql table ',222);
19653: hr_utility.set_location('new_value id '||l_apld_dpnt_cvg_elig_prfl_id,222);
19654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_APLD_DPNT_CVG_ELIG_PRFL_ID ;
19657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19659: hr_utility.set_location('After plsql table ',222);
19652: hr_utility.set_location('Before plsql table ',222);
19653: hr_utility.set_location('new_value id '||l_apld_dpnt_cvg_elig_prfl_id,222);
19654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_APLD_DPNT_CVG_ELIG_PRFL_ID ;
19657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19659: hr_utility.set_location('After plsql table ',222);
19660: --
19653: hr_utility.set_location('new_value id '||l_apld_dpnt_cvg_elig_prfl_id,222);
19654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_APLD_DPNT_CVG_ELIG_PRFL_ID ;
19657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19659: hr_utility.set_location('After plsql table ',222);
19660: --
19661: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19654: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'APLD_DPNT_CVG_ELIG_PRFL_ID' ;
19655: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ADE.information1 ;
19656: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_APLD_DPNT_CVG_ELIG_PRFL_ID ;
19657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19659: hr_utility.set_location('After plsql table ',222);
19660: --
19661: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19662: --
19657: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
19658: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ADE_unique.table_route_id;
19659: hr_utility.set_location('After plsql table ',222);
19660: --
19661: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19662: --
19663: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19664: --
19665: else
19659: hr_utility.set_location('After plsql table ',222);
19660: --
19661: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
19662: --
19663: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19664: --
19665: else
19666: --
19667: -- Call Update routine for the pk_id created in prev run .
19775: end loop;
19776: --
19777: exception when others then
19778: --
19779: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ADE',r_ade.information5 );
19780: --
19781: end create_ADE_rows;
19782:
19783: --
19916: end if ;
19917: -- End Prefix Sufix derivation
19918: for r_PGC_unique in c_unique_PGC('PGC') loop
19919:
19920: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19921: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19922: r_PGC_unique.information3 >=
19923: ben_pd_copy_to_ben_one.g_copy_effective_date)
19924: ) then
19917: -- End Prefix Sufix derivation
19918: for r_PGC_unique in c_unique_PGC('PGC') loop
19919:
19920: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19921: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19922: r_PGC_unique.information3 >=
19923: ben_pd_copy_to_ben_one.g_copy_effective_date)
19924: ) then
19925: --
19919:
19920: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
19921: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19922: r_PGC_unique.information3 >=
19923: ben_pd_copy_to_ben_one.g_copy_effective_date)
19924: ) then
19925: --
19926: hr_utility.set_location(' r_PGC_unique.table_route_id '||r_PGC_unique.table_route_id,10);
19927: hr_utility.set_location(' r_PGC_unique.information1 '||r_PGC_unique.information1,10);
19952: l_object_found_in_target := TRUE;
19953: --
19954: if l_process_date between r_PGC_unique.information2 and r_PGC_unique.information3 then
19955: l_update := true;
19956: if r_PGC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19957: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID'
19958: then
19959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
19960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19953: --
19954: if l_process_date between r_PGC_unique.information2 and r_PGC_unique.information3 then
19955: l_update := true;
19956: if r_PGC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19957: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID'
19958: then
19959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
19960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19955: l_update := true;
19956: if r_PGC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19957: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID'
19958: then
19959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
19960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19962: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
19956: if r_PGC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
19957: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID'
19958: then
19959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
19960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19962: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
19964: --
19957: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID'
19958: then
19959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
19960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19962: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
19964: --
19965: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19958: then
19959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
19960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19962: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
19964: --
19965: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19966: --
19959: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
19960: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
19961: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PGC_unique.information1 ;
19962: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
19963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
19964: --
19965: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19966: --
19967: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
19964: --
19965: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
19966: --
19967: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
19968: --
19969: --DOUBT log_data('PGC',l_new_value,l_prefix || r_PGC_unique.name|| l_suffix,'REUSED');
19970: --
19971: end if ;
19984: open c_PGC_min_max_dates(r_PGC_unique.table_route_id, r_PGC_unique.information1 ) ;
19985: fetch c_PGC_min_max_dates into l_min_esd,l_max_eed ;
19986: --
19987:
19988: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19989: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19990: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19991: end if;
19992: l_min_esd := greatest(l_min_esd,r_PGC_unique.information2);
19985: fetch c_PGC_min_max_dates into l_min_esd,l_max_eed ;
19986: --
19987:
19988: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19989: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19990: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19991: end if;
19992: l_min_esd := greatest(l_min_esd,r_PGC_unique.information2);
19993: /* open c_PGC(r_PGC_unique.table_route_id,
19986: --
19987:
19988: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
19989: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
19990: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
19991: end if;
19992: l_min_esd := greatest(l_min_esd,r_PGC_unique.information2);
19993: /* open c_PGC(r_PGC_unique.table_route_id,
19994: r_PGC_unique.information1,
20016: p_from_date => l_min_esd,
20017: p_to_date => l_max_eed );
20018: if l_dt_rec_found THEN
20019: --END TEMPIK
20020: if r_PGC_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
20021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID' then
20022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
20024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20017: p_to_date => l_max_eed );
20018: if l_dt_rec_found THEN
20019: --END TEMPIK
20020: if r_PGC_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
20021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID' then
20022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
20024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20018: if l_dt_rec_found THEN
20019: --END TEMPIK
20020: if r_PGC_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
20021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID' then
20022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
20024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20019: --END TEMPIK
20020: if r_PGC_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
20021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID' then
20022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
20024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20027: --
20020: if r_PGC_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
20021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID' then
20022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
20024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20027: --
20028: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20021: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PGM_DPNT_CVG_CTFN_ID' then
20022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
20024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20027: --
20028: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20029: --
20022: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20023: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC_unique.information1 ;
20024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20027: --
20028: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20029: --
20030: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20024: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20027: --
20028: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20029: --
20030: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20031: end if ;
20032: --
20026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20027: --
20028: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20029: --
20030: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20031: end if ;
20032: --
20033: l_object_found_in_target := true ;
20034: --TEMPIK
20061: end if ;
20062: --
20063:
20064: l_effective_date := r_PGC.information2;
20065: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20066: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20067: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20068: end if;
20069:
20062: --
20063:
20064: l_effective_date := r_PGC.information2;
20065: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20066: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20067: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20068: end if;
20069:
20070: if l_first_rec and not l_update then
20063:
20064: l_effective_date := r_PGC.information2;
20065: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20066: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20067: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20068: end if;
20069:
20070: if l_first_rec and not l_update then
20071: -- Call Create routine.
20123: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
20124: -- Update all relevent cer records with new pk_id
20125: hr_utility.set_location('Before plsql table ',222);
20126: hr_utility.set_location('new_value id '||l_pgm_dpnt_cvg_ctfn_id,222);
20127: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PGM_DPNT_CVG_CTFN_ID ;
20130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20124: -- Update all relevent cer records with new pk_id
20125: hr_utility.set_location('Before plsql table ',222);
20126: hr_utility.set_location('new_value id '||l_pgm_dpnt_cvg_ctfn_id,222);
20127: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PGM_DPNT_CVG_CTFN_ID ;
20130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20132: hr_utility.set_location('After plsql table ',222);
20125: hr_utility.set_location('Before plsql table ',222);
20126: hr_utility.set_location('new_value id '||l_pgm_dpnt_cvg_ctfn_id,222);
20127: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PGM_DPNT_CVG_CTFN_ID ;
20130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20132: hr_utility.set_location('After plsql table ',222);
20133: --
20126: hr_utility.set_location('new_value id '||l_pgm_dpnt_cvg_ctfn_id,222);
20127: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PGM_DPNT_CVG_CTFN_ID ;
20130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20132: hr_utility.set_location('After plsql table ',222);
20133: --
20134: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20127: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PGM_DPNT_CVG_CTFN_ID' ;
20128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PGC.information1 ;
20129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PGM_DPNT_CVG_CTFN_ID ;
20130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20132: hr_utility.set_location('After plsql table ',222);
20133: --
20134: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20135: --
20130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PGC_unique.table_route_id;
20132: hr_utility.set_location('After plsql table ',222);
20133: --
20134: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20135: --
20136: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20137: --
20138: else
20132: hr_utility.set_location('After plsql table ',222);
20133: --
20134: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20135: --
20136: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20137: --
20138: else
20139: --
20140: -- Call Update routine for the pk_id created in prev run .
20249: end loop;
20250: --
20251: exception when others then
20252: --
20253: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PGC',r_pgc.information5 );
20254: --
20255: end create_PGC_rows;
20256:
20257: ---------------------------------------------------------------
20391: end if ;
20392: -- End Prefix Sufix derivation
20393: for r_LGE_unique in c_unique_LGE('LGE') loop
20394:
20395: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20396: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20397: r_LGE_unique.information3 >=
20398: ben_pd_copy_to_ben_one.g_copy_effective_date)
20399: ) then
20392: -- End Prefix Sufix derivation
20393: for r_LGE_unique in c_unique_LGE('LGE') loop
20394:
20395: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20396: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20397: r_LGE_unique.information3 >=
20398: ben_pd_copy_to_ben_one.g_copy_effective_date)
20399: ) then
20400: --
20394:
20395: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20396: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20397: r_LGE_unique.information3 >=
20398: ben_pd_copy_to_ben_one.g_copy_effective_date)
20399: ) then
20400: --
20401: hr_utility.set_location(' r_LGE_unique.table_route_id '||r_LGE_unique.table_route_id,10);
20402: hr_utility.set_location(' r_LGE_unique.information1 '||r_LGE_unique.information1,10);
20432: l_object_found_in_target := TRUE;
20433: --
20434: if l_process_date between r_LGE_unique.information2 and r_LGE_unique.information3 then
20435: l_update := true;
20436: if r_LGE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
20437: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID'
20438: then
20439: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20440: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20433: --
20434: if l_process_date between r_LGE_unique.information2 and r_LGE_unique.information3 then
20435: l_update := true;
20436: if r_LGE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
20437: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID'
20438: then
20439: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20440: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20441: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20435: l_update := true;
20436: if r_LGE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
20437: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID'
20438: then
20439: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20440: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20441: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20436: if r_LGE_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
20437: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID'
20438: then
20439: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20440: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20441: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20444: --
20437: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID'
20438: then
20439: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20440: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20441: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20444: --
20445: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20438: then
20439: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20440: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20441: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20444: --
20445: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20446: --
20439: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20440: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20441: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LGE_unique.information1 ;
20442: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20444: --
20445: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20446: --
20447: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20444: --
20445: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20446: --
20447: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20448: --
20449: --DOUBT log_data('LGE',l_new_value,l_prefix || r_LGE_unique.name|| l_suffix,'REUSED');
20450: --
20451: end if ;
20464: open c_LGE_min_max_dates(r_LGE_unique.table_route_id, r_LGE_unique.information1 ) ;
20465: fetch c_LGE_min_max_dates into l_min_esd,l_max_eed ;
20466: --
20467:
20468: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20469: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20470: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20471: end if;
20472: l_min_esd := greatest(l_min_esd,r_LGE_unique.information2);
20465: fetch c_LGE_min_max_dates into l_min_esd,l_max_eed ;
20466: --
20467:
20468: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20469: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20470: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20471: end if;
20472: l_min_esd := greatest(l_min_esd,r_LGE_unique.information2);
20473: /* open c_LGE(r_LGE_unique.table_route_id,
20466: --
20467:
20468: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20469: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20470: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20471: end if;
20472: l_min_esd := greatest(l_min_esd,r_LGE_unique.information2);
20473: /* open c_LGE(r_LGE_unique.table_route_id,
20474: r_LGE_unique.information1,
20495: p_to_date => l_max_eed );
20496: if l_dt_rec_found THEN
20497: --END TEMPIK
20498: --
20499: if r_LGE_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
20500: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID' then
20501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20496: if l_dt_rec_found THEN
20497: --END TEMPIK
20498: --
20499: if r_LGE_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
20500: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID' then
20501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20497: --END TEMPIK
20498: --
20499: if r_LGE_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
20500: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID' then
20501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20498: --
20499: if r_LGE_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
20500: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID' then
20501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20506: --
20499: if r_LGE_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
20500: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID' then
20501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20506: --
20507: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20500: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_PGM_ENRT_ID' then
20501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20506: --
20507: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20508: --
20501: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20502: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE_unique.information1 ;
20503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20506: --
20507: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20508: --
20509: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20503: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20504: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20506: --
20507: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20508: --
20509: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20510: end if ;
20511: --
20505: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20506: --
20507: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20508: --
20509: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20510: end if ;
20511: --
20512: l_object_found_in_target := true ;
20513: --TEMPIK
20540: end if ;
20541: --
20542:
20543: l_effective_date := r_LGE.information2;
20544: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20545: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20546: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20547: end if;
20548:
20541: --
20542:
20543: l_effective_date := r_LGE.information2;
20544: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20545: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20546: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20547: end if;
20548:
20549: if l_first_rec and not l_update then
20542:
20543: l_effective_date := r_LGE.information2;
20544: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20545: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20546: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
20547: end if;
20548:
20549: if l_first_rec and not l_update then
20550: -- Call Create routine.
20605: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
20606: -- Update all relevent cer records with new pk_id
20607: hr_utility.set_location('Before plsql table ',222);
20608: hr_utility.set_location('new_value id '||l_ler_chg_pgm_enrt_id,222);
20609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PGM_ENRT_ID ;
20612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20606: -- Update all relevent cer records with new pk_id
20607: hr_utility.set_location('Before plsql table ',222);
20608: hr_utility.set_location('new_value id '||l_ler_chg_pgm_enrt_id,222);
20609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PGM_ENRT_ID ;
20612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20614: hr_utility.set_location('After plsql table ',222);
20607: hr_utility.set_location('Before plsql table ',222);
20608: hr_utility.set_location('new_value id '||l_ler_chg_pgm_enrt_id,222);
20609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PGM_ENRT_ID ;
20612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20614: hr_utility.set_location('After plsql table ',222);
20615: --
20608: hr_utility.set_location('new_value id '||l_ler_chg_pgm_enrt_id,222);
20609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PGM_ENRT_ID ;
20612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20614: hr_utility.set_location('After plsql table ',222);
20615: --
20616: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_PGM_ENRT_ID' ;
20610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LGE.information1 ;
20611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_PGM_ENRT_ID ;
20612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20614: hr_utility.set_location('After plsql table ',222);
20615: --
20616: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20617: --
20612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
20613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LGE_unique.table_route_id;
20614: hr_utility.set_location('After plsql table ',222);
20615: --
20616: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20617: --
20618: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20619: --
20620: else
20614: hr_utility.set_location('After plsql table ',222);
20615: --
20616: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
20617: --
20618: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20619: --
20620: else
20621: --
20622: -- Call Update routine for the pk_id created in prev run .
20734: end loop;
20735: --
20736: exception when others then
20737: --
20738: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LGE',r_lge.information5 );
20739: --
20740: end create_LGE_rows;
20741:
20742: --
20886: end if ;
20887: -- End Prefix Sufix derivation
20888: for r_LDC_unique in c_unique_LDC('LDC') loop
20889:
20890: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20891: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20892: r_LDC_unique.information3 >=
20893: ben_pd_copy_to_ben_one.g_copy_effective_date)
20894: ) then
20887: -- End Prefix Sufix derivation
20888: for r_LDC_unique in c_unique_LDC('LDC') loop
20889:
20890: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20891: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20892: r_LDC_unique.information3 >=
20893: ben_pd_copy_to_ben_one.g_copy_effective_date)
20894: ) then
20895: --
20889:
20890: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
20891: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20892: r_LDC_unique.information3 >=
20893: ben_pd_copy_to_ben_one.g_copy_effective_date)
20894: ) then
20895: --
20896: hr_utility.set_location(' r_LDC_unique.table_route_id '||r_LDC_unique.table_route_id,10);
20897: hr_utility.set_location(' r_LDC_unique.information1 '||r_LDC_unique.information1,10);
20929: l_object_found_in_target := TRUE;
20930: --
20931: if l_process_date between r_LDC_unique.information2 and r_LDC_unique.information3 then
20932: l_update := true;
20933: if r_LDC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
20934: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID'
20935: then
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20930: --
20931: if l_process_date between r_LDC_unique.information2 and r_LDC_unique.information3 then
20932: l_update := true;
20933: if r_LDC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
20934: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID'
20935: then
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20932: l_update := true;
20933: if r_LDC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
20934: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID'
20935: then
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
20933: if r_LDC_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
20934: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID'
20935: then
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
20941: --
20934: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID'
20935: then
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
20941: --
20942: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20935: then
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
20941: --
20942: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20943: --
20936: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20937: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
20938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_LDC_unique.information1 ;
20939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
20941: --
20942: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20943: --
20944: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
20941: --
20942: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
20943: --
20944: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
20945: --
20946: --DOUBT log_data('LDC',l_new_value,l_prefix || r_LDC_unique.name|| l_suffix,'REUSED');
20947: --
20948: end if ;
20961: open c_LDC_min_max_dates(r_LDC_unique.table_route_id, r_LDC_unique.information1 ) ;
20962: fetch c_LDC_min_max_dates into l_min_esd,l_max_eed ;
20963: --
20964:
20965: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20966: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20967: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20968: end if;
20969: l_min_esd := greatest(l_min_esd,r_LDC_unique.information2);
20962: fetch c_LDC_min_max_dates into l_min_esd,l_max_eed ;
20963: --
20964:
20965: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20966: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20967: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20968: end if;
20969: l_min_esd := greatest(l_min_esd,r_LDC_unique.information2);
20970: /* open c_LDC(r_LDC_unique.table_route_id,
20963: --
20964:
20965: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
20966: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
20967: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
20968: end if;
20969: l_min_esd := greatest(l_min_esd,r_LDC_unique.information2);
20970: /* open c_LDC(r_LDC_unique.table_route_id,
20971: r_LDC_unique.information1,
20992: p_from_date => l_min_esd,
20993: p_to_date => l_max_eed );
20994: if l_dt_rec_found THEN
20995: --END TEMPIK
20996: if r_LDC_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
20997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID' then
20998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
21000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
20993: p_to_date => l_max_eed );
20994: if l_dt_rec_found THEN
20995: --END TEMPIK
20996: if r_LDC_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
20997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID' then
20998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
21000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
20994: if l_dt_rec_found THEN
20995: --END TEMPIK
20996: if r_LDC_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
20997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID' then
20998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
21000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
20995: --END TEMPIK
20996: if r_LDC_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
20997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID' then
20998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
21000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21003: --
20996: if r_LDC_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
20997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID' then
20998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
21000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21003: --
21004: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
20997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'LER_CHG_DPNT_CVG_ID' then
20998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
21000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21003: --
21004: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21005: --
20998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
20999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC_unique.information1 ;
21000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21003: --
21004: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21005: --
21006: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21003: --
21004: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21005: --
21006: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21007: end if ;
21008: --
21002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21003: --
21004: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21005: --
21006: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21007: end if ;
21008: --
21009: l_object_found_in_target := true ;
21010: --TEMPIK
21037: end if ;
21038: --
21039:
21040: l_effective_date := r_LDC.information2;
21041: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21042: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21043: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21044: end if;
21045:
21038: --
21039:
21040: l_effective_date := r_LDC.information2;
21041: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21042: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21043: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21044: end if;
21045:
21046: if l_first_rec and not l_update then
21039:
21040: l_effective_date := r_LDC.information2;
21041: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21042: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21043: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21044: end if;
21045:
21046: if l_first_rec and not l_update then
21047: -- Call Create routine.
21105: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
21106: -- Update all relevent cer records with new pk_id
21107: hr_utility.set_location('Before plsql table ',222);
21108: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_id,222);
21109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
21110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_ID ;
21112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21113: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21106: -- Update all relevent cer records with new pk_id
21107: hr_utility.set_location('Before plsql table ',222);
21108: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_id,222);
21109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
21110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_ID ;
21112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21113: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21114: hr_utility.set_location('After plsql table ',222);
21107: hr_utility.set_location('Before plsql table ',222);
21108: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_id,222);
21109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
21110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_ID ;
21112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21113: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21114: hr_utility.set_location('After plsql table ',222);
21115: --
21108: hr_utility.set_location('new_value id '||l_ler_chg_dpnt_cvg_id,222);
21109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
21110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_ID ;
21112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21113: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21114: hr_utility.set_location('After plsql table ',222);
21115: --
21116: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21109: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'LER_CHG_DPNT_CVG_ID' ;
21110: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_LDC.information1 ;
21111: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_LER_CHG_DPNT_CVG_ID ;
21112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21113: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21114: hr_utility.set_location('After plsql table ',222);
21115: --
21116: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21117: --
21112: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21113: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_LDC_unique.table_route_id;
21114: hr_utility.set_location('After plsql table ',222);
21115: --
21116: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21117: --
21118: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21119: --
21120: else
21114: hr_utility.set_location('After plsql table ',222);
21115: --
21116: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21117: --
21118: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21119: --
21120: else
21121: --
21122: -- Call Update routine for the pk_id created in prev run .
21237: end loop;
21238: --
21239: exception when others then
21240: --
21241: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'LDC',r_ldc.information5 );
21242: --
21243: end create_LDC_rows;
21244:
21245: ---------------------------------------------------------------
21377: end if ;
21378: -- End Prefix Sufix derivation
21379: for r_PAT_unique in c_unique_PAT('PAT') loop
21380:
21381: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21382: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21383: r_PAT_unique.information3 >=
21384: ben_pd_copy_to_ben_one.g_copy_effective_date)
21385: ) then
21378: -- End Prefix Sufix derivation
21379: for r_PAT_unique in c_unique_PAT('PAT') loop
21380:
21381: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21382: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21383: r_PAT_unique.information3 >=
21384: ben_pd_copy_to_ben_one.g_copy_effective_date)
21385: ) then
21386:
21380:
21381: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21382: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21383: r_PAT_unique.information3 >=
21384: ben_pd_copy_to_ben_one.g_copy_effective_date)
21385: ) then
21386:
21387: --
21388: hr_utility.set_location(' r_PAT_unique.table_route_id '||r_PAT_unique.table_route_id,10);
21419: l_object_found_in_target := TRUE;
21420: --
21421: if l_process_date between r_PAT_unique.information2 and r_PAT_unique.information3 then
21422: l_update := true;
21423: if r_PAT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
21424: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID'
21425: then
21426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21420: --
21421: if l_process_date between r_PAT_unique.information2 and r_PAT_unique.information3 then
21422: l_update := true;
21423: if r_PAT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
21424: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID'
21425: then
21426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21422: l_update := true;
21423: if r_PAT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
21424: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID'
21425: then
21426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21429: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21430: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21423: if r_PAT_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
21424: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID'
21425: then
21426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21429: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21430: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21431: --
21424: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID'
21425: then
21426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21429: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21430: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21431: --
21432: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21425: then
21426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21429: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21430: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21431: --
21432: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21433: --
21426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PAT_unique.information1 ;
21429: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21430: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21431: --
21432: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21433: --
21434: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21430: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21431: --
21432: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21433: --
21434: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21435: --
21436: --DOUBT log_data('PAT',l_new_value,l_prefix || r_PAT_unique.name|| l_suffix,'REUSED');
21437: --
21438: end if ;
21451: open c_PAT_min_max_dates(r_PAT_unique.table_route_id, r_PAT_unique.information1 ) ;
21452: fetch c_PAT_min_max_dates into l_min_esd,l_max_eed ;
21453: --
21454:
21455: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21456: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21457: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21458: end if;
21459: l_min_esd := greatest(l_min_esd,r_PAT_unique.information2);
21452: fetch c_PAT_min_max_dates into l_min_esd,l_max_eed ;
21453: --
21454:
21455: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21456: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21457: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21458: end if;
21459: l_min_esd := greatest(l_min_esd,r_PAT_unique.information2);
21460: /* open c_PAT(r_PAT_unique.table_route_id,
21453: --
21454:
21455: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21456: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21457: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21458: end if;
21459: l_min_esd := greatest(l_min_esd,r_PAT_unique.information2);
21460: /* open c_PAT(r_PAT_unique.table_route_id,
21461: r_PAT_unique.information1,
21487: p_from_date => l_min_esd,
21488: p_to_date => l_max_eed );
21489: if l_dt_rec_found THEN
21490: --END TEMPIK
21491: if r_PAT_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
21492: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID' then
21493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21488: p_to_date => l_max_eed );
21489: if l_dt_rec_found THEN
21490: --END TEMPIK
21491: if r_PAT_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
21492: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID' then
21493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21489: if l_dt_rec_found THEN
21490: --END TEMPIK
21491: if r_PAT_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
21492: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID' then
21493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21490: --END TEMPIK
21491: if r_PAT_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
21492: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID' then
21493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21498: --
21491: if r_PAT_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
21492: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID' then
21493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21498: --
21499: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21492: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'POPL_ACTN_TYP_ID' then
21493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21498: --
21499: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21500: --
21493: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21494: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT_unique.information1 ;
21495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21498: --
21499: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21500: --
21501: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21495: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21496: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21498: --
21499: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21500: --
21501: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21502: end if ;
21503: --
21497: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21498: --
21499: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
21500: --
21501: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21502: end if ;
21503: --
21504: l_object_found_in_target := true ;
21505: --TEMPIK
21532: end if ;
21533: --
21534:
21535: l_effective_date := r_PAT.information2;
21536: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21537: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21538: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21539: end if;
21540:
21533: --
21534:
21535: l_effective_date := r_PAT.information2;
21536: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21537: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21538: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21539: end if;
21540:
21541: if l_first_rec and not l_update then
21534:
21535: l_effective_date := r_PAT.information2;
21536: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21537: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21538: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
21539: end if;
21540:
21541: if l_first_rec and not l_update then
21542: -- Call Create routine.
21592: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
21593: -- Update all relevent cer records with new pk_id
21594: hr_utility.set_location('Before plsql table ',222);
21595: hr_utility.set_location('new_value id '||l_popl_actn_typ_id,222);
21596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21593: -- Update all relevent cer records with new pk_id
21594: hr_utility.set_location('Before plsql table ',222);
21595: hr_utility.set_location('new_value id '||l_popl_actn_typ_id,222);
21596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21601: hr_utility.set_location('After plsql table ',222);
21594: hr_utility.set_location('Before plsql table ',222);
21595: hr_utility.set_location('new_value id '||l_popl_actn_typ_id,222);
21596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21601: hr_utility.set_location('After plsql table ',222);
21602: --
21595: hr_utility.set_location('new_value id '||l_popl_actn_typ_id,222);
21596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21601: hr_utility.set_location('After plsql table ',222);
21602: --
21603: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21596: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'POPL_ACTN_TYP_ID' ;
21597: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PAT.information1 ;
21598: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_POPL_ACTN_TYP_ID ;
21599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21601: hr_utility.set_location('After plsql table ',222);
21602: --
21603: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21604: --
21599: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
21600: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PAT_unique.table_route_id;
21601: hr_utility.set_location('After plsql table ',222);
21602: --
21603: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21604: --
21605: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21606: --
21607: else
21601: hr_utility.set_location('After plsql table ',222);
21602: --
21603: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
21604: --
21605: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21606: --
21607: else
21608: --
21609: -- Call Update routine for the pk_id created in prev run .
21718: end loop;
21719: --
21720: exception when others then
21721: --
21722: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PAT',r_pat.information5 );
21723: --
21724: end create_PAT_rows;
21725: --
21726: ---------------------------------------------------------------
21880: end if ;
21881: -- End Prefix Sufix derivation
21882: for r_PEO_unique in c_unique_PEO('PEO') loop
21883:
21884: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21885: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21886: r_PEO_unique.information3 >=
21887: ben_pd_copy_to_ben_one.g_copy_effective_date)
21888: ) then
21881: -- End Prefix Sufix derivation
21882: for r_PEO_unique in c_unique_PEO('PEO') loop
21883:
21884: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21885: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21886: r_PEO_unique.information3 >=
21887: ben_pd_copy_to_ben_one.g_copy_effective_date)
21888: ) then
21889:
21883:
21884: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
21885: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21886: r_PEO_unique.information3 >=
21887: ben_pd_copy_to_ben_one.g_copy_effective_date)
21888: ) then
21889:
21890: --
21891: hr_utility.set_location(' r_PEO_unique.table_route_id '||r_PEO_unique.table_route_id,10);
21931: l_object_found_in_target := TRUE;
21932: --
21933: if l_process_date between r_PEO_unique.information2 and r_PEO_unique.information3 then
21934: l_update := true;
21935: if r_PEO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
21936: 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_TO_PRTE_RSN_ID'
21937: then
21938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
21939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21932: --
21933: if l_process_date between r_PEO_unique.information2 and r_PEO_unique.information3 then
21934: l_update := true;
21935: if r_PEO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
21936: 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_TO_PRTE_RSN_ID'
21937: then
21938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
21939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21934: l_update := true;
21935: if r_PEO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
21936: 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_TO_PRTE_RSN_ID'
21937: then
21938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
21939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21941: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
21935: if r_PEO_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
21936: 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_TO_PRTE_RSN_ID'
21937: then
21938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
21939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21941: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
21943: --
21936: 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_TO_PRTE_RSN_ID'
21937: then
21938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
21939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21941: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
21943: --
21944: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21937: then
21938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
21939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21941: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
21943: --
21944: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21945: --
21938: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
21939: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
21940: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PEO_unique.information1 ;
21941: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
21942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
21943: --
21944: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21945: --
21946: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21942: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
21943: --
21944: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
21945: --
21946: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
21947: --
21948: --DOUBT log_data('PEO',l_new_value,l_prefix || r_PEO_unique.name|| l_suffix,'REUSED');
21949: --
21950: end if ;
21963: open c_PEO_min_max_dates(r_PEO_unique.table_route_id, r_PEO_unique.information1 ) ;
21964: fetch c_PEO_min_max_dates into l_min_esd,l_max_eed ;
21965: --
21966:
21967: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21968: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21969: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21970: end if;
21971: l_min_esd := greatest(l_min_esd,r_PEO_unique.information2);
21964: fetch c_PEO_min_max_dates into l_min_esd,l_max_eed ;
21965: --
21966:
21967: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21968: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21969: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21970: end if;
21971: l_min_esd := greatest(l_min_esd,r_PEO_unique.information2);
21972: /* open c_PEO(r_PEO_unique.table_route_id,
21965: --
21966:
21967: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
21968: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
21969: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
21970: end if;
21971: l_min_esd := greatest(l_min_esd,r_PEO_unique.information2);
21972: /* open c_PEO(r_PEO_unique.table_route_id,
21973: r_PEO_unique.information1,
21977: fetch c_PEO into r_PEO ;
21978: --
21979: close c_PEO ; */
21980: --
21981: hr_utility.set_location('g_count '||BEN_PD_COPY_TO_BEN_ONE.g_count,123);
21982: hr_utility.set_location('r_PEO.information14 '||r_PEO.information14 ,123);
21983: --
21984:
21985: if p_reuse_object_flag = 'Y' then
21998: p_from_date => l_min_esd,
21999: p_to_date => l_max_eed );
22000: if l_dt_rec_found THEN
22001: --END TEMPIK
22002: if r_PEO_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
22003: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TO_PRTE_RSN_ID' then
22004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
22006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
21999: p_to_date => l_max_eed );
22000: if l_dt_rec_found THEN
22001: --END TEMPIK
22002: if r_PEO_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
22003: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TO_PRTE_RSN_ID' then
22004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
22006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22000: if l_dt_rec_found THEN
22001: --END TEMPIK
22002: if r_PEO_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
22003: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TO_PRTE_RSN_ID' then
22004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
22006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22001: --END TEMPIK
22002: if r_PEO_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
22003: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TO_PRTE_RSN_ID' then
22004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
22006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22009: --
22002: if r_PEO_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
22003: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TO_PRTE_RSN_ID' then
22004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
22006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22009: --
22010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22003: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ELIG_TO_PRTE_RSN_ID' then
22004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
22006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22009: --
22010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22011: --
22004: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22005: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO_unique.information1 ;
22006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22009: --
22010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22011: --
22012: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22006: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22007: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22009: --
22010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22011: --
22012: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22013: end if ;
22014: --
22008: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22009: --
22010: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22011: --
22012: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22013: end if ;
22014: --
22015: l_object_found_in_target := true ;
22016: --TEMPIK
22043: end if ;
22044: --
22045:
22046: l_effective_date := r_PEO.information2;
22047: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22048: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22049: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22050: end if;
22051:
22044: --
22045:
22046: l_effective_date := r_PEO.information2;
22047: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22048: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22049: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22050: end if;
22051:
22052: if l_first_rec and not l_update then
22045:
22046: l_effective_date := r_PEO.information2;
22047: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
22048: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
22049: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
22050: end if;
22051:
22052: if l_first_rec and not l_update then
22053: -- Call Create routine.
22124: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
22125: -- Update all relevent cer records with new pk_id
22126: hr_utility.set_location('Before plsql table ',222);
22127: hr_utility.set_location('new_value id '||l_elig_to_prte_rsn_id,222);
22128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TO_PRTE_RSN_ID ;
22131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22125: -- Update all relevent cer records with new pk_id
22126: hr_utility.set_location('Before plsql table ',222);
22127: hr_utility.set_location('new_value id '||l_elig_to_prte_rsn_id,222);
22128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TO_PRTE_RSN_ID ;
22131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22133: hr_utility.set_location('After plsql table ',222);
22126: hr_utility.set_location('Before plsql table ',222);
22127: hr_utility.set_location('new_value id '||l_elig_to_prte_rsn_id,222);
22128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TO_PRTE_RSN_ID ;
22131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22133: hr_utility.set_location('After plsql table ',222);
22134: --
22127: hr_utility.set_location('new_value id '||l_elig_to_prte_rsn_id,222);
22128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TO_PRTE_RSN_ID ;
22131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22133: hr_utility.set_location('After plsql table ',222);
22134: --
22135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22128: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ELIG_TO_PRTE_RSN_ID' ;
22129: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PEO.information1 ;
22130: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_ELIG_TO_PRTE_RSN_ID ;
22131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22133: hr_utility.set_location('After plsql table ',222);
22134: --
22135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22136: --
22131: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22132: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PEO_unique.table_route_id;
22133: hr_utility.set_location('After plsql table ',222);
22134: --
22135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22136: --
22137: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22138: --
22139: else
22133: hr_utility.set_location('After plsql table ',222);
22134: --
22135: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22136: --
22137: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22138: --
22139: else
22140: --
22141: -- Call Update routine for the pk_id created in prev run .
22269: end loop;
22270: --
22271: exception when others then
22272: --
22273: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PEO',r_peo.information5 );
22274: --
22275: end create_PEO_rows;
22276:
22277: --
22418: --
22419: if l_dml_operation = 'UPDATE' then
22420: --
22421: l_update := true;
22422: if r_CWG_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
22423: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22419: if l_dml_operation = 'UPDATE' then
22420: --
22421: l_update := true;
22422: if r_CWG_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
22423: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22420: --
22421: l_update := true;
22422: if r_CWG_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
22423: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22421: l_update := true;
22422: if r_CWG_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
22423: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22429: --
22422: if r_CWG_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
22423: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22429: --
22430: -- update_cer_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
22423: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22429: --
22430: -- update_cer_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
22431: --
22424: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22425: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22429: --
22430: -- update_cer_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
22431: --
22432: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22426: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_CWG_unique.information1 ;
22427: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22429: --
22430: -- update_cer_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
22431: --
22432: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22433: --
22434: --DOUBT log_data('CWG',l_new_value,l_prefix || r_CWG_unique.name|| l_suffix,'REUSED');
22428: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22429: --
22430: -- update_cer_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
22431: --
22432: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22433: --
22434: --DOUBT log_data('CWG',l_new_value,l_prefix || r_CWG_unique.name|| l_suffix,'REUSED');
22435: --
22436: end if ;
22447: p_target_business_group_id, nvl(l_cwb_wksht_grp_id, -999) ) ;
22448: fetch c_find_CWG_in_target into l_new_value ;
22449: if c_find_CWG_in_target%found then
22450: --
22451: if r_CWG_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
22452: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22454: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22455: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22448: fetch c_find_CWG_in_target into l_new_value ;
22449: if c_find_CWG_in_target%found then
22450: --
22451: if r_CWG_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
22452: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22454: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22455: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22449: if c_find_CWG_in_target%found then
22450: --
22451: if r_CWG_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
22452: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22454: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22455: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22450: --
22451: if r_CWG_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
22452: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22454: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22455: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22458: --
22451: if r_CWG_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
22452: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22454: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22455: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22458: --
22459: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22452: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'CWB_WKSHT_GRP_ID' then
22453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22454: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22455: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22458: --
22459: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22460: --
22453: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22454: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG_unique.information1 ;
22455: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22458: --
22459: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22460: --
22461: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22455: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
22456: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22458: --
22459: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22460: --
22461: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22462: --
22463:
22457: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22458: --
22459: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
22460: --
22461: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22462: --
22463:
22464: end if ;
22465: --
22500: hr_utility.set_location(' BEN_CWB_WKSHT_GRP CREATE_CWB_WKSHT_GRP ',20);
22501: BEN_CWB_WKSHT_GRP_API.CREATE_CWB_WKSHT_GRP(
22502: --
22503: P_VALIDATE => false
22504: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
22505: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
22506: ,P_CWB_WKSHT_GRP_ID => l_cwb_wksht_grp_id
22507: ,P_CWG_ATTRIBUTE1 => r_CWG.INFORMATION111
22508: ,P_CWG_ATTRIBUTE10 => r_CWG.INFORMATION120
22548: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
22549: -- Update all relevent cer records with new pk_id
22550: hr_utility.set_location('Before plsql table ',222);
22551: hr_utility.set_location('new_value id '||l_cwb_wksht_grp_id,222);
22552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22556: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22549: -- Update all relevent cer records with new pk_id
22550: hr_utility.set_location('Before plsql table ',222);
22551: hr_utility.set_location('new_value id '||l_cwb_wksht_grp_id,222);
22552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22556: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22557: hr_utility.set_location('After plsql table ',222);
22550: hr_utility.set_location('Before plsql table ',222);
22551: hr_utility.set_location('new_value id '||l_cwb_wksht_grp_id,222);
22552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22556: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22557: hr_utility.set_location('After plsql table ',222);
22558: --
22551: hr_utility.set_location('new_value id '||l_cwb_wksht_grp_id,222);
22552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22556: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22557: hr_utility.set_location('After plsql table ',222);
22558: --
22559: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22552: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'CWB_WKSHT_GRP_ID' ;
22553: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_CWG.information1 ;
22554: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_CWB_WKSHT_GRP_ID ;
22555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22556: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22557: hr_utility.set_location('After plsql table ',222);
22558: --
22559: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22560: --
22555: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22556: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CWG_unique.table_route_id;
22557: hr_utility.set_location('After plsql table ',222);
22558: --
22559: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22560: --
22561: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22562: --
22563: elsif l_update then
22557: hr_utility.set_location('After plsql table ',222);
22558: --
22559: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
22560: --
22561: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22562: --
22563: elsif l_update then
22564: BEN_CWB_WKSHT_GRP_API.UPDATE_CWB_WKSHT_GRP(
22565: --
22563: elsif l_update then
22564: BEN_CWB_WKSHT_GRP_API.UPDATE_CWB_WKSHT_GRP(
22565: --
22566: P_VALIDATE => false
22567: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
22568: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
22569: ,P_CWB_WKSHT_GRP_ID => l_cwb_wksht_grp_id
22570: ,P_CWG_ATTRIBUTE1 => r_CWG.INFORMATION111
22571: ,P_CWG_ATTRIBUTE10 => r_CWG.INFORMATION120
22617: end loop;
22618: --
22619: exception when others then
22620: --
22621: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CWG',r_cwg.information5 );
22622: --
22623: end create_CWG_rows;
22624:
22625: ---------------------------------------------------------------
22750: hr_utility.set_location( 'with the same cwb_wksht_grp_id as custom_key already exists and hence reused. ',202);
22751:
22752: --8985766
22753: hr_utility.set_location('Before plsql table ',111);
22754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CRI_unique.table_route_id;
22756: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22757: hr_utility.set_location('After plsql table ',111);
22758: --8985766
22751:
22752: --8985766
22753: hr_utility.set_location('Before plsql table ',111);
22754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CRI_unique.table_route_id;
22756: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22757: hr_utility.set_location('After plsql table ',111);
22758: --8985766
22759:
22752: --8985766
22753: hr_utility.set_location('Before plsql table ',111);
22754: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22755: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CRI_unique.table_route_id;
22756: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22757: hr_utility.set_location('After plsql table ',111);
22758: --8985766
22759:
22760: -- As the record in found in the target , reuse the record
22799: r_CRI.information16,
22800: r_CRI.information17);
22801: --8985766
22802: hr_utility.set_location('Before plsql table ',222);
22803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CRI_unique.table_route_id;
22805: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22806: hr_utility.set_location('After plsql table ',222);
22807: --8985766
22800: r_CRI.information17);
22801: --8985766
22802: hr_utility.set_location('Before plsql table ',222);
22803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CRI_unique.table_route_id;
22805: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22806: hr_utility.set_location('After plsql table ',222);
22807: --8985766
22808:
22801: --8985766
22802: hr_utility.set_location('Before plsql table ',222);
22803: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
22804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_CRI_unique.table_route_id;
22805: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
22806: hr_utility.set_location('After plsql table ',222);
22807: --8985766
22808:
22809: end if;
22815:
22816: --
22817: exception when others then
22818: --
22819: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'CRI' , l_debug_item_name) ;
22820: --
22821:
22822: end create_CRI_rows;
22823:
22992: --
22993: if l_dml_operation = 'UPDATE' then
22994: --
22995: l_update := true;
22996: if r_PCP_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
22997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
22998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
22993: if l_dml_operation = 'UPDATE' then
22994: --
22995: l_update := true;
22996: if r_PCP_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
22997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
22998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
23001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
22994: --
22995: l_update := true;
22996: if r_PCP_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
22997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
22998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
23001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
22995: l_update := true;
22996: if r_PCP_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
22997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
22998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
23001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23003: --
22996: if r_PCP_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
22997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
22998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
23001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23003: --
23004: -- update_cer_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
22997: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
22998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
23001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23003: --
23004: -- update_cer_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
23005: --
22998: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
22999: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
23001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23003: --
23004: -- update_cer_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
23005: --
23006: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23000: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PCP_unique.information1 ;
23001: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23003: --
23004: -- update_cer_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
23005: --
23006: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23007: --
23008: --DOUBT log_data('PCP',l_new_value,l_prefix || r_PCP_unique.name|| l_suffix,'REUSED');
23002: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23003: --
23004: -- update_cer_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
23005: --
23006: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23007: --
23008: --DOUBT log_data('PCP',l_new_value,l_prefix || r_PCP_unique.name|| l_suffix,'REUSED');
23009: --
23010: end if ;
23021: p_target_business_group_id, nvl(l_pl_pcp_id, -999) ) ;
23022: fetch c_find_PCP_in_target into l_new_value ;
23023: if c_find_PCP_in_target%found then
23024: --
23025: if r_PCP_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
23026: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
23027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23022: fetch c_find_PCP_in_target into l_new_value ;
23023: if c_find_PCP_in_target%found then
23024: --
23025: if r_PCP_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
23026: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
23027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23023: if c_find_PCP_in_target%found then
23024: --
23025: if r_PCP_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
23026: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
23027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23024: --
23025: if r_PCP_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
23026: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
23027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23032: --
23025: if r_PCP_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
23026: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
23027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23032: --
23033: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23026: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_ID' then
23027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23032: --
23033: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23034: --
23027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP_unique.information1 ;
23029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23032: --
23033: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23034: --
23035: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23030: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23032: --
23033: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23034: --
23035: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23036: end if ;
23037: --
23031: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23032: --
23033: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23034: --
23035: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23036: end if ;
23037: --
23038: l_object_found_in_target := true ;
23039: end if;
23061: end if ;
23062: --
23063:
23064: l_parent_effective_start_date := r_PCP.information10;
23065: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
23066: if l_parent_effective_start_date is null then
23067: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23068: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
23069: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23063:
23064: l_parent_effective_start_date := r_PCP.information10;
23065: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
23066: if l_parent_effective_start_date is null then
23067: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23068: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
23069: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23070: end if;
23071: end if;
23064: l_parent_effective_start_date := r_PCP.information10;
23065: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
23066: if l_parent_effective_start_date is null then
23067: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23068: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
23069: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23070: end if;
23071: end if;
23072: --
23065: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
23066: if l_parent_effective_start_date is null then
23067: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23068: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
23069: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23070: end if;
23071: end if;
23072: --
23073: -- To avoid creating a child with out parent
23134: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
23135: -- Update all relevent cer records with new pk_id
23136: hr_utility.set_location('Before plsql table ',222);
23137: hr_utility.set_location('new_value id '||l_pl_pcp_id,222);
23138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23135: -- Update all relevent cer records with new pk_id
23136: hr_utility.set_location('Before plsql table ',222);
23137: hr_utility.set_location('new_value id '||l_pl_pcp_id,222);
23138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23143: hr_utility.set_location('After plsql table ',222);
23136: hr_utility.set_location('Before plsql table ',222);
23137: hr_utility.set_location('new_value id '||l_pl_pcp_id,222);
23138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23143: hr_utility.set_location('After plsql table ',222);
23144: --
23137: hr_utility.set_location('new_value id '||l_pl_pcp_id,222);
23138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23143: hr_utility.set_location('After plsql table ',222);
23144: --
23145: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23138: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_ID' ;
23139: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PCP.information1 ;
23140: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_ID ;
23141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23143: hr_utility.set_location('After plsql table ',222);
23144: --
23145: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23146: --
23141: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23142: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PCP_unique.table_route_id;
23143: hr_utility.set_location('After plsql table ',222);
23144: --
23145: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23146: --
23147: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23148: --
23149: elsif l_update then
23143: hr_utility.set_location('After plsql table ',222);
23144: --
23145: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23146: --
23147: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23148: --
23149: elsif l_update then
23150: BEN_PL_PRMRY_CARE_PRVDR_API.UPDATE_PL_PRMRY_CARE_PRVDR(
23151: --
23210: end loop;
23211: --
23212: exception when others then
23213: --
23214: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PCP',r_pcp.information5 );
23215: --
23216: end create_PCP_rows;
23217:
23218: --
23361: end if ;
23362: -- End Prefix Sufix derivation
23363: for r_COP_unique in c_unique_COP('COP') loop
23364:
23365: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23366: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23367: r_COP_unique.information3 >=
23368: ben_pd_copy_to_ben_one.g_copy_effective_date)
23369: ) then
23362: -- End Prefix Sufix derivation
23363: for r_COP_unique in c_unique_COP('COP') loop
23364:
23365: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23366: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23367: r_COP_unique.information3 >=
23368: ben_pd_copy_to_ben_one.g_copy_effective_date)
23369: ) then
23370: --
23364:
23365: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23366: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23367: r_COP_unique.information3 >=
23368: ben_pd_copy_to_ben_one.g_copy_effective_date)
23369: ) then
23370: --
23371: hr_utility.set_location(' r_COP_unique.table_route_id '||r_COP_unique.table_route_id,10);
23372: hr_utility.set_location(' r_COP_unique.information1 '||r_COP_unique.information1,10);
23407: l_object_found_in_target := TRUE;
23408: --
23409: if l_process_date between r_COP_unique.information2 and r_COP_unique.information3 then
23410: l_update := true;
23411: if r_COP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
23412: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID'
23413: then
23414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23408: --
23409: if l_process_date between r_COP_unique.information2 and r_COP_unique.information3 then
23410: l_update := true;
23411: if r_COP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
23412: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID'
23413: then
23414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23410: l_update := true;
23411: if r_COP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
23412: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID'
23413: then
23414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23411: if r_COP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
23412: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID'
23413: then
23414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23419: --
23412: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID'
23413: then
23414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23419: --
23420: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23413: then
23414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23419: --
23420: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23421: --
23414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_COP_unique.information1 ;
23417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23419: --
23420: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23421: --
23422: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23419: --
23420: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23421: --
23422: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23423: --
23424: --DOUBT log_data('COP',l_new_value,l_prefix || r_COP_unique.name|| l_suffix,'REUSED');
23425: --
23426: end if ;
23439: open c_COP_min_max_dates(r_COP_unique.table_route_id, r_COP_unique.information1 ) ;
23440: fetch c_COP_min_max_dates into l_min_esd,l_max_eed ;
23441: --
23442:
23443: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23444: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23445: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23446: end if;
23447: l_min_esd := greatest(l_min_esd,r_COP_unique.information2);
23440: fetch c_COP_min_max_dates into l_min_esd,l_max_eed ;
23441: --
23442:
23443: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23444: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23445: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23446: end if;
23447: l_min_esd := greatest(l_min_esd,r_COP_unique.information2);
23448: /* open c_COP(r_COP_unique.table_route_id,
23441: --
23442:
23443: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23444: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23445: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23446: end if;
23447: l_min_esd := greatest(l_min_esd,r_COP_unique.information2);
23448: /* open c_COP(r_COP_unique.table_route_id,
23449: r_COP_unique.information1,
23472: p_from_date => l_min_esd,
23473: p_to_date => l_max_eed );
23474: if l_dt_rec_found THEN
23475: --END TEMPIK
23476: if r_COP_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
23477: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID' then
23478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23473: p_to_date => l_max_eed );
23474: if l_dt_rec_found THEN
23475: --END TEMPIK
23476: if r_COP_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
23477: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID' then
23478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23474: if l_dt_rec_found THEN
23475: --END TEMPIK
23476: if r_COP_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
23477: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID' then
23478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23475: --END TEMPIK
23476: if r_COP_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
23477: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID' then
23478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23483: --
23476: if r_COP_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
23477: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID' then
23478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23483: --
23484: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23477: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPL_ID' then
23478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23483: --
23484: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23485: --
23478: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23479: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP_unique.information1 ;
23480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23483: --
23484: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23485: --
23486: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23480: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
23481: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23483: --
23484: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23485: --
23486: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23487: end if ;
23488: --
23482: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23483: --
23484: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
23485: --
23486: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23487: end if ;
23488: --
23489: l_object_found_in_target := true ;
23490: --TEMPIK
23517: end if ;
23518: --
23519:
23520: l_effective_date := r_COP.information2;
23521: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23522: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23523: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23524: end if;
23525:
23518: --
23519:
23520: l_effective_date := r_COP.information2;
23521: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23522: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23523: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23524: end if;
23525:
23526: if l_first_rec and not l_update then
23519:
23520: l_effective_date := r_COP.information2;
23521: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23522: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23523: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
23524: end if;
23525:
23526: if l_first_rec and not l_update then
23527: -- Call Create routine.
23608: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
23609: -- Update all relevent cer records with new pk_id
23610: hr_utility.set_location('Before plsql table ',222);
23611: hr_utility.set_location('new_value id '||l_oipl_id,222);
23612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23609: -- Update all relevent cer records with new pk_id
23610: hr_utility.set_location('Before plsql table ',222);
23611: hr_utility.set_location('new_value id '||l_oipl_id,222);
23612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23617: hr_utility.set_location('After plsql table ',222);
23610: hr_utility.set_location('Before plsql table ',222);
23611: hr_utility.set_location('new_value id '||l_oipl_id,222);
23612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23617: hr_utility.set_location('After plsql table ',222);
23618: --
23611: hr_utility.set_location('new_value id '||l_oipl_id,222);
23612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23617: hr_utility.set_location('After plsql table ',222);
23618: --
23619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23612: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPL_ID' ;
23613: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_COP.information1 ;
23614: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPL_ID ;
23615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23617: hr_utility.set_location('After plsql table ',222);
23618: --
23619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23620: --
23615: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
23616: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_COP_unique.table_route_id;
23617: hr_utility.set_location('After plsql table ',222);
23618: --
23619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23620: --
23621: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23622: --
23623: else
23617: hr_utility.set_location('After plsql table ',222);
23618: --
23619: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
23620: --
23621: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23622: --
23623: else
23624: --
23625: -- Call Update routine for the pk_id created in prev run .
23763: end loop;
23764: --
23765: exception when others then
23766: --
23767: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'COP',r_cop.information5 );
23768: --
23769: end create_COP_rows;
23770:
23771: --
23915: end if ;
23916: -- End Prefix Sufix derivation
23917: for r_DDR_unique in c_unique_DDR('DDR') loop
23918:
23919: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23920: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23921: r_DDR_unique.information3 >=
23922: ben_pd_copy_to_ben_one.g_copy_effective_date)
23923: ) then
23916: -- End Prefix Sufix derivation
23917: for r_DDR_unique in c_unique_DDR('DDR') loop
23918:
23919: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23920: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23921: r_DDR_unique.information3 >=
23922: ben_pd_copy_to_ben_one.g_copy_effective_date)
23923: ) then
23924: --
23918:
23919: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
23920: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23921: r_DDR_unique.information3 >=
23922: ben_pd_copy_to_ben_one.g_copy_effective_date)
23923: ) then
23924: --
23925: hr_utility.set_location(' r_DDR_unique.table_route_id '||r_DDR_unique.table_route_id,10);
23926: hr_utility.set_location(' r_DDR_unique.information1 '||r_DDR_unique.information1,10);
23956: l_object_found_in_target := TRUE;
23957: --
23958: if l_process_date between r_DDR_unique.information2 and r_DDR_unique.information3 then
23959: l_update := true;
23960: if r_DDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
23961: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID'
23962: then
23963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23957: --
23958: if l_process_date between r_DDR_unique.information2 and r_DDR_unique.information3 then
23959: l_update := true;
23960: if r_DDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
23961: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID'
23962: then
23963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23959: l_update := true;
23960: if r_DDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
23961: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID'
23962: then
23963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
23960: if r_DDR_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
23961: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID'
23962: then
23963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
23968: --
23961: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID'
23962: then
23963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
23968: --
23969: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23962: then
23963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
23968: --
23969: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23970: --
23963: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
23964: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
23965: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DDR_unique.information1 ;
23966: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
23967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
23968: --
23969: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23970: --
23971: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23967: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
23968: --
23969: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
23970: --
23971: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
23972: --
23973: --DOUBT log_data('DDR',l_new_value,l_prefix || r_DDR_unique.name|| l_suffix,'REUSED');
23974: --
23975: end if ;
23988: open c_DDR_min_max_dates(r_DDR_unique.table_route_id, r_DDR_unique.information1 ) ;
23989: fetch c_DDR_min_max_dates into l_min_esd,l_max_eed ;
23990: --
23991:
23992: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23993: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23994: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23995: end if;
23996: l_min_esd := greatest(l_min_esd,r_DDR_unique.information2);
23989: fetch c_DDR_min_max_dates into l_min_esd,l_max_eed ;
23990: --
23991:
23992: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23993: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23994: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23995: end if;
23996: l_min_esd := greatest(l_min_esd,r_DDR_unique.information2);
23997: /* open c_DDR(r_DDR_unique.table_route_id,
23990: --
23991:
23992: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
23993: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
23994: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
23995: end if;
23996: l_min_esd := greatest(l_min_esd,r_DDR_unique.information2);
23997: /* open c_DDR(r_DDR_unique.table_route_id,
23998: r_DDR_unique.information1,
24019: p_from_date => l_min_esd,
24020: p_to_date => l_max_eed );
24021: if l_dt_rec_found THEN
24022: --END TEMPIK
24023: if r_DDR_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
24024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID' then
24025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
24027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24020: p_to_date => l_max_eed );
24021: if l_dt_rec_found THEN
24022: --END TEMPIK
24023: if r_DDR_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
24024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID' then
24025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
24027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24021: if l_dt_rec_found THEN
24022: --END TEMPIK
24023: if r_DDR_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
24024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID' then
24025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
24027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24022: --END TEMPIK
24023: if r_DDR_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
24024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID' then
24025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
24027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24030: --
24023: if r_DDR_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
24024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID' then
24025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
24027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24030: --
24031: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24024: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_ID' then
24025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
24027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24030: --
24031: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24032: --
24025: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24026: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR_unique.information1 ;
24027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24030: --
24031: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24032: --
24033: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24027: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24028: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24030: --
24031: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24032: --
24033: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24034: end if ;
24035: --
24029: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24030: --
24031: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24032: --
24033: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24034: end if ;
24035: --
24036: l_object_found_in_target := true ;
24037: --TEMPIK
24064: end if ;
24065: --
24066:
24067: l_effective_date := r_DDR.information2;
24068: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24069: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24070: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24071: end if;
24072:
24065: --
24066:
24067: l_effective_date := r_DDR.information2;
24068: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24069: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24070: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24071: end if;
24072:
24073: if l_first_rec and not l_update then
24066:
24067: l_effective_date := r_DDR.information2;
24068: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24069: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24070: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24071: end if;
24072:
24073: if l_first_rec and not l_update then
24074: -- Call Create routine.
24129: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
24130: -- Update all relevent cer records with new pk_id
24131: hr_utility.set_location('Before plsql table ',222);
24132: hr_utility.set_location('new_value id '||l_dsgn_rqmt_id,222);
24133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24130: -- Update all relevent cer records with new pk_id
24131: hr_utility.set_location('Before plsql table ',222);
24132: hr_utility.set_location('new_value id '||l_dsgn_rqmt_id,222);
24133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24138: hr_utility.set_location('After plsql table ',222);
24131: hr_utility.set_location('Before plsql table ',222);
24132: hr_utility.set_location('new_value id '||l_dsgn_rqmt_id,222);
24133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24138: hr_utility.set_location('After plsql table ',222);
24139: --
24132: hr_utility.set_location('new_value id '||l_dsgn_rqmt_id,222);
24133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24138: hr_utility.set_location('After plsql table ',222);
24139: --
24140: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24133: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_ID' ;
24134: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DDR.information1 ;
24135: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_ID ;
24136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24138: hr_utility.set_location('After plsql table ',222);
24139: --
24140: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24141: --
24136: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24137: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DDR_unique.table_route_id;
24138: hr_utility.set_location('After plsql table ',222);
24139: --
24140: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24141: --
24142: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24143: --
24144: else
24138: hr_utility.set_location('After plsql table ',222);
24139: --
24140: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24141: --
24142: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24143: --
24144: else
24145: --
24146: -- Call Update routine for the pk_id created in prev run .
24258: end loop;
24259: --
24260: exception when others then
24261: --
24262: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'DDR',r_ddr.information5 );
24263: --
24264: end create_DDR_rows;
24265:
24266: --
24408: --
24409: if l_dml_operation = 'UPDATE' then
24410: --
24411: l_update := true;
24412: if r_DRR_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
24413: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24409: if l_dml_operation = 'UPDATE' then
24410: --
24411: l_update := true;
24412: if r_DRR_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
24413: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24410: --
24411: l_update := true;
24412: if r_DRR_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
24413: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24411: l_update := true;
24412: if r_DRR_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
24413: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24419: --
24412: if r_DRR_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
24413: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24419: --
24420: -- update_cer_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
24413: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24419: --
24420: -- update_cer_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
24421: --
24414: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24415: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24419: --
24420: -- update_cer_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
24421: --
24422: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24416: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_DRR_unique.information1 ;
24417: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24419: --
24420: -- update_cer_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
24421: --
24422: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24423: --
24424: --DOUBT log_data('DRR',l_new_value,l_prefix || r_DRR_unique.name|| l_suffix,'REUSED');
24418: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24419: --
24420: -- update_cer_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
24421: --
24422: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24423: --
24424: --DOUBT log_data('DRR',l_new_value,l_prefix || r_DRR_unique.name|| l_suffix,'REUSED');
24425: --
24426: end if ;
24437: p_target_business_group_id, nvl(l_dsgn_rqmt_rlshp_typ_id, -999) ) ;
24438: fetch c_find_DRR_in_target into l_new_value ;
24439: if c_find_DRR_in_target%found then
24440: --
24441: if r_DRR_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
24442: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24438: fetch c_find_DRR_in_target into l_new_value ;
24439: if c_find_DRR_in_target%found then
24440: --
24441: if r_DRR_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
24442: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24439: if c_find_DRR_in_target%found then
24440: --
24441: if r_DRR_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
24442: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24440: --
24441: if r_DRR_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
24442: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24448: --
24441: if r_DRR_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
24442: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24448: --
24449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24442: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'DSGN_RQMT_RLSHP_TYP_ID' then
24443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24448: --
24449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24450: --
24443: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24444: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR_unique.information1 ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24448: --
24449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24450: --
24451: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24445: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24446: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24448: --
24449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24450: --
24451: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24452: end if ;
24453: --
24447: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24448: --
24449: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24450: --
24451: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24452: end if ;
24453: --
24454: l_object_found_in_target := true ;
24455: end if;
24477: end if ;
24478: --
24479:
24480: l_parent_effective_start_date := r_DRR.information10;
24481: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
24482: if l_parent_effective_start_date is null then
24483: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24484: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
24485: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24479:
24480: l_parent_effective_start_date := r_DRR.information10;
24481: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
24482: if l_parent_effective_start_date is null then
24483: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24484: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
24485: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24486: end if;
24487: end if;
24480: l_parent_effective_start_date := r_DRR.information10;
24481: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
24482: if l_parent_effective_start_date is null then
24483: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24484: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
24485: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24486: end if;
24487: end if;
24488: --
24481: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null ) then
24482: if l_parent_effective_start_date is null then
24483: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24484: elsif l_parent_effective_start_date < ben_pd_copy_to_ben_one.g_copy_effective_date then
24485: l_parent_effective_start_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24486: end if;
24487: end if;
24488: --
24489: -- To avoid creating a child with out a parent
24542: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
24543: -- Update all relevent cer records with new pk_id
24544: hr_utility.set_location('Before plsql table ',222);
24545: hr_utility.set_location('new_value id '||l_dsgn_rqmt_rlshp_typ_id,222);
24546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_RLSHP_TYP_ID ;
24549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24543: -- Update all relevent cer records with new pk_id
24544: hr_utility.set_location('Before plsql table ',222);
24545: hr_utility.set_location('new_value id '||l_dsgn_rqmt_rlshp_typ_id,222);
24546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_RLSHP_TYP_ID ;
24549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24551: hr_utility.set_location('After plsql table ',222);
24544: hr_utility.set_location('Before plsql table ',222);
24545: hr_utility.set_location('new_value id '||l_dsgn_rqmt_rlshp_typ_id,222);
24546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_RLSHP_TYP_ID ;
24549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24551: hr_utility.set_location('After plsql table ',222);
24552: --
24545: hr_utility.set_location('new_value id '||l_dsgn_rqmt_rlshp_typ_id,222);
24546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_RLSHP_TYP_ID ;
24549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24551: hr_utility.set_location('After plsql table ',222);
24552: --
24553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24546: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'DSGN_RQMT_RLSHP_TYP_ID' ;
24547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_DRR.information1 ;
24548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_DSGN_RQMT_RLSHP_TYP_ID ;
24549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24551: hr_utility.set_location('After plsql table ',222);
24552: --
24553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24554: --
24549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_DRR_unique.table_route_id;
24551: hr_utility.set_location('After plsql table ',222);
24552: --
24553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24554: --
24555: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24556: --
24557: elsif l_update then
24551: hr_utility.set_location('After plsql table ',222);
24552: --
24553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24554: --
24555: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24556: --
24557: elsif l_update then
24558: BEN_DSGN_RQMT_RLSHP_TYP_API.UPDATE_DSGN_RQMT_RLSHP_TYP(
24559: --
24607: end loop;
24608: --
24609: exception when others then
24610: --
24611: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'DRR',r_drr.information5 );
24612: --
24613: end create_DRR_rows;
24614:
24615: --
24739: end if ;
24740: -- End Prefix Sufix derivation
24741: for r_OPP_unique in c_unique_OPP('OPP') loop
24742:
24743: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24744: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24745: r_OPP_unique.information3 >=
24746: ben_pd_copy_to_ben_one.g_copy_effective_date)
24747: ) then
24740: -- End Prefix Sufix derivation
24741: for r_OPP_unique in c_unique_OPP('OPP') loop
24742:
24743: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24744: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24745: r_OPP_unique.information3 >=
24746: ben_pd_copy_to_ben_one.g_copy_effective_date)
24747: ) then
24748: --
24742:
24743: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
24744: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24745: r_OPP_unique.information3 >=
24746: ben_pd_copy_to_ben_one.g_copy_effective_date)
24747: ) then
24748: --
24749: hr_utility.set_location(' r_OPP_unique.table_route_id '||r_OPP_unique.table_route_id,10);
24750: hr_utility.set_location(' r_OPP_unique.information1 '||r_OPP_unique.information1,10);
24760: open c_OPP_min_max_dates(r_OPP_unique.table_route_id, r_OPP_unique.information1 ) ;
24761: fetch c_OPP_min_max_dates into l_min_esd,l_max_eed ;
24762: --
24763:
24764: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24765: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24766: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24767: end if;
24768: l_min_esd := greatest(l_min_esd,r_OPP_unique.information2);
24761: fetch c_OPP_min_max_dates into l_min_esd,l_max_eed ;
24762: --
24763:
24764: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24765: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24766: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24767: end if;
24768: l_min_esd := greatest(l_min_esd,r_OPP_unique.information2);
24769: open c_OPP(r_OPP_unique.table_route_id,
24762: --
24763:
24764: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24765: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24766: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
24767: end if;
24768: l_min_esd := greatest(l_min_esd,r_OPP_unique.information2);
24769: open c_OPP(r_OPP_unique.table_route_id,
24770: r_OPP_unique.information1,
24798: p_from_date => l_min_esd,
24799: p_to_date => l_max_eed );
24800: if l_dt_rec_found THEN
24801: --END TEMPIK
24802: if r_OPP_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
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24799: p_to_date => l_max_eed );
24800: if l_dt_rec_found THEN
24801: --END TEMPIK
24802: if r_OPP_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
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
24800: if l_dt_rec_found THEN
24801: --END TEMPIK
24802: if r_OPP_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
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24801: --END TEMPIK
24802: if r_OPP_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
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24809: --
24802: if r_OPP_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
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24803: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OIPLIP_ID' then
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24811: --
24804: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24805: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP_unique.information1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24811: --
24812: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24806: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
24807: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24811: --
24812: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24813: end if ;
24814: --
24808: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24809: --
24810: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
24811: --
24812: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24813: end if ;
24814: --
24815: l_object_found_in_target := true ;
24816: --TEMPIK
24844: end if ;
24845: --
24846:
24847: l_effective_date := r_OPP.information2;
24848: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24849: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24850: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24851: end if;
24852:
24845: --
24846:
24847: l_effective_date := r_OPP.information2;
24848: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24849: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24850: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24851: end if;
24852:
24853: if l_first_rec then
24846:
24847: l_effective_date := r_OPP.information2;
24848: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
24849: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
24850: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
24851: end if;
24852:
24853: if l_first_rec then
24854: -- Call Create routine.
24901: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
24902: -- Update all relevent cer records with new pk_id
24903: hr_utility.set_location('Before plsql table ',222);
24904: hr_utility.set_location('new_value id '||l_oiplip_id,222);
24905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24902: -- Update all relevent cer records with new pk_id
24903: hr_utility.set_location('Before plsql table ',222);
24904: hr_utility.set_location('new_value id '||l_oiplip_id,222);
24905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24910: hr_utility.set_location('After plsql table ',222);
24903: hr_utility.set_location('Before plsql table ',222);
24904: hr_utility.set_location('new_value id '||l_oiplip_id,222);
24905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24910: hr_utility.set_location('After plsql table ',222);
24911: --
24904: hr_utility.set_location('new_value id '||l_oiplip_id,222);
24905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24910: hr_utility.set_location('After plsql table ',222);
24911: --
24912: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24905: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OIPLIP_ID' ;
24906: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OPP.information1 ;
24907: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OIPLIP_ID ;
24908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24910: hr_utility.set_location('After plsql table ',222);
24911: --
24912: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24913: --
24908: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
24909: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OPP_unique.table_route_id;
24910: hr_utility.set_location('After plsql table ',222);
24911: --
24912: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24913: --
24914: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24915: --
24916: else
24910: hr_utility.set_location('After plsql table ',222);
24911: --
24912: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
24913: --
24914: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
24915: --
24916: else
24917: --
24918: -- Call Update routine for the pk_id created in prev run .
24996: end loop;
24997: --
24998: exception when others then
24999: --
25000: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'OPP',r_opp.information5 );
25001: --
25002: end create_OPP_rows;
25003:
25004: --
25138: end if ;
25139: -- End Prefix Sufix derivation
25140: for r_OTP_unique in c_unique_OTP('OTP') loop
25141:
25142: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25143: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25144: r_OTP_unique.information3 >=
25145: ben_pd_copy_to_ben_one.g_copy_effective_date)
25146: ) then
25139: -- End Prefix Sufix derivation
25140: for r_OTP_unique in c_unique_OTP('OTP') loop
25141:
25142: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25143: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25144: r_OTP_unique.information3 >=
25145: ben_pd_copy_to_ben_one.g_copy_effective_date)
25146: ) then
25147: --
25141:
25142: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25143: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25144: r_OTP_unique.information3 >=
25145: ben_pd_copy_to_ben_one.g_copy_effective_date)
25146: ) then
25147: --
25148: hr_utility.set_location(' r_OTP_unique.table_route_id '||r_OTP_unique.table_route_id,10);
25149: hr_utility.set_location(' r_OTP_unique.information1 '||r_OTP_unique.information1,10);
25159: open c_OTP_min_max_dates(r_OTP_unique.table_route_id, r_OTP_unique.information1 ) ;
25160: fetch c_OTP_min_max_dates into l_min_esd,l_max_eed ;
25161: --
25162:
25163: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25164: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25165: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25166: end if;
25167: l_min_esd := greatest(l_min_esd,r_OTP_unique.information2);
25160: fetch c_OTP_min_max_dates into l_min_esd,l_max_eed ;
25161: --
25162:
25163: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25164: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25165: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25166: end if;
25167: l_min_esd := greatest(l_min_esd,r_OTP_unique.information2);
25168: open c_OTP(r_OTP_unique.table_route_id,
25161: --
25162:
25163: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25164: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25165: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25166: end if;
25167: l_min_esd := greatest(l_min_esd,r_OTP_unique.information2);
25168: open c_OTP(r_OTP_unique.table_route_id,
25169: r_OTP_unique.information1,
25195: p_from_date => l_min_esd,
25196: p_to_date => l_max_eed );
25197: if l_dt_rec_found THEN
25198: --END TEMPIK
25199: if r_OTP_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
25200: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OPTIP_ID' then
25201: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25196: p_to_date => l_max_eed );
25197: if l_dt_rec_found THEN
25198: --END TEMPIK
25199: if r_OTP_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
25200: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OPTIP_ID' then
25201: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
25197: if l_dt_rec_found THEN
25198: --END TEMPIK
25199: if r_OTP_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
25200: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OPTIP_ID' then
25201: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25198: --END TEMPIK
25199: if r_OTP_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
25200: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OPTIP_ID' then
25201: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25206: --
25199: if r_OTP_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
25200: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OPTIP_ID' then
25201: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25206: --
25207: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25200: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'OPTIP_ID' then
25201: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25206: --
25207: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25208: --
25201: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25202: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP_unique.information1 ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25206: --
25207: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25208: --
25209: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25203: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25204: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED'; -- Always created, never Reused
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25206: --
25207: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25208: --
25209: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25210: end if ;
25211: --
25205: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25206: --
25207: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25208: --
25209: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25210: end if ;
25211: --
25212: l_object_found_in_target := true ;
25213: --TEMPIK
25240: end if ;
25241: --
25242:
25243: l_effective_date := r_OTP.information2;
25244: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25245: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25246: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25247: end if;
25248:
25241: --
25242:
25243: l_effective_date := r_OTP.information2;
25244: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25245: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25246: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25247: end if;
25248:
25249: if l_first_rec then
25242:
25243: l_effective_date := r_OTP.information2;
25244: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25245: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25246: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
25247: end if;
25248:
25249: if l_first_rec then
25250: -- Call Create routine.
25300: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
25301: -- Update all relevent cer records with new pk_id
25302: hr_utility.set_location('Before plsql table ',222);
25303: hr_utility.set_location('new_value id '||l_optip_id,222);
25304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25301: -- Update all relevent cer records with new pk_id
25302: hr_utility.set_location('Before plsql table ',222);
25303: hr_utility.set_location('new_value id '||l_optip_id,222);
25304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25309: hr_utility.set_location('After plsql table ',222);
25302: hr_utility.set_location('Before plsql table ',222);
25303: hr_utility.set_location('new_value id '||l_optip_id,222);
25304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25309: hr_utility.set_location('After plsql table ',222);
25310: --
25303: hr_utility.set_location('new_value id '||l_optip_id,222);
25304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25309: hr_utility.set_location('After plsql table ',222);
25310: --
25311: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25304: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'OPTIP_ID' ;
25305: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_OTP.information1 ;
25306: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_OPTIP_ID ;
25307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25309: hr_utility.set_location('After plsql table ',222);
25310: --
25311: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25312: --
25307: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25308: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_OTP_unique.table_route_id;
25309: hr_utility.set_location('After plsql table ',222);
25310: --
25311: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25312: --
25313: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25314: --
25315: else
25309: hr_utility.set_location('After plsql table ',222);
25310: --
25311: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25312: --
25313: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25314: --
25315: else
25316: --
25317: -- Call Update routine for the pk_id created in prev run .
25398: end loop;
25399: --
25400: exception when others then
25401: --
25402: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'OTP',r_otp.information5 );
25403: --
25404: end create_OTP_rows;
25405: --
25406: ---------------------------------------------------------------
25571: --
25572: if l_dml_operation = 'UPDATE' then
25573: --
25574: l_update := true;
25575: if r_PTY_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
25576: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25572: if l_dml_operation = 'UPDATE' then
25573: --
25574: l_update := true;
25575: if r_PTY_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
25576: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25573: --
25574: l_update := true;
25575: if r_PTY_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
25576: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25574: l_update := true;
25575: if r_PTY_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
25576: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25582: --
25575: if r_PTY_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
25576: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25582: --
25583: -- update_cer_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
25576: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25582: --
25583: -- update_cer_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
25584: --
25577: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25578: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25582: --
25583: -- update_cer_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
25584: --
25585: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25579: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PTY_unique.information1 ;
25580: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25582: --
25583: -- update_cer_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
25584: --
25585: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25586: --
25587: --DOUBT log_data('PTY',l_new_value,l_prefix || r_PTY_unique.name|| l_suffix,'REUSED');
25581: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25582: --
25583: -- update_cer_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
25584: --
25585: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25586: --
25587: --DOUBT log_data('PTY',l_new_value,l_prefix || r_PTY_unique.name|| l_suffix,'REUSED');
25588: --
25589: end if ;
25601: p_target_business_group_id, nvl(l_pl_pcp_typ_id, -999) ) ;
25602: fetch c_find_PTY_in_target into l_new_value ;
25603: if c_find_PTY_in_target%found then
25604: --
25605: if r_PTY_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
25606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25602: fetch c_find_PTY_in_target into l_new_value ;
25603: if c_find_PTY_in_target%found then
25604: --
25605: if r_PTY_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
25606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25603: if c_find_PTY_in_target%found then
25604: --
25605: if r_PTY_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
25606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25604: --
25605: if r_PTY_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
25606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25612: --
25605: if r_PTY_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
25606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25612: --
25613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25606: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_PCP_TYP_ID' then
25607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25612: --
25613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25614: --
25607: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25608: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY_unique.information1 ;
25609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25612: --
25613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25614: --
25615: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25609: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
25610: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25612: --
25613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25614: --
25615: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25616: end if ;
25617: --
25611: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25612: --
25613: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
25614: --
25615: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25616: end if ;
25617: --
25618: l_object_found_in_target := true ;
25619: end if;
25646: hr_utility.set_location(' BEN_PL_PCP_TYP CREATE_PL_CARE_PRVDR_TYP ',20);
25647: BEN_PL_CARE_PRVDR_TYP_API.CREATE_PL_CARE_PRVDR_TYP(
25648: --
25649: P_VALIDATE => false
25650: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
25651: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
25652: --
25653: ,P_GNDR_ALWD_CD => r_PTY.INFORMATION12
25654: ,P_MAX_AGE => r_PTY.INFORMATION294
25693: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
25694: -- Update all relevent cer records with new pk_id
25695: hr_utility.set_location('Before plsql table ',222);
25696: hr_utility.set_location('new_value id '||l_pl_pcp_typ_id,222);
25697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25694: -- Update all relevent cer records with new pk_id
25695: hr_utility.set_location('Before plsql table ',222);
25696: hr_utility.set_location('new_value id '||l_pl_pcp_typ_id,222);
25697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25702: hr_utility.set_location('After plsql table ',222);
25695: hr_utility.set_location('Before plsql table ',222);
25696: hr_utility.set_location('new_value id '||l_pl_pcp_typ_id,222);
25697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25702: hr_utility.set_location('After plsql table ',222);
25703: --
25696: hr_utility.set_location('new_value id '||l_pl_pcp_typ_id,222);
25697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25702: hr_utility.set_location('After plsql table ',222);
25703: --
25704: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25697: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_PCP_TYP_ID' ;
25698: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PTY.information1 ;
25699: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_PCP_TYP_ID ;
25700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25702: hr_utility.set_location('After plsql table ',222);
25703: --
25704: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25705: --
25700: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
25701: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PTY_unique.table_route_id;
25702: hr_utility.set_location('After plsql table ',222);
25703: --
25704: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25705: --
25706: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25707: --
25708: elsif l_update then
25702: hr_utility.set_location('After plsql table ',222);
25703: --
25704: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
25705: --
25706: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25707: --
25708: elsif l_update then
25709: BEN_PL_CARE_PRVDR_TYP_API.UPDATE_PL_CARE_PRVDR_TYP(
25710: --
25708: elsif l_update then
25709: BEN_PL_CARE_PRVDR_TYP_API.UPDATE_PL_CARE_PRVDR_TYP(
25710: --
25711: P_VALIDATE => false
25712: ,P_EFFECTIVE_DATE => NVL(ben_pd_copy_to_ben_one.g_copy_effective_date ,p_effective_date)
25713: ,P_BUSINESS_GROUP_ID => p_target_business_group_id
25714: --
25715: ,P_GNDR_ALWD_CD => r_PTY.INFORMATION12
25716: ,P_MAX_AGE => r_PTY.INFORMATION294
25763: end loop;
25764: --
25765: exception when others then
25766: --
25767: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PTY',r_pty.information5 );
25768: --
25769: end create_PTY_rows;
25770:
25771: --
25904: end if ;
25905: -- End Prefix Sufix derivation
25906: for r_PRP_unique in c_unique_PRP('PRP') loop
25907:
25908: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25909: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25910: r_PRP_unique.information3 >=
25911: ben_pd_copy_to_ben_one.g_copy_effective_date)
25912: ) then
25905: -- End Prefix Sufix derivation
25906: for r_PRP_unique in c_unique_PRP('PRP') loop
25907:
25908: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25909: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25910: r_PRP_unique.information3 >=
25911: ben_pd_copy_to_ben_one.g_copy_effective_date)
25912: ) then
25913: --
25907:
25908: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
25909: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25910: r_PRP_unique.information3 >=
25911: ben_pd_copy_to_ben_one.g_copy_effective_date)
25912: ) then
25913: --
25914: hr_utility.set_location(' r_PRP_unique.table_route_id '||r_PRP_unique.table_route_id,10);
25915: hr_utility.set_location(' r_PRP_unique.information1 '||r_PRP_unique.information1,10);
25942: l_object_found_in_target := TRUE;
25943: --
25944: if l_process_date between r_PRP_unique.information2 and r_PRP_unique.information3 then
25945: l_update := true;
25946: if r_PRP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
25947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID'
25948: then
25949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25943: --
25944: if l_process_date between r_PRP_unique.information2 and r_PRP_unique.information3 then
25945: l_update := true;
25946: if r_PRP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
25947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID'
25948: then
25949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25945: l_update := true;
25946: if r_PRP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
25947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID'
25948: then
25949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
25946: if r_PRP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
25947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID'
25948: then
25949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
25954: --
25947: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID'
25948: then
25949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
25954: --
25955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
25948: then
25949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
25954: --
25955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
25956: --
25949: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
25950: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
25951: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_PRP_unique.information1 ;
25952: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
25953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
25954: --
25955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
25956: --
25957: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25953: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
25954: --
25955: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
25956: --
25957: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
25958: --
25959: --DOUBT log_data('PRP',l_new_value,l_prefix || r_PRP_unique.name|| l_suffix,'REUSED');
25960: --
25961: end if ;
25974: open c_PRP_min_max_dates(r_PRP_unique.table_route_id, r_PRP_unique.information1 ) ;
25975: fetch c_PRP_min_max_dates into l_min_esd,l_max_eed ;
25976: --
25977:
25978: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25979: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25980: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25981: end if;
25982: l_min_esd := greatest(l_min_esd,r_PRP_unique.information2);
25975: fetch c_PRP_min_max_dates into l_min_esd,l_max_eed ;
25976: --
25977:
25978: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25979: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25980: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25981: end if;
25982: l_min_esd := greatest(l_min_esd,r_PRP_unique.information2);
25983: /* open c_PRP(r_PRP_unique.table_route_id,
25976: --
25977:
25978: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
25979: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
25980: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
25981: end if;
25982: l_min_esd := greatest(l_min_esd,r_PRP_unique.information2);
25983: /* open c_PRP(r_PRP_unique.table_route_id,
25984: r_PRP_unique.information1,
26009: p_from_date => l_min_esd,
26010: p_to_date => l_max_eed );
26011: if l_dt_rec_found THEN
26012: --END TEMPIK
26013: if r_PRP_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
26014: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID' then
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
26017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26010: p_to_date => l_max_eed );
26011: if l_dt_rec_found THEN
26012: --END TEMPIK
26013: if r_PRP_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
26014: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID' then
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
26017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26011: if l_dt_rec_found THEN
26012: --END TEMPIK
26013: if r_PRP_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
26014: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID' then
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
26017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26012: --END TEMPIK
26013: if r_PRP_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
26014: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID' then
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
26017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26020: --
26013: if r_PRP_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
26014: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID' then
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
26017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26020: --
26021: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26014: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'PL_REGY_PRPS_ID' then
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
26017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26020: --
26021: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26022: --
26015: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRPS_ID' ;
26016: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP_unique.information1 ;
26017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26020: --
26021: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26022: --
26023: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26017: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26018: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26020: --
26021: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26022: --
26023: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26024: end if ;
26025: --
26019: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26020: --
26021: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26022: --
26023: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26024: end if ;
26025: --
26026: l_object_found_in_target := true ;
26027: --TEMPIK
26054: end if ;
26055: --
26056:
26057: l_effective_date := r_PRP.information2;
26058: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26059: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26060: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26061: end if;
26062:
26055: --
26056:
26057: l_effective_date := r_PRP.information2;
26058: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26059: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26060: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26061: end if;
26062:
26063: if l_first_rec and not l_update then
26056:
26057: l_effective_date := r_PRP.information2;
26058: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26059: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26060: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26061: end if;
26062:
26063: if l_first_rec and not l_update then
26064: -- Call Create routine.
26111: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
26112: -- Update all relevent cer records with new pk_id
26113: hr_utility.set_location('Before plsql table ',222);
26114: hr_utility.set_location('new_value id '||l_pl_regy_prps_id,222);
26115: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26112: -- Update all relevent cer records with new pk_id
26113: hr_utility.set_location('Before plsql table ',222);
26114: hr_utility.set_location('new_value id '||l_pl_regy_prps_id,222);
26115: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26120: hr_utility.set_location('After plsql table ',222);
26113: hr_utility.set_location('Before plsql table ',222);
26114: hr_utility.set_location('new_value id '||l_pl_regy_prps_id,222);
26115: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26120: hr_utility.set_location('After plsql table ',222);
26121: --
26114: hr_utility.set_location('new_value id '||l_pl_regy_prps_id,222);
26115: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26120: hr_utility.set_location('After plsql table ',222);
26121: --
26122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26115: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'PL_REGY_PRP_ID' ;
26116: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_PRP.information1 ;
26117: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_PL_REGY_PRPS_ID ;
26118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26120: hr_utility.set_location('After plsql table ',222);
26121: --
26122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26123: --
26118: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26119: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_PRP_unique.table_route_id;
26120: hr_utility.set_location('After plsql table ',222);
26121: --
26122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26123: --
26124: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26125: --
26126: else
26120: hr_utility.set_location('After plsql table ',222);
26121: --
26122: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26123: --
26124: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26125: --
26126: else
26127: --
26128: -- Call Update routine for the pk_id created in prev run .
26234: end loop;
26235: --
26236: exception when others then
26237: --
26238: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'PRP',r_prp.information5 );
26239: --
26240: end create_PRP_rows;
26241:
26242: --
26422: -- Derive the prefix - sufix
26423: -- End Prefix Sufix derivation
26424: for r_BPP_unique in c_unique_BPP('BPP') loop
26425:
26426: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26427: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26428: r_BPP_unique.information3 >=
26429: ben_pd_copy_to_ben_one.g_copy_effective_date)
26430: ) then
26423: -- End Prefix Sufix derivation
26424: for r_BPP_unique in c_unique_BPP('BPP') loop
26425:
26426: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26427: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26428: r_BPP_unique.information3 >=
26429: ben_pd_copy_to_ben_one.g_copy_effective_date)
26430: ) then
26431: --
26425:
26426: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
26427: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26428: r_BPP_unique.information3 >=
26429: ben_pd_copy_to_ben_one.g_copy_effective_date)
26430: ) then
26431: --
26432: if p_prefix_suffix_cd = 'PREFIX' then
26433: l_prefix := p_prefix_suffix_text ;
26477: l_object_found_in_target := TRUE;
26478: --
26479: if l_process_date between r_BPP_unique.information2 and r_BPP_unique.information3 then
26480: l_update := true;
26481: if r_BPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
26482: 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_PRVDR_POOL_ID'
26483: then
26484: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26485: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26478: --
26479: if l_process_date between r_BPP_unique.information2 and r_BPP_unique.information3 then
26480: l_update := true;
26481: if r_BPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
26482: 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_PRVDR_POOL_ID'
26483: then
26484: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26485: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26486: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26480: l_update := true;
26481: if r_BPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
26482: 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_PRVDR_POOL_ID'
26483: then
26484: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26485: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26486: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26487: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26481: if r_BPP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
26482: 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_PRVDR_POOL_ID'
26483: then
26484: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26485: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26486: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26487: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26489: --
26482: 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_PRVDR_POOL_ID'
26483: then
26484: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26485: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26486: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26487: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26489: --
26490: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26483: then
26484: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26485: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26486: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26487: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26489: --
26490: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26491: --
26484: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26485: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26486: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_BPP_unique.information1 ;
26487: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26489: --
26490: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26491: --
26492: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26488: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26489: --
26490: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
26491: --
26492: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26493: --
26494: --DOUBT log_data('BPP',l_new_value,l_prefix || r_BPP_unique.name|| l_suffix,'REUSED');
26495: --
26496: end if ;
26509: open c_BPP_min_max_dates(r_BPP_unique.table_route_id, r_BPP_unique.information1 ) ;
26510: fetch c_BPP_min_max_dates into l_min_esd,l_max_eed ;
26511: --
26512:
26513: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26514: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26515: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26516: end if;
26517: l_min_esd := greatest(l_min_esd,r_BPP_unique.information2);
26510: fetch c_BPP_min_max_dates into l_min_esd,l_max_eed ;
26511: --
26512:
26513: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26514: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26515: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26516: end if;
26517: l_min_esd := greatest(l_min_esd,r_BPP_unique.information2);
26518: /* open c_BPP(r_BPP_unique.table_route_id,
26511: --
26512:
26513: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26514: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26515: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
26516: end if;
26517: l_min_esd := greatest(l_min_esd,r_BPP_unique.information2);
26518: /* open c_BPP(r_BPP_unique.table_route_id,
26519: r_BPP_unique.information1,
26541: p_to_date => l_max_eed );
26542: if l_dt_rec_found THEN
26543: --END TEMPIK
26544: --
26545: if r_BPP_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
26546: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_PRVDR_POOL_ID' then
26547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26542: if l_dt_rec_found THEN
26543: --END TEMPIK
26544: --
26545: if r_BPP_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
26546: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_PRVDR_POOL_ID' then
26547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26543: --END TEMPIK
26544: --
26545: if r_BPP_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
26546: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_PRVDR_POOL_ID' then
26547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26544: --
26545: if r_BPP_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
26546: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_PRVDR_POOL_ID' then
26547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26552: --
26545: if r_BPP_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
26546: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_PRVDR_POOL_ID' then
26547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26552: --
26553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26546: nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'BNFT_PRVDR_POOL_ID' then
26547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26552: --
26553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26554: --
26547: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26548: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP_unique.information1 ;
26549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26552: --
26553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26554: --
26555: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26549: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_new_value ;
26550: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
26551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26552: --
26553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26554: --
26555: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26556: --
26557: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP_unique.name || l_suffix ,'REUSED');
26551: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26552: --
26553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26554: --
26555: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26556: --
26557: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP_unique.name || l_suffix ,'REUSED');
26558: --
26559: end if ;
26553: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count) , p_copy_entity_txn_id) ;
26554: --
26555: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26556: --
26557: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP_unique.name || l_suffix ,'REUSED');
26558: --
26559: end if ;
26560: --
26561: l_object_found_in_target := true ;
26623: --
26624: end if ;
26625: --
26626: --
26627: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_BNFT_PRVDR_POOL_F',l_prefix || r_BPP.information170 || l_suffix);
26628: --
26629:
26630: l_effective_date := r_BPP.information2;
26631: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26627: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_BNFT_PRVDR_POOL_F',l_prefix || r_BPP.information170 || l_suffix);
26628: --
26629:
26630: l_effective_date := r_BPP.information2;
26631: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26632: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26633: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26634: end if;
26635:
26628: --
26629:
26630: l_effective_date := r_BPP.information2;
26631: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26632: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26633: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26634: end if;
26635:
26636: if l_first_rec and not l_update then
26629:
26630: l_effective_date := r_BPP.information2;
26631: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
26632: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
26633: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
26634: end if;
26635:
26636: if l_first_rec and not l_update then
26637: -- Call Create routine.
26715: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
26716: -- Update all relevent cer records with new pk_id
26717: hr_utility.set_location('Before plsql table ',222);
26718: hr_utility.set_location('new_value id '||l_bnft_prvdr_pool_id,222);
26719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26716: -- Update all relevent cer records with new pk_id
26717: hr_utility.set_location('Before plsql table ',222);
26718: hr_utility.set_location('new_value id '||l_bnft_prvdr_pool_id,222);
26719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26724: hr_utility.set_location('After plsql table ',222);
26717: hr_utility.set_location('Before plsql table ',222);
26718: hr_utility.set_location('new_value id '||l_bnft_prvdr_pool_id,222);
26719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26724: hr_utility.set_location('After plsql table ',222);
26725: --
26718: hr_utility.set_location('new_value id '||l_bnft_prvdr_pool_id,222);
26719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26724: hr_utility.set_location('After plsql table ',222);
26725: --
26726: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26719: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'BNFT_PRVDR_POOL_ID' ;
26720: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_BPP.information1 ;
26721: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := l_BNFT_PRVDR_POOL_ID ;
26722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26724: hr_utility.set_location('After plsql table ',222);
26725: --
26726: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26727: --
26722: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'COPIED';
26723: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_BPP_unique.table_route_id;
26724: hr_utility.set_location('After plsql table ',222);
26725: --
26726: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26727: --
26728: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26729: --
26730: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP.INFORMATION170 || l_suffix,'COPIED');
26724: hr_utility.set_location('After plsql table ',222);
26725: --
26726: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26727: --
26728: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26729: --
26730: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP.INFORMATION170 || l_suffix,'COPIED');
26731: --
26732: else
26726: -- update_cer_with_target( BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count),p_copy_entity_txn_id ) ;
26727: --
26728: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
26729: --
26730: BEN_PD_COPY_TO_BEN_ONE.log_data('BPP',l_new_value,l_prefix || r_BPP.INFORMATION170 || l_suffix,'COPIED');
26731: --
26732: else
26733: --
26734: -- Call Update routine for the pk_id created in prev run .
26870: end loop;
26871: --
26872: exception when others then
26873: --
26874: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'BPP',l_prefix || r_BPP.information170 || l_suffix) ;
26875: --
26876: end create_BPP_rows;
26877:
26878: ---------------------------------------------------------------
27006: end if ;
27007: -- End Prefix Sufix derivation
27008: for r_ACP_unique in c_unique_ACP('ACP') loop
27009:
27010: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27011: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27012: r_ACP_unique.information3 >=
27013: ben_pd_copy_to_ben_one.g_copy_effective_date)
27014: ) then
27007: -- End Prefix Sufix derivation
27008: for r_ACP_unique in c_unique_ACP('ACP') loop
27009:
27010: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27011: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27012: r_ACP_unique.information3 >=
27013: ben_pd_copy_to_ben_one.g_copy_effective_date)
27014: ) then
27015: --
27009:
27010: if (ben_pd_copy_to_ben_one.g_copy_effective_date is null or
27011: (ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27012: r_ACP_unique.information3 >=
27013: ben_pd_copy_to_ben_one.g_copy_effective_date)
27014: ) then
27015: --
27016: hr_utility.set_location(' r_ACP_unique.table_route_id '||r_ACP_unique.table_route_id,10);
27017: hr_utility.set_location(' r_ACP_unique.information1 '||r_ACP_unique.information1,10);
27045: l_object_found_in_target := TRUE;
27046: --
27047: if l_process_date between r_ACP_unique.information2 and r_ACP_unique.information3 then
27048: l_update := true;
27049: if r_ACP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
27050: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID'
27051: then
27052: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
27046: --
27047: if l_process_date between r_ACP_unique.information2 and r_ACP_unique.information3 then
27048: l_update := true;
27049: if r_ACP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
27050: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID'
27051: then
27052: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
27054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
27048: l_update := true;
27049: if r_ACP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
27050: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID'
27051: then
27052: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
27054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
27055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ACP_unique.table_route_id;
27049: if r_ACP_unique.information1 <> nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).old_value, -999)
27050: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID'
27051: then
27052: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
27054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
27055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ACP_unique.table_route_id;
27057: --
27050: or nvl(BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID'
27051: then
27052: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
27054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
27055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ACP_unique.table_route_id;
27057: --
27058: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
27051: then
27052: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
27054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
27055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ACP_unique.table_route_id;
27057: --
27058: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
27059: --
27052: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27053: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).old_value := r_ACP_unique.information1 ;
27054: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).new_value := r_ACP_unique.information1 ;
27055: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).copy_reuse_type := 'REUSED';
27056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ACP_unique.table_route_id;
27057: --
27058: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
27059: --
27060: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27056: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(BEN_PD_COPY_TO_BEN_ONE.g_count).table_route_id := r_ACP_unique.table_route_id;
27057: --
27058: -- update_cer_with_target( g_pk_tbl(g_count),p_copy_entity_txn_id ) ;
27059: --
27060: BEN_PD_COPY_TO_BEN_ONE.g_count := BEN_PD_COPY_TO_BEN_ONE.g_count + 1 ;
27061: --
27062: --DOUBT log_data('ACP',l_new_value,l_prefix || r_ACP_unique.name|| l_suffix,'REUSED');
27063: --
27064: end if ;
27077: open c_ACP_min_max_dates(r_ACP_unique.table_route_id, r_ACP_unique.information1 ) ;
27078: fetch c_ACP_min_max_dates into l_min_esd,l_max_eed ;
27079: --
27080:
27081: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27082: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27083: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27084: end if;
27085: l_min_esd := greatest(l_min_esd,r_ACP_unique.information2);
27078: fetch c_ACP_min_max_dates into l_min_esd,l_max_eed ;
27079: --
27080:
27081: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27082: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27083: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27084: end if;
27085: l_min_esd := greatest(l_min_esd,r_ACP_unique.information2);
27086: /* open c_ACP(r_ACP_unique.table_route_id,
27079: --
27080:
27081: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27082: l_min_esd < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27083: l_min_esd := ben_pd_copy_to_ben_one.g_copy_effective_date;
27084: end if;
27085: l_min_esd := greatest(l_min_esd,r_ACP_unique.information2);
27086: /* open c_ACP(r_ACP_unique.table_route_id,
27087: r_ACP_unique.information1,
27108: p_from_date => l_min_esd,
27109: p_to_date => l_max_eed );
27110: if l_dt_rec_found THEN
27111: --END TEMPIK
27112: if r_ACP_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
27113: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID' then
27114: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27115: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27116: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27109: p_to_date => l_max_eed );
27110: if l_dt_rec_found THEN
27111: --END TEMPIK
27112: if r_ACP_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
27113: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID' then
27114: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27115: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27116: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27110: if l_dt_rec_found THEN
27111: --END TEMPIK
27112: if r_ACP_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
27113: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID' then
27114: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27115: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27116: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27111: --END TEMPIK
27112: if r_ACP_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
27113: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID' then
27114: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27115: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27116: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27119: --
27112: if r_ACP_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
27113: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID' then
27114: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27115: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27116: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27119: --
27120: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27113: nvl(ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count-1).pk_id_column, '999') <> 'ACRS_PTIP_CVG_ID' then
27114: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27115: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27116: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27119: --
27120: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27121: --
27114: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27115: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP_unique.information1 ;
27116: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27119: --
27120: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27121: --
27122: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27116: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_new_value ;
27117: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'REUSED';
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27119: --
27120: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27121: --
27122: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27123: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP_unique.name|| l_suffix,'REUSED');
27124: end if ;
27118: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27119: --
27120: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27121: --
27122: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27123: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP_unique.name|| l_suffix,'REUSED');
27124: end if ;
27125: --
27126: l_object_found_in_target := true ;
27119: --
27120: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count) , p_copy_entity_txn_id) ;
27121: --
27122: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27123: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP_unique.name|| l_suffix,'REUSED');
27124: end if ;
27125: --
27126: l_object_found_in_target := true ;
27127: --TEMPIK
27152: l_first_rec := true ;
27153: --
27154: end if ;
27155: --
27156: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_ACRS_PTIP_CVG_F',l_prefix || r_ACP.information170 || l_suffix);
27157: --
27158:
27159: l_effective_date := r_ACP.information2;
27160: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27156: ben_pd_copy_to_ben_one.ben_chk_col_len('NAME' ,'BEN_ACRS_PTIP_CVG_F',l_prefix || r_ACP.information170 || l_suffix);
27157: --
27158:
27159: l_effective_date := r_ACP.information2;
27160: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27161: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27162: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27163: end if;
27164:
27157: --
27158:
27159: l_effective_date := r_ACP.information2;
27160: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27161: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27162: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27163: end if;
27164:
27165: if l_first_rec and not l_update then
27158:
27159: l_effective_date := r_ACP.information2;
27160: if ( ben_pd_copy_to_ben_one.g_copy_effective_date is not null and
27161: l_effective_date < ben_pd_copy_to_ben_one.g_copy_effective_date ) then
27162: l_effective_date := ben_pd_copy_to_ben_one.g_copy_effective_date;
27163: end if;
27164:
27165: if l_first_rec and not l_update then
27166: -- Call Create routine.
27215: -- insert the table_name,old_pk_id,new_pk_id into a plsql record
27216: -- Update all relevent cer records with new pk_id
27217: hr_utility.set_location('Before plsql table ',222);
27218: hr_utility.set_location('new_value id '||l_acrs_ptip_cvg_id,222);
27219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27223: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27216: -- Update all relevent cer records with new pk_id
27217: hr_utility.set_location('Before plsql table ',222);
27218: hr_utility.set_location('new_value id '||l_acrs_ptip_cvg_id,222);
27219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27223: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27224: hr_utility.set_location('After plsql table ',222);
27217: hr_utility.set_location('Before plsql table ',222);
27218: hr_utility.set_location('new_value id '||l_acrs_ptip_cvg_id,222);
27219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27223: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27224: hr_utility.set_location('After plsql table ',222);
27225: --
27218: hr_utility.set_location('new_value id '||l_acrs_ptip_cvg_id,222);
27219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27223: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27224: hr_utility.set_location('After plsql table ',222);
27225: --
27226: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27219: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).pk_id_column := 'ACRS_PTIP_CVG_ID' ;
27220: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).old_value := r_ACP.information1 ;
27221: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).new_value := l_ACRS_PTIP_CVG_ID ;
27222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27223: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27224: hr_utility.set_location('After plsql table ',222);
27225: --
27226: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27227: --
27222: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).copy_reuse_type := 'COPIED';
27223: ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count).table_route_id := r_ACP_unique.table_route_id;
27224: hr_utility.set_location('After plsql table ',222);
27225: --
27226: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27227: --
27228: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27229: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP.information170|| l_suffix,'COPIED');
27230: --
27224: hr_utility.set_location('After plsql table ',222);
27225: --
27226: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27227: --
27228: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27229: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP.information170|| l_suffix,'COPIED');
27230: --
27231: else
27232: --
27225: --
27226: -- update_cer_with_target( ben_pd_copy_to_ben_one.g_pk_tbl(ben_pd_copy_to_ben_one.g_count),p_copy_entity_txn_id ) ;
27227: --
27228: ben_pd_copy_to_ben_one.g_count := ben_pd_copy_to_ben_one.g_count + 1 ;
27229: ben_pd_copy_to_ben_one.log_data('ACP',l_new_value,l_prefix || r_ACP.information170|| l_suffix,'COPIED');
27230: --
27231: else
27232: --
27233: -- Call Update routine for the pk_id created in prev run .
27340: end loop;
27341: --
27342: exception when others then
27343: --
27344: BEN_PD_COPY_TO_BEN_ONE.raise_error_message( 'ACP',l_prefix || r_ACP.information170 || l_suffix) ;
27345: --
27346: end create_ACP_rows;
27347:
27348: procedure create_final_intersect_rows
27359:
27360: --
27361: -- Create all Service Area Postal Zip Range rows
27362: --
27363: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('SAZ') then
27364: BEN_PD_COPY_TO_BEN_TWO.create_SAZ_rows(
27365: p_validate => p_validate
27366: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27367: ,p_effective_date => p_effective_date
27373: end if;
27374: --
27375: -- Create all oipl rows. Moved these calls to End
27376: --
27377: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('COP') then
27378: BEN_PD_COPY_TO_BEN_TWO.create_COP_rows(
27379: p_validate => p_validate
27380: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27381: ,p_effective_date => p_effective_date
27387: end if;
27388: --
27389: -- Create all DDR rows, which could be attached to opt, oipl, pl levels..
27390: --
27391: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('DDR') then
27392: BEN_PD_COPY_TO_BEN_TWO.create_DDR_rows(
27393: p_validate => p_validate
27394: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27395: ,p_effective_date => p_effective_date
27401: end if;
27402: --
27403: -- Create all DRR rows, which could be attached to DRR rows.
27404: --
27405: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('DRR') then
27406: BEN_PD_COPY_TO_BEN_TWO.create_DRR_rows(
27407: p_validate => p_validate
27408: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27409: ,p_effective_date => p_effective_date
27422: --
27423: -- CPY records are created at PGM and PL level
27424: -- This call creates the intersections between all these levels and yr_perds.
27425: --
27426: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CPY') then
27427: BEN_PD_COPY_TO_BEN_TWO.create_CPY_rows(
27428: p_validate => p_validate
27429: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27430: ,p_effective_date => p_effective_date
27434: ,p_prefix_suffix_cd => p_prefix_suffix_cd
27435: );
27436: end if;
27437: --
27438: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CWG') then
27439: BEN_PD_COPY_TO_BEN_TWO.create_CWG_rows(
27440: p_validate => p_validate
27441: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27442: ,p_effective_date => p_effective_date
27457: --
27458: -- PAT records are created at PGM and PL level
27459: -- This call creates the intersections between all these levels and Action type.
27460: --
27461: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PAT') then
27462: BEN_PD_COPY_TO_BEN_TWO.create_PAT_rows(
27463: p_validate => p_validate
27464: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27465: ,p_effective_date => p_effective_date
27473: --
27474: -- PET records are created at PGM and PL level
27475: -- This call creates the intersections between all these levels and enrt type cycl code.
27476: --
27477: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PET') then
27478: BEN_PD_COPY_TO_BEN_TWO.create_PET_rows(
27479: p_validate => p_validate
27480: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27481: ,p_effective_date => p_effective_date
27488: --
27489: -- ENP records are created at PGM and PL level
27490: -- This call creates the intersections between all these levels and year periods.
27491: --
27492: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ENP') then
27493: BEN_PD_COPY_TO_BEN_TWO.create_ENP_rows(
27494: p_validate => p_validate
27495: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27496: ,p_effective_date => p_effective_date
27504: --
27505: -- LEN records are created at PGM and PL level
27506: -- This call creates the intersections between all these levels and ler.
27507: --
27508: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LEN') then
27509: BEN_PD_COPY_TO_BEN_TWO.create_LEN_rows(
27510: p_validate => p_validate
27511: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27512: ,p_effective_date => p_effective_date
27519: --
27520: --
27521: -- LOP records are created at OIPL and LER level
27522: --
27523: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LOP') then
27524: BEN_PD_COPY_TO_BEN_TWO.create_LOP_rows(
27525: p_validate => p_validate
27526: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27527: ,p_effective_date => p_effective_date
27534: --
27535: --
27536: -- ERP records are created at LEN or ENP level
27537: --
27538: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ERP') then
27539: BEN_PD_COPY_TO_BEN_TWO.create_ERP_rows(
27540: p_validate => p_validate
27541: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27542: ,p_effective_date => p_effective_date
27549: --
27550: --
27551: -- SER records are created at ENP level
27552: --
27553: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('SER') then
27554: BEN_PD_COPY_TO_BEN_TWO.create_SER_rows(
27555: p_validate => p_validate
27556: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27557: ,p_effective_date => p_effective_date
27566: -- ECF records are created at PL and OIPL level
27567: -- This call creates the intersections between all these levels and
27568: -- enrt_ctfn_cd
27569: --
27570: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ECF') then
27571: BEN_PD_COPY_TO_BEN_TWO.create_ECF_rows(
27572: p_validate => p_validate
27573: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27574: ,p_effective_date => p_effective_date
27582: -- CPO records are created at PL and GPM level
27583: -- This call creates the intersections between these levels and
27584: -- Organization
27585: --
27586: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CPO') then
27587: BEN_PD_COPY_TO_BEN_TWO.create_CPO_rows(
27588: p_validate => p_validate
27589: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27590: ,p_effective_date => p_effective_date
27597: -- CPR records are created at CPO level
27598: -- This call creates the child records for the CPO level
27599: --
27600: --
27601: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CPR') then
27602: BEN_PD_COPY_TO_BEN_TWO.create_CPR_rows(
27603: p_validate => p_validate
27604: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27605: ,p_effective_date => p_effective_date
27613: -- RGR records are created at PL and GPM level
27614: -- This call creates the intersections between these levels and
27615: -- reporting group
27616: --
27617: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('RGR') then
27618: BEN_PD_COPY_TO_BEN_TWO.create_RGR_rows(
27619: p_validate => p_validate
27620: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27621: ,p_effective_date => p_effective_date
27629: -- PRG records are created at PL and RGR level
27630: -- This call creates the intersections between these levels and
27631: -- REGN
27632: --
27633: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PRG') then
27634: BEN_PD_COPY_TO_BEN_TWO.create_PRG_rows(
27635: p_validate => p_validate
27636: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27637: ,p_effective_date => p_effective_date
27642: );
27643: end if;
27644:
27645: --
27646: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ACP') then
27647: BEN_PD_COPY_TO_BEN_two.create_ACP_rows
27648: (p_validate => p_validate
27649: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27650: ,p_effective_date => p_effective_date
27657:
27658: -- Start of Intersections for the PTIP
27659: -- CTP records are created at Program and Plan Intersection
27660: --
27661: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CTP') then
27662: BEN_PD_COPY_TO_BEN_TWO.create_CTP_rows(
27663: p_validate => p_validate
27664: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27665: ,p_effective_date => p_effective_date
27672: -- ADE records are created at PGM,PTIP and PL level
27673: -- This call creates the intersections between all these levels and
27674: -- ben_dpnt_cvg_eligy_prfl_f
27675: --
27676: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('ADE') then
27677: BEN_PD_COPY_TO_BEN_TWO.create_ADE_rows(
27678: p_validate => p_validate
27679: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27680: ,p_effective_date => p_effective_date
27688: -- LDC records are created at PGM,PTIP and PL level
27689: -- This call creates the intersections between all these levels and
27690: -- ben_ler_f
27691: --
27692: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LDC') then
27693: BEN_PD_COPY_TO_BEN_TWO.create_LDC_rows(
27694: p_validate => p_validate
27695: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27696: ,p_effective_date => p_effective_date
27702: end if;
27703: --
27704: -- LCC records are created at LDC and certification type
27705: --
27706: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LCC') then
27707: BEN_PD_COPY_TO_BEN_TWO.create_LCC_rows(
27708: p_validate => p_validate
27709: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27710: ,p_effective_date => p_effective_date
27715: );
27716: end if;
27717: -- WPT records are created at PTIP and wv_prtn_rsn_cd intersection
27718: --
27719: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('WPT') then
27720: BEN_PD_COPY_TO_BEN_TWO.create_WPT_rows(
27721: p_validate => p_validate
27722: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27723: ,p_effective_date => p_effective_date
27728: );
27729: end if;
27730: -- WCT records are created at WPT and wv_prtn_ctfn_typ_cd intersection
27731: --
27732: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('WCT') then
27733: BEN_PD_COPY_TO_BEN_TWO.create_WCT_rows(
27734: p_validate => p_validate
27735: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27736: ,p_effective_date => p_effective_date
27741: );
27742: end if;
27743: -- LCT records are created at PTIP and LER_ID intersection
27744: --
27745: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LCT') then
27746: BEN_PD_COPY_TO_BEN_TWO.create_LCT_rows(
27747: p_validate => p_validate
27748: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27749: ,p_effective_date => p_effective_date
27754: );
27755: end if;
27756: -- PYD records are created at PTIP and dependent certification type intersection
27757: --
27758: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PYD') then
27759: BEN_PD_COPY_TO_BEN_TWO.create_PYD_rows(
27760: p_validate => p_validate
27761: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27762: ,p_effective_date => p_effective_date
27768: end if;
27769: -- PLIP Rows start here
27770: -- CPP records are created at PGM and PLN intersection
27771: -- XXXPLIP
27772: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CPP') then
27773: BEN_PD_COPY_TO_BEN_TWO.create_CPP_rows(
27774: p_validate => p_validate
27775: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27776: ,p_effective_date => p_effective_date
27781: );
27782: end if;
27783:
27784: -- OIPLIP Always Reuse, never create
27785: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('OPP') then
27786: BEN_PD_COPY_TO_BEN_TWO.create_OPP_rows(
27787: p_validate => p_validate
27788: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27789: ,p_effective_date => p_effective_date
27795: end if;
27796: --
27797: -- OPTIP Always Reuse, never create
27798: /* Commented out for Now - Not Complete
27799: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('OTP') then
27800: BEN_PD_COPY_TO_BEN_TWO.create_OTP_rows(
27801: p_validate => p_validate
27802: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27803: ,p_effective_date => p_effective_date
27811: --
27812: -- Moved call from bepdccp1.pkb so that Benefit Pools are
27813: -- created after PLIP, PTIP and OIPLIP
27814: --
27815: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('BPP') then
27816: BEN_PD_COPY_TO_BEN_TWO.create_BPP_rows(
27817: p_validate => p_validate
27818: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27819: ,p_effective_date => p_effective_date
27826: --
27827:
27828: -- LBR records are created at PLIP and LER intersection
27829: --
27830: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LBR') then
27831: BEN_PD_COPY_TO_BEN_TWO.create_LBR_rows(
27832: p_validate => p_validate
27833: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27834: ,p_effective_date => p_effective_date
27840: end if;
27841: --
27842: -- LPR1 records are created at PLIP and LER intersection
27843: --
27844: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LPR1') then
27845: BEN_PD_COPY_TO_BEN_TWO.create_LPR1_rows(
27846: p_validate => p_validate
27847: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27848: ,p_effective_date => p_effective_date
27854: end if;
27855: -- Plan Intersections
27856: -- VGS records are created at PL and GOS intersection
27857: --
27858: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('VGS') then
27859: BEN_PD_COPY_TO_BEN_TWO.create_VGS_rows(
27860: p_validate => p_validate
27861: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27862: ,p_effective_date => p_effective_date
27867: );
27868: end if;
27869: -- PCT records are created at VGS and certification type intersection
27870: --
27871: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PCT') then
27872: BEN_PD_COPY_TO_BEN_TWO.create_PCT_rows(
27873: p_validate => p_validate
27874: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27875: ,p_effective_date => p_effective_date
27880: );
27881: end if;
27882: -- VRP records as child record of PL
27883: --
27884: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('VRP') then
27885: BEN_PD_COPY_TO_BEN_TWO.create_VRP_rows(
27886: p_validate => p_validate
27887: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27888: ,p_effective_date => p_effective_date
27894: end if;
27895: --
27896: -- WPN records are intersection of PL and wv_prtn_rsn_cd
27897: --
27898: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('WPN') then
27899: BEN_PD_COPY_TO_BEN_TWO.create_WPN_rows(
27900: p_validate => p_validate
27901: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27902: ,p_effective_date => p_effective_date
27907: );
27908: end if;
27909: -- WCN records are intersection of WPN and wv_prtn_ctfn_typ_cd
27910: --
27911: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('WCN') then
27912: BEN_PD_COPY_TO_BEN_TWO.create_WCN_rows(
27913: p_validate => p_validate
27914: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27915: ,p_effective_date => p_effective_date
27921: end if;
27922: --
27923: -- BRC records are intersection of PL and enrt_ctfn_typ_cd
27924: --
27925: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('BRC') then
27926: BEN_PD_COPY_TO_BEN_TWO.create_BRC_rows(
27927: p_validate => p_validate
27928: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27929: ,p_effective_date => p_effective_date
27934: );
27935: end if;
27936: -- LBC records are intersection of ler_bnft_rstrn_id and enrt_ctfn_typ_cd
27937: --
27938: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LBC') then
27939: BEN_PD_COPY_TO_BEN_TWO.create_LBC_rows(
27940: p_validate => p_validate
27941: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27942: ,p_effective_date => p_effective_date
27947: );
27948: end if;
27949: -- LRE records are intersection of PL,OIPL with LER
27950: --
27951: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LRE') then
27952: BEN_PD_COPY_TO_BEN_TWO.create_LRE_rows(
27953: p_validate => p_validate
27954: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27955: ,p_effective_date => p_effective_date
27960: );
27961: end if;
27962: -- LNC records are intersection of LRE and enrt_ctfn_typ_cd
27963: --
27964: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LNC') then
27965: BEN_PD_COPY_TO_BEN_TWO.create_LNC_rows(
27966: p_validate => p_validate
27967: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27968: ,p_effective_date => p_effective_date
27973: );
27974: end if;
27975: -- LPE records are intersection of PLN and LER
27976: --
27977: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LPE') then
27978: BEN_PD_COPY_TO_BEN_TWO.create_LPE_rows(
27979: p_validate => p_validate
27980: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27981: ,p_effective_date => p_effective_date
27986: );
27987: end if;
27988: -- PND records are intersection of PLN and dpnt_cvg_ctfn_typ_cd
27989: --
27990: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PND') then
27991: BEN_PD_COPY_TO_BEN_TWO.create_PND_rows(
27992: p_validate => p_validate
27993: ,p_copy_entity_txn_id => p_copy_entity_txn_id
27994: ,p_effective_date => p_effective_date
28005: -- These records needs to be created at the end of the process.
28006: -- PEO records are created at PGM,PTIP,PLIP,PL and OIPLIP level
28007: -- This call creates the intersections between all these levels and ler.
28008: --
28009: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PEO') then
28010: BEN_PD_COPY_TO_BEN_TWO.create_PEO_rows(
28011: p_validate => p_validate
28012: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28013: ,p_effective_date => p_effective_date
28019: end if;
28020: --
28021: -- EPA records are created at PGM,PTIP,PLIP,PL and OIPLIP level
28022: --
28023: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('EPA') then
28024: BEN_PD_COPY_TO_BEN_TWO.create_EPA_rows(
28025: p_validate => p_validate
28026: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28027: ,p_effective_date => p_effective_date
28033: end if;
28034: --
28035: -- CEP records are created at the intersection of EPA and ELP
28036: --
28037: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CEP') then
28038: BEN_PD_COPY_TO_BEN_TWO.create_CEP_rows(
28039: p_validate => p_validate
28040: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28041: ,p_effective_date => p_effective_date
28046: );
28047: end if;
28048: -- CER records are created at the intersection of EPA and FORMULA
28049: --
28050: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('CER') then
28051: BEN_PD_COPY_TO_BEN_TWO.create_CER_rows(
28052: p_validate => p_validate
28053: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28054: ,p_effective_date => p_effective_date
28059: );
28060: end if;
28061: --
28062: --
28063: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PCX') then
28064: BEN_PD_COPY_TO_BEN_TWO.create_PCX_rows(
28065: p_validate => p_validate
28066: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28067: ,p_effective_date => p_effective_date
28073: end if;
28074: --
28075: -- PCP records are intersection of PLN and ben_pl_pcp
28076: --
28077: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PCP') then
28078: BEN_PD_COPY_TO_BEN_TWO.create_PCP_rows(
28079: p_validate => p_validate
28080: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28081: ,p_effective_date => p_effective_date
28087: end if;
28088: --
28089: -- PTY records are child records of PCP
28090: --
28091: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PTY') then
28092: BEN_PD_COPY_TO_BEN_TWO.create_PTY_rows(
28093: p_validate => p_validate
28094: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28095: ,p_effective_date => p_effective_date
28101: end if;
28102: --
28103: -- PRB records are child records of PLN OR BNR
28104: --
28105: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PRB') then
28106: BEN_PD_COPY_TO_BEN_TWO.create_PRB_rows(
28107: p_validate => p_validate
28108: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28109: ,p_effective_date => p_effective_date
28114: );
28115: end if;
28116: --
28117: --
28118: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PRP') then
28119: BEN_PD_COPY_TO_BEN_TWO.create_PRP_rows(
28120: p_validate => p_validate
28121: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28122: ,p_effective_date => p_effective_date
28154:
28155: end if;
28156:
28157: -- TCS PDW Integration passed the parameter BEN_PD_COPY_TO_BEN_TWO.g_row_type_cd to create_all_leaf_ben_rows
28158: BEN_PD_COPY_TO_BEN_ONE.create_all_leaf_ben_rows(
28159: p_validate => p_validate
28160: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28161: ,p_effective_date => p_effective_date
28162: ,p_prefix_suffix_text => p_prefix_suffix_text
28184: --
28185: -- LGE records are created at Only PGM level
28186: -- This call creates the intersections between the program levels and ler.
28187: --
28188: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('LGE') then
28189: BEN_PD_COPY_TO_BEN_TWO.create_LGE_rows(
28190: p_validate => p_validate
28191: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28192: ,p_effective_date => p_effective_date
28199: --
28200: -- PGC records are created at Only PGM level
28201: -- This call creates the intersections between the program levels and dpnt_cvg_ctfn_typ_cd.
28202: --
28203: if BEN_PD_COPY_TO_BEN_ONE.data_exists_for_table('PGC') then
28204: BEN_PD_COPY_TO_BEN_TWO.create_PGC_rows(
28205: p_validate => p_validate
28206: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28207: ,p_effective_date => p_effective_date
28294: --
28295: -- To set the Global variable for Mapping data.
28296: set_mapping(p_copy_entity_txn_id) ;
28297: --
28298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
28299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
28300: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
28301: --
28302: -- Initialize Logging Tables
28295: -- To set the Global variable for Mapping data.
28296: set_mapping(p_copy_entity_txn_id) ;
28297: --
28298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
28299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
28300: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
28301: --
28302: -- Initialize Logging Tables
28303: BEN_PD_COPY_TO_BEN_ONE.init_log_tbl;
28296: set_mapping(p_copy_entity_txn_id) ;
28297: --
28298: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl.delete;
28299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
28300: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
28301: --
28302: -- Initialize Logging Tables
28303: BEN_PD_COPY_TO_BEN_ONE.init_log_tbl;
28304: --
28299: BEN_PD_COPY_TO_BEN_ONE.g_pk_tbl(0) := null ;
28300: BEN_PD_COPY_TO_BEN_ONE.g_count := 1 ;
28301: --
28302: -- Initialize Logging Tables
28303: BEN_PD_COPY_TO_BEN_ONE.init_log_tbl;
28304: --
28305:
28306: -- Update information9 to NULL
28307: -- Required for reusing Copy Process
28310: set information9 = null
28311: where copy_entity_txn_id = p_copy_entity_txn_id;
28312:
28313:
28314: BEN_PD_COPY_TO_BEN_ONE.init_table_data_in_cer(p_copy_entity_txn_id);
28315:
28316: -- Initialize global variable for Effective Date to Copy
28317: BEN_PD_COPY_TO_BEN_ONE.g_copy_effective_date := p_effective_date_to_copy;
28318:
28313:
28314: BEN_PD_COPY_TO_BEN_ONE.init_table_data_in_cer(p_copy_entity_txn_id);
28315:
28316: -- Initialize global variable for Effective Date to Copy
28317: BEN_PD_COPY_TO_BEN_ONE.g_copy_effective_date := p_effective_date_to_copy;
28318:
28319: open c_transaction_category(p_copy_entity_txn_id);
28320: fetch c_transaction_category into l_transaction_category;
28321: close c_transaction_category;
28320: fetch c_transaction_category into l_transaction_category;
28321: close c_transaction_category;
28322:
28323: -- Initialize global variable for Transaction Category
28324: BEN_PD_COPY_TO_BEN_ONE.g_transaction_category := l_transaction_category.short_name;
28325:
28326: BEN_PD_COPY_TO_BEN_TWO.create_pgm_intersect_rows(
28327: p_validate => p_validate
28328: ,p_copy_entity_txn_id => p_copy_entity_txn_id
28332: ,p_target_business_group_id => p_target_business_group_id
28333: ,p_prefix_suffix_cd => p_prefix_suffix_cd
28334: );
28335:
28336: BEN_PD_COPY_TO_BEN_ONE.g_copy_effective_date := null;
28337: BEN_PD_COPY_TO_BEN_ONE.g_transaction_category := null;
28338: --
28339: --
28340: end create_stg_to_ben_rows ;
28333: ,p_prefix_suffix_cd => p_prefix_suffix_cd
28334: );
28335:
28336: BEN_PD_COPY_TO_BEN_ONE.g_copy_effective_date := null;
28337: BEN_PD_COPY_TO_BEN_ONE.g_transaction_category := null;
28338: --
28339: --
28340: end create_stg_to_ben_rows ;
28341: --